Commit 10592c89 10592c89247fde9cd89ab7c11659aee9f56beb8d by zhanghao

commit

1 parent 8788e509
1 <template xmlns:el-col="http://www.w3.org/1999/html">
2 <div>
3 <br/>
4 <span>查询首页侧边栏活动入口数量</span>
5 <el-table
6 :data="selectActCounts"
7 border
8 style="width: 100%"
9 :row-class-name="tableRowClassName"
10 :header-cell-style="{background: 'deepskyblue', color: 'snow'}">
11 <el-table-column
12 prop="oneLevelCode"
13 label="一级机构code"
14 min-width="1">
15 </el-table-column>
16 <el-table-column
17 prop="oneLevelName"
18 label="一级机构名称"
19 min-width="1">
20 </el-table-column>
21 <el-table-column
22 prop="twoLevelCode"
23 label="二级机构code"
24 min-width="1">
25 </el-table-column>
26 <el-table-column
27 prop="twoLevelName"
28 label="二级机构名称"
29 min-width="1">
30 </el-table-column>
31 <el-table-column
32 prop="codeResult"
33 label="活动数量"
34 min-width="1">
35 </el-table-column>
36 <el-table-column
37 prop="actContent"
38 label="活动名称"
39 min-width="4">
40 </el-table-column>
41 </el-table>
42 </div>
43 </template>
44
45 <style>
46 .el-table .warning-row {
47 background: LightPink;
48 }
49 </style>
50
51 <script>
52 export default {
53 data() {
54 return {
55 provinceCode: this.$route.query.provinceCode,
56 cityCode: this.$route.query.cityCode,
57 selectActCounts: []
58 }
59 },
60 mounted() {
61 this.activity()
62 },
63 methods: {
64 tableRowClassName({row, rowIndex}) {
65 if (row.codeResult > 2) {
66 return 'warning-row';
67 }
68 return '';
69 },
70 activity() {
71 const loading = this.$loading({
72 lock: true,
73 text: '加载中...',
74 spinner: 'el-icon-loading',
75 background: 'rgba(0, 0, 0, 0.7)'
76 });
77 let config = {
78 headers: {
79 'Content-Type': 'application/x-www-form-urlencoded'
80 }
81 }
82 this.$http.get('/tool/selectActCount?'+this.$qs.stringify({
83 oneLevelCode: this.provinceCode,
84 twoLevelCode: this.cityCode
85 }),config).then((res)=>{
86 console.log(res.data)
87 this.selectActCounts=res.data.selectActCounts
88 loading.close();
89 }).catch(error=>{
90 console.log(error);
91 loading.close();
92 this.$message({
93 showClose: true,
94 message: '服务器处理失败,请核对参数!',
95 type: 'error'
96 });
97 })
98 }
99 }
100 }
101 </script>
...@@ -744,6 +744,42 @@ ...@@ -744,6 +744,42 @@
744 </el-form> 744 </el-form>
745 </el-col> 745 </el-col>
746 </el-row> 746 </el-row>
747 <el-row style="margin-bottom: 15px;">
748 <el-col :span="8">
749 <el-form ref="selectActCount" :model="selectActCount" label-width="0px">
750 <el-card class="darkred" shadow="always">
751 <div slot="header" class="clearfix">
752 <span>查询首页侧边栏活动入口数量</span>
753 </div>
754 <div class="text item">
755 <el-form-item>
756 <el-select @change="actChangeProvince" v-model="selectActCount.provinceCode" clearable filterable placeholder="请选择一级机构">
757 <el-option
758 v-for="item in actProvinceOptions"
759 :key="item.province_code"
760 :label="item.province_name"
761 :value="item.province_code">
762 </el-option>
763 </el-select>
764 </el-form-item>
765 <el-form-item>
766 <el-select v-model="selectActCount.cityCode" clearable filterable placeholder="请选择二级机构">
767 <el-option
768 v-for="item in actCityOptions"
769 :key="item.city_code"
770 :label="item.city_name"
771 :value="item.city_code">
772 </el-option>
773 </el-select>
774 </el-form-item>
775 <el-form-item>
776 <el-button round @click="selectActCountSubmit">查询数量</el-button>
777 </el-form-item>
778 </div>
779 </el-card>
780 </el-form>
781 </el-col>
782 </el-row>
747 </div> 783 </div>
748 </template> 784 </template>
749 785
...@@ -1043,6 +1079,18 @@ ...@@ -1043,6 +1079,18 @@
1043 tjteamOptions: [], 1079 tjteamOptions: [],
1044 tjfourOptions: [], 1080 tjfourOptions: [],
1045 tjfiveOptions: [], 1081 tjfiveOptions: [],
1082 selectActCount: {
1083 provinceCode: [{
1084 province_code: '',
1085 province_name: ''
1086 }],
1087 cityCode: [{
1088 city_code: '',
1089 city_name: ''
1090 }]
1091 },
1092 actProvinceOptions: [],
1093 actCityOptions: [],
1046 nlpApi: { 1094 nlpApi: {
1047 keyword: '', 1095 keyword: '',
1048 huanjing: [] 1096 huanjing: []
...@@ -1095,6 +1143,7 @@ ...@@ -1095,6 +1143,7 @@
1095 mounted() { 1143 mounted() {
1096 this.openToolPage(); 1144 this.openToolPage();
1097 this.loadProvince(); 1145 this.loadProvince();
1146 this.loadActProvince();
1098 this.tjloadProvince(); 1147 this.tjloadProvince();
1099 this.loadQueryProvince(); 1148 this.loadQueryProvince();
1100 }, 1149 },
...@@ -1137,6 +1186,19 @@ ...@@ -1137,6 +1186,19 @@
1137 console.log(error); 1186 console.log(error);
1138 }) 1187 })
1139 }, 1188 },
1189 loadActProvince() {
1190 let config = {
1191 headers: {
1192 'Content-Type': 'application/x-www-form-urlencoded'
1193 }
1194 }
1195 this.$http.get('/tool/loadProvince',config).then((res)=>{
1196 console.log(res);
1197 this.actProvinceOptions=res.data;
1198 }).catch(error=>{
1199 console.log(error);
1200 })
1201 },
1140 tjloadProvince() { 1202 tjloadProvince() {
1141 let config = { 1203 let config = {
1142 headers: { 1204 headers: {
...@@ -1173,6 +1235,23 @@ ...@@ -1173,6 +1235,23 @@
1173 console.log(error); 1235 console.log(error);
1174 }) 1236 })
1175 }, 1237 },
1238 actChangeProvince(value) {
1239 this.actCityOptions = [];
1240 this.selectActCount.cityCode = '';
1241 let config = {
1242 headers: {
1243 'Content-Type': 'application/x-www-form-urlencoded'
1244 }
1245 }
1246 this.$http.get('/tool/loadCity?'+this.$qs.stringify({
1247 code: value
1248 }),config).then((res)=>{
1249 console.log(res);
1250 this.actCityOptions=res.data;
1251 }).catch(error=>{
1252 console.log(error);
1253 })
1254 },
1176 tjchangeProvince(value) { 1255 tjchangeProvince(value) {
1177 this.tjcityOptions = []; 1256 this.tjcityOptions = [];
1178 this.tjteamOptions = []; 1257 this.tjteamOptions = [];
...@@ -1669,6 +1748,11 @@ ...@@ -1669,6 +1748,11 @@
1669 {method: this.apiTest.method, biz_data: this.apiTest.biz_data, phone: this.apiTest.phone, path: this.apiTest.path.toString(), type: this.apiTest.huanjing.toString()}}) 1748 {method: this.apiTest.method, biz_data: this.apiTest.biz_data, phone: this.apiTest.phone, path: this.apiTest.path.toString(), type: this.apiTest.huanjing.toString()}})
1670 window.open(href, '_blank') 1749 window.open(href, '_blank')
1671 }, 1750 },
1751 selectActCountSubmit() {
1752 const {href} = this.$router.resolve({ name:'selectActCount', query:
1753 {provinceCode: this.selectActCount.provinceCode.toString(), cityCode: this.selectActCount.cityCode.toString()}})
1754 window.open(href, '_blank')
1755 },
1672 changeOrgAllSubmit() { 1756 changeOrgAllSubmit() {
1673 let config = { 1757 let config = {
1674 headers: { 1758 headers: {
......
...@@ -22,6 +22,7 @@ import androidCode from '@/page/androidCode' ...@@ -22,6 +22,7 @@ import androidCode from '@/page/androidCode'
22 import queryTjAccount from '@/page/queryTjAccount' 22 import queryTjAccount from '@/page/queryTjAccount'
23 import testHouLi from '@/page/testHouLi' 23 import testHouLi from '@/page/testHouLi'
24 import chouJiang from '@/page/chouJiang' 24 import chouJiang from '@/page/chouJiang'
25 import selectActCount from '@/page/selectActCount'
25 26
26 Vue.use(Router) 27 Vue.use(Router)
27 28
...@@ -166,6 +167,14 @@ export default new Router({ ...@@ -166,6 +167,14 @@ export default new Router({
166 meta: { 167 meta: {
167 title: '测试工具平台' 168 title: '测试工具平台'
168 } 169 }
170 },
171 {
172 path: '/selectActCount',
173 component: selectActCount,
174 name: 'selectActCount',
175 meta: {
176 title: '测试工具平台'
177 }
169 } 178 }
170 ] 179 ]
171 }, 180 },
......