Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
bdc
/
bdcdj-web
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
37bf885f
authored
2023-06-09 16:43:15 +0800
by
renchao@pashanhoo.com
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
1
1 parent
09036fbb
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
79 additions
and
78 deletions
src/components/LbTable/lb-table.vue
src/permission.js
src/utils/request.js
src/views/ywbl/ywsq/components/selectJsydsyq.vue
src/views/ywbl/ywsq/components/selectJsydsyqSplitMerge.vue
src/components/LbTable/lb-table.vue
View file @
37bf885
...
...
@@ -126,8 +126,8 @@
methods
:
{
// 单选
singleElection
(
row
)
{
console
.
log
(
"点击行"
);
this
.
selected
=
this
.
data
.
indexOf
(
row
);
this
.
$emit
(
'row-click'
,
row
)
},
tableRowClassName
({
row
,
rowIndex
})
{
...
...
src/permission.js
View file @
37bf885
/*
* @Description: 项目权限
* @Autor: renchao
* @LastEditTime: 2023-06-0
2 10:44:17
* @LastEditTime: 2023-06-0
8 10:42:33
*/
import
Vue
from
'vue'
import
axios
from
'axios'
import
router
from
'./router'
import
store
from
'./store'
import
Cookies
from
'js-cookie'
import
{
getMenuInfo
}
from
'@/api/user'
import
{
getUrlParam
}
from
'@/utils/operation'
import
{
getMenuInfo
}
from
'@/api/user'
import
{
getUrlParam
}
from
'@/utils/operation'
import
NProgress
from
'nprogress'
// progress bar
import
'nprogress/nprogress.css'
// progress bar style
import
getPageTitle
from
'@/utils/get-page-title'
NProgress
.
configure
({
showSpinner
:
false
})
// NProgress Configuration
NProgress
.
configure
({
showSpinner
:
false
})
// NProgress Configuration
router
.
beforeEach
(
async
(
to
,
from
,
next
)
=>
{
Vue
.
prototype
.
$currentRoute
=
to
...
...
@@ -23,7 +23,7 @@ router.beforeEach(async (to, from, next) => {
let
hasAddDict
=
store
.
state
.
dict
.
addDict
let
hasAddRoute
=
store
.
state
.
permission
.
addRoutes
// cas操作
const
token
=
localStorage
.
getItem
(
"token"
)
||
Cookies
.
get
(
'
ACCESS_TOKEN
'
);
const
token
=
localStorage
.
getItem
(
"token"
)
||
Cookies
.
get
(
'
token
'
);
if
(
to
.
path
===
'/login'
)
{
if
(
token
)
{
next
(
'/'
)
...
...
@@ -46,7 +46,7 @@ router.beforeEach(async (to, from, next) => {
if
(
process
.
env
.
NODE_ENV
===
'development'
)
{
localStorage
.
setItem
(
'token'
,
res
.
data
.
content
.
accessToken
)
}
else
{
Cookies
.
set
(
'
ACCESS_TOKEN
'
,
res
.
data
.
content
.
accessToken
)
Cookies
.
set
(
'
token
'
,
res
.
data
.
content
.
accessToken
)
}
window
.
location
.
href
=
localStorage
.
getItem
(
'location'
)
...
...
@@ -61,22 +61,21 @@ router.beforeEach(async (to, from, next) => {
permission
()
}
async
function
permission
()
{
async
function
permission
()
{
if
(
!
hasAddDict
)
{
store
.
dispatch
(
'dict/generateDic'
)
}
if
(
hasAddRoute
)
{
next
()
// next({ ...to, replace: true })
}
else
{
const
{
result
:
getMenuData
}
=
await
getMenuInfo
()
const
{
result
:
getMenuData
}
=
await
getMenuInfo
()
const
accessRoutes
=
await
store
.
dispatch
(
'permission/generateRoutes'
,
getMenuData
)
// 获取用户信息
await
store
.
dispatch
(
'user/getUserInfo'
)
router
.
addRoutes
([...
accessRoutes
,
{
path
:
'*'
,
redirect
:
'/404'
,
hidden
:
true
}])
router
.
addRoutes
([...
accessRoutes
,
{
path
:
'*'
,
redirect
:
'/404'
,
hidden
:
true
}])
const
routeTo
=
Cookies
.
get
(
'routerTo'
)
if
(
routeTo
&&
routeTo
!==
'/'
)
{
next
({
...
to
,
replace
:
true
})
next
({
...
to
,
replace
:
true
})
}
else
{
next
(
'/home'
)
}
...
...
src/utils/request.js
View file @
37bf885
...
...
@@ -2,7 +2,7 @@
/*
* @Description: 此文件主要创建 axios 实例,然后添加请求拦截器和响应拦截器
* @Autor: renchao
* @LastEditTime: 2023-06-0
2 10:18:32
* @LastEditTime: 2023-06-0
7 15:37:07
*/
import
axios
from
'axios'
import
Router
from
'@/router'
...
...
@@ -70,7 +70,7 @@ service.interceptors.response.use(
if
(
process
.
env
.
NODE_ENV
===
'development'
)
{
localStorage
.
removeItem
(
'token'
)
}
else
{
Cookies
.
remove
(
'
ACCESS_TOKEN
'
)
Cookies
.
remove
(
'
token
'
)
}
if
(
window
.
_config
.
casEnable
)
{
window
.
location
.
href
=
window
.
_config
.
casBaseURL
+
'/logout?service='
+
encodeURIComponent
(
locationUrl
);
...
...
src/views/ywbl/ywsq/components/selectJsydsyq.vue
View file @
37bf885
...
...
@@ -83,7 +83,7 @@
},
methods
:
{
queryClick
()
{
console
.
log
(
"申请业务单一流向状态"
,
this
.
sqywInfo
.
sqywdylx
);
console
.
log
(
"申请业务单一流向状态"
,
this
.
sqywInfo
.
sqywdylx
);
this
.
$startLoading
();
this
.
queryForm
.
sqywbm
=
this
.
sqywInfo
.
djywbm
;
selectJsydQlxx
({
...
this
.
queryForm
,
...
this
.
pageData
}).
then
((
res
)
=>
{
...
...
@@ -141,39 +141,40 @@
formData
:
param
})
},
select
(
selection
,
row
)
{
if
(
this
.
sqywInfo
.
sqywdylx
==
"1"
)
{
// 清除 所有勾选项
this
.
$refs
.
table
.
clearSelection
()
// 当表格数据都没有被勾选的时候 就返回
// 主要用于将当前勾选的表格状态清除
if
(
selection
.
length
==
0
)
return
this
.
$refs
.
table
.
toggleRowSelection
(
row
,
true
);
}
select
(
selection
,
row
)
{
if
(
this
.
sqywInfo
.
sqywdylx
==
"1"
)
{
// 清除 所有勾选项
this
.
$refs
.
table
.
clearSelection
()
// 当表格数据都没有被勾选的时候 就返回
// 主要用于将当前勾选的表格状态清除
if
(
selection
.
length
==
0
)
return
this
.
$refs
.
table
.
toggleRowSelection
(
row
,
true
);
}
},
handleRowClick
(
row
){
handleRowClick
(
row
)
{
console
.
log
(
2222222222222222222222
);
// 如果状态是1,那就是单选
if
(
this
.
sqywInfo
.
sqywdylx
==
"1"
)
{
const
bdcdysz
=
this
.
bdcdysz
this
.
$refs
.
table
.
clearSelection
()
if
(
bdcdysz
.
length
==
1
)
{
bdcdysz
.
forEach
(
item
=>
{
// 判断 如果当前的一行被勾选, 再次点击的时候就会取消选中
if
(
item
==
row
)
{
this
.
$refs
.
table
.
toggleRowSelection
(
row
,
false
);
}
// 不然就让当前的一行勾选
else
{
this
.
$refs
.
table
.
toggleRowSelection
(
row
,
true
);
}
})
}
else
{
this
.
$refs
.
table
.
toggleRowSelection
(
row
,
true
);
}
}
else
{
if
(
this
.
sqywInfo
.
sqywdylx
==
"1"
)
{
const
bdcdysz
=
this
.
bdcdysz
this
.
$refs
.
table
.
clearSelection
()
if
(
bdcdysz
.
length
==
1
)
{
bdcdysz
.
forEach
(
item
=>
{
// 判断 如果当前的一行被勾选, 再次点击的时候就会取消选中
if
(
item
==
row
)
{
this
.
$refs
.
table
.
toggleRowSelection
(
row
,
false
);
}
// 不然就让当前的一行勾选
else
{
this
.
$refs
.
table
.
toggleRowSelection
(
row
,
true
);
}
})
}
else
{
this
.
$refs
.
table
.
toggleRowSelection
(
row
,
true
);
}
}
else
{
this
.
$refs
.
table
.
toggleRowSelection
(
row
);
}
}
},
}
}
...
...
src/views/ywbl/ywsq/components/selectJsydsyqSplitMerge.vue
View file @
37bf885
...
...
@@ -42,7 +42,7 @@
<!-- 表格 -->
<div
class=
"from-clues-content loadingtext"
>
分割合并前权利信息
<lb-table
ref=
"table"
@
row-click=
"handleRowClick"
heightNumSetting
:pagination=
false
<lb-table
ref=
"table"
@
row-click=
"handleRowClick"
:minHeight=
"210"
heightNumSetting
:pagination=
false
:column=
"tableData.columns"
:data=
"tableData.data"
>
</lb-table>
</div>
...
...
@@ -89,7 +89,7 @@
<
/div
>
)
}
}
,
].
concat
(
datas
.
columns
()),
}].
concat
(
datas
.
columns
()),
data
:
[],
columns1
:
datastwo
.
columns1
(),
datastwo
:
[]
...
...
@@ -117,7 +117,7 @@
})
},
queryClick
()
{
console
.
log
(
"申请业务单一流向状态土地分割合并"
,
this
.
sqywInfo
.
sqywdylx
);
console
.
log
(
"申请业务单一流向状态土地分割合并"
,
this
.
sqywInfo
.
sqywdylx
);
this
.
$startLoading
();
this
.
queryForm
.
sqywbm
=
this
.
sqywInfo
.
djywbm
;
selectJsydQlxxSplitMergeBefore
({
...
this
.
queryForm
,
...
this
.
pageData
}).
then
((
res
)
=>
{
...
...
@@ -128,6 +128,7 @@
});
},
handleRowClick
(
val
)
{
console
.
log
(
val
,
'valvalvalval'
);
this
.
radioVal
=
val
.
bhqkbsm
let
obj
=
val
obj
.
bsmSsql
=
val
.
bsmQlxx
;
...
...
@@ -172,39 +173,39 @@
formData
:
param
})
},
select
(
selection
,
row
)
{
if
(
this
.
sqywInfo
.
sqywdylx
==
"1"
)
{
// 清除 所有勾选项
this
.
$refs
.
table
.
clearSelection
()
// 当表格数据都没有被勾选的时候 就返回
// 主要用于将当前勾选的表格状态清除
if
(
selection
.
length
==
0
)
return
this
.
$refs
.
table
.
toggleRowSelection
(
row
,
true
);
}
select
(
selection
,
row
)
{
if
(
this
.
sqywInfo
.
sqywdylx
==
"1"
)
{
// 清除 所有勾选项
this
.
$refs
.
table
.
clearSelection
()
// 当表格数据都没有被勾选的时候 就返回
// 主要用于将当前勾选的表格状态清除
if
(
selection
.
length
==
0
)
return
this
.
$refs
.
table
.
toggleRowSelection
(
row
,
true
);
}
},
handleRowClick
(
row
)
{
handleRowClick
(
row
)
{
// 如果状态是1,那就是单选
if
(
this
.
sqywInfo
.
sqywdylx
==
"1"
)
{
const
bdcdysz
=
this
.
bdcdysz
this
.
$refs
.
table
.
clearSelection
()
if
(
bdcdysz
.
length
==
1
)
{
bdcdysz
.
forEach
(
item
=>
{
// 判断 如果当前的一行被勾选, 再次点击的时候就会取消选中
if
(
item
==
row
)
{
this
.
$refs
.
table
.
toggleRowSelection
(
row
,
false
);
}
// 不然就让当前的一行勾选
else
{
this
.
$refs
.
table
.
toggleRowSelection
(
row
,
true
);
}
})
}
else
{
this
.
$refs
.
table
.
toggleRowSelection
(
row
,
true
);
}
}
else
{
if
(
this
.
sqywInfo
.
sqywdylx
==
"1"
)
{
const
bdcdysz
=
this
.
bdcdysz
this
.
$refs
.
table
.
clearSelection
()
if
(
bdcdysz
.
length
==
1
)
{
bdcdysz
.
forEach
(
item
=>
{
// 判断 如果当前的一行被勾选, 再次点击的时候就会取消选中
if
(
item
==
row
)
{
this
.
$refs
.
table
.
toggleRowSelection
(
row
,
false
);
}
// 不然就让当前的一行勾选
else
{
this
.
$refs
.
table
.
toggleRowSelection
(
row
,
true
);
}
})
}
else
{
this
.
$refs
.
table
.
toggleRowSelection
(
row
,
true
);
}
}
else
{
this
.
$refs
.
table
.
toggleRowSelection
(
row
);
}
}
},
}
}
...
...
Please
register
or
sign in
to post a comment