first commit
|
|
@ -0,0 +1,39 @@
|
|||
HELP.md
|
||||
/target/
|
||||
/**/target/
|
||||
!.mvn/wrapper/maven-wrapper.jar
|
||||
|
||||
### STS ###
|
||||
.apt_generated
|
||||
.classpath
|
||||
.factorypath
|
||||
.project
|
||||
.settings
|
||||
.springBeans
|
||||
.sts4-cache
|
||||
|
||||
### IntelliJ IDEA ###
|
||||
.idea
|
||||
*.iws
|
||||
*.iml
|
||||
*.ipr
|
||||
|
||||
### NetBeans ###
|
||||
/nbproject/private/
|
||||
/nbbuild/
|
||||
/dist/
|
||||
/nbdist/
|
||||
/.nb-gradle/
|
||||
/build/
|
||||
|
||||
### VS Code ###
|
||||
.vscode/
|
||||
rebel-remote.xml
|
||||
rebel.xml
|
||||
|
||||
### customize ###
|
||||
# 如果是上传到公共仓库,像application.yml这种如果写了各种密码信息的就不要上传了
|
||||
# 留个template就行了
|
||||
application-dev.yml
|
||||
application-prod.yml
|
||||
/logs
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
#Wed Nov 20 16:02:01 CST 2024
|
||||
gradle.version=6.8
|
||||
|
|
@ -0,0 +1 @@
|
|||
/build
|
||||
|
|
@ -0,0 +1,124 @@
|
|||
apply plugin: 'com.android.application'
|
||||
|
||||
android {
|
||||
compileSdkVersion 30
|
||||
buildToolsVersion '30.0.0'
|
||||
|
||||
defaultConfig {
|
||||
applicationId "org.easydarwin.easypusher"
|
||||
minSdkVersion 21
|
||||
targetSdkVersion 30
|
||||
versionCode 1
|
||||
versionName "1"
|
||||
multiDexEnabled true
|
||||
ndk {
|
||||
abiFilters "armeabi","armeabi-v7a","arm64-v8a","mips"
|
||||
}
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
javaCompileOptions {
|
||||
annotationProcessorOptions {
|
||||
arguments = [moduleName: project.getName()]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
release {
|
||||
minifyEnabled false
|
||||
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
||||
}
|
||||
}
|
||||
compileOptions {
|
||||
sourceCompatibility JavaVersion.VERSION_1_8
|
||||
targetCompatibility JavaVersion.VERSION_1_8
|
||||
}
|
||||
}
|
||||
|
||||
repositories {
|
||||
flatDir {
|
||||
dirs 'libs'
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation fileTree(dir: "libs", include: ['*.jar', '*.aar'])
|
||||
implementation 'androidx.multidex:multidex:2.0.1'
|
||||
implementation 'androidx.appcompat:appcompat:1.2.0'
|
||||
implementation files('libs\\pdfviewpager.jar')
|
||||
testImplementation 'junit:junit:4.12'
|
||||
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
|
||||
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
|
||||
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
|
||||
implementation 'com.google.android.material:material:1.1.0-beta01'
|
||||
//app自动更新
|
||||
implementation 'com.github.NewHuLe:AppUpdate:v1.7'
|
||||
//XUI
|
||||
implementation 'com.github.xuexiangjys:XUI:1.2.0'
|
||||
implementation 'com.github.xuexiangjys.XPage:xpage-lib:3.0.3'
|
||||
annotationProcessor 'com.github.xuexiangjys.XPage:xpage-compiler:3.0.3'
|
||||
implementation 'com.github.bumptech.glide:glide:4.8.0'
|
||||
//XUI页面路由
|
||||
implementation 'com.github.xuexiangjys.XRouter:xrouter-runtime:1.0.1'
|
||||
annotationProcessor 'com.github.xuexiangjys.XRouter:xrouter-compiler:1.0.1'
|
||||
//XUI切片
|
||||
implementation 'com.github.xuexiangjys.XAOP:xaop-runtime:1.0.5x'
|
||||
//XUI工具类
|
||||
implementation 'com.github.xuexiangjys.XUtil:xutil-core:1.1.6'
|
||||
implementation 'com.github.xuexiangjys.XUtil:xutil-sub:1.1.6'
|
||||
//@BindView 代替findviewbyid方法。
|
||||
implementation 'com.jakewharton:butterknife:10.2.0'
|
||||
annotationProcessor 'com.jakewharton:butterknife-compiler:10.2.0'
|
||||
//字体插件
|
||||
implementation 'uk.co.chrisjenx:calligraphy:2.3.0'
|
||||
//权限请求框架
|
||||
implementation 'com.github.getActivity:XXPermissions:13.5'
|
||||
//recyclerview
|
||||
implementation 'androidx.recyclerview:recyclerview:1.1.0'
|
||||
//sliding-root-nav
|
||||
// implementation 'com.yarolegovich:sliding-root-nav:1.1.0'
|
||||
//ocr样式
|
||||
implementation 'com.github.wenchaosong:OCR_identify:3.0.8'
|
||||
//MNProgressHUD:加载弹框
|
||||
implementation 'com.github.maning0303:MNProgressHUD:V1.1.5'
|
||||
// LeakCanary内存泄漏检测
|
||||
debugImplementation 'com.squareup.leakcanary:leakcanary-android:1.5.4'
|
||||
releaseImplementation 'com.squareup.leakcanary:leakcanary-android-no-op:1.5.4'
|
||||
//okhttp3
|
||||
implementation 'com.squareup.okhttp3:okhttp:3.10.0'
|
||||
//cardview
|
||||
implementation 'androidx.cardview:cardview:1.0.0'
|
||||
implementation 'androidx.recyclerview:recyclerview:1.2.0-alpha03'
|
||||
//io.reactivex
|
||||
implementation 'io.reactivex.rxjava2:rxjava:2.2.6'
|
||||
implementation 'io.reactivex.rxjava2:rxandroid:2.1.0'
|
||||
// fastjson
|
||||
implementation 'com.alibaba:fastjson:1.2.55'
|
||||
//下拉刷新
|
||||
implementation 'com.github.xuexiangjys.SmartRefreshLayout:refresh-header:1.1.5'
|
||||
implementation 'com.github.xuexiangjys.SmartRefreshLayout:refresh-layout:1.1.5'
|
||||
//Android崩溃
|
||||
implementation 'io.github.inflationx:calligraphy3:3.1.1'
|
||||
implementation 'io.github.inflationx:viewpump:2.0.3'
|
||||
//地图导航
|
||||
implementation 'android.arch.lifecycle:extensions:1.1.1'
|
||||
//SnackbarUtils
|
||||
implementation 'com.github.mengpeng920223:SnackbarUtils:v1.0.0'
|
||||
// Stetho core
|
||||
implementation 'com.facebook.stetho:stetho:1.3.1'
|
||||
//If you want to add a network helper
|
||||
implementation 'com.facebook.stetho:stetho-okhttp3:1.3.1'
|
||||
//悬浮按钮
|
||||
implementation 'com.github.clans:fab:1.6.4'
|
||||
//二维码
|
||||
// implementation 'cn.yipianfengye.android:zxing-library:2.2'
|
||||
//GSON
|
||||
implementation 'com.google.code.gson:gson:2.8.6'
|
||||
//geodesy
|
||||
implementation 'org.gavaghan:geodesy:1.1.3'
|
||||
//echarts
|
||||
implementation 'com.github.abel533:ECharts:3.0.0.2'
|
||||
//pdf
|
||||
implementation 'com.joanzapata.pdfview:android-pdfview:1.0.4@aar'
|
||||
//okhttputils
|
||||
implementation 'org.bouncycastle:bcprov-jdk15on:1.56'
|
||||
}
|
||||
|
|
@ -0,0 +1,31 @@
|
|||
# Add project specific ProGuard rules here.
|
||||
# You can control the set of applied configuration files using the
|
||||
# proguardFiles setting in build.gradle.
|
||||
#
|
||||
# For more details, see
|
||||
# http://developer.android.com/guide/developing/tools/proguard.html
|
||||
|
||||
# If your project uses WebView with JS, uncomment the following
|
||||
# and specify the fully qualified class name to the JavaScript interface
|
||||
# class:
|
||||
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
|
||||
# public *;
|
||||
#}
|
||||
|
||||
# Uncomment this to preserve the line number information for
|
||||
# debugging stack traces.
|
||||
#-keepattributes SourceFile,LineNumberTable
|
||||
|
||||
# If you keep the line number information, uncomment this to
|
||||
# hide the original source file name.
|
||||
#-renamesourcefileattribute SourceFile
|
||||
-dontwarn dalvik.**
|
||||
-dontwarn com.tencent.smtt.**
|
||||
|
||||
-keep class com.tencent.smtt.** {
|
||||
*;
|
||||
}
|
||||
|
||||
-keep class com.tencent.tbs.** {
|
||||
*;
|
||||
}
|
||||
|
|
@ -0,0 +1,182 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
package="org.easydarwin.easypusher">
|
||||
|
||||
<!-- 这个权限用于进行网络定位 -->
|
||||
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
|
||||
<!-- 这个权限用于访问GPS定位 -->
|
||||
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
|
||||
<!-- 用于访问wifi网络信息,wifi信息会用于进行网络定位 -->
|
||||
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
|
||||
<!-- 获取运营商信息,用于支持提供运营商信息相关的接口 -->
|
||||
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
|
||||
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
|
||||
<uses-permission android:name="android.permission.READ_SETTINGS" />
|
||||
<!-- 这个权限用于获取wifi的获取权限,wifi信息会用来进行网络定位 -->
|
||||
<uses-permission android:name="android.permission.CHANGE_WIFI_STATE" />
|
||||
<!-- 用于读取手机当前的状态 -->
|
||||
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
|
||||
<!-- 写入扩展存储,向扩展卡写入数据,用于写入离线定位数据 -->
|
||||
<uses-permission android:name="android.permission.READ_PRIVILEGED_PHONE_STATE"
|
||||
tools:ignore="ProtectedPermissions" />
|
||||
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
|
||||
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
|
||||
<!-- 访问网络,网络定位需要上网 -->
|
||||
<uses-permission android:name="android.permission.INTERNET" />
|
||||
<!-- SD卡读取权限,用户写入离线定位数据 -->
|
||||
<uses-permission android:name="android.permission.MOUNT_UNMOUNT_FILESYSTEMS"
|
||||
tools:ignore="ProtectedPermissions" />
|
||||
<uses-permission android:name="android.permission.WRITE_SETTINGS"
|
||||
tools:ignore="ProtectedPermissions" />
|
||||
<uses-permission android:name="android.permission.BLUETOOTH"/>
|
||||
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN"/>
|
||||
<!-- 授予录音权限 -->
|
||||
<uses-permission android:name="android.permission.RECORD_AUDIO" />
|
||||
<uses-permission android:name="android.permission.CAMERA" />
|
||||
<uses-feature android:name="android.hardware.camera"
|
||||
android:required="true"/>
|
||||
<uses-feature android:name="android.hardware.camera.autofocus" />
|
||||
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
|
||||
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
|
||||
<uses-permission android:name="android.permission.MANAGE_ACCOUNTS" />
|
||||
<uses-permission android:name="android.permission.NFC" />
|
||||
<uses-permission android:name="android.permission.READ_CONTACTS" />
|
||||
<uses-permission android:name="android.permission.READ_SYNC_SETTINGS" />
|
||||
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
|
||||
<uses-permission android:name="android.permission.SET_WALLPAPER" />
|
||||
<uses-permission android:name="android.permission.SUBSCRIBED_FEEDS_READ" />
|
||||
<uses-permission android:name="android.permission.SUBSCRIBED_FEEDS_WRITE" />
|
||||
<uses-permission android:name="android.permission.USE_CREDENTIALS" />
|
||||
<uses-permission android:name="android.permission.VIBRATE" />
|
||||
<uses-permission android:name="android.permission.WAKE_LOCK" />
|
||||
<uses-permission android:name="android.permission.WRITE_SYNC_SETTINGS" />
|
||||
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
|
||||
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" />
|
||||
<uses-permission android:name="android.permission.SYSTEM_OVERLAY_WINDOW" />
|
||||
<uses-permission android:name="android.permission.MANAGE_EXTERNAL_STORAGE" />
|
||||
<uses-permission android:name="android.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS"/>
|
||||
<!-- SD卡读取权限,用户写入离线定位数据-->
|
||||
<uses-permission
|
||||
android:name="android.permission.MOUNT_UNMOUNT_FILESYSTEMS"
|
||||
tools:ignore="ProtectedPermissions" />
|
||||
<!--9.0后前台服务需要申请权限-->
|
||||
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
|
||||
<uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" />
|
||||
<uses-permission android:name="android.permission.READ_CALENDAR" />
|
||||
<uses-permission android:name="android.permission.WRITE_CALENDAR" />
|
||||
<uses-permission android:name="android.permission.ANSWER_PHONE_CALLS" />
|
||||
<uses-permission android:name="android.permission.READ_PHONE_NUMBERS" />
|
||||
<uses-permission android:name="android.permission.ACCESS_BACKGROUND_LOCATION" />
|
||||
<uses-permission android:name="android.permission.SEND_SMS" />
|
||||
<uses-permission android:name="android.permission.RECEIVE_SMS" />
|
||||
<!-- 硬件加速对X5视频播放非常重要,建议开启 -->
|
||||
<uses-permission android:name="android.permission.GET_TASKS" />
|
||||
|
||||
<queries>
|
||||
<intent>
|
||||
<action android:name="android.media.action.IMAGE_CAPTURE" />
|
||||
</intent>
|
||||
</queries>
|
||||
|
||||
<application
|
||||
android:name="com.bonus.app.application.myApplication"
|
||||
android:allowBackup="true"
|
||||
android:hardwareAccelerated="true"
|
||||
android:icon="@drawable/logo"
|
||||
android:label="@string/app_name"
|
||||
android:largeHeap="true"
|
||||
android:networkSecurityConfig="@xml/network_security_config"
|
||||
android:persistent="true"
|
||||
android:requestLegacyExternalStorage="true"
|
||||
android:theme="@style/AppTheme"
|
||||
android:usesCleartextTraffic="true"
|
||||
tools:ignore="UnusedAttribute"
|
||||
tools:replace="android:allowBackup,android:icon">
|
||||
|
||||
<uses-library android:name="org.apache.http.legacy" android:required="false" />
|
||||
|
||||
<!-- 表示当前项目已经适配了分区存储特性 -->
|
||||
<meta-data
|
||||
android:name="ScopedStorage"
|
||||
android:value="true" />
|
||||
|
||||
<activity
|
||||
android:exported="true"
|
||||
android:name="com.bonus.app.activity.basic.GuideActvivty"
|
||||
android:screenOrientation="portrait"
|
||||
android:theme="@style/Theme.AppCompat.Light.NoActionBar.FullScreen">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
<category android:name="android.intent.category.LAUNCHER" />
|
||||
</intent-filter>
|
||||
|
||||
<intent-filter>
|
||||
<action android:name="android.media.action.IMAGE_CAPTURE" />
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
</intent-filter>
|
||||
</activity>
|
||||
|
||||
<activity
|
||||
android:name="com.bonus.app.base.BaseActivity"
|
||||
android:configChanges="screenSize|keyboardHidden|orientation|keyboard"
|
||||
android:screenOrientation="portrait"
|
||||
android:windowSoftInputMode="adjustPan|stateHidden" />
|
||||
<activity
|
||||
android:name="com.bonus.app.activity.basic.SplashActvivty"
|
||||
android:screenOrientation="portrait" />
|
||||
<activity
|
||||
android:name="com.bonus.app.activity.basic.MainActivity"
|
||||
android:configChanges="orientation|keyboardHidden|screenSize"
|
||||
android:screenOrientation="portrait"/>
|
||||
|
||||
<activity
|
||||
android:name="com.bonus.app.activity.basic.LoginActvivty"
|
||||
android:screenOrientation="portrait" />
|
||||
<activity
|
||||
android:name="com.bonus.app.activity.basic.ShowImageActivity"
|
||||
android:screenOrientation="portrait"
|
||||
android:theme="@style/dialogstyle" />
|
||||
<activity
|
||||
android:name="com.bonus.app.activity.basic.ShowPDFActivity"
|
||||
android:screenOrientation="portrait"/>
|
||||
|
||||
<activity
|
||||
android:name="com.bonus.app.activity.basic.ShowPDFWebViewActivity"
|
||||
android:screenOrientation="portrait"/>
|
||||
<activity
|
||||
android:name="com.baidu.ocr.ui.camera.CameraActivity"
|
||||
android:launchMode="singleTask" />
|
||||
|
||||
<activity android:name="com.bonus.app.activity.plan.SecondActivity" />
|
||||
|
||||
<meta-data
|
||||
android:name="com.baidu.lbsapi.API_KEY"
|
||||
android:value="GwhWiZ9jmGymbKXdDNNTVWBK9XHK2Ao5" />
|
||||
|
||||
<service
|
||||
android:name="com.baidu.location.f"
|
||||
android:enabled="true"
|
||||
android:process=":remote" />
|
||||
<service
|
||||
android:name="com.baidu.trace.LBSTraceService"
|
||||
android:enabled="true"
|
||||
android:process=":remote" />
|
||||
|
||||
<service android:name="com.bonus.app.service.DownLoadDataService"
|
||||
android:enabled="true"
|
||||
android:process=":remote" />
|
||||
|
||||
<service android:name="com.bonus.app.service.UpLoadDataService"
|
||||
android:enabled="true"
|
||||
android:process=":remote" />
|
||||
|
||||
<service
|
||||
android:name="com.bonus.app.service.JobHandlerService"
|
||||
android:enabled="true"
|
||||
android:exported="true"
|
||||
android:permission="android.permission.BIND_JOB_SERVICE" />
|
||||
|
||||
</application>
|
||||
|
||||
</manifest>
|
||||
|
|
@ -0,0 +1,24 @@
|
|||
{
|
||||
"sProcessing": "------数据加载中,请稍后------",
|
||||
"sLengthMenu": "显示 _MENU_ 项结果",
|
||||
"sZeroRecords": "没有匹配结果",
|
||||
"sInfo": "显示第 _START_ 至 _END_ 项结果,共 _TOTAL_ 项",
|
||||
"sInfoEmpty": "显示第 0 至 0 项结果,共 0 项",
|
||||
"sInfoFiltered": "(由 _MAX_ 项结果过滤)",
|
||||
"sInfoPostFix": "",
|
||||
"sSearch": "搜索:",
|
||||
"sUrl": "",
|
||||
"sEmptyTable": "表中数据为空",
|
||||
"sLoadingRecords": "载入中...",
|
||||
"sInfoThousands": ",",
|
||||
"oPaginate": {
|
||||
"sFirst": "首页",
|
||||
"sPrevious": "上页",
|
||||
"sNext": "下页",
|
||||
"sLast": "末页"
|
||||
},
|
||||
"oAria": {
|
||||
"sSortAscending": ": 以升序排列此列",
|
||||
"sSortDescending": ": 以降序排列此列"
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,151 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
|
||||
|
||||
<style type="text/css">
|
||||
#personTypeContent{
|
||||
height: 100%;
|
||||
}
|
||||
#personTypeContent>div{
|
||||
float: left;
|
||||
}
|
||||
#formalPersonNum,
|
||||
#temporaryPersonNum{
|
||||
width: 25%;
|
||||
height: 25%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
#formalPersonNum{
|
||||
color: #52C1F5;
|
||||
font-size: 12px;
|
||||
background-image: url("formalPerson.png");
|
||||
background-repeat: no-repeat;
|
||||
background-size: 25%;
|
||||
background-position: 10% center;
|
||||
text-indent: 30px;
|
||||
}
|
||||
#temporaryPersonNum{
|
||||
margin-left: 50%;
|
||||
color: #FEC03D;
|
||||
font-size: 12px;
|
||||
background-image: url("temporaryPerson.png");
|
||||
background-repeat: no-repeat;
|
||||
background-size: 25%;
|
||||
background-position: 10% center;
|
||||
text-indent: 30px;
|
||||
}
|
||||
#personTypeChart{
|
||||
width: 100%;
|
||||
height: 4%;
|
||||
margin-top: 2%;
|
||||
}
|
||||
#formalPersonChart{
|
||||
height: 100%;
|
||||
width: 60%;
|
||||
background-color: #52C1F5;
|
||||
float: left;
|
||||
border-top-left-radius: 10px;
|
||||
border-bottom-left-radius: 10px;
|
||||
}
|
||||
#temporaryPersonChat{
|
||||
height: 100%;
|
||||
width: 40%;
|
||||
background-color: #FEC03D;
|
||||
float: left;
|
||||
border-top-right-radius: 10px;
|
||||
border-bottom-right-radius: 10px;
|
||||
}
|
||||
#formalPersonProportion{
|
||||
width: 35%;
|
||||
height: 25%;
|
||||
margin-top: 2%;
|
||||
text-indent: 5px;
|
||||
}
|
||||
#temporaryPersonProportion{
|
||||
width: 35%;
|
||||
height: 25%;
|
||||
margin-left: 30%;
|
||||
margin-top: 2%;
|
||||
text-indent: 5px;
|
||||
}
|
||||
#formalPersonProportion>div:nth-child(1),
|
||||
#temporaryPersonProportion>div:nth-child(1){
|
||||
text-align: center;
|
||||
}
|
||||
#formalPercentage{
|
||||
color: #52C1F5;
|
||||
font-size: 12px;
|
||||
text-align: center;
|
||||
margin-top: 2%;
|
||||
}
|
||||
#temporaryPercentage{
|
||||
color: #FEC03D;
|
||||
font-size: 12px;
|
||||
text-align: center;
|
||||
margin-top: 2%;
|
||||
}
|
||||
#personType{
|
||||
width: 320px;
|
||||
height: 100px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div id="personType">
|
||||
<div id="personTypeTitle" style="text-align: center; font-size: 12px">外来、本地务工人员</div>
|
||||
<div id="personTypeContent">
|
||||
<div id="formalPersonNum">--</div>
|
||||
<div id="temporaryPersonNum">--</div>
|
||||
<div id="personTypeChart">
|
||||
<div id="formalPersonChart"></div>
|
||||
<div id="temporaryPersonChat"></div>
|
||||
</div>
|
||||
<div id="formalPersonProportion">
|
||||
<div id="formalPercentage">外来占比</div>
|
||||
</div>
|
||||
<div id="temporaryPersonProportion">
|
||||
<div id="temporaryPercentage">本地占比</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript" src="echarts.min.js"></script>
|
||||
<script type="text/javascript" src="jquery-3.6.0.js"></script>
|
||||
<script type="text/javascript">
|
||||
data();
|
||||
function data() {
|
||||
let value = JSON.parse(Android.getData('employmentType'));
|
||||
let formalNum = value[1].value;
|
||||
let temporaryNum = value[0].value;
|
||||
//正式
|
||||
$('#formalPersonNum').text(formalNum);
|
||||
//临时
|
||||
$('#temporaryPersonNum').text(temporaryNum);
|
||||
var sum = Number(formalNum)+Number(temporaryNum);
|
||||
$('#formalPersonChart').css('width',divided(formalNum, sum) + '%');
|
||||
$('#temporaryPersonChat').css('width',divided(temporaryNum, sum) + '%');
|
||||
|
||||
var formalPercentageNum = divided(formalNum, sum); //divided向下取整
|
||||
$('#formalPercentage').text('外来占比:' + formalPercentageNum + '%');
|
||||
$('#temporaryPercentage').text('本地占比:' + ((100 - formalPercentageNum).toFixed(2) + '%'));
|
||||
|
||||
<!-- $('#formalPersonNum').click(function(){-->
|
||||
<!-- Android.onClick('workerType', '1,2');-->
|
||||
<!-- });-->
|
||||
<!-- $('#temporaryPersonNum').click(function(){-->
|
||||
<!-- Android.onClick('workerType', '0');-->
|
||||
<!-- });-->
|
||||
}
|
||||
|
||||
function divided (num1,num2) { //向下取整
|
||||
if(Number(num2) == 0){
|
||||
return 0
|
||||
}else{
|
||||
return (Math.round(num1/num2 * 10000) / 100);
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
After Width: | Height: | Size: 648 B |
|
After Width: | Height: | Size: 15 KiB |
|
After Width: | Height: | Size: 17 KiB |
|
After Width: | Height: | Size: 18 KiB |
|
After Width: | Height: | Size: 16 KiB |
|
After Width: | Height: | Size: 17 KiB |
|
|
@ -0,0 +1,21 @@
|
|||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport"
|
||||
content="width=device-width,initial-scale=1.0,minimum-scale=1.0,maximum-scale=4.0,user-scalable=no"/>
|
||||
<title>Document</title>
|
||||
<style type="text/css">
|
||||
canvas {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border: 1px solid black;
|
||||
}
|
||||
</style>
|
||||
<script src="https://unpkg.com/pdfjs-dist@1.9.426/build/pdf.min.js"></script>
|
||||
<script type="text/javascript" src="index.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,37 @@
|
|||
var url = location.search.substring(1);
|
||||
|
||||
PDFJS.cMapUrl = 'https://unpkg.com/pdfjs-dist@1.9.426/cmaps/';
|
||||
PDFJS.cMapPacked = true;
|
||||
|
||||
var pdfDoc = null;
|
||||
|
||||
function createPage() {
|
||||
var div = document.createElement("canvas");
|
||||
document.body.appendChild(div);
|
||||
return div;
|
||||
}
|
||||
|
||||
function renderPage(num) {
|
||||
pdfDoc.getPage(num).then(function (page) {
|
||||
var viewport = page.getViewport(2.0);
|
||||
var canvas = createPage();
|
||||
var ctx = canvas.getContext('2d');
|
||||
|
||||
canvas.height = viewport.height;
|
||||
canvas.width = viewport.width;
|
||||
|
||||
page.render({
|
||||
canvasContext: ctx,
|
||||
viewport: viewport
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
PDFJS.getDocument(url).then(function (pdf) {
|
||||
pdfDoc = pdf;
|
||||
for (var i = 1; i <= pdfDoc.numPages; i++) {
|
||||
renderPage(i)
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
/** layui-v2.3.0 MIT License By https://www.layui.com */
|
||||
html #layuicss-skincodecss{display:none;position:absolute;width:1989px}.layui-code-h3,.layui-code-view{position:relative;font-size:12px}.layui-code-view{display:block;margin:10px 0;padding:0;border:1px solid #e2e2e2;border-left-width:6px;background-color:#F2F2F2;color:#333;font-family:Courier New}.layui-code-h3{padding:0 10px;height:32px;line-height:32px;border-bottom:1px solid #e2e2e2}.layui-code-h3 a{position:absolute;right:10px;top:0;color:#999}.layui-code-view .layui-code-ol{position:relative;overflow:auto}.layui-code-view .layui-code-ol li{position:relative;margin-left:45px;line-height:20px;padding:0 5px;border-left:1px solid #e2e2e2;list-style-type:decimal-leading-zero;*list-style-type:decimal;background-color:#fff}.layui-code-view pre{margin:0}.layui-code-notepad{border:1px solid #0C0C0C;border-left-color:#3F3F3F;background-color:#0C0C0C;color:#C2BE9E}.layui-code-notepad .layui-code-h3{border-bottom:none}.layui-code-notepad .layui-code-ol li{background-color:#3F3F3F;border-left:none}
|
||||
|
After Width: | Height: | Size: 5.8 KiB |
|
After Width: | Height: | Size: 11 KiB |
|
After Width: | Height: | Size: 5.7 KiB |
|
After Width: | Height: | Size: 701 B |
|
After Width: | Height: | Size: 1.7 KiB |
|
After Width: | Height: | Size: 271 KiB |
|
After Width: | Height: | Size: 2.6 KiB |
|
After Width: | Height: | Size: 5.4 KiB |
|
After Width: | Height: | Size: 2.7 KiB |
|
After Width: | Height: | Size: 4.0 KiB |
|
After Width: | Height: | Size: 3.3 KiB |
|
After Width: | Height: | Size: 7.3 KiB |
|
After Width: | Height: | Size: 2.3 KiB |
|
After Width: | Height: | Size: 1.8 KiB |
|
After Width: | Height: | Size: 6.6 KiB |
|
After Width: | Height: | Size: 4.3 KiB |
|
After Width: | Height: | Size: 2.9 KiB |
|
After Width: | Height: | Size: 3.0 KiB |
|
After Width: | Height: | Size: 3.1 KiB |
|
After Width: | Height: | Size: 5.0 KiB |
|
After Width: | Height: | Size: 5.1 KiB |
|
After Width: | Height: | Size: 9.6 KiB |
|
After Width: | Height: | Size: 3.7 KiB |
|
After Width: | Height: | Size: 7.9 KiB |
|
After Width: | Height: | Size: 3.1 KiB |
|
After Width: | Height: | Size: 3.2 KiB |
|
After Width: | Height: | Size: 4.3 KiB |
|
After Width: | Height: | Size: 2.7 KiB |
|
After Width: | Height: | Size: 4.7 KiB |
|
After Width: | Height: | Size: 3.9 KiB |
|
After Width: | Height: | Size: 2.5 KiB |
|
After Width: | Height: | Size: 2.0 KiB |
|
After Width: | Height: | Size: 3.4 KiB |