Compare commits
No commits in common. "8e94f1d7f2fb3bb6796f84e616a64d99b3b82b0a" and "90584edaf966c5ca58b02847f4afe443a1ad9551" have entirely different histories.
8e94f1d7f2
...
90584edaf9
26
.hbuilderx/launch.json
Normal file
26
.hbuilderx/launch.json
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
{
|
||||||
|
// launch.json 配置了启动调试时相关设置,configurations下节点名称可为 app-plus/h5/mp-weixin/mp-baidu/mp-alipay/mp-qq/mp-toutiao/mp-360/
|
||||||
|
// launchtype项可配置值为local或remote, local代表前端连本地云函数,remote代表前端连云端云函数
|
||||||
|
"version" : "0.0",
|
||||||
|
"configurations" : [
|
||||||
|
{
|
||||||
|
"app-plus" :
|
||||||
|
{
|
||||||
|
"launchtype" : "local"
|
||||||
|
},
|
||||||
|
"default" :
|
||||||
|
{
|
||||||
|
"launchtype" : "local"
|
||||||
|
},
|
||||||
|
"mp-weixin" :
|
||||||
|
{
|
||||||
|
"launchtype" : "local"
|
||||||
|
},
|
||||||
|
"type" : "uniCloud"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"playground" : "standard",
|
||||||
|
"type" : "uni-app:app-android"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
13
.vite/deps/_metadata.json
Normal file
13
.vite/deps/_metadata.json
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
{
|
||||||
|
"hash": "5610b5a1",
|
||||||
|
"browserHash": "3deef0d9",
|
||||||
|
"optimized": {
|
||||||
|
"base-64": {
|
||||||
|
"src": "../../node_modules/base-64/base64.js",
|
||||||
|
"file": "base-64.js",
|
||||||
|
"fileHash": "768aae23",
|
||||||
|
"needsInterop": true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"chunks": {}
|
||||||
|
}
|
117
.vite/deps/base-64.js
Normal file
117
.vite/deps/base-64.js
Normal file
@ -0,0 +1,117 @@
|
|||||||
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
||||||
|
var __commonJS = (cb, mod) => function __require() {
|
||||||
|
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
||||||
|
};
|
||||||
|
|
||||||
|
// ../../../../Documents/HBuilderProjects/B404219-tianranqi/node_modules/base-64/base64.js
|
||||||
|
var require_base64 = __commonJS({
|
||||||
|
"../../../../Documents/HBuilderProjects/B404219-tianranqi/node_modules/base-64/base64.js"(exports, module) {
|
||||||
|
(function(root) {
|
||||||
|
var freeExports = typeof exports == "object" && exports;
|
||||||
|
var freeModule = typeof module == "object" && module && module.exports == freeExports && module;
|
||||||
|
var freeGlobal = typeof global == "object" && global;
|
||||||
|
if (freeGlobal.global === freeGlobal || freeGlobal.window === freeGlobal) {
|
||||||
|
root = freeGlobal;
|
||||||
|
}
|
||||||
|
var InvalidCharacterError = function(message) {
|
||||||
|
this.message = message;
|
||||||
|
};
|
||||||
|
InvalidCharacterError.prototype = new Error();
|
||||||
|
InvalidCharacterError.prototype.name = "InvalidCharacterError";
|
||||||
|
var error = function(message) {
|
||||||
|
throw new InvalidCharacterError(message);
|
||||||
|
};
|
||||||
|
var TABLE = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
|
||||||
|
var REGEX_SPACE_CHARACTERS = /[\t\n\f\r ]/g;
|
||||||
|
var decode = function(input) {
|
||||||
|
input = String(input).replace(REGEX_SPACE_CHARACTERS, "");
|
||||||
|
var length = input.length;
|
||||||
|
if (length % 4 == 0) {
|
||||||
|
input = input.replace(/==?$/, "");
|
||||||
|
length = input.length;
|
||||||
|
}
|
||||||
|
if (length % 4 == 1 || // http://whatwg.org/C#alphanumeric-ascii-characters
|
||||||
|
/[^+a-zA-Z0-9/]/.test(input)) {
|
||||||
|
error(
|
||||||
|
"Invalid character: the string to be decoded is not correctly encoded."
|
||||||
|
);
|
||||||
|
}
|
||||||
|
var bitCounter = 0;
|
||||||
|
var bitStorage;
|
||||||
|
var buffer;
|
||||||
|
var output = "";
|
||||||
|
var position = -1;
|
||||||
|
while (++position < length) {
|
||||||
|
buffer = TABLE.indexOf(input.charAt(position));
|
||||||
|
bitStorage = bitCounter % 4 ? bitStorage * 64 + buffer : buffer;
|
||||||
|
if (bitCounter++ % 4) {
|
||||||
|
output += String.fromCharCode(
|
||||||
|
255 & bitStorage >> (-2 * bitCounter & 6)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return output;
|
||||||
|
};
|
||||||
|
var encode = function(input) {
|
||||||
|
input = String(input);
|
||||||
|
if (/[^\0-\xFF]/.test(input)) {
|
||||||
|
error(
|
||||||
|
"The string to be encoded contains characters outside of the Latin1 range."
|
||||||
|
);
|
||||||
|
}
|
||||||
|
var padding = input.length % 3;
|
||||||
|
var output = "";
|
||||||
|
var position = -1;
|
||||||
|
var a;
|
||||||
|
var b;
|
||||||
|
var c;
|
||||||
|
var buffer;
|
||||||
|
var length = input.length - padding;
|
||||||
|
while (++position < length) {
|
||||||
|
a = input.charCodeAt(position) << 16;
|
||||||
|
b = input.charCodeAt(++position) << 8;
|
||||||
|
c = input.charCodeAt(++position);
|
||||||
|
buffer = a + b + c;
|
||||||
|
output += TABLE.charAt(buffer >> 18 & 63) + TABLE.charAt(buffer >> 12 & 63) + TABLE.charAt(buffer >> 6 & 63) + TABLE.charAt(buffer & 63);
|
||||||
|
}
|
||||||
|
if (padding == 2) {
|
||||||
|
a = input.charCodeAt(position) << 8;
|
||||||
|
b = input.charCodeAt(++position);
|
||||||
|
buffer = a + b;
|
||||||
|
output += TABLE.charAt(buffer >> 10) + TABLE.charAt(buffer >> 4 & 63) + TABLE.charAt(buffer << 2 & 63) + "=";
|
||||||
|
} else if (padding == 1) {
|
||||||
|
buffer = input.charCodeAt(position);
|
||||||
|
output += TABLE.charAt(buffer >> 2) + TABLE.charAt(buffer << 4 & 63) + "==";
|
||||||
|
}
|
||||||
|
return output;
|
||||||
|
};
|
||||||
|
var base64 = {
|
||||||
|
"encode": encode,
|
||||||
|
"decode": decode,
|
||||||
|
"version": "1.0.0"
|
||||||
|
};
|
||||||
|
if (typeof define == "function" && typeof define.amd == "object" && define.amd) {
|
||||||
|
define(function() {
|
||||||
|
return base64;
|
||||||
|
});
|
||||||
|
} else if (freeExports && !freeExports.nodeType) {
|
||||||
|
if (freeModule) {
|
||||||
|
freeModule.exports = base64;
|
||||||
|
} else {
|
||||||
|
for (var key in base64) {
|
||||||
|
base64.hasOwnProperty(key) && (freeExports[key] = base64[key]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
root.base64 = base64;
|
||||||
|
}
|
||||||
|
})(exports);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
export default require_base64();
|
||||||
|
/*! Bundled license information:
|
||||||
|
|
||||||
|
base-64/base64.js:
|
||||||
|
(*! https://mths.be/base64 v1.0.0 by @mathias | MIT license *)
|
||||||
|
*/
|
||||||
|
//# sourceMappingURL=base-64.js.map
|
7
.vite/deps/base-64.js.map
Normal file
7
.vite/deps/base-64.js.map
Normal file
File diff suppressed because one or more lines are too long
3
.vite/deps/package.json
Normal file
3
.vite/deps/package.json
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
"type": "module"
|
||||||
|
}
|
@ -57,14 +57,13 @@ export function queryZyzgdjByRyLdhth(ldhth) { // 获取人员职业资格等级
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ryList: '/cxchrygxxtj/cxcHrYgxxtj/list',
|
||||||
|
// ryByXb: '/cxcRyData/countByXb',
|
||||||
|
// ryByNl: '/cxcRyData/countByNl',
|
||||||
|
// ryByXbTotal: '/cxcRyData/countByXbTotal',
|
||||||
|
// ryByNlTotal: '/cxcRyData/countByNlTotal',
|
||||||
|
// bmList: '/sys/sysDepart/queryTreeList'
|
||||||
|
|
||||||
export function queryJxkhByRyLdhth(ldhth) { // 绩效考核信息
|
|
||||||
return https({
|
|
||||||
url: '/cxc_rlzy.zb/cxcRlzyZb/listCxcRlzyJxkhByMainId',
|
|
||||||
method: 'get',
|
|
||||||
data: ldhth
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
export function cxcHrYgxxtj(parm) { // 获取员工信息统计
|
export function cxcHrYgxxtj(parm) { // 获取员工信息统计
|
||||||
return https({
|
return https({
|
||||||
@ -74,9 +73,33 @@ export function cxcHrYgxxtj(parm) { // 获取员工信息统计
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
export function cxcRyDataTongji(url, parm) { // 员工信息统计
|
export function cxcRyDatacountByXb(parm) { // 通过性别获取员工信息统计
|
||||||
return https({
|
return https({
|
||||||
url: url,
|
url: '/cxcRyData/countByXb',
|
||||||
|
method: 'get',
|
||||||
|
data: parm
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function cxcRyDatacountByNl(parm) { // 通过年龄获取员工信息统计
|
||||||
|
return https({
|
||||||
|
url: '/cxcRyData/countByNl',
|
||||||
|
method: 'get',
|
||||||
|
data: parm
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function cxcRyDatacountByXbTotal(parm) { // 通过性别获取员工信息统计
|
||||||
|
return https({
|
||||||
|
url: '/cxcRyData/countByXbTotal',
|
||||||
|
method: 'get',
|
||||||
|
data: parm
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function cxcRyDatacountByNlTotal(parm) { // 通过年龄获取员工信息统计
|
||||||
|
return https({
|
||||||
|
url: '/cxcRyData/countByNlTotal',
|
||||||
method: 'get',
|
method: 'get',
|
||||||
data: parm
|
data: parm
|
||||||
})
|
})
|
||||||
|
@ -182,14 +182,6 @@
|
|||||||
}).then((res) => {
|
}).then((res) => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
step.value = res.result.records
|
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;
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
241
manifest.json
241
manifest.json
@ -1,122 +1,123 @@
|
|||||||
{
|
{
|
||||||
"name": "数智产销",
|
"name" : "数智产销",
|
||||||
"appid": "__UNI__9F097F0",
|
"appid" : "__UNI__9F097F0",
|
||||||
"description": "",
|
"description" : "",
|
||||||
"versionName": "1.1.4.1",
|
"versionName" : "1.1.1",
|
||||||
"versionCode": 20250121,
|
"versionCode" : 20250106,
|
||||||
"transformPx": false,
|
"transformPx" : false,
|
||||||
/* 5+App特有相关 */
|
/* 5+App特有相关 */
|
||||||
"app-plus": {
|
"app-plus" : {
|
||||||
"usingComponents": true,
|
"usingComponents" : true,
|
||||||
"nvueStyleCompiler": "uni-app",
|
"nvueStyleCompiler" : "uni-app",
|
||||||
"compilerVersion": 3,
|
"compilerVersion" : 3,
|
||||||
"splashscreen": {
|
"splashscreen" : {
|
||||||
"alwaysShowBeforeRender": true,
|
"alwaysShowBeforeRender" : true,
|
||||||
"waiting": true,
|
"waiting" : true,
|
||||||
"autoclose": true,
|
"autoclose" : true,
|
||||||
"delay": 0
|
"delay" : 0
|
||||||
},
|
},
|
||||||
"compatible": {
|
"compatible" : {
|
||||||
"ignoreVersion": true
|
"ignoreVersion" : true
|
||||||
},
|
},
|
||||||
/* 模块配置 */
|
/* 模块配置 */
|
||||||
"modules": {
|
"modules" : {
|
||||||
"Geolocation": {},
|
"Geolocation" : {},
|
||||||
"Fingerprint": {},
|
"Fingerprint" : {},
|
||||||
"Camera": {},
|
"Camera" : {},
|
||||||
"Barcode": {}
|
"Barcode" : {}
|
||||||
},
|
},
|
||||||
/* 应用发布信息 */
|
/* 应用发布信息 */
|
||||||
"distribute": {
|
"distribute" : {
|
||||||
/* android打包配置 */
|
/* android打包配置 */
|
||||||
"android": {
|
"android" : {
|
||||||
"permissions": [
|
"permissions" : [
|
||||||
"<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
|
"<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
|
||||||
"<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
|
"<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
|
||||||
"<uses-permission android:name=\"android.permission.VIBRATE\"/>",
|
"<uses-permission android:name=\"android.permission.VIBRATE\"/>",
|
||||||
"<uses-permission android:name=\"android.permission.READ_LOGS\"/>",
|
"<uses-permission android:name=\"android.permission.READ_LOGS\"/>",
|
||||||
"<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
|
"<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
|
||||||
"<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
|
"<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
|
||||||
"<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
|
"<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
|
||||||
"<uses-permission android:name=\"android.permission.CAMERA\"/>",
|
"<uses-permission android:name=\"android.permission.CAMERA\"/>",
|
||||||
"<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>",
|
"<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>",
|
||||||
"<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
|
"<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
|
||||||
"<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
|
"<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
|
||||||
"<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
|
"<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
|
||||||
"<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
|
"<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
|
||||||
"<uses-feature android:name=\"android.hardware.camera\"/>",
|
"<uses-feature android:name=\"android.hardware.camera\"/>",
|
||||||
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
|
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
/* ios打包配置 */
|
/* ios打包配置 */
|
||||||
"ios": {
|
"ios" : {
|
||||||
"dSYMs": false
|
"dSYMs" : false
|
||||||
},
|
},
|
||||||
/* SDK配置 */
|
/* SDK配置 */
|
||||||
"sdkConfigs": {
|
"sdkConfigs" : {
|
||||||
"ad": {},
|
"ad" : {},
|
||||||
"geolocation": {
|
"geolocation" : {
|
||||||
"system": {
|
"system" : {
|
||||||
"__platform__": ["android"]
|
"__platform__" : [ "android" ]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"icons": {
|
"icons" : {
|
||||||
"android": {
|
"android" : {
|
||||||
"hdpi": "unpackage/res/icons/72x72.png",
|
"hdpi" : "unpackage/res/icons/72x72.png",
|
||||||
"xhdpi": "unpackage/res/icons/96x96.png",
|
"xhdpi" : "unpackage/res/icons/96x96.png",
|
||||||
"xxhdpi": "unpackage/res/icons/144x144.png",
|
"xxhdpi" : "unpackage/res/icons/144x144.png",
|
||||||
"xxxhdpi": "unpackage/res/icons/192x192.png"
|
"xxxhdpi" : "unpackage/res/icons/192x192.png"
|
||||||
},
|
},
|
||||||
"ios": {
|
"ios" : {
|
||||||
"appstore": "unpackage/res/icons/1024x1024.png",
|
"appstore" : "unpackage/res/icons/1024x1024.png",
|
||||||
"ipad": {
|
"ipad" : {
|
||||||
"app": "unpackage/res/icons/76x76.png",
|
"app" : "unpackage/res/icons/76x76.png",
|
||||||
"app@2x": "unpackage/res/icons/152x152.png",
|
"app@2x" : "unpackage/res/icons/152x152.png",
|
||||||
"notification": "unpackage/res/icons/20x20.png",
|
"notification" : "unpackage/res/icons/20x20.png",
|
||||||
"notification@2x": "unpackage/res/icons/40x40.png",
|
"notification@2x" : "unpackage/res/icons/40x40.png",
|
||||||
"proapp@2x": "unpackage/res/icons/167x167.png",
|
"proapp@2x" : "unpackage/res/icons/167x167.png",
|
||||||
"settings": "unpackage/res/icons/29x29.png",
|
"settings" : "unpackage/res/icons/29x29.png",
|
||||||
"settings@2x": "unpackage/res/icons/58x58.png",
|
"settings@2x" : "unpackage/res/icons/58x58.png",
|
||||||
"spotlight": "unpackage/res/icons/40x40.png",
|
"spotlight" : "unpackage/res/icons/40x40.png",
|
||||||
"spotlight@2x": "unpackage/res/icons/80x80.png"
|
"spotlight@2x" : "unpackage/res/icons/80x80.png"
|
||||||
},
|
},
|
||||||
"iphone": {
|
"iphone" : {
|
||||||
"app@2x": "unpackage/res/icons/120x120.png",
|
"app@2x" : "unpackage/res/icons/120x120.png",
|
||||||
"app@3x": "unpackage/res/icons/180x180.png",
|
"app@3x" : "unpackage/res/icons/180x180.png",
|
||||||
"notification@2x": "unpackage/res/icons/40x40.png",
|
"notification@2x" : "unpackage/res/icons/40x40.png",
|
||||||
"notification@3x": "unpackage/res/icons/60x60.png",
|
"notification@3x" : "unpackage/res/icons/60x60.png",
|
||||||
"settings@2x": "unpackage/res/icons/58x58.png",
|
"settings@2x" : "unpackage/res/icons/58x58.png",
|
||||||
"settings@3x": "unpackage/res/icons/87x87.png",
|
"settings@3x" : "unpackage/res/icons/87x87.png",
|
||||||
"spotlight@2x": "unpackage/res/icons/80x80.png",
|
"spotlight@2x" : "unpackage/res/icons/80x80.png",
|
||||||
"spotlight@3x": "unpackage/res/icons/120x120.png"
|
"spotlight@3x" : "unpackage/res/icons/120x120.png"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
/* 快应用特有相关 */
|
/* 快应用特有相关 */
|
||||||
"quickapp": {},
|
"quickapp" : {},
|
||||||
/* 小程序特有相关 */
|
/* 小程序特有相关 */
|
||||||
"mp-weixin": {
|
"mp-weixin" : {
|
||||||
"appid": "",
|
"appid" : "",
|
||||||
"setting": {
|
"setting" : {
|
||||||
"urlCheck": false
|
"urlCheck" : false
|
||||||
},
|
},
|
||||||
"usingComponents": true
|
"usingComponents" : true
|
||||||
},
|
},
|
||||||
"mp-alipay": {
|
"mp-alipay" : {
|
||||||
"usingComponents": true
|
"usingComponents" : true
|
||||||
},
|
},
|
||||||
"mp-baidu": {
|
"mp-baidu" : {
|
||||||
"usingComponents": true
|
"usingComponents" : true
|
||||||
},
|
},
|
||||||
"mp-toutiao": {
|
"mp-toutiao" : {
|
||||||
"usingComponents": true
|
"usingComponents" : true
|
||||||
},
|
},
|
||||||
"uniStatistics": {
|
"uniStatistics" : {
|
||||||
"enable": false
|
"enable" : false
|
||||||
},
|
},
|
||||||
"vueVersion": "3"
|
"vueVersion" : "3"
|
||||||
}
|
}
|
||||||
/* 模块配置 */
|
/* 模块配置 */
|
||||||
|
|
||||||
|
2
package-lock.json
generated
2
package-lock.json
generated
@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"name": "cxc-szcx-uniapp",
|
"name": "cxc-szcx-uniapp-master",
|
||||||
"lockfileVersion": 2,
|
"lockfileVersion": 2,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
|
10
pages.json
10
pages.json
@ -230,15 +230,7 @@
|
|||||||
{
|
{
|
||||||
"path": "pages/views/renliziyuan/renyuanxinxi/tongji",
|
"path": "pages/views/renliziyuan/renyuanxinxi/tongji",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "人员年龄分组统计信息",
|
"navigationBarTitleText": "人员统计信息",
|
||||||
"navigationBarTextStyle": "white"
|
|
||||||
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"path": "pages/views/renliziyuan/renyuanxinxi/xbtongji",
|
|
||||||
"style": {
|
|
||||||
"navigationBarTitleText": "人员性别分组统计信息",
|
|
||||||
"navigationBarTextStyle": "white"
|
"navigationBarTextStyle": "white"
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -64,7 +64,7 @@
|
|||||||
const {
|
const {
|
||||||
proxy
|
proxy
|
||||||
} = getCurrentInstance()
|
} = getCurrentInstance()
|
||||||
|
|
||||||
/** 系统信息 */
|
/** 系统信息 */
|
||||||
const systemInfo = uni.getSystemInfoSync()
|
const systemInfo = uni.getSystemInfoSync()
|
||||||
/**是否明文显示密码*/
|
/**是否明文显示密码*/
|
||||||
|
@ -4,45 +4,6 @@
|
|||||||
<view style="padding: 10px 10px 10px 10px;">
|
<view style="padding: 10px 10px 10px 10px;">
|
||||||
<uni-title title="基本信息" type="h1" color="blue"></uni-title>
|
<uni-title title="基本信息" type="h1" color="blue"></uni-title>
|
||||||
<yjly-row-cell :cellData="cellData" :rowDataCount="3"></yjly-row-cell>
|
<yjly-row-cell :cellData="cellData" :rowDataCount="3"></yjly-row-cell>
|
||||||
|
|
||||||
<uni-title title="年度绩效考核" type="h1" color="blue"></uni-title>
|
|
||||||
<uni-row>
|
|
||||||
<uni-col :span="4">
|
|
||||||
<view class="titleStyle">
|
|
||||||
序号
|
|
||||||
</view>
|
|
||||||
</uni-col>
|
|
||||||
<uni-col :span="10">
|
|
||||||
<view class="titleStyle">
|
|
||||||
绩效考核年份
|
|
||||||
</view>
|
|
||||||
</uni-col>
|
|
||||||
<uni-col :span="10">
|
|
||||||
<view class="titleStyle">
|
|
||||||
绩效考核成绩
|
|
||||||
</view>
|
|
||||||
</uni-col>
|
|
||||||
|
|
||||||
|
|
||||||
</uni-row>
|
|
||||||
<uni-row>
|
|
||||||
<view v-for="(item,index) in jxkhxxList">
|
|
||||||
<uni-col :span="4">
|
|
||||||
<view class="dataStyle">
|
|
||||||
{{index+1}}
|
|
||||||
</view>
|
|
||||||
</uni-col>
|
|
||||||
<uni-col :span="10">
|
|
||||||
<view class="dataStyle">
|
|
||||||
{{item.nf}}
|
|
||||||
</view>
|
|
||||||
</uni-col><uni-col :span="10">
|
|
||||||
<view class="dataStyle">
|
|
||||||
{{item.khcj+"---"+item.khcj_dictText}}
|
|
||||||
</view>
|
|
||||||
</uni-col>
|
|
||||||
</view>
|
|
||||||
</uni-row>
|
|
||||||
<uni-title title="工作简历" type="h1" color="blue"></uni-title>
|
<uni-title title="工作简历" type="h1" color="blue"></uni-title>
|
||||||
<uni-row>
|
<uni-row>
|
||||||
<uni-col :span="4">
|
<uni-col :span="4">
|
||||||
@ -287,8 +248,7 @@
|
|||||||
queryJtzycyByRyLdhth,
|
queryJtzycyByRyLdhth,
|
||||||
queryXlxxByRyLdhth,
|
queryXlxxByRyLdhth,
|
||||||
queryGbxxByRyLdhth,
|
queryGbxxByRyLdhth,
|
||||||
queryZyzgdjByRyLdhth,
|
queryZyzgdjByRyLdhth
|
||||||
queryJxkhByRyLdhth
|
|
||||||
} from '@/api/renyuan.js'
|
} from '@/api/renyuan.js'
|
||||||
import {
|
import {
|
||||||
useStore
|
useStore
|
||||||
@ -308,22 +268,10 @@
|
|||||||
const xlxxList = ref([]) // 人员其他子表信息-学历证书
|
const xlxxList = ref([]) // 人员其他子表信息-学历证书
|
||||||
const gbxxList = ref([]) // 人员其他子表信息-干部信息
|
const gbxxList = ref([]) // 人员其他子表信息-干部信息
|
||||||
const zyzgdjList = ref([]) // 人员其他子表信息-职业资格等级
|
const zyzgdjList = ref([]) // 人员其他子表信息-职业资格等级
|
||||||
const jxkhxxList = ref([]) // 人员其他子表信息-绩效考核信息
|
|
||||||
|
|
||||||
|
|
||||||
function getChildTable() {
|
function getChildTable() {
|
||||||
console.log(ldhth.value)
|
console.log(ldhth.value)
|
||||||
|
|
||||||
queryJxkhByRyLdhth({
|
|
||||||
"ldhth": ldhth.value
|
|
||||||
}).then((res) => {
|
|
||||||
// console.log(res);
|
|
||||||
jxkhxxList.value = res.result.records
|
|
||||||
// console.log(jxkhxxList.value)
|
|
||||||
}).catch((err) => {
|
|
||||||
console.log(err);
|
|
||||||
})
|
|
||||||
|
|
||||||
queryGbxxByRyLdhth({
|
queryGbxxByRyLdhth({
|
||||||
"ldhth": ldhth.value
|
"ldhth": ldhth.value
|
||||||
}).then((res) => {
|
}).then((res) => {
|
||||||
@ -379,29 +327,20 @@
|
|||||||
xlxxList.value = []
|
xlxxList.value = []
|
||||||
if (res.result.records.length > 0) {
|
if (res.result.records.length > 0) {
|
||||||
var rress = res.result.records
|
var rress = res.result.records
|
||||||
// console.log(rress);
|
|
||||||
for (let i = 0; i < rress.length; i++) {
|
for (let i = 0; i < rress.length; i++) {
|
||||||
if (rress[i].onexl == 1 & rress[i].zgxl == 1) {
|
if (rress[i].onexl == 1) {
|
||||||
rress[i].xllb = "第一学历"
|
|
||||||
xlxxList.value.push(JSON.parse(JSON.stringify(rress[i])))
|
|
||||||
// console.log(xlxxList.value)
|
|
||||||
rress[i].xllb = "最高学历"
|
|
||||||
xlxxList.value.push(JSON.parse(JSON.stringify(rress[i])))
|
|
||||||
// console.log(xlxxList.value)
|
|
||||||
}
|
|
||||||
if (rress[i].onexl == 1 & rress[i].zgxl != 1) {
|
|
||||||
rress[i].xllb = "第一学历"
|
rress[i].xllb = "第一学历"
|
||||||
xlxxList.value.push(rress[i])
|
xlxxList.value.push(rress[i])
|
||||||
|
}
|
||||||
|
if (rress[i].zgxl == 1) {
|
||||||
|
rress[i].xllb = "最高学历"
|
||||||
|
xlxxList.value.push(rress[i])
|
||||||
|
}
|
||||||
|
|
||||||
}
|
|
||||||
if (rress[i].onexl != 1 & rress[i].zgxl == 1) {
|
|
||||||
rress[i].xllb = "最高学历"
|
|
||||||
xlxxList.value.push(rress[i])
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
console.log(xlxxList.value);
|
||||||
}
|
}
|
||||||
}).catch((err) => {
|
}).catch((err) => {
|
||||||
console.log(err);
|
console.log(err);
|
||||||
@ -578,9 +517,7 @@
|
|||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
border-bottom: 1px solid #919191;
|
border-bottom: 1px solid #919191;
|
||||||
border-left: 1px solid #919191;
|
border-left: 1px solid #919191;
|
||||||
text-align: center;
|
text-overflow: ellipsis;
|
||||||
word-wrap: break-word;
|
|
||||||
overflow-wrap: break-word;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
@ -8,31 +8,28 @@
|
|||||||
</uni-section>
|
</uni-section>
|
||||||
<uni-section title="统计信息" type="line">
|
<uni-section title="统计信息" type="line">
|
||||||
<uni-card :is-shadow="false">
|
<uni-card :is-shadow="false">
|
||||||
<button type="primary" @click="toTongji">年龄分组统计</button>
|
<button type="primary" @click="toTongji">分类统计</button>
|
||||||
<button type="primary" @click="toXbTongji">性别分组统计</button>
|
|
||||||
</uni-card>
|
</uni-card>
|
||||||
</uni-section>
|
</uni-section>
|
||||||
|
|
||||||
</uni-card>
|
</uni-card>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
function toTaizhang() {
|
function toTaizhang() {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '/pages/views/renliziyuan/renyuanxinxi/taizhang'
|
url: "/pages/views/renliziyuan/renyuanxinxi/taizhang"
|
||||||
});
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
function toTongji() {
|
function toTongji() {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: '/pages/views/renliziyuan/renyuanxinxi/tongji'
|
url: "/pages/views/renliziyuan/renyuanxinxi/tongji"
|
||||||
});
|
})
|
||||||
}
|
}
|
||||||
function toXbTongji() {
|
|
||||||
uni.navigateTo({
|
|
||||||
url: '/pages/views/renliziyuan/renyuanxinxi/xbtongji'
|
|
||||||
});
|
|
||||||
}
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style></style>
|
<style>
|
||||||
|
</style>
|
@ -1,7 +1,8 @@
|
|||||||
<template>
|
<template>
|
||||||
<view>
|
<view>
|
||||||
<scroll-view :scroll-y="true" style="height: 100vh;">
|
<scroll-view :scroll-y="true">
|
||||||
<uni-card>
|
<uni-card>
|
||||||
|
<uni-title title="" type="h1" align="center"></uni-title>
|
||||||
<view>
|
<view>
|
||||||
<uni-row>
|
<uni-row>
|
||||||
<uni-col :span="11"><uni-title title="姓名 " align="left" type="h5"></uni-title></uni-col>
|
<uni-col :span="11"><uni-title title="姓名 " align="left" type="h5"></uni-title></uni-col>
|
||||||
@ -9,10 +10,10 @@
|
|||||||
type="h5"></uni-title></uni-col>
|
type="h5"></uni-title></uni-col>
|
||||||
</uni-row>
|
</uni-row>
|
||||||
<uni-row>
|
<uni-row>
|
||||||
<uni-col :span="11"><uni-easyinput v-model="xm" suffixIcon="search" clearable
|
<uni-col :span="11"><uni-easyinput v-model="xm" focus suffixIcon="search" clearable
|
||||||
placeholder="姓名模糊查询" @change="Search" @iconClick="Search" /></uni-col>
|
placeholder="姓名模糊查询" @change="Search" @iconClick="Search" /></uni-col>
|
||||||
<uni-col :span="11" :push="2">
|
<uni-col :span="11" :push="2">
|
||||||
<uni-easyinput v-model="ldhth" suffixIcon="search" clearable placeholder="劳动合同号模糊查询"
|
<uni-easyinput v-model="ldhth" focus suffixIcon="search" clearable placeholder="劳动合同号模糊查询"
|
||||||
@change="Search" @iconClick="Search" />
|
@change="Search" @iconClick="Search" />
|
||||||
</uni-col>
|
</uni-col>
|
||||||
</uni-row>
|
</uni-row>
|
||||||
@ -23,8 +24,7 @@
|
|||||||
</uni-row>
|
</uni-row>
|
||||||
<uni-row>
|
<uni-row>
|
||||||
<uni-col :span="24">
|
<uni-col :span="24">
|
||||||
<trq-depart-select v-model="departID" returnCodeOrID="orgCode"
|
<trq-depart-select returnCodeOrID="orgCode" @change="departChange"></trq-depart-select>
|
||||||
@change="departChange"></trq-depart-select>
|
|
||||||
</uni-col>
|
</uni-col>
|
||||||
</uni-row>
|
</uni-row>
|
||||||
</view>
|
</view>
|
||||||
@ -34,9 +34,6 @@
|
|||||||
:border="true" :data="ryDataList" @detail="detail"></zb-table>
|
:border="true" :data="ryDataList" @detail="detail"></zb-table>
|
||||||
<uni-pagination :current="current" :pagerCount="pages" :total="total" prev-text="前一页" next-text="后一页"
|
<uni-pagination :current="current" :pagerCount="pages" :total="total" prev-text="前一页" next-text="后一页"
|
||||||
:show-icon="false" @change="pagechange" />
|
:show-icon="false" @change="pagechange" />
|
||||||
<view>
|
|
||||||
<text class="example-info">当前页:{{ current }},数据总量:{{ total }}条,每页数据:{{ pageSize }}</text>
|
|
||||||
</view>
|
|
||||||
</uni-card>
|
</uni-card>
|
||||||
</scroll-view>
|
</scroll-view>
|
||||||
|
|
||||||
@ -100,6 +97,12 @@
|
|||||||
width: 70,
|
width: 70,
|
||||||
align: 'center'
|
align: 'center'
|
||||||
},
|
},
|
||||||
|
// {
|
||||||
|
// name: 'gzdw',
|
||||||
|
// label: '单位',
|
||||||
|
// align: 'center',
|
||||||
|
// width: 150
|
||||||
|
// },
|
||||||
{
|
{
|
||||||
name: 'xb_dictText',
|
name: 'xb_dictText',
|
||||||
label: '性别',
|
label: '性别',
|
||||||
@ -115,7 +118,6 @@
|
|||||||
{
|
{
|
||||||
name: 'operation',
|
name: 'operation',
|
||||||
type: 'operation',
|
type: 'operation',
|
||||||
width: 60,
|
|
||||||
fixed: true,
|
fixed: true,
|
||||||
label: '操作',
|
label: '操作',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
@ -137,6 +139,7 @@
|
|||||||
|
|
||||||
function detail(record) {
|
function detail(record) {
|
||||||
// console.log(record)
|
// console.log(record)
|
||||||
|
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: "/pages/views/renliziyuan/renyuanxinxi/detail?data=" + encodeURIComponent(JSON.stringify(record))
|
url: "/pages/views/renliziyuan/renyuanxinxi/detail?data=" + encodeURIComponent(JSON.stringify(record))
|
||||||
})
|
})
|
||||||
@ -145,47 +148,29 @@
|
|||||||
function pagechange(e) {
|
function pagechange(e) {
|
||||||
current.value = e.current
|
current.value = e.current
|
||||||
pageNo.value = e.current
|
pageNo.value = e.current
|
||||||
let params = {
|
getRenyuanByDepID()
|
||||||
pageNo: pageNo.value,
|
|
||||||
pageSize: pageSize.value,
|
|
||||||
current: current.value
|
|
||||||
};
|
|
||||||
if (departID.value.length <= 9) {
|
|
||||||
params.orgCode = departID.value
|
|
||||||
} else {
|
|
||||||
params.jcxd_code = departID.value
|
|
||||||
}
|
|
||||||
|
|
||||||
getRenyuanByDepID(params)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function departChange(e, data) {
|
function departChange(e) {
|
||||||
departID.value = e
|
departID.value = e
|
||||||
let params = {
|
getRenyuanByDepID()
|
||||||
|
}
|
||||||
|
|
||||||
|
function getRenyuanByDepID() {
|
||||||
|
ryDataList.value = []
|
||||||
|
let queryParm = {
|
||||||
pageNo: pageNo.value,
|
pageNo: pageNo.value,
|
||||||
pageSize: pageSize.value,
|
pageSize: pageSize.value,
|
||||||
current: current.value
|
current: current.value
|
||||||
};
|
};
|
||||||
console.log(e)
|
queryParm.orgCode = departID.value
|
||||||
if (e.length <= 9) {
|
|
||||||
params.orgCode = departID.value
|
|
||||||
} else {
|
|
||||||
params.jcxd_code = departID.value
|
|
||||||
}
|
|
||||||
|
|
||||||
getRenyuanByDepID(params)
|
|
||||||
}
|
|
||||||
|
|
||||||
function getRenyuanByDepID(queryParm) {
|
|
||||||
ryDataList.value = []
|
|
||||||
console.log(queryParm)
|
|
||||||
queryRenyuanByDepartID(queryParm).then((res) => {
|
queryRenyuanByDepartID(queryParm).then((res) => {
|
||||||
console.log(res)
|
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
ryDataList.value = res.result.records
|
ryDataList.value = res.result.records
|
||||||
total.value = res.result.total
|
total.value = res.result.total
|
||||||
pages.value = res.result.pages
|
pages.value = res.result.pages
|
||||||
current.value = res.result.current
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}).catch((err) => {
|
}).catch((err) => {
|
||||||
console.log(err);
|
console.log(err);
|
||||||
@ -207,7 +192,6 @@
|
|||||||
if (ldhth.value !== '') {
|
if (ldhth.value !== '') {
|
||||||
queryParm.ldhth = '*' + ldhth.value + '*';
|
queryParm.ldhth = '*' + ldhth.value + '*';
|
||||||
}
|
}
|
||||||
console.log(queryParm)
|
|
||||||
queryRenyuanByDepartID(queryParm).then((res) => {
|
queryRenyuanByDepartID(queryParm).then((res) => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
ryDataList.value = res.result.records
|
ryDataList.value = res.result.records
|
||||||
|
@ -1,312 +1,91 @@
|
|||||||
<template>
|
<template>
|
||||||
<view>
|
<view>
|
||||||
<view class="container" id="top1">
|
<uni-card>
|
||||||
<uni-row style="margin-bottom: 10rpx; margin-left: 30rpx; margin-right: 30rpx">
|
<uni-forms>
|
||||||
<uni-col :span="24"><uni-title :title="'所选单位ID:' + orgCode" align="left" type="h4"></uni-title></uni-col>
|
<uni-forms-item>
|
||||||
</uni-row>
|
|
||||||
<uni-row style="margin-bottom: 20rpx; margin-left: 30rpx; margin-right: 30rpx">
|
|
||||||
<uni-col :span="24">
|
|
||||||
<trq-depart-select v-model="orgCode" returnCodeOrID="orgCode" @change="departChange"></trq-depart-select>
|
|
||||||
</uni-col>
|
|
||||||
</uni-row>
|
|
||||||
<!-- 概览统计 -->
|
|
||||||
<view class="stats-box" v-if="summary.total">
|
|
||||||
<view class="stat-item">
|
|
||||||
<text class="label">总人数</text>
|
|
||||||
<text class="value">{{ summary.total }}</text>
|
|
||||||
</view>
|
|
||||||
<view class="stat-item">
|
|
||||||
<text class="label">平均年龄</text>
|
|
||||||
<text class="value">{{ summary.avgAge.toFixed(1) }}</text>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<!-- ECharts图表 -->
|
|
||||||
<view class="chart-container">
|
|
||||||
<l-echart ref="chart" @finished="initChart" />
|
|
||||||
</view>
|
|
||||||
|
|
||||||
<!-- 数据表格 -->
|
</uni-forms-item>
|
||||||
|
</uni-forms>
|
||||||
|
<uni-title title="所属单位 " align="center"></uni-title>
|
||||||
|
|
||||||
<uni-row style="margin-top: 10px; margin-left: 30rpx; margin-right: 30rpx" v-if="tableData.length > 0">
|
<trq-depart-select returnCodeOrID="orgCode" @change="departChange"></trq-depart-select>
|
||||||
<uni-col :span="3">
|
|
||||||
<view class="titleStyle">序号</view>
|
|
||||||
</uni-col>
|
|
||||||
<uni-col :span="5">
|
|
||||||
<view class="titleStyle">姓名</view>
|
|
||||||
</uni-col>
|
|
||||||
<uni-col :span="5">
|
|
||||||
<view class="titleStyle">性别</view>
|
|
||||||
</uni-col>
|
|
||||||
<uni-col :span="5">
|
|
||||||
<view class="titleStyle">年龄</view>
|
|
||||||
</uni-col>
|
|
||||||
<uni-col :span="6">
|
|
||||||
<view class="titleStyle">操作</view>
|
|
||||||
</uni-col>
|
|
||||||
</uni-row>
|
|
||||||
|
|
||||||
<scroll-view scroll-y :style="{ height: bottomHeight + 'px' }">
|
<uni-row>
|
||||||
<uni-row style="margin-bottom: 10rpx; margin-left: 30rpx; margin-right: 30rpx">
|
<uni-col :span="6"><button @click="getRyByxb(0)" type="primary" size="mini"
|
||||||
<view v-for="(item, index) in tableData">
|
style="margin: 10px 10px 10px 10px;">性别分组统计</button></uni-col>
|
||||||
<uni-col :span="3">
|
<uni-col :span="6"><button @click="getRyBynl(0)" type="primary" size="mini"
|
||||||
<view class="dataStyle">
|
style="margin: 10px 10px 10px 10px;">年龄分组统计</button></uni-col>
|
||||||
{{ index + 1 }}
|
<uni-col :span="6"><button @click="getRyByxb(1)" type="primary" size="mini"
|
||||||
</view>
|
style="margin: 10px 10px 10px 10px;">性别总统计</button></uni-col>
|
||||||
</uni-col>
|
<uni-col :span="6"><button @click="getRyBynl(1)" type="primary" size="mini"
|
||||||
<uni-col :span="5">
|
style="margin: 10px 10px 10px 10px;">年龄总统计</button></uni-col>
|
||||||
<view class="dataStyle">
|
|
||||||
{{ item.xm }}
|
|
||||||
</view>
|
|
||||||
</uni-col>
|
|
||||||
<uni-col :span="5">
|
|
||||||
<view class="dataStyle">
|
|
||||||
{{ item.xb_dictText }}
|
|
||||||
</view>
|
|
||||||
</uni-col>
|
|
||||||
<uni-col :span="5">
|
|
||||||
<view class="dataStyle">
|
|
||||||
{{ item.nl }}
|
|
||||||
</view>
|
|
||||||
</uni-col>
|
|
||||||
<uni-col :span="6">
|
|
||||||
<view class="dataStyle">
|
|
||||||
<button size="mini" type="primary" @click="detail(item)">详情</button>
|
|
||||||
</view>
|
|
||||||
</uni-col>
|
|
||||||
</view>
|
|
||||||
</uni-row>
|
</uni-row>
|
||||||
</scroll-view>
|
|
||||||
|
<view style="width:750rpx; height:750rpx"><l-echart ref="myChart" @finished="init"></l-echart></view>
|
||||||
|
</uni-card>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { ref, reactive, onMounted } from 'vue';
|
import * as echarts from 'echarts'
|
||||||
import * as echarts from 'echarts';
|
|
||||||
|
|
||||||
import { queryRenyuanByDepartID } from '@/api/renyuan.js';
|
import {
|
||||||
|
onReady,
|
||||||
|
onLoad
|
||||||
|
|
||||||
// 存储下方组件的高度
|
} from '@dcloudio/uni-app';
|
||||||
const bottomHeight = ref(0);
|
import {
|
||||||
// 新增加载状态
|
reactive,
|
||||||
const isLoading = ref(false);
|
ref,
|
||||||
const orgCode = ref('');
|
onMounted
|
||||||
const rawData = ref([]);
|
} from 'vue';
|
||||||
const tableData = ref([]);
|
import {
|
||||||
const summary = reactive({
|
useStore
|
||||||
total: 0,
|
} from '@/store';
|
||||||
avgAge: 0
|
import {
|
||||||
});
|
cxcRyDatacountByXb,
|
||||||
const chart = ref(null);
|
cxcRyDatacountByNl,
|
||||||
const chartOption = ref({});
|
cxcRyDatacountByXbTotal,
|
||||||
const drillPopup = ref(null);
|
cxcRyDatacountByNlTotal
|
||||||
const drillList = ref([]);
|
} from '@/api/renyuan.js'
|
||||||
const drillTitle = ref('');
|
|
||||||
|
|
||||||
function detail(record) {
|
const ryCountData = ref([])
|
||||||
// console.log(record)
|
const departID = ref("")
|
||||||
uni.navigateTo({
|
const option = ref({
|
||||||
url: '/pages/views/renliziyuan/renyuanxinxi/detail?data=' + encodeURIComponent(JSON.stringify(record))
|
notMerge: true,
|
||||||
});
|
backgroundColor: '#F8FAFF',
|
||||||
}
|
tooltip: {
|
||||||
// 计算年龄initChart
|
trigger: 'axis',
|
||||||
const calculateAge = (birthDate) => {
|
showContent: this.showContent,
|
||||||
const today = new Date();
|
axisPointer: {
|
||||||
const birth = new Date(birthDate);
|
type: 'shadow',
|
||||||
let age = today.getFullYear() - birth.getFullYear();
|
label: {
|
||||||
const monthDiff = today.getMonth() - birth.getMonth();
|
show: true
|
||||||
if (monthDiff < 0 || (monthDiff === 0 && today.getDate() < birth.getDate())) {
|
|
||||||
age--;
|
|
||||||
}
|
|
||||||
return age;
|
|
||||||
};
|
|
||||||
// 加载数据
|
|
||||||
const departChange = async (e, data) => {
|
|
||||||
tableData.value = [];
|
|
||||||
console.log(e);
|
|
||||||
orgCode.value = e;
|
|
||||||
try {
|
|
||||||
// 显示加载状态
|
|
||||||
|
|
||||||
isLoading.value = true;
|
|
||||||
if (orgCode.value.length <= 6) {
|
|
||||||
console.log(123242353);
|
|
||||||
uni.showLoading({
|
|
||||||
title: '全厂数据较多,耐心等待数据加载中...',
|
|
||||||
mask: true
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
uni.showLoading({
|
|
||||||
title: '数据加载中...',
|
|
||||||
mask: true
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
let params = {
|
|
||||||
pageSize: 3000,
|
|
||||||
fields: ['xm', 'nl', 'xb', 'xb_dictText', 'orgCode', 'jcdw', 'jcxd', 'jcxdCode']
|
|
||||||
};
|
|
||||||
if (orgCode.value.length <= 9) {
|
|
||||||
params.orgCode = orgCode.value;
|
|
||||||
} else {
|
|
||||||
params.jcxd_code = orgCode.value;
|
|
||||||
}
|
|
||||||
queryRenyuanByDepartID(params)
|
|
||||||
.then((res) => {
|
|
||||||
if (res.success) {
|
|
||||||
processData(res.result.records);
|
|
||||||
// 隐藏加载状态
|
|
||||||
isLoading.value = false;
|
|
||||||
uni.hideLoading();
|
|
||||||
}
|
}
|
||||||
})
|
}
|
||||||
.catch((err) => {
|
|
||||||
console.log(err);
|
|
||||||
uni.showToast({
|
|
||||||
title: '数据加载失败',
|
|
||||||
icon: 'none'
|
|
||||||
});
|
|
||||||
});
|
|
||||||
} catch (error) {
|
|
||||||
console.log(error);
|
|
||||||
uni.showToast({
|
|
||||||
title: '数据加载失败',
|
|
||||||
icon: 'none'
|
|
||||||
});
|
|
||||||
} finally {
|
|
||||||
// 隐藏加载状态
|
|
||||||
isLoading.value = false;
|
|
||||||
uni.hideLoading();
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
// 数据处理
|
|
||||||
const processData = (data) => {
|
|
||||||
// 添加年龄字段并过滤有效数据
|
|
||||||
const validData = data
|
|
||||||
.map((item) => ({
|
|
||||||
...item,
|
|
||||||
nl: calculateAge(item.cssj)
|
|
||||||
}))
|
|
||||||
.filter((item) => item.nl >= 21 && item.nl <= 64);
|
|
||||||
// 计算概览数据
|
|
||||||
summary.total = validData.length;
|
|
||||||
summary.avgAge = validData.reduce((sum, cur) => sum + cur.nl, 0) / summary.total || 0;
|
|
||||||
// 生成表格数据
|
|
||||||
// tableData.value = validData;
|
|
||||||
|
|
||||||
groupsData(validData);
|
|
||||||
// 生成图表数据
|
|
||||||
generateChartData(validData);
|
|
||||||
};
|
|
||||||
|
|
||||||
// 计算统计信息...
|
|
||||||
const subOrgStaffs = ref({}); // 按下级单位存储所有人员
|
|
||||||
const ageGroupStaffs = ref({}); // 按年龄段存储所有人员
|
|
||||||
|
|
||||||
const groupsData = (data) => {
|
|
||||||
// 清空旧数据
|
|
||||||
subOrgStaffs.value = {};
|
|
||||||
ageGroupStaffs.value = {};
|
|
||||||
data.reduce((acc, cur) => {
|
|
||||||
// console.log(cur)
|
|
||||||
let subOrg = '';
|
|
||||||
let ageRange = getAgeRange(cur.nl);
|
|
||||||
// console.log(cur.orgCode, cur.jcxdCode)
|
|
||||||
if (cur.orgCode <= 6) {
|
|
||||||
subOrg = cur.orgCode;
|
|
||||||
} else {
|
|
||||||
subOrg = cur.jcxdCode;
|
|
||||||
}
|
|
||||||
|
|
||||||
// 存储到subOrgStaffs
|
|
||||||
if (!subOrgStaffs.value[subOrg]) {
|
|
||||||
subOrgStaffs.value[subOrg] = [];
|
|
||||||
}
|
|
||||||
subOrgStaffs.value[subOrg].push(cur);
|
|
||||||
|
|
||||||
// 存储到ageGroupStaffs
|
|
||||||
if (!ageGroupStaffs.value[ageRange]) {
|
|
||||||
ageGroupStaffs.value[ageRange] = [];
|
|
||||||
}
|
|
||||||
ageGroupStaffs.value[ageRange].push(cur);
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
// 新增年龄范围计算方法
|
|
||||||
const getAgeRange = (age) => {
|
|
||||||
const ranges = ['21-30岁', '31-40岁', '41-50岁', '51-60岁', '61-64岁'];
|
|
||||||
const index = Math.floor((age - 21) / 10);
|
|
||||||
return ranges[index] || '其他';
|
|
||||||
};
|
|
||||||
|
|
||||||
// 修改后的显示人员列表方法
|
|
||||||
const showStaffList = (subOrg, ageRange) => {
|
|
||||||
// 从结构化数据中直接获取
|
|
||||||
const targetStaffs = subOrgStaffs.value[subOrg].filter((staff) => getAgeRange(staff.nl) === ageRange);
|
|
||||||
|
|
||||||
staffList.value = targetStaffs;
|
|
||||||
popupTitle.value = `${subOrg} ${ageRange}人员列表(共${targetStaffs.length}人)`;
|
|
||||||
popup.value.open();
|
|
||||||
};
|
|
||||||
|
|
||||||
// 新增获取指定单位人员的方法
|
|
||||||
const getSubOrgStaffs = (subOrgCode) => {
|
|
||||||
return subOrgStaffs.value[subOrgCode] || [];
|
|
||||||
};
|
|
||||||
|
|
||||||
// 新增获取指定年龄段人员的方法
|
|
||||||
const getAgeGroupStaffs = (ageRange) => {
|
|
||||||
return ageGroupStaffs.value[ageRange] || [];
|
|
||||||
};
|
|
||||||
|
|
||||||
// 生成图表数据(修改部分)
|
|
||||||
const generateChartData = (data) => {
|
|
||||||
// 按基层单位分组
|
|
||||||
const ageRanges = ['21-30岁', '31-40岁', '41-50岁', '51-60岁', '61-64岁'];
|
|
||||||
const jcdwGroups = data.reduce((acc, cur) => {
|
|
||||||
if (!acc[cur.jcdw]) {
|
|
||||||
acc[cur.jcdw] = {
|
|
||||||
ageGroups: [0, 0, 0, 0, 0] // 21-30,31-40,41-50,51-60,61-64
|
|
||||||
};
|
|
||||||
}
|
|
||||||
const ageGroup = Math.floor((cur.nl - 21) / 10);
|
|
||||||
// console.log(ageGroup, cur.jcdw)
|
|
||||||
if (ageGroup >= 0 && ageGroup <= 4) {
|
|
||||||
acc[cur.jcdw].ageGroups[ageGroup]++;
|
|
||||||
}
|
|
||||||
return acc;
|
|
||||||
}, {});
|
|
||||||
|
|
||||||
// 生成分组柱状图配置
|
|
||||||
const xData = Object.keys(jcdwGroups);
|
|
||||||
|
|
||||||
const seriesData = ageRanges.map((range, index) => ({
|
|
||||||
name: range,
|
|
||||||
type: 'bar',
|
|
||||||
data: xData.map((jcdw) => jcdwGroups[jcdw].ageGroups[index] || 0),
|
|
||||||
itemStyle: {
|
|
||||||
color: ['#5470C6', '#91CC75', '#FAC858', '#EE6666', '#73C0DE'][index]
|
|
||||||
},
|
},
|
||||||
// 显示数值标签
|
|
||||||
label: {
|
|
||||||
show: true,
|
|
||||||
position: 'top'
|
|
||||||
}
|
|
||||||
// 设置柱宽为 20 像素
|
|
||||||
// barWidth: 20
|
|
||||||
}));
|
|
||||||
chartOption.value = {
|
|
||||||
title: {
|
title: {
|
||||||
text: '人员年龄分组统计',
|
text: '人员统计图表'
|
||||||
padding: [0, 0, 0, 30]
|
|
||||||
},
|
},
|
||||||
toolbox: {
|
toolbox: {
|
||||||
padding: [0, 30, 0, 0],
|
padding: [0, 20, 20, 20],
|
||||||
show: true,
|
show: true,
|
||||||
feature: {
|
feature: {
|
||||||
//工具配置项
|
//工具配置项
|
||||||
|
mark: {
|
||||||
|
show: true
|
||||||
|
},
|
||||||
|
dataView: {
|
||||||
|
show: true
|
||||||
|
},
|
||||||
|
magicType: {
|
||||||
|
show: true, //是否显示该工具
|
||||||
|
type: ['line', 'bar'] //启用的动态类型
|
||||||
|
},
|
||||||
|
dataZoom: {
|
||||||
|
yAxisIndex: 'none'
|
||||||
|
},
|
||||||
restore: {
|
restore: {
|
||||||
show: true //是否显示该工具
|
show: true //是否显示该工具
|
||||||
},
|
},
|
||||||
@ -315,214 +94,181 @@ const generateChartData = (data) => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// tooltip: {
|
calculable: false, //是否显示拖拽的手柄
|
||||||
// trigger: 'axis',
|
// itemHeight: 0,
|
||||||
// axisPointer: {
|
legend: {
|
||||||
// type: 'shadow',
|
//图例组件
|
||||||
// label: {
|
data: [],
|
||||||
// show: false
|
itemGap: 24,
|
||||||
// }
|
padding: [5, 15, 10, 15],
|
||||||
// }
|
// y: 'bottom',
|
||||||
// },
|
itemHeight: 8, //高
|
||||||
|
itemWidth: 8, //宽
|
||||||
|
type: 'scroll',
|
||||||
|
top: 40,
|
||||||
|
},
|
||||||
grid: {
|
grid: {
|
||||||
top: '15%',
|
top: '15%',
|
||||||
left: '4%',
|
left: '4%',
|
||||||
right: '4%',
|
right: '4%',
|
||||||
bottom: '10%',
|
bottom: '6%',
|
||||||
containLabel: true
|
containLabel: true
|
||||||
},
|
},
|
||||||
legend: {
|
xAxis: [{
|
||||||
data: ageRanges,
|
show: true,
|
||||||
itemGap: 5,
|
type: 'category', //坐标轴类型
|
||||||
padding: [0, 15, 0, 15],
|
// boundaryGap:false, //解决数据与线不对应问题
|
||||||
y: 'bottom',
|
data: [],
|
||||||
itemHeight: 8, //高
|
// offset:50,
|
||||||
itemWidth: 8, //宽
|
//['7.1', '7.2', '7.3', '7.4', '7.5', '7.6', '7.7', '7.8', '7.9', '7.10','7.11', ], //this.xList, //obama_budget_2012.names
|
||||||
type: 'scroll'
|
|
||||||
},
|
|
||||||
xAxis: {
|
|
||||||
type: 'category',
|
|
||||||
data: xData,
|
|
||||||
axisLabel: {
|
axisLabel: {
|
||||||
color: '#7F84B5',
|
color: '#7F84B5',
|
||||||
fontWeight: 300,
|
fontWeight: 300,
|
||||||
interval: 0,
|
interval: 0,
|
||||||
rotate: 0
|
rotate: 70
|
||||||
},
|
},
|
||||||
padding: [0, 10, 0, 10],
|
|
||||||
axisTick: {
|
axisTick: {
|
||||||
show: false //刻度线
|
show: false //刻度线
|
||||||
},
|
},
|
||||||
axisLine: {
|
axisLine: {
|
||||||
show: false //不显示坐标轴线
|
show: false //不显示坐标轴线
|
||||||
}
|
}
|
||||||
},
|
}],
|
||||||
yAxis: [
|
yAxis: [{
|
||||||
{
|
show: true,
|
||||||
|
boundaryGap: false, //解决数据与线不对应问题
|
||||||
|
type: 'value',
|
||||||
|
// name: 'Budget (million USD)',
|
||||||
|
// data: this.yList,
|
||||||
|
minInterval: 1,
|
||||||
|
axisLabel: {
|
||||||
|
interval: 0
|
||||||
|
},
|
||||||
|
splitLine: {
|
||||||
show: true,
|
show: true,
|
||||||
boundaryGap: false, //解决数据与线不对应问题
|
lineStyle: {
|
||||||
type: 'value',
|
//背景网格线
|
||||||
// name: 'Budget (million USD)',
|
type: 'dashed'
|
||||||
// data: this.yList,
|
|
||||||
minInterval: 1,
|
|
||||||
axisLabel: {
|
|
||||||
interval: 0
|
|
||||||
},
|
|
||||||
splitLine: {
|
|
||||||
show: true,
|
|
||||||
lineStyle: {
|
|
||||||
//背景网格线
|
|
||||||
type: 'dashed'
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
axisTick: {
|
|
||||||
show: true //刻度线
|
|
||||||
},
|
|
||||||
axisLine: {
|
|
||||||
show: false //不显示坐标轴线
|
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
axisTick: {
|
||||||
|
show: true //刻度线
|
||||||
|
},
|
||||||
|
axisLine: {
|
||||||
|
show: false //不显示坐标轴线
|
||||||
|
}
|
||||||
|
}],
|
||||||
|
dataZoom: [{
|
||||||
|
show: true,
|
||||||
|
start: 80,
|
||||||
|
end: 100,
|
||||||
|
handleSize: 10
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: 'inside',
|
||||||
|
start: 0,
|
||||||
|
end: 50
|
||||||
|
},
|
||||||
|
{
|
||||||
|
show: false,
|
||||||
|
yAxisIndex: 0,
|
||||||
|
filterMode: 'empty',
|
||||||
|
width: 12,
|
||||||
|
height: '80%',
|
||||||
|
showDataShadow: false,
|
||||||
|
left: '93%',
|
||||||
|
handleSize: 8
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
series: []
|
||||||
|
});
|
||||||
|
|
||||||
series: seriesData
|
const xData = ref([])
|
||||||
};
|
const ySeries = ref([])
|
||||||
|
const legData = ref([])
|
||||||
|
|
||||||
// 初始化图表
|
function departChange(e) {
|
||||||
setTimeout(async () => {
|
departID.value = e
|
||||||
if (!chart.value) return;
|
}
|
||||||
const myChart = await chart.value.init(echarts);
|
|
||||||
myChart.setOption(chartOption.value);
|
|
||||||
myChart.on('click', (params) => {
|
|
||||||
console.log(params.seriesName);
|
|
||||||
tableData.value = getAgeGroupStaffs(params.seriesName);
|
|
||||||
});
|
|
||||||
}, 300);
|
|
||||||
|
|
||||||
// #ifdef APP
|
function getRyByxb(val) {
|
||||||
getHeight();
|
ryCountData.value = []
|
||||||
// #endif
|
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: {
|
||||||
|
label: {
|
||||||
|
show: true, //开启显示
|
||||||
|
position: 'top', //在上方显示
|
||||||
|
textStyle: {
|
||||||
|
//数值样式
|
||||||
|
color: 'black',
|
||||||
|
fontSize: 16
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
onMounted(() => {
|
let serieMan = JSON.parse(JSON.stringify(serie));
|
||||||
// #ifdef APP
|
let serieTotal = JSON.parse(JSON.stringify(serie));
|
||||||
getHeight();
|
serieTotal.name = '总数';
|
||||||
// #endif
|
serieMan.name = '男';
|
||||||
});
|
let serieWoman = JSON.parse(JSON.stringify(serie));
|
||||||
// #ifdef APP
|
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);
|
||||||
|
|
||||||
const getHeight = () => {
|
legData = ['总数', '男', '女'];
|
||||||
// 获取屏幕高度
|
option.value.legend.data = legData.value;
|
||||||
const systemInfo = uni.getSystemInfoSync();
|
option.value.xAxis[0].data = xData.value;
|
||||||
const screenHeight = systemInfo.screenHeight;
|
option.value.series = ySeries.value;
|
||||||
// 创建选择器查询对象
|
option.value.title.text = bmText + '人员性别统计';
|
||||||
const query = uni.createSelectorQuery();
|
|
||||||
// 获取上方组件的高度
|
}
|
||||||
query
|
|
||||||
.select('#top1')
|
setTimeout(async () => {
|
||||||
.boundingClientRect((rect1) => {
|
if (!chartRef.value) return
|
||||||
// 计算上方组件高度总和
|
const myChart = await chartRef.value.init(echarts)
|
||||||
const topComponentsHeight = rect1.height;
|
myChart.setOption(option.value)
|
||||||
// 计算下方组件的高度
|
}, 300)
|
||||||
bottomHeight.value = screenHeight - topComponentsHeight - 415;
|
}).catch((err) => {
|
||||||
|
console.log(err);
|
||||||
})
|
})
|
||||||
.exec();
|
}
|
||||||
};
|
|
||||||
|
|
||||||
// #endif
|
function getRyBynl(val) {
|
||||||
// 初始化图表
|
ryCountData.value = []
|
||||||
const initChart = () => {
|
let queryParm = {};
|
||||||
setTimeout(async () => {
|
queryParm.orgCode = departID.value
|
||||||
if (!chart.value) return;
|
cxcRyDatacountByNl(queryParm).then((res) => {
|
||||||
const myChart = await chart.value.init(echarts);
|
console.log(res);
|
||||||
myChart.setOption(chartOption.value);
|
if (res.success) {
|
||||||
}, 300);
|
ryCountData.value = res.result.records
|
||||||
};
|
}
|
||||||
|
}).catch((err) => {
|
||||||
|
console.log(err);
|
||||||
|
})
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style>
|
||||||
.container {
|
</style>
|
||||||
margin: 20, 20, 20, 20rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.input-group {
|
|
||||||
display: flex;
|
|
||||||
gap: 20rpx;
|
|
||||||
margin-bottom: 30rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.input {
|
|
||||||
flex: 1;
|
|
||||||
border: 1rpx solid #ddd;
|
|
||||||
padding: 15rpx;
|
|
||||||
border-radius: 8rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.query-btn {
|
|
||||||
background: #007aff;
|
|
||||||
color: white;
|
|
||||||
padding: 0 40rpx;
|
|
||||||
border-radius: 8rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.stats-box {
|
|
||||||
display: flex;
|
|
||||||
justify-content: space-around;
|
|
||||||
margin: 30rpx 0;
|
|
||||||
padding: 20rpx;
|
|
||||||
background: #f8f8f8;
|
|
||||||
border-radius: 12rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.stat-item {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
align-items: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
.label {
|
|
||||||
font-size: 24rpx;
|
|
||||||
color: #666;
|
|
||||||
}
|
|
||||||
|
|
||||||
.value {
|
|
||||||
font-size: 36rpx;
|
|
||||||
font-weight: bold;
|
|
||||||
color: #0000ff;
|
|
||||||
}
|
|
||||||
|
|
||||||
.chart-container {
|
|
||||||
height: 400rpx;
|
|
||||||
margin-top: 20rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.titleStyle {
|
|
||||||
font-size: 12px;
|
|
||||||
color: #747474;
|
|
||||||
line-height: 30px;
|
|
||||||
height: 30px;
|
|
||||||
background: #f2f9fc;
|
|
||||||
text-align: center;
|
|
||||||
vertical-align: middle;
|
|
||||||
border-left: 1px solid #919191;
|
|
||||||
border-bottom: 1px solid #919191;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* 内容样式 */
|
|
||||||
.dataStyle {
|
|
||||||
max-font-size: 14px;
|
|
||||||
/* 最大字体限制 */
|
|
||||||
min-font-size: 10px;
|
|
||||||
/* 最小字体限制 */
|
|
||||||
font-size: 12px;
|
|
||||||
color: #00007f;
|
|
||||||
line-height: 30px;
|
|
||||||
height: 30px;
|
|
||||||
font-weight: 500;
|
|
||||||
text-align: center;
|
|
||||||
vertical-align: middle;
|
|
||||||
border-bottom: 1px solid #919191;
|
|
||||||
border-left: 1px solid #919191;
|
|
||||||
text-overflow: ellipsis;
|
|
||||||
}
|
|
||||||
</style>
|
|
@ -1,517 +0,0 @@
|
|||||||
<template>
|
|
||||||
<view>
|
|
||||||
<view class="container" id="top1">
|
|
||||||
<uni-row style="margin-bottom: 10rpx; margin-left: 30rpx; margin-right: 30rpx">
|
|
||||||
<uni-col :span="24"><uni-title :title="'所选单位ID:' + orgCode" align="left" type="h4"></uni-title></uni-col>
|
|
||||||
</uni-row>
|
|
||||||
<uni-row style="margin-bottom: 20rpx; margin-left: 30rpx; margin-right: 30rpx">
|
|
||||||
<uni-col :span="24">
|
|
||||||
<trq-depart-select v-model="orgCode" returnCodeOrID="orgCode" @change="departChange"></trq-depart-select>
|
|
||||||
</uni-col>
|
|
||||||
</uni-row>
|
|
||||||
<!-- 概览统计 -->
|
|
||||||
<view class="stats-box" v-if="summary.total">
|
|
||||||
<view class="stat-item">
|
|
||||||
<text class="label">总人数</text>
|
|
||||||
<text class="value">{{ summary.total }}</text>
|
|
||||||
</view>
|
|
||||||
<view class="stat-item">
|
|
||||||
<text class="label">平均年龄</text>
|
|
||||||
<text class="value">{{ summary.avgAge.toFixed(1) }}</text>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<!-- ECharts图表 -->
|
|
||||||
<view class="chart-container">
|
|
||||||
<l-echart ref="chart" @finished="initChart" />
|
|
||||||
</view>
|
|
||||||
|
|
||||||
<!-- 数据表格 -->
|
|
||||||
|
|
||||||
<uni-row style="margin-top: 10px; margin-left: 30rpx; margin-right: 30rpx" v-if="tableData.length > 0">
|
|
||||||
<uni-col :span="3">
|
|
||||||
<view class="titleStyle">序号</view>
|
|
||||||
</uni-col>
|
|
||||||
<uni-col :span="5">
|
|
||||||
<view class="titleStyle">姓名</view>
|
|
||||||
</uni-col>
|
|
||||||
<uni-col :span="5">
|
|
||||||
<view class="titleStyle">性别</view>
|
|
||||||
</uni-col>
|
|
||||||
<uni-col :span="5">
|
|
||||||
<view class="titleStyle">年龄</view>
|
|
||||||
</uni-col>
|
|
||||||
<uni-col :span="6">
|
|
||||||
<view class="titleStyle">操作</view>
|
|
||||||
</uni-col>
|
|
||||||
</uni-row>
|
|
||||||
|
|
||||||
<scroll-view scroll-y :style="{ height: bottomHeight + 'px' }">
|
|
||||||
<uni-row style="margin-bottom: 10rpx; margin-left: 30rpx; margin-right: 30rpx">
|
|
||||||
<view v-for="(item, index) in tableData">
|
|
||||||
<uni-col :span="3">
|
|
||||||
<view class="dataStyle">
|
|
||||||
{{ index + 1 }}
|
|
||||||
</view>
|
|
||||||
</uni-col>
|
|
||||||
<uni-col :span="5">
|
|
||||||
<view class="dataStyle">
|
|
||||||
{{ item.xm }}
|
|
||||||
</view>
|
|
||||||
</uni-col>
|
|
||||||
<uni-col :span="5">
|
|
||||||
<view class="dataStyle">
|
|
||||||
{{ item.xb_dictText }}
|
|
||||||
</view>
|
|
||||||
</uni-col>
|
|
||||||
<uni-col :span="5">
|
|
||||||
<view class="dataStyle">
|
|
||||||
{{ item.nl }}
|
|
||||||
</view>
|
|
||||||
</uni-col>
|
|
||||||
<uni-col :span="6">
|
|
||||||
<view class="dataStyle">
|
|
||||||
<button size="mini" type="primary" @click="detail(item)">详情</button>
|
|
||||||
</view>
|
|
||||||
</uni-col>
|
|
||||||
</view>
|
|
||||||
</uni-row>
|
|
||||||
</scroll-view>
|
|
||||||
</view>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script setup>
|
|
||||||
import { ref, reactive, onMounted } from 'vue';
|
|
||||||
import * as echarts from 'echarts';
|
|
||||||
import { cxcRyDataTongji, queryRenyuanByDepartID } from '@/api/renyuan.js';
|
|
||||||
// 存储下方组件的高度
|
|
||||||
const bottomHeight = ref(0);
|
|
||||||
// 新增加载状态
|
|
||||||
const isLoading = ref(false);
|
|
||||||
const orgCode = ref('');
|
|
||||||
const rawData = ref([]);
|
|
||||||
const tableData = ref([]);
|
|
||||||
const summary = reactive({
|
|
||||||
total: 0,
|
|
||||||
avgAge: 0
|
|
||||||
});
|
|
||||||
const chart = ref(null);
|
|
||||||
const chartOption = ref({});
|
|
||||||
const drillPopup = ref(null);
|
|
||||||
const drillList = ref([]);
|
|
||||||
const drillTitle = ref('');
|
|
||||||
|
|
||||||
function detail(record) {
|
|
||||||
// console.log(record)
|
|
||||||
uni.navigateTo({
|
|
||||||
url: '/pages/views/renliziyuan/renyuanxinxi/detail?data=' + encodeURIComponent(JSON.stringify(record))
|
|
||||||
});
|
|
||||||
}
|
|
||||||
// 计算年龄initChart
|
|
||||||
const calculateAge = (birthDate) => {
|
|
||||||
const today = new Date();
|
|
||||||
const birth = new Date(birthDate);
|
|
||||||
let age = today.getFullYear() - birth.getFullYear();
|
|
||||||
const monthDiff = today.getMonth() - birth.getMonth();
|
|
||||||
if (monthDiff < 0 || (monthDiff === 0 && today.getDate() < birth.getDate())) {
|
|
||||||
age--;
|
|
||||||
}
|
|
||||||
return age;
|
|
||||||
};
|
|
||||||
// 加载数据
|
|
||||||
const departChange = async (e, data) => {
|
|
||||||
tableData.value = [];
|
|
||||||
console.log(e);
|
|
||||||
orgCode.value = e;
|
|
||||||
try {
|
|
||||||
// 显示加载状态
|
|
||||||
isLoading.value = true;
|
|
||||||
uni.showLoading({
|
|
||||||
title: '数据加载中...',
|
|
||||||
mask: true
|
|
||||||
});
|
|
||||||
|
|
||||||
let params = {
|
|
||||||
orgCode: orgCode.value
|
|
||||||
};
|
|
||||||
if (orgCode.value.length <= 9) {
|
|
||||||
params.orgCode = orgCode.value;
|
|
||||||
} else {
|
|
||||||
params.jcxd_code = orgCode.value;
|
|
||||||
}
|
|
||||||
cxcRyDataTongji(params)
|
|
||||||
.then((res) => {
|
|
||||||
console.log(res);
|
|
||||||
if (res.success) {
|
|
||||||
processData(res.result.records);
|
|
||||||
// 隐藏加载状态
|
|
||||||
isLoading.value = false;
|
|
||||||
uni.hideLoading();
|
|
||||||
}
|
|
||||||
})
|
|
||||||
.catch((err) => {
|
|
||||||
console.log(err);
|
|
||||||
uni.showToast({
|
|
||||||
title: '数据加载失败',
|
|
||||||
icon: 'none'
|
|
||||||
});
|
|
||||||
});
|
|
||||||
} catch (error) {
|
|
||||||
console.log(error);
|
|
||||||
uni.showToast({
|
|
||||||
title: '数据加载失败',
|
|
||||||
icon: 'none'
|
|
||||||
});
|
|
||||||
} finally {
|
|
||||||
// 隐藏加载状态
|
|
||||||
isLoading.value = false;
|
|
||||||
uni.hideLoading();
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
// 数据处理
|
|
||||||
const processData = (data) => {
|
|
||||||
// 添加年龄字段并过滤有效数据
|
|
||||||
const validData = data
|
|
||||||
.map((item) => ({
|
|
||||||
...item,
|
|
||||||
nl: calculateAge(item.cssj)
|
|
||||||
}))
|
|
||||||
.filter((item) => item.nl >= 21 && item.nl <= 64);
|
|
||||||
// 计算概览数据
|
|
||||||
summary.total = validData.length;
|
|
||||||
summary.avgAge = validData.reduce((sum, cur) => sum + cur.nl, 0) / summary.total || 0;
|
|
||||||
// 生成表格数据
|
|
||||||
// tableData.value = validData;
|
|
||||||
|
|
||||||
groupsData(validData);
|
|
||||||
// 生成图表数据
|
|
||||||
generateChartData(validData);
|
|
||||||
};
|
|
||||||
|
|
||||||
// 计算统计信息...
|
|
||||||
const subOrgStaffs = ref({}); // 按下级单位存储所有人员
|
|
||||||
const ageGroupStaffs = ref({}); // 按年龄段存储所有人员
|
|
||||||
|
|
||||||
const groupsData = (data) => {
|
|
||||||
// 清空旧数据
|
|
||||||
subOrgStaffs.value = {};
|
|
||||||
ageGroupStaffs.value = {};
|
|
||||||
data.reduce((acc, cur) => {
|
|
||||||
// console.log(cur)
|
|
||||||
let subOrg = '';
|
|
||||||
let ageRange = getAgeRange(cur.nl);
|
|
||||||
// console.log(cur.orgCode, cur.jcxdCode)
|
|
||||||
if (cur.orgCode <= 6) {
|
|
||||||
subOrg = cur.orgCode;
|
|
||||||
} else {
|
|
||||||
subOrg = cur.jcxdCode;
|
|
||||||
}
|
|
||||||
|
|
||||||
// 存储到subOrgStaffs
|
|
||||||
if (!subOrgStaffs.value[subOrg]) {
|
|
||||||
subOrgStaffs.value[subOrg] = [];
|
|
||||||
}
|
|
||||||
subOrgStaffs.value[subOrg].push(cur);
|
|
||||||
|
|
||||||
// 存储到ageGroupStaffs
|
|
||||||
if (!ageGroupStaffs.value[ageRange]) {
|
|
||||||
ageGroupStaffs.value[ageRange] = [];
|
|
||||||
}
|
|
||||||
ageGroupStaffs.value[ageRange].push(cur);
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
// 新增年龄范围计算方法
|
|
||||||
const getAgeRange = (age) => {
|
|
||||||
const ranges = ['21-30岁', '31-40岁', '41-50岁', '51-60岁', '61-64岁'];
|
|
||||||
const index = Math.floor((age - 21) / 10);
|
|
||||||
return ranges[index] || '其他';
|
|
||||||
};
|
|
||||||
|
|
||||||
// 修改后的显示人员列表方法
|
|
||||||
const showStaffList = (subOrg, ageRange) => {
|
|
||||||
// 从结构化数据中直接获取
|
|
||||||
const targetStaffs = subOrgStaffs.value[subOrg].filter((staff) => getAgeRange(staff.nl) === ageRange);
|
|
||||||
|
|
||||||
staffList.value = targetStaffs;
|
|
||||||
popupTitle.value = `${subOrg} ${ageRange}人员列表(共${targetStaffs.length}人)`;
|
|
||||||
popup.value.open();
|
|
||||||
};
|
|
||||||
|
|
||||||
// 新增获取指定单位人员的方法
|
|
||||||
const getSubOrgStaffs = (subOrgCode) => {
|
|
||||||
return subOrgStaffs.value[subOrgCode] || [];
|
|
||||||
};
|
|
||||||
|
|
||||||
// 新增获取指定年龄段人员的方法
|
|
||||||
const getAgeGroupStaffs = (ageRange) => {
|
|
||||||
return ageGroupStaffs.value[ageRange] || [];
|
|
||||||
};
|
|
||||||
|
|
||||||
// 生成图表数据(修改部分)
|
|
||||||
const generateChartData = (data) => {
|
|
||||||
// 按基层单位分组
|
|
||||||
const ageRanges = ['21-30岁', '31-40岁', '41-50岁', '51-60岁', '61-64岁'];
|
|
||||||
const jcdwGroups = data.reduce((acc, cur) => {
|
|
||||||
if (!acc[cur.jcdw]) {
|
|
||||||
acc[cur.jcdw] = {
|
|
||||||
ageGroups: [0, 0, 0, 0, 0] // 21-30,31-40,41-50,51-60,61-64
|
|
||||||
};
|
|
||||||
}
|
|
||||||
const ageGroup = Math.floor((cur.nl - 21) / 10);
|
|
||||||
// console.log(ageGroup, cur.jcdw)
|
|
||||||
if (ageGroup >= 0 && ageGroup <= 4) {
|
|
||||||
acc[cur.jcdw].ageGroups[ageGroup]++;
|
|
||||||
}
|
|
||||||
return acc;
|
|
||||||
}, {});
|
|
||||||
|
|
||||||
// 生成分组柱状图配置
|
|
||||||
const xData = Object.keys(jcdwGroups);
|
|
||||||
|
|
||||||
const seriesData = ageRanges.map((range, index) => ({
|
|
||||||
name: range,
|
|
||||||
type: 'bar',
|
|
||||||
data: xData.map((jcdw) => jcdwGroups[jcdw].ageGroups[index] || 0),
|
|
||||||
itemStyle: {
|
|
||||||
color: ['#5470C6', '#91CC75', '#FAC858', '#EE6666', '#73C0DE'][index]
|
|
||||||
},
|
|
||||||
// 显示数值标签
|
|
||||||
label: {
|
|
||||||
show: true,
|
|
||||||
position: 'top'
|
|
||||||
}
|
|
||||||
// 设置柱宽为 20 像素
|
|
||||||
// barWidth: 20
|
|
||||||
}));
|
|
||||||
chartOption.value = {
|
|
||||||
title: {
|
|
||||||
text: '人员年龄分组统计',
|
|
||||||
padding: [0, 0, 0, 30]
|
|
||||||
},
|
|
||||||
toolbox: {
|
|
||||||
padding: [0, 30, 0, 0],
|
|
||||||
show: true,
|
|
||||||
feature: {
|
|
||||||
//工具配置项
|
|
||||||
|
|
||||||
restore: {
|
|
||||||
show: true //是否显示该工具
|
|
||||||
},
|
|
||||||
saveAsImage: {
|
|
||||||
show: true //是否显示该工具
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
// tooltip: {
|
|
||||||
// trigger: 'axis',
|
|
||||||
// axisPointer: {
|
|
||||||
// type: 'shadow',
|
|
||||||
// label: {
|
|
||||||
// show: false
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// },
|
|
||||||
grid: {
|
|
||||||
top: '15%',
|
|
||||||
left: '4%',
|
|
||||||
right: '4%',
|
|
||||||
bottom: '10%',
|
|
||||||
containLabel: true
|
|
||||||
},
|
|
||||||
legend: {
|
|
||||||
data: ageRanges,
|
|
||||||
itemGap: 5,
|
|
||||||
padding: [0, 15, 0, 15],
|
|
||||||
y: 'bottom',
|
|
||||||
itemHeight: 8, //高
|
|
||||||
itemWidth: 8, //宽
|
|
||||||
type: 'scroll'
|
|
||||||
},
|
|
||||||
xAxis: {
|
|
||||||
type: 'category',
|
|
||||||
data: xData,
|
|
||||||
axisLabel: {
|
|
||||||
color: '#7F84B5',
|
|
||||||
fontWeight: 300,
|
|
||||||
interval: 0,
|
|
||||||
rotate: 0
|
|
||||||
},
|
|
||||||
padding: [0, 10, 0, 10],
|
|
||||||
axisTick: {
|
|
||||||
show: false //刻度线
|
|
||||||
},
|
|
||||||
axisLine: {
|
|
||||||
show: false //不显示坐标轴线
|
|
||||||
}
|
|
||||||
},
|
|
||||||
yAxis: [
|
|
||||||
{
|
|
||||||
show: true,
|
|
||||||
boundaryGap: false, //解决数据与线不对应问题
|
|
||||||
type: 'value',
|
|
||||||
// name: 'Budget (million USD)',
|
|
||||||
// data: this.yList,
|
|
||||||
minInterval: 1,
|
|
||||||
axisLabel: {
|
|
||||||
interval: 0
|
|
||||||
},
|
|
||||||
splitLine: {
|
|
||||||
show: true,
|
|
||||||
lineStyle: {
|
|
||||||
//背景网格线
|
|
||||||
type: 'dashed'
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
axisTick: {
|
|
||||||
show: true //刻度线
|
|
||||||
},
|
|
||||||
axisLine: {
|
|
||||||
show: false //不显示坐标轴线
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
|
||||||
|
|
||||||
series: seriesData
|
|
||||||
};
|
|
||||||
|
|
||||||
// 初始化图表
|
|
||||||
setTimeout(async () => {
|
|
||||||
if (!chart.value) return;
|
|
||||||
const myChart = await chart.value.init(echarts);
|
|
||||||
myChart.setOption(chartOption.value);
|
|
||||||
myChart.on('click', (params) => {
|
|
||||||
console.log(params.seriesName);
|
|
||||||
tableData.value = getAgeGroupStaffs(params.seriesName);
|
|
||||||
});
|
|
||||||
}, 300);
|
|
||||||
|
|
||||||
// #ifdef APP
|
|
||||||
getHeight();
|
|
||||||
// #endif
|
|
||||||
};
|
|
||||||
|
|
||||||
onMounted(() => {
|
|
||||||
// #ifdef APP
|
|
||||||
getHeight();
|
|
||||||
// #endif
|
|
||||||
});
|
|
||||||
// #ifdef APP
|
|
||||||
|
|
||||||
const getHeight = () => {
|
|
||||||
// 获取屏幕高度
|
|
||||||
const systemInfo = uni.getSystemInfoSync();
|
|
||||||
const screenHeight = systemInfo.screenHeight;
|
|
||||||
// 创建选择器查询对象
|
|
||||||
const query = uni.createSelectorQuery();
|
|
||||||
// 获取上方组件的高度
|
|
||||||
query
|
|
||||||
.select('#top1')
|
|
||||||
.boundingClientRect((rect1) => {
|
|
||||||
// 计算上方组件高度总和
|
|
||||||
const topComponentsHeight = rect1.height;
|
|
||||||
// 计算下方组件的高度
|
|
||||||
bottomHeight.value = screenHeight - topComponentsHeight - 415;
|
|
||||||
})
|
|
||||||
.exec();
|
|
||||||
};
|
|
||||||
|
|
||||||
// #endif
|
|
||||||
// 初始化图表
|
|
||||||
const initChart = () => {
|
|
||||||
setTimeout(async () => {
|
|
||||||
if (!chart.value) return;
|
|
||||||
const myChart = await chart.value.init(echarts);
|
|
||||||
myChart.setOption(chartOption.value);
|
|
||||||
}, 300);
|
|
||||||
};
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style scoped>
|
|
||||||
.container {
|
|
||||||
margin: 20, 20, 20, 20rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.input-group {
|
|
||||||
display: flex;
|
|
||||||
gap: 20rpx;
|
|
||||||
margin-bottom: 30rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.input {
|
|
||||||
flex: 1;
|
|
||||||
border: 1rpx solid #ddd;
|
|
||||||
padding: 15rpx;
|
|
||||||
border-radius: 8rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.query-btn {
|
|
||||||
background: #007aff;
|
|
||||||
color: white;
|
|
||||||
padding: 0 40rpx;
|
|
||||||
border-radius: 8rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.stats-box {
|
|
||||||
display: flex;
|
|
||||||
justify-content: space-around;
|
|
||||||
margin: 30rpx 0;
|
|
||||||
padding: 20rpx;
|
|
||||||
background: #f8f8f8;
|
|
||||||
border-radius: 12rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.stat-item {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
align-items: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
.label {
|
|
||||||
font-size: 24rpx;
|
|
||||||
color: #666;
|
|
||||||
}
|
|
||||||
|
|
||||||
.value {
|
|
||||||
font-size: 36rpx;
|
|
||||||
font-weight: bold;
|
|
||||||
color: #0000ff;
|
|
||||||
}
|
|
||||||
|
|
||||||
.chart-container {
|
|
||||||
height: 400rpx;
|
|
||||||
margin-top: 20rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.titleStyle {
|
|
||||||
font-size: 12px;
|
|
||||||
color: #747474;
|
|
||||||
line-height: 30px;
|
|
||||||
height: 30px;
|
|
||||||
background: #f2f9fc;
|
|
||||||
text-align: center;
|
|
||||||
vertical-align: middle;
|
|
||||||
border-left: 1px solid #919191;
|
|
||||||
border-bottom: 1px solid #919191;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* 内容样式 */
|
|
||||||
.dataStyle {
|
|
||||||
max-font-size: 14px;
|
|
||||||
/* 最大字体限制 */
|
|
||||||
min-font-size: 10px;
|
|
||||||
/* 最小字体限制 */
|
|
||||||
font-size: 12px;
|
|
||||||
color: #00007f;
|
|
||||||
line-height: 30px;
|
|
||||||
height: 30px;
|
|
||||||
font-weight: 500;
|
|
||||||
text-align: center;
|
|
||||||
vertical-align: middle;
|
|
||||||
border-bottom: 1px solid #919191;
|
|
||||||
border-left: 1px solid #919191;
|
|
||||||
text-overflow: ellipsis;
|
|
||||||
}
|
|
||||||
</style>
|
|
@ -1,54 +1,40 @@
|
|||||||
<template>
|
<template>
|
||||||
<view :class="[{'gray':store.isgray==1}]">
|
<view :class="['f-col','aic',{'gray':store.isgray==1}]">
|
||||||
<view style="margin-top: 10px;margin-bottom: 10px;">
|
<picker fields="month" mode="date" @change="bindPickerChange" :value="index">
|
||||||
<picker fields="month" mode="date" @change="bindPickerChange" :value="index">
|
<view class="date">{{index}} 点击选择月份</view>
|
||||||
<view class="date">{{index}} 点击选择月份</view>
|
</picker>
|
||||||
</picker>
|
<view class="info">
|
||||||
</view>
|
<view class="info_title f-row aic">
|
||||||
<uni-row>
|
<view class="">
|
||||||
<uni-col :span="7">
|
|
||||||
<view class="titleStyle">
|
|
||||||
日期
|
日期
|
||||||
</view>
|
</view>
|
||||||
</uni-col>
|
<view class="">
|
||||||
<uni-col :span="4">
|
|
||||||
<view class="titleStyle">
|
|
||||||
带班领导
|
带班领导
|
||||||
</view>
|
</view>
|
||||||
</uni-col>
|
<view class="">
|
||||||
<uni-col :span="4">
|
|
||||||
<view class="titleStyle">
|
|
||||||
值班领导
|
值班领导
|
||||||
</view>
|
</view>
|
||||||
</uni-col>
|
<view class="">
|
||||||
<uni-col :span="9">
|
|
||||||
<view class="titleStyle">
|
|
||||||
值班干部
|
值班干部
|
||||||
</view>
|
</view>
|
||||||
</uni-col>
|
</view>
|
||||||
</uni-row>
|
<view class="data_box">
|
||||||
<uni-row>
|
<view class="data f-row aic" v-for="item,i in zhibanArr">
|
||||||
<view v-for="(item,index) in zhibanArr">
|
<view class="">
|
||||||
<uni-col :span="7">
|
|
||||||
<view class="dataStyle">
|
|
||||||
{{item.date}}
|
{{item.date}}
|
||||||
</view>
|
</view>
|
||||||
</uni-col>
|
<view class="">
|
||||||
<uni-col :span="4">
|
|
||||||
<view class="dataStyle">
|
|
||||||
{{item.dbld_dictText}}
|
{{item.dbld_dictText}}
|
||||||
</view>
|
</view>
|
||||||
</uni-col><uni-col :span="4">
|
<view class="">
|
||||||
<view class="dataStyle">
|
|
||||||
{{item.zbld_dictText}}
|
{{item.zbld_dictText}}
|
||||||
</view>
|
</view>
|
||||||
</uni-col><uni-col :span="9">
|
<view class="">
|
||||||
<view class="dataStyle">
|
|
||||||
{{item.zbgbrealname}}
|
{{item.zbgbrealname}}
|
||||||
</view>
|
</view>
|
||||||
</uni-col>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</uni-row>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -67,36 +53,6 @@
|
|||||||
} from '@/store';
|
} from '@/store';
|
||||||
const store = useStore()
|
const store = useStore()
|
||||||
import dayjs from 'dayjs';
|
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([])
|
const zhibanArr = ref([])
|
||||||
onLoad(() => {
|
onLoad(() => {
|
||||||
zhibanQuery()
|
zhibanQuery()
|
||||||
@ -127,36 +83,36 @@
|
|||||||
color: #333333;
|
color: #333333;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.info {
|
||||||
.titleStyle {
|
background: #F8F8F8;
|
||||||
font-size: 12px;
|
border-radius: 8rpx;
|
||||||
color: #747474;
|
|
||||||
line-height: 25px;
|
|
||||||
height: 25px;
|
|
||||||
background: #F2F9FC;
|
|
||||||
text-align: center;
|
text-align: center;
|
||||||
vertical-align: middle;
|
width: 690rpx;
|
||||||
border-left: 1px solid #919191;
|
margin-top: 23rpx;
|
||||||
border-bottom: 1px solid #919191;
|
|
||||||
;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* 内容样式 */
|
.info_title {
|
||||||
.dataStyle {
|
font-size: 24rpx;
|
||||||
max-font-size: 14px;
|
color: #333333;
|
||||||
/* 最大字体限制 */
|
padding: 24rpx 0;
|
||||||
min-font-size: 10px;
|
border-bottom: 1px solid #EFEFEF;
|
||||||
/* 最小字体限制 */
|
|
||||||
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>
|
</style>
|
@ -2,12 +2,12 @@
|
|||||||
<view v-if="returnCodeOrID === 'orgCode'">
|
<view v-if="returnCodeOrID === 'orgCode'">
|
||||||
<uni-data-picker v-model="selectDepartID" ref="depart" :openSearch="true" :ellipsis="true"
|
<uni-data-picker v-model="selectDepartID" ref="depart" :openSearch="true" :ellipsis="true"
|
||||||
placeholder="请选择单位code" popup-title="请选择单位" :localdata="departList" @nodeclick="onnodeclick"
|
placeholder="请选择单位code" popup-title="请选择单位" :localdata="departList" @nodeclick="onnodeclick"
|
||||||
@popupclosed="onpopupclosed" @change="onchange" :map="{'text':'title','value':'orgCode'}"></uni-data-picker>
|
@popupclosed="onpopupclosed" :map="{'text':'title','value':'orgCode'}"></uni-data-picker>
|
||||||
</view>
|
</view>
|
||||||
<view v-else>
|
<view v-else>
|
||||||
<uni-data-picker v-model="selectDepartID" ref="depart" :openSearch="true" :ellipsis="true" placeholder="请选择单位id"
|
<uni-data-picker v-model="selectDepartID" ref="depart" :openSearch="true" :ellipsis="true" placeholder="请选择单位id"
|
||||||
popup-title="请选择单位" :localdata="departList" @nodeclick="onnodeclick" @popupclosed="onpopupclosed"
|
popup-title="请选择单位" :localdata="departList" @nodeclick="onnodeclick" @popupclosed="onpopupclosed"
|
||||||
@change="onchange" :map="{'text':'title','value':'id'}"></uni-data-picker>
|
:map="{'text':'title','value':'id'}"></uni-data-picker>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
@ -46,8 +46,6 @@
|
|||||||
let selectDepartIDS = ref([]) //选中的级联单位ID数组
|
let selectDepartIDS = ref([]) //选中的级联单位ID数组
|
||||||
let tempSelectDepartID = ref("") //临时选择的单位ID
|
let tempSelectDepartID = ref("") //临时选择的单位ID
|
||||||
|
|
||||||
let departInfo = ref({}) //"单位的全部信息"
|
|
||||||
|
|
||||||
let $emit = defineEmits(['change']);
|
let $emit = defineEmits(['change']);
|
||||||
|
|
||||||
const getDepartList = () => {
|
const getDepartList = () => {
|
||||||
@ -61,22 +59,17 @@
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
const onnodeclick = ((e) => {
|
const onnodeclick = ((e) => {
|
||||||
departInfo.value = e;
|
// console.log(e)
|
||||||
if (props.returnCodeOrID = "orgCode") {
|
if (props.returnCodeOrID = "orgCode") {
|
||||||
tempSelectDepartID.value = e.orgCode
|
tempSelectDepartID.value = e.orgCode
|
||||||
} else {
|
} else {
|
||||||
tempSelectDepartID.value = e.value
|
tempSelectDepartID.value = e.value
|
||||||
}
|
}
|
||||||
|
|
||||||
})
|
|
||||||
|
|
||||||
const onchange = ((e) => {
|
|
||||||
$emit('change', e.detail.value[e.detail.value.length - 1].value, {})
|
|
||||||
})
|
})
|
||||||
|
|
||||||
const onpopupclosed = ((e) => {
|
const onpopupclosed = ((e) => {
|
||||||
selectDepartID.value = tempSelectDepartID.value
|
selectDepartID.value = tempSelectDepartID.value
|
||||||
$emit('change', selectDepartID.value, departInfo)
|
$emit('change', selectDepartID.value)
|
||||||
})
|
})
|
||||||
onLoad((e) => {
|
onLoad((e) => {
|
||||||
getDepartList();
|
getDepartList();
|
||||||
|
@ -1,25 +1,5 @@
|
|||||||
# trq-depart-select
|
# trq-depart-select
|
||||||
# 1.0.1
|
|
||||||
更新,添加返回值,将整个机构对象返回父组件
|
|
||||||
```javascript
|
|
||||||
const onpopupclosed = ((e) => {
|
|
||||||
selectDepartID.value = tempSelectDepartID.value
|
|
||||||
$emit('change', selectDepartID.value, departInfo)
|
|
||||||
})
|
|
||||||
```
|
|
||||||
增加选择到最后层级触发的change时间,返回数据到父组件的功能
|
|
||||||
|
|
||||||
```javascript
|
|
||||||
const onchange = ((e) => {
|
|
||||||
$emit('change', e.detail.value[e.detail.value.length - 1].value, {})
|
|
||||||
})
|
|
||||||
|
|
||||||
```
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# 1.0
|
|
||||||
|
|
||||||
属性 returnCodeOrID 默认值 orgCode, 组件返回单位的orgCode, 不设置属性或设置为其他,组件返回 单位ID
|
属性 returnCodeOrID 默认值 orgCode, 组件返回单位的orgCode, 不设置属性或设置为其他,组件返回 单位ID
|
||||||
|
|
||||||
事件:change 选择内容发生变化时发生,通过emit 返回给父组件 选择单位的ID或code
|
事件:change 选择内容发生变化时发生,通过emit 返回给父组件 选择单位的ID或code
|
||||||
|
Loading…
Reference in New Issue
Block a user