Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mes-ui
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
周远喜
mes-ui
Commits
b74de5ba
Commit
b74de5ba
authored
Aug 27, 2020
by
renjintao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
listLength
parent
4627c6ac
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
10 deletions
+10
-10
detailExcel.vue
pages/import/detailExcel.vue
+2
-8
process.vue
pages/import/process.vue
+8
-2
No files found.
pages/import/detailExcel.vue
View file @
b74de5ba
...
...
@@ -75,10 +75,7 @@ export default {
handleSuccess
(
tableData
)
{
//初始化数据
this
.
excelData
=
[];
this
.
excelDataBack
=
[];
this
.
columnsImport
=
[];
this
.
sheetNames
=
[];
this
.
pageType
=
undefined
;
//处理colum和data
let
tabColum
=
tableData
.
columns
let
tabData
=
tableData
.
data
...
...
@@ -96,7 +93,7 @@ export default {
})
this
.
columnsImport
=
tabColum
;
this
.
excelData
=
arrData
;
this
.
excelDataBack
=
arrData
;
this
.
$emit
(
"on-datalength"
,
this
.
excelData
.
length
)
},
//粘贴excel失败
handleError
(
tableData
,
errorIndex
)
{
...
...
@@ -104,10 +101,7 @@ export default {
this
.
$Message
.
error
(
"表格数据有误"
);
},
//粘贴excel相关end
l
(
key
)
{
key
=
"import_center"
+
"."
+
key
;
return
this
.
$t
(
key
);
},
},
watch
:
{
eid
(
v
)
{
...
...
pages/import/process.vue
View file @
b74de5ba
...
...
@@ -10,7 +10,7 @@
<dictionary
code=
"import.im.page"
style=
"width:160px"
@
on-change=
"pageChange"
v-model=
"pageType"
></dictionary>
</FormItem>
<FormItem>
<div
class=
"tip mr20"
>
共
{{
excelData
.
l
ength
}}
条数据
</div>
<div
class=
"tip mr20"
>
共
{{
listL
ength
}}
条数据
</div>
</FormItem>
<FormItem>
<Button
type=
"primary"
@
click=
"openInfoModal"
:disabled=
"btnIm"
>
导入
</Button>
...
...
@@ -52,7 +52,7 @@
</div>
<div
class=
"table-main"
ref=
"main"
>
<Table
:border=
"true"
:columns=
"columnsImport"
:data=
"excelData"
:height=
"tdHeightExcel"
ref=
"table"
class=
"tableCommon"
v-if=
"tableImport"
></Table>
<component
:is=
"detailExcel"
ref=
"comExcel"
/>
<component
:is=
"detailExcel"
ref=
"comExcel"
@
on-datalength=
"datalength"
/>
</div>
<FooterToolbar
v-if=
"sheetNames.length>1&&tableImport"
>
<Form
inline
>
...
...
@@ -338,6 +338,7 @@ export default {
dataIm
:
[],
excelType
:
'0'
,
btnIm
:
true
,
listLength
:
0
,
};
},
props
:
{
...
...
@@ -395,6 +396,7 @@ export default {
dealOpenTable
(
val
)
{
this
.
excelData
=
this
.
openDatas
[
val
].
dataTable
;
this
.
excelDataBack
=
this
.
openDatas
[
val
].
dataTable
;
this
.
listLength
=
this
.
excelData
.
length
var
tempCos
=
Object
.
keys
(
this
.
openDatas
[
val
].
dataTable
[
0
]);
//获取列表标题
this
.
columnsImport
=
[];
var
headersNow
=
[];
...
...
@@ -690,9 +692,13 @@ export default {
this
.
tableImport
=
true
;
this
.
pageType
=
undefined
this
.
excelType
=
'0'
;
this
.
listLength
=
this
.
excelData
.
length
;
}
},
datalength
(
val
)
{
this
.
listLength
=
val
},
l
(
key
)
{
key
=
"user"
+
"."
+
key
;
return
this
.
$t
(
key
);
...
...
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