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:
commit
aff8d2168a
@ -1,3 +1,3 @@
|
||||
# 开发环境
|
||||
# 请求接口地址
|
||||
VITE_REQUEST_BASE_URL = http://10.75.15.249:8080
|
||||
VITE_REQUEST_BASE_URL = https://36.112.48.190
|
||||
|
@ -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) { // 获取员工信息统计
|
||||
return https({
|
||||
url: '/cxchrygxxtj/cxcHrYgxxtj/list',
|
||||
@ -82,33 +74,9 @@ export function cxcHrYgxxtj(parm) { // 获取员工信息统计
|
||||
})
|
||||
}
|
||||
|
||||
export function cxcRyDatacountByXb(parm) { // 通过性别获取员工信息统计
|
||||
export function cxcRyDataTongji(url, parm) { // 员工信息统计
|
||||
return https({
|
||||
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',
|
||||
url: url,
|
||||
method: 'get',
|
||||
data: parm
|
||||
})
|
||||
|
@ -230,7 +230,7 @@
|
||||
{
|
||||
"path": "pages/views/renliziyuan/renyuanxinxi/tongji",
|
||||
"style": {
|
||||
"navigationBarTitleText": "人员统计信息",
|
||||
"navigationBarTitleText": "人员年龄分组统计信息",
|
||||
"navigationBarTextStyle": "white"
|
||||
|
||||
}
|
||||
|
@ -98,18 +98,18 @@
|
||||
});
|
||||
|
||||
/*生产环境 begin */
|
||||
loginApi({
|
||||
username: un,
|
||||
password: pw,
|
||||
ip: getDeviceIp()
|
||||
// loginApi({
|
||||
// username: un,
|
||||
// password: pw,
|
||||
// ip: getDeviceIp()
|
||||
/*生产环境 end */
|
||||
|
||||
/*开发环境 begin */
|
||||
// localLoginApi({
|
||||
// username: username.value,
|
||||
// password: password.value,
|
||||
// captcha: 'app'
|
||||
/*开发环境 end */
|
||||
localLoginApi({
|
||||
username: username.value,
|
||||
password: password.value,
|
||||
captcha: 'app'
|
||||
/*开发环境 end */
|
||||
}).then((loginres) => {
|
||||
if (loginres.success) {
|
||||
uni.setStorageSync('token', loginres.result.token)
|
||||
|
@ -317,9 +317,9 @@
|
||||
queryJxkhByRyLdhth({
|
||||
"ldhth": ldhth.value
|
||||
}).then((res) => {
|
||||
console.log(res);
|
||||
// console.log(res);
|
||||
jxkhxxList.value = res.result.records
|
||||
console.log(jxkhxxList.value)
|
||||
// console.log(jxkhxxList.value)
|
||||
}).catch((err) => {
|
||||
console.log(err);
|
||||
})
|
||||
@ -379,15 +379,15 @@
|
||||
xlxxList.value = []
|
||||
if (res.result.records.length > 0) {
|
||||
var rress = res.result.records
|
||||
console.log(rress);
|
||||
// console.log(rress);
|
||||
for (let i = 0; i < rress.length; i++) {
|
||||
if (rress[i].onexl == 1 & rress[i].zgxl == 1) {
|
||||
rress[i].xllb = "第一学历"
|
||||
xlxxList.value.push(JSON.parse(JSON.stringify(rress[i])))
|
||||
console.log(xlxxList.value)
|
||||
// console.log(xlxxList.value)
|
||||
rress[i].xllb = "最高学历"
|
||||
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) {
|
||||
rress[i].xllb = "第一学历"
|
||||
@ -578,7 +578,9 @@
|
||||
vertical-align: middle;
|
||||
border-bottom: 1px solid #919191;
|
||||
border-left: 1px solid #919191;
|
||||
text-overflow: ellipsis;
|
||||
text-align: center;
|
||||
word-wrap: break-word;
|
||||
overflow-wrap: break-word;
|
||||
|
||||
}
|
||||
</style>
|
@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<view>
|
||||
<scroll-view :scroll-y="true">
|
||||
<scroll-view :scroll-y="true" style="height: 100vh;">
|
||||
<uni-card>
|
||||
<view>
|
||||
<uni-row>
|
||||
@ -23,7 +23,8 @@
|
||||
</uni-row>
|
||||
<uni-row>
|
||||
<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-row>
|
||||
</view>
|
||||
@ -144,23 +145,42 @@
|
||||
function pagechange(e) {
|
||||
current.value = e.current
|
||||
pageNo.value = e.current
|
||||
getRenyuanByDepID()
|
||||
}
|
||||
|
||||
function departChange(e) {
|
||||
departID.value = e
|
||||
getRenyuanByDepID()
|
||||
}
|
||||
|
||||
function getRenyuanByDepID() {
|
||||
ryDataList.value = []
|
||||
let queryParm = {
|
||||
let params = {
|
||||
pageNo: pageNo.value,
|
||||
pageSize: pageSize.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) => {
|
||||
console.log(res)
|
||||
if (res.success) {
|
||||
ryDataList.value = res.result.records
|
||||
total.value = res.result.total
|
||||
@ -187,6 +207,7 @@
|
||||
if (ldhth.value !== '') {
|
||||
queryParm.ldhth = '*' + ldhth.value + '*';
|
||||
}
|
||||
console.log(queryParm)
|
||||
queryRenyuanByDepartID(queryParm).then((res) => {
|
||||
if (res.success) {
|
||||
ryDataList.value = res.result.records
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -2,12 +2,12 @@
|
||||
<view v-if="returnCodeOrID === 'orgCode'">
|
||||
<uni-data-picker v-model="selectDepartID" ref="depart" :openSearch="true" :ellipsis="true"
|
||||
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 v-else>
|
||||
<uni-data-picker v-model="selectDepartID" ref="depart" :openSearch="true" :ellipsis="true" placeholder="请选择单位id"
|
||||
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>
|
||||
|
||||
</template>
|
||||
@ -46,6 +46,8 @@
|
||||
let selectDepartIDS = ref([]) //选中的级联单位ID数组
|
||||
let tempSelectDepartID = ref("") //临时选择的单位ID
|
||||
|
||||
let departInfo = ref({}) //"单位的全部信息"
|
||||
|
||||
let $emit = defineEmits(['change']);
|
||||
|
||||
const getDepartList = () => {
|
||||
@ -59,17 +61,22 @@
|
||||
})
|
||||
}
|
||||
const onnodeclick = ((e) => {
|
||||
// console.log(e)
|
||||
departInfo.value = e;
|
||||
if (props.returnCodeOrID = "orgCode") {
|
||||
tempSelectDepartID.value = e.orgCode
|
||||
} else {
|
||||
tempSelectDepartID.value = e.value
|
||||
}
|
||||
|
||||
})
|
||||
|
||||
const onchange = ((e) => {
|
||||
$emit('change', e.detail.value[e.detail.value.length - 1].value, {})
|
||||
})
|
||||
|
||||
const onpopupclosed = ((e) => {
|
||||
selectDepartID.value = tempSelectDepartID.value
|
||||
$emit('change', selectDepartID.value)
|
||||
$emit('change', selectDepartID.value, departInfo)
|
||||
})
|
||||
onLoad((e) => {
|
||||
getDepartList();
|
||||
|
@ -1,4 +1,24 @@
|
||||
# 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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user