Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
sample-form-platform
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
赵啸非
sample-form-platform
Commits
d2ce01dc
Commit
d2ce01dc
authored
Dec 14, 2022
by
“yiyousong”
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
pref:修改样表上传
parent
9719dba9
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
85 deletions
+12
-85
sample-form-manager-ui/admin/src/App.vue
sample-form-manager-ui/admin/src/App.vue
+1
-1
sample-form-manager-ui/admin/src/pages/software/materials/modal/AddMaterials.vue
...admin/src/pages/software/materials/modal/AddMaterials.vue
+11
-84
No files found.
sample-form-manager-ui/admin/src/App.vue
View file @
d2ce01dc
...
@@ -35,7 +35,7 @@ export default {
...
@@ -35,7 +35,7 @@ export default {
<
style
lang=
"less"
scoped
>
<
style
lang=
"less"
scoped
>
.app {
.app {
width: 1
920px
;
width: 1
00%
;
min-height: 100%;
min-height: 100%;
background-color: #f0f2f5;
background-color: #f0f2f5;
display: flex;
display: flex;
...
...
sample-form-manager-ui/admin/src/pages/software/materials/modal/AddMaterials.vue
View file @
d2ce01dc
...
@@ -38,51 +38,18 @@
...
@@ -38,51 +38,18 @@
>
>
</el-switch>
</el-switch>
</el-form-item>
</el-form-item>
<!--
<el-form-item
label=
"上传附件"
prop=
"fileUrl"
>
<el-upload
class=
"upload-demo"
:action=
"api + 'sampleform/file/commonupload'"
:on-remove=
"handleRemoveFileUrl"
:limit=
"1"
:file-list=
"fileUrlFileList"
:on-success=
"OnsuccessfileUrl"
:headers=
"headers"
:before-upload=
"beforeUpload"
accept=
"application/msword,application/vnd.openxmlformats-officedocument.wordprocessingml.document"
>
<el-button
size=
"small"
type=
"primary"
>
上传Word文件
</el-button>
</el-upload>
</el-form-item>
<el-form-item
label=
"上传模板"
prop=
"templatePath"
>
<el-upload
class=
"upload-demo"
:action=
"api + 'sampleform/file/commonupload'"
:on-remove=
"handleRemoveTemplatePath"
:limit=
"1"
:file-list=
"templatePathFileList"
:on-success=
"OnsuccesstemplatePath"
:headers=
"headers"
:before-upload=
"beforeUpload"
accept=
"application/msword,application/vnd.openxmlformats-officedocument.wordprocessingml.document"
>
<el-button
size=
"small"
type=
"primary"
>
上传Word文件
</el-button>
</el-upload>
</el-form-item>
-->
<el-form-item
label=
"上传样表"
prop=
"samplePath"
>
<el-form-item
label=
"上传样表"
prop=
"samplePath"
>
<el-upload
<el-upload
class=
"upload-demo"
class=
"upload-demo"
:action=
"api + 'sampleform/file/commonupload'"
:action=
"api + 'sampleform/file/commonupload'"
:on-remove=
"handleRemoveSamplePath"
:on-remove=
"handleRemoveSamplePath"
:limit=
"1"
:file-list=
"samplePathFileList"
:file-list=
"samplePathFileList"
:on-success=
"OnsuccessSamplePath"
:on-success=
"OnsuccessSamplePath"
:headers=
"headers"
:headers=
"headers"
:before-upload=
"beforeUpload"
accept=
"application/vnd.openxmlformats-officedocument.wordprocessingml.document"
>
>
<el-button
size=
"small"
type=
"primary"
>
上传Word文件
</el-button>
<!-- accept="application/vnd.openxmlformats-officedocument.wordprocessingml.document" -->
<span
class=
"tips"
>
提示:请上传.docx格式
</span>
<el-button
size=
"small"
type=
"primary"
>
上传文件
</el-button>
<!--
<span
class=
"tips"
>
提示:请上传.docx格式
</span>
-->
</el-upload>
</el-upload>
</el-form-item>
</el-form-item>
</el-form>
</el-form>
...
@@ -128,19 +95,17 @@ export default {
...
@@ -128,19 +95,17 @@ export default {
?
local
.
getLocal
(
"
sampleSiteId
"
)
?
local
.
getLocal
(
"
sampleSiteId
"
)
:
""
,
:
""
,
matterNo
:
""
,
// 事项编号
matterNo
:
""
,
// 事项编号
fileName
:
""
,
// 附件名称
//
fileName: "", // 附件名称
fileUrl
:
""
,
// 附件地址
//
fileUrl: "", // 附件地址
samplePath
:
""
,
// 样表地址
samplePath
:
""
,
// 样表地址
sampleName
:
""
,
// 样表名称
sampleName
:
""
,
// 样表名称
templatePath
:
""
,
// 模板地址
//
templatePath: "", // 模板地址
templateName
:
""
,
// 模板名称
//
templateName: "", // 模板名称
matterName
:
""
,
// 事项名称
matterName
:
""
,
// 事项名称
deptName
:
""
,
// 部门名称
deptName
:
""
,
// 部门名称
deptId
:
""
,
// 部门id
deptId
:
""
,
// 部门id
deptCode
:
""
,
// 部门编码
deptCode
:
""
,
// 部门编码
},
},
fileUrlFileList
:
[],
templatePathFileList
:
[],
samplePathFileList
:
[],
samplePathFileList
:
[],
loading
:
false
,
loading
:
false
,
rules
:
{
rules
:
{
...
@@ -183,13 +148,11 @@ export default {
...
@@ -183,13 +148,11 @@ export default {
this
.
loading
=
true
;
this
.
loading
=
true
;
let
res
=
await
saveMaterials
(
this
.
form
);
let
res
=
await
saveMaterials
(
this
.
form
);
let
{
code
,
msg
}
=
res
.
data
;
let
{
code
,
msg
}
=
res
.
data
;
this
.
loading
=
false
;
if
(
code
===
1
)
{
if
(
code
===
1
)
{
this
.
$message
.
success
(
msg
);
this
.
$message
.
success
(
msg
);
this
.
$emit
(
"
addSuccess
"
);
this
.
$emit
(
"
addSuccess
"
);
this
.
loading
=
false
;
this
.
handleClose
();
this
.
handleClose
();
}
else
{
this
.
loading
=
false
;
}
}
}
}
});
});
...
@@ -204,23 +167,10 @@ export default {
...
@@ -204,23 +167,10 @@ export default {
this
.
form
.
deptName
=
row
.
deptName
;
this
.
form
.
deptName
=
row
.
deptName
;
this
.
form
.
deptId
=
row
.
deptId
;
this
.
form
.
deptId
=
row
.
deptId
;
this
.
form
.
deptCode
=
row
.
deptCode
;
this
.
form
.
deptCode
=
row
.
deptCode
;
console
.
log
(
row
);
},
},
// 编辑
// 编辑
onEdit
(
row
)
{
onEdit
(
row
)
{
this
.
form
=
{
...
row
};
this
.
form
=
{
...
row
};
this
.
fileUrlFileList
=
[
{
name
:
this
.
form
.
fileName
,
url
:
this
.
form
.
fileUrl
,
},
];
this
.
templatePathFileList
=
[
{
name
:
this
.
form
.
templateName
,
url
:
this
.
form
.
templatePath
,
},
];
this
.
samplePathFileList
=
[
this
.
samplePathFileList
=
[
{
{
name
:
this
.
form
.
sampleName
,
name
:
this
.
form
.
sampleName
,
...
@@ -231,7 +181,7 @@ export default {
...
@@ -231,7 +181,7 @@ export default {
// 重置
// 重置
handleRest
()
{
handleRest
()
{
this
.
$refs
.
form
.
resetFields
();
this
.
$refs
.
form
.
resetFields
();
this
.
f
ileList
=
[];
this
.
samplePathF
ileList
=
[];
},
},
// 关闭
// 关闭
handleClose
()
{
handleClose
()
{
...
@@ -241,35 +191,12 @@ export default {
...
@@ -241,35 +191,12 @@ export default {
this
.
samplePathFileList
=
[];
this
.
samplePathFileList
=
[];
this
.
Visible
=
false
;
this
.
Visible
=
false
;
},
},
// 上传之前
beforeUpload
(
file
)
{
console
.
log
(
file
);
},
// 上传附件
OnsuccessfileUrl
(
response
)
{
this
.
form
.
fileUrl
=
response
.
url
;
this
.
form
.
fileName
=
response
.
fileName
;
},
// 上传模板
OnsuccesstemplatePath
(
response
)
{
this
.
form
.
templatePath
=
response
.
url
;
this
.
form
.
templateName
=
response
.
fileName
;
},
// 上传样表
// 上传样表
OnsuccessSamplePath
(
response
)
{
OnsuccessSamplePath
(
response
,
file
,
fileList
)
{
this
.
samplePathFileList
=
fileList
.
slice
(
-
1
);
this
.
form
.
samplePath
=
response
.
url
;
this
.
form
.
samplePath
=
response
.
url
;
this
.
form
.
sampleName
=
response
.
fileName
;
this
.
form
.
sampleName
=
response
.
fileName
;
},
},
// 删除附件
handleRemoveFileUrl
()
{
this
.
form
.
fileUrl
=
""
;
this
.
form
.
fileName
=
""
;
},
// 删除模板
handleRemoveTemplatePath
()
{
this
.
form
.
templatePath
=
""
;
this
.
form
.
templateName
=
""
;
},
// 删除样表
// 删除样表
handleRemoveSamplePath
()
{
handleRemoveSamplePath
()
{
this
.
form
.
samplePath
=
""
;
this
.
form
.
samplePath
=
""
;
...
...
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