Merge branch 'master' of http://10.75.166.171/cxcxt/cxc-szcx-uniapp
# Conflicts: # package-lock.json # pages/views/renliziyuan/renyuanxinxi/taizhang.vue # pages/views/renliziyuan/renyuanxinxi/tongji.vue
This commit is contained in:
commit
a5d733a269
@ -1,3 +1,3 @@
|
||||
# 开发环境
|
||||
# 请求接口地址
|
||||
VITE_REQUEST_BASE_URL = https://36.112.48.190
|
||||
VITE_REQUEST_BASE_URL = http://10.75.166.6:8080
|
||||
|
@ -182,6 +182,14 @@
|
||||
}).then((res) => {
|
||||
if (res.success) {
|
||||
step.value = res.result.records
|
||||
step.value = step.value.map(item => {
|
||||
if (item.name === 'start') {
|
||||
item.name = '开始';
|
||||
} else if (item.name === 'end') {
|
||||
item.name = '结束';
|
||||
}
|
||||
return item;
|
||||
});
|
||||
}
|
||||
})
|
||||
}
|
||||
|
239
manifest.json
239
manifest.json
@ -1,123 +1,122 @@
|
||||
{
|
||||
"name" : "数智产销",
|
||||
"appid" : "__UNI__9F097F0",
|
||||
"description" : "",
|
||||
"versionName" : "1.1.1",
|
||||
"versionCode" : 20250106,
|
||||
"transformPx" : false,
|
||||
/* 5+App特有相关 */
|
||||
"app-plus" : {
|
||||
"usingComponents" : true,
|
||||
"nvueStyleCompiler" : "uni-app",
|
||||
"compilerVersion" : 3,
|
||||
"splashscreen" : {
|
||||
"alwaysShowBeforeRender" : true,
|
||||
"waiting" : true,
|
||||
"autoclose" : true,
|
||||
"delay" : 0
|
||||
},
|
||||
"compatible" : {
|
||||
"ignoreVersion" : true
|
||||
},
|
||||
/* 模块配置 */
|
||||
"modules" : {
|
||||
"Geolocation" : {},
|
||||
"Fingerprint" : {},
|
||||
"Camera" : {},
|
||||
"Barcode" : {}
|
||||
},
|
||||
/* 应用发布信息 */
|
||||
"distribute" : {
|
||||
/* android打包配置 */
|
||||
"android" : {
|
||||
"permissions" : [
|
||||
"<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
|
||||
"<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
|
||||
"<uses-permission android:name=\"android.permission.VIBRATE\"/>",
|
||||
"<uses-permission android:name=\"android.permission.READ_LOGS\"/>",
|
||||
"<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
|
||||
"<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
|
||||
"<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
|
||||
"<uses-permission android:name=\"android.permission.CAMERA\"/>",
|
||||
"<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>",
|
||||
"<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
|
||||
"<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
|
||||
"<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
|
||||
"<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
|
||||
"<uses-feature android:name=\"android.hardware.camera\"/>",
|
||||
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
|
||||
]
|
||||
},
|
||||
/* ios打包配置 */
|
||||
"ios" : {
|
||||
"dSYMs" : false
|
||||
},
|
||||
/* SDK配置 */
|
||||
"sdkConfigs" : {
|
||||
"ad" : {},
|
||||
"geolocation" : {
|
||||
"system" : {
|
||||
"__platform__" : [ "android" ]
|
||||
}
|
||||
}
|
||||
},
|
||||
"icons" : {
|
||||
"android" : {
|
||||
"hdpi" : "unpackage/res/icons/72x72.png",
|
||||
"xhdpi" : "unpackage/res/icons/96x96.png",
|
||||
"xxhdpi" : "unpackage/res/icons/144x144.png",
|
||||
"xxxhdpi" : "unpackage/res/icons/192x192.png"
|
||||
},
|
||||
"ios" : {
|
||||
"appstore" : "unpackage/res/icons/1024x1024.png",
|
||||
"ipad" : {
|
||||
"app" : "unpackage/res/icons/76x76.png",
|
||||
"app@2x" : "unpackage/res/icons/152x152.png",
|
||||
"notification" : "unpackage/res/icons/20x20.png",
|
||||
"notification@2x" : "unpackage/res/icons/40x40.png",
|
||||
"proapp@2x" : "unpackage/res/icons/167x167.png",
|
||||
"settings" : "unpackage/res/icons/29x29.png",
|
||||
"settings@2x" : "unpackage/res/icons/58x58.png",
|
||||
"spotlight" : "unpackage/res/icons/40x40.png",
|
||||
"spotlight@2x" : "unpackage/res/icons/80x80.png"
|
||||
},
|
||||
"iphone" : {
|
||||
"app@2x" : "unpackage/res/icons/120x120.png",
|
||||
"app@3x" : "unpackage/res/icons/180x180.png",
|
||||
"notification@2x" : "unpackage/res/icons/40x40.png",
|
||||
"notification@3x" : "unpackage/res/icons/60x60.png",
|
||||
"settings@2x" : "unpackage/res/icons/58x58.png",
|
||||
"settings@3x" : "unpackage/res/icons/87x87.png",
|
||||
"spotlight@2x" : "unpackage/res/icons/80x80.png",
|
||||
"spotlight@3x" : "unpackage/res/icons/120x120.png"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
/* 快应用特有相关 */
|
||||
"quickapp" : {},
|
||||
/* 小程序特有相关 */
|
||||
"mp-weixin" : {
|
||||
"appid" : "",
|
||||
"setting" : {
|
||||
"urlCheck" : false
|
||||
},
|
||||
"usingComponents" : true
|
||||
},
|
||||
"mp-alipay" : {
|
||||
"usingComponents" : true
|
||||
},
|
||||
"mp-baidu" : {
|
||||
"usingComponents" : true
|
||||
},
|
||||
"mp-toutiao" : {
|
||||
"usingComponents" : true
|
||||
},
|
||||
"uniStatistics" : {
|
||||
"enable" : false
|
||||
},
|
||||
"vueVersion" : "3"
|
||||
"name": "数智产销",
|
||||
"appid": "__UNI__9F097F0",
|
||||
"description": "",
|
||||
"versionName": "1.1.4",
|
||||
"versionCode": 20250121,
|
||||
"transformPx": false,
|
||||
/* 5+App特有相关 */
|
||||
"app-plus": {
|
||||
"usingComponents": true,
|
||||
"nvueStyleCompiler": "uni-app",
|
||||
"compilerVersion": 3,
|
||||
"splashscreen": {
|
||||
"alwaysShowBeforeRender": true,
|
||||
"waiting": true,
|
||||
"autoclose": true,
|
||||
"delay": 0
|
||||
},
|
||||
"compatible": {
|
||||
"ignoreVersion": true
|
||||
},
|
||||
/* 模块配置 */
|
||||
"modules": {
|
||||
"Geolocation": {},
|
||||
"Fingerprint": {},
|
||||
"Camera": {},
|
||||
"Barcode": {}
|
||||
},
|
||||
/* 应用发布信息 */
|
||||
"distribute": {
|
||||
/* android打包配置 */
|
||||
"android": {
|
||||
"permissions": [
|
||||
"<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
|
||||
"<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
|
||||
"<uses-permission android:name=\"android.permission.VIBRATE\"/>",
|
||||
"<uses-permission android:name=\"android.permission.READ_LOGS\"/>",
|
||||
"<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
|
||||
"<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
|
||||
"<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
|
||||
"<uses-permission android:name=\"android.permission.CAMERA\"/>",
|
||||
"<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>",
|
||||
"<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
|
||||
"<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
|
||||
"<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
|
||||
"<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
|
||||
"<uses-feature android:name=\"android.hardware.camera\"/>",
|
||||
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
|
||||
]
|
||||
},
|
||||
/* ios打包配置 */
|
||||
"ios": {
|
||||
"dSYMs": false
|
||||
},
|
||||
/* SDK配置 */
|
||||
"sdkConfigs": {
|
||||
"ad": {},
|
||||
"geolocation": {
|
||||
"system": {
|
||||
"__platform__": ["android"]
|
||||
}
|
||||
}
|
||||
},
|
||||
"icons": {
|
||||
"android": {
|
||||
"hdpi": "unpackage/res/icons/72x72.png",
|
||||
"xhdpi": "unpackage/res/icons/96x96.png",
|
||||
"xxhdpi": "unpackage/res/icons/144x144.png",
|
||||
"xxxhdpi": "unpackage/res/icons/192x192.png"
|
||||
},
|
||||
"ios": {
|
||||
"appstore": "unpackage/res/icons/1024x1024.png",
|
||||
"ipad": {
|
||||
"app": "unpackage/res/icons/76x76.png",
|
||||
"app@2x": "unpackage/res/icons/152x152.png",
|
||||
"notification": "unpackage/res/icons/20x20.png",
|
||||
"notification@2x": "unpackage/res/icons/40x40.png",
|
||||
"proapp@2x": "unpackage/res/icons/167x167.png",
|
||||
"settings": "unpackage/res/icons/29x29.png",
|
||||
"settings@2x": "unpackage/res/icons/58x58.png",
|
||||
"spotlight": "unpackage/res/icons/40x40.png",
|
||||
"spotlight@2x": "unpackage/res/icons/80x80.png"
|
||||
},
|
||||
"iphone": {
|
||||
"app@2x": "unpackage/res/icons/120x120.png",
|
||||
"app@3x": "unpackage/res/icons/180x180.png",
|
||||
"notification@2x": "unpackage/res/icons/40x40.png",
|
||||
"notification@3x": "unpackage/res/icons/60x60.png",
|
||||
"settings@2x": "unpackage/res/icons/58x58.png",
|
||||
"settings@3x": "unpackage/res/icons/87x87.png",
|
||||
"spotlight@2x": "unpackage/res/icons/80x80.png",
|
||||
"spotlight@3x": "unpackage/res/icons/120x120.png"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
/* 快应用特有相关 */
|
||||
"quickapp": {},
|
||||
/* 小程序特有相关 */
|
||||
"mp-weixin": {
|
||||
"appid": "",
|
||||
"setting": {
|
||||
"urlCheck": false
|
||||
},
|
||||
"usingComponents": true
|
||||
},
|
||||
"mp-alipay": {
|
||||
"usingComponents": true
|
||||
},
|
||||
"mp-baidu": {
|
||||
"usingComponents": true
|
||||
},
|
||||
"mp-toutiao": {
|
||||
"usingComponents": true
|
||||
},
|
||||
"uniStatistics": {
|
||||
"enable": false
|
||||
},
|
||||
"vueVersion": "3"
|
||||
}
|
||||
/* 模块配置 */
|
||||
|
||||
|
@ -2,7 +2,6 @@
|
||||
<view>
|
||||
<scroll-view :scroll-y="true">
|
||||
<uni-card>
|
||||
<uni-title title="" type="h1" align="center"></uni-title>
|
||||
<view>
|
||||
<uni-row>
|
||||
<uni-col :span="11"><uni-title title="姓名 " align="left" type="h5"></uni-title></uni-col>
|
||||
@ -10,10 +9,10 @@
|
||||
type="h5"></uni-title></uni-col>
|
||||
</uni-row>
|
||||
<uni-row>
|
||||
<uni-col :span="11"><uni-easyinput v-model="xm" focus suffixIcon="search" clearable
|
||||
<uni-col :span="11"><uni-easyinput v-model="xm" suffixIcon="search" clearable
|
||||
placeholder="姓名模糊查询" @change="Search" @iconClick="Search" /></uni-col>
|
||||
<uni-col :span="11" :push="2">
|
||||
<uni-easyinput v-model="ldhth" focus suffixIcon="search" clearable placeholder="劳动合同号模糊查询"
|
||||
<uni-easyinput v-model="ldhth" suffixIcon="search" clearable placeholder="劳动合同号模糊查询"
|
||||
@change="Search" @iconClick="Search" />
|
||||
</uni-col>
|
||||
</uni-row>
|
||||
@ -34,6 +33,9 @@
|
||||
:border="true" :data="ryDataList" @detail="detail"></zb-table>
|
||||
<uni-pagination :current="current" :pagerCount="pages" :total="total" prev-text="前一页" next-text="后一页"
|
||||
:show-icon="false" @change="pagechange" />
|
||||
<view>
|
||||
<text class="example-info">当前页:{{ current }},数据总量:{{ total }}条,每页数据:{{ pageSize }}</text>
|
||||
</view>
|
||||
</uni-card>
|
||||
</scroll-view>
|
||||
|
||||
@ -138,7 +140,6 @@
|
||||
})
|
||||
|
||||
function detail(record) {
|
||||
// console.log(record)
|
||||
|
||||
uni.navigateTo({
|
||||
url: "/pages/views/renliziyuan/renyuanxinxi/detail?data=" + encodeURIComponent(JSON.stringify(record))
|
||||
@ -169,8 +170,7 @@
|
||||
ryDataList.value = res.result.records
|
||||
total.value = res.result.total
|
||||
pages.value = res.result.pages
|
||||
|
||||
|
||||
current.value = res.result.current
|
||||
}
|
||||
}).catch((err) => {
|
||||
console.log(err);
|
||||
|
@ -2,26 +2,26 @@
|
||||
<view>
|
||||
<uni-card>
|
||||
<uni-forms>
|
||||
<uni-forms-item>
|
||||
|
||||
<uni-forms-item label="所属单位" label-position="top" name="depart">
|
||||
<trq-depart-select returnCodeOrID="orgCode" @change="departChange"></trq-depart-select>
|
||||
</uni-forms-item>
|
||||
</uni-forms>
|
||||
<uni-title title="所属单位 " align="center"></uni-title>
|
||||
|
||||
<trq-depart-select returnCodeOrID="orgCode" @change="departChange"></trq-depart-select>
|
||||
|
||||
<uni-row>
|
||||
<uni-col :span="6"><button @click="getRyByxb(0)" type="primary" size="mini"
|
||||
<uni-col :span="12"><button @click="getRyByxb(0)" type="primary" size="mini"
|
||||
style="margin: 10px 10px 10px 10px;">性别分组统计</button></uni-col>
|
||||
<uni-col :span="6"><button @click="getRyBynl(0)" type="primary" size="mini"
|
||||
<uni-col :span="12"><button @click="getRyBynl(0)" type="primary" size="mini"
|
||||
style="margin: 10px 10px 10px 10px;">年龄分组统计</button></uni-col>
|
||||
<uni-col :span="6"><button @click="getRyByxb(1)" type="primary" size="mini"
|
||||
style="margin: 10px 10px 10px 10px;">性别总统计</button></uni-col>
|
||||
<uni-col :span="6"><button @click="getRyBynl(1)" type="primary" size="mini"
|
||||
style="margin: 10px 10px 10px 10px;">年龄总统计</button></uni-col>
|
||||
</uni-row><uni-row><uni-col :span="12"><button @click="getRyByxb(1)" type="primary" size="mini"
|
||||
style="margin: 10px 10px 10px 10px;">性别全厂统计</button></uni-col>
|
||||
<uni-col :span="12"><button @click="getRyBynl(1)" type="primary" size="mini"
|
||||
style="margin: 10px 10px 10px 10px;">年龄全厂统计</button></uni-col>
|
||||
</uni-row>
|
||||
</uni-card>
|
||||
<uni-card>
|
||||
<view>
|
||||
<l-echart ref="chartRef"></l-echart>
|
||||
</view>
|
||||
|
||||
<view style="width:750rpx; height:750rpx"><l-echart ref="myChart" @finished="init"></l-echart></view>
|
||||
</uni-card>
|
||||
</view>
|
||||
</template>
|
||||
@ -29,6 +29,7 @@
|
||||
|
||||
<script setup>
|
||||
import * as echarts from 'echarts'
|
||||
|
||||
import {
|
||||
onReady,
|
||||
onLoad
|
||||
@ -49,14 +50,18 @@
|
||||
cxcRyDatacountByNlTotal
|
||||
} from '@/api/renyuan.js'
|
||||
|
||||
|
||||
|
||||
const chartRef = ref(null)
|
||||
const ryCountData = ref([])
|
||||
const departID = ref("")
|
||||
|
||||
const option = ref({
|
||||
notMerge: true,
|
||||
backgroundColor: '#F8FAFF',
|
||||
tooltip: {
|
||||
trigger: 'axis',
|
||||
showContent: this.showContent,
|
||||
showContent: "人员统计",
|
||||
axisPointer: {
|
||||
type: 'shadow',
|
||||
label: {
|
||||
@ -195,18 +200,19 @@
|
||||
ryCountData.value = []
|
||||
let queryParm = {};
|
||||
queryParm.orgCode = departID.value
|
||||
cxcRyDatacountByXb(queryParm).then((res) => {
|
||||
console.log(res);
|
||||
if (res.success) {
|
||||
xData.value = [];
|
||||
ySeries.value = [];
|
||||
legData.value = [];
|
||||
let serie = {
|
||||
name: '',
|
||||
type: 'bar',
|
||||
data: [],
|
||||
itemStyle: {
|
||||
normal: {
|
||||
if (val == 0) {
|
||||
cxcRyDatacountByXb(queryParm).then((res) => {
|
||||
if (res.success) {
|
||||
ryCountData.value = res.result
|
||||
// console.log(ryCountData.value);
|
||||
xData.value = [];
|
||||
ySeries.value = [];
|
||||
legData.value = [];
|
||||
let serie = {
|
||||
name: '',
|
||||
type: 'bar',
|
||||
data: [],
|
||||
itemStyle: {
|
||||
label: {
|
||||
show: true, //开启显示
|
||||
position: 'top', //在上方显示
|
||||
@ -217,55 +223,303 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
let serieMan = JSON.parse(JSON.stringify(serie));
|
||||
let serieTotal = JSON.parse(JSON.stringify(serie));
|
||||
serieTotal.name = '总数';
|
||||
serieMan.name = '男';
|
||||
let serieWoman = JSON.parse(JSON.stringify(serie));
|
||||
serieWoman.name = '女';
|
||||
ryData.map(item => {
|
||||
xData.value.push(item.depart_name);
|
||||
serieMan.data.push(item.man);
|
||||
serieWoman.data.push(item.woman);
|
||||
serieTotal.data.push(item.total);
|
||||
});
|
||||
ySeries.value.push(serieTotal);
|
||||
ySeries.value.push(serieMan);
|
||||
ySeries.value.push(serieWoman);
|
||||
let serieMan = JSON.parse(JSON.stringify(serie));
|
||||
let serieTotal = JSON.parse(JSON.stringify(serie));
|
||||
serieTotal.name = '总数';
|
||||
serieMan.name = '男';
|
||||
let serieWoman = JSON.parse(JSON.stringify(serie));
|
||||
serieWoman.name = '女';
|
||||
ryCountData.value.map(item => {
|
||||
xData.value.push(item.depart_name);
|
||||
serieMan.data.push(item.man);
|
||||
serieWoman.data.push(item.woman);
|
||||
serieTotal.data.push(item.total);
|
||||
});
|
||||
ySeries.value.push(serieTotal);
|
||||
ySeries.value.push(serieMan);
|
||||
ySeries.value.push(serieWoman);
|
||||
legData.value = ['总数', '男', '女'];
|
||||
option.value.legend.data = legData.value;
|
||||
option.value.xAxis[0].data = xData.value;
|
||||
option.value.series = ySeries.value;
|
||||
option.value.title.text = '人员性别统计';
|
||||
|
||||
legData = ['总数', '男', '女'];
|
||||
option.value.legend.data = legData.value;
|
||||
option.value.xAxis[0].data = xData.value;
|
||||
option.value.series = ySeries.value;
|
||||
option.value.title.text = bmText + '人员性别统计';
|
||||
}
|
||||
|
||||
}
|
||||
setTimeout(async () => {
|
||||
if (!chartRef.value) return
|
||||
const myChart = await chartRef.value.init(echarts)
|
||||
myChart.setOption(option.value)
|
||||
}, 300)
|
||||
|
||||
setTimeout(async () => {
|
||||
if (!chartRef.value) return
|
||||
const myChart = await chartRef.value.init(echarts)
|
||||
myChart.setOption(option.value)
|
||||
}, 300)
|
||||
}).catch((err) => {
|
||||
console.log(err);
|
||||
})
|
||||
|
||||
}).catch((err) => {
|
||||
console.log(err);
|
||||
})
|
||||
}
|
||||
if (val == 1) {
|
||||
|
||||
cxcRyDatacountByXbTotal(queryParm).then((res) => {
|
||||
if (res.success) {
|
||||
ryCountData.value = res.result
|
||||
xData.value = [];
|
||||
ySeries.value = [];
|
||||
legData.value = [];
|
||||
let serie = {
|
||||
name: '',
|
||||
type: 'bar',
|
||||
data: [],
|
||||
itemStyle: {
|
||||
label: {
|
||||
show: true, //开启显示
|
||||
position: 'top', //在上方显示
|
||||
textStyle: {
|
||||
//数值样式
|
||||
color: 'black',
|
||||
fontSize: 16
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
let serieMan = JSON.parse(JSON.stringify(serie));
|
||||
let serieTotal = JSON.parse(JSON.stringify(serie));
|
||||
serieTotal.name = '总数';
|
||||
serieMan.name = '男';
|
||||
let serieWoman = JSON.parse(JSON.stringify(serie));
|
||||
serieWoman.name = '女';
|
||||
ryCountData.value.map(item => {
|
||||
xData.value.push("全厂");
|
||||
serieMan.data.push(item.man);
|
||||
serieWoman.data.push(item.woman);
|
||||
serieTotal.data.push(item.total);
|
||||
});
|
||||
ySeries.value.push(serieTotal);
|
||||
ySeries.value.push(serieMan);
|
||||
ySeries.value.push(serieWoman);
|
||||
legData.value = ['总数', '男', '女'];
|
||||
option.value.legend.data = legData.value;
|
||||
option.value.xAxis[0].data = xData.value;
|
||||
option.value.series = ySeries.value;
|
||||
option.value.title.text = '人员性别统计';
|
||||
|
||||
}
|
||||
|
||||
setTimeout(async () => {
|
||||
if (!chartRef.value) return
|
||||
const myChart = await chartRef.value.init(echarts)
|
||||
myChart.setOption(option.value)
|
||||
}, 300)
|
||||
|
||||
|
||||
}).catch((err) => {
|
||||
console.log(err);
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
function getRyBynl(val) {
|
||||
ryCountData.value = []
|
||||
let queryParm = {};
|
||||
queryParm.orgCode = departID.value
|
||||
cxcRyDatacountByNl(queryParm).then((res) => {
|
||||
console.log(res);
|
||||
if (res.success) {
|
||||
ryCountData.value = res.result.records
|
||||
}
|
||||
}).catch((err) => {
|
||||
console.log(err);
|
||||
})
|
||||
if (val == 0) {
|
||||
cxcRyDatacountByNl(queryParm).then((res) => {
|
||||
if (res.success) {
|
||||
ryCountData.value = res.result
|
||||
xData.value = [];
|
||||
ySeries.value = [];
|
||||
legData.value = [];
|
||||
let serie = {
|
||||
name: '',
|
||||
type: 'bar',
|
||||
data: [],
|
||||
itemStyle: {
|
||||
label: {
|
||||
show: true, //开启显示
|
||||
position: 'top', //在上方显示
|
||||
textStyle: {
|
||||
//数值样式
|
||||
color: 'black',
|
||||
fontSize: 16
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
let serie20 = JSON.parse(JSON.stringify(serie));
|
||||
serie20.name = '小于20岁';
|
||||
let serie21_30 = JSON.parse(JSON.stringify(serie));
|
||||
serie21_30.name = '21-30岁';
|
||||
let serie31_40 = JSON.parse(JSON.stringify(serie));
|
||||
serie31_40.name = '31-40岁';
|
||||
let serie41_50 = JSON.parse(JSON.stringify(serie));
|
||||
serie41_50.name = '41-50岁';
|
||||
let serie51_60 = JSON.parse(JSON.stringify(serie));
|
||||
serie51_60.name = '51-60岁';
|
||||
let serie45 = JSON.parse(JSON.stringify(serie));
|
||||
serie45.name = '45岁及以下';
|
||||
let serie46_60 = JSON.parse(JSON.stringify(serie));
|
||||
serie46_60.name = '45岁以上';
|
||||
let serie51_55 = JSON.parse(JSON.stringify(serie));
|
||||
serie51_55.name = '51-55岁';
|
||||
let serie55 = JSON.parse(JSON.stringify(serie));
|
||||
serie55.name = '55岁以上';
|
||||
let serietotal = JSON.parse(JSON.stringify(serie));
|
||||
serietotal.name = '总数';
|
||||
let serieavgage = JSON.parse(JSON.stringify(serie));
|
||||
serieavgage.name = '平均年龄';
|
||||
|
||||
ryCountData.value.map(item => {
|
||||
xData.value.push(item.depart_name);
|
||||
serietotal.data.push(item.total);
|
||||
serie20.data.push(item.age20);
|
||||
serie21_30.data.push(item.age21_30);
|
||||
serie31_40.data.push(item.age31_40);
|
||||
serie41_50.data.push(item.age41_50);
|
||||
serie51_60.data.push(item.age51_60);
|
||||
serie45.data.push(item.age45);
|
||||
serie46_60.data.push(item.age46_60);
|
||||
serie51_55.data.push(item.age51_55);
|
||||
serie55.data.push(item.age55);
|
||||
serieavgage.data.push(item.avgage);
|
||||
|
||||
});
|
||||
this.ySeries.push(serietotal);
|
||||
this.ySeries.push(serieavgage);
|
||||
this.ySeries.push(serie20);
|
||||
this.ySeries.push(serie21_30);
|
||||
this.ySeries.push(serie31_40);
|
||||
this.ySeries.push(serie41_50);
|
||||
this.ySeries.push(serie51_60);
|
||||
this.ySeries.push(serie45);
|
||||
this.ySeries.push(serie46_60);
|
||||
this.ySeries.push(serie51_55);
|
||||
this.ySeries.push(serie55);
|
||||
|
||||
legData.value = ['总数', '平均年龄', '小于20岁', '21-30岁', '31-40岁', '41-50岁', '51-60岁', '45岁及以下',
|
||||
'45岁以上', '51-55岁', '55岁以上'
|
||||
];
|
||||
|
||||
|
||||
option.value.legend.data = legData.value;
|
||||
option.value.xAxis[0].data = xData.value;
|
||||
option.value.series = ySeries.value;
|
||||
option.value.title.text = '人员年龄统计';
|
||||
|
||||
}
|
||||
|
||||
setTimeout(async () => {
|
||||
if (!chartRef.value) return
|
||||
const myChart = await chartRef.value.init(echarts)
|
||||
myChart.setOption(option.value)
|
||||
}, 300)
|
||||
|
||||
|
||||
}).catch((err) => {
|
||||
console.log(err);
|
||||
})
|
||||
}
|
||||
if (val == 1) {
|
||||
cxcRyDatacountByNlTotal(queryParm).then((res) => {
|
||||
if (res.success) {
|
||||
ryCountData.value = res.result
|
||||
xData.value = [];
|
||||
ySeries.value = [];
|
||||
legData.value = [];
|
||||
let serie = {
|
||||
name: '',
|
||||
type: 'bar',
|
||||
data: [],
|
||||
itemStyle: {
|
||||
label: {
|
||||
show: true, //开启显示
|
||||
position: 'top', //在上方显示
|
||||
textStyle: {
|
||||
//数值样式
|
||||
color: 'black',
|
||||
fontSize: 16
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
let serie20 = JSON.parse(JSON.stringify(serie));
|
||||
serie20.name = '小于20岁';
|
||||
let serie21_30 = JSON.parse(JSON.stringify(serie));
|
||||
serie21_30.name = '21-30岁';
|
||||
let serie31_40 = JSON.parse(JSON.stringify(serie));
|
||||
serie31_40.name = '31-40岁';
|
||||
let serie41_50 = JSON.parse(JSON.stringify(serie));
|
||||
serie41_50.name = '41-50岁';
|
||||
let serie51_60 = JSON.parse(JSON.stringify(serie));
|
||||
serie51_60.name = '51-60岁';
|
||||
let serie45 = JSON.parse(JSON.stringify(serie));
|
||||
serie45.name = '45岁及以下';
|
||||
let serie46_60 = JSON.parse(JSON.stringify(serie));
|
||||
serie46_60.name = '45岁以上';
|
||||
let serie51_55 = JSON.parse(JSON.stringify(serie));
|
||||
serie51_55.name = '51-55岁';
|
||||
let serie55 = JSON.parse(JSON.stringify(serie));
|
||||
serie55.name = '55岁以上';
|
||||
let serietotal = JSON.parse(JSON.stringify(serie));
|
||||
serietotal.name = '总数';
|
||||
let serieavgage = JSON.parse(JSON.stringify(serie));
|
||||
serieavgage.name = '平均年龄';
|
||||
|
||||
ryCountData.value.map(item => {
|
||||
xData.value.push("全厂");
|
||||
serietotal.data.push(item.total);
|
||||
serie20.data.push(item.age20);
|
||||
serie21_30.data.push(item.age21_30);
|
||||
serie31_40.data.push(item.age31_40);
|
||||
serie41_50.data.push(item.age41_50);
|
||||
serie51_60.data.push(item.age51_60);
|
||||
serie45.data.push(item.age45);
|
||||
serie46_60.data.push(item.age46_60);
|
||||
serie51_55.data.push(item.age51_55);
|
||||
serie55.data.push(item.age55);
|
||||
serieavgage.data.push(item.avgage);
|
||||
|
||||
});
|
||||
this.ySeries.push(serietotal);
|
||||
this.ySeries.push(serieavgage);
|
||||
this.ySeries.push(serie20);
|
||||
this.ySeries.push(serie21_30);
|
||||
this.ySeries.push(serie31_40);
|
||||
this.ySeries.push(serie41_50);
|
||||
this.ySeries.push(serie51_60);
|
||||
this.ySeries.push(serie45);
|
||||
this.ySeries.push(serie46_60);
|
||||
this.ySeries.push(serie51_55);
|
||||
this.ySeries.push(serie55);
|
||||
|
||||
legData.value = ['总数', '平均年龄', '小于20岁', '21-30岁', '31-40岁', '41-50岁', '51-60岁', '45岁及以下',
|
||||
'45岁以上', '51-55岁', '55岁以上'
|
||||
];
|
||||
|
||||
|
||||
option.value.legend.data = legData.value;
|
||||
option.value.xAxis[0].data = xData.value;
|
||||
option.value.series = ySeries.value;
|
||||
option.value.title.text = '人员年龄统计';
|
||||
|
||||
}
|
||||
|
||||
setTimeout(async () => {
|
||||
if (!chartRef.value) return
|
||||
const myChart = await chartRef.value.init(echarts)
|
||||
myChart.setOption(option.value)
|
||||
}, 300)
|
||||
|
||||
|
||||
}).catch((err) => {
|
||||
console.log(err);
|
||||
})
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
|
@ -1,40 +1,54 @@
|
||||
<template>
|
||||
<view :class="['f-col','aic',{'gray':store.isgray==1}]">
|
||||
<picker fields="month" mode="date" @change="bindPickerChange" :value="index">
|
||||
<view class="date">{{index}} 点击选择月份</view>
|
||||
</picker>
|
||||
<view class="info">
|
||||
<view class="info_title f-row aic">
|
||||
<view class="">
|
||||
<view :class="[{'gray':store.isgray==1}]">
|
||||
<view style="margin-top: 10px;margin-bottom: 10px;">
|
||||
<picker fields="month" mode="date" @change="bindPickerChange" :value="index">
|
||||
<view class="date">{{index}} 点击选择月份</view>
|
||||
</picker>
|
||||
</view>
|
||||
<uni-row>
|
||||
<uni-col :span="7">
|
||||
<view class="titleStyle">
|
||||
日期
|
||||
</view>
|
||||
<view class="">
|
||||
</uni-col>
|
||||
<uni-col :span="4">
|
||||
<view class="titleStyle">
|
||||
带班领导
|
||||
</view>
|
||||
<view class="">
|
||||
</uni-col>
|
||||
<uni-col :span="4">
|
||||
<view class="titleStyle">
|
||||
值班领导
|
||||
</view>
|
||||
<view class="">
|
||||
</uni-col>
|
||||
<uni-col :span="9">
|
||||
<view class="titleStyle">
|
||||
值班干部
|
||||
</view>
|
||||
</view>
|
||||
<view class="data_box">
|
||||
<view class="data f-row aic" v-for="item,i in zhibanArr">
|
||||
<view class="">
|
||||
</uni-col>
|
||||
</uni-row>
|
||||
<uni-row>
|
||||
<view v-for="(item,index) in zhibanArr">
|
||||
<uni-col :span="7">
|
||||
<view class="dataStyle">
|
||||
{{item.date}}
|
||||
</view>
|
||||
<view class="">
|
||||
</uni-col>
|
||||
<uni-col :span="4">
|
||||
<view class="dataStyle">
|
||||
{{item.dbld_dictText}}
|
||||
</view>
|
||||
<view class="">
|
||||
</uni-col><uni-col :span="4">
|
||||
<view class="dataStyle">
|
||||
{{item.zbld_dictText}}
|
||||
</view>
|
||||
<view class="">
|
||||
</uni-col><uni-col :span="9">
|
||||
<view class="dataStyle">
|
||||
{{item.zbgbrealname}}
|
||||
</view>
|
||||
</view>
|
||||
</uni-col>
|
||||
</view>
|
||||
</view>
|
||||
</uni-row>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@ -53,6 +67,36 @@
|
||||
} from '@/store';
|
||||
const store = useStore()
|
||||
import dayjs from 'dayjs';
|
||||
|
||||
|
||||
let column = ref([{
|
||||
name: 'date',
|
||||
label: '日期',
|
||||
width: 70,
|
||||
align: 'center'
|
||||
},
|
||||
|
||||
{
|
||||
name: 'dbld_dictText',
|
||||
label: '带班领导',
|
||||
align: 'center',
|
||||
width: 60
|
||||
},
|
||||
{
|
||||
name: 'zbld_dictText',
|
||||
label: '值班领导',
|
||||
align: 'center',
|
||||
width: 60
|
||||
},
|
||||
{
|
||||
name: 'zbgbrealname',
|
||||
label: '值班干部',
|
||||
align: 'center',
|
||||
width: 150
|
||||
}
|
||||
|
||||
])
|
||||
|
||||
const zhibanArr = ref([])
|
||||
onLoad(() => {
|
||||
zhibanQuery()
|
||||
@ -83,36 +127,36 @@
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.info {
|
||||
background: #F8F8F8;
|
||||
border-radius: 8rpx;
|
||||
|
||||
.titleStyle {
|
||||
font-size: 12px;
|
||||
color: #747474;
|
||||
line-height: 25px;
|
||||
height: 25px;
|
||||
background: #F2F9FC;
|
||||
text-align: center;
|
||||
width: 690rpx;
|
||||
margin-top: 23rpx;
|
||||
vertical-align: middle;
|
||||
border-left: 1px solid #919191;
|
||||
border-bottom: 1px solid #919191;
|
||||
;
|
||||
}
|
||||
|
||||
.info_title {
|
||||
font-size: 24rpx;
|
||||
color: #333333;
|
||||
padding: 24rpx 0;
|
||||
border-bottom: 1px solid #EFEFEF;
|
||||
/* 内容样式 */
|
||||
.dataStyle {
|
||||
max-font-size: 14px;
|
||||
/* 最大字体限制 */
|
||||
min-font-size: 10px;
|
||||
/* 最小字体限制 */
|
||||
font-size: 12px;
|
||||
color: #00007f;
|
||||
line-height: 25px;
|
||||
height: 25px;
|
||||
font-weight: 500;
|
||||
text-align: center;
|
||||
vertical-align: middle;
|
||||
border-bottom: 1px solid #919191;
|
||||
border-left: 1px solid #919191;
|
||||
text-overflow: ellipsis;
|
||||
|
||||
view {
|
||||
flex: 1;
|
||||
}
|
||||
}
|
||||
|
||||
.data_box {
|
||||
font-size: 24rpx;
|
||||
padding-bottom: 24rpx;
|
||||
color: #888888;
|
||||
|
||||
.data {
|
||||
margin-top: 23rpx;
|
||||
|
||||
view {
|
||||
flex: 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
Loading…
Reference in New Issue
Block a user