修改了人员统计三个页面相关界面和逻辑,增加照片显示
This commit is contained in:
parent
cc6681cfb5
commit
a886f30d03
95
package-lock.json
generated
95
package-lock.json
generated
@ -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"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -98,17 +98,17 @@
|
|||||||
});
|
});
|
||||||
|
|
||||||
/*生产环境 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) {
|
||||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,228 +1,297 @@
|
|||||||
<template>
|
<template>
|
||||||
<view>
|
<view class="container" id="top1">
|
||||||
<scroll-view :scroll-y="true" style="height: 100vh;">
|
<uni-card>
|
||||||
<uni-card>
|
<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>
|
<uni-col :span="11" :push="2"><uni-title title="劳动合同号" align="left" type="h5"></uni-title></uni-col>
|
||||||
<uni-col :span="11" :push="2"><uni-title title="劳动合同号" align="left"
|
</uni-row>
|
||||||
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-row>
|
<uni-col :span="11" :push="2">
|
||||||
<uni-col :span="11"><uni-easyinput v-model="xm" suffixIcon="search" clearable
|
<uni-easyinput v-model="ldhth" suffixIcon="search" clearable placeholder="劳动合同号模糊查询" @change="Search" @iconClick="Search" />
|
||||||
placeholder="姓名模糊查询" @change="Search" @iconClick="Search" /></uni-col>
|
</uni-col>
|
||||||
<uni-col :span="11" :push="2">
|
</uni-row>
|
||||||
<uni-easyinput v-model="ldhth" suffixIcon="search" clearable placeholder="劳动合同号模糊查询"
|
</view>
|
||||||
@change="Search" @iconClick="Search" />
|
<view style="margin-bottom: 10rpx">
|
||||||
</uni-col>
|
<uni-row>
|
||||||
</uni-row>
|
<uni-col :span="24"><uni-title title="所属单位" align="left" type="h5"></uni-title></uni-col>
|
||||||
</view>
|
</uni-row>
|
||||||
<view style="margin-bottom: 10rpx;">
|
<uni-row>
|
||||||
<uni-row>
|
<uni-col :span="24">
|
||||||
<uni-col :span="24"><uni-title title="所属单位" align="left" type="h5"></uni-title></uni-col>
|
<trq-depart-select v-model="departID" returnCodeOrID="orgCode" @change="departChange"></trq-depart-select>
|
||||||
</uni-row>
|
</uni-col>
|
||||||
<uni-row>
|
</uni-row>
|
||||||
<uni-col :span="24">
|
</view>
|
||||||
<trq-depart-select v-model="departID" returnCodeOrID="orgCode"
|
</uni-card>
|
||||||
@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>
|
</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>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import {
|
import { onReady, onLoad } from '@dcloudio/uni-app';
|
||||||
onReady,
|
import { reactive, ref, onMounted } from 'vue';
|
||||||
onLoad
|
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';
|
const bottomHeight = ref(0);
|
||||||
import {
|
let status = ref('');
|
||||||
reactive,
|
let contentText = reactive({
|
||||||
ref,
|
contentdown: '点击查看更多',
|
||||||
onMounted
|
contentrefresh: '加载中',
|
||||||
} from 'vue';
|
contentnomore: '没有更多'
|
||||||
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([])
|
|
||||||
|
|
||||||
let status = ref("")
|
let pageNo = ref(1);
|
||||||
let contentText = reactive({
|
let pageSize = ref(10);
|
||||||
contentdown: '点击查看更多',
|
let total = ref(0);
|
||||||
contentrefresh: '加载中',
|
let pages = ref(0);
|
||||||
contentnomore: '没有更多'
|
let current = ref(0);
|
||||||
})
|
let params = reactive({
|
||||||
|
pageNo: pageNo,
|
||||||
|
pageSize: pageSize
|
||||||
|
});
|
||||||
|
|
||||||
let pageNo = ref(1)
|
onLoad((e) => {});
|
||||||
let pageSize = ref(10)
|
onMounted((e) => {
|
||||||
let total = ref(0)
|
// #ifdef APP
|
||||||
let pages = ref(0)
|
getHeight();
|
||||||
let current = ref(0)
|
// #endif
|
||||||
let params = reactive({
|
departID.value = '';
|
||||||
pageNo: pageNo,
|
getRenyuanByDepID();
|
||||||
pageSize: pageSize
|
});
|
||||||
})
|
|
||||||
let column = ref([{
|
|
||||||
label: '序号',
|
|
||||||
width: 60,
|
|
||||||
type: 'index',
|
|
||||||
color: 'blue',
|
|
||||||
align: 'center'
|
|
||||||
},
|
|
||||||
|
|
||||||
{
|
// #ifdef APP
|
||||||
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'
|
|
||||||
}]
|
|
||||||
}
|
|
||||||
])
|
|
||||||
|
|
||||||
onLoad((e) => {
|
const getHeight = () => {
|
||||||
|
// 获取屏幕高度
|
||||||
})
|
const systemInfo = uni.getSystemInfoSync();
|
||||||
onMounted((e) => {
|
const screenHeight = systemInfo.screenHeight;
|
||||||
departID.value = ""
|
// 创建选择器查询对象
|
||||||
getRenyuanByDepID()
|
const query = uni.createSelectorQuery();
|
||||||
})
|
// 获取上方组件的高度
|
||||||
|
query
|
||||||
function detail(record) {
|
.select('#top1')
|
||||||
// console.log(record)
|
.boundingClientRect((rect1) => {
|
||||||
uni.navigateTo({
|
// 计算上方组件高度总和
|
||||||
url: "/pages/views/renliziyuan/renyuanxinxi/detail?data=" + encodeURIComponent(JSON.stringify(record))
|
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) {
|
getRenyuanByDepID(params);
|
||||||
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)
|
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) {
|
getRenyuanByDepID(params);
|
||||||
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);
|
||||||
|
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) {
|
function Search() {
|
||||||
ryDataList.value = []
|
ryDataList.value = [];
|
||||||
console.log(queryParm)
|
let queryParm = {
|
||||||
queryRenyuanByDepartID(queryParm).then((res) => {
|
pageNo: pageNo.value,
|
||||||
console.log(res)
|
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) {
|
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) => {
|
|
||||||
console.log(err);
|
|
||||||
})
|
})
|
||||||
}
|
.catch((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) => {
|
|
||||||
console.log(err);
|
console.log(err);
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
.uni-group {
|
/* 全局容器 */
|
||||||
display: flex;
|
.container {
|
||||||
align-items: center;
|
margin: 10rpx 10rpx;
|
||||||
}
|
padding: 10rpx;
|
||||||
</style>
|
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>
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
<template>
|
<template>
|
||||||
<uni-row>
|
<uni-row>
|
||||||
<view v-for="(item,index) in data">
|
<view v-for="(item, index) in data">
|
||||||
<uni-col :span="item.titleSpan">
|
<uni-col :span="item.titleSpan">
|
||||||
<view class="titleStyle">
|
<view class="titleStyle">
|
||||||
{{item.title}}
|
{{ item.title }}
|
||||||
</view>
|
</view>
|
||||||
</uni-col>
|
</uni-col>
|
||||||
<uni-col :span="item.valueSpan">
|
<uni-col :span="item.valueSpan">
|
||||||
@ -11,110 +11,107 @@
|
|||||||
{{ doEmptyString(item.value) }}
|
{{ doEmptyString(item.value) }}
|
||||||
</view>
|
</view>
|
||||||
</uni-col>
|
</uni-col>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
</uni-row>
|
</uni-row>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
props: {
|
props: {
|
||||||
// 表格数据
|
// 表格数据
|
||||||
cellData: {
|
cellData: {
|
||||||
type: Object,
|
type: Object,
|
||||||
default: () => [{
|
default: () => [
|
||||||
title: "",
|
{
|
||||||
value: "",
|
title: '',
|
||||||
|
value: '',
|
||||||
titleSpan: 4,
|
titleSpan: 4,
|
||||||
valueSpan: 4
|
valueSpan: 4
|
||||||
}]
|
}
|
||||||
},
|
]
|
||||||
//每行数据组数 title value
|
|
||||||
rowDataCount: {
|
|
||||||
type: Number,
|
|
||||||
default: 3
|
|
||||||
}
|
|
||||||
|
|
||||||
},
|
},
|
||||||
data() {
|
//每行数据组数 title value
|
||||||
return {
|
rowDataCount: {
|
||||||
data: []
|
type: Number,
|
||||||
}
|
default: 3
|
||||||
},
|
}
|
||||||
watch: {
|
},
|
||||||
cellData: {
|
data() {
|
||||||
deep: true,
|
return {
|
||||||
immediate: true,
|
data: []
|
||||||
handler(val) {
|
};
|
||||||
let totalSpan = 0;
|
},
|
||||||
for (var i = 0; i < val.length; i++) { //根据每行数据组数 补齐栅格 24
|
watch: {
|
||||||
if ((i + 1) % this.rowDataCount != 0) {
|
cellData: {
|
||||||
totalSpan = totalSpan + val[i].titleSpan + val[i].valueSpan
|
deep: true,
|
||||||
} else {
|
immediate: true,
|
||||||
val[i].valueSpan = 24 - totalSpan - val[i].titleSpan;
|
handler(val) {
|
||||||
totalSpan = 0;
|
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: {
|
},
|
||||||
//数据如果为空,自动替换成/
|
methods: {
|
||||||
doEmptyString(obj) {
|
//数据如果为空,自动替换成/
|
||||||
let str = '/';
|
doEmptyString(obj) {
|
||||||
if (typeof(obj) == "undefined" || (obj) === null || (obj) === '') {
|
let str = '/';
|
||||||
return str;
|
if (typeof obj == 'undefined' || obj === null || obj === '' || obj === 'Na' || obj === 'N' || obj === '0') {
|
||||||
}
|
return str;
|
||||||
return obj + '';
|
|
||||||
}
|
}
|
||||||
|
return obj + '';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
};
|
||||||
</script>
|
</script>
|
||||||
<style scoped>
|
<style scoped>
|
||||||
/* 标签样式 */
|
/* 标签样式 */
|
||||||
.titleStyle {
|
.titleStyle {
|
||||||
font-size: 12px;
|
font-size: 10px;
|
||||||
color: #747474;
|
color: #747474;
|
||||||
line-height: 30px;
|
line-height: 30px;
|
||||||
height: 30px;
|
height: 30px;
|
||||||
background: #F2F9FC;
|
background: #f2f9fc;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
border-left: 1px solid #919191;
|
border-left: 1px solid #919191;
|
||||||
border-right: 1px solid #919191;
|
border-right: 1px solid #919191;
|
||||||
border-bottom: 1px solid #919191;
|
border-bottom: 1px solid #919191;
|
||||||
;
|
}
|
||||||
}
|
|
||||||
|
|
||||||
/* 内容样式 */
|
/* 内容样式 */
|
||||||
.dataStyle {
|
.dataStyle {
|
||||||
|
font-size: 12px;
|
||||||
|
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;
|
.dataStyle1 {
|
||||||
line-height: 35px;
|
font-size: 10px;
|
||||||
height: 30px;
|
color: #00007f;
|
||||||
font-weight: 500;
|
line-height: 15px;
|
||||||
text-align: center;
|
height: 30px;
|
||||||
vertical-align: middle;
|
font-weight: 500;
|
||||||
border-bottom: 1px solid #919191;
|
text-align: center;
|
||||||
text-overflow: ellipsis;
|
vertical-align: middle;
|
||||||
overflow: hidden;
|
border-bottom: 1px solid #919191;
|
||||||
}
|
text-overflow: ellipsis;
|
||||||
|
overflow: hidden;
|
||||||
/* 内容样式 */
|
}
|
||||||
.dataStyle1 {
|
</style>
|
||||||
|
|
||||||
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>
|
|
||||||
|
Loading…
Reference in New Issue
Block a user