Forráskód Böngészése

Merge branch 'dev' of http://10.87.10.227:4000/jzyd_yyds/soc_web into dev

luowei 2 éve
szülő
commit
30a9fde29e

+ 5 - 3
package.json

@@ -10,7 +10,8 @@
     "build:prod": "vue-cli-service build",
     "build:stage": "vue-cli-service build --mode staging",
     "preview": "node build/index.js --preview",
-    "lint": "eslint --ext .js,.vue src"
+    "lint": "eslint --ext .js,.vue src",
+    "webpack": "webpack --version"
   },
   "husky": {
     "hooks": {
@@ -46,7 +47,7 @@
     "element-ui": "2.15.12",
     "file-saver": "2.0.5",
     "fuse.js": "6.4.3",
-    "highlight.js": "10.7.3",
+    "highlight.js": "9.18.5",
     "js-beautify": "1.13.0",
     "js-cookie": "3.0.1",
     "jsencrypt": "3.0.0-rc.1",
@@ -81,7 +82,8 @@
     "script-ext-html-webpack-plugin": "2.1.5",
     "svg-sprite-loader": "5.1.1",
     "vue-template-compiler": "2.6.12",
-    "webpack": "^5.88.2"
+    "webpack": "^5.88.2",
+    "webpack-cli": "^5.1.4"
   },
   "engines": {
     "node": ">= 10.0",

+ 8 - 1
src/api/system/public.js

@@ -5,4 +5,11 @@ export function deptTreeSelect() {
       url: '/system/dept/deptTree',
       method: 'get'
     })
-  }
+  }
+// 查询文件
+export function getFile(code) {
+  return request({
+    url: '/file/file/getFile/' +code,
+    method: 'get'
+  })
+}

+ 47 - 0
src/api/system/rule.js

@@ -0,0 +1,47 @@
+import request from '@/utils/request'
+
+// 查询检查手册定义列表
+export function listRule(query) {
+  return request({
+    url: '/system/rule/list',
+    method: 'get',
+    params: query
+  })
+}
+
+// 查询检查手册定义详细
+export function getRule(id) {
+  return request({
+    url: '/system/rule/' + id,
+    method: 'get'
+  })
+}
+
+// 新增检查手册定义
+
+export function addRule(data) {
+  return request({
+    url: '/system/rule',
+    method: 'post',
+    data: data
+  })
+}
+
+// 修改检查手册定义
+
+export function updateRule(data) {
+  return request({
+    url: '/system/rule',
+    method: 'put',
+    data: data
+  })
+}
+
+// 删除检查手册定义
+
+export function delRule(id) {
+  return request({
+    url: '/system/rule/' + id,
+    method: 'delete'
+  })
+}

+ 1 - 1
src/assets/styles/ruoyi.scss

@@ -169,7 +169,7 @@
 	border-bottom: 1px solid #e7eaec;
 	border-top: 1px solid #e7eaec;
 	margin-bottom: -1px;
-	padding: 11px 0px;
+	padding: 17px 0px;
 	font-size: 13px;
 }
 

+ 14 - 5
src/components/ImageUpload/index.vue

@@ -19,7 +19,7 @@
     >
       <i class="el-icon-plus"></i>
     </el-upload>
-    
+
     <!-- 上传提示 -->
     <div class="el-upload__tip" slot="tip" v-if="showTip">
       请上传
@@ -44,6 +44,7 @@
 
 <script>
 import { getToken } from "@/utils/auth";
+import {getFile} from "@/api/system/public";
 
 export default {
   props: {
@@ -76,7 +77,7 @@ export default {
       dialogImageUrl: "",
       dialogVisible: false,
       hideUpload: false,
-      uploadImgUrl: process.env.VUE_APP_BASE_API + "/file/upload", // 上传的图片服务器地址
+      uploadImgUrl: process.env.NODE_ENV === 'development'? '/dev-api'+ "/file/file/upload" : process.env.VUE_APP_BASE_API + "/file/file/upload", // 上传的图片服务器地址
       headers: {
         Authorization: "Bearer " + getToken(),
       },
@@ -136,7 +137,7 @@ export default {
       if (this.fileSize) {
         const isLt = file.size / 1024 / 1024 < this.fileSize;
         if (!isLt) {
-          this.$modal.msgError(`上传头像图片大小不能超过 ${this.fileSize} MB!`);
+          this.$modal.msgError(`上传图片大小不能超过 ${this.fileSize} MB!`);
           return false;
         }
       }
@@ -149,9 +150,17 @@ export default {
     },
     // 上传成功回调
     handleUploadSuccess(res, file) {
+      console.log(res,'res')
       if (res.code === 200) {
-        this.uploadList.push({ name: res.data.url, url: res.data.url });
-        this.uploadedSuccessfully();
+        getFile(res.data.code).then(res=>{
+
+          // let str = res.data.code;
+          // let blob = new Blob([str],{type:'image/jpeg'});
+          // let imgUrl = window.URL.createObjectURL(blob);
+          // debugger
+          this.uploadList.push({ name: res.data.name, url:imgUrl });
+          this.uploadedSuccessfully();
+        })
       } else {
         this.number--;
         this.$modal.closeLoading();

+ 20 - 7
src/layout/components/Navbar.vue

@@ -1,7 +1,6 @@
 <template>
   <div class="navbar">
     <hamburger id="hamburger-container" :is-active="sidebar.opened" class="hamburger-container" @toggleClick="toggleSideBar" />
-
     <breadcrumb id="breadcrumb-container" class="breadcrumb-container" v-if="!topNav"/>
     <top-nav id="topmenu-container" class="topmenu-container" v-if="topNav"/>
     <div class="title-box"> 移动安全保卫管理平台项目 </div>
@@ -19,9 +18,13 @@
       </template>
 
       <el-dropdown class="avatar-container right-menu-item hover-effect" trigger="hover">
-        <div class="avatar-wrapper">
-          <img :src="avatar" class="user-avatar">
-          <i class="el-icon-caret-bottom" />
+<!--        <div class="avatar-wrapper">-->
+<!--          <img :src="avatar" class="user-avatar">-->
+<!--          <i class="el-icon-caret-bottom" />-->
+<!--        </div>-->
+        <div class="user-name-box">
+           <span >{{name}}</span>
+           <i class="el-icon-caret-bottom" />
         </div>
         <el-dropdown-menu slot="dropdown">
           <router-link to="/user/profile">
@@ -66,11 +69,15 @@ export default {
       showSetting: process.env.NODE_ENV === "development"
     }
   },
+  mounted(){
+    console.log(this.$store.getters,'name')
+  },
   computed: {
     ...mapGetters([
       'sidebar',
       'avatar',
-      'device'
+      'device',
+      'name'
     ]),
     setting: {
       get() {
@@ -185,7 +192,14 @@ export default {
         }
       }
     }
-
+    .user-name-box{
+      font-size: 14px;
+      color: #fff;
+      align-items: center;
+      >span{
+        margin-right: 5px;
+      }
+    }
     .avatar-container {
       margin-right: 30px;
 
@@ -200,7 +214,6 @@ export default {
           background-color: #fff;
           padding:7px;
         }
-
         .el-icon-caret-bottom {
           cursor: pointer;
           position: absolute;

+ 1 - 1
src/store/modules/user.js

@@ -65,7 +65,7 @@ const user = {
           } else {
             commit('SET_ROLES', ['ROLE_DEFAULT'])
           }
-          commit('SET_NAME', user.userName)
+          commit('SET_NAME', user.name)
           commit('SET_AVATAR', avatar)
           resolve(res)
         }).catch(error => {

A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 484 - 416
src/views/system/dept/extend.vue


+ 12 - 3
src/views/system/user/profile/index.vue

@@ -7,9 +7,9 @@
             <span>个人信息</span>
           </div>
           <div>
-            <div class="text-center">
-              <userAvatar :user="user" />
-            </div>
+<!--            <div class="text-center">-->
+<!--              <userAvatar :user="user" />-->
+<!--            </div>-->
             <ul class="list-group list-group-striped">
               <li class="list-group-item">
                 <svg-icon icon-class="user" />用户名称
@@ -91,3 +91,12 @@ export default {
   }
 };
 </script>
+<style lang="scss">
+.list-group-item{
+  border-top: 0;
+  align-items: center;
+  >svg{
+    margin-right: 5px;
+  }
+}
+</style>

+ 22 - 15
src/views/system/workTimeSet/dialog.template.vue

@@ -37,12 +37,20 @@
                 </el-table-column>
                 <el-table-column label="营业状态" width="160px">
                   <template slot-scope="r">
-                    <el-radio-group
-                        v-model="r.row.isWorkday"
-                        @change="onEnableChange(r.row)">
-                      <el-radio text-color="#48bb78" :label="1">营业</el-radio>
-                      <el-radio text-color="#f56565" :label="0">歇业</el-radio>
-                    </el-radio-group>
+                    <el-switch
+                      v-model="r.row.isWorkday"
+                      :active-value="1"
+                      :inactive-value="0"
+                      @change="onEnableChange(r.row)"
+                      active-text="营业"
+                      inactive-text="歇业">
+                    </el-switch>
+<!--                    <el-radio-group-->
+<!--                        v-model="r.row.isWorkday"-->
+<!--                        @change="onEnableChange(r.row)">-->
+<!--                      <el-radio text-color="#48bb78" :label="1">营业</el-radio>-->
+<!--                      <el-radio text-color="#f56565" :label="0">歇业</el-radio>-->
+<!--                    </el-radio-group>-->
                   </template>
                 </el-table-column>
                 <el-table-column label="上班时间">
@@ -50,7 +58,7 @@
                     <el-time-select
                       style="width: 100%"
                       :picker-options="pickerOptions"
-                      :disabled="!r.row.isWorkday || r.row.isWorkday === false"
+                      :disabled="!r.row.isWorkday || !r.row.isWorkday"
                       v-model="r.row.workTime"/>
                   </template>
                 </el-table-column>
@@ -59,7 +67,7 @@
                     <el-time-select
                       style="width: 100%"
                       :picker-options="pickerOptions"
-                      :disabled="!r.row.isWorkday || r.row.isWorkday === false"
+                      :disabled="!r.row.isWorkday ||!r.row.isWorkday"
                       v-model="r.row.openTime"/>
                   </template>
                 </el-table-column>
@@ -68,7 +76,7 @@
                     <el-time-select
                       style="width: 100%"
                       :picker-options="pickerOptions"
-                      :disabled="!r.row.isWorkday || r.row.isWorkday === false"
+                      :disabled="!r.row.isWorkday || !r.row.isWorkday"
                       v-model="r.row.noonbreakStart"/>
                   </template>
                 </el-table-column>
@@ -77,7 +85,7 @@
                     <el-time-select
                       style="width: 100%"
                       :picker-options="pickerOptions"
-                      :disabled="!r.row.isWorkday || r.row.isWorkday === false"
+                      :disabled="!r.row.isWorkday || !r.row.isWorkday"
                       v-model="r.row.noonbreakEnd"/>
                   </template>
                 </el-table-column>
@@ -86,7 +94,7 @@
                     <el-time-select
                       style="width: 100%"
                       :picker-options="pickerOptions"
-                      :disabled="!r.row.isWorkday || r.row.isWorkday === false"
+                      :disabled="!r.row.isWorkday || !r.row.isWorkday"
                       v-model="r.row.closeTime"/>
                   </template>
                 </el-table-column>
@@ -95,7 +103,7 @@
                     <el-time-select
                       style="width: 100%"
                       :picker-options="pickerOptions"
-                      :disabled="!r.row.isWorkday || r.row.isWorkday === false"
+                      :disabled="!r.row.isWorkday || !r.row.isWorkday"
                       v-model="r.row.workOffTime"/>
                   </template>
                 </el-table-column>
@@ -250,7 +258,7 @@ export default {
         this.$message.error("生效日期不能为空");
         return;
       }
-      if (this.formData.dayOfWeeks.filter((w) => w.isWorkday ===true || w.isWorkday).length === 0) {
+      if (this.formData.dayOfWeeks.filter((w) => w.isWorkday == 1 || w.isWorkday).length === 0) {
         this.$message.error("工作日不能为空");
         return;
       }
@@ -320,7 +328,7 @@ export default {
       // this.data.orgIdList =[];
     },
     onEnableChange(workTime) {
-      if (workTime.isWorkday === false) {
+      if (!workTime.isWorkday) {
         workTime.openTime = null;
         workTime.closeTime = null;
         workTime.noonbreakStart = null;
@@ -357,7 +365,6 @@ export default {
   }
   .grid {
     width: 100%;
-    margin-bottom: 20px;
     .title {
     }
     .box {

+ 1 - 1
src/views/tool/gen/index.vue

@@ -267,7 +267,7 @@ export default {
           this.$modal.msgSuccess("成功生成到自定义路径:" + row.genPath);
         });
       } else {
-        this.$download.zip("/code/gen/batchGenCode?tables=" + tableNames, "ruoyi.zip");
+        this.$download.zip("code/gen/batchGenCode?tables=" + tableNames, "code.zip");
       }
     },
     /** 同步数据库操作 */

Nem az összes módosított fájl került megjelenítésre, mert túl sok fájl változott