瀏覽代碼

Merge remote-tracking branch 'upstream/master'

zyj 2 年之前
父節點
當前提交
59843a3a94

File diff suppressed because it is too large
+ 0 - 0
README.md


+ 3 - 0
ruoyi-system/src/main/resources/mapper/system/SysOperLogMapper.xml

@@ -37,6 +37,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 	<select id="selectOperLogList" parameterType="SysOperLog" resultMap="SysOperLogResult">
 		<include refid="selectOperLogVo"/>
 		<where>
+			<if test="operIp != null and operIp != ''">
+				AND oper_ip like concat('%', #{operIp}, '%')
+			</if>
 			<if test="title != null and title != ''">
 				AND title like concat('%', #{title}, '%')
 			</if>

+ 1 - 1
ruoyi-ui/src/components/DictTag/index.vue

@@ -3,7 +3,7 @@
     <template v-for="(item, index) in options">
       <template v-if="values.includes(item.value)">
         <span
-          v-if="item.raw.listClass == 'default' || item.raw.listClass == ''"
+          v-if="(item.raw.listClass == 'default' || item.raw.listClass == '') && (item.raw.cssClass == '' || item.raw.cssClass == null)"
           :key="item.value"
           :index="index"
           :class="item.raw.cssClass"

+ 10 - 8
ruoyi-ui/src/components/Editor/index.vue

@@ -47,7 +47,7 @@ export default {
       type: Boolean,
       default: false,
     },
-    // 上传文件大小限制(MB)
+    /* 上传文件大小限制(MB) */
     fileSize: {
       type: Number,
       default: 5,
@@ -129,7 +129,6 @@ export default {
       if (this.type == 'url') {
         let toolbar = this.Quill.getModule("toolbar");
         toolbar.addHandler("image", (value) => {
-          this.uploadType = "image";
           if (value) {
             this.$refs.upload.$children[0].$refs.input.click();
           } else {
@@ -158,6 +157,13 @@ export default {
     },
     // 上传前校检格式和大小
     handleBeforeUpload(file) {
+      const type = ["image/jpeg", "image/jpg", "image/png", "image/svg"];
+      const isJPG = type.includes(file.type);
+      // 检验文件格式
+      if (!isJPG) {
+        this.$message.error(`图片格式错误!`);
+        return false;
+      }
       // 校检文件大小
       if (this.fileSize) {
         const isLt = file.size / 1024 / 1024 < this.fileSize;
@@ -169,10 +175,10 @@ export default {
       return true;
     },
     handleUploadSuccess(res, file) {
-      // 获取富文本组件实例
-      let quill = this.Quill;
       // 如果上传成功
       if (res.code == 200) {
+        // 获取富文本组件实例
+        let quill = this.Quill;
         // 获取光标所在位置
         let length = quill.getSelection().index;
         // 插入图片  res.url为服务器返回的图片地址
@@ -206,11 +212,9 @@ export default {
   content: "保存";
   padding-right: 0px;
 }
-
 .ql-snow .ql-tooltip[data-mode="video"]::before {
   content: "请输入视频地址:";
 }
-
 .ql-snow .ql-picker.ql-size .ql-picker-label::before,
 .ql-snow .ql-picker.ql-size .ql-picker-item::before {
   content: "14px";
@@ -227,7 +231,6 @@ export default {
 .ql-snow .ql-picker.ql-size .ql-picker-item[data-value="huge"]::before {
   content: "32px";
 }
-
 .ql-snow .ql-picker.ql-header .ql-picker-label::before,
 .ql-snow .ql-picker.ql-header .ql-picker-item::before {
   content: "文本";
@@ -256,7 +259,6 @@ export default {
 .ql-snow .ql-picker.ql-header .ql-picker-item[data-value="6"]::before {
   content: "标题6";
 }
-
 .ql-snow .ql-picker.ql-font .ql-picker-label::before,
 .ql-snow .ql-picker.ql-font .ql-picker-item::before {
   content: "标准字体";

+ 10 - 1
ruoyi-ui/src/components/HeaderSearch/index.vue

@@ -71,12 +71,17 @@ export default {
     },
     change(val) {
       const path = val.path;
+      const query = val.query;
       if(this.ishttp(val.path)) {
         // http(s):// 路径新窗口打开
         const pindex = path.indexOf("http");
         window.open(path.substr(pindex, path.length), "_blank");
       } else {
-        this.$router.push(val.path)
+        if (query) {
+          this.$router.push({ path: path, query: JSON.parse(query) });
+        } else {
+          this.$router.push(path)
+        }
       }
       this.search = ''
       this.options = []
@@ -124,6 +129,10 @@ export default {
           }
         }
 
+        if (router.query) {
+          data.query = router.query
+        }
+
         // recursive child routes
         if (router.children) {
           const tempRoutes = this.generateRoutes(router.children, data.path, data.title)

+ 5 - 0
ruoyi-ui/src/store/modules/user.js

@@ -4,6 +4,7 @@ import { getToken, setToken, removeToken } from '@/utils/auth'
 const user = {
   state: {
     token: getToken(),
+    id: '',
     name: '',
     avatar: '',
     roles: [],
@@ -14,6 +15,9 @@ const user = {
     SET_TOKEN: (state, token) => {
       state.token = token
     },
+    SET_ID: (state, id) => {
+      state.id = id
+    },
     SET_NAME: (state, name) => {
       state.name = name
     },
@@ -58,6 +62,7 @@ const user = {
           } else {
             commit('SET_ROLES', ['ROLE_DEFAULT'])
           }
+          commit('SET_ID', user.userId)
           commit('SET_NAME', user.userName)
           commit('SET_AVATAR', avatar)
           resolve(res)

+ 1 - 1
ruoyi-ui/src/views/index.vue

@@ -122,7 +122,7 @@
               <s> 满180251782 </s> <s> 满104180207 </s> <s> 满186866453 </s> <s> 满201396349 </s>
               <s> 满101456076 </s> <s> 满101539465 </s> <s> 满264312783 </s> <s> 满167385320 </s> 
               <s> 满104748341 </s> <s> 满160110482 </s> <s> 满170801498 </s> <s> 满108482800 </s> 
-              <s> 满101046199 </s> <s> 满136919097 </s> <a href="http://qm.qq.com/cgi-bin/qm/qr?_wv=1027&k=0vBbSb0ztbBgVtn3kJS-Q4HUNYwip89G&authKey=8irq5PhutrZmWIvsUsklBxhj57l%2F1nOZqjzigkXZVoZE451GG4JHPOqW7AW6cf0T&noverify=0&group_code=143961921" target="_blank">143961921</a>
+              <s> 满101046199 </s> <s> 满136919097 </s> <s> 满143961921 </s> <a href="http://qm.qq.com/cgi-bin/qm/qr?_wv=1027&k=1HmEGh7zKA_CKI2E-pGInPTlC5jS9mc_&authKey=XaiUf1wfbSTEecm4lDMtIMsc6g%2BoETxjBm1BbZPr6IfuMGRj7oG4GEeu7jtzNaw%2F&noverify=0&group_code=174951577" target="_blank">174951577</a>
             </p>
             <p>
               <i class="el-icon-chat-dot-round"></i> 微信:<a

+ 10 - 0
ruoyi-ui/src/views/monitor/operlog/index.vue

@@ -1,6 +1,15 @@
 <template>
   <div class="app-container">
     <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
+      <el-form-item label="操作地址" prop="operIp">
+        <el-input
+          v-model="queryParams.operIp"
+          placeholder="请输入操作地址"
+          clearable
+          style="width: 240px;"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
       <el-form-item label="系统模块" prop="title">
         <el-input
           v-model="queryParams.title"
@@ -229,6 +238,7 @@ export default {
       queryParams: {
         pageNum: 1,
         pageSize: 10,
+        operIp: undefined,
         title: undefined,
         operName: undefined,
         businessType: undefined,

+ 2 - 2
ruoyi-ui/src/views/system/dict/data.vue

@@ -95,8 +95,8 @@
       <el-table-column label="字典编码" align="center" prop="dictCode" />
       <el-table-column label="字典标签" align="center" prop="dictLabel">
         <template slot-scope="scope">
-          <span v-if="scope.row.listClass == '' || scope.row.listClass == 'default'">{{scope.row.dictLabel}}</span>
-          <el-tag v-else :type="scope.row.listClass == 'primary' ? '' : scope.row.listClass">{{scope.row.dictLabel}}</el-tag>
+          <span v-if="(scope.row.listClass == '' || scope.row.listClass == 'default') && (scope.row.cssClass == '' || scope.row.cssClass == null)">{{ scope.row.dictLabel }}</span>
+          <el-tag v-else :type="scope.row.listClass == 'primary' ? '' : scope.row.listClass" :class="scope.row.cssClass">{{ scope.row.dictLabel }}</el-tag>
         </template>
       </el-table-column>
       <el-table-column label="字典键值" align="center" prop="dictValue" />

+ 1 - 1
ruoyi-ui/src/views/system/menu/index.vue

@@ -246,7 +246,7 @@
               </el-radio-group>
             </el-form-item>
           </el-col>
-          <el-col :span="12" v-if="form.menuType != 'F'">
+          <el-col :span="12">
             <el-form-item prop="status">
               <span slot="label">
                 <el-tooltip content="选择停用则路由将不会出现在侧边栏,也不能被访问" placement="top">

Some files were not shown because too many files changed in this diff