Merge remote-tracking branch 'remotes/origin/ldeyun' into yzqUniapp

# Conflicts:
#	api/renyuan.js
#	manifest.json
#	pages/views/renliziyuan/renyuanxinxi/detail.vue
#	pages/views/renliziyuan/renyuanxinxi/tongji.vue
This commit is contained in:
yangzhq68909 2025-02-07 10:29:20 +08:00
commit aff8d2168a
9 changed files with 611 additions and 557 deletions

View File

@ -1,3 +1,3 @@
# 开发环境 # 开发环境
# 请求接口地址 # 请求接口地址
VITE_REQUEST_BASE_URL = http://10.75.15.249:8080 VITE_REQUEST_BASE_URL = https://36.112.48.190

View File

@ -66,14 +66,6 @@ export function queryJxkhByRyLdhth(ldhth) { // 绩效考核信息
}) })
} }
// ryList: '/cxchrygxxtj/cxcHrYgxxtj/list',
// ryByXb: '/cxcRyData/countByXb',
// ryByNl: '/cxcRyData/countByNl',
// ryByXbTotal: '/cxcRyData/countByXbTotal',
// ryByNlTotal: '/cxcRyData/countByNlTotal',
// bmList: '/sys/sysDepart/queryTreeList'
export function cxcHrYgxxtj(parm) { // 获取员工信息统计 export function cxcHrYgxxtj(parm) { // 获取员工信息统计
return https({ return https({
url: '/cxchrygxxtj/cxcHrYgxxtj/list', url: '/cxchrygxxtj/cxcHrYgxxtj/list',
@ -82,33 +74,9 @@ export function cxcHrYgxxtj(parm) { // 获取员工信息统计
}) })
} }
export function cxcRyDatacountByXb(parm) { // 通过性别获取员工信息统计 export function cxcRyDataTongji(url, parm) { // 员工信息统计
return https({ return https({
url: '/cxcRyData/countByXb', url: url,
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
}) })

View File

@ -230,7 +230,7 @@
{ {
"path": "pages/views/renliziyuan/renyuanxinxi/tongji", "path": "pages/views/renliziyuan/renyuanxinxi/tongji",
"style": { "style": {
"navigationBarTitleText": "人员统计信息", "navigationBarTitleText": "人员年龄分组统计信息",
"navigationBarTextStyle": "white" "navigationBarTextStyle": "white"
} }

View File

@ -98,18 +98,18 @@
}); });
/*生产环境 begin */ /*生产环境 begin */
loginApi({ // loginApi({
username: un, // username: un,
password: pw, // password: pw,
ip: getDeviceIp() // ip: getDeviceIp()
/*生产环境 end */ /*生产环境 end */
/*开发环境 begin */ /*开发环境 begin */
// localLoginApi({ localLoginApi({
// username: username.value, username: username.value,
// password: password.value, password: password.value,
// captcha: 'app' captcha: 'app'
/*开发环境 end */ /*开发环境 end */
}).then((loginres) => { }).then((loginres) => {
if (loginres.success) { if (loginres.success) {
uni.setStorageSync('token', loginres.result.token) uni.setStorageSync('token', loginres.result.token)

View File

@ -317,9 +317,9 @@
queryJxkhByRyLdhth({ queryJxkhByRyLdhth({
"ldhth": ldhth.value "ldhth": ldhth.value
}).then((res) => { }).then((res) => {
console.log(res); // console.log(res);
jxkhxxList.value = res.result.records jxkhxxList.value = res.result.records
console.log(jxkhxxList.value) // console.log(jxkhxxList.value)
}).catch((err) => { }).catch((err) => {
console.log(err); console.log(err);
}) })
@ -379,15 +379,15 @@
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); // 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].zgxl == 1) {
rress[i].xllb = "第一学历" rress[i].xllb = "第一学历"
xlxxList.value.push(JSON.parse(JSON.stringify(rress[i]))) xlxxList.value.push(JSON.parse(JSON.stringify(rress[i])))
console.log(xlxxList.value) // console.log(xlxxList.value)
rress[i].xllb = "最高学历" rress[i].xllb = "最高学历"
xlxxList.value.push(JSON.parse(JSON.stringify(rress[i]))) xlxxList.value.push(JSON.parse(JSON.stringify(rress[i])))
console.log(xlxxList.value) // console.log(xlxxList.value)
} }
if (rress[i].onexl == 1 & rress[i].zgxl != 1) { if (rress[i].onexl == 1 & rress[i].zgxl != 1) {
rress[i].xllb = "第一学历" rress[i].xllb = "第一学历"
@ -578,7 +578,9 @@
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-overflow: ellipsis; text-align: center;
word-wrap: break-word;
overflow-wrap: break-word;
} }
</style> </style>

View File

@ -1,6 +1,6 @@
<template> <template>
<view> <view>
<scroll-view :scroll-y="true"> <scroll-view :scroll-y="true" style="height: 100vh;">
<uni-card> <uni-card>
<view> <view>
<uni-row> <uni-row>
@ -23,7 +23,8 @@
</uni-row> </uni-row>
<uni-row> <uni-row>
<uni-col :span="24"> <uni-col :span="24">
<trq-depart-select returnCodeOrID="orgCode" @change="departChange"></trq-depart-select> <trq-depart-select v-model="departID" returnCodeOrID="orgCode"
@change="departChange"></trq-depart-select>
</uni-col> </uni-col>
</uni-row> </uni-row>
</view> </view>
@ -144,23 +145,42 @@
function pagechange(e) { function pagechange(e) {
current.value = e.current current.value = e.current
pageNo.value = e.current pageNo.value = e.current
getRenyuanByDepID() let params = {
}
function departChange(e) {
departID.value = e
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
}; };
queryParm.orgCode = departID.value if (departID.value.length <= 9) {
params.orgCode = departID.value
} else {
params.jcxd_code = departID.value
}
getRenyuanByDepID(params)
}
function departChange(e, data) {
departID.value = e
let params = {
pageNo: pageNo.value,
pageSize: pageSize.value,
current: current.value
};
console.log(e)
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
@ -187,6 +207,7 @@
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

File diff suppressed because it is too large Load Diff

View File

@ -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" :map="{'text':'title','value':'orgCode'}"></uni-data-picker> @popupclosed="onpopupclosed" @change="onchange" :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"
:map="{'text':'title','value':'id'}"></uni-data-picker> @change="onchange" :map="{'text':'title','value':'id'}"></uni-data-picker>
</view> </view>
</template> </template>
@ -46,6 +46,8 @@
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 = () => {
@ -59,17 +61,22 @@
}) })
} }
const onnodeclick = ((e) => { const onnodeclick = ((e) => {
// console.log(e) departInfo.value = 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) $emit('change', selectDepartID.value, departInfo)
}) })
onLoad((e) => { onLoad((e) => {
getDepartList(); getDepartList();

View File

@ -1,4 +1,24 @@
# 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