Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
F
finance-manage
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
finance-oa
finance-manage
Commits
ded99502
Commit
ded99502
authored
Sep 27, 2021
by
RuoYi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增通用方法简化下载使用
parent
02b95f95
Changes
20
Show whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
70 additions
and
82 deletions
+70
-82
ruoyi-common/src/main/java/com/ruoyi/common/utils/file/FileUtils.java
.../src/main/java/com/ruoyi/common/utils/file/FileUtils.java
+1
-0
ruoyi-framework/src/main/java/com/ruoyi/framework/config/SecurityConfig.java
.../main/java/com/ruoyi/framework/config/SecurityConfig.java
+0
-2
ruoyi-generator/src/main/resources/vm/vue/index.vue.vm
ruoyi-generator/src/main/resources/vm/vue/index.vue.vm
+1
-1
ruoyi-ui/src/main.js
ruoyi-ui/src/main.js
+1
-2
ruoyi-ui/src/plugins/download.js
ruoyi-ui/src/plugins/download.js
+48
-0
ruoyi-ui/src/plugins/index.js
ruoyi-ui/src/plugins/index.js
+3
-0
ruoyi-ui/src/utils/ruoyi.js
ruoyi-ui/src/utils/ruoyi.js
+0
-7
ruoyi-ui/src/utils/zipdownload.js
ruoyi-ui/src/utils/zipdownload.js
+0
-42
ruoyi-ui/src/views/monitor/job/index.vue
ruoyi-ui/src/views/monitor/job/index.vue
+1
-1
ruoyi-ui/src/views/monitor/job/log.vue
ruoyi-ui/src/views/monitor/job/log.vue
+1
-1
ruoyi-ui/src/views/monitor/logininfor/index.vue
ruoyi-ui/src/views/monitor/logininfor/index.vue
+1
-1
ruoyi-ui/src/views/monitor/operlog/index.vue
ruoyi-ui/src/views/monitor/operlog/index.vue
+1
-1
ruoyi-ui/src/views/system/config/index.vue
ruoyi-ui/src/views/system/config/index.vue
+1
-1
ruoyi-ui/src/views/system/dict/data.vue
ruoyi-ui/src/views/system/dict/data.vue
+1
-1
ruoyi-ui/src/views/system/dict/index.vue
ruoyi-ui/src/views/system/dict/index.vue
+1
-1
ruoyi-ui/src/views/system/post/index.vue
ruoyi-ui/src/views/system/post/index.vue
+1
-1
ruoyi-ui/src/views/system/role/index.vue
ruoyi-ui/src/views/system/role/index.vue
+1
-1
ruoyi-ui/src/views/system/user/index.vue
ruoyi-ui/src/views/system/user/index.vue
+2
-2
ruoyi-ui/src/views/tool/build/index.vue
ruoyi-ui/src/views/tool/build/index.vue
+4
-15
ruoyi-ui/src/views/tool/gen/index.vue
ruoyi-ui/src/views/tool/gen/index.vue
+1
-2
No files found.
ruoyi-common/src/main/java/com/ruoyi/common/utils/file/FileUtils.java
View file @
ded99502
...
@@ -211,6 +211,7 @@ public class FileUtils
...
@@ -211,6 +211,7 @@ public class FileUtils
.
append
(
percentEncodedFileName
);
.
append
(
percentEncodedFileName
);
response
.
setHeader
(
"Content-disposition"
,
contentDispositionValue
.
toString
());
response
.
setHeader
(
"Content-disposition"
,
contentDispositionValue
.
toString
());
response
.
setHeader
(
"download-filename"
,
percentEncodedFileName
);
}
}
/**
/**
...
...
ruoyi-framework/src/main/java/com/ruoyi/framework/config/SecurityConfig.java
View file @
ded99502
...
@@ -107,8 +107,6 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter
...
@@ -107,8 +107,6 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter
"/**/*.js"
,
"/**/*.js"
,
"/profile/**"
"/profile/**"
).
permitAll
()
).
permitAll
()
.
antMatchers
(
"/common/download**"
).
anonymous
()
.
antMatchers
(
"/common/download/resource**"
).
anonymous
()
.
antMatchers
(
"/swagger-ui.html"
).
anonymous
()
.
antMatchers
(
"/swagger-ui.html"
).
anonymous
()
.
antMatchers
(
"/swagger-resources/**"
).
anonymous
()
.
antMatchers
(
"/swagger-resources/**"
).
anonymous
()
.
antMatchers
(
"/webjars/**"
).
anonymous
()
.
antMatchers
(
"/webjars/**"
).
anonymous
()
...
...
ruoyi-generator/src/main/resources/vm/vue/index.vue.vm
View file @
ded99502
...
@@ -567,7 +567,7 @@ export default {
...
@@ -567,7 +567,7 @@ export default {
this.exportLoading = true;
this.exportLoading = true;
return export${BusinessName}(queryParams);
return export${BusinessName}(queryParams);
}).then(response => {
}).then(response => {
this.
download
(response.msg);
this.
#[[$download]]#.name
(response.msg);
this.exportLoading = false;
this.exportLoading = false;
}).catch(() => {});
}).catch(() => {});
}
}
...
...
ruoyi-ui/src/main.js
View file @
ded99502
...
@@ -17,7 +17,7 @@ import './assets/icons' // icon
...
@@ -17,7 +17,7 @@ import './assets/icons' // icon
import
'
./permission
'
// permission control
import
'
./permission
'
// permission control
import
{
getDicts
}
from
"
@/api/system/dict/data
"
;
import
{
getDicts
}
from
"
@/api/system/dict/data
"
;
import
{
getConfigKey
}
from
"
@/api/system/config
"
;
import
{
getConfigKey
}
from
"
@/api/system/config
"
;
import
{
parseTime
,
resetForm
,
addDateRange
,
selectDictLabel
,
selectDictLabels
,
download
,
handleTree
}
from
"
@/utils/ruoyi
"
;
import
{
parseTime
,
resetForm
,
addDateRange
,
selectDictLabel
,
selectDictLabels
,
handleTree
}
from
"
@/utils/ruoyi
"
;
// 分页组件
// 分页组件
import
Pagination
from
"
@/components/Pagination
"
;
import
Pagination
from
"
@/components/Pagination
"
;
// 自定义表格工具组件
// 自定义表格工具组件
...
@@ -43,7 +43,6 @@ Vue.prototype.resetForm = resetForm
...
@@ -43,7 +43,6 @@ Vue.prototype.resetForm = resetForm
Vue
.
prototype
.
addDateRange
=
addDateRange
Vue
.
prototype
.
addDateRange
=
addDateRange
Vue
.
prototype
.
selectDictLabel
=
selectDictLabel
Vue
.
prototype
.
selectDictLabel
=
selectDictLabel
Vue
.
prototype
.
selectDictLabels
=
selectDictLabels
Vue
.
prototype
.
selectDictLabels
=
selectDictLabels
Vue
.
prototype
.
download
=
download
Vue
.
prototype
.
handleTree
=
handleTree
Vue
.
prototype
.
handleTree
=
handleTree
// 全局组件挂载
// 全局组件挂载
...
...
ruoyi-ui/src/plugins/download.js
0 → 100644
View file @
ded99502
import
{
saveAs
}
from
'
file-saver
'
import
axios
from
'
axios
'
import
{
getToken
}
from
'
@/utils/auth
'
const
baseURL
=
process
.
env
.
VUE_APP_BASE_API
export
default
{
name
(
name
,
isDelete
=
true
)
{
var
url
=
baseURL
+
"
/common/download?fileName=
"
+
encodeURI
(
name
)
+
"
&delete=
"
+
isDelete
axios
({
method
:
'
get
'
,
url
:
url
,
responseType
:
'
blob
'
,
headers
:
{
'
Authorization
'
:
'
Bearer
'
+
getToken
()
}
}).
then
(
res
=>
{
const
blob
=
new
Blob
([
res
.
data
])
this
.
saveAs
(
blob
,
decodeURI
(
res
.
headers
[
'
download-filename
'
]))
})
},
resource
(
resource
)
{
var
url
=
baseURL
+
"
/common/download/resource?resource=
"
+
encodeURI
(
resource
);
axios
({
method
:
'
get
'
,
url
:
url
,
responseType
:
'
blob
'
,
headers
:
{
'
Authorization
'
:
'
Bearer
'
+
getToken
()
}
}).
then
(
res
=>
{
const
blob
=
new
Blob
([
res
.
data
])
this
.
saveAs
(
blob
,
decodeURI
(
res
.
headers
[
'
download-filename
'
]))
})
},
zip
(
url
,
name
)
{
var
url
=
baseURL
+
url
axios
({
method
:
'
get
'
,
url
:
url
,
responseType
:
'
blob
'
,
headers
:
{
'
Authorization
'
:
'
Bearer
'
+
getToken
()
}
}).
then
(
res
=>
{
const
blob
=
new
Blob
([
res
.
data
],
{
type
:
'
application/zip
'
})
this
.
saveAs
(
blob
,
name
)
})
},
saveAs
(
text
,
name
,
opts
)
{
saveAs
(
text
,
name
,
opts
);
}
}
ruoyi-ui/src/plugins/index.js
View file @
ded99502
import
cache
from
'
./cache
'
import
cache
from
'
./cache
'
import
modal
from
'
./modal
'
import
modal
from
'
./modal
'
import
download
from
'
./download
'
export
default
{
export
default
{
install
(
Vue
)
{
install
(
Vue
)
{
...
@@ -7,5 +8,7 @@ export default {
...
@@ -7,5 +8,7 @@ export default {
Vue
.
prototype
.
$cache
=
cache
Vue
.
prototype
.
$cache
=
cache
// 模态框对象
// 模态框对象
Vue
.
prototype
.
$modal
=
modal
Vue
.
prototype
.
$modal
=
modal
// 下载文件
Vue
.
prototype
.
$download
=
download
}
}
}
}
ruoyi-ui/src/utils/ruoyi.js
View file @
ded99502
...
@@ -3,8 +3,6 @@
...
@@ -3,8 +3,6 @@
* Copyright (c) 2019 ruoyi
* Copyright (c) 2019 ruoyi
*/
*/
const
baseURL
=
process
.
env
.
VUE_APP_BASE_API
// 日期格式化
// 日期格式化
export
function
parseTime
(
time
,
pattern
)
{
export
function
parseTime
(
time
,
pattern
)
{
if
(
arguments
.
length
===
0
||
!
time
)
{
if
(
arguments
.
length
===
0
||
!
time
)
{
...
@@ -95,11 +93,6 @@ export function selectDictLabels(datas, value, separator) {
...
@@ -95,11 +93,6 @@ export function selectDictLabels(datas, value, separator) {
return
actions
.
join
(
''
).
substring
(
0
,
actions
.
join
(
''
).
length
-
1
);
return
actions
.
join
(
''
).
substring
(
0
,
actions
.
join
(
''
).
length
-
1
);
}
}
// 通用下载方法
export
function
download
(
fileName
)
{
window
.
location
.
href
=
baseURL
+
"
/common/download?fileName=
"
+
encodeURI
(
fileName
)
+
"
&delete=
"
+
true
;
}
// 字符串格式化(%s )
// 字符串格式化(%s )
export
function
sprintf
(
str
)
{
export
function
sprintf
(
str
)
{
var
args
=
arguments
,
flag
=
true
,
i
=
1
;
var
args
=
arguments
,
flag
=
true
,
i
=
1
;
...
...
ruoyi-ui/src/utils/zipdownload.js
deleted
100644 → 0
View file @
02b95f95
import
axios
from
'
axios
'
import
{
getToken
}
from
'
@/utils/auth
'
const
mimeMap
=
{
xlsx
:
'
application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
'
,
zip
:
'
application/zip
'
}
const
baseUrl
=
process
.
env
.
VUE_APP_BASE_API
export
function
downLoadZip
(
str
,
filename
)
{
var
url
=
baseUrl
+
str
axios
({
method
:
'
get
'
,
url
:
url
,
responseType
:
'
blob
'
,
headers
:
{
'
Authorization
'
:
'
Bearer
'
+
getToken
()
}
}).
then
(
res
=>
{
resolveBlob
(
res
,
mimeMap
.
zip
)
})
}
/**
* 解析blob响应内容并下载
* @param {*} res blob响应内容
* @param {String} mimeType MIME类型
*/
export
function
resolveBlob
(
res
,
mimeType
)
{
const
aLink
=
document
.
createElement
(
'
a
'
)
var
blob
=
new
Blob
([
res
.
data
],
{
type
:
mimeType
})
// //从response的headers中获取filename, 后端response.setHeader("Content-disposition", "attachment; filename=xxxx.docx") 设置的文件名;
var
patt
=
new
RegExp
(
'
filename=([^;]+
\\
.[^
\\
.;]+);*
'
)
var
contentDisposition
=
decodeURI
(
res
.
headers
[
'
content-disposition
'
])
var
result
=
patt
.
exec
(
contentDisposition
)
var
fileName
=
result
[
1
]
fileName
=
fileName
.
replace
(
/
\"
/g
,
''
)
aLink
.
style
.
display
=
'
none
'
aLink
.
href
=
URL
.
createObjectURL
(
blob
)
aLink
.
setAttribute
(
'
download
'
,
fileName
)
// 设置下载文件名称
document
.
body
.
appendChild
(
aLink
)
aLink
.
click
()
URL
.
revokeObjectURL
(
aLink
.
href
);
//清除引用
document
.
body
.
removeChild
(
aLink
);
}
ruoyi-ui/src/views/monitor/job/index.vue
View file @
ded99502
...
@@ -515,7 +515,7 @@ export default {
...
@@ -515,7 +515,7 @@ export default {
this
.
exportLoading
=
true
;
this
.
exportLoading
=
true
;
return
exportJob
(
queryParams
);
return
exportJob
(
queryParams
);
}).
then
(
response
=>
{
}).
then
(
response
=>
{
this
.
download
(
response
.
msg
);
this
.
$download
.
name
(
response
.
msg
);
this
.
exportLoading
=
false
;
this
.
exportLoading
=
false
;
}).
catch
(()
=>
{});
}).
catch
(()
=>
{});
}
}
...
...
ruoyi-ui/src/views/monitor/job/log.vue
View file @
ded99502
...
@@ -298,7 +298,7 @@ export default {
...
@@ -298,7 +298,7 @@ export default {
this
.
exportLoading
=
true
;
this
.
exportLoading
=
true
;
return
exportJobLog
(
queryParams
);
return
exportJobLog
(
queryParams
);
}).
then
(
response
=>
{
}).
then
(
response
=>
{
this
.
download
(
response
.
msg
);
this
.
$download
.
name
(
response
.
msg
);
this
.
exportLoading
=
false
;
this
.
exportLoading
=
false
;
}).
catch
(()
=>
{});
}).
catch
(()
=>
{});
}
}
...
...
ruoyi-ui/src/views/monitor/logininfor/index.vue
View file @
ded99502
...
@@ -221,7 +221,7 @@ export default {
...
@@ -221,7 +221,7 @@ export default {
this
.
exportLoading
=
true
;
this
.
exportLoading
=
true
;
return
exportLogininfor
(
queryParams
);
return
exportLogininfor
(
queryParams
);
}).
then
(
response
=>
{
}).
then
(
response
=>
{
this
.
download
(
response
.
msg
);
this
.
$download
.
name
(
response
.
msg
);
this
.
exportLoading
=
false
;
this
.
exportLoading
=
false
;
}).
catch
(()
=>
{});
}).
catch
(()
=>
{});
}
}
...
...
ruoyi-ui/src/views/monitor/operlog/index.vue
View file @
ded99502
...
@@ -308,7 +308,7 @@ export default {
...
@@ -308,7 +308,7 @@ export default {
this
.
exportLoading
=
true
;
this
.
exportLoading
=
true
;
return
exportOperlog
(
queryParams
);
return
exportOperlog
(
queryParams
);
}).
then
(
response
=>
{
}).
then
(
response
=>
{
this
.
download
(
response
.
msg
);
this
.
$download
.
name
(
response
.
msg
);
this
.
exportLoading
=
false
;
this
.
exportLoading
=
false
;
}).
catch
(()
=>
{});
}).
catch
(()
=>
{});
}
}
...
...
ruoyi-ui/src/views/system/config/index.vue
View file @
ded99502
...
@@ -339,7 +339,7 @@ export default {
...
@@ -339,7 +339,7 @@ export default {
this
.
exportLoading
=
true
;
this
.
exportLoading
=
true
;
return
exportConfig
(
queryParams
);
return
exportConfig
(
queryParams
);
}).
then
(
response
=>
{
}).
then
(
response
=>
{
this
.
download
(
response
.
msg
);
this
.
$download
.
name
(
response
.
msg
);
this
.
exportLoading
=
false
;
this
.
exportLoading
=
false
;
}).
catch
(()
=>
{});
}).
catch
(()
=>
{});
},
},
...
...
ruoyi-ui/src/views/system/dict/data.vue
View file @
ded99502
...
@@ -385,7 +385,7 @@ export default {
...
@@ -385,7 +385,7 @@ export default {
this
.
exportLoading
=
true
;
this
.
exportLoading
=
true
;
return
exportData
(
queryParams
);
return
exportData
(
queryParams
);
}).
then
(
response
=>
{
}).
then
(
response
=>
{
this
.
download
(
response
.
msg
);
this
.
$download
.
name
(
response
.
msg
);
this
.
exportLoading
=
false
;
this
.
exportLoading
=
false
;
}).
catch
(()
=>
{});
}).
catch
(()
=>
{});
}
}
...
...
ruoyi-ui/src/views/system/dict/index.vue
View file @
ded99502
...
@@ -343,7 +343,7 @@ export default {
...
@@ -343,7 +343,7 @@ export default {
this
.
exportLoading
=
true
;
this
.
exportLoading
=
true
;
return
exportType
(
queryParams
);
return
exportType
(
queryParams
);
}).
then
(
response
=>
{
}).
then
(
response
=>
{
this
.
download
(
response
.
msg
);
this
.
$download
.
name
(
response
.
msg
);
this
.
exportLoading
=
false
;
this
.
exportLoading
=
false
;
}).
catch
(()
=>
{});
}).
catch
(()
=>
{});
},
},
...
...
ruoyi-ui/src/views/system/post/index.vue
View file @
ded99502
...
@@ -310,7 +310,7 @@ export default {
...
@@ -310,7 +310,7 @@ export default {
this
.
exportLoading
=
true
;
this
.
exportLoading
=
true
;
return
exportPost
(
queryParams
);
return
exportPost
(
queryParams
);
}).
then
(
response
=>
{
}).
then
(
response
=>
{
this
.
download
(
response
.
msg
);
this
.
$download
.
name
(
response
.
msg
);
this
.
exportLoading
=
false
;
this
.
exportLoading
=
false
;
}).
catch
(()
=>
{});
}).
catch
(()
=>
{});
}
}
...
...
ruoyi-ui/src/views/system/role/index.vue
View file @
ded99502
...
@@ -618,7 +618,7 @@ export default {
...
@@ -618,7 +618,7 @@ export default {
this
.
exportLoading
=
true
;
this
.
exportLoading
=
true
;
return
exportRole
(
queryParams
);
return
exportRole
(
queryParams
);
}).
then
(
response
=>
{
}).
then
(
response
=>
{
this
.
download
(
response
.
msg
);
this
.
$download
.
name
(
response
.
msg
);
this
.
exportLoading
=
false
;
this
.
exportLoading
=
false
;
}).
catch
(()
=>
{});
}).
catch
(()
=>
{});
}
}
...
...
ruoyi-ui/src/views/system/user/index.vue
View file @
ded99502
...
@@ -648,7 +648,7 @@ export default {
...
@@ -648,7 +648,7 @@ export default {
this
.
exportLoading
=
true
;
this
.
exportLoading
=
true
;
return
exportUser
(
queryParams
);
return
exportUser
(
queryParams
);
}).
then
(
response
=>
{
}).
then
(
response
=>
{
this
.
download
(
response
.
msg
);
this
.
$download
.
name
(
response
.
msg
);
this
.
exportLoading
=
false
;
this
.
exportLoading
=
false
;
}).
catch
(()
=>
{});
}).
catch
(()
=>
{});
},
},
...
@@ -660,7 +660,7 @@ export default {
...
@@ -660,7 +660,7 @@ export default {
/** 下载模板操作 */
/** 下载模板操作 */
importTemplate
()
{
importTemplate
()
{
importTemplate
().
then
(
response
=>
{
importTemplate
().
then
(
response
=>
{
this
.
download
(
response
.
msg
);
this
.
$download
.
name
(
response
.
msg
);
});
});
},
},
// 文件上传中处理
// 文件上传中处理
...
...
ruoyi-ui/src/views/tool/build/index.vue
View file @
ded99502
...
@@ -137,23 +137,13 @@
...
@@ -137,23 +137,13 @@
<
script
>
<
script
>
import
draggable
from
'
vuedraggable
'
import
draggable
from
'
vuedraggable
'
import
{
saveAs
}
from
'
file-saver
'
import
beautifier
from
'
js-beautify
'
import
beautifier
from
'
js-beautify
'
import
ClipboardJS
from
'
clipboard
'
import
ClipboardJS
from
'
clipboard
'
import
render
from
'
@/utils/generator/render
'
import
render
from
'
@/utils/generator/render
'
import
RightPanel
from
'
./RightPanel
'
import
RightPanel
from
'
./RightPanel
'
import
{
import
{
inputComponents
,
selectComponents
,
layoutComponents
,
formConf
}
from
'
@/utils/generator/config
'
inputComponents
,
import
{
beautifierConf
,
titleCase
}
from
'
@/utils/index
'
selectComponents
,
import
{
makeUpHtml
,
vueTemplate
,
vueScript
,
cssStyle
}
from
'
@/utils/generator/html
'
layoutComponents
,
formConf
}
from
'
@/utils/generator/config
'
import
{
exportDefault
,
beautifierConf
,
isNumberStr
,
titleCase
}
from
'
@/utils/index
'
import
{
makeUpHtml
,
vueTemplate
,
vueScript
,
cssStyle
}
from
'
@/utils/generator/html
'
import
{
makeUpJs
}
from
'
@/utils/generator/js
'
import
{
makeUpJs
}
from
'
@/utils/generator/js
'
import
{
makeUpCss
}
from
'
@/utils/generator/css
'
import
{
makeUpCss
}
from
'
@/utils/generator/css
'
import
drawingDefalut
from
'
@/utils/generator/drawingDefalut
'
import
drawingDefalut
from
'
@/utils/generator/drawingDefalut
'
...
@@ -161,7 +151,6 @@ import logo from '@/assets/logo/logo.png'
...
@@ -161,7 +151,6 @@ import logo from '@/assets/logo/logo.png'
import
CodeTypeDialog
from
'
./CodeTypeDialog
'
import
CodeTypeDialog
from
'
./CodeTypeDialog
'
import
DraggableItem
from
'
./DraggableItem
'
import
DraggableItem
from
'
./DraggableItem
'
const
emptyActiveData
=
{
style
:
{},
autosize
:
{}
}
let
oldActiveId
let
oldActiveId
let
tempActiveData
let
tempActiveData
...
@@ -287,7 +276,7 @@ export default {
...
@@ -287,7 +276,7 @@ export default {
execDownload
(
data
)
{
execDownload
(
data
)
{
const
codeStr
=
this
.
generateCode
()
const
codeStr
=
this
.
generateCode
()
const
blob
=
new
Blob
([
codeStr
],
{
type
:
'
text/plain;charset=utf-8
'
})
const
blob
=
new
Blob
([
codeStr
],
{
type
:
'
text/plain;charset=utf-8
'
})
saveAs
(
blob
,
data
.
fileName
)
this
.
$download
.
saveAs
(
blob
,
data
.
fileName
)
},
},
execCopy
(
data
)
{
execCopy
(
data
)
{
document
.
getElementById
(
'
copyNode
'
).
click
()
document
.
getElementById
(
'
copyNode
'
).
click
()
...
...
ruoyi-ui/src/views/tool/gen/index.vue
View file @
ded99502
...
@@ -180,7 +180,6 @@
...
@@ -180,7 +180,6 @@
<
script
>
<
script
>
import
{
listTable
,
previewTable
,
delTable
,
genCode
,
synchDb
}
from
"
@/api/tool/gen
"
;
import
{
listTable
,
previewTable
,
delTable
,
genCode
,
synchDb
}
from
"
@/api/tool/gen
"
;
import
importTable
from
"
./importTable
"
;
import
importTable
from
"
./importTable
"
;
import
{
downLoadZip
}
from
"
@/utils/zipdownload
"
;
import
hljs
from
"
highlight.js/lib/highlight
"
;
import
hljs
from
"
highlight.js/lib/highlight
"
;
import
"
highlight.js/styles/github-gist.css
"
;
import
"
highlight.js/styles/github-gist.css
"
;
hljs
.
registerLanguage
(
"
java
"
,
require
(
"
highlight.js/lib/languages/java
"
));
hljs
.
registerLanguage
(
"
java
"
,
require
(
"
highlight.js/lib/languages/java
"
));
...
@@ -270,7 +269,7 @@ export default {
...
@@ -270,7 +269,7 @@ export default {
this
.
$modal
.
msgSuccess
(
"
成功生成到自定义路径:
"
+
row
.
genPath
);
this
.
$modal
.
msgSuccess
(
"
成功生成到自定义路径:
"
+
row
.
genPath
);
});
});
}
else
{
}
else
{
downLoadZ
ip
(
"
/tool/gen/batchGenCode?tables=
"
+
tableNames
,
"
ruoyi
"
);
this
.
$download
.
z
ip
(
"
/tool/gen/batchGenCode?tables=
"
+
tableNames
,
"
ruoyi
"
);
}
}
},
},
/** 同步数据库操作 */
/** 同步数据库操作 */
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment