Explorar o código

OA流程页面编写

sunlupeng hai 1 ano
pai
achega
2f781b4772

+ 1 - 1
.env.dev

@@ -5,7 +5,7 @@ ENV = 'development'
 VUE_APP_TITLE = 爱思系统
 
 # 爱思系统/开发环境
-VUE_APP_BASE_API = 'http://localhost:48080'
+VUE_APP_BASE_API = 'http://192.168.100.213:48080'
 
 # 路由懒加载
 VUE_CLI_BABEL_TRANSPILE_MODULES = true

+ 26 - 0
src/api/register.js

@@ -0,0 +1,26 @@
+import request from '@/utils/request'
+
+
+
+// 获取注册验证码
+export function sendSmsCode(mobile, scene) {
+  return request({
+    url: '/system/register/send-sms-code',
+    method: 'post',
+    data: {
+      mobile,
+      scene
+    }
+  })
+}
+// 短信验证码注册
+export function smsRegister(mobile, code) {
+  return request({
+    url: '/system/register/sms-register',
+    method: 'post',
+    data: {
+      mobile,
+      code
+    }
+  })
+}

+ 93 - 93
src/components/AppList/index.vue

@@ -155,99 +155,99 @@ export default {
     handleSelect(item) {
       let key = item.path;
       const menus = [
-        // {
-        //   "id": 1,
-        //   "parentId": 0,
-        //   "name": "任务管理",
-        //   "path": "/task",
-        //   "component": null,
-        //   "componentName": null,
-        //   "icon": "cascader",
-        //   "visible": true,
-        //   "keepAlive": true,
-        //   "alwaysShow": true,
-        //   "children": [
-        //     {
-        //       "id": 1201,
-        //       "parentId": 1200,
-        //       "name": "我的流程",
-        //       "path": "my",
-        //       "component": "bpm/processInstance/index",
-        //       "componentName": "BpmProcessInstance",
-        //       "icon": "people",
-        //       "visible": true,
-        //       "keepAlive": true,
-        //       "alwaysShow": true,
-        //       "children": null
-        //     },
-        //     {
-        //       "id": 1207,
-        //       "parentId": 1200,
-        //       "name": "待办任务",
-        //       "path": "todo",
-        //       "component": "bpm/task/todo/index",
-        //       "componentName": "BpmTodoTask",
-        //       "icon": "eye-open",
-        //       "visible": true,
-        //       "keepAlive": true,
-        //       "alwaysShow": true,
-        //       "children": null
-        //     },
-        //     {
-        //       "id": 1208,
-        //       "parentId": 1200,
-        //       "name": "已办任务",
-        //       "path": "done",
-        //       "component": "bpm/task/done/index",
-        //       "componentName": "BpmDoneTask",
-        //       "icon": "eye",
-        //       "visible": true,
-        //       "keepAlive": true,
-        //       "alwaysShow": true,
-        //       "children": null
-        //     }
-        //   ]
-        // },
-        // {
-        //   "id": 1224,
-        //   "parentId": 0,
-        //   "name": "租户管理",
-        //   "path": "/tenant",
-        //   "component": null,
-        //   "componentName": null,
-        //   "icon": "peoples",
-        //   "visible": true,
-        //   "keepAlive": true,
-        //   "alwaysShow": true,
-        //   "children": [
-        //     {
-        //       "id": 1138,
-        //       "parentId": 1224,
-        //       "name": "租户列表",
-        //       "path": "list",
-        //       "component": "system/tenant/index",
-        //       "componentName": "SystemTenant",
-        //       "icon": "peoples",
-        //       "visible": true,
-        //       "keepAlive": true,
-        //       "alwaysShow": true,
-        //       "children": null
-        //     },
-        //     {
-        //       "id": 1225,
-        //       "parentId": 1224,
-        //       "name": "租户套餐",
-        //       "path": "package",
-        //       "component": "system/tenantPackage/index",
-        //       "componentName": "SystemTenantPackage",
-        //       "icon": "eye",
-        //       "visible": true,
-        //       "keepAlive": true,
-        //       "alwaysShow": true,
-        //       "children": null
-        //     }
-        //   ]
-        // },
+        {
+          "id": 1,
+          "parentId": 0,
+          "name": "任务管理",
+          "path": "/task",
+          "component": null,
+          "componentName": null,
+          "icon": "cascader",
+          "visible": true,
+          "keepAlive": true,
+          "alwaysShow": true,
+          "children": [
+            {
+              "id": 1201,
+              "parentId": 1200,
+              "name": "我的流程",
+              "path": "my",
+              "component": "bpm/processInstance/index",
+              "componentName": "BpmProcessInstance",
+              "icon": "people",
+              "visible": true,
+              "keepAlive": true,
+              "alwaysShow": true,
+              "children": null
+            },
+            {
+              "id": 1207,
+              "parentId": 1200,
+              "name": "待办任务",
+              "path": "todo",
+              "component": "bpm/task/todo/index",
+              "componentName": "BpmTodoTask",
+              "icon": "eye-open",
+              "visible": true,
+              "keepAlive": true,
+              "alwaysShow": true,
+              "children": null
+            },
+            {
+              "id": 1208,
+              "parentId": 1200,
+              "name": "已办任务",
+              "path": "done",
+              "component": "bpm/task/done/index",
+              "componentName": "BpmDoneTask",
+              "icon": "eye",
+              "visible": true,
+              "keepAlive": true,
+              "alwaysShow": true,
+              "children": null
+            }
+          ]
+        },
+        {
+          "id": 1224,
+          "parentId": 0,
+          "name": "租户管理",
+          "path": "/tenant",
+          "component": null,
+          "componentName": null,
+          "icon": "peoples",
+          "visible": true,
+          "keepAlive": true,
+          "alwaysShow": true,
+          "children": [
+            {
+              "id": 1138,
+              "parentId": 1224,
+              "name": "租户列表",
+              "path": "list",
+              "component": "system/tenant/index",
+              "componentName": "SystemTenant",
+              "icon": "peoples",
+              "visible": true,
+              "keepAlive": true,
+              "alwaysShow": true,
+              "children": null
+            },
+            {
+              "id": 1225,
+              "parentId": 1224,
+              "name": "租户套餐",
+              "path": "package",
+              "component": "system/tenantPackage/index",
+              "componentName": "SystemTenantPackage",
+              "icon": "eye",
+              "visible": true,
+              "keepAlive": true,
+              "alwaysShow": true,
+              "children": null
+            }
+          ]
+        },
         {
           "id": 1,
           "parentId": 0,

+ 7 - 6
src/components/PeopleSelect/index.vue

@@ -249,12 +249,13 @@
       },
       methods: {
         handleClose(done) {
-          this.$confirm('确认关闭?')
-            .then(_ => {
-              this.cancel()
-            })
-            .catch(_ => {
-            })
+          this.cancel()
+          // this.$confirm('确认关闭?')
+          //   .then(_ => {
+          //     this.cancel()
+          //   })
+          //   .catch(_ => {
+          //   })
         },
         handleClick(tab, event) {
           console.log(tab, event)

+ 20 - 4
src/store/modules/user.js

@@ -1,5 +1,6 @@
-import {login, logout, getInfo, socialLogin, smsLogin} from '@/api/login'
-import {setToken, removeToken} from '@/utils/auth'
+import { login, logout, getInfo, socialLogin, smsLogin } from '@/api/login'
+import { smsRegister } from '@/api/register'
+import { setToken, removeToken } from '@/utils/auth'
 
 const user = {
   state: {
@@ -74,7 +75,22 @@ const user = {
       const mobile = userInfo.mobile.trim()
       const mobileCode = userInfo.mobileCode
       return new Promise((resolve, reject) => {
-        smsLogin(mobile,mobileCode).then(res => {
+        smsLogin(mobile, mobileCode).then(res => {
+          res = res.data;
+          // 设置 token
+          setToken(res)
+          resolve()
+        }).catch(error => {
+          reject(error)
+        })
+      })
+    },
+    // 短信注册
+    SmsRegister({ commit }, userInfo) {
+      const mobile = userInfo.mobile.trim()
+      const mobileCode = userInfo.mobileCode
+      return new Promise((resolve, reject) => {
+        smsRegister(mobile, mobileCode).then(res => {
           res = res.data;
           // 设置 token
           setToken(res)
@@ -105,7 +121,7 @@ const user = {
 
           res = res.data; // 读取 data 数据
           const user = res.user
-          const avatar = ( user.avatar === "" || user.avatar == null ) ? require("@/assets/images/profile.jpg") : user.avatar;
+          const avatar = (user.avatar === "" || user.avatar == null) ? require("@/assets/images/profile.jpg") : user.avatar;
           if (res.roles && res.roles.length > 0) { // 验证返回的roles是否是一个非空数组
             commit('SET_ROLES', res.roles)
             commit('SET_PERMISSIONS', res.permissions)

+ 1 - 0
src/views/bpm/processInstance/detail.vue

@@ -270,6 +270,7 @@ export default {
 
         //将业务表单,注册为动态组件
         const path = this.processInstance.processDefinition.formCustomViewPath;
+        console.log("path:" + path)
         Vue.component("async-biz-form-component", function (resolve) {
           require([`@/views${path}`], resolve);
         });

+ 12 - 18
src/views/login.vue

@@ -23,11 +23,7 @@
           </el-tabs>
           <div>
             <el-form ref="loginForm" :model="loginForm" :rules="LoginRules" class="login-form">
-              <!-- <el-form-item prop="tenantName" v-if="tenantEnable">
-                <el-input v-model="loginForm.tenantName" type="text" auto-complete="off" placeholder='租户'>
-                  <svg-icon slot="prefix" icon-class="tree" class="el-input__icon input-icon"/>
-                </el-input>
-              </el-form-item> -->
+             
               <!-- 账号密码登录 -->
               <div v-if="loginForm.loginType === 'uname'">
                 <el-form-item prop="username">
@@ -104,8 +100,8 @@
     </div>
 
     <!-- 图形验证码 -->
-    <Verify ref="verify" :captcha-type="'blockPuzzle'" :img-size="{width:'400px',height:'200px'}"
-            @success="handleLogin" />
+    <!-- <Verify ref="verify" :captcha-type="'blockPuzzle'" :img-size="{width:'400px',height:'200px'}"
+            @success="handleLogin" /> -->
 
     <!-- footer -->
     <!-- <div class="footer">
@@ -130,7 +126,6 @@ import {
 } from "@/utils/auth";
 
 import Verify from '@/components/Verifition/Verify';
-import {resetUserPwd} from "@/api/system/user";
 
 export default {
   name: "Login",
@@ -139,7 +134,6 @@ export default {
   },
   data() {
     return {
-      codeUrl: "",
       captchaEnable: true,
       tenantEnable: true,
       mobileCodeTimer: 0,
@@ -204,15 +198,15 @@ export default {
   },
   created() {
     // 租户开关
-    this.tenantEnable = getTenantEnable();
-    if (this.tenantEnable) {
-      getTenantIdByName(this.loginForm.tenantName).then(res => { // 设置租户
-        const tenantId = res.data;
-        if (tenantId && tenantId >= 0) {
-          setTenantId(tenantId)
-        }
-      });
-    }
+    // this.tenantEnable = getTenantEnable();
+    // if (this.tenantEnable) {
+    //   getTenantIdByName(this.loginForm.tenantName).then(res => { // 设置租户
+    //     const tenantId = res.data;
+    //     if (tenantId && tenantId >= 0) {
+    //       setTenantId(tenantId)
+    //     }
+    //   });
+    // }
     // 验证码开关
     this.captchaEnable = getCaptchaEnable();
     // 重定向地址

+ 497 - 0
src/views/oa/DataList.vue

@@ -0,0 +1,497 @@
+<template>
+  <div class="container">
+    <el-form :model="queryParams" ref="queryForm" v-show="showSearch" :inline="true">
+      <el-form-item label="角色名称" prop="name">
+        <el-input v-model="queryParams.name" placeholder="请输入角色名称" clearable style="width: 250px"
+                  @keyup.enter.native="handleQuery"/>
+      </el-form-item>
+      <el-form-item label="角色标识" prop="code">
+        <el-input v-model="queryParams.code" placeholder="请输入角色标识" clearable style="width: 250px"
+                  @keyup.enter.native="handleQuery"/>
+      </el-form-item>
+      <el-form-item label="状态" prop="status">
+        <el-select v-model="queryParams.status" placeholder="角色状态" clearable style="width: 250px">
+          <el-option v-for="dict in statusDictDatas" :key="parseInt(dict.value)" :label="dict.label" :value="parseInt(dict.value)"/>
+        </el-select>
+      </el-form-item>
+      <el-form-item label="创建时间" prop="createTime">
+        <el-date-picker v-model="queryParams.createTime" style="width: 250px" value-format="yyyy-MM-dd HH:mm:ss" type="daterange"
+                        range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期" :default-time="['00:00:00', '23:59:59']" />
+      </el-form-item>
+      <el-form-item>
+        <el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>
+        <el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>
+      </el-form-item>
+    </el-form>
+
+    <el-row :gutter="10" class="mb8">
+      <!-- <el-col :span="1.5">
+        <el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd"
+                   v-hasPermi="['system:role:create']">新增</el-button>
+      </el-col> -->
+      <el-col :span="1.5">
+        <el-button type="warning" icon="el-icon-download" @click="handleExport" :loading="exportLoading"
+                   v-hasPermi="['system:role:export']">导出</el-button>
+      </el-col>
+      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
+    </el-row>
+
+    <el-table v-loading="loading" :data="roleList" @row-click="handdle">
+      <el-table-column label="角色编号" prop="id" width="120" />
+      <el-table-column label="角色名称" prop="name" :show-overflow-tooltip="true" width="150" />
+      <el-table-column label="角色标识" prop="code" :show-overflow-tooltip="true" width="150" />
+      <el-table-column label="角色类型" prop="type" width="80">
+        <template v-slot="scope">
+          <dict-tag :type="DICT_TYPE.SYSTEM_ROLE_TYPE" :value="scope.row.type"/>
+        </template>
+      </el-table-column>
+      <el-table-column label="显示顺序" prop="sort" width="100" />
+      <el-table-column label="状态" align="center" width="100">
+        <template v-slot="scope">
+          <el-switch v-model="scope.row.status" :active-value="0" :inactive-value="1" @change="handleStatusChange(scope.row)"/>
+        </template>
+      </el-table-column>
+      <el-table-column label="创建时间" align="center" prop="createTime" width="180">
+        <template v-slot="scope">
+          <span>{{ parseTime(scope.row.createTime) }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
+        <template v-slot="scope">
+          <el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)"
+                     v-hasPermi="['system:role:update']">修改</el-button>
+          <el-button size="mini" type="text" icon="el-icon-circle-check" @click="handleMenu(scope.row)"
+                     v-hasPermi="['system:permission:assign-role-menu']">菜单权限</el-button>
+          <el-button size="mini" type="text" icon="el-icon-circle-check" @click="handleDataScope(scope.row)"
+                     v-hasPermi="['system:permission:assign-role-data-scope']">数据权限</el-button>
+          <el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)"
+                     v-hasPermi="['system:role:delete']">删除</el-button>
+        </template>
+      </el-table-column>
+    </el-table>
+
+    <pagination v-show="total>0" :total="total" :page.sync="queryParams.pageNo" :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="name">
+          <el-input v-model="form.name" placeholder="请输入角色名称" />
+        </el-form-item>
+        <el-form-item label="角色标识" prop="code">
+          <el-input v-model="form.code" placeholder="请输入角色标识" />
+        </el-form-item>
+        <el-form-item label="角色顺序" prop="sort">
+          <el-input-number v-model="form.sort" controls-position="right" :min="0" />
+        </el-form-item>
+        <el-form-item label="备注">
+          <el-input v-model="form.remark" type="textarea" placeholder="请输入内容"></el-input>
+        </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>
+
+    <!-- 分配角色的数据权限对话框 -->
+    <el-dialog title="分配数据权限" :visible.sync="openDataScope" width="500px" append-to-body>
+      <el-form :model="form" label-width="80px">
+        <el-form-item label="角色名称">
+          <el-input v-model="form.name" :disabled="true" />
+        </el-form-item>
+        <el-form-item label="角色标识">
+          <el-input v-model="form.code" :disabled="true" />
+        </el-form-item>
+        <el-form-item label="权限范围">
+          <el-select v-model="form.dataScope">
+            <el-option
+              v-for="item in dataScopeDictDatas"
+              :key="parseInt(item.value)"
+              :label="item.label"
+              :value="parseInt(item.value)"
+            ></el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item label="数据权限" v-show="form.dataScope === SysDataScopeEnum.DEPT_CUSTOM">
+          <el-checkbox :checked="!form.deptCheckStrictly" @change="handleCheckedTreeConnect($event, 'dept')">父子联动(选中父节点,自动选择子节点)</el-checkbox>
+          <el-checkbox v-model="deptExpand" @change="handleCheckedTreeExpand($event, 'dept')">展开/折叠</el-checkbox>
+          <el-checkbox v-model="deptNodeAll" @change="handleCheckedTreeNodeAll($event, 'dept')">全选/全不选</el-checkbox>
+          <el-tree
+            class="tree-border"
+            :data="deptOptions"
+            show-checkbox
+            default-expand-all
+            ref="dept"
+            node-key="id"
+            :check-strictly="form.deptCheckStrictly"
+            empty-text="加载中,请稍后"
+            :props="defaultProps"
+          ></el-tree>
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="submitDataScope">确 定</el-button>
+        <el-button @click="cancelDataScope">取 消</el-button>
+      </div>
+    </el-dialog>
+
+    <!-- 分配角色的菜单权限对话框 -->
+    <el-dialog :title="title" :visible.sync="openMenu" width="500px" append-to-body>
+      <el-form :model="form" label-width="80px">
+        <el-form-item label="角色名称">
+          <el-input v-model="form.name" :disabled="true" />
+        </el-form-item>
+        <el-form-item label="角色标识">
+          <el-input v-model="form.code" :disabled="true" />
+        </el-form-item>
+        <el-form-item label="菜单权限">
+          <el-checkbox v-model="menuExpand" @change="handleCheckedTreeExpand($event, 'menu')">展开/折叠</el-checkbox>
+          <el-checkbox v-model="menuNodeAll" @change="handleCheckedTreeNodeAll($event, 'menu')">全选/全不选</el-checkbox>
+          <el-tree class="tree-border" :data="menuOptions" show-checkbox ref="menu" node-key="id"
+              :check-strictly="form.menuCheckStrictly" empty-text="加载中,请稍后" :props="defaultProps"></el-tree>
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="submitMenu">确 定</el-button>
+        <el-button @click="cancelMenu">取 消</el-button>
+      </div>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import {
+  addRole,
+  changeRoleStatus,
+  delRole,
+  exportRole,
+  getRole,
+  listRole,
+  updateRole
+} from "@/api/system/role";
+import {listSimpleMenus} from "@/api/system/menu";
+import {assignRoleMenu, listRoleMenus, assignRoleDataScope} from "@/api/system/permission";
+import {listSimpleDepts} from "@/api/system/dept";
+import {CommonStatusEnum, SystemDataScopeEnum} from "@/utils/constants";
+import {DICT_TYPE, getDictDatas} from "@/utils/dict";
+
+export default {
+  name: "SystemRole",
+  data() {
+    return {
+      // 遮罩层
+      loading: true,
+      // 导出遮罩层
+      exportLoading: false,
+      // 显示搜索条件
+      showSearch: true,
+      // 总条数
+      total: 0,
+      // 角色表格数据
+      roleList: [],
+      // 弹出层标题
+      title: "",
+      // 是否显示弹出层
+      open: false,
+      // 是否显示弹出层(数据权限)
+      openDataScope: false,
+      // 是否显示弹出层(菜单权限)
+      openMenu: false,
+      menuExpand: false,
+      menuNodeAll: false,
+      deptExpand: true,
+      deptNodeAll: false,
+      // 菜单列表
+      menuOptions: [],
+      // 部门列表
+      deptOptions: [], // 部门属性结构
+      depts: [], // 部门列表
+      // 查询参数
+      queryParams: {
+        pageNo: 1,
+        pageSize: 10,
+        name: undefined,
+        code: undefined,
+        status: undefined,
+        createTime: []
+      },
+      // 表单参数
+      form: {},
+      defaultProps: {
+        label: "name",
+        children: "children"
+      },
+      // 表单校验
+      rules: {
+        name: [
+          { required: true, message: "角色名称不能为空", trigger: "blur" }
+        ],
+        code: [
+          { required: true, message: "角色标识不能为空", trigger: "blur" }
+        ],
+        sort: [
+          { required: true, message: "角色顺序不能为空", trigger: "blur" }
+        ]
+      },
+
+      // 枚举
+      SysCommonStatusEnum: CommonStatusEnum,
+      SysDataScopeEnum: SystemDataScopeEnum,
+      // 数据字典
+      roleTypeDictDatas: getDictDatas(DICT_TYPE.SYSTEM_ROLE_TYPE),
+      statusDictDatas: getDictDatas(DICT_TYPE.COMMON_STATUS),
+      dataScopeDictDatas: getDictDatas(DICT_TYPE.SYSTEM_DATA_SCOPE)
+    };
+  },
+  created() {
+    this.getList();
+  },
+  methods: {
+    handdle(row, event, column) {
+          console.log(row, event, column)
+    },
+
+    /** 查询角色列表 */
+    getList() {
+      this.loading = true;
+      listRole(this.queryParams).then(
+        response => {
+          this.roleList = response.data.list;
+          this.total = response.data.total;
+          this.loading = false;
+        }
+      );
+    },
+    // 角色状态修改
+    handleStatusChange(row) {
+      // 此时,row 已经变成目标状态了,所以可以直接提交请求和提示
+      let text = row.status === CommonStatusEnum.ENABLE ? "启用" : "停用";
+      this.$modal.confirm('确认要"' + text + '""' + row.name + '"角色吗?').then(function() {
+          return changeRoleStatus(row.id, row.status);
+        }).then(() => {
+          this.$modal.msgSuccess(text + "成功");
+        }).catch(function() {
+          // 异常时,需要将 row.status 状态重置回之前的
+          row.status = row.status === CommonStatusEnum.ENABLE ? CommonStatusEnum.DISABLE
+              : CommonStatusEnum.ENABLE;
+        });
+    },
+    // 取消按钮
+    cancel() {
+      this.open = false;
+      this.reset();
+    },
+    // 取消按钮(数据权限)
+    cancelDataScope() {
+      this.openDataScope = false;
+      this.reset();
+    },
+    // 取消按钮(菜单权限)
+    cancelMenu() {
+      this.openMenu = false;
+      this.reset();
+    },
+    // 表单重置
+    reset() {
+      if (this.$refs.menu !== undefined) {
+        this.$refs.menu.setCheckedKeys([]);
+      }
+      this.menuExpand = false;
+      this.menuNodeAll = false;
+      this.deptExpand = true;
+      this.deptNodeAll = false;
+      this.form = {
+        id: undefined,
+        name: undefined,
+        code: undefined,
+        sort: 0,
+        deptIds: [],
+        menuIds: [],
+        dataScope: undefined,
+        deptCheckStrictly: false,
+        menuCheckStrictly: true,
+        remark: undefined
+      };
+      this.resetForm("form");
+    },
+    /** 搜索按钮操作 */
+    handleQuery() {
+      this.queryParams.pageNo = 1;
+      this.getList();
+    },
+    /** 重置按钮操作 */
+    resetQuery() {
+      this.resetForm("queryForm");
+      this.handleQuery();
+    },
+    // 树权限(展开/折叠)
+    handleCheckedTreeExpand(value, type) {
+      if (type === 'menu') {
+        let treeList = this.menuOptions;
+        for (let i = 0; i < treeList.length; i++) {
+          this.$refs.menu.store.nodesMap[treeList[i].id].expanded = value;
+        }
+      } else if (type === 'dept') {
+        let treeList = this.deptOptions;
+        for (let i = 0; i < treeList.length; i++) {
+          this.$refs.dept.store.nodesMap[treeList[i].id].expanded = value;
+        }
+      }
+    },
+    // 树权限(全选/全不选)
+    handleCheckedTreeNodeAll(value, type) {
+      if (type === 'menu') {
+        this.$refs.menu.setCheckedNodes(value ? this.menuOptions: []);
+      } else if (type === 'dept') {
+        // this.$refs.dept.setCheckedNodes(value ? this.deptOptions: []);
+        this.$refs.dept.setCheckedNodes(value ? this.depts: []);
+      }
+    },
+    // 树权限(父子联动)
+    handleCheckedTreeConnect(value, type) {
+      if (type === 'menu') {
+        this.form.menuCheckStrictly = value;
+      } else if (type === 'dept') {
+        this.form.deptCheckStrictly = !value;
+      }
+    },
+    /** 新增按钮操作 */
+    handleAdd() {
+      this.reset();
+      this.open = true;
+      this.title = "添加角色";
+    },
+    /** 修改按钮操作 */
+    handleUpdate(row) {
+      this.reset();
+      const id = row.id
+      getRole(id).then(response => {
+        this.form = response.data;
+        this.open = true;
+        this.title = "修改角色";
+      });
+    },
+    /** 分配菜单权限操作 */
+    handleMenu(row) {
+      this.reset();
+      const id = row.id
+      // 处理了 form 的角色 name 和 code 的展示
+      this.form.id = id;
+      this.form.name = row.name;
+      this.form.code = row.code;
+      // 打开弹窗
+      this.openMenu = true;
+      // 获得菜单列表
+      listSimpleMenus().then(response => {
+        // 处理 menuOptions 参数
+        this.menuOptions = [];
+        this.menuOptions.push(...this.handleTree(response.data, "id"));
+        // 获取角色拥有的菜单权限
+        listRoleMenus(id).then(response => {
+          // 设置为严格,避免设置父节点自动选中子节点,解决半选中问题
+          this.form.menuCheckStrictly = true
+          // 设置选中
+          this.$refs.menu.setCheckedKeys(response.data);
+          // 设置为非严格,继续使用半选中
+          this.form.menuCheckStrictly = false
+        })
+      });
+
+    },
+    /** 分配数据权限操作 */
+    handleDataScope(row) {
+      this.reset();
+      // 处理了 form 的角色 name 和 code 的展示
+      this.form.id = row.id;
+      this.form.name = row.name;
+      this.form.code = row.code;
+      // 打开弹窗
+      this.openDataScope = true;
+      // 获得部门列表
+      listSimpleDepts().then(response => {
+        // 处理 deptOptions 参数
+        this.deptOptions = [];
+        this.deptOptions.push(...this.handleTree(response.data, "id"));
+        this.depts = response.data;
+        // this.deptIds = response.data.map(x => x.id);
+        // 获得角色拥有的数据权限
+        getRole(row.id).then(response => {
+          this.form.dataScope = response.data.dataScope;
+          this.$refs.dept.setCheckedKeys(response.data.dataScopeDeptIds, false);
+        });
+      });
+    },
+    /** 提交按钮 */
+    submitForm: function() {
+      this.$refs["form"].validate(valid => {
+        if (valid) {
+          if (this.form.id !== undefined) {
+            updateRole(this.form).then(response => {
+              this.$modal.msgSuccess("修改成功");
+              this.open = false;
+              this.getList();
+            });
+          } else {
+            addRole(this.form).then(response => {
+              this.$modal.msgSuccess("新增成功");
+              this.open = false;
+              this.getList();
+            });
+          }
+        }
+      });
+    },
+    /** 提交按钮(数据权限) */
+    submitDataScope: function() {
+      if (this.form.id !== undefined) {
+        assignRoleDataScope({
+          roleId: this.form.id,
+          dataScope: this.form.dataScope,
+          dataScopeDeptIds: this.form.dataScope !== SystemDataScopeEnum.DEPT_CUSTOM ? [] :
+              this.$refs.dept.getCheckedKeys()
+        }).then(response => {
+          this.$modal.msgSuccess("修改成功");
+          this.openDataScope = false;
+          this.getList();
+        });
+      }
+    },
+    /** 提交按钮(菜单权限) */
+    submitMenu: function() {
+      if (this.form.id !== undefined) {
+        assignRoleMenu({
+          roleId: this.form.id,
+          menuIds: [...this.$refs.menu.getCheckedKeys(), ...this.$refs.menu.getHalfCheckedKeys()]
+        }).then(response => {
+          this.$modal.msgSuccess("修改成功");
+          this.openMenu = false;
+          this.getList();
+        });
+      }
+    },
+    /** 删除按钮操作 */
+    handleDelete(row) {
+      const ids = row.id || this.ids;
+      this.$modal.confirm('是否确认删除角色编号为"' + ids + '"的数据项?').then(function() {
+          return delRole(ids);
+        }).then(() => {
+          this.getList();
+          this.$modal.msgSuccess("删除成功");
+      }).catch(() => {});
+    },
+    /** 导出按钮操作 */
+    handleExport() {
+      const queryParams = this.queryParams;
+      this.$modal.confirm('是否确认导出所有角色数据项?').then(function() {
+          this.exportLoading = true;
+          return exportRole(queryParams);
+        }).then(response => {
+          this.$download.excel(response, '角色数据.xls');
+          this.exportLoading = false;
+      }).catch(() => {});
+    }
+  }
+};
+</script>

+ 162 - 84
src/views/oa/entry.vue

@@ -1,99 +1,177 @@
 <template>
-    <div>
-      <div class='fixed-header'>
-        <oabar />
-      </div>
-      <div class="dashboard-container">
-       <div v-if="status" class="apply-box">
+  <div>
+    <div class='fixed-header'>
+      <oabar />
+    </div>
+    <div class="dashboard-container">
+      <div v-if="status" class="apply-box">
         <el-card class="box-card" style="min-height: 800px;border-radius: 10px">
-          
-          <el-button type="primary" icon="el-icon-search" @click="openPS" size="mini" >打开选人组件</el-button>
-          <PeopleSelect ref="peopleSelect" :type="type" :isCheck="true" :open="peopleOpen" @cancel="peopleOpen=false"   @submit="submitPeople"></PeopleSelect>
+          <div class="from-box">
+            <div class="title">入职审批</div>
+            <el-divider></el-divider>
+            <el-form :model="form" label-position="top" label-width="80px">
+              <el-form-item label="入职员工姓名">
+                <el-input v-model="form.name" placeholder='给应用命名,例如‘‘客户管理系统’’'></el-input>
+              </el-form-item>
+              <el-form-item label="用人部门">
+                <el-input v-model="form.url" placeholder='应用访问地址,例如‘‘https://www.baidu.com/’’'></el-input>
+              </el-form-item>
+              <el-form-item label="审批人">
+                <el-button class="button-new-tag" @click="openPS">+ 添加</el-button>
+                <el-tag :key="tag" v-for="tag in peopleList" closable :disable-transitions="false"
+                  @close="handleClose(tag)">
+                  {{ tag }}
+                </el-tag>
+                
+              </el-form-item>
+              <el-form-item>
+                <el-button type="primary" @click="onSubmit()">提交</el-button>
+                <el-button @click="onSave()">暂存</el-button>
+              </el-form-item>
+            </el-form>
+          </div>
+          <PeopleSelect ref="peopleSelect" :type="type" :isCheck="true" :open="peopleOpen" @cancel="peopleOpen = false"
+            @submit="submitPeople"></PeopleSelect>
         </el-card>
-       
-       </div>
-       <div v-else class="data-list-box">
+
+      </div>
+      <div v-else class="data-list-box">
         <el-card class="box-card" style="min-height: 800px;border-radius: 10px">
-            查看数据
+          <div class="dataList-box">
+            <DataList></DataList>
+          </div>
         </el-card>
-        
-       </div>
-  
+
       </div>
-     
+
     </div>
-  </template>
-  
-  <script>
-  import { getUnreadNotifyMessageList } from "@/api/system/notify/message";
-  import Oabar from '../../layout/components/Oabar.vue'
-  import PeopleSelect from "@/components/PeopleSelect/index.vue";
-  
-  export default {
-    name: 'Index',
-    components: {
-        Oabar,
-        PeopleSelect,
+
+  </div>
+</template>
+
+<script>
+import { getUnreadNotifyMessageList } from "@/api/system/notify/message";
+import Oabar from '../../layout/components/Oabar.vue'
+import PeopleSelect from "@/components/PeopleSelect/index.vue";
+import DataList from "./DataList.vue";
+
+export default {
+  name: 'Index',
+  components: {
+    Oabar,
+    PeopleSelect,
+    DataList
+  },
+  data() {
+    return {
+      peopleList: [],
+      form: {
+        name: '',
+        url: '',
+      },
+      status: true,
+
+      type: 'single',
+      //是否打开选人组件,默认不打开
+      peopleOpen: false,
+    }
+  },
+
+  created() {
+
+  },
+  methods: {
+    //提交
+    onSubmit(){
+
+    },
+    //暂存
+    onSave(){
+
     },
-    data() {
-      return {
-        status:true,
-        
-        type: 'single',
-        //是否打开选人组件,默认不打开
-        peopleOpen:false,
-      }
+    // 关闭标签
+    handleClose(tag) {
+      this.peopleList.splice(this.peopleList.indexOf(tag), 1);
     },
-  
-    created() {
-  
+    //打开选人弹窗
+    openPS() {
+      this.peopleOpen = true;
     },
-    methods: {
-      //打开选人弹窗
-      openPS(){
-        this.peopleOpen=true;
-       },
-      //选择人的确定按钮事件 submitPeople(nikeNamelist)方法传参一个默认接收用户昵称数组   submitPeople(peopleList,nikeNamelist)方法传参两个则是接收用户昵称数组和用户账号数组
-      submitPeople(peopleList){
+    //选择人的确定按钮事件 submitPeople(nikeNamelist)方法传参一个默认接收用户昵称数组   submitPeople(peopleList,nikeNamelist)方法传参两个则是接收用户昵称数组和用户账号数组
+    submitPeople(peopleList) {
       console.log(peopleList);
-        this.peopleOpen=false;
-      },
-        setStatus(status){
-            this.status = status
-        },
-    }
+      this.peopleList = peopleList;
+      this.peopleOpen = false;
+    },
+    //获取状态
+    setStatus(status) {
+      this.status = status
+    },
   }
-  </script>
-  <style>
-  .fixed-header {
-    position: fixed;
-    top: 0;
-    right: 0;
-    z-index: 9;
+}
+</script>
+<style lang="scss" scoped>
+.fixed-header {
+  position: fixed;
+  top: 0;
+  right: 0;
+  z-index: 9;
+  width: 100%;
+  transition: width 0.28s;
+}
+
+.dashboard-container {
+  background: #f5f6f8;
+  bottom: 0;
+  left: 0;
+  overflow: auto;
+  position: absolute;
+  right: 0;
+  top: 60px;
+  padding: 32px;
+
+  .apply-box {
+    width: 80%;
+    margin: 0 auto;
+  }
+
+  .data-list-box {
     width: 100%;
-    transition: width 0.28s;
+    margin: 0 auto;
   }
-  
-  .dashboard-container {
-    background: #f5f6f8;
-    bottom: 0;
-    left: 0;
-    overflow: auto;
-    position: absolute;
-    right: 0;
-    top: 60px;
-    padding: 32px;
-    .apply-box{
-        width: 80%;
-        margin: 0 auto;
-    }
-    .data-list-box{
-        width: 100%;
-        margin: 0 auto;
-    }
+}
+.from-box{
+  padding: 20px 50px;
+  .title{
+    font-weight: bold;
+    font-size: 26px;
+    margin-bottom: 20px;
   }
-  
-  
-  
-  </style>
-  
+}
+
+.dataList-box{
+  padding: 10px 40px;
+}
+
+
+
+
+
+.el-tag+.el-tag {
+  margin-left: 10px;
+}
+
+.button-new-tag {
+  margin-right: 10px;
+  height: 32px;
+  line-height: 32px;
+  padding-top: 0;
+  padding-bottom: 0;
+}
+
+.input-new-tag {
+  width: 90px;
+  margin-left: 10px;
+  vertical-align: bottom;
+}
+</style>

+ 79 - 252
src/views/register.vue

@@ -21,83 +21,48 @@
               <el-step title="创建团队" icon="el-icon-edit"></el-step>
             </el-steps>
           </div> -->
-          
+
           <div style="width: 320px;">
             <el-form ref="loginForm" :model="loginForm" :rules="LoginRules" class="login-form">
-             
-              <!-- 注册账号 -->
-              <div v-if="loginForm.loginType == 1">
-                <el-form-item prop="mobile">
-                  <el-input v-model="loginForm.mobile" type="text" auto-complete="off" placeholder="请输入手机号">
-                    <svg-icon slot="prefix" icon-class="phone" class="el-input__icon input-icon"/>
-                  </el-input>
-                </el-form-item>
-                <el-form-item prop="mobileCode">
-                  <el-input v-model="loginForm.mobileCode" type="text" auto-complete="off" placeholder="短信验证码"
-                            class="sms-login-mobile-code-prefix"
-                            @keyup.enter.native="handleLogin">
-                    <template>
-                      <svg-icon slot="prefix" icon-class="password" class="el-input__icon input-icon"/>
-                    </template>
-                    <template slot="append">
-                      <span v-if="mobileCodeTimer <= 0" class="getMobileCode" @click="getSmsCode" style="cursor: pointer;">获取验证码</span>
-                      <span v-if="mobileCodeTimer > 0" class="getMobileCode">{{ mobileCodeTimer }}秒后可重新获取</span>
-                    </template>
-                  </el-input>
-                </el-form-item>
-                <div class="service-laws">
-                  点击注册表明你已阅读并同意
-                  <a class="terms" href="https://www.jiandaoyun.com/index/term" target="_blank">《服务条款》</a>
-                  和
-                  <a class="terms" href="https://www.jiandaoyun.com/index/term/privacy" target="_blank">《隐私声明》</a>
-                </div>
-                <!-- 下方的下一步按钮 -->
-                <el-form-item style="width:100%;">
-                  <el-button :loading="loading" size="medium" type="primary" style="width:100%;"
-                      @click.native.prevent="getNext()">
-                    <span v-if="!loading">注 册</span>
-                    <span v-else>操 作 中...</span>
-                  </el-button>
-                </el-form-item>
-                 <!--  去登录 -->
-                <div class="register-tip">
-                  已有账号?
-                  <span class="register-btn" @click="doLogin()">直接登录</span>
-                </div>
-              </div>
 
-              <!-- 创建团队 -->
-              <div v-if="loginForm.loginType == 2">
-                <el-form-item prop="mobile">
-                  <el-input v-model="loginForm.mobile" type="text" auto-complete="off" placeholder="请输入企业名称">
-                  </el-input>
-                </el-form-item>
-                <el-form-item prop="mobile">
-                  <el-select v-model="loginForm.mobile" placeholder="请选择需求" style="width: 100%;">
-                    <el-option label="企业使用" value="企业使用"></el-option>
-                    <el-option label="个人使用" value="个人使用"></el-option>
-                  </el-select>
-                </el-form-item>
-                <el-form-item prop="mobile">
-                  <el-select v-model="loginForm.mobile" placeholder="请选择所属行业" style="width: 100%;">
-                    <el-option label="互联网/软件" value="互联网/软件"></el-option>
-                  </el-select>
-                </el-form-item>
-                 <!-- 下方的进入产品按钮 -->
-                <el-form-item>
-                  <el-button :loading="loading" size="medium" type="primary" style="width:100%;"
-                      @click.native.prevent="getCode">
-                    <span v-if="!loading">进 入 产 品</span>
-                    <span v-else>操 作 中...</span>
-                  </el-button>
-                </el-form-item>
-                 <!--  去登录 -->
-                 <div class="register-tip">
-                  你可以
-                  <span class="register-btn" @click="doLogin()">加入企业/团队</span>
-                </div>
+              <el-form-item prop="mobile">
+                <el-input v-model="loginForm.mobile" type="text" auto-complete="off" placeholder="请输入手机号">
+                  <svg-icon slot="prefix" icon-class="phone" class="el-input__icon input-icon" />
+                </el-input>
+              </el-form-item>
+              <el-form-item prop="mobileCode">
+                <el-input v-model="loginForm.mobileCode" type="text" auto-complete="off" placeholder="短信验证码"
+                  class="sms-login-mobile-code-prefix" @keyup.enter.native="handleLogin">
+                  <template>
+                    <svg-icon slot="prefix" icon-class="password" class="el-input__icon input-icon" />
+                  </template>
+                  <template slot="append">
+                    <span v-if="mobileCodeTimer <= 0" class="getMobileCode" @click="getSmsCode"
+                      style="cursor: pointer;">获取验证码</span>
+                    <span v-if="mobileCodeTimer > 0" class="getMobileCode">{{ mobileCodeTimer }}秒后可重新获取</span>
+                  </template>
+                </el-input>
+              </el-form-item>
+              <div class="service-laws">
+                点击注册表明你已阅读并同意
+                <a class="terms" href="https://www.jiandaoyun.com/index/term" target="_blank">《服务条款》</a>
+                和
+                <a class="terms" href="https://www.jiandaoyun.com/index/term/privacy" target="_blank">《隐私声明》</a>
+              </div>
+              <!-- 下方的下一步按钮 -->
+              <el-form-item style="width:100%;">
+                <el-button :loading="loading" size="medium" type="primary" style="width:100%;"
+                  @click.native.prevent="getNext()">
+                  <span v-if="!loading">注 册</span>
+                  <span v-else>操 作 中...</span>
+                </el-button>
+              </el-form-item>
+              <!--  去登录 -->
+              <div class="register-tip">
+                已有账号?
+                <span class="register-btn" @click="doLogin()">直接登录</span>
               </div>
-             
+
             </el-form>
           </div>
         </div>
@@ -107,57 +72,23 @@
 </template>
 
 <script>
-import {sendSmsCode, socialAuthRedirect} from "@/api/login";
-import {getTenantIdByName} from "@/api/system/tenant";
-import {SystemUserSocialTypeEnum} from "@/utils/constants";
-import {getCaptchaEnable, getTenantEnable} from "@/utils/ruoyi";
-import {
-  getPassword,
-  getRememberMe, getTenantName,
-  getUsername,
-  removePassword, removeRememberMe, removeTenantName,
-  removeUsername,
-  setPassword, setRememberMe, setTenantId, setTenantName,
-  setUsername
-} from "@/utils/auth";
-
-import Verify from '@/components/Verifition/Verify';
-import {resetUserPwd} from "@/api/system/user";
+import { sendSmsCode } from "@/api/register";
 
 export default {
-  name: "Login",
-  components: {
-    Verify
-  },
   data() {
     return {
-      codeUrl: "",
-      captchaEnable: true,
-      tenantEnable: true,
       mobileCodeTimer: 0,
       loginForm: {
-        loginType: 1,
-        // username: "admin",
-        // password: "admin123",
-        username: "",
-        password: "",
-        captchaVerification: "",
         mobile: "",
         mobileCode: "",
-        rememberMe: false,
-        tenantName: "芋道源码",
       },
-      scene: 21,
-
+      scene: 5,
       LoginRules: {
-        username: [
-          {required: true, trigger: "blur", message: "用户名不能为空"}
-        ],
-        password: [
-          {required: true, trigger: "blur", message: "密码不能为空"}
-        ],
+        // mobileCode: [
+        //   { required: true, trigger: "blur", message: "密码不能为空" }
+        // ],
         mobile: [
-          {required: true, trigger: "blur", message: "手机号不能为空"},
+          { required: true, trigger: "blur", message: "手机号不能为空" },
           {
             validator: function (rule, value, callback) {
               if (/^(?:(?:\+|00)86)?1(?:3[\d]|4[5-79]|5[0-35-9]|6[5-7]|7[0-8]|8[\d]|9[189])\d{8}$/.test(value) === false) {
@@ -167,104 +98,27 @@ export default {
               }
             }, trigger: "blur"
           }
-        ],
-        tenantName: [
-          {required: true, trigger: "blur", message: "租户不能为空"},
-          {
-            validator: (rule, value, callback) => {
-              // debugger
-              getTenantIdByName(value).then(res => {
-                const tenantId = res.data;
-                if (tenantId && tenantId >= 0) {
-                  // 设置租户
-                  setTenantId(tenantId)
-                  callback();
-                } else {
-                  callback('租户不存在');
-                }
-              });
-            },
-            trigger: 'blur'
-          }
         ]
       },
       loading: false,
-      redirect: undefined,
-      // 枚举
-      SysUserSocialTypeEnum: SystemUserSocialTypeEnum,
     };
   },
   created() {
-    // 租户开关
-    this.tenantEnable = getTenantEnable();
-    if (this.tenantEnable) {
-      getTenantIdByName(this.loginForm.tenantName).then(res => { // 设置租户
-        const tenantId = res.data;
-        if (tenantId && tenantId >= 0) {
-          setTenantId(tenantId)
-        }
-      });
-    }
-    // 验证码开关
-    this.captchaEnable = getCaptchaEnable();
-    // 重定向地址
-    this.redirect = this.$route.query.redirect ? decodeURIComponent(this.$route.query.redirect) : undefined;
-    // this.getCookie();
+
   },
   methods: {
-    // 下一步
-    getNext(){
-      this.loginForm.loginType=2;
-    },
     //跳转登录
     doLogin() {
-      this.$router.push({path: '/login'})
+      this.$router.push({ path: '/login' })
     },
-    getCode() {
-      // 情况一,未开启:则直接登录
-      if (!this.captchaEnable) {
-        this.handleLogin({})
-        return;
-      }
-
-      // 情况二,已开启:则展示验证码;只有完成验证码的情况,才进行登录
-      // 弹出验证码
-      this.$refs.verify.show()
-    },
-    getCookie() {
-      const username = getUsername();
-      const password = getPassword();
-      const rememberMe = getRememberMe();
-      const tenantName = getTenantName();
-      this.loginForm = {
-        ...this.loginForm,
-        username: username ? username : this.loginForm.username,
-        password: password ? password : this.loginForm.password,
-        rememberMe: rememberMe ? getRememberMe() : false,
-        tenantName: tenantName ? tenantName : this.loginForm.tenantName,
-      };
-    },
-    handleLogin(captchaParams) {
+    handleLogin() {
       this.$refs.loginForm.validate(valid => {
         if (valid) {
           this.loading = true;
-          // 设置 Cookie
-          if (this.loginForm.rememberMe) {
-            setUsername(this.loginForm.username)
-            setPassword(this.loginForm.password)
-            setRememberMe(this.loginForm.rememberMe)
-            setTenantName(this.loginForm.tenantName)
-          } else {
-            removeUsername()
-            removePassword()
-            removeRememberMe()
-            removeTenantName()
-          }
-          this.loginForm.captchaVerification = captchaParams.captchaVerification
           // 发起登陆
           // console.log("发起登录", this.loginForm);
-          this.$store.dispatch(this.loginForm.loginType === "sms" ? "SmsLogin" : "Login", this.loginForm).then(() => {
-            this.$router.push({path: "/"}).catch(() => {
+          this.$store.dispatch("SmsLogin", this.loginForm).then(() => {
+            this.$router.push({ path: "/" }).catch(() => {
             });
           }).catch(() => {
             this.loading = false;
@@ -272,50 +126,12 @@ export default {
         }
       });
     },
-    async doSocialLogin(socialTypeEnum) {
-      // 设置登录中
-      this.loading = true;
-      let tenant = false;
-      if (this.tenantEnable) {
-        await this.$prompt('请输入租户名称', "提示", {
-          confirmButtonText: "确定",
-          cancelButtonText: "取消"
-        }).then(async ({value}) => {
-          await getTenantIdByName(value).then(res => {
-            const tenantId = res.data;
-            tenant = true
-            if (tenantId && tenantId >= 0) {
-              setTenantId(tenantId)
-            }
-          });
-        }).catch(() => {
-          // 取消登录按钮 loading状态
-          this.loading = false;
-
-          return false
-        });
-      } else {
-        tenant = true
-      }
-     if(tenant){
-       // 计算 redirectUri
-       const redirectUri = location.origin + '/social-login?'
-         + encodeURIComponent('type=' + socialTypeEnum.type + '&redirect=' + (this.redirect || "/")); // 重定向不能丢
-       // const redirectUri = 'http://127.0.0.1:48080/api/gitee/callback';
-       // const redirectUri = 'http://127.0.0.1:48080/api/dingtalk/callback';
-       // 进行跳转
-       socialAuthRedirect(socialTypeEnum.type, encodeURIComponent(redirectUri)).then((res) => {
-         // console.log(res.url);
-         window.location.href = res.data;
-       });
-     }
-    },
     /** ========== 以下为升级短信登录 ========== */
     getSmsCode() {
       if (this.mobileCodeTimer > 0) return;
       this.$refs.loginForm.validate(valid => {
         if (!valid) return;
-        sendSmsCode(this.loginForm.mobile, this.scene, this.loginForm.uuid, this.loginForm.code).then(res => {
+        sendSmsCode(this.loginForm.mobile, this.scene).then(res => {
           this.$modal.msgSuccess("获取验证码成功")
           this.mobileCodeTimer = 60;
           let msgTimer = setInterval(() => {
@@ -332,53 +148,64 @@ export default {
 </script>
 <style lang="scss" scoped>
 @import "~@/assets/styles/login.scss";
-.login-title{
+
+.login-title {
   color: #141e31;
-    font-size: 32px;
-    font-weight: 500;
-    line-height: 48px;
-    margin-bottom: 20px;
+  font-size: 32px;
+  font-weight: 500;
+  line-height: 48px;
+  margin-bottom: 20px;
 }
+
 .service-laws {
-    color: #525967;
-    font-size: 14px;
-    margin-bottom: 10px;
+  color: #525967;
+  font-size: 14px;
+  margin-bottom: 10px;
 }
+
 .service-laws .terms {
-    color:  #1890ff;
+  color: #1890ff;
 }
+
 a {
-    outline: none;
-    text-decoration: none;
+  outline: none;
+  text-decoration: none;
 }
-.register-tip{
+
+.register-tip {
   color: #141e31;
-    font-size: 14px;
-    line-height: 20px;
-    margin: 10px 0 10px;
+  font-size: 14px;
+  line-height: 20px;
+  margin: 10px 0 10px;
 }
-.register-btn{
-  color:  #1890ff;
+
+.register-btn {
+  color: #1890ff;
   cursor: pointer;
 }
+
 .oauth-login {
   display: flex;
   align-items: center;
-  cursor:pointer;
+  cursor: pointer;
 }
+
 .oauth-login-item {
   display: flex;
   align-items: center;
   margin-right: 10px;
 }
+
 .oauth-login-item img {
   height: 25px;
   width: 25px;
 }
+
 .oauth-login-item span:hover {
   text-decoration: underline red;
   color: red;
 }
+
 .sms-login-mobile-code-prefix {
   :deep(.el-input__prefix) {
     top: 22%;