123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619 |
- <template>
- <view class="box">
- <view class="boxtop">
- <view class="boxtopb">
- <!-- <view class="boxflex" @click="getChoseFn">
- <image :src="buimg" class="boxtopba"></image>
- <view class="boxtopbb" :style="role?'':'color:#AAAAAA;'">{{role||'选择部门'}}</view>
- <image :src="upimg" class="boxtopbc"></image>
- </view> -->
- <view class="boxflex" @click="getAddFn">
- <image :src="rulesimg" class="boxtopbd"></image>
- <view class="boxtopbe">添加考勤设置</view>
- </view>
- </view>
- </view>
-
-
- <card-list :datainfo="prolist" type='rule' :wtdt="wtdt" @getdetail='goDetail'></card-list>
-
- <view>
- <view class="exele">
- <view class="box" style="padding-top: 0;display: none;">
- <table @change="change">
- <tr class="tr_one">
- <th style="width: 120upx; text-align: center;">部门</th>
- <th style="width: 280upx; text-align: center;">打卡距离</th>
- <th style="width: 240upx; text-align: center;">打卡次数</th>
- <th style="width: 110upx; text-align: center;">操作</th>
- </tr>
- <scroll-view scroll-y class="scroll-view" upper-threshold="40" lower-threshold="40"
- @scrolltolower="bot_btn">
- <tr v-for="(item,index) in prolist" :key="index"
- :class=" [index%2 ==0 ? 'two_tr two_trtwo':'two_tr']" @click="chakn(item)">
- <td style="width: 120upx; text-align: center;">
- {{ item.deptName == null ? '暂无信息' : item.deptName}}
- </td>
- <td style="width: 280upx; text-align: center;">
- <!-- {{ item.dept&&item.dept.deptName == null ? '暂无信息' : item.dept.deptName}}</td> -->
- {{ item.kaRadius==null ? '暂无信息' : item.kaRadius}}
- </td>
- <!-- <td style="width: 40upx; text-align: center;">{{item.gender == null? '暂无信息' : item.gender }}</td> -->
- <td style="width: 240upx; text-align: center;">
- {{item.kaNum == null? '暂无信息' : item.kaNum }}
- </td>
- <td style="width: 110upx; color: #1678FF;text-align: center;text-decoration: underline;"
- @click.stop="goDetail(item.kaoqinId)">详情</td>
- </tr>
- <view class="shax" v-if="prolist.length>0">
- {{wtdt}}
- </view>
- <view class="zanwu " v-else><text>暂无数据</text></view>
- </scroll-view>
- </table>
- </view>
- </view>
- </view>
- <!-- 部门 -->
- <selectMorePicker ref="picker" :title="auiPicker.title" :layer="auiPicker.layer" :titflag='auiPicker.titflag'
- :data="auiPicker.data" @callback="pickerCallback"></selectMorePicker>
- </view>
- </template>
- <script>
- import {getdeptTreeNow,clocklist} from "@/api/work/check.js"
- import selectMorePicker from "@/components/selectMorePicker.vue"
- import selectPicker from '@/components/selectPicker.vue'
- import {
- selectDictLabel
- } from '@/utils/common.js'
- import cardList from "@/work/components/clock/cardlist.vue"
- export default {
- data() {
- return {
- rulesimg: require("@/work/static/clock/krules.png"),
- buimg: require("@/work/static/clock/chosebm.png"),
- addimg: require("@/work/static/clock/addry.png"),
- upimg: require("@/work/static/clock/up.png"),
- closeimg: require("@/work/static/clock/close.png"),
- rimg: require("@/work/static/clock/right.png"),
- prolist: [{deptName:'人事部',kaTimeAmIn:'08:00',kaTimePmOut:'19:00'}],
- wtdt: '',
- nickName: '',
- auiPicker: {
- title: '选择部门',
- layer: null,
- titflag: true,
- data: []
- },
- uplatflag: false,
- listite: {
- "roleName": '',
- "roleId": ''
- },
- rolelist: [],
- role: '',
- deptId: this.$store.state.user.deptId,
- roleId: '',
- rangekey: "dictLabel",
- pageNum: 1,
- pageSize: 10,
- reachflag: true,
- deptName: '',
- rolefalg: true,
- rolevalue:[]
- }
- },
- components: {
- selectMorePicker,
- selectPicker,
- cardList
- },
- onShow() {
-
- },
- onLoad() {
- uni.$on('reashlist',(res)=>{
- this.pageNum = 1;
- this.prolist = [];
- this.reachflag=true;
- this.clocklist()
- })
- this.clocklist()
- // this.getdeptTreeNow();
-
- },
- onUnload() {
- uni.$off('reashlist')
- },
- onReachBottom() {
- if (this.reachflag) {
- this.pageNum++
- this.clocklist()
- }
- },
- methods: {
- getClose() {
- this.uplatflag = false;
- },
-
- getSearch() {
- this.pageNum = 1;
- this.prolist = [];
- this.reachflag=true;
- this.clocklist()
- },
- getChoseFn() {
- this.$refs.picker.open().then(function() {
- console.log('picker打开');
- });
- // this.$tab.navigateTo("/work/pages/lock")
- },
- change(){
-
- },
- vacRolChange(e) {
- // this.params.houseType=e[0].label;
- },
- goDetail(e) {
- this.$tab.navigateTo("/work/pages/clock/setswork?id="+e)
- },
- getAddFn() {
- this.$tab.navigateTo("/work/pages/clock/setswork?fromurl=rule")
- },
- pickerCallback(e) {
- const _this = this;
- let result = '';
- e.data.forEach(function(item, index) {
- if (index == 0) {
- result += item.label;
- } else {
- result += '/' + item.label;
- }
- });
- var len = e.data.length - 1
- if (_this.uplatflag) {
- _this.deptName = e.data[len].label;
- _this.deptId = e.data[len].id;
- } else {
- _this.role = result;
- this.deptId = e.data[len].id;
- this.pageNum = 1;
- this.prolist = [];
- this.reachflag=true;
- this.clocklist()
- }
- },
- clocklist() {
- var that = this;
- var params = {
- // nickName: this.nickName,
- // deptId: this.deptId,
- pageSize: this.pageSize,
- pageNum: this.pageNum,
- }
- clocklist(params).then(res => {
- if (res.code == 200) {
- if (res.rows.length < this.pageSize) {
- this.reachflag = false
- this.wtdt = '到底了~';
- } else {
- var num = parseInt(res.rows.length) + parseInt(this.pageSize) * parseInt(this.pageNum -
- 1)
- if (num < res.total) {
- this.reachflag = true
- this.wtdt = '上拉加载更多'
- } else {
- this.reachflag = false
- this.wtdt = '到底了~';
- }
- }
- if (this.pageNum == 1) {
- this.prolist = res.rows;
- } else {
- this.prolist = this.prolist.concat(res.rows)
- }
- } else {
- this.$toast(res.msg)
- }
- })
- },
- getdeptTreeNow() {
- getdeptTreeNow().then(res => {
- if (res.code == 200) {
- this.auiPicker.data = res.data
- } else {
- this.$toast(res.msg)
- }
- })
- }
- }
- }
- </script>
- <style lang="scss" scoped>
- .box {
- padding-top: 100rpx;background-color: #F2F2F2;min-height: 100vh;box-sizing: border-box;
- }
- .boxtop {
- padding: 0 34rpx;
- position: fixed;left:0;right:0;top: 0;z-index: 5;background-color: #FFFFFF;
- .boxtopa {
- padding: 14rpx 0;
- display: flex;
- align-items: center;
- input {
- height: 64rpx;
- background: #E6E6E6;
- border-radius: 28rpx;
- flex: 1;
- background: #E6E6E6;
- padding: 0 30rpx;
- line-height: 64rpx;
- border-radius: 28rpx;
- font-size: 32rpx;
- }
- view {
- width: 120rpx;
- height: 64rpx;
- background: #1678FF;
- border-radius: 28rpx;
- font-size: 32rpx;
- color: #FFFFFF;
- margin-left: 8rpx;
- flex: 0 0 auto;
- text-align: center;
- line-height: 64rpx;
- }
- }
- .boxtopb {
- display: flex;
- align-items: center;
- justify-content: space-between;
- padding: 32rpx 0;
- .boxflex {
- display: flex;
- align-items: center;
- .boxtopba {
- width: 26rpx;
- height: 24rpx;
- margin-right: 16rpx;
- }
- .boxtopbb {
- font-size: 32rpx;
- color: #1678FF;
- margin-right: 16rpx;
- }
- .boxtopbc {
- width: 14rpx;
- height: 14rpx;
- }
- .boxtopbd {
- width: 28rpx;
- height: 28rpx;
- margin-right: 16rpx;
- }
- .boxtopbe {
- font-size: 30rpx;
- color: #6CBC0A;
- }
- }
- }
- }
- .tab {
- .tabs {
- .one_tab {
- color: #1678FF !important;
- }
- .one_tabqie {
- border-bottom: 8rpx solid #1678FF;
- }
- }
- }
- .exele {
- .box {
- table {
- border-spacing: 0rpx;
- }
- .tr_one {
- display: flex;
- // padding: 0 20rpx;
- box-sizing: border-box;
- justify-content: space-between;
- th {
- font-size: 30rpx;
- font-family: PingFang SC;
- font-weight: 500;
- color: #000000;
- overflow: hidden;
- text-overflow: ellipsis;
- white-space: nowrap;
- line-height: 78rpx;
- height: 78rpx;
- box-sizing: border-box;
- }
- }
- .two_tr {
- display: flex;
- // padding: 0 20rpx;
- box-sizing: border-box;
- justify-content: space-between;
- td {
- font-size: 30rpx;
- font-family: PingFang SC;
- font-weight: 500;
- color: #343434;
- min-height: 82rpx;
- padding: 20rpx 0;
- box-sizing: border-box;
- display: flex;
- align-items: center;
- justify-content: center;
- }
- // .tdse {
- // color: #E60012 !important;
- // }
- // .apply_span_xl{
- // color: #32B16C !important;
- // }
- // .apply_span_xltwo{
- // color: #ffa200 !important;
- // }
- // .apply_span_xlfive{
- // color: #4c4b4b !important;
- // }
- // .apply_span_xlthreo{
- // color: #f00404 !important;
- // }
- // .apply_span_xlforu{
- // color: #aaaaaa !important;
- // }
- // .coiu {
- // color: #EC1717;
- // }
- }
- .two_trtwo {
- background-color: #F2F2F2;
- }
- }
- }
- .zanwu {
- text-align: center;
- padding-top: 20upx;
- span {
- font-size: 30upx;
- }
- }
- // 搜索条件width: 562rpx;
- .bgbox {
- position: fixed;
- left: 0;
- right: 0;
- top: 0;
- bottom: 0;
- z-index: 19;
- background: rgba(0, 0, 0, 0.5);
- }
- .sfixed {
- min-height: 760rpx;
- background: #FFFFFF;
- border-radius: 14rpx;
- padding: 40rpx 34rpx;
- box-sizing: border-box;
- position: fixed;
- left: 60rpx;
- right: 60rpx;
- top: 50%;
- transform: translateY(-50%);
- z-index: 29;
- max-height: calc(100vh - 280rpx);
- overflow-y: auto;
- .sfixed_tit {
- font-size: 32rpx;
- font-weight: bold;
- color: #343434;
- line-height: 44rpx;
- text-align: center;
- }
- .sfixed_clo {
- width: 20rpx;
- height: 20rpx;
- position: absolute;
- left: 34rpx;
- top: 44rpx;
- }
- .sfixed_box {
- padding-top: 20rpx;
- margin-bottom: 80rpx;
- .sfixed_inp {
- width: 100%;
- height: 76rpx;
- background: #F2F2F2;
- padding: 0 34rpx;
- box-sizing: border-box;
- font-size: 32rpx;
- color: #333333;
- margin-top: 30rpx;
- }
- }
- .sfixed_btn {
- width: 100%;
- height: 76rpx;
- border: 0px solid #00B034;
- border-radius: 6rpx;
- font-size: 34rpx;
- color: #FFFFFF;
- text-align: center;
- line-height: 76rpx;
- &.btn1 {
- background: #1678FF;
- color: #FFFFFF;
- }
- &.btn2 {
- border: 2rpx solid #F02828;
- color: #F02828;
- margin-top: 28rpx;
- }
- }
- }
- .address {
- display: flex;
- align-items: center;
- padding: 24rpx 0;
- .addtita {
- flex: 0 0 auto;
- font-size: 34rpx;
- font-weight: bold;
- color: #343434;
- }
- .addressa {
- display: flex;
- align-items: center;
- flex: 1;
- display: flex;
- align-items: center;
- justify-content: flex-end;
- overflow: hidden;
- .addsa {
- font-size: 30rpx;
- color: #333333;
- overflow: hidden;
- white-space: nowrap;
- text-overflow: ellipsis;
- flex: 1;
- text-align: right;
- }
- .addsimg {
- width: 10rpx;
- height: 18rpx;
- margin-left: 10rpx;
- flex: 0 0 auto;
- }
- // .adds{
- // display: flex;align-items: center;justify-content: flex-start;padding:10rpx 20rpx;min-width: 220rpx;box-sizing: border-box;}
- }
- .addclear {
- color: #EA2929;
- font-size: 32rpx;
- flex: 0 0 auto;
- height: 60rpx;
- line-height: 60rpx;
- width: 128rpx;
- text-align: center
- }
- }
- .delbox {
- width: 580rpx;
- background: #FFFFFF;
- border-radius: 14px;
- position: fixed;
- top: 50%;
- left: 80rpx;
- right: 80rpx;
- padding: 48rpx 34rpx 72rpx;
- box-sizing: border-box;
- z-index: 5;
- margin-top: -210rpx;
- .deltit {
- font-size: 34rpx;
- font-weight: bold;
- color: #343434;
- text-align: center;
- line-height: 40rpx;
- }
- .del_img {
- width: 34rpx;
- height: 34rpx;
- position: absolute;
- right: 34rpx;
- top: 44rpx;
- }
- .del_btn {
- width: 100%;
- height: 76rpx;
- background: #00B034;
- border-radius: 6rpx;
- font-size: 34rpx;
- font-weight: bold;
- color: #FFFFFF;
- text-align: center;
- line-height: 76rpx;
- }
- .del_list {
- display: flex;
- padding: 60rpx 0 40rpx;
- flex-wrap: wrap;
- .del_lista {
- width: 116rpx;
- height: 64rpx;
- background: #CACACA;
- border-radius: 32rpx;
- font-size: 32rpx;
- font-weight: 500;
- color: #FFFFFF;
- text-align: center;
- line-height: 64rpx;
- margin: 0 10rpx 20rpx 0;
- &.act {
- background-color: #019FE8;
- }
- }
- }
- }
-
- </style>
|