Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
template_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
杨硕
template_vue
Commits
04ea2982
Commit
04ea2982
authored
Aug 10, 2023
by
CenXinYi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 新增六个导出功能
Signed-off-by:
CenXinYi
<
2810162984@qq.com
>
parent
744c33ed
Changes
10
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
70 additions
and
444 deletions
+70
-444
basicInfo.js
src/api/equipment/basicInfo.js
+10
-0
magnagement.js
src/api/magnagement.js
+2
-1
basicInformation.js
src/api/sample/basicInformation.js
+1
-2
basicInfo.vue
src/views/equipment/basicInfo.vue
+34
-1
management.vue
src/views/equipment/management.vue
+1
-1
index.vue
src/views/processManagement/basicProcessManagement/index.vue
+1
-1
simulateProcessList.json
...ocessManagement/simulateDataList/simulateProcessList.json
+0
-419
index.vue
src/views/processManagement/equipmentRequisition/index.vue
+1
-1
index.vue
src/views/sample/basicInformation/index.vue
+1
-1
index.vue
src/views/sample/inventoryRecord/index.vue
+19
-17
No files found.
src/api/equipment/basicInfo.js
View file @
04ea2982
...
...
@@ -54,3 +54,13 @@ export function getDictData(params) {
})
}
// TODO: 导出
export
function
exportBasicInfo
(
params
)
{
return
request
({
url
:
'/wbbaseinfo/export'
,
method
:
'get'
,
params
,
responseType
:
'blob'
})
}
src/api/magnagement.js
View file @
04ea2982
...
...
@@ -53,10 +53,11 @@ export function deletedevice(id) {
})
}
// 导出
export
function
exportdevice
()
{
export
function
exportdevice
(
query
)
{
return
request
({
url
:
'/wbwarehouse/export'
,
method
:
'get'
,
params
:
query
,
responseType
:
'blob'
})
}
src/api/sample/basicInformation.js
View file @
04ea2982
...
...
@@ -47,11 +47,10 @@ export function deleteLogical(id) {
})
}
// 导出信息接口
export
function
exporTable
(
param
)
{
export
function
exporTable
()
{
return
request
({
url
:
'/wbchemistrybaseinfo/export'
,
method
:
'get'
,
param
,
responseType
:
'blob'
})
}
src/views/equipment/basicInfo.vue
View file @
04ea2982
...
...
@@ -49,6 +49,13 @@
icon=
"el-icon-plus"
@
click=
"handleAdd"
>
新增
</el-button>
<el-button
style=
"padding: 8px 7px;"
type=
"success"
size=
"small"
icon=
"el-icon-download"
@
click=
"handleExport"
>
导出
</el-button>
</div>
</el-form>
<div
class=
"placeholder"
/>
...
...
@@ -201,7 +208,7 @@
</template>
<
script
>
import
{
add
,
listBasicInfo
,
updataInfo
,
getDetailById
,
deleteLogical
}
from
'@/api/equipment/basicInfo'
import
{
add
,
listBasicInfo
,
updataInfo
,
getDetailById
,
deleteLogical
,
exportBasicInfo
}
from
'@/api/equipment/basicInfo'
import
{
parseTime
}
from
'@/utils'
import
{
getDictData
}
from
'@/api/equipment/application'
export
default
{
...
...
@@ -501,6 +508,32 @@ export default {
this
.
pgxList
=
res
.
data
}
})
},
/** 导出按钮操作 */
handleExport
()
{
this
.
$confirm
(
'是否确认导出工序库信息?'
,
'警告'
,
{
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
}).
then
(
function
()
{
return
exportBasicInfo
({
ptype
:
'2'
}).
then
(
response
=>
{
const
blob
=
new
Blob
([
response
])
const
downloadElement
=
document
.
createElement
(
'a'
)
// TODO: 创建下载的链接
const
href
=
window
.
URL
.
createObjectURL
(
blob
)
downloadElement
.
href
=
href
// TODO: 下载后文件名
downloadElement
.
download
=
'设备库基本信息'
+
'.xls'
document
.
body
.
appendChild
(
downloadElement
)
// TODO: 点击下载
downloadElement
.
click
()
// TODO: 下载完成移除元素
document
.
body
.
removeChild
(
downloadElement
)
// TODO: 释放掉blob对象
window
.
URL
.
revokeObjectURL
(
href
)
// this.download(response.msg);
})
})
}
}
}
...
...
src/views/equipment/management.vue
View file @
04ea2982
...
...
@@ -647,7 +647,7 @@ export default {
cancelButtonText
:
'取消'
,
type
:
'warning'
}).
then
(
function
()
{
return
exportdevice
().
then
(
response
=>
{
return
exportdevice
(
{
ptype
:
1
}
).
then
(
response
=>
{
const
blob
=
new
Blob
([
response
])
const
downloadElement
=
document
.
createElement
(
'a'
)
// TODO: 创建下载的链接
...
...
src/views/processManagement/basicProcessManagement/index.vue
View file @
04ea2982
...
...
@@ -704,7 +704,7 @@ export default {
cancelButtonText
:
'取消'
,
type
:
'warning'
}).
then
(
function
()
{
return
exportdevice
().
then
(
response
=>
{
return
exportdevice
(
{
ptype
:
'2'
}
).
then
(
response
=>
{
const
blob
=
new
Blob
([
response
])
const
downloadElement
=
document
.
createElement
(
'a'
)
// TODO: 创建下载的链接
...
...
src/views/processManagement/basicProcessManagement/simulateDataList/simulateProcessList.json
deleted
100644 → 0
View file @
744c33ed
This diff is collapsed.
Click to expand it.
src/views/processManagement/equipmentRequisition/index.vue
View file @
04ea2982
...
...
@@ -107,7 +107,7 @@
import
BaseTable
from
'@/components/Table/BaseTable/index.vue'
// TODO: 通过json的形式,优化导入模拟数据,并增加模拟数据的数量
const
simulateDataList
=
require
(
'../
basicProcessManagement
/simulateDataList/simulateProcessList.json'
)
const
simulateDataList
=
require
(
'../
equipmentRequisition
/simulateDataList/simulateProcessList.json'
)
export
default
{
name
:
'Role'
,
components
:
{
BaseTable
},
...
...
src/views/sample/basicInformation/index.vue
View file @
04ea2982
...
...
@@ -320,7 +320,7 @@ export default {
cancelButtonText
:
'取消'
,
type
:
'warning'
}
).
then
(
function
()
{
return
exporTable
(
this
.
queryParams
).
then
(
response
=>
{
return
exporTable
().
then
(
response
=>
{
const
blob
=
new
Blob
([
response
])
const
downloadElement
=
document
.
createElement
(
'a'
)
// TODO: 创建下载的链接
...
...
src/views/sample/inventoryRecord/index.vue
View file @
04ea2982
...
...
@@ -63,17 +63,19 @@
</el-form-item>
<!--TODO: 导出和盘点按钮所在 -->
<el-row
:gutter=
"10"
class=
"mb8"
justify=
"start"
>
<el-col
:span=
"1.5"
>
<el-button
type=
"success"
size=
"small"
icon=
"el-icon-download"
@
click=
"handleExport"
>
导出
</el-button>
</el-col>
</el-row>
<div
style=
"float: right; padding:3px 15px;"
>
<el-row
:gutter=
"10"
>
<el-col
:span=
"1.5"
>
<el-button
type=
"success"
size=
"small"
icon=
"el-icon-download"
@
click=
"handleExport"
>
导出
</el-button>
</el-col>
</el-row>
</div>
</el-form>
</div>
...
...
@@ -115,13 +117,13 @@
<el-row
:gutter=
"10"
justify=
"start"
align=
"middle"
>
<el-col
:span=
"12"
>
<el-form-item
label=
"pn:"
prop=
"pn"
>
<el-input
v-model
.
trim=
"singleDetails.pn"
:readonly=
"isReadOnly"
ref=
"input1
"
@
keyup
.
enter
.
native=
"handelTab(1,$event)"
/>
<el-input
ref=
"input1"
v-model
.
trim=
"singleDetails.pn"
:readonly=
"isReadOnly
"
@
keyup
.
enter
.
native=
"handelTab(1,$event)"
/>
</el-form-item>
<el-form-item
label=
"lot:"
prop=
"lot"
>
<el-input
v-model
.
trim=
"singleDetails.lot"
:readonly=
"isReadOnly"
ref=
"input2
"
@
keyup
.
enter
.
native=
"handelTab(2,$event)"
/>
<el-input
ref=
"input2"
v-model
.
trim=
"singleDetails.lot"
:readonly=
"isReadOnly
"
@
keyup
.
enter
.
native=
"handelTab(2,$event)"
/>
</el-form-item>
<el-form-item
label=
"unit:"
prop=
"unit"
>
<el-input
v-model
.
trim=
"singleDetails.unit"
:readonly=
"isReadOnly"
ref=
"input3
"
@
keyup
.
enter
.
native=
"handelTab(3,$event)"
/>
<el-input
ref=
"input3"
v-model
.
trim=
"singleDetails.unit"
:readonly=
"isReadOnly
"
@
keyup
.
enter
.
native=
"handelTab(3,$event)"
/>
</el-form-item>
</el-col>
...
...
@@ -133,7 +135,7 @@
{{
singleDetails
.
qty
}}
</el-form-item>
<el-form-item
label=
"memo:"
prop=
"memo"
>
<el-input
v-model
.
trim=
"singleDetails.memo"
:readonly=
"isReadOnly"
ref=
"input4
"
@
keyup
.
enter
.
native=
"handelTab(4,$event)"
/>
<el-input
ref=
"input4"
v-model
.
trim=
"singleDetails.memo"
:readonly=
"isReadOnly
"
@
keyup
.
enter
.
native=
"handelTab(4,$event)"
/>
</el-form-item>
</el-col>
</el-row>
...
...
@@ -141,13 +143,13 @@
<el-row>
<el-col
:span=
"12"
>
<el-form-item
label=
"操作员:"
prop=
"userName"
>
<el-input
v-model
.
trim=
"singleDetails.userName"
:readonly=
"isReadOnly"
ref=
"input5
"
@
keyup
.
enter
.
native=
"handelTab(5,$event)"
/>
<el-input
ref=
"input5"
v-model
.
trim=
"singleDetails.userName"
:readonly=
"isReadOnly
"
@
keyup
.
enter
.
native=
"handelTab(5,$event)"
/>
</el-form-item>
</el-col>
<el-col
:span=
"12"
>
<el-form-item
label=
"操作时间:"
prop=
"createDate"
>
<el-input
v-model
.
trim=
"singleDetails.createDate"
:readonly=
"isReadOnly"
ref=
"input6
"
@
keyup
.
enter
.
native=
"handelTab(6,$event)"
/>
<el-input
ref=
"input6"
v-model
.
trim=
"singleDetails.createDate"
:readonly=
"isReadOnly
"
@
keyup
.
enter
.
native=
"handelTab(6,$event)"
/>
</el-form-item>
</el-col>
</el-row>
...
...
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