亚洲乱码中文字幕综合,中国熟女仑乱hd,亚洲精品乱拍国产一区二区三区,一本大道卡一卡二卡三乱码全集资源,又粗又黄又硬又爽的免费视频

基于element日歷組件實現(xiàn)簽卡記錄

 更新時間:2022年08月29日 09:46:25   作者:程序媛na  
這篇文章主要為大家詳細介紹了基于element日歷組件實現(xiàn)簽卡記錄,文中示例代碼介紹的非常詳細,具有一定的參考價值,感興趣的小伙伴們可以參考一下

本文實例為大家分享了基于element日歷組件實現(xiàn)簽卡記錄的具體代碼,供大家參考,具體內(nèi)容如下

使用element日歷組件為基礎,實現(xiàn)可以查看每天簽卡記錄

<template>
? <div class="n-container">
? ? <div style="padding: 40px">
? ? ? <el-col :span="24">
? ? ? ? <div class="title">
? ? ? ? ? <div class="tpadding">我的考勤</div>
? ? ? ? ? <el-divider></el-divider>
? ? ? ? </div>
? ? ? </el-col>
? ? ? <el-col :span="24">
? ? ? ? <div class="block">
? ? ? ? ? <el-calendar v-model="recordTime" :first-day-of-week="7">
? ? ? ? ? ? <!-- 這里使用的是 2.5 slot 語法,對于新項目請使用 2.6 slot 語法-->
? ? ? ? ? ? <template slot="dateCell" slot-scope="{ date, data }">
? ? ? ? ? ? ? <!--自定義內(nèi)容-->
? ? ? ? ? ? ? <div slot="reference" class="histyle" @click="getDateAtte(data)">
? ? ? ? ? ? ? ? <div class="calendar-day">
? ? ? ? ? ? ? ? ? <el-popover
? ? ? ? ? ? ? ? ? ? placement="left"
? ? ? ? ? ? ? ? ? ? visible-arrow="false"
? ? ? ? ? ? ? ? ? ? width="500"
? ? ? ? ? ? ? ? ? ? trigger="click"
? ? ? ? ? ? ? ? ? >
? ? ? ? ? ? ? ? ? ? <el-table :data="recordList">
? ? ? ? ? ? ? ? ? ? ? <el-table-column
? ? ? ? ? ? ? ? ? ? ? ? width="140"
? ? ? ? ? ? ? ? ? ? ? ? property="signState"
? ? ? ? ? ? ? ? ? ? ? ? label="狀態(tài)類型"
? ? ? ? ? ? ? ? ? ? ? ></el-table-column> ? ? ? ? ? ? ? ? ? ??
? ? ? ? ? ? ? ? ? ? ? <el-table-column
? ? ? ? ? ? ? ? ? ? ? ? width="140"
? ? ? ? ? ? ? ? ? ? ? ? property="signTime"
? ? ? ? ? ? ? ? ? ? ? ? label="實際簽卡時間"
? ? ? ? ? ? ? ? ? ? ? ></el-table-column>
? ? ? ? ? ? ? ? ? ? ? <!-- <el-table-column
? ? ? ? ? ? ? ? ? ? ? ? width="120"
? ? ? ? ? ? ? ? ? ? ? ? property="checkintime"
? ? ? ? ? ? ? ? ? ? ? ? label="應簽卡時間"
? ? ? ? ? ? ? ? ? ? ? ></el-table-column> -->
?
? ? ? ? ? ? ? ? ? ? ? <el-table-column
? ? ? ? ? ? ? ? ? ? ? ??
? ? ? ? ? ? ? ? ? ? ? ? property="attmachinename"
? ? ? ? ? ? ? ? ? ? ? ? label="考勤機名稱"
? ? ? ? ? ? ? ? ? ? ? ></el-table-column>
? ? ? ? ? ? ? ? ? ? </el-table>
? ? ? ? ? ? ? ? ? ? <div slot="reference">
? ? ? ? ? ? ? ? ? ? ? {{ data.day.split("-").slice(2).join("-") }}
? ? ? ? ? ? ? ? ? ? ? <!-- <i class="el-icon-warning-outline is_waring"></i> -->
? ? ? ? ? ? ? ? ? ? </div>
? ? ? ? ? ? ? ? ? </el-popover>
? ? ? ? ? ? ? ? </div>
? ? ? ? ? ? ? </div>
? ? ? ? ? ? </template>
? ? ? ? ? </el-calendar>
? ? ? ? </div>
? ? ? </el-col>
? ? </div>
? </div>
</template>
?
<script>
import { listRecord } from "@/api/self/attendance";
export default {
? data() {
? ? return {
? ? ? recordTime: this.selectofearmonth,
? ? ? nosignList: [],
? ? ? queryParams: {
? ? ? ? userId: this.userIdVal,
? ? ? ? signTime: this.dt,
? ? ? },
? ? ? recordList: [],
? ? };
? },
? props: ["selectofearmonth", "dt", "userIdVal"],
? created() {},
? watch: {
? ? selectofearmonth: {
? ? ? handler(newVal, oldVal) {
? ? ? ? this.recordTime = this.parseTime(newVal, "{y}-{m}");
? ? ? ? this.getDateAtte();
? ? ? },
? ? },
? },
? methods: {
? ? getDateAtte(data) {
? ? ? this.queryParams.signTime = data.day;
? ? ? if (
? ? ? ? this.queryParams.signTime == null ||
? ? ? ? this.queryParams.signTime == ""
? ? ? ) {
? ? ? ? return "時間不能為空";
? ? ? }
? ? ? if (this.queryParams.userId == null || this.queryParams.userId == "") {
? ? ? ? return "用戶ID不能為空";
? ? ? }
? ? ? listRecord(this.queryParams).then((data) => {
? ? ? ? if (data.code != 200) {
? ? ? ? ? return;
? ? ? ? }
? ? ? ? this.recordList = data.rows;
? ? ? });
? ? },
? ? //處理請求回的數(shù)據(jù),與日歷數(shù)據(jù)相掛鉤
? ? dealMyDate(v) {
? ? ? let len = this.saveMothData.length;
? ? ? let res = {};
? ? ? for (let i = 0; i < len; i++) {
? ? ? ? if (this.saveMothData[i].memoDate == v) {
? ? ? ? ? res.hasMemo = true;
? ? ? ? ? res.memoLevel = this.saveMothData[i].memoLevel;
? ? ? ? ? res.memoTime = this.saveMothData[i].memoTime;
? ? ? ? ? break;
? ? ? ? }
? ? ? }
? ? ? return res;
? ? },
? ? //點擊日歷上每一天更新備忘錄列表
? ? updateMemo(data) {
? ? ? this.chooseDay = data.day;
? ? ? this.memorandumCurrentPage = 1;
? ? ? const param = {
? ? ? ? pageNum: this.memorandumCurrentPage,
? ? ? ? pageSize: this.memorandumPageSize,
? ? ? ? param: {
? ? ? ? ? day: data.day,
? ? ? ? ? emplId: this.emplId,
? ? ? ? },
? ? ? };
? ? ? this.queryMemoList(param);
? ? },
? ? //查詢備忘錄列表
? ? queryMemoList(data, flag) {
? ? ? var param;
? ? ? if (data) {
? ? ? ? //
? ? ? ? param = data;
? ? ? ? param.emplId = this.emplId;
? ? ? } else {
? ? ? ? //不傳data的情況,有可能是初次加載或者不傳month也不傳day
? ? ? ? param = {
? ? ? ? ? param: {
? ? ? ? ? ? emplId: this.emplId,
? ? ? ? ? },
? ? ? ? ? pageNum: this.memorandumCurrentPage,
? ? ? ? ? pageSize: this.memorandumPageSize,
? ? ? ? };
? ? ? }
? ? },
? },
};
</script>
?
<style scope>
.n-container {
? padding: 0px;
? box-shadow: 0 2px 12px 0 rgb(0 0 0 / 10%);
? height: 500px;
? margin-bottom: 10px;
}
.title {
? font-size: 16px;
? font-weight: bold;
? text-align: left;
}
.tpadding {
? padding-top: 12px;
}
.is-selected {
? color: #2936f3;
? font-size: 17px;
? margin-top: 5px;
}
.histyle {
? height: 35px;
}
.el-calendar-table .el-calendar-day {
? height: 30px;
}
.is_waring {
? color: rgb(236, 134, 17);
}
.is_right {
? color: rgb(145, 176, 235);
}
</style>

結(jié)果如圖:

以上就是本文的全部內(nèi)容,希望對大家的學習有所幫助,也希望大家多多支持腳本之家。

相關(guān)文章

  • Element中select多數(shù)據(jù)加載優(yōu)化的實現(xiàn)

    Element中select多數(shù)據(jù)加載優(yōu)化的實現(xiàn)

    本文主要介紹了Element中select多數(shù)據(jù)加載優(yōu)化的實現(xiàn),文中通過示例代碼介紹的非常詳細,具有一定的參考價值,感興趣的小伙伴們可以參考一下
    2021-09-09
  • Vue編程三部曲之模型樹優(yōu)化示例

    Vue編程三部曲之模型樹優(yōu)化示例

    這篇文章主要為大家介紹了Vue編程三部曲之模型樹優(yōu)化示例詳解,有需要的朋友可以借鑒參考下,希望能夠有所幫助,祝大家多多進步,早日升職加薪
    2022-07-07
  • vue-cli-service?build?自定義參數(shù)方式

    vue-cli-service?build?自定義參數(shù)方式

    這篇文章主要介紹了vue-cli-service?build?自定義參數(shù)方式,具有很好的參考價值,希望對大家有所幫助,如有錯誤或未考慮完全的地方,望不吝賜教
    2023-10-10
  • 詳解vue大文件視頻切片上傳的處理方法

    詳解vue大文件視頻切片上傳的處理方法

    前端上傳大文件、視頻的時候會出現(xiàn)超時、過大、很慢等情況,為了解決這一問題,跟后端配合做了一個切片的功能,接下來就詳細的給大家介紹一下vue大文件視頻切片上傳的處理方法,需要的朋友可以參考下
    2023-08-08
  • 在Vue里如何把網(wǎng)頁的數(shù)據(jù)導出到Excel的方法

    在Vue里如何把網(wǎng)頁的數(shù)據(jù)導出到Excel的方法

    這篇文章主要介紹了在Vue里如何把網(wǎng)頁的數(shù)據(jù)導出到Excel,文中通過示例代碼介紹的非常詳細,對大家的學習或者工作具有一定的參考學習價值,需要的朋友們下面隨著小編來一起學習學習吧
    2020-09-09
  • Vue實現(xiàn)Hover功能(mouseover與mouseenter的區(qū)別及說明)

    Vue實現(xiàn)Hover功能(mouseover與mouseenter的區(qū)別及說明)

    這篇文章主要介紹了Vue實現(xiàn)Hover功能(mouseover與mouseenter的區(qū)別及說明),具有很好的參考價值,希望對大家有所幫助。如有錯誤或未考慮完全的地方,望不吝賜教
    2022-10-10
  • vue實現(xiàn)搜索功能

    vue實現(xiàn)搜索功能

    這篇文章主要為大家詳細介紹了vue實現(xiàn)搜索功能,具有一定的參考價值,感興趣的小伙伴們可以參考一下
    2019-05-05
  • Vue兩個通信方式與動畫過度及混入使用介紹

    Vue兩個通信方式與動畫過度及混入使用介紹

    最近在寫vue的一個項目要實現(xiàn)過渡的效果,雖然vue動畫不是強項,庫也多,但是基本的坑還是得踩扎實,下面這篇文章主要給大家介紹了關(guān)于Vue中實現(xiàn)過渡動畫效果的相關(guān)資料,需要的朋友可以參考下
    2023-03-03
  • vue.js模仿京東省市區(qū)三級聯(lián)動的選擇組件實例代碼

    vue.js模仿京東省市區(qū)三級聯(lián)動的選擇組件實例代碼

    選擇省市區(qū)是我們大家在填寫地址的時候經(jīng)常會遇到的一個功能,下面這篇文章主要給大家介紹了關(guān)于利用vue.js模仿實現(xiàn)京東省市區(qū)三級聯(lián)動選擇組件的相關(guān)資料,文中通過示例代碼介紹的非常詳細,需要的朋友可以參考借鑒,下面來一起看看吧。
    2017-11-11
  • Vue用v-for給src屬性賦值的方法

    Vue用v-for給src屬性賦值的方法

    下面小編就為大家分享一篇Vue用v-for給src屬性賦值的方法,具有很好的參考價值,希望對大家有所幫助。一起跟隨小編過來看看吧
    2018-03-03

最新評論