Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
张浩
/
br-client
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
Commit
10592c89
...
10592c89247fde9cd89ab7c11659aee9f56beb8d
authored
2021-12-17 11:27:38 +0800
by
zhanghao
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
commit
1 parent
8788e509
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
194 additions
and
0 deletions
src/page/selectActCount.vue
src/page/tool.vue
src/router/index.js
src/page/selectActCount.vue
0 → 100644
View file @
10592c8
<
template
xmlns:el-col=
"http://www.w3.org/1999/html"
>
<div>
<br/>
<span>
查询首页侧边栏活动入口数量
</span>
<el-table
:data=
"selectActCounts"
border
style=
"width: 100%"
:row-class-name=
"tableRowClassName"
:header-cell-style=
"
{background: 'deepskyblue', color: 'snow'}">
<el-table-column
prop=
"oneLevelCode"
label=
"一级机构code"
min-width=
"1"
>
</el-table-column>
<el-table-column
prop=
"oneLevelName"
label=
"一级机构名称"
min-width=
"1"
>
</el-table-column>
<el-table-column
prop=
"twoLevelCode"
label=
"二级机构code"
min-width=
"1"
>
</el-table-column>
<el-table-column
prop=
"twoLevelName"
label=
"二级机构名称"
min-width=
"1"
>
</el-table-column>
<el-table-column
prop=
"codeResult"
label=
"活动数量"
min-width=
"1"
>
</el-table-column>
<el-table-column
prop=
"actContent"
label=
"活动名称"
min-width=
"4"
>
</el-table-column>
</el-table>
</div>
</
template
>
<
style
>
.el-table
.warning-row
{
background
:
LightPink
;
}
</
style
>
<
script
>
export
default
{
data
()
{
return
{
provinceCode
:
this
.
$route
.
query
.
provinceCode
,
cityCode
:
this
.
$route
.
query
.
cityCode
,
selectActCounts
:
[]
}
},
mounted
()
{
this
.
activity
()
},
methods
:
{
tableRowClassName
({
row
,
rowIndex
})
{
if
(
row
.
codeResult
>
2
)
{
return
'warning-row'
;
}
return
''
;
},
activity
()
{
const
loading
=
this
.
$loading
({
lock
:
true
,
text
:
'加载中...'
,
spinner
:
'el-icon-loading'
,
background
:
'rgba(0, 0, 0, 0.7)'
});
let
config
=
{
headers
:
{
'Content-Type'
:
'application/x-www-form-urlencoded'
}
}
this
.
$http
.
get
(
'/tool/selectActCount?'
+
this
.
$qs
.
stringify
({
oneLevelCode
:
this
.
provinceCode
,
twoLevelCode
:
this
.
cityCode
}),
config
).
then
((
res
)
=>
{
console
.
log
(
res
.
data
)
this
.
selectActCounts
=
res
.
data
.
selectActCounts
loading
.
close
();
}).
catch
(
error
=>
{
console
.
log
(
error
);
loading
.
close
();
this
.
$message
({
showClose
:
true
,
message
:
'服务器处理失败,请核对参数!'
,
type
:
'error'
});
})
}
}
}
</
script
>
src/page/tool.vue
View file @
10592c8
...
...
@@ -744,6 +744,42 @@
</el-form>
</el-col>
</el-row>
<el-row
style=
"margin-bottom: 15px;"
>
<el-col
:span=
"8"
>
<el-form
ref=
"selectActCount"
:model=
"selectActCount"
label-width=
"0px"
>
<el-card
class=
"darkred"
shadow=
"always"
>
<div
slot=
"header"
class=
"clearfix"
>
<span>
查询首页侧边栏活动入口数量
</span>
</div>
<div
class=
"text item"
>
<el-form-item>
<el-select
@
change=
"actChangeProvince"
v-model=
"selectActCount.provinceCode"
clearable
filterable
placeholder=
"请选择一级机构"
>
<el-option
v-for=
"item in actProvinceOptions"
:key=
"item.province_code"
:label=
"item.province_name"
:value=
"item.province_code"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item>
<el-select
v-model=
"selectActCount.cityCode"
clearable
filterable
placeholder=
"请选择二级机构"
>
<el-option
v-for=
"item in actCityOptions"
:key=
"item.city_code"
:label=
"item.city_name"
:value=
"item.city_code"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item>
<el-button
round
@
click=
"selectActCountSubmit"
>
查询数量
</el-button>
</el-form-item>
</div>
</el-card>
</el-form>
</el-col>
</el-row>
</div>
</
template
>
...
...
@@ -1043,6 +1079,18 @@
tjteamOptions
:
[],
tjfourOptions
:
[],
tjfiveOptions
:
[],
selectActCount
:
{
provinceCode
:
[{
province_code
:
''
,
province_name
:
''
}],
cityCode
:
[{
city_code
:
''
,
city_name
:
''
}]
},
actProvinceOptions
:
[],
actCityOptions
:
[],
nlpApi
:
{
keyword
:
''
,
huanjing
:
[]
...
...
@@ -1095,6 +1143,7 @@
mounted
()
{
this
.
openToolPage
();
this
.
loadProvince
();
this
.
loadActProvince
();
this
.
tjloadProvince
();
this
.
loadQueryProvince
();
},
...
...
@@ -1137,6 +1186,19 @@
console
.
log
(
error
);
})
},
loadActProvince
()
{
let
config
=
{
headers
:
{
'Content-Type'
:
'application/x-www-form-urlencoded'
}
}
this
.
$http
.
get
(
'/tool/loadProvince'
,
config
).
then
((
res
)
=>
{
console
.
log
(
res
);
this
.
actProvinceOptions
=
res
.
data
;
}).
catch
(
error
=>
{
console
.
log
(
error
);
})
},
tjloadProvince
()
{
let
config
=
{
headers
:
{
...
...
@@ -1173,6 +1235,23 @@
console
.
log
(
error
);
})
},
actChangeProvince
(
value
)
{
this
.
actCityOptions
=
[];
this
.
selectActCount
.
cityCode
=
''
;
let
config
=
{
headers
:
{
'Content-Type'
:
'application/x-www-form-urlencoded'
}
}
this
.
$http
.
get
(
'/tool/loadCity?'
+
this
.
$qs
.
stringify
({
code
:
value
}),
config
).
then
((
res
)
=>
{
console
.
log
(
res
);
this
.
actCityOptions
=
res
.
data
;
}).
catch
(
error
=>
{
console
.
log
(
error
);
})
},
tjchangeProvince
(
value
)
{
this
.
tjcityOptions
=
[];
this
.
tjteamOptions
=
[];
...
...
@@ -1669,6 +1748,11 @@
{
method
:
this
.
apiTest
.
method
,
biz_data
:
this
.
apiTest
.
biz_data
,
phone
:
this
.
apiTest
.
phone
,
path
:
this
.
apiTest
.
path
.
toString
(),
type
:
this
.
apiTest
.
huanjing
.
toString
()}})
window
.
open
(
href
,
'_blank'
)
},
selectActCountSubmit
()
{
const
{
href
}
=
this
.
$router
.
resolve
({
name
:
'selectActCount'
,
query
:
{
provinceCode
:
this
.
selectActCount
.
provinceCode
.
toString
(),
cityCode
:
this
.
selectActCount
.
cityCode
.
toString
()}})
window
.
open
(
href
,
'_blank'
)
},
changeOrgAllSubmit
()
{
let
config
=
{
headers
:
{
...
...
src/router/index.js
View file @
10592c8
...
...
@@ -22,6 +22,7 @@ import androidCode from '@/page/androidCode'
import
queryTjAccount
from
'@/page/queryTjAccount'
import
testHouLi
from
'@/page/testHouLi'
import
chouJiang
from
'@/page/chouJiang'
import
selectActCount
from
'@/page/selectActCount'
Vue
.
use
(
Router
)
...
...
@@ -166,6 +167,14 @@ export default new Router({
meta
:
{
title
:
'测试工具平台'
}
},
{
path
:
'/selectActCount'
,
component
:
selectActCount
,
name
:
'selectActCount'
,
meta
:
{
title
:
'测试工具平台'
}
}
]
},
...
...
Please
register
or
sign in
to post a comment