Sfoglia il codice sorgente

处理文件路径问题

尹帮元 2 anni fa
parent
commit
ab343f257d

+ 0 - 2
src/components/ImageUpload/index.vue

@@ -152,7 +152,6 @@ export default {
     },
     //自定义上传方式(自带的成功回调及失败回调会失效)
     uploadImage(fileObj){
-      console.log(fileObj,'fileObj')
       let formData = new FormData();
       formData.append('file',fileObj.file);
       upload(formData,'image').then(res=>{
@@ -173,7 +172,6 @@ export default {
     },
     // 上传前loading加载
     handleBeforeUpload(file) {
-      console.log('hhhhhhh')
       let isImg = false;
       if (this.fileType.length) {
         let fileExtension = "";

+ 0 - 3
src/mixins/tableList.js

@@ -26,8 +26,5 @@ export default {
       this.$refs.tree.setCurrentKey(null);
       this.handleQuery();
     },
-    getTableList(){
-
-    }
   }
 }

+ 4 - 4
src/views/register.vue

@@ -1,7 +1,7 @@
 <template>
   <div class="register">
     <el-form ref="registerForm" :model="registerForm" :rules="registerRules" class="register-form">
-      <h3 class="title">若依后台管理系统</h3>
+      <h3 class="title">移动安全保卫管理平台</h3>
       <el-form-item prop="username">
         <el-input v-model="registerForm.username" type="text" auto-complete="off" placeholder="账号">
           <svg-icon slot="prefix" icon-class="user" class="el-input__icon input-icon" />
@@ -60,9 +60,9 @@
       </el-form-item>
     </el-form>
     <!--  底部  -->
-    <div class="el-register-footer">
-      <span>Copyright © 2018-2023 ruoyi.vip All Rights Reserved.</span>
-    </div>
+<!--    <div class="el-register-footer">-->
+<!--      <span>Copyright © 2018-2023 ruoyi.vip All Rights Reserved.</span>-->
+<!--    </div>-->
   </div>
 </template>
 

+ 7 - 19
src/views/system/user/index.vue

@@ -276,12 +276,13 @@ import OrgTree from '@/components/orgTree'
 import { listUser, getUser, delUser, addUser, updateUser, resetUserPwd, changeUserStatus } from "@/api/system/user";
 import { getToken } from "@/utils/auth";
 import {deptTreeSelect} from "@/api/system/public";
-
+import tableList from "@/mixins/tableList";
 
 export default {
   name: "User",
   dicts: ['sys_normal_disable', 'sys_user_sex'],
   components: { OrgTree },
+  mixins:[tableList],
   data() {
     return {
       // 遮罩层
@@ -385,12 +386,12 @@ export default {
   },
   created() {
     this.getDeptTree();
-    this.getConfigKey("sys.user.initPassword").then(response => {
-      this.initPassword = response.msg;
-    });
+    // this.getConfigKey("sys.user.initPassword").then(response => {
+    //   this.initPassword = response.msg;
+    // });
   },
   mounted(){
-    console.log(this.queryParams,'aaaaaa')
+
   },
   methods: {
     /** 查询机构树数据 */
@@ -421,7 +422,7 @@ export default {
       }
     },
     /** 查询列表 */
-    getList(id) {
+    getList() {
       this.loading = true;
       listUser(this.addDateRange(this.queryParams, this.dateRange)).then(response => {
         //兼容框架userId字段
@@ -482,19 +483,6 @@ export default {
       };
       this.resetForm("form");
     },
-    /** 搜索按钮操作 */
-    handleQuery() {
-      this.queryParams.pageNum = 1;
-      this.getList();
-    },
-    /** 重置按钮操作 */
-    resetQuery() {
-      this.dateRange = [];
-      this.resetForm("queryForm");
-      this.queryParams.orgId = undefined;
-      this.$refs.tree.setCurrentKey(null);
-      this.handleQuery();
-    },
     // 多选框选中数据
     handleSelectionChange(selection) {
       this.ids = selection.map(item => item.userId);

+ 1 - 1
vue.config.js

@@ -20,7 +20,7 @@ module.exports = {
   // 部署生产环境和开发环境下的URL。
   // 默认情况下,Vue CLI 会假设你的应用是被部署在一个域名的根路径上
   // 例如 https://www.ruoyi.vip/。如果应用被部署在一个子路径上,你就需要用这个选项指定这个子路径。例如,如果你的应用被部署在 https://www.ruoyi.vip/admin/,则设置 baseUrl 为 /admin/。
-  publicPath: process.env.NODE_ENV === "production" ? "/" : "/",
+  publicPath: process.env.NODE_ENV === "production" ? "./" : "./",
   // 在npm run build 或 yarn build 时 ,生成文件的目录名称(要和baseUrl的生产环境路径一致)(默认dist)
   outputDir: 'dist',
   // 用于放置生成的静态资源 (js、css、img、fonts) 的;(项目打包之后,静态资源会放在这个文件夹下)