Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
任超
/
js.CadastralSystem
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
87856703
authored
2021-01-06 09:00:25 +0800
by
杨威
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
根据户权属状态判断是否可以做批量操作
1 parent
5810b0e0
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
82 additions
and
37 deletions
src/views/zrz/lpb/bjlp/index.vue
src/views/zrz/lpb/bjlp/lpbContent/index.vue
src/views/zrz/lpb/bjlp/index.vue
View file @
8785670
...
...
@@ -401,13 +401,18 @@ export default {
if
(
this
.
bsms
.
length
<=
0
)
{
Message
.
warning
(
"请选择操作户"
)
return
}
batchCommit
(
this
.
bsms
).
then
(
res
=>
{
if
(
res
.
success
)
{
Message
.
success
(
"提交成功"
);
this
.
getlpbData
();
}
})
}
else
{
if
(
this
.
qsztList
.
indexOf
(
'1'
)
>
-
1
)
{
Message
.
warning
(
"已提交的户无法继续操作"
)
}
else
{
batchCommit
(
this
.
bsms
).
then
(
res
=>
{
if
(
res
.
success
)
{
Message
.
success
(
"提交成功"
);
this
.
getlpbData
();
}
})
}
}
},
loading
(){
this
.
getLpbMenuTree
(
this
.
$store
.
state
.
zrzbsm
);
...
...
@@ -423,20 +428,25 @@ export default {
if
(
this
.
bsms
.
length
<=
0
)
{
Message
.
warning
(
"请选择操作户"
)
return
}
switch
(
val
)
{
case
'h'
:
this
.
plhVisible
=
true
;
break
;
case
'zl'
:
this
.
plzlVisible
=
true
;
break
;
case
'sh'
:
this
.
plShVisible
=
true
;
break
;
default
:
break
;
}
}
else
{
if
(
this
.
qsztList
.
indexOf
(
'1'
)
>
-
1
)
{
Message
.
warning
(
"已提交的户无法继续操作"
)
}
else
{
switch
(
val
)
{
case
'h'
:
this
.
plhVisible
=
true
;
break
;
case
'zl'
:
this
.
plzlVisible
=
true
;
break
;
case
'sh'
:
this
.
plShVisible
=
true
;
break
;
default
:
break
;
}
}
}
},
lodding
(){
this
.
getlpbData
();
...
...
@@ -462,6 +472,7 @@ export default {
//清空已选中层户
this
.
cbsmList
=
[];
this
.
bsms
=
[];
this
.
qsztList
=
[];
this
.
$refs
.
lpbContent
.
hbsmList
=
[];
this
.
$nextTick
(()
=>
{
//户
...
...
@@ -565,6 +576,16 @@ export default {
this
.
bsms
=
data
;
}
},
//获取选中户信息
getQsztList
(
data
,
type
)
{
if
(
type
)
{
// 双击
}
else
{
//单击 TO DO
this
.
qsztList
=
data
;
}
},
//获取选中层bsmlist
getCbsm
(
data
){
this
.
cbsmList
=
data
;
...
...
@@ -631,18 +652,21 @@ export default {
},
//批量添加不动产单元号
addBdcdyh
()
{
// this.pd[0].bsm //自然幢标识码
batchGeneratorBdcdyh
(
this
.
$store
.
state
.
zrzh
,
this
.
pd
[
0
].
bsm
,
0
).
then
(
(
res
)
=>
{
if
(
res
.
code
===
200
)
{
this
.
$message
.
success
(
"生成完成!"
);
}
else
if
(
res
.
code
===
206
){
let
hasGenerateCount
=
res
.
result
.
hasGenerateCount
;
let
unGenerateCount
=
res
.
result
.
unGenerateCount
;
this
.
open
(
hasGenerateCount
,
unGenerateCount
);
if
(
this
.
qsztList
.
indexOf
(
'1'
)
>
-
1
)
{
Message
.
warning
(
"已提交的户无法继续操作"
)
}
else
{
batchGeneratorBdcdyh
(
this
.
$store
.
state
.
zrzh
,
this
.
pd
[
0
].
bsm
,
0
).
then
(
(
res
)
=>
{
if
(
res
.
code
===
200
)
{
this
.
$message
.
success
(
"生成完成!"
);
}
else
if
(
res
.
code
===
206
){
let
hasGenerateCount
=
res
.
result
.
hasGenerateCount
;
let
unGenerateCount
=
res
.
result
.
unGenerateCount
;
this
.
open
(
hasGenerateCount
,
unGenerateCount
);
}
}
}
);
);
}
},
open
(
hasGenerateCount
,
unGenerateCount
)
{
...
...
src/views/zrz/lpb/bjlp/lpbContent/index.vue
View file @
8785670
...
...
@@ -65,6 +65,7 @@
:rowspan=
"hs.sjcs"
:colspan=
"hs.sjhs"
:data-bsm=
"hs.bsm"
:data-qszt=
"hs.qszt"
ref=
"hBsm"
:key=
"hsIndex"
:class=
"searchNum == hs.shbw || searchNum == hs.bdcdyh ? 'tdSelect' : ''"
...
...
@@ -126,6 +127,7 @@
:rowspan=
"hs.sjcs"
:colspan=
"hs.sjhs"
:data-bsm=
"hs.bsm"
:data-qszt=
"hs.qszt"
ref=
"hBsm"
:key=
"hsIndex"
:class=
"searchNum == hs.shbw || searchNum == hs.bdcdyh ? 'tdSelect' : ''"
...
...
@@ -199,6 +201,7 @@
:rowspan=
"hs.sjcs"
:colspan=
"hs.sjhs"
:data-bsm=
"hs.bsm"
:data-qszt=
"hs.qszt"
ref=
"hBsm"
:key=
"hsIndex"
:class=
"searchNum == hs.shbw || searchNum == hs.bdcdyh ? 'tdSelect' : ''"
...
...
@@ -253,6 +256,7 @@
:rowspan=
"hs.sjcs"
:colspan=
"hs.sjhs"
:data-bsm=
"hs.bsm"
:data-qszt=
"hs.qszt"
ref=
"hBsm"
:key=
"hsIndex"
:class=
"searchNum == hs.shbw || searchNum == hs.bdcdyh ? 'tdSelect' : ''"
...
...
@@ -425,6 +429,7 @@ export default {
loading
:
true
,
hbsm
:
''
,
hbsmList
:
[],
hqsztList
:[],
cbsmList
:
[],
time
:
null
,
//区分单双击事件的定时器
searchNum
:
Math
.
random
(),
...
...
@@ -619,6 +624,7 @@ export default {
//未选中→选中
e
.
className
=
"tdSelect"
;
//加边框
this
.
hbsmList
.
push
(
bsm
);
// 将户bsm放进hbsmList
this
.
hqsztList
.
push
(
hs
.
qszt
);
// 将户qszt放进hqsztList
switch
(
this
.
lpbParent
)
{
case
'isHbfg'
:
this
.
fghbChoosedList
.
push
(
hs
);
...
...
@@ -631,6 +637,7 @@ export default {
break
;
case
'isLpb'
:
this
.
$parent
.
getHbsm
(
this
.
hbsmList
,
false
);
this
.
$parent
.
getQsztList
(
this
.
hqsztList
,
false
);
break
;
default
:
...
...
@@ -651,7 +658,9 @@ export default {
break
;
case
'isLpb'
:
this
.
hbsmList
=
this
.
hbsmList
.
filter
(
i
=>
i
!=
bsm
);
this
.
hqsztList
=
this
.
hqsztList
.
filter
(
i
=>
i
!=
hs
.
qszt
);
this
.
$parent
.
getHbsm
(
this
.
hbsmList
,
false
);
this
.
$parent
.
getQsztList
(
this
.
hqsztList
,
false
);
break
;
default
:
...
...
@@ -695,6 +704,7 @@ export default {
});
// 清空hbsmList
this
.
hbsmList
=
[];
this
.
hqsztList
=
[];
// });
},
//户右键点击事件
...
...
@@ -774,7 +784,7 @@ export default {
if
(
e
.
target
.
className
.
indexOf
(
"tdSelect"
)
==
-
1
)
{
//未选中→选中
e
.
target
.
className
+=
" tdSelect"
;
//加边框
this
.
cbsmList
.
push
(
item
.
bsm
);
// 将户bsm放进hbsmList
this
.
cbsmList
.
push
(
item
.
bsm
);
}
else
{
//选中→未选中
e
.
target
.
className
=
"floor"
;
...
...
@@ -965,35 +975,39 @@ export default {
this
.
$refs
.
hBsm
.
forEach
((
item
)
=>
{
item
.
className
=
"tdSelect"
;
this
.
hbsmList
.
push
(
item
.
dataset
.
bsm
);
// 将户bsm放进hbsmList
this
.
hqsztList
.
push
(
item
.
dataset
.
qszt
)
});
}
else
{
this
.
$refs
.
hBsm
.
forEach
((
item
)
=>
{
item
.
className
=
""
;
this
.
hbsmList
=
[];
this
.
hqsztList
=
[];
});
}
this
.
$nextTick
(()
=>
{
this
.
$parent
.
getHbsm
(
this
.
hbsmList
,
false
);
this
.
$parent
.
getQsztList
(
this
.
hqsztList
,
false
);
})
},
//幢单元全选
zdySelectAll
(
val
,
cs
){
let
zdyHbsmList
=
[];
let
zdyHqsztList
=
[];
cs
.
forEach
(
i
=>
{
i
.
hs
.
forEach
(
j
=>
{
zdyHbsmList
.
push
(
j
.
bsm
)
zdyHqsztList
.
push
(
j
.
qszt
)
})
});
if
(
val
)
{
this
.
$nextTick
(()
=>
{
console
.
log
(
zdyHbsmList
);
this
.
$refs
.
hBsm
.
forEach
((
item
)
=>
{
console
.
log
(
item
.
dataset
.
bsm
);
if
(
zdyHbsmList
.
indexOf
(
item
.
dataset
.
bsm
)
>-
1
)
{
item
.
className
=
"tdSelect"
;
this
.
hbsmList
=
zdyHbsmList
;
// 将户bsm放进hbsmList
}
});
this
.
hbsmList
=
this
.
hbsmList
.
concat
(
zdyHbsmList
);
this
.
hqsztList
=
this
.
hqsztList
.
concat
(
zdyHqsztList
);
})
}
else
{
this
.
$refs
.
hBsm
.
forEach
((
item
)
=>
{
...
...
@@ -1006,10 +1020,16 @@ export default {
this
.
hbsmList
=
this
.
hbsmList
.
filter
(
i
=>
i
!=
j
)
}
})
zdyHqsztList
.
forEach
(
j
=>
{
if
(
item
.
dataset
.
qszt
==
j
)
{
this
.
hqsztList
=
this
.
hqsztList
.
filter
(
i
=>
i
!=
j
)
}
})
});
}
this
.
$nextTick
(()
=>
{
this
.
$parent
.
getHbsm
(
this
.
hbsmList
,
false
);
this
.
$parent
.
getQsztList
(
this
.
hqsztList
,
false
);
})
},
//逻辑幢、幢单元、层双击
...
...
@@ -1056,7 +1076,8 @@ export default {
console
.
log
(
item
.
dataset
.
bsm
,
"item.dataset.bsm"
);
// 判断hbsmList中是否已经存在
if
(
this
.
hbsmList
.
indexOf
(
item
.
dataset
.
bsm
)
==
-
1
)
{
this
.
hbsmList
.
push
(
item
.
dataset
.
bsm
);
// 将户bsm放进hbsmList
this
.
hbsmList
.
push
(
item
.
dataset
.
bsm
);
this
.
hqsztList
.
push
(
item
.
dataset
.
qszt
);
}
}
});
...
...
Please
register
or
sign in
to post a comment