Pārlūkot izejas kodu

修改上传地址

尹帮元 2 gadi atpakaļ
vecāks
revīzija
94d3b582fa

+ 5 - 4
.env.development

@@ -6,12 +6,13 @@ ENV = 'development'
 
 # 开发环境
 #测试地址
-#VUE_APP_BASE_API = 'http://10.87.10.55:8081/'
+#VUE_APP_BASE_API = 'http://10.87.10.55:8081'
 #罗俊
-#VUE_APP_BASE_API = 'http://10.87.10.49:8080/'
+VUE_APP_BASE_API = 'http://10.87.10.49:8080'
 #罗伟
-# VUE_APP_BASE_API = 'http://10.87.11.94:8080/'
-VUE_APP_BASE_API = 'http://127.0.0.1:8080/'
+#VUE_APP_BASE_API = 'http://10.87.10.47:8080'
+#高雄
+#VUE_APP_BASE_API = 'http://10.87.11.94:8080'
 # 路由懒加载
 VUE_CLI_BABEL_TRANSPILE_MODULES = true
 

+ 4 - 4
src/components/ImageUpload/index.vue

@@ -152,15 +152,14 @@ export default {
     handleUploadSuccess(res, file) {
       console.log(res,'res')
       if (res.code === 200) {
-        getFile(res.data.code).then(res=>{
+        let imgUrl = process.env.VUE_APP_BASE_API + res.data.url
+        this.uploadList.push({ name: res.data.name, url: imgUrl});
+        this.uploadedSuccessfully();
 
           // 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();
@@ -188,6 +187,7 @@ export default {
         this.fileList = this.fileList.concat(this.uploadList);
         this.uploadList = [];
         this.number = 0;
+        console.log(this.listToString(this.fileList),'ppppp')
         this.$emit("input", this.listToString(this.fileList));
         this.$modal.closeLoading();
       }

+ 3 - 0
src/main.js

@@ -11,6 +11,8 @@ import plugins from './plugins' // plugins
 import { download } from '@/utils/request'
 import './assets/icons' // icon
 import './permission' // permission control
+import TreeSelect from "@riophae/vue-treeselect";
+import "@riophae/vue-treeselect/dist/vue-treeselect.css";
 import { getDicts } from "@/api/system/dict/data";
 import { getConfigKey } from "@/api/system/config";
 import {
@@ -69,6 +71,7 @@ Vue.component('FileUpload', FileUpload)
 Vue.component('ImageUpload', ImageUpload)
 Vue.component('ImagePreview', ImagePreview)
 
+Vue.use(TreeSelect)
 Vue.use(directive)
 Vue.use(plugins)
 Vue.use(VueMeta)

+ 3 - 4
src/views/system/user/index.vue

@@ -275,8 +275,7 @@
 import OrgTree from '@/components/orgTree'
 import { listUser, getUser, delUser, addUser, updateUser, resetUserPwd, changeUserStatus } from "@/api/system/user";
 import { getToken } from "@/utils/auth";
-import TreeSelect from "@riophae/vue-treeselect";
-import "@riophae/vue-treeselect/dist/vue-treeselect.css";
+
 
 export default {
   name: "User",
@@ -303,9 +302,9 @@ export default {
       // 是否显示弹出层
       open: false,
       // 机构名称
-      deptName: undefined,
+      deptName: null,
       // 默认密码
-      initPassword: undefined,
+      initPassword: null,
       // 日期范围
       dateRange: [],
       // 岗位选项