Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
zghywpc-vue
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
李苏
zghywpc-vue
Commits
f4536a39
Commit
f4536a39
authored
Jan 09, 2025
by
李苏
💬
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
模板下载
parent
d5184d0e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
3 deletions
+21
-3
edit.vue
src/views/ywxxgl/jdlcdxgsjs/edit.vue
+19
-1
index.vue
src/views/ywxxgl/jdlcdxgsjs/index.vue
+2
-2
No files found.
src/views/ywxxgl/jdlcdxgsjs/edit.vue
View file @
f4536a39
...
...
@@ -3,7 +3,7 @@
* @Author: lisu lisu@gavelinfo.com
* @Date: 2024-09-19 10:47:46
* @LastEditors: lisu lisu@gavelinfo.com
* @LastEditTime: 2025-01-09 1
4:48:45
* @LastEditTime: 2025-01-09 1
5:35:27
* @FilePath: /zghywpc-vue/src/views/ywxxgl/jdlcdxgsjs/edit.vue
-->
<
template
>
...
...
@@ -11,6 +11,9 @@
<BaseEdit
ref=
'baseEdit'
@
getForm=
'getForm'
:attachments=
'attachments'
v-bind=
"$attrs"
:config=
'editConfig'
>
<template
#
form=
"ctx"
>
<!-- 嵌入默认页面额外弹框的插槽 ctx.editPage来操作默认页面 -->
<el-form-item
label=
"附件模板"
>
<el-button
@
click=
"downLoadMb"
size=
"small"
type=
"primary"
>
下载模板
</el-button>
</el-form-item>
<el-form-item
label=
"上传附件"
>
<UploadTmp
@
getUploadFile=
'getUploadFile'
@
getList=
'uploadGetList'
/>
</el-form-item>
...
...
@@ -36,6 +39,7 @@
<
script
>
import
*
as
XLSX
from
'xlsx'
;
const
baseurl
=
process
.
env
.
VUE_APP_BASE_API
export
default
{
computed
:
{
attachments
()
{
...
...
@@ -183,6 +187,20 @@
},
methods
:
{
downLoadMb
(){
let
url
=
"ywxxgl/ujdlcdxgsjs/import/template/download"
let
userToken
=
null
this
.
$post
(
'/userToken'
,{}).
then
(
res
=>
{
userToken
=
res
.
data
.
userToken
let
a
=
document
.
createElement
(
'a'
)
a
.
style
.
display
=
'none'
;
a
.
target
=
'_blank'
a
.
href
=
`
${
baseurl
}
/
${
url
}
?userToken=
${
userToken
}
`
document
.
body
.
appendChild
(
a
)
a
.
click
()
document
.
body
.
removeChild
(
a
)
})
},
readExcelFile
(
file
)
{
return
new
Promise
((
resolve
,
reject
)
=>
{
const
reader
=
new
FileReader
();
...
...
src/views/ywxxgl/jdlcdxgsjs/index.vue
View file @
f4536a39
...
...
@@ -3,7 +3,7 @@
* @Author: lisu lisu@gavelinfo.com
* @Date: 2024-09-19 10:55:27
* @LastEditors: lisu lisu@gavelinfo.com
* @LastEditTime: 2025-01-09 1
4:49:10
* @LastEditTime: 2025-01-09 1
5:35:42
* @FilePath: /zghywpc-vue/src/views/ywxxgl/jdlcdxgsjs/index.vue
-->
<
template
>
...
...
@@ -14,7 +14,7 @@
<
template
#
toolbar=
"ctx"
>
<!-- 嵌入默认页面工具栏的插槽 ctx.pagePage来操作默认页面 -->
<!--
<el-button
@
click=
"demo(ctx.basePage)"
size=
'mini'
type=
"primary"
>
示例按钮
</el-button>
-->
<ImportButton
@
success=
"()=>
{ctx.basePage.refresh()}" :url="'ywxxgl/ujdlcdxgsjs/import'" /
>
<!--
<ImportButton
@
success=
"()=>
{ctx.basePage.refresh()}" :url="'ywxxgl/ujdlcdxgsjs/import'" /> --
>
</
template
>
</BasePage>
...
...
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