Commit c85709ed authored by wu's avatar wu

搜索页面

parent e92e4bff
npm install ionic serve ionic build --prod cordova build android --release cordova-hcp build jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore my-release-key.keystore app-release-unsigned.apk shreg shregshreg 显示的菜单代码,1通讯录,2审核审批,3办理督办,4数据报表,5信息查询,6审批,7审核,8事业单位,9机关群团 13321810809 qweasd123 npm install ionic serve ionic build --prod cordova build android --release cordova-hcp build jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore my-release-key.keystore app-release-unsigned.apk shreg shregshreg 显示的菜单代码,1通讯录,2审核审批,3办理督办,4数据报表,5信息查询,6审批,7审核,8事业单位,9机关群团,10行政执法 13321810809 qweasd123
\ No newline at end of file \ No newline at end of file
......
...@@ -117,8 +117,8 @@ ...@@ -117,8 +117,8 @@
</plugin> </plugin>
<chcp> <chcp>
<native-interface version="1" /> <native-interface version="1" />
<auto-download enabled="true" /> <auto-download enabled="false" />
<auto-install enabled="true" /> <auto-install enabled="false" />
<config-file url="https://www.cesdj.cn/www/chcp.json" /> <config-file url="https://www.cesdj.cn/www/chcp.json" />
</chcp> </chcp>
</widget> </widget>
{ {
"antogenerated": true,
"name": "shreg", "name": "shreg",
"min_native_interface": 1,
"ios_identifier": "com.shReg.start.h", "ios_identifier": "com.shReg.start.h",
"android_identifier": "com.shReg.start.h", "android_identifier": "http://d.6short.com/68jc",
"update": "resume", "update": "now",
"content_url": "https://www.cesdj.cn/www/" "content_url": "https://www.cesdj.cn/www/"
} }
安装依赖 安装依赖
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
跳板机 180.168.156.211 4123 root/Cesgroup123 跳板机 180.168.156.211 4123 root/Cesgroup123
ssh -p 4123 root@180.168.156.211 登录命令 ssh -p 4123 root@180.168.156.211 登录命令
scp -r -P 4123 www/ root@180.168.156.211:/root 上传文件命令 scp -r -P 4123 www/ root@180.168.156.211:/root 上传文件命令 ps:进去当前文件夹目录下运行
内网服务器:10.250.199.29 root/cesgroup 内网服务器:10.250.199.29 root/cesgroup
ssh -p 22 root@10.250.199.29 ssh -p 22 root@10.250.199.29
...@@ -16,6 +16,8 @@ scp -r www/ root@10.250.199.29:/usr/local/nginx/html 上传文件命令 ...@@ -16,6 +16,8 @@ scp -r www/ root@10.250.199.29:/usr/local/nginx/html 上传文件命令
服务器上面的前端代码目录 /usr/local/nginx/www 服务器上面的前端代码目录 /usr/local/nginx/www
vi nginx.conf
打包部署 打包部署
1、ionic build --prod 1、ionic build --prod
2、cordova-hcp build 2、cordova-hcp build
...@@ -26,5 +28,10 @@ scp -r www/ root@10.250.199.29:/usr/local/nginx/html 上传文件命令 ...@@ -26,5 +28,10 @@ scp -r www/ root@10.250.199.29:/usr/local/nginx/html 上传文件命令
android平台 android平台
1、cordova platform add android //添加Android平台,即生成android代码 1、cordova platform add android //添加Android平台,即生成android代码
2、cordova build android --release 目录/platform/android/app/build/output/release/app-unrelease.apk //生成android生产包,将html代码打包进入apk中 2、cordova build android --release 目录/platform/android/app/build/output/release/app-unrelease.apk //生成android生产包,将html代码打包进入apk中
3、签名命令:jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore my-release-key.keystore app-release-unsigned.apk shreg 3、2步骤有报错就把platform里面android导入到android studio 如果出现version版本问题。。。
4、拖到一个目录底下 => 签名命令:jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore my-release-key.keystore app-release-unsigned.apk shreg
密码 shregshreg 将apk签名 密码 shregshreg 将apk签名
13321810809
qweasd123
\ No newline at end of file
...@@ -717,8 +717,8 @@ ...@@ -717,8 +717,8 @@
}, },
"android-versions": { "android-versions": {
"version": "1.5.0", "version": "1.5.0",
"resolved": "http://r.cnpmjs.org/android-versions/download/android-versions-1.5.0.tgz", "resolved": "https://registry.npmjs.org/android-versions/-/android-versions-1.5.0.tgz",
"integrity": "sha1-d5C8dOCBKq/Wn7GtDLTbRHSlJdY=", "integrity": "sha512-/GWUAqa2OJNlDF5VGSe3SR1QMHEPXxx54Ur56r0qQC0H9FlBr7kyBF2SgVEhzFCPbrW4UcYgVuWrq/2Ty3QvXg==",
"requires": { "requires": {
"semver": "^5.4.1" "semver": "^5.4.1"
} }
...@@ -804,7 +804,7 @@ ...@@ -804,7 +804,7 @@
}, },
"array-ify": { "array-ify": {
"version": "1.0.0", "version": "1.0.0",
"resolved": "http://r.cnpmjs.org/array-ify/download/array-ify-1.0.0.tgz", "resolved": "https://registry.npmjs.org/array-ify/-/array-ify-1.0.0.tgz",
"integrity": "sha1-nlKHYrSpBmrRY6aWKjZEGOlibs4=" "integrity": "sha1-nlKHYrSpBmrRY6aWKjZEGOlibs4="
}, },
"array-union": { "array-union": {
...@@ -1570,7 +1570,7 @@ ...@@ -1570,7 +1570,7 @@
}, },
"compare-func": { "compare-func": {
"version": "1.3.2", "version": "1.3.2",
"resolved": "http://r.cnpmjs.org/compare-func/download/compare-func-1.3.2.tgz", "resolved": "https://registry.npmjs.org/compare-func/-/compare-func-1.3.2.tgz",
"integrity": "sha1-md0LpFfh+bxyKxLAjsM+6rMfpkg=", "integrity": "sha1-md0LpFfh+bxyKxLAjsM+6rMfpkg=",
"requires": { "requires": {
"array-ify": "^1.0.0", "array-ify": "^1.0.0",
...@@ -1763,8 +1763,8 @@ ...@@ -1763,8 +1763,8 @@
}, },
"cordova-android": { "cordova-android": {
"version": "8.1.0", "version": "8.1.0",
"resolved": "http://r.cnpmjs.org/cordova-android/download/cordova-android-8.1.0.tgz", "resolved": "https://registry.npmjs.org/cordova-android/-/cordova-android-8.1.0.tgz",
"integrity": "sha1-2a6mK75KTI0i/fIWFoaUOc0claA=", "integrity": "sha512-eAY6g9q3raJ4P03wNdSWC5MOW1EfxoomWNXsPhi7T6Q9yAqmxqn0sLEUjLL1Ib0LCH3nKQWBXdxapQ5LgbHu+g==",
"requires": { "requires": {
"android-versions": "^1.4.0", "android-versions": "^1.4.0",
"compare-func": "^1.3.2", "compare-func": "^1.3.2",
...@@ -1776,9 +1776,9 @@ ...@@ -1776,9 +1776,9 @@
}, },
"dependencies": { "dependencies": {
"nopt": { "nopt": {
"version": "4.0.1", "version": "4.0.3",
"resolved": "http://r.cnpmjs.org/nopt/download/nopt-4.0.1.tgz", "resolved": "https://registry.npmjs.org/nopt/-/nopt-4.0.3.tgz",
"integrity": "sha1-0NRoWv1UFRk8jHUFYC0NF81kR00=", "integrity": "sha512-CvaGwVMztSMJLOeXPrez7fyfObdZqNUK1cPAEzLHrTybIua9pMdmmPR5YwtfNftIOMv3DPUhFaxsZMNTQO20Kg==",
"requires": { "requires": {
"abbrev": "1", "abbrev": "1",
"osenv": "^0.1.4" "osenv": "^0.1.4"
...@@ -1979,7 +1979,7 @@ ...@@ -1979,7 +1979,7 @@
"integrity": "sha1-1qHVBjKv8qcCJxAvaLxgXpGqvKI=" "integrity": "sha1-1qHVBjKv8qcCJxAvaLxgXpGqvKI="
}, },
"cordova-plugin-network-information": { "cordova-plugin-network-information": {
"version": "git+https://github.com/apache/cordova-plugin-network-information.git#97a4967a2e0f0324db4a6d789477ec5f761f2770", "version": "git+https://github.com/apache/cordova-plugin-network-information.git#88ecf0b427ebd4a79457e6afbc682d1d3ad1b981",
"from": "git+https://github.com/apache/cordova-plugin-network-information.git" "from": "git+https://github.com/apache/cordova-plugin-network-information.git"
}, },
"cordova-plugin-photo-library": { "cordova-plugin-photo-library": {
...@@ -2417,7 +2417,7 @@ ...@@ -2417,7 +2417,7 @@
}, },
"dot-prop": { "dot-prop": {
"version": "3.0.0", "version": "3.0.0",
"resolved": "http://r.cnpmjs.org/dot-prop/download/dot-prop-3.0.0.tgz", "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-3.0.0.tgz",
"integrity": "sha1-G3CK8JSknJoOfbyteQq6U52sEXc=", "integrity": "sha1-G3CK8JSknJoOfbyteQq6U52sEXc=",
"requires": { "requires": {
"is-obj": "^1.0.0" "is-obj": "^1.0.0"
...@@ -4149,7 +4149,7 @@ ...@@ -4149,7 +4149,7 @@
}, },
"is-obj": { "is-obj": {
"version": "1.0.1", "version": "1.0.1",
"resolved": "http://r.cnpmjs.org/is-obj/download/is-obj-1.0.1.tgz", "resolved": "https://registry.npmjs.org/is-obj/-/is-obj-1.0.1.tgz",
"integrity": "sha1-PkcprB9f3gJc19g6iW2rn09n2w8=" "integrity": "sha1-PkcprB9f3gJc19g6iW2rn09n2w8="
}, },
"is-plain-object": { "is-plain-object": {
...@@ -5546,7 +5546,7 @@ ...@@ -5546,7 +5546,7 @@
}, },
"properties-parser": { "properties-parser": {
"version": "0.3.1", "version": "0.3.1",
"resolved": "http://r.cnpmjs.org/properties-parser/download/properties-parser-0.3.1.tgz", "resolved": "https://registry.npmjs.org/properties-parser/-/properties-parser-0.3.1.tgz",
"integrity": "sha1-ExbpU5/7/ZOEXjabIRAiq9R4dxo=", "integrity": "sha1-ExbpU5/7/ZOEXjabIRAiq9R4dxo=",
"requires": { "requires": {
"string.prototype.codepointat": "^0.2.0" "string.prototype.codepointat": "^0.2.0"
...@@ -6835,8 +6835,8 @@ ...@@ -6835,8 +6835,8 @@
}, },
"string.prototype.codepointat": { "string.prototype.codepointat": {
"version": "0.2.1", "version": "0.2.1",
"resolved": "http://r.cnpmjs.org/string.prototype.codepointat/download/string.prototype.codepointat-0.2.1.tgz", "resolved": "https://registry.npmjs.org/string.prototype.codepointat/-/string.prototype.codepointat-0.2.1.tgz",
"integrity": "sha1-AErUTIr8cnUnsQjNRitNlxzUabw=" "integrity": "sha512-2cBVCj6I4IOvEnjgO/hWqXjqBGsY+zwPmHl12Srk9IXSZ56Jwwmy+66XO5Iut/oQVR7t5ihYdLB0GMa4alEUcg=="
}, },
"string.prototype.trim": { "string.prototype.trim": {
"version": "1.1.2", "version": "1.1.2",
......
...@@ -108,13 +108,18 @@ ...@@ -108,13 +108,18 @@
"cordova-plugin-screen-orientation": {}, "cordova-plugin-screen-orientation": {},
"phonegap-plugin-mobile-accessibility": {}, "phonegap-plugin-mobile-accessibility": {},
"cordova-plugin-file-transfer": {}, "cordova-plugin-file-transfer": {},
"cordova-plugin-photo-library": {}, "cordova-plugin-photo-library": {
"cordova-plugin-camera": {}, "PHOTO_LIBRARY_USAGE_DESCRIPTION": " "
},
"cordova-plugin-camera": {
"ANDROID_SUPPORT_V4_VERSION": "27.+"
},
"cordova-hot-code-push-plugin": {} "cordova-hot-code-push-plugin": {}
}, },
"platforms": [ "platforms": [
"browser", "browser",
"ios" "ios",
"android"
] ]
} }
} }
\ No newline at end of file
import * as Mock from 'mockjs'; export const SERVER_API_URL = '/shfrdj';// export const SERVER_API_URL = 'http://61.152.117.206/shfrdj'; export const SERVER_API_WEB = '/shfrdjweb'; // export const SERVER_API_WEB = 'http://61.152.117.206/'; // export const SERVER_API_BBWX = '/bbwx'; export const SERVER_API_BBWX = 'https://www.cesdj.cn/bbwx'; Mock.setup( { timeout: 50, } ); export const institutionalNature = [ {label: '挂牌机构', value: '8'}, {label: '内设机构', value: '7'}, {label: '派驻机关', value: '6'}, {label: '派出机构', value: '5'}, {label: '分支机构', value: '4'}, {label: '临时机构', value: '3'}, {label: '议事协调机构', value: '2'}, {label: '挂靠机构', value: '1'}, ] import * as Mock from 'mockjs';
\ No newline at end of file
let hostname = window.location.hostname
export const SERVER_API_URL = hostname === 'localhost' ? '/shfrdj' : 'http://61.152.117.206/shfrdj';
// export const SERVER_API_URL = 'http://61.152.117.206/shfrdj';
export const SERVER_API_WEB = hostname === 'localhost' ? '/shfrdjweb' : 'http://61.152.117.206/';
// export const SERVER_API_WEB = 'http://61.152.117.206/';
// export const SERVER_API_BBWX = '/bbwx';
export const SERVER_API_BBWX = 'https://www.cesdj.cn/bbwx';
Mock.setup(
{
timeout: 50,
}
);
export const institutionalNature = [
{label: '挂牌机构', value: '8'},
{label: '内设机构', value: '7'},
{label: '派驻机关', value: '6'},
{label: '派出机构', value: '5'},
{label: '分支机构', value: '4'},
{label: '临时机构', value: '3'},
{label: '议事协调机构', value: '2'},
{label: '挂靠机构', value: '1'},
]
...@@ -11,6 +11,7 @@ import {VideojsComponent} from "./videojs/videojs"; ...@@ -11,6 +11,7 @@ import {VideojsComponent} from "./videojs/videojs";
import {SearchPersonComponent} from './search-person/search-person'; import {SearchPersonComponent} from './search-person/search-person';
import {EchartDataComponent} from './echart-data/echart-data'; import {EchartDataComponent} from './echart-data/echart-data';
import {FilterComponent} from './filter/filter'; import {FilterComponent} from './filter/filter';
import {SearchFilterComponent} from './search-filter/search-filter';
@NgModule({ @NgModule({
...@@ -27,6 +28,7 @@ import {FilterComponent} from './filter/filter'; ...@@ -27,6 +28,7 @@ import {FilterComponent} from './filter/filter';
SearchPersonComponent, SearchPersonComponent,
EchartDataComponent, EchartDataComponent,
FilterComponent, FilterComponent,
SearchFilterComponent,
], ],
imports: [ imports: [
IonicPageModule IonicPageModule
...@@ -44,6 +46,7 @@ import {FilterComponent} from './filter/filter'; ...@@ -44,6 +46,7 @@ import {FilterComponent} from './filter/filter';
SearchPersonComponent, SearchPersonComponent,
EchartDataComponent, EchartDataComponent,
FilterComponent, FilterComponent,
SearchFilterComponent,
], ],
providers: [ providers: [
CommentComponent, CommentComponent,
...@@ -59,6 +62,7 @@ import {FilterComponent} from './filter/filter'; ...@@ -59,6 +62,7 @@ import {FilterComponent} from './filter/filter';
VideojsComponent, VideojsComponent,
SearchPersonComponent, SearchPersonComponent,
FilterComponent, FilterComponent,
SearchFilterComponent,
], ],
schemas: [NO_ERRORS_SCHEMA] schemas: [NO_ERRORS_SCHEMA]
}) })
......
<!-- Generated template for the SearchSidebarComponent component -->
<div class="search-sidebar">
<div class="all-address">
<div>
<p>隶属</p>
<span (click)="selectArea(item)" *ngFor="let item of areaList"
[ngClass]="{'selectItem':areaObj?.code == item.code}">{{item.name}}</span>
</div>
<div>
<p>行业</p>
<span (click)="selectIndustry(item)" *ngFor="let item of industryList"
[ngClass]="{'selectItem':industryObj?.code == item.code}">{{item.name}}</span>
</div>
<div>
<p>经费来源</p>
<span (click)="selectFunding(item)" *ngFor="let item of fundingList"
[ngClass]="{'selectItem':fundingObj?.code == item.code}">{{item.name}}</span>
</div>
<div>
<p>单位类别</p>
<span (click)="selectCause(item)" *ngFor="let item of causeList"
[ngClass]="{'selectItem':causeObj?.code == item.code}">{{item.name}}</span>
</div>
</div>
<div class="footer">
<div tappable (click)="reset()">重置</div>
<div tappable (click)="confirm()">确定</div>
</div>
</div>
search-filter {
.search-sidebar {
position: relative;
height: 100%;
width: 90%;
background-color: #fff;
padding: 16px 16px 60px 20px;
overflow: scroll;
> p {
font-size: 16px;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: rgba(51, 51, 51, 1);
line-height: 22px;
margin: 15px 0;
}
.address, .teacher {
background: rgba(238, 238, 238, 1);
border-radius: 15px;
padding-left: 10px;
}
.footer {
position: fixed;
left: 0;
bottom: 0;
width: 90%;
height: 58px;
background: rgba(255, 255, 255, 1);
display: flex;
align-items: center;
justify-content: center;
div {
width: 100px;
height: 32px;
font-size: 14px;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
color: #ffffff;
line-height: 32px;
text-align: center;
}
div:first-child {
border-top-left-radius: 16px;
border-bottom-left-radius: 16px;
background: linear-gradient(100deg, #b2cce4 0%, #86aed3 100%);
}
div:last-child {
border-top-right-radius: 16px;
border-bottom-right-radius: 16px;
background-color: #5c92c8;
//background: linear-gradient(100deg, #fed675 0%, rgba(255, 201, 45, 1) 100%);
}
}
}
.time {
display: flex;
align-items: center;
padding: 0;
position: relative;
.heng {
font-size: 40px;
font-weight: 200;
padding: 0 2px;
}
}
ion-datetime.datetime-ios {
background-color: #eee;
border-radius: 15px;
width: 48%;
padding: 11px 3px 11px 11px;
}
ion-datetime + {
margin-left: 5px;
}
.time2 {
.item-cover {
right: 0;
left: auto;
width: 50%;
}
}
.time1 {
.item-cover {
left: 0;
width: 50%;
}
}
.all-address {
p {
font-family: PingFangSC-Regular, PingFang SC;
font-weight: bold;
color: #333;
line-height: 16px;
margin-bottom: 10px;
width: 100%;
}
>div{
margin-bottom: 10px;
display: flex;
flex-wrap: wrap;
justify-content: space-between;
>span{
width: 31%;
background-color: #F2F2F2;
border: 1px solid #f2f2f2;
border-radius: 4px;
padding: 5px 0;
text-align: center;
margin-bottom: 10px;
display: inline-block;
vertical-align: text-top;
}
}
>div:after{
content: '';
width: 30%;
}
}
.selectItem {
color: #ffffff;
background: linear-gradient(242deg, #b2cce4 0%, #5c92c8 100%);
}
}
import {Component} from '@angular/core';
import {NavParams, ViewController} from "ionic-angular";
import {LoginService} from "../../pages/login/login.service";
import {HomeService} from "../../pages/home/home.service";
import {GlobalData} from "../../core/GlobleData";
import {Storage} from "@ionic/storage";
@Component({
selector: 'search-filter',
templateUrl: 'search-filter.html'
})
export class SearchFilterComponent {
text: string;
areaObj;
industryObj;
fundingObj;
causeObj;
areaList = [];
industryList = [];
fundingList = [];
causeList = [];
constructor(private viewCtrl: ViewController, private params: NavParams,
private globle: GlobalData,
private storage: Storage,
private loginSer: LoginService,
private HomeSer: HomeService) {
// this.areaObj = this.params.get("areaObj");
this.getInit()
}
getInit(){
this.getArea()
this.getIndustryList()
this.getFundingList()
this.getCauseList()
}
//获取区属
getArea() {
const data = {};
this.loginSer.getArea(data).subscribe(
(res) => {
if (res.list) {
this.areaList = res.list;
this.areaList.unshift({code: "", name: "全市"})
this.areaList.splice(2, 0, {code: "-1", name: "区属"})
}
}
)
}
//获取行业
getIndustryList() {
const data = {};
this.HomeSer.getIndustryList(data).subscribe(
(res) => {
if (res.list) {
this.industryList = res.list;
this.industryList = this.industryList.filter(x => x.code == '01' || x.code == '04' || x.code == '02' || x.code == '03' || x.code == '08')
this.industryList.push({code: "-1", name: "其他"})
}
}
)
}
//获取经费来源
getFundingList() {
const data = {};
this.HomeSer.getFundingList(data).subscribe(
(res) => {
if (res.list) {
this.fundingList = res.list;
}
}
)
}
//获取单位类别
getCauseList() {
const data = {};
this.HomeSer.getCauseList(data).subscribe(
(res) => {
if (res.list) {
this.causeList = res.list;
this.causeList = this.causeList.filter(x => x.code == '1' || x.code == '2' || x.code == '3' || x.code == '4' || x.code == '5' || x.code == '6' || x.code == '7' || x.code == '8')
}
}
)
}
//区域选择
selectArea(value) {
this.areaObj = value;
}
//行业选择
selectIndustry(value) {
this.industryObj = value;
}
//经费来源选择
selectFunding(value) {
this.fundingObj = value;
}
//单位类别选择
selectCause(value) {
this.causeObj = value;
}
//重置
reset() {
this.areaObj = null;
this.industryObj = null;
this.fundingObj = null;
this.causeObj = null;
}
//确定
confirm() {
const data = {
area: this.areaObj,
industry: this.industryObj,
funding: this.fundingObj,
cause: this.causeObj,
};
this.viewCtrl.dismiss(data);
}
}
import {Injectable} from '@angular/core'; /** * 全局变量 */ @Injectable()export class GlobalData { private _videoNum: number = 1; // 播放器状态 private _token: string; private _userObj: any; private _area: any; private _roles: any; get videoNum(): number { return this._videoNum; } set videoNum(value: number) { this._videoNum = value; } //token get token(): string { return this._token; } set token(value: string) { this._token = value; } //用户信息 get userObj(): any { return this._userObj; } set userObj(value: any) { this._userObj = value; } //区属or市属 get area(): any { return this._area; } set area(value: any) { this._area = value; } //权限 get roles(): any { return this._roles; } set roles(value: any) { this._roles = value; } } import {Injectable} from '@angular/core'; /** * 全局变量 */ @Injectable()export class GlobalData { private _videoNum: number = 1; // 播放器状态 private _token: string; private _userObj: any; private _area: any; private _roles: any; private _history: Array<String>; get videoNum(): number { return this._videoNum; } set videoNum(value: number) { this._videoNum = value; } //token get token(): string { return this._token; } set token(value: string) { this._token = value; } //用户信息 get userObj(): any { return this._userObj; } set userObj(value: any) { this._userObj = value; } //区属or市属 get area(): any { return this._area; } set area(value: any) { this._area = value; } //权限 get roles(): any { return this._roles; } set roles(value: any) { this._roles = value; } //搜索的历史记录 get history(): any { return this._history; } set history(value: any) { this._history = value; } }
\ No newline at end of file \ No newline at end of file
......
import {AlertController, App, Events} from 'ionic-angular';import {HttpEvent, HttpHandler, HttpInterceptor, HttpRequest, HttpResponse} from '@angular/common/http';import {Injectable} from '@angular/core';import {Storage} from '@ionic/storage'; import {Observable} from 'rxjs';import {_throw} from 'rxjs/observable/throw';import {CommonService} from "./common.service";import {GlobalData} from "./GlobleData"; /** * http拦截器 增加token信息 */ @Injectable()export class InterceptorProvider implements HttpInterceptor { constructor(private storage: Storage, private alertCtrl: AlertController, private events: Events, private commonSer: CommonService, private app: App, private globle: GlobalData) { } // Intercepts all HTTP requests! intercept(request: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>> { const data = this.storage.get(''); return Observable.fromPromise(data) .mergeMap(data => { let clonedReq = this.addToken(request, data); return next.handle(clonedReq).do(res => { if (res instanceof HttpResponse) { this.message(res.body); } }, (error) => { let msg = error.message; this.errorMessage(error); // Pass the error to the caller of the function return _throw(error); }, () => { }) }); } // Adds the token to your headers if it exists private addToken(request: HttpRequest<any>, token: any) { let body; if (request.method == "POST") { body = Object.assign(request.body, {}); if (this.globle.token) { body = Object.assign(body, {"token": this.globle.token}); } if (this.globle.userObj && this.globle.userObj.userid) { body = Object.assign(body, {"userid": this.globle.userObj.userid}); } } if (token) { let clone: HttpRequest<any>; if (request.method == "POST") { clone = request.clone({ setHeaders: { // "Accept": `application/json`, 'Content-Type': `application/json;charset=UTF-8`, }, body: body }); } else { clone = request.clone({ setHeaders: { // "Accept": `application/json`, 'Content-Type': `application/json;charset=UTF-8`, }, }); } return clone; } return request; } //code message message(data) { if (data.code) { let code = data.code; if (code == "401") { this.commonSer.toast("登录已过期"); this.storage.clear(); this.events.publish('toLogin'); } else if (code == "-1") { let alert = this.alertCtrl.create({ title: "提示", message: `${data.msg}。`, buttons: ['确定'] }); alert.present(); } if (code == 500) { let alert = this.alertCtrl.create({ title: "提示", message: `${data.msg}。`, buttons: ['确定'] }); alert.present(); } } } //error message errorMessage(data) { if (data.status) { let code = data.status; if (code != 200) { let alert = this.alertCtrl.create({ title: "错误", message: `错误码:${code}。`, buttons: ['确定'] }); alert.present(); } } } } import {AlertController, App, Events} from 'ionic-angular';import {HttpEvent, HttpHandler, HttpInterceptor, HttpRequest, HttpResponse} from '@angular/common/http';import {Injectable} from '@angular/core';import {Storage} from '@ionic/storage'; import {Observable} from 'rxjs';import {_throw} from 'rxjs/observable/throw';import {CommonService} from "./common.service";import {GlobalData} from "./GlobleData"; /** * http拦截器 增加token信息 */ @Injectable()export class InterceptorProvider implements HttpInterceptor { constructor(private storage: Storage, private alertCtrl: AlertController, private events: Events, private commonSer: CommonService, private app: App, private globle: GlobalData) { } // Intercepts all HTTP requests! intercept(request: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>> { const data = this.storage.get(''); return Observable.fromPromise(data) .mergeMap(data => { let clonedReq = this.addToken(request, data); return next.handle(clonedReq).do(res => { if (res instanceof HttpResponse) { this.message(res.body); } }, (error) => { let msg = error.message; this.errorMessage(error); // Pass the error to the caller of the function return _throw(error); }, () => { }) }); } // Adds the token to your headers if it exists private addToken(request: HttpRequest<any>, token: any) { let body; if (request.method == "POST") { body = Object.assign(request.body, {}); if (this.globle.token) { body = Object.assign(body, {"token": this.globle.token}); } if (this.globle.userObj && this.globle.userObj.userid) { body = Object.assign(body, {"userid": this.globle.userObj.userid}); } } if (token) { let clone: HttpRequest<any>; if (request.method == "POST") { clone = request.clone({ setHeaders: { // "Accept": `application/json`, 'Content-Type': `application/json;charset=UTF-8`, }, body: body }); } else { clone = request.clone({ setHeaders: { // "Accept": `application/json`, 'Content-Type': `application/json;charset=UTF-8`, }, }); } return clone; } return request; } //code message message(data) { if (data.code) { let code = data.code; if (code == "401") { this.commonSer.toast("登录已过期"); this.storage.clear(); this.events.publish('toLogin'); } else if (code == "-1") { let alert = this.alertCtrl.create({ title: "提示", // message: `${data.msg}。`, message: `网络错误`, buttons: ['确定'] }); alert.present(); } if (code == 500) { let alert = this.alertCtrl.create({ title: "提示", message: `${data.msg}。`, buttons: ['确定'] }); alert.present(); } } } //error message errorMessage(data) { if (data.status) { let code = data.status; if (code != 200) { let alert = this.alertCtrl.create({ title: "错误", message: `错误码:${code}。`, buttons: ['确定'] }); alert.present(); } } } }
\ No newline at end of file \ No newline at end of file
......
...@@ -40,9 +40,12 @@ export class ContactListPage { ...@@ -40,9 +40,12 @@ export class ContactListPage {
areacode: this.area.code, areacode: this.area.code,
role: this.role, role: this.role,
}; };
// debugger
console.log(` 查看role: + ${this.role}`)
this.homeSer.getOrgList(data).subscribe( this.homeSer.getOrgList(data).subscribe(
(res) => { (res) => {
this.page.list = res.list.user.filter(e => e.orderNum != "" && e.areacode == this.area.code); this.page.list = res.list.user.filter(e => e.orderNum != "" && e.areacode == this.area.code);
res.list.user.map(x=> x.role == 4 ? x.mobilePhone = x.mobilePhone.replace(/^(.*).{4}$/, "$1****") : '')
this.page.noNumList = res.list.user.filter(e => e.orderNum == "" && e.areacode == this.area.code); this.page.noNumList = res.list.user.filter(e => e.orderNum == "" && e.areacode == this.area.code);
this.page.list.sort((a, b) => a.orderNum - b.orderNum); this.page.list.sort((a, b) => a.orderNum - b.orderNum);
console.log(this.page.list); console.log(this.page.list);
......
...@@ -10,7 +10,8 @@ export class ContactRolePage { ...@@ -10,7 +10,8 @@ export class ContactRolePage {
roleList = [ roleList = [
{value: 0, label: '管理员'}, {value: 0, label: '管理员'},
{value: 1, label: '单位领导'}, {value: 4, label: '办领导'},
{value: 1, label: '处领导'},
{value: 2, label: '工作人员'}, {value: 2, label: '工作人员'},
{value: 3, label: '其他人员'}, {value: 3, label: '其他人员'},
]; ];
......
...@@ -108,10 +108,23 @@ export class DataReportPage { ...@@ -108,10 +108,23 @@ export class DataReportPage {
height: "70%", height: "70%",
containLabel: true containLabel: true
}, },
legend: {
icon: 'rect',
itemWidth: 14,
itemHeight: 5,
itemGap: 13,
data: ['编制人数(人)', '实有人数(人)'],
right: '4%',
textStyle: {
fontSize: 12,
color: '#999'
},
show: this.type !== 'unit'
},
tooltip: { tooltip: {
trigger: 'axis', trigger: 'axis',
axisPointer: { axisPointer: {
type: 'cross', type: this.type == 'unit' ? 'cross' : 'linear',
crossStyle: { crossStyle: {
color: '#999' color: '#999'
} }
...@@ -124,11 +137,12 @@ export class DataReportPage { ...@@ -124,11 +137,12 @@ export class DataReportPage {
return e.geoApp; return e.geoApp;
}), }),
axisPointer: { axisPointer: {
type: 'shadow' type: this.type == 'unit' ? 'shadow' : 'line',
snap: true,
}, },
axisLabel: { axisLabel: {
interval: 0, interval: 0,
formatter: function (value) { formatter:function (value) {
return value.split("").join("\n") return value.split("").join("\n")
} }
} }
...@@ -138,10 +152,10 @@ export class DataReportPage { ...@@ -138,10 +152,10 @@ export class DataReportPage {
type: 'value', type: 'value',
min: 0, min: 0,
}, },
series: [ series: this.type == 'unit' ? [
{ {
name: this.type == 'unit' ? '单位数(个)' : this.type == 'syrs' ? '实有人数(人)' : '编制人数(人)', name: this.type == 'unit' ? '单位数(个)' : this.type == 'syrs' ? '实有人数(人)' : '编制人数(人)',
type: 'bar', type: this.type == 'unit' ? 'bar' : 'line',
data: this.unitsInfo.map(e => { data: this.unitsInfo.map(e => {
let d; let d;
if (this.type == 'unit') { if (this.type == 'unit') {
...@@ -155,8 +169,21 @@ export class DataReportPage { ...@@ -155,8 +169,21 @@ export class DataReportPage {
} }
return d; return d;
}), }),
color: ['#feda66'] color: ['#feda66'],
}
] : [
{
name: '编制人数(人)',
type: 'line',
data: this.unitsInfo.map(e => e.bzrsTotal),
color: ['#fad049'],
}, },
{
name: '实有人数(人)',
type: 'line',
data: this.unitsInfo.map(e => e.syrsTotal),
color: ['#0000ff'],
}
] ]
}; };
echarts.init(this.echart1.nativeElement).setOption(this.echartData1, true); echarts.init(this.echart1.nativeElement).setOption(this.echartData1, true);
......
import {HttpClient} from "@angular/common/http";import {Injectable} from "@angular/core";import {Observable} from "rxjs/Observable";import {SERVER_API_URL, SERVER_API_WEB} from "../../app/app.constants";import {HTTP} from "@ionic-native/http";import {DataFormatService} from "../../core/dataFormat.service"; @Injectable()export class HomeService { constructor(private http: HttpClient, private nativeHttp: HTTP, private dataFormat: DataFormatService) { } //单位信息总揽 units(data): Observable<any> { return this.http.post(SERVER_API_URL + '/statis/units.do', data); } //通讯录 getOrgList(data): Observable<any> { return this.http.post(SERVER_API_URL + '/user/addressinfo.do',data); } //部门人员 getPersonList(data): Observable<any> { return this.http.post(SERVER_API_URL + '/user/getPersonList.do',data); } //事项督办 searchDb(data): Observable<any> { return this.http.post(SERVER_API_URL + '/schedule/search_db.do', data); } //督办操作 dbSuper(data): Observable<any> { return this.http.post(SERVER_API_URL + '/schedule/super.do', data); } //获取附件信息接口 fileAttach(data): Observable<any> { return this.http.post(SERVER_API_URL + '/user/Attach.do', data); } //获取系统中区划信息的接口 getArea(data): Observable<any> { return this.http.post(SERVER_API_URL + '/user/area.do', data); } //实名制上报率排行榜 shangbaolv(data): Observable<any> { return this.http.post(SERVER_API_URL + '/statis/shangbaolv.do', data); } //事业单位信息查询 unitfind(data): Observable<any> { return this.http.post(SERVER_API_WEB + '/infomation/unitfind.do', data); } //机关群团信息查询 creditorgan(data): Observable<any> { return this.http.post(SERVER_API_WEB + '/infomation/creditorgan.do', data); } //年度报告 yearreportdetail(data): Observable<any> { return this.http.post(SERVER_API_WEB + '/infomation/yearreportdetail.do', data); } //事业单位查询 人员信息情况 statisticPerson(data): Observable<any> { return this.http.post(SERVER_API_URL + '/statis/statisticPerson.do', data); } //数据报表 statisticUnitcatetory(data): Observable<any> { return this.http.post(SERVER_API_URL + '/statis/statisticUnitcatetory.do', data); } } import {HttpClient} from "@angular/common/http";import {Injectable} from "@angular/core";import {Observable} from "rxjs/Observable";import {SERVER_API_URL, SERVER_API_WEB} from "../../app/app.constants";import {HTTP} from "@ionic-native/http";import {DataFormatService} from "../../core/dataFormat.service"; @Injectable()export class HomeService { constructor(private http: HttpClient, private nativeHttp: HTTP, private dataFormat: DataFormatService) { } //单位信息总揽 units(data): Observable<any> { return this.http.post(SERVER_API_URL + '/statis/units.do', data); } //通讯录 getOrgList(data): Observable<any> { return this.http.post(SERVER_API_URL + '/user/addressinfo.do',data); } //部门人员 getPersonList(data): Observable<any> { return this.http.post(SERVER_API_URL + '/user/getPersonList.do',data); } //事项督办 searchDb(data): Observable<any> { return this.http.post(SERVER_API_URL + '/schedule/search_db.do', data); } //督办操作 dbSuper(data): Observable<any> { return this.http.post(SERVER_API_URL + '/schedule/super.do', data); } //获取附件信息接口 fileAttach(data): Observable<any> { return this.http.post(SERVER_API_URL + '/user/Attach.do', data); } //获取系统中区划信息的接口 getArea(data): Observable<any> { return this.http.post(SERVER_API_URL + '/user/area.do', data); } //实名制上报率排行榜 shangbaolv(data): Observable<any> { return this.http.post(SERVER_API_URL + '/statis/shangbaolv.do', data); } //事业单位信息查询 unitfind(data): Observable<any> { return this.http.post(SERVER_API_WEB + '/infomation/unitfind.do', data); } //机关群团信息查询 creditorgan(data): Observable<any> { return this.http.post(SERVER_API_WEB + '/infomation/creditorgan.do', data); } //年度报告 yearreportdetail(data): Observable<any> { return this.http.post(SERVER_API_WEB + '/infomation/yearreportdetail.do', data); } //事业单位查询 人员信息情况 statisticPerson(data): Observable<any> { return this.http.post(SERVER_API_URL + '/statis/statisticPerson.do', data); } //数据报表 statisticUnitcatetory(data): Observable<any> { return this.http.post(SERVER_API_URL + '/statis/statisticUnitcatetory.do', data); } //行业分类 getIndustryList(data): Observable<any> { return this.http.post(SERVER_API_URL + '/user/industry_classification.do', data); } //经费形式 getFundingList(data): Observable<any> { return this.http.post(SERVER_API_URL + '/user/jfxs.do', data); } //事业单位 getCauseList(data): Observable<any> { return this.http.post(SERVER_API_URL + '/user/unit_type.do', data); } }
\ No newline at end of file \ No newline at end of file
......
...@@ -155,10 +155,23 @@ export class HomePage { ...@@ -155,10 +155,23 @@ export class HomePage {
height: "70%", height: "70%",
containLabel: true containLabel: true
}, },
legend: {
icon: 'rect',
itemWidth: 14,
itemHeight: 5,
itemGap: 13,
data: ['编制人数(人)', '实有人数(人)'],
right: '4%',
textStyle: {
fontSize: 12,
color: '#999'
},
show: this.type !== 'unit'
},
tooltip: { tooltip: {
trigger: 'axis', trigger: 'axis',
axisPointer: { axisPointer: {
type: 'cross', type: this.type == 'unit' ? 'cross' : 'linear',
crossStyle: { crossStyle: {
color: '#999' color: '#999'
} }
...@@ -171,7 +184,8 @@ export class HomePage { ...@@ -171,7 +184,8 @@ export class HomePage {
return e.geoApp; return e.geoApp;
}), }),
axisPointer: { axisPointer: {
type: 'shadow' type: this.type == 'unit' ? 'shadow' : 'line',
snap: true,
}, },
axisLabel: { axisLabel: {
interval: 0, interval: 0,
...@@ -185,10 +199,10 @@ export class HomePage { ...@@ -185,10 +199,10 @@ export class HomePage {
type: 'value', type: 'value',
min: 0, min: 0,
}, },
series: [ series: this.type == 'unit' ? [
{ {
name: this.type == 'unit' ? '单位数(个)' : this.type == 'syrs' ? '实有人数(人)' : '编制人数(人)', name: this.type == 'unit' ? '单位数(个)' : this.type == 'syrs' ? '实有人数(人)' : '编制人数(人)',
type: 'bar', type: this.type == 'unit' ? 'bar' : 'line',
data: this.unitsInfo.map(e => { data: this.unitsInfo.map(e => {
let d; let d;
if (this.type == 'unit') { if (this.type == 'unit') {
...@@ -202,8 +216,21 @@ export class HomePage { ...@@ -202,8 +216,21 @@ export class HomePage {
} }
return d; return d;
}), }),
color: ['#feda66'] color: ['#feda66'],
}
] : [
{
name: '编制人数(人)',
type: 'line',
data: this.unitsInfo.map(e => e.bzrsTotal),
color: ['#fad049'],
}, },
{
name: '实有人数(人)',
type: 'line',
data: this.unitsInfo.map(e => e.syrsTotal),
color: ['#0000ff'],
}
] ]
}; };
echarts.init(this.echart.nativeElement).setOption(this.echartData, true); echarts.init(this.echart.nativeElement).setOption(this.echartData, true);
......
...@@ -14,31 +14,47 @@ ...@@ -14,31 +14,47 @@
</ion-navbar> </ion-navbar>
<ion-navbar class="input-search"> <ion-navbar class="input-search">
<div class="search-input"> <div class="search-input">
<ion-input type="text" placeholder="请输入统一社会信用代码或者单位名称" [(ngModel)]="info.search"></ion-input> <!--选择-->
<span class="clear" tappable (click)="getList()">搜索</span> <ion-item class="select">
<ion-select [(ngModel)]="info.type" (ngModelChange)="switchType()" interface="popover" placeholder="请选择">
<div *ngFor="let typeData of info.typeDataArr">
<ion-option [value]="typeData?.id">{{typeData?.lable}}</ion-option>
</div>
</ion-select>
</ion-item>
<!--input框-->
<ion-input type="text" placeholder="请输入" [(ngModel)]="info.search"></ion-input>
<span class="clear search" [ngStyle]="{'right': option.type === '1' ? '19%' : '7%'}" tappable (click)="getList()"></span>
<span *ngIf="option.type === '1'" class="clear filter" tappable (click)="filterConditions()">筛选</span>
</div> </div>
</ion-navbar> </ion-navbar>
</ion-header> </ion-header>
<ion-content> <ion-content>
<ion-refresher (ionRefresh)="getList($event)"> <ul *ngIf="!info.search" class="history">
<ion-refresher-content pullingText="下拉刷新" <h6>历史记录</h6>
refreshingSpinner="bubbles"> <li *ngFor="let item of option.history" (click)="historyField(item)">{{item}}</li>
</ion-refresher-content> </ul>
</ion-refresher> <div *ngIf="info.search">
<div class="list"> <ion-refresher (ionRefresh)="getList($event)">
<div *ngFor="let item of info.list" (click)="goToDetail(item)"> <ion-refresher-content pullingText="下拉刷新"
<div class="group"> refreshingSpinner="bubbles">
<div class="inner-group"> </ion-refresher-content>
<p *ngIf="option.viewType == '1'" class="person-name">{{item?.mc}}</p> </ion-refresher>
<p *ngIf="option.viewType == '2'" class="person-name">{{item?.name}}</p> <div class="list">
<div *ngFor="let item of info.list" (click)="goToDetail(item)">
<div class="group">
<div class="inner-group">
<p *ngIf="option.viewType == '1'" class="person-name">{{item?.mc}}</p>
<p *ngIf="option.viewType == '2'" class="person-name">{{item?.name}}</p>
</div>
</div> </div>
</div> </div>
</div> </div>
<ion-infinite-scroll (ionInfinite)="doInfinite($event)">
<ion-infinite-scroll-content
loadingSpinner="bubbles"
loadingText="加载中"></ion-infinite-scroll-content>
</ion-infinite-scroll>
</div> </div>
<ion-infinite-scroll (ionInfinite)="doInfinite($event)">
<ion-infinite-scroll-content
loadingSpinner="bubbles"
loadingText="加载中"></ion-infinite-scroll-content>
</ion-infinite-scroll>
</ion-content> </ion-content>
page-info-list { page-info-list {
.infinite-loading { *{box-sizing: border-box;}
} ul,li{list-style: none;box-sizing: border-box;margin: 0;padding:0;}
.infinite-loading {}
.search-input { .search-input {
display: flex; display: flex;
...@@ -11,18 +13,62 @@ page-info-list { ...@@ -11,18 +13,62 @@ page-info-list {
width: 95%; width: 95%;
margin-left: 10px; margin-left: 10px;
// 下拉select选择
.select{
margin: 0;
padding-left: 5px;
border-radius: 15px 0 0 15px;
font-size: 14px;
width: auto;
height: 40px;
min-height: auto;
.select-text{
overflow: initial;
}
.select-ios .select-placeholder,.select-ios .select-text,.select-ios .select-icon .select-icon-inner {
color: #000;
}
}
// input框
ion-input { ion-input {
border-bottom: 1px solid #ffffff; border-bottom: 1px solid #ffffff;
background-color: #fff; background-color: #fff;
border-radius: 5px; border-radius: 0 15px 15px 0;
height: 40px; height: 40px;
padding-left: 10px; padding-left: 4px;
margin-right: 5px; margin-right: 5px;
} }
// 搜索按钮
.search{
background: url("../assets/icon/search.png") no-repeat;
background-size: 100%;
width: 20px;
height: 20px;
position: fixed;
//right: 19%;
}
// 筛选按钮
.filter{
display: flex;
color: #797979;
height: 40px;
align-items: center;
}
.filter::after{
content: "";
background: url("../assets/icon/filter.png") no-repeat;
background-size: 100%;
width: 15px;
height: 15px;
display: inline-block;
}
} }
.select-ios .select-icon .select-icon-inner { .select-ios .select-icon .select-icon-inner {
color: #ffffff; color: #fff;
} }
ion-select { ion-select {
...@@ -53,6 +99,22 @@ page-info-list { ...@@ -53,6 +99,22 @@ page-info-list {
} }
} }
.history{
display: flex;
flex-wrap: wrap;
padding: 3px 15px;
>h6{width: 100%;margin: 5px 0 8px;}
>li{
background: #e4e4e4;
color: #999;
padding: 6px 8px;
border-radius:45%;
margin: 3% 3% 0 0;
min-width: 11%;
text-align: center;
}
}
.list { .list {
background-color: #fff; background-color: #fff;
......
import {Component} from '@angular/core'; import {Component} from '@angular/core';
import {IonicPage, LoadingController, NavController, NavParams} from 'ionic-angular'; import {IonicPage, LoadingController, ModalController, NavController, NavParams} from 'ionic-angular';
import {HomeService} from "../../home.service"; import {HomeService} from "../../home.service";
import {InfoDetailPage} from "../info-detail/info-detail"; import {InfoDetailPage} from "../info-detail/info-detail";
import {LoginService} from "../../../login/login.service";
import {SearchFilterComponent} from "../../../../components/search-filter/search-filter";
import {DealService} from "../../../deal/deal.service";
@Component({ @Component({
selector: 'page-info-list', selector: 'page-info-list',
templateUrl: 'info-list.html', templateUrl: 'info-list.html',
}) })
export class InfoListPage { export class InfoListPage {
option = { option = {
...@@ -16,31 +20,69 @@ export class InfoListPage { ...@@ -16,31 +20,69 @@ export class InfoListPage {
list: [ //默认事业单位 list: [ //默认事业单位
{name: "事业单位", type: '1'}, {name: "事业单位", type: '1'},
{name: "机关群团", type: '2'}, {name: "机关群团", type: '2'},
] {name: "行政执法", type: '0'},
],
history: []
}; };
info = { info = {
list: [], list: [],
page: 1, page: 1,
limit: 20, limit: 20,
search: '', search: '',
totalCount: null totalCount: null,
type: 3,
typeDataArr: [],
typeFilter: [{lable: '宗旨业务', id: 1},
{lable: '举办单位', id: 2},
{lable: '事业单位', id: 3},
{lable: '统一社会信用代码', id: 4}],
// 过滤
area: '',
industry: '',
funding: '',
cause: '',
}; };
arr = new Array(10)
constructor(public navCtrl: NavController, public navParams: NavParams, constructor(public navCtrl: NavController, public navParams: NavParams,
private loadCtrl: LoadingController, private homeSer: HomeService) { private loadCtrl: LoadingController, private homeSer: HomeService,
private modalCtrl: ModalController,) {
} }
ionViewDidLoad() { ionViewDidLoad() {
// this.getList(); // this.getList();
this.option.history = JSON.parse(localStorage.getItem('history'))
this.info.typeDataArr = this.info.typeFilter
} }
changeType() { changeType() {
// 过滤类型--关联--单位选择
this.info.typeDataArr = this.option.type === '0' ? this.info.typeDataArr.filter(x => x.id !== 1) : this.info.typeFilter
this.info.area = '';
this.info.industry = '';
this.info.funding = '';
this.info.cause = '';
this.info.list = []; this.info.list = [];
this.info.search = ''; this.info.search = '';
this.option.history = JSON.parse(localStorage.getItem('history'))
} }
// 搜索按钮
getList(event?: any) { getList(event?: any) {
if (!this.info.search) return this.changeType()
let list = JSON.parse(localStorage.getItem('history'))
if (list) {
if (list.length>9) list.pop()
list.unshift(this.info.search)
this.option.history = list
localStorage.setItem('history', JSON.stringify(list))
} else {
let arr = new Array()
arr.unshift(this.info.search)
localStorage.setItem('history',JSON.stringify(arr));
}
this.option.type === '1' ? this.getUnit(event) : this.getCreditor(event); this.option.type === '1' ? this.getUnit(event) : this.getCreditor(event);
} }
...@@ -78,8 +120,13 @@ export class InfoListPage { ...@@ -78,8 +120,13 @@ export class InfoListPage {
page: this.info.page, page: this.info.page,
limit: this.info.limit, limit: this.info.limit,
type: '1', type: '1',
"areacode": "", areacode: this.info.area,
"openid": "" openid: "",
isUnit: this.option.list.filter(x => x.type === this.option.type).map(x => x.type).toString(),
hyfl: this.info.industry,
jfxs: this.info.funding,
dwfl: this.info.cause,
searchType: this.info.type
}; };
this.homeSer.unitfind(data).subscribe( this.homeSer.unitfind(data).subscribe(
(res) => { (res) => {
...@@ -148,4 +195,36 @@ export class InfoListPage { ...@@ -148,4 +195,36 @@ export class InfoListPage {
this.navCtrl.push(InfoDetailPage, {obj: item, type: this.option.type}); this.navCtrl.push(InfoDetailPage, {obj: item, type: this.option.type});
} }
// 选择类型
switchType(){
console.log(this.info.type)
}
// 选择类型
filterConditions() {
let modal = this.modalCtrl.create(SearchFilterComponent, {
groupType: this.option.list.filter(x => x.type === this.option.type).map(x => x.name),
type: this.info.typeDataArr.filter(x => x.id === this.info.type).map(x => x.lable),
},
{
enterAnimation: 'modal-from-right-enter',
leaveAnimation: 'modal-from-right-leave'
});
modal.onDidDismiss(res => {
if (res) {
this.info.area = res.area.code
this.info.industry = res.industry.code
this.info.funding = res.funding.code
this.info.cause = res.cause.code
}
});
modal.present();
}
// 添加历史记录
historyField(value){
this.info.search = value
this.getList()
}
} }
...@@ -103,9 +103,7 @@ export class TabsPage { ...@@ -103,9 +103,7 @@ export class TabsPage {
}; };
this.dealSer.searchSchedule(data).subscribe( this.dealSer.searchSchedule(data).subscribe(
(res) => { (res) => {
if (res.page.list) { if (res.page) if (res.page.list) this.tabRoots[1].badge = res.page.totalCount;
this.tabRoots[1].badge = res.page.totalCount;
}
} }
) )
} }
...@@ -118,7 +116,7 @@ export class TabsPage { ...@@ -118,7 +116,7 @@ export class TabsPage {
}; };
this.newSer.noticeSearch(data).subscribe( this.newSer.noticeSearch(data).subscribe(
(res) => { (res) => {
if (res.page.list.notice && res.page.list.notice.length > 0) { if (res.page.list) if (res.page.list.notice && res.page.list.notice.length > 0) {
this.tabRoots[2].badge = res.page.list.notice.length; this.tabRoots[2].badge = res.page.list.notice.length;
} }
} }
......
//tab切换头 .scroll-tab { overflow: hidden; position: relative; } .news-content { overflow-y: hidden; overflow-x: scroll; width: 100%; .tabs-parent { position: relative; font-size: 1.4rem; white-space: nowrap; padding: .5rem 0; transition: all 500ms; } .tabs-parent::-webkit-scrollbar { display: none; } .selectTab { color: #e42417; padding: 6px 2px; -webkit-transition: background-color 500ms; -moz-transition: background-color 500ms; -ms-transition: background-color 500ms; -o-transition: background-color 500ms; transition: background-color 500ms; } .tabs-children { text-align: center; cursor: pointer; height: 3rem; padding: .5rem 1.2rem; display: inline-block; color: #747378; } #tips, .tips { position: absolute; bottom: 1px; height: 4px; width: 3rem; background-image: linear-gradient(to right, #fece50, #fff4d9); -webkit-transition: left 500ms; -moz-transition: left 500ms; -ms-transition: left 500ms; -o-transition: left 500ms; transition: left 500ms; } } .news-content::-webkit-scrollbar { display: none; } .color-fff { color: #ffffff; } .color-red { color: red; } .focus { float: right; font-size: 1.3rem; width: 6rem; height: 2.5rem; border-radius: 3rem; text-align: center; line-height: 2.5rem; font-weight: normal; } .focus-blue { background: #addae9; border: 0.08rem solid #addae9; } span.noFocus-blue { background-color: #cccccc; border: 0.08rem solid #cccccc; color: #fff; } .focus-yellow { background: linear-gradient(241deg, rgba(255, 247, 203, 1) 0%, rgba(255, 201, 45, 1) 100%); } //勋章 .badge { display: flex; > span.badgeSpan { display: flex; align-items: center; position: relative; height: 28px; > span { display: inline-block; font-size: 12px; transform: scale(0.9); font-family: PingFangSC-Semibold, PingFang SC; font-weight: 600; color: rgba(0, 0, 0, .7); background: rgba(250, 216, 114, 1); border-radius: 9px; line-height: 18px; padding: 2px 10px 2px 25px; margin-left: 2px; } img { position: absolute; top: 0; left: 0; z-index: 9; width: 28px; height: 28px; } } } .item-left { text-align: right; width: 20%; font-weight: bold; font-size: 1.4rem; flex: none; } .item-ios.item-block .item-inner { border-bottom: 0.55px solid #eeeeee; } .choose { text-align: right; margin-right: 20px; font-size: 1.5rem; color: #999; } .flowDetail .choose, .handle .choose { color: #5991CA; } .flowDetail .item-left { text-align: left; width: 80%; } ion-label { overflow: auto; white-space: normal; } .item-box { display: flex; border-bottom: 0.55px solid #eeeeee; background-color: #fff; .left { text-align: right; width: 30%; font-weight: bold; font-size: 1.4rem; margin: 11px 8px 11px 2px; } .right { width: 80%; padding: 11px 8px 11px 16px; .div-tag { padding: 10px 0; span { display: inline-block; margin-right: 10px; white-space: initial; border: 1px solid #eee; font-size: 1rem; margin-bottom: 5px; border-radius: 4px; width: 60px; height: 25px; text-align: center; line-height: 25px; ion-icon { margin-left: 3px; color: #666666; font-size: 1rem; } } } button { margin: 0; } ion-textarea { padding: 6px; height: 100px; border: 1px solid #ddd; } .tag { border: 1px solid #ccc; margin: 0 5px 10px 0; display: inline-block; border-radius: 4px; font-size: 1.2rem; width: 60px; height: 25px; text-align: center; line-height: 25px; } span.selectLead { background-color: #fdf8f2; border: 1px solid #e42417; color: #e42417; } } } page-detail1.ion-page > ion-content, page-detail2.ion-page > ion-content, page-detail3.ion-page > ion-content, page-detail4.ion-page > ion-content, page-file-list.ion-page > ion-content, page-history.ion-page > ion-content, page-approvals.ion-page > ion-content, page-detail5.ion-page > ion-content { background-color: #fff; } //tab切换头 .scroll-tab { overflow: hidden; position: relative; } .news-content { overflow-y: hidden; overflow-x: scroll; width: 100%; .tabs-parent { position: relative; font-size: 1.4rem; white-space: nowrap; padding: .5rem 0; transition: all 500ms; } .tabs-parent::-webkit-scrollbar { display: none; } .selectTab { color: #e42417; padding: 6px 2px; -webkit-transition: background-color 500ms; -moz-transition: background-color 500ms; -ms-transition: background-color 500ms; -o-transition: background-color 500ms; transition: background-color 500ms; } .tabs-children { text-align: center; cursor: pointer; height: 3rem; padding: .5rem 1.2rem; display: inline-block; color: #747378; } #tips, .tips { position: absolute; bottom: 1px; height: 4px; width: 3rem; background-image: linear-gradient(to right, #fece50, #fff4d9); -webkit-transition: left 500ms; -moz-transition: left 500ms; -ms-transition: left 500ms; -o-transition: left 500ms; transition: left 500ms; } } .news-content::-webkit-scrollbar { display: none; } .color-fff { color: #ffffff; } .color-red { color: red; } .focus { float: right; font-size: 1.3rem; width: 6rem; height: 2.5rem; border-radius: 3rem; text-align: center; line-height: 2.5rem; font-weight: normal; } .focus-blue { background: #addae9; border: 0.08rem solid #addae9; } span.noFocus-blue { background-color: #cccccc; border: 0.08rem solid #cccccc; color: #fff; } .focus-yellow { background: linear-gradient(241deg, rgba(255, 247, 203, 1) 0%, rgba(255, 201, 45, 1) 100%); } //勋章 .badge { display: flex; > span.badgeSpan { display: flex; align-items: center; position: relative; height: 28px; > span { display: inline-block; font-size: 12px; transform: scale(0.9); font-family: PingFangSC-Semibold, PingFang SC; font-weight: 600; color: rgba(0, 0, 0, .7); background: rgba(250, 216, 114, 1); border-radius: 9px; line-height: 18px; padding: 2px 10px 2px 25px; margin-left: 2px; } img { position: absolute; top: 0; left: 0; z-index: 9; width: 28px; height: 28px; } } } .item-left { text-align: right; width: 20%; font-weight: bold; font-size: 1.4rem; flex: none; } .item-ios.item-block .item-inner { border-bottom: 0.55px solid #eeeeee; } .choose { text-align: right; margin-right: 20px; font-size: 1.5rem; color: #999; } .flowDetail .choose, .handle .choose { color: #5991CA; } .flowDetail .item-left { text-align: left; width: 80%; } ion-label { overflow: auto; white-space: normal; } .item-box { display: flex; border-bottom: 0.55px solid #eeeeee; background-color: #fff; .left { text-align: right; width: 30%; font-weight: bold; font-size: 1.4rem; margin: 11px 8px 11px 2px; } .right { width: 80%; padding: 11px 8px 11px 16px; .div-tag { padding: 10px 0; span { display: inline-block; margin-right: 10px; white-space: initial; border: 1px solid #eee; font-size: 1rem; margin-bottom: 5px; border-radius: 4px; width: 60px; height: 25px; text-align: center; line-height: 25px; ion-icon { margin-left: 3px; color: #666666; font-size: 1rem; } } } button { margin: 0; } ion-textarea { padding: 6px; height: 100px; border: 1px solid #ddd; } .tag { border: 1px solid #ccc; margin: 0 5px 10px 0; display: inline-block; border-radius: 4px; font-size: 1.2rem; width: 60px; height: 25px; text-align: center; line-height: 25px; } span.selectLead { background-color: #fdf8f2; border: 1px solid #e42417; color: #e42417; } } } page-detail1.ion-page > ion-content, page-detail2.ion-page > ion-content, page-detail3.ion-page > ion-content, page-detail4.ion-page > ion-content, page-file-list.ion-page > ion-content, page-history.ion-page > ion-content, page-approvals.ion-page > ion-content, page-detail5.ion-page > ion-content { background-color: #fff; } // 搜索页-popover ion-popover { .radio-ios .radio-icon{opacity: 0;width: 0} .input-wrapper{font-size: 14px;} }
\ No newline at end of file \ No newline at end of file
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment