Merge branch 'master' of https://gitee.com/y_project/RuoYi-Vue
Conflicts:
ruoyi-ui/package.json
ruoyi-ui/src/api/login.js
ruoyi-ui/src/assets/styles/ruoyi.scss
ruoyi-ui/src/layout/components/Navbar.vue
ruoyi-ui/src/utils/ruoyi.js
ruoyi-ui/src/views/tool/build/index.vue
ruoyi-ui/src/views/tool/gen/editTable.vue
ruoyi-ui/src/views/tool/gen/index.vue
ruoyi/src/main/java/com/ruoyi/project/monitor/domain/SysLogininfor.java
ruoyi/src/main/java/com/ruoyi/project/monitor/domain/SysOperLog.java
ruoyi/src/main/java/com/ruoyi/project/system/controller/SysLoginController.java
ruoyi/src/main/java/com/ruoyi/project/tool/gen/controller/GenController.java
ruoyi/src/main/resources/mybatis/tool/GenTableMapper.xml
| | |
| | | "nprogress": "0.2.0", |
| | | "path-to-regexp": "2.4.0", |
| | | "screenfull": "4.2.0", |
| | | "sortablejs": "1.8.4", |
| | | "vue": "2.6.10", |
| | | "vue-count-to": "1.0.13", |
| | | "vue-quill-editor": "3.0.6", |
| | |
| | | return request({ |
| | | url: '/login', |
| | | method: 'post', |
| | | params: data |
| | | data: data |
| | | }) |
| | | } |
| | | |
| | |
| | | box-shadow: 0 0 4px #ccc; |
| | | overflow: hidden; |
| | | } |
| | | |
| | | |
| | | /* ææ½åæ ·å¼ */ |
| | | .sortable-ghost{ |
| | | opacity: .8; |
| | | color: #fff!important; |
| | | background: #42b983!important; |
| | | } |
| | |
| | | <router-link to="/user/profile"> |
| | | <el-dropdown-item>个人ä¸å¿</el-dropdown-item> |
| | | </router-link> |
| | | <el-dropdown-item> |
| | | <span @click="setting = true">å¸å±è®¾ç½®</span> |
| | | <el-dropdown-item @click.native="setting = true"> |
| | | <span>å¸å±è®¾ç½®</span> |
| | | </el-dropdown-item> |
| | | <el-dropdown-item divided @click.native="logout"> |
| | | <span>éåºç»å½</span> |
| | |
| | | } else { |
| | | if ((typeof time === 'string') && (/^[0-9]+$/.test(time))) { |
| | | time = parseInt(time) |
| | | } else if (typeof time === 'string') { |
| | | time = time.replace(new RegExp(/-/gm), '/'); |
| | | } |
| | | if ((typeof time === 'number') && (time.toString().length === 10)) { |
| | | time = time * 1000 |
| | |
| | | } |
| | | return str; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * æé æ åç»ææ°æ® |
| | |
| | | </div> |
| | | </template> |
| | | |
| | | |
| | | <script> |
| | | import draggable from 'vuedraggable' |
| | | import { saveAs } from 'file-saver' |
| | |
| | | padding: 12px 18px 15px 15px; |
| | | } |
| | | } |
| | | .el-scrollbar__wrap { |
| | | .left-scrollbar .el-scrollbar__wrap { |
| | | box-sizing: border-box; |
| | | overflow-x: hidden !important; |
| | | margin-bottom: 0 !important; |
| | |
| | | } |
| | | } |
| | | |
| | | .el-scrollbar__view{ |
| | | .left-scrollbar .el-scrollbar__view{ |
| | | overflow-x: hidden; |
| | | } |
| | | |
| | |
| | | <basic-info-form ref="basicInfo" :info="info" /> |
| | | </el-tab-pane> |
| | | <el-tab-pane label="åæ®µä¿¡æ¯" name="cloum"> |
| | | <el-table :data="cloumns" :max-height="tableHeight"> |
| | | <el-table-column label="åºå·" type="index" min-width="5%" /> |
| | | <el-table ref="dragTable" :data="cloumns" row-key="columnId" :max-height="tableHeight"> |
| | | <el-table-column label="åºå·" type="index" min-width="5%" class-name="allowDrag" /> |
| | | <el-table-column |
| | | label="åæ®µåå" |
| | | prop="columnName" |
| | |
| | | import { optionselect as getDictOptionselect } from "@/api/system/dict/type"; |
| | | import basicInfoForm from "./basicInfoForm"; |
| | | import genInfoForm from "./genInfoForm"; |
| | | import Sortable from 'sortablejs' |
| | | export default { |
| | | name: "GenEdit", |
| | | components: { |
| | |
| | | this.$store.dispatch("tagsView/delView", this.$route); |
| | | this.$router.push({ path: "/tool/gen", query: { t: Date.now()}}) |
| | | } |
| | | }, |
| | | mounted() { |
| | | const el = this.$refs.dragTable.$el.querySelectorAll(".el-table__body-wrapper > table > tbody")[0]; |
| | | const sortable = Sortable.create(el, { |
| | | handle: ".allowDrag", |
| | | onEnd: evt => { |
| | | const targetRow = this.cloumns.splice(evt.oldIndex, 1)[0]; |
| | | this.cloumns.splice(evt.newIndex, 0, targetRow); |
| | | for (let index in this.cloumns) { |
| | | this.cloumns[index].sort = parseInt(index) + 1; |
| | | } |
| | | } |
| | | }); |
| | | } |
| | | }; |
| | | </script> |
| | |
| | | |
| | | <el-table v-loading="loading" :data="tableList" @selection-change="handleSelectionChange"> |
| | | <el-table-column type="selection" width="55"></el-table-column> |
| | | <el-table-column label="åºå·" align="center" prop="tableId" width="50px" /> |
| | | <el-table-column label="åºå·" align="center" prop="tableId" width="60px" /> |
| | | <el-table-column |
| | | label="表åç§°" |
| | | align="center" |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.framework.security;
|
| | |
|
| | | /**
|
| | | * ç¨æ·ç»å½å¯¹è±¡
|
| | | * |
| | | * @author ruoyi
|
| | | */
|
| | | public class LoginBody
|
| | | {
|
| | | /**
|
| | | * ç¨æ·å
|
| | | */
|
| | | private String username;
|
| | |
|
| | | /**
|
| | | * ç¨æ·å¯ç
|
| | | */
|
| | | private String password;
|
| | |
|
| | | /**
|
| | | * éªè¯ç
|
| | | */
|
| | | private String code;
|
| | |
|
| | | /**
|
| | | * å¯ä¸æ è¯
|
| | | */
|
| | | private String uuid = "";
|
| | |
|
| | | public String getUsername()
|
| | | {
|
| | | return username;
|
| | | }
|
| | |
|
| | | public void setUsername(String username)
|
| | | {
|
| | | this.username = username;
|
| | | }
|
| | |
|
| | | public String getPassword()
|
| | | {
|
| | | return password;
|
| | | }
|
| | |
|
| | | public void setPassword(String password)
|
| | | {
|
| | | this.password = password;
|
| | | }
|
| | |
|
| | | public String getCode()
|
| | | {
|
| | | return code;
|
| | | }
|
| | |
|
| | | public void setCode(String code)
|
| | | {
|
| | | this.code = code;
|
| | | }
|
| | |
|
| | | public String getUuid()
|
| | | {
|
| | | return uuid;
|
| | | }
|
| | |
|
| | | public void setUuid(String uuid)
|
| | | {
|
| | | this.uuid = uuid;
|
| | | }
|
| | | }
|
| | |
| | | package com.ruoyi.project.monitor.domain; |
| | | |
| | | import java.util.Date; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.ruoyi.framework.aspectj.lang.annotation.Excel; |
| | | import com.ruoyi.framework.aspectj.lang.annotation.Excel.ColumnType; |
| | | import com.ruoyi.framework.web.domain.BaseEntity; |
| | |
| | | private String msg; |
| | | |
| | | /** è®¿é®æ¶é´ */ |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @Excel(name = "è®¿é®æ¶é´", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss") |
| | | private Date loginTime; |
| | | |
| | |
| | | package com.ruoyi.project.monitor.domain; |
| | | |
| | | import java.util.Date; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.ruoyi.framework.aspectj.lang.annotation.Excel; |
| | | import com.ruoyi.framework.aspectj.lang.annotation.Excel.ColumnType; |
| | | import com.ruoyi.framework.web.domain.BaseEntity; |
| | |
| | | private String errorMsg; |
| | | |
| | | /** æä½æ¶é´ */ |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @Excel(name = "æä½æ¶é´", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss") |
| | | private Date operTime; |
| | | |
| | |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import com.ruoyi.common.constant.Constants; |
| | | import com.ruoyi.common.utils.ServletUtils; |
| | | import com.ruoyi.framework.security.LoginBody; |
| | | import com.ruoyi.framework.security.LoginUser; |
| | | import com.ruoyi.framework.security.service.SysLoginService; |
| | | import com.ruoyi.framework.security.service.SysPermissionService; |
| | |
| | | * @return ç»æ |
| | | */ |
| | | @PostMapping("/login") |
| | | public AjaxResult login(String username, String password, String code, String uuid) |
| | | public AjaxResult login(@RequestBody LoginBody loginBody) |
| | | { |
| | | AjaxResult ajax = AjaxResult.success(); |
| | | // çæä»¤ç |
| | | String token = loginService.login(username, password, code, uuid); |
| | | String token = loginService.login(loginBody.getUsername(), loginBody.getPassword(), loginBody.getCode(), |
| | | loginBody.getUuid()); |
| | | ajax.put(Constants.TOKEN, token); |
| | | return ajax; |
| | | } |
| | |
| | | @PutMapping |
| | | public AjaxResult editSave(@Validated @RequestBody GenTable genTable) |
| | | { |
| | | System.out.println(genTable.getParams().size()); |
| | | genTableService.validateEdit(genTable); |
| | | genTableService.updateGenTable(genTable); |
| | | return AjaxResult.success(); |
| | |
| | | c.column_id, c.column_name, c.column_comment, c.column_type, c.java_type, c.java_field, c.is_pk, c.is_increment, c.is_required, c.is_insert, c.is_edit, c.is_list, c.is_query, c.query_type, c.html_type, c.dict_type, c.sort |
| | | FROM gen_table t |
| | | LEFT JOIN gen_table_column c ON t.table_id = c.table_id |
| | | where t.table_id = #{tableId} |
| | | where t.table_id = #{tableId} order by c.sort |
| | | </select> |
| | | |
| | | <select id="selectGenTableByName" parameterType="String" resultMap="GenTableResult"> |
| | |
| | | c.column_id, c.column_name, c.column_comment, c.column_type, c.java_type, c.java_field, c.is_pk, c.is_increment, c.is_required, c.is_insert, c.is_edit, c.is_list, c.is_query, c.query_type, c.html_type, c.dict_type, c.sort |
| | | FROM gen_table t |
| | | LEFT JOIN gen_table_column c ON t.table_id = c.table_id |
| | | where t.table_name = #{tableName} |
| | | where t.table_name = #{tableName} order by c.sort |
| | | </select> |
| | | |
| | | <insert id="insertGenTable" parameterType="GenTable" useGeneratedKeys="true" keyProperty="tableId"> |