Browse Source

导入文件夹

hanyuqing
hanyuqing 6 months ago
parent
commit
ead6b97835
  1. 3
      gyxtp/src/view/docInfo.vue
  2. 2
      ruoyi-ui/.env.development
  3. 2
      ruoyi-ui/.env.production
  4. 2
      ruoyi-ui/src/components/Editor/index.vue
  5. 4
      ruoyi-ui/src/components/FileUpload/index.vue
  6. 4
      ruoyi-ui/src/components/ImagePreview/index.vue
  7. 2
      ruoyi-ui/src/components/ImageUpload/index.vue
  8. 2
      ruoyi-ui/src/views/system/SysPoint/index.vue
  9. 6
      ruoyi-ui/src/views/system/create/index.vue
  10. 16
      ruoyi-ui/src/views/system/fileManage/index.vue
  11. 18
      ruoyi-ui/src/views/system/fileManage/indexNB.vue
  12. 3
      ruoyi-ui/src/views/system/relationship/index.vue
  13. 7
      ruoyi-ui/src/views/system/small/index.vue
  14. 2
      ruoyi-ui/src/views/system/user/index.vue
  15. 2
      ruoyi-ui/src/views/system/user/profile/userAvatar.vue

3
gyxtp/src/view/docInfo.vue

@ -808,7 +808,8 @@ export default {
var kkk=lidt[a]; var kkk=lidt[a];
this.imgsList.push(kkk) this.imgsList.push(kkk)
}else{ }else{
var kkk = "http://127.0.0.1:10031"+lidt[a]; let ip=process.env.VUE_APP_IP
var kkk = "http://"+ip+lidt[a];
this.imgsList.push(kkk) this.imgsList.push(kkk)
} }

2
ruoyi-ui/.env.development

@ -10,4 +10,4 @@ VUE_APP_BASE_API = '/dev-api'
# 路由懒加载 # 路由懒加载
VUE_CLI_BABEL_TRANSPILE_MODULES = true VUE_CLI_BABEL_TRANSPILE_MODULES = true
VUE_APP_PORT=10031 VUE_APP_IP=localhost:10031

2
ruoyi-ui/.env.production

@ -7,4 +7,4 @@ ENV = 'production'
# 知识图谱管理系统/生产环境 # 知识图谱管理系统/生产环境
VUE_APP_BASE_API = '/prod-api' VUE_APP_BASE_API = '/prod-api'
VUE_APP_PORT=10031 VUE_APP_IP=localhost:10031

2
ruoyi-ui/src/components/Editor/index.vue

@ -60,7 +60,7 @@ export default {
}, },
data() { data() {
return { return {
uploadUrl:"http://localhost:10031/common/uploadNew", // uploadUrl:"http://"+process.env.VUE_APP_IP+"/common/uploadNew", //
headers: { headers: {
Authorization: "Bearer " + getToken() Authorization: "Bearer " + getToken()
}, },

4
ruoyi-ui/src/components/FileUpload/index.vue

@ -72,8 +72,8 @@ export default {
return { return {
number: 0, number: 0,
uploadList: [], uploadList: [],
baseUrl: "http://localhost:10031", baseUrl: "http://"+process.env.VUE_APP_IP,
uploadFileUrl:"http://localhost:10031/common/upload", // uploadFileUrl:"http://"+process.env.VUE_APP_IP+"/common/upload", //
headers: { headers: {
Authorization: "Bearer " + getToken(), Authorization: "Bearer " + getToken(),
}, },

4
ruoyi-ui/src/components/ImagePreview/index.vue

@ -39,7 +39,7 @@ export default {
if (isExternal(real_src)) { if (isExternal(real_src)) {
return real_src; return real_src;
} }
return "http://localhost:10031" + real_src; return "http://"+process.env.VUE_APP_IP + real_src;
}, },
realSrcList() { realSrcList() {
if (!this.src) { if (!this.src) {
@ -51,7 +51,7 @@ export default {
if (isExternal(item)) { if (isExternal(item)) {
return srcList.push(item); return srcList.push(item);
} }
return srcList.push("http://localhost:10031" + item); return srcList.push("http://"+process.env.VUE_APP_IP + item);
}); });
return srcList; return srcList;
}, },

2
ruoyi-ui/src/components/ImageUpload/index.vue

@ -77,7 +77,7 @@ export default {
dialogVisible: false, dialogVisible: false,
hideUpload: false, hideUpload: false,
baseUrl: process.env.VUE_APP_BASE_API, baseUrl: process.env.VUE_APP_BASE_API,
uploadImgUrl: "http://localhost:10031/common/upload", // uploadImgUrl: "http://"+process.env.VUE_APP_IP+"/common/upload", //
headers: { headers: {
Authorization: "Bearer " + getToken(), Authorization: "Bearer " + getToken(),
}, },

2
ruoyi-ui/src/views/system/SysPoint/index.vue

@ -186,7 +186,7 @@ export default {
oprnIno: false, oprnIno: false,
isUploading: false, isUploading: false,
updateSupport: 0, updateSupport: 0,
url: "http://localhost:10031/system/SysPoint/insertPoint" url: "http://"+process.env.VUE_APP_IP+"/system/SysPoint/insertPoint"
}, },
typeOptions: [ typeOptions: [
{ label: '作者', value: 'author' }, { label: '作者', value: 'author' },

6
ruoyi-ui/src/views/system/create/index.vue

@ -730,9 +730,9 @@ export default {
// WebSocket // WebSocket
getUserProfile().then(response => { getUserProfile().then(response => {
this.userId=response.data.userId this.userId=response.data.userId
let port=process.env.VUE_APP_PORT let ip=process.env.VUE_APP_IP
console.log(port) console.log(ip)
this.socket = new WebSocket('ws://localhost:'+port+'/api/ws?userId='+response.data.userId); // this.socket = new WebSocket('ws://'+ip+'/api/ws?userId='+response.data.userId); //
// //
this.socket.addEventListener('open', (event) => { this.socket.addEventListener('open', (event) => {
console.log('WebSocket 连接已建立'); console.log('WebSocket 连接已建立');

16
ruoyi-ui/src/views/system/fileManage/index.vue

@ -865,10 +865,10 @@ export default {
// //
headers: {Authorization: "Bearer " + getToken()}, headers: {Authorization: "Bearer " + getToken()},
// //
url: "http://localhost:10031/system/fileManage/uploadVideo", url: "http://"+process.env.VUE_APP_IP+"/system/fileManage/uploadVideo",
url2: "http://localhost:10031", url2: "http://"+process.env.VUE_APP_IP,
}, },
uploadImgUrl: "http://localhost:10031/common/upload1", uploadImgUrl: "http://"+process.env.VUE_APP_IP+"/common/upload1",
// uploadImgUrl:"http://127.0.0.1:10031/common/upload1", // uploadImgUrl:"http://127.0.0.1:10031/common/upload1",
form: {}, form: {},
@ -905,7 +905,7 @@ export default {
isUploading: false, isUploading: false,
updateSupport: 0, updateSupport: 0,
headers: {Authorization: "Bearer " + getToken()}, headers: {Authorization: "Bearer " + getToken()},
url: "http://localhost:10031/system/fileManage/addFile" url: "http://"+process.env.VUE_APP_IP+"/system/fileManage/addFile"
// url: "http://127.0.0.1:10031/system/fileManage/addFile" // url: "http://127.0.0.1:10031/system/fileManage/addFile"
}, },
upload1: { upload1: {
@ -916,7 +916,7 @@ export default {
isUploading: false, isUploading: false,
updateSupport: 0, updateSupport: 0,
headers: {Authorization: "Bearer " + getToken()}, headers: {Authorization: "Bearer " + getToken()},
url: "http://localhost:10031/system/fileManage/insertRelationByFile" url: "http://"+process.env.VUE_APP_IP+"/system/fileManage/insertRelationByFile"
// url: "http://127.0.0.1:10031/system/fileManage/addFile" // url: "http://127.0.0.1:10031/system/fileManage/addFile"
}, },
fileDocxList: [], fileDocxList: [],
@ -927,7 +927,7 @@ export default {
isUploading: false, isUploading: false,
updateSupport: 0, updateSupport: 0,
headers: {Authorization: "Bearer " + getToken()}, headers: {Authorization: "Bearer " + getToken()},
url: "http://localhost:10031/system/fileManage/addFileNew" url: "http://"+process.env.VUE_APP_IP+"/system/fileManage/addFileNew"
}, },
relationName: "", relationName: "",
defaultProps: { defaultProps: {
@ -1256,7 +1256,7 @@ export default {
this.loading = true; this.loading = true;
// //
this.$axios.post('http://localhost:10031/system/fileManage/exportAll', ff[n], { this.$axios.post('http://'+process.env.VUE_APP_IP+'/system/fileManage/exportAll', ff[n], {
headers: {Authorization: "Bearer " + getToken()}, headers: {Authorization: "Bearer " + getToken()},
}) })
.then((res) => { .then((res) => {
@ -1869,7 +1869,7 @@ export default {
console.log(res) console.log(res)
this.userRemark = res.data this.userRemark = res.data
}) })
var socket = new WebSocket('ws://localhost:10031/system/websocket/1'); var socket = new WebSocket('ws://'+process.env.VUE_APP_IP+'/system/websocket/1');
let that = this let that = this
socket.onmessage = function (event) { socket.onmessage = function (event) {
that.upload.tip = event.data that.upload.tip = event.data

18
ruoyi-ui/src/views/system/fileManage/indexNB.vue

@ -627,10 +627,10 @@ export default {
// //
headers: {Authorization: "Bearer " + getToken()}, headers: {Authorization: "Bearer " + getToken()},
// //
url: "http://localhost:10031/system/fileManage/uploadVideo", url: "http://"+process.env.VUE_APP_IP+"/system/fileManage/uploadVideo",
url2: "http://localhost:10031", url2: "http://"+process.env.VUE_APP_IP,
}, },
uploadImgUrl: "http://localhost:10031/common/upload1", uploadImgUrl: "http://"+process.env.VUE_APP_IP+"/common/upload1",
// uploadImgUrl:"http://127.0.0.1:10031/common/upload1", // uploadImgUrl:"http://127.0.0.1:10031/common/upload1",
form: {}, form: {},
@ -667,7 +667,7 @@ export default {
isUploading: false, isUploading: false,
updateSupport: 0, updateSupport: 0,
headers: {Authorization: "Bearer " + getToken()}, headers: {Authorization: "Bearer " + getToken()},
url: "http://localhost:10031/system/fileManage/addFile" url: "http://"+process.env.VUE_APP_IP+"/system/fileManage/addFile"
// url: "http://127.0.0.1:10031/system/fileManage/addFile" // url: "http://127.0.0.1:10031/system/fileManage/addFile"
}, },
upload1: { upload1: {
@ -678,7 +678,7 @@ export default {
isUploading: false, isUploading: false,
updateSupport: 0, updateSupport: 0,
headers: {Authorization: "Bearer " + getToken()}, headers: {Authorization: "Bearer " + getToken()},
url: "http://localhost:10031/system/fileManage/insertRelationByFile" url: "http://"+process.env.VUE_APP_IP+"/system/fileManage/insertRelationByFile"
// url: "http://127.0.0.1:10031/system/fileManage/addFile" // url: "http://127.0.0.1:10031/system/fileManage/addFile"
}, },
fileDocxList: [], fileDocxList: [],
@ -689,7 +689,7 @@ export default {
isUploading: false, isUploading: false,
updateSupport: 0, updateSupport: 0,
headers: {Authorization: "Bearer " + getToken()}, headers: {Authorization: "Bearer " + getToken()},
url: "http://localhost:10031/system/fileManage/addFileNew" url: "http://"+process.env.VUE_APP_IP+"/system/fileManage/addFileNew"
}, },
relationName: "", relationName: "",
defaultProps: { defaultProps: {
@ -938,7 +938,7 @@ export default {
this.loading = true; this.loading = true;
// //
this.$axios.post('http://localhost:10031/system/fileManage/exportAll', ff[n], { this.$axios.post('http://'+process.env.VUE_APP_IP+'/system/fileManage/exportAll', ff[n], {
headers: {Authorization: "Bearer " + getToken()}, headers: {Authorization: "Bearer " + getToken()},
}) })
.then((res) => { .then((res) => {
@ -1393,7 +1393,7 @@ export default {
imgArr.forEach(item => { imgArr.forEach(item => {
var obj = {}; var obj = {};
// /dev-api/profile/upload/2024/08/29/0_20240829153841A018.mp4 // /dev-api/profile/upload/2024/08/29/0_20240829153841A018.mp4
obj.url = "http://localhost:10031"+item; obj.url = "http://"+process.env.VUE_APP_IP+item;
this.fileListImgs.push(obj); this.fileListImgs.push(obj);
this.fileListImgs1.push(item); this.fileListImgs1.push(item);
}) })
@ -1548,7 +1548,7 @@ export default {
this.getFileListInfo() this.getFileListInfo()
this.loadTemplatesFromStorage(); this.loadTemplatesFromStorage();
var socket = new WebSocket('ws://localhost:10031/system/websocket/1'); var socket = new WebSocket('ws://'+process.env.VUE_APP_IP+'/system/websocket/1');
let that = this let that = this
socket.onmessage = function (event) { socket.onmessage = function (event) {
that.upload.tip = event.data that.upload.tip = event.data

3
ruoyi-ui/src/views/system/relationship/index.vue

@ -196,7 +196,7 @@
:on-remove="handleRemoveFile" :on-remove="handleRemoveFile"
:headers="reqHeaders" :headers="reqHeaders"
:on-success="onUploadSuccess" :on-success="onUploadSuccess"
action="http://localhost:10031/common/upload" :action="actionupload"
:file-list="resultFileList" :file-list="resultFileList"
class="upload-files" > class="upload-files" >
<div class="upfile-btn"> <div class="upfile-btn">
@ -222,6 +222,7 @@ export default {
name: "Relationship", name: "Relationship",
data() { data() {
return { return {
actionupload:"http://"+process.env.VUE_APP_IP+"/common/upload",
resultFileList:[], resultFileList:[],
diaForm: { diaForm: {
desc: '', desc: '',

7
ruoyi-ui/src/views/system/small/index.vue

@ -174,7 +174,7 @@
closable closable
@close="removeTag(index)" @close="removeTag(index)"
size="small" size="small"
style="margin-right: 8px; margin-bottom: 6px;" style="margin-right: 8px;height: 32px;line-height: 32px;"
> >
{{ tag }} {{ tag }}
</el-tag> </el-tag>
@ -185,7 +185,7 @@
@keyup.enter.native="addTag" @keyup.enter.native="addTag"
@blur="addTag" @blur="addTag"
size="small" size="small"
style="width: 120px; margin-right: 8px;" style="width: 180px; margin-right: 8px;"
placeholder="输入后回车添加" placeholder="输入后回车添加"
/> />
</div> </div>
@ -200,7 +200,7 @@
:on-remove="handleRemoveFile" :on-remove="handleRemoveFile"
:headers="reqHeaders" :headers="reqHeaders"
:on-success="onUploadSuccess" :on-success="onUploadSuccess"
action="http://localhost:10031/common/upload" :action="uploadAction"
:file-list="resultFileList" :file-list="resultFileList"
class="upload-files" > class="upload-files" >
<div class="upfile-btn"> <div class="upfile-btn">
@ -226,6 +226,7 @@ export default {
name: "Relationship", name: "Relationship",
data() { data() {
return { return {
uploadAction:"http://"+process.env.VUE_APP_IP+"/common/upload",
inputValue: '', inputValue: '',
// //
loading: true, loading: true,

2
ruoyi-ui/src/views/system/user/index.vue

@ -311,7 +311,7 @@ export default {
// //
headers: { Authorization: "Bearer " + getToken() }, headers: { Authorization: "Bearer " + getToken() },
// //
url: "http://localhost:10031/system/user/importData" url: "http://"+process.env.VUE_APP_IP+"/system/user/importData"
}, },
// //
queryParams: { queryParams: {

2
ruoyi-ui/src/views/system/user/profile/userAvatar.vue

@ -137,7 +137,7 @@ export default {
formData.append("avatarfile", data, this.options.filename); formData.append("avatarfile", data, this.options.filename);
uploadAvatar(formData).then(response => { uploadAvatar(formData).then(response => {
this.open = false; this.open = false;
this.options.img = "http://localhost:10031" + response.imgUrl; this.options.img = "http://"+process.env.VUE_APP_IP + response.imgUrl;
store.commit('SET_AVATAR', this.options.img); store.commit('SET_AVATAR', this.options.img);
this.$modal.msgSuccess("修改成功"); this.$modal.msgSuccess("修改成功");
this.visible = false; this.visible = false;

Loading…
Cancel
Save