修改了人员统计三个页面相关界面和逻辑,增加照片显示

This commit is contained in:
廖德云 2025-02-16 00:17:48 +08:00 committed by liaody
parent cc6681cfb5
commit dedf66c556
6 changed files with 1522 additions and 1578 deletions

95
package-lock.json generated
View File

@ -1,95 +0,0 @@
{
"name": "cxc-szcx-uniapp-master",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"dependencies": {
"@dcloudio/uni-ui": "^1.5.6",
"base-64": "^1.0.0",
"dayjs": "^1.11.13",
"echarts": "^5.6.0"
}
},
"node_modules/@dcloudio/uni-ui": {
"version": "1.5.6",
"resolved": "https://registry.npmjs.org/@dcloudio/uni-ui/-/uni-ui-1.5.6.tgz",
"integrity": "sha512-jmb98PasFvZkrIDXGh94GbdWg2/jyhgs1HUG+bU8eyL7Ltias/5XBz4q8w9RXyWUfqepJRqapPA2IIQpLCuTIg==",
"license": "Apache-2.0"
},
"node_modules/base-64": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/base-64/-/base-64-1.0.0.tgz",
"integrity": "sha512-kwDPIFCGx0NZHog36dj+tHiwP4QMzsZ3AgMViUBKI0+V5n4U0ufTCUMhnQ04diaRI8EX/QcPfql7zlhZ7j4zgg=="
},
"node_modules/dayjs": {
"version": "1.11.13",
"resolved": "https://registry.npmmirror.com/dayjs/-/dayjs-1.11.13.tgz",
"integrity": "sha512-oaMBel6gjolK862uaPQOVTA7q3TZhuSvuMQAAglQDOWYO9A91IrAOUJEyKVlqJlHE0vq5p5UXxzdPfMH/x6xNg=="
},
"node_modules/echarts": {
"version": "5.6.0",
"resolved": "https://registry.npmmirror.com/echarts/-/echarts-5.6.0.tgz",
"integrity": "sha512-oTbVTsXfKuEhxftHqL5xprgLoc0k7uScAwtryCgWF6hPYFLRwOUHiFmHGCBKP5NPFNkDVopOieyUqYGH8Fa3kA==",
"license": "Apache-2.0",
"dependencies": {
"tslib": "2.3.0",
"zrender": "5.6.1"
}
},
"node_modules/tslib": {
"version": "2.3.0",
"resolved": "https://registry.npmmirror.com/tslib/-/tslib-2.3.0.tgz",
"integrity": "sha512-N82ooyxVNm6h1riLCoyS9e3fuJ3AMG2zIZs2Gd1ATcSFjSA23Q0fzjjZeh0jbJvWVDZ0cJT8yaNNaaXHzueNjg==",
"license": "0BSD"
},
"node_modules/zrender": {
"version": "5.6.1",
"resolved": "https://registry.npmmirror.com/zrender/-/zrender-5.6.1.tgz",
"integrity": "sha512-OFXkDJKcrlx5su2XbzJvj/34Q3m6PvyCZkVPHGYpcCJ52ek4U/ymZyfuV1nKE23AyBJ51E/6Yr0mhZ7xGTO4ag==",
"license": "BSD-3-Clause",
"dependencies": {
"tslib": "2.3.0"
}
}
},
"dependencies": {
"@dcloudio/uni-ui": {
"version": "1.5.6",
"resolved": "https://registry.npmjs.org/@dcloudio/uni-ui/-/uni-ui-1.5.6.tgz",
"integrity": "sha512-jmb98PasFvZkrIDXGh94GbdWg2/jyhgs1HUG+bU8eyL7Ltias/5XBz4q8w9RXyWUfqepJRqapPA2IIQpLCuTIg=="
},
"base-64": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/base-64/-/base-64-1.0.0.tgz",
"integrity": "sha512-kwDPIFCGx0NZHog36dj+tHiwP4QMzsZ3AgMViUBKI0+V5n4U0ufTCUMhnQ04diaRI8EX/QcPfql7zlhZ7j4zgg=="
},
"dayjs": {
"version": "1.11.13",
"resolved": "https://registry.npmmirror.com/dayjs/-/dayjs-1.11.13.tgz",
"integrity": "sha512-oaMBel6gjolK862uaPQOVTA7q3TZhuSvuMQAAglQDOWYO9A91IrAOUJEyKVlqJlHE0vq5p5UXxzdPfMH/x6xNg=="
},
"echarts": {
"version": "5.6.0",
"resolved": "https://registry.npmmirror.com/echarts/-/echarts-5.6.0.tgz",
"integrity": "sha512-oTbVTsXfKuEhxftHqL5xprgLoc0k7uScAwtryCgWF6hPYFLRwOUHiFmHGCBKP5NPFNkDVopOieyUqYGH8Fa3kA==",
"requires": {
"tslib": "2.3.0",
"zrender": "5.6.1"
}
},
"tslib": {
"version": "2.3.0",
"resolved": "https://registry.npmmirror.com/tslib/-/tslib-2.3.0.tgz",
"integrity": "sha512-N82ooyxVNm6h1riLCoyS9e3fuJ3AMG2zIZs2Gd1ATcSFjSA23Q0fzjjZeh0jbJvWVDZ0cJT8yaNNaaXHzueNjg=="
},
"zrender": {
"version": "5.6.1",
"resolved": "https://registry.npmmirror.com/zrender/-/zrender-5.6.1.tgz",
"integrity": "sha512-OFXkDJKcrlx5su2XbzJvj/34Q3m6PvyCZkVPHGYpcCJ52ek4U/ymZyfuV1nKE23AyBJ51E/6Yr0mhZ7xGTO4ag==",
"requires": {
"tslib": "2.3.0"
}
}
}
}

View File

@ -98,17 +98,17 @@
});
/*生产环境 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'
// localLoginApi({
// username: username.value,
// password: password.value,
// captcha: 'app'
/*开发环境 end */
}).then((loginres) => {
if (loginres.success) {

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,228 +1,297 @@
<template>
<view>
<scroll-view :scroll-y="true" style="height: 100vh;">
<uni-card>
<view>
<uni-row>
<uni-col :span="11"><uni-title title="姓名 " align="left" type="h5"></uni-title></uni-col>
<uni-col :span="11" :push="2"><uni-title title="劳动合同号" align="left"
type="h5"></uni-title></uni-col>
</uni-row>
<uni-row>
<uni-col :span="11"><uni-easyinput v-model="xm" suffixIcon="search" clearable
placeholder="姓名模糊查询" @change="Search" @iconClick="Search" /></uni-col>
<uni-col :span="11" :push="2">
<uni-easyinput v-model="ldhth" suffixIcon="search" clearable placeholder="劳动合同号模糊查询"
@change="Search" @iconClick="Search" />
</uni-col>
</uni-row>
</view>
<view style="margin-bottom: 10rpx;">
<uni-row>
<uni-col :span="24"><uni-title title="所属单位" align="left" type="h5"></uni-title></uni-col>
</uni-row>
<uni-row>
<uni-col :span="24">
<trq-depart-select v-model="departID" returnCodeOrID="orgCode"
@change="departChange"></trq-depart-select>
</uni-col>
</uni-row>
</view>
</uni-card>
<uni-card>
<zb-table :show-header="true" :highlight="true" :columns="column" :stripe="true" :fit="false"
:border="true" :data="ryDataList" @detail="detail"></zb-table>
<uni-pagination :current="current" :pagerCount="pages" :total="total" prev-text="前一页" next-text="后一页"
:show-icon="false" @change="pagechange" />
<view>
<text class="example-info">当前页{{ current }}数据总量{{ total }}每页数据{{ pageSize }}</text>
</view>
</uni-card>
</scroll-view>
<view class="container" id="top1">
<uni-card>
<view>
<uni-row>
<uni-col :span="11"><uni-title title="姓名 " align="left" type="h5"></uni-title></uni-col>
<uni-col :span="11" :push="2"><uni-title title="劳动合同号" align="left" type="h5"></uni-title></uni-col>
</uni-row>
<uni-row>
<uni-col :span="11"><uni-easyinput v-model="xm" suffixIcon="search" clearable placeholder="姓名模糊查询" @change="Search" @iconClick="Search" /></uni-col>
<uni-col :span="11" :push="2">
<uni-easyinput v-model="ldhth" suffixIcon="search" clearable placeholder="劳动合同号模糊查询" @change="Search" @iconClick="Search" />
</uni-col>
</uni-row>
</view>
<view style="margin-bottom: 10rpx">
<uni-row>
<uni-col :span="24"><uni-title title="所属单位" align="left" type="h5"></uni-title></uni-col>
</uni-row>
<uni-row>
<uni-col :span="24">
<trq-depart-select v-model="departID" returnCodeOrID="orgCode" @change="departChange"></trq-depart-select>
</uni-col>
</uni-row>
</view>
</uni-card>
</view>
<uni-card>
<!-- 数据表格 -->
<uni-row v-if="ryDataList.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>
<view v-for="(item, index) in ryDataList">
<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>
<view class="pagination">
<uni-pagination :current="current" :pagerCount="5" :total="total" prev-text="前一页" next-text="后一页" :show-icon="false" @change="pagechange" />
</view>
</scroll-view>
</uni-card>
</template>
<script setup>
import {
onReady,
onLoad
import { onReady, onLoad } from '@dcloudio/uni-app';
import { reactive, ref, onMounted } from 'vue';
import { useStore } from '@/store';
import { queryDepByCode, queryZbDepByLdhth } from '@/api/depart.js';
import { queryRenyuanByDepartID } from '@/api/renyuan.js';
let xm = ref('');
let ldhth = ref('');
let departID = ref(''); //ID
const ryDataList = ref([]);
} from '@dcloudio/uni-app';
import {
reactive,
ref,
onMounted
} from 'vue';
import {
useStore
} from '@/store';
import {
queryDepByCode,
queryZbDepByLdhth
} from '@/api/depart.js'
import {
queryRenyuanByDepartID
} from '@/api/renyuan.js'
let xm = ref("")
let ldhth = ref("")
let departID = ref("") //ID
const ryDataList = ref([])
const bottomHeight = ref(0);
let status = ref('');
let contentText = reactive({
contentdown: '点击查看更多',
contentrefresh: '加载中',
contentnomore: '没有更多'
});
let status = ref("")
let contentText = reactive({
contentdown: '点击查看更多',
contentrefresh: '加载中',
contentnomore: '没有更多'
})
let pageNo = ref(1);
let pageSize = ref(10);
let total = ref(0);
let pages = ref(0);
let current = ref(0);
let params = reactive({
pageNo: pageNo,
pageSize: pageSize
});
let pageNo = ref(1)
let pageSize = ref(10)
let total = ref(0)
let pages = ref(0)
let current = ref(0)
let params = reactive({
pageNo: pageNo,
pageSize: pageSize
})
let column = ref([{
label: '序号',
width: 60,
type: 'index',
color: 'blue',
align: 'center'
},
onLoad((e) => {});
onMounted((e) => {
// #ifdef APP
getHeight();
// #endif
departID.value = '';
getRenyuanByDepID();
});
{
name: 'xm',
label: '姓名',
width: 70,
align: 'center'
},
{
name: 'xb_dictText',
label: '性别',
align: 'center',
width: 60
},
{
name: 'nl',
label: '年龄',
align: 'center',
width: 60
},
{
name: 'operation',
type: 'operation',
width: 60,
fixed: true,
label: '操作',
align: 'center',
renders: [{
name: '详情',
func: 'detail',
size: 'mini'
}]
}
])
// #ifdef APP
onLoad((e) => {
})
onMounted((e) => {
departID.value = ""
getRenyuanByDepID()
})
function detail(record) {
// console.log(record)
uni.navigateTo({
url: "/pages/views/renliziyuan/renyuanxinxi/detail?data=" + encodeURIComponent(JSON.stringify(record))
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
function detail(record) {
// console.log(record)
uni.navigateTo({
url: '/pages/views/renliziyuan/renyuanxinxi/detail?data=' + encodeURIComponent(JSON.stringify(record))
});
}
function pagechange(e) {
current.value = e.current;
pageNo.value = e.current;
let params = {
pageNo: pageNo.value,
pageSize: pageSize.value,
current: current.value
};
if (departID.value.length <= 9) {
params.orgCode = departID.value;
} else {
params.jcxd_code = departID.value;
}
function pagechange(e) {
current.value = e.current
pageNo.value = e.current
let params = {
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);
}
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;
}
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);
}
getRenyuanByDepID(params)
function getRenyuanByDepID(queryParm) {
// ryDataList.value = [];
console.log(queryParm);
if (departID.value.length <= 6) {
console.log(123242353);
uni.showToast({
title: '全厂数据较多,请选 下一层级...',
icon: 'none',
duration: 1000
});
return;
}
if (queryParm) {
queryRenyuanByDepartID(queryParm)
.then((res) => {
console.log(res);
if (res.success) {
ryDataList.value = res.result.records;
total.value = res.result.total;
pages.value = res.result.pages;
current.value = res.result.current;
}
})
.catch((err) => {
console.log(err);
});
}
}
function getRenyuanByDepID(queryParm) {
ryDataList.value = []
console.log(queryParm)
queryRenyuanByDepartID(queryParm).then((res) => {
console.log(res)
function Search() {
ryDataList.value = [];
let queryParm = {
pageNo: pageNo.value,
pageSize: pageSize.value
};
if ((ldhth.value == '') & (xm.value == '')) {
return;
}
if (xm.value !== '') {
queryParm.xm = '*' + xm.value + '*';
}
if (ldhth.value !== '') {
queryParm.ldhth = '*' + ldhth.value + '*';
}
console.log(queryParm);
queryRenyuanByDepartID(queryParm)
.then((res) => {
if (res.success) {
ryDataList.value = res.result.records
total.value = res.result.total
pages.value = res.result.pages
current.value = res.result.current
ryDataList.value = res.result.records;
total.value = res.result.total;
pages.value = res.result.pages;
}
}).catch((err) => {
console.log(err);
})
}
function Search() {
ryDataList.value = [];
let queryParm = {
pageNo: pageNo.value,
pageSize: pageSize.value
};
if ((ldhth.value == '') & (xm.value == '')) {
return;
}
if (xm.value !== '') {
queryParm.xm = '*' + xm.value + '*';
}
if (ldhth.value !== '') {
queryParm.ldhth = '*' + ldhth.value + '*';
}
console.log(queryParm)
queryRenyuanByDepartID(queryParm).then((res) => {
if (res.success) {
ryDataList.value = res.result.records
total.value = res.result.total
pages.value = res.result.pages
}
}).catch((err) => {
.catch((err) => {
console.log(err);
})
}
});
}
</script>
<style scoped>
.uni-group {
display: flex;
align-items: center;
}
/* 全局容器 */
.container {
margin: 10rpx 10rpx;
padding: 10rpx;
background: linear-gradient(145deg, #ffaaff, var(--light-blue));
border-radius: 24rpx;
box-shadow: 0 8rpx 24rpx rgba(64, 158, 255, 0.15);
border: 2rpx solid rgba(64, 158, 255, 0.1);
}
.uni-group {
display: flex;
align-items: center;
}
.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 {
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;
}
/* 内容样式 */
.pagination {
font-size: 16px;
color: #00007f;
line-height: 30px;
height: 30px;
font-weight: 500;
text-align: center;
vertical-align: middle;
text-overflow: ellipsis;
}
</style>

View File

@ -1,9 +1,9 @@
<template>
<uni-row>
<view v-for="(item,index) in data">
<view v-for="(item, index) in data">
<uni-col :span="item.titleSpan">
<view class="titleStyle">
{{item.title}}
{{ item.title }}
</view>
</uni-col>
<uni-col :span="item.valueSpan">
@ -11,110 +11,107 @@
{{ doEmptyString(item.value) }}
</view>
</uni-col>
</view>
</uni-row>
</template>
<script>
export default {
props: {
//
cellData: {
type: Object,
default: () => [{
title: "",
value: "",
export default {
props: {
//
cellData: {
type: Object,
default: () => [
{
title: '',
value: '',
titleSpan: 4,
valueSpan: 4
}]
},
// title value
rowDataCount: {
type: Number,
default: 3
}
}
]
},
data() {
return {
data: []
}
},
watch: {
cellData: {
deep: true,
immediate: true,
handler(val) {
let totalSpan = 0;
for (var i = 0; i < val.length; i++) { // 24
if ((i + 1) % this.rowDataCount != 0) {
totalSpan = totalSpan + val[i].titleSpan + val[i].valueSpan
} else {
val[i].valueSpan = 24 - totalSpan - val[i].titleSpan;
totalSpan = 0;
}
// title value
rowDataCount: {
type: Number,
default: 3
}
},
data() {
return {
data: []
};
},
watch: {
cellData: {
deep: true,
immediate: true,
handler(val) {
let totalSpan = 0;
for (var i = 0; i < val.length; i++) {
// 24
if ((i + 1) % this.rowDataCount != 0) {
totalSpan = totalSpan + val[i].titleSpan + val[i].valueSpan;
} else {
val[i].valueSpan = 24 - totalSpan - val[i].titleSpan;
totalSpan = 0;
}
this.data = val;
// console.log(this.data)
}
this.data = val;
// console.log(this.data)
}
},
methods: {
///
doEmptyString(obj) {
let str = '/';
if (typeof(obj) == "undefined" || (obj) === null || (obj) === '') {
return str;
}
return obj + '';
}
},
methods: {
///
doEmptyString(obj) {
let str = '/';
if (typeof obj == 'undefined' || obj === null || obj === '' || obj === 'Na' || obj === 'N' || obj === '0') {
return str;
}
return obj + '';
}
}
};
</script>
<style scoped>
/* 标签样式 */
.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-right: 1px solid #919191;
border-bottom: 1px solid #919191;
;
}
/* 标签样式 */
.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-right: 1px solid #919191;
border-bottom: 1px solid #919191;
}
/* 内容样式 */
.dataStyle {
/* 内容样式 */
.dataStyle {
font-size: 14px;
color: #00007f;
line-height: 35px;
height: 30px;
font-weight: 500;
text-align: center;
vertical-align: middle;
border-bottom: 1px solid #919191;
text-overflow: ellipsis;
overflow: hidden;
}
font-size: 14px;
color: #00007f;
line-height: 35px;
height: 30px;
font-weight: 500;
text-align: center;
vertical-align: middle;
border-bottom: 1px solid #919191;
text-overflow: ellipsis;
overflow: hidden;
}
/* 内容样式 */
.dataStyle1 {
font-size: 12px;
color: #00007f;
line-height: 15px;
height: 30px;
font-weight: 500;
text-align: center;
vertical-align: middle;
border-bottom: 1px solid #919191;
text-overflow: ellipsis;
overflow: hidden;
}
/* 内容样式 */
.dataStyle1 {
font-size: 12px;
color: #00007f;
line-height: 15px;
height: 30px;
font-weight: 500;
text-align: center;
vertical-align: middle;
border-bottom: 1px solid #919191;
text-overflow: ellipsis;
overflow: hidden;
}
</style>