Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
K
klck
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
位宇华
klck
Commits
a3d95a9a
Commit
a3d95a9a
authored
Aug 04, 2023
by
xiangjiaojunxp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
导入对比
parent
2b4bedff
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
58 deletions
+32
-58
ruoyi-ui/src/views/system/supplies/indexupload.vue
ruoyi-ui/src/views/system/supplies/indexupload.vue
+32
-58
No files found.
ruoyi-ui/src/views/system/supplies/indexupload.vue
View file @
a3d95a9a
...
...
@@ -10,24 +10,6 @@
maxlength=
"8"
/>
</el-form-item>
<el-form-item
label=
"列"
prop=
"cell"
label-width=
"80px"
>
<el-input
v-model=
"cell"
placeholder=
"请输入结束列"
clearable
@
keyup.enter.native=
"handleFileChange1"
maxlength=
"8"
/>
</el-form-item>
<el-form-item
label=
"单位"
prop=
"dep"
label-width=
"80px"
>
<el-input
v-model=
"dep"
placeholder=
"请输入导入单位"
clearable
@
keyup.enter.native=
"handleFileChange1"
maxlength=
"8"
/>
</el-form-item>
</el-form>
<el-row
:gutter=
"10"
class=
"mb8"
>
<el-col
:span=
"1.5"
>
...
...
@@ -96,14 +78,13 @@ import {vueScript} from "@/utils/generator/html";
var
fileName
=
"
新建XLSX工作表
"
;
//定义表名
var
data1
;
var
name1
;
var
map
=
new
Map
();
export
default
{
name
:
"
Mymodule
"
,
data
()
{
return
{
row
:
''
,
cell
:
''
,
dep
:
''
,
//弹出页面的表名
// 是否显示弹出层
fileList
:[],
...
...
@@ -137,7 +118,7 @@ export default {
//刷新下拉选框内容
fileName
=
"
新建XLSX工作表
"
;
this
.
disableNextButton
=
''
;
this
.
row
=
this
.
cell
=
this
.
dep
=
""
;
this
.
row
=
""
;
//刷新luckysheet表格
this
.
init
();
map
.
clear
();
...
...
@@ -233,10 +214,10 @@ export default {
data
:
exportJson
.
sheets
,
userInfo
:
exportJson
.
info
.
name
.
creator
})
data1
=
exportJson
.
sheets
;
data1
=
exportJson
.
sheets
[
0
]
;
let
suffixArr
=
exportJson
.
info
.
name
.
split
(
'
.
'
);
fileName
=
suffixArr
[
0
];
this
.
dep
=
this
.
row
=
this
.
cell
=
''
;
this
.
row
=
''
;
}
)
},
...
...
@@ -279,24 +260,12 @@ export default {
},
handleFileChange1
(
evt
)
{
if
(
this
.
dep
===
""
)
{
this
.
$message
({
message
:
"
请先输入您要导入的单位
"
,
type
:
"
warning
"
});
return
false
}
if
(
this
.
row
===
""
)
{
this
.
$message
({
message
:
"
请先输入导入开始的行
"
,
type
:
"
warning
"
});
return
false
}
if
(
this
.
cell
===
""
)
{
this
.
$message
({
message
:
"
请先输入导入结束的列
"
,
type
:
"
warning
"
});
return
false
}
let
name
=
evt
.
name
let
suffixArr
=
name
.
split
(
'
.
'
),
suffix
=
suffixArr
[
suffixArr
.
length
-
1
];
...
...
@@ -321,39 +290,44 @@ export default {
let
ddd
=
data1
;
let
as
=
0
;
for
(
let
k
=
0
;
k
<
ddd
.
length
;
k
++
){
let
d
1
=
window
.
luckysheet
.
transToData
(
ddd
[
k
].
celldata
);
let
d2
=
window
.
luckysheet
.
transToData
(
exportJson
.
sheets
[
k
].
celldata
)
;
let
d1
=
window
.
luckysheet
.
transToData
(
ddd
.
celldata
);
let
d
2
=
window
.
luckysheet
.
transToData
(
exportJson
.
sheets
[
0
].
celldata
);
name1
=
exportJson
.
sheets
[
0
].
name
;
let
array
=
[];
let
c
=
this
.
cell
-
1
;
let
r
=
this
.
row
-
1
;
for
(
let
i
=
r
;
i
<
d1
[
0
]
.
length
;
i
++
)
{
for
(
let
j
=
0
;
j
<
c
;
j
++
)
{
debugger
for
(
let
i
=
r
;
i
<
d1
.
length
;
i
++
)
{
for
(
let
j
=
0
;
j
<
=
d1
[
0
].
length
;
j
++
)
{
if
(
d1
[
i
][
j
]
===
null
){
break
;
}
if
(
d1
[
i
][
j
].
m
!==
d2
[
i
][
j
].
m
)
{
}
else
if
(
d1
[
i
][
j
].
m
===
undefined
&&
d2
[
i
][
j
].
m
===
undefined
){
}
else
if
(
d1
[
i
][
j
].
m
===
undefined
||
d2
[
i
][
j
].
m
===
undefined
){
luckysheet
.
setCellValue
(
i
,
j
,
{
bg
:
"
#FF0000
"
})
//查看是否有标签
/*luckysheet.setCellValue(i, j, {
ps: { //批注
"left": 92, //批注框左边距
"top": 10, //批注框上边距
"width": 91, //批注框宽度
"height": 48, //批注框高度
"value": this.dep+"表有误", //批准内容
"isshow": false //批注框为显示状态
}
})*/
as
++
array
.
push
([
i
,
j
]);
}
else
{
if
(
d1
[
i
][
j
].
m
!==
d2
[
i
][
j
].
m
)
{
luckysheet
.
setCellValue
(
i
,
j
,
{
bg
:
"
#FF0000
"
})
//查看是否有标签
/*luckysheet.setCellValue(i, j, {
ps: { //批注
"left": 92, //批注框左边距
"top": 10, //批注框上边距
"width": 91, //批注框宽度
"height": 48, //批注框高度
"value": this.dep+"表有误", //批准内容
"isshow": false //批注框为显示状态
}
})*/
as
++
array
.
push
([
i
,
j
]);
}
}
}
}
map
.
set
(
this
.
dep
,
array
);
map
.
set
(
name1
,
array
);
console
.
log
(
map
);
}
if
(
as
>
0
){
this
.
$message
({
message
:
"
导入完成,本次导入共发现
"
+
as
+
"
条不同数据
"
,
...
...
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