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
b543d5d8
Commit
b543d5d8
authored
Aug 27, 2020
by
renjintao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
智能排产
parent
0219e91a
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
679 additions
and
541 deletions
+679
-541
index.vue
pages/aps/ai/index.vue
+558
-534
detailExcel.vue
pages/import/detailExcel.vue
+93
-0
process.vue
pages/import/process.vue
+28
-7
No files found.
pages/aps/ai/index.vue
View file @
b543d5d8
This diff is collapsed.
Click to expand it.
pages/import/detailExcel.vue
0 → 100644
View file @
b543d5d8
<
template
>
<div
class=
"h100"
>
<Tabs
type=
"card"
width=
"100"
>
<TabPane
label=
"excel数据"
>
<TablePaste
hide-table
:input-props=
"inputProps"
@
on-success=
"handleSuccess"
@
on-error=
"handleError"
/>
</TabPane>
<TabPane
label=
"预览"
>
<Table
border=
"true"
:columns=
"columnsImport"
:data=
"excelData"
:height=
"tableHeight"
ref=
"tableExcel"
class=
"tableCommon"
></Table>
</TabPane>
</Tabs>
</div>
</
template
>
<
script
>
import
Api
from
"./api"
;
export
default
{
name
:
"detailExcel"
,
data
()
{
return
{
entity
:
{},
downUrl
:
fileUrlDown
,
fileUrlPath
:
""
,
excelRows
:
100
,
tableHeight
:
''
,
inputProps
:
{
rows
:
10
,
placeholder
:
"请从Excel复制一段表格数据,粘贴在这里"
,
},
};
},
props
:
{
eid
:
Number
,
},
created
()
{
this
.
excelRows
=
parseInt
((
window
.
innerHeight
-
231
)
/
21
)
+
1
;
this
.
inputProps
.
rows
=
this
.
excelRows
this
.
tableHeight
=
window
.
innerHeight
-
200
},
mounted
()
{
window
.
onresize
=
()
=>
{
///浏览器窗口大小变化
return
(()
=>
{
window
.
screenHeight
=
window
.
innerHeight
;
this
.
excelRows
=
parseInt
((
window
.
screenHeight
-
231
)
/
21
)
+
1
;
this
.
inputProps
.
rows
=
this
.
excelRows
this
.
tableHeight
=
window
.
innerHeight
-
200
})();
};
},
methods
:
{
load
(
v
)
{
Api
.
get
({
id
:
v
,
}).
then
((
r
)
=>
{
this
.
entity
=
r
.
result
;
this
.
$emit
(
"on-load"
);
});
},
handleClose
()
{
this
.
$emit
(
"on-close"
);
},
downFile
(
path
)
{
//alert(path)
let
truePath
=
path
;
if
(
truePath
.
length
>
2
)
{
if
(
truePath
.
substring
(
0
,
7
).
toLowerCase
()
==
"http://"
||
truePath
.
substring
(
0
,
8
).
toLowerCase
()
==
"https://"
)
{
window
.
open
(
truePath
,
"_blank"
);
}
else
{
this
.
fileUrlPath
=
this
.
downUrl
+
path
;
window
.
open
(
this
.
fileUrlPath
,
"_blank"
);
}
}
},
l
(
key
)
{
key
=
"import_center"
+
"."
+
key
;
return
this
.
$t
(
key
);
},
},
watch
:
{
eid
(
v
)
{
if
(
v
>
0
)
{
this
.
load
(
v
);
}
},
},
};
</
script
>
pages/import/process.vue
View file @
b543d5d8
...
@@ -29,28 +29,37 @@
...
@@ -29,28 +29,37 @@
<div
class=
"btns"
>
<div
class=
"btns"
>
<Form
inline
>
<Form
inline
>
<FormItem>
<FormItem>
原文件:
<a
@
click=
"downFile"
>
{{
entity
.
file
}}
</a>
<a
@
click=
"downFile"
>
<Icon
type=
"md-download"
/>
{{
entity
.
file
}}
</a>
</FormItem>
</FormItem>
<FormItem>
<FormItem>
<a
class=
"ml10 mr10"
@
click=
"resetTable"
>
刷新
</a>
<a
class=
"ml10 mr10"
@
click=
"resetTable"
>
<Icon
type=
"md-eye"
/>
预览
</a>
</FormItem>
</FormItem>
<FormItem
v-if=
"show"
>
<FormItem
v-if=
"show"
>
<Button
@
click=
"openPaste"
:type=
"btnType"
:ghost=
"ghostStatus"
>
{{
btnTxt
}}
</Button>
<Button
@
click=
"openPaste"
:type=
"btnType"
:ghost=
"ghostStatus"
>
{{
btnTxt
}}
</Button>
</FormItem>
</FormItem>
<FormItem>
<FormItem>
<RadioGroup
value=
"large"
type=
"button"
>
<RadioGroup
value=
"0"
type=
"button"
@
on-change=
"changeExcel"
>
<Radio
label=
"large"
>
数据列表
</Radio>
<Radio
label=
"0"
>
<Radio
label=
"default"
>
粘贴Excel
</Radio>
<Icon
type=
"md-list"
/>
列表
</Radio>
<Radio
label=
"1"
>
<Icon
type=
"md-clipboard"
/>
Excel
</Radio>
</RadioGroup>
</RadioGroup>
</FormItem>
</FormItem>
</Form>
</Form>
</div>
</div>
</div>
</div>
<div
class=
"table-main"
ref=
"main"
>
<div
class=
"table-main"
ref=
"main"
>
<Table
border=
"true"
:columns=
"columnsImport"
:data=
"excelData"
:height=
"tdHeightExcel"
ref=
"table"
class=
"tableCommon"
></Table>
<Table
border=
"true"
:columns=
"columnsImport"
:data=
"excelData"
:height=
"tdHeightExcel"
ref=
"table"
class=
"tableCommon"
v-if=
"tableImport"
></Table>
<component
:is=
"detailExcel"
/>
</div>
</div>
<FooterToolbar
v-if=
"sheetNames.length>1"
>
<FooterToolbar
v-if=
"sheetNames.length>1
&&tableImport
"
>
<Form
inline
>
<Form
inline
>
<FormItem>
<FormItem>
<Tabs
:animated=
"false"
:value=
"0"
@
on-click=
"sheetClick"
>
<Tabs
:animated=
"false"
:value=
"0"
@
on-click=
"sheetClick"
>
...
@@ -82,6 +91,8 @@ export default {
...
@@ -82,6 +91,8 @@ export default {
downUrl
:
fileUrlDown
,
downUrl
:
fileUrlDown
,
fileUrlPath
:
""
,
fileUrlPath
:
""
,
disabled
:
false
,
disabled
:
false
,
detailExcel
:
null
,
tableImport
:
true
,
columns0
:
[{
columns0
:
[{
key
:
"userName"
,
key
:
"userName"
,
title
:
this
.
l
(
"userName"
),
title
:
this
.
l
(
"userName"
),
...
@@ -715,6 +726,16 @@ export default {
...
@@ -715,6 +726,16 @@ export default {
}
}
});
});
},
},
changeExcel
(
val
)
{
if
(
val
==
1
)
{
this
.
tableImport
=
false
this
.
detailExcel
=
()
=>
import
(
"./detailExcel"
);
}
else
{
this
.
detailExcel
=
null
;
this
.
tableImport
=
true
}
},
l
(
key
)
{
l
(
key
)
{
key
=
"user"
+
"."
+
key
;
key
=
"user"
+
"."
+
key
;
return
this
.
$t
(
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