人事管理

人员排班

上一周

新增排班

下一周

{{nextMonday}}

星期一

~

{{lastsunday}}

星期天

show-overflow-tooltip

:label="monday1"

prop="mondayStatus"

align="center"

width="175"

>

show-overflow-tooltip

:label="thursday1"

prop="thursdayStatus"

align="center"

width="175"

>

show-overflow-tooltip

:label="wednesday1"

prop="wednesdayStatus"

align="center"

width="175"

>

show-overflow-tooltip

:label="thuesday1"

prop="thuesdayStatus"

align="center"

width="175"

>

show-overflow-tooltip

:label="friday1"

prop="fridayStatus"

align="center"

width="175"

>

show-overflow-tooltip

:label="saturday1"

prop="saturdayStatus"

align="center"

width="175"

>

show-overflow-tooltip

:label="sunday1"

prop="sundayStatus"

align="center"

width="175"

>

修改

删除

background

layout="total, prev, pager, next,jumper"

@current-change="handleCurrentChange"

:current-page="queryInfo.pagenum"

:page-size="queryInfo.pagesize"

:total="total"

>

v-model="this.dateFormat2"

value-format="yyyy-MM-dd 00:00:00"

type="date"

editable

disabled

>

v-model="this.dateFormat8"

value-format="yyyy-MM-dd 00:00:00"

type="date"

editable

disabled

>

取 消

确 定

import rules from "@/defined/rules";

import request from "@/public/http";

export default {

data() {

return {

base: "",

monday: "",

today: "",

dateFormat2: "",

dateFormat8: "",

nextMonday: "",

lastsunday: "",

queryInfo: {

query: "",

pagenum: 1,

pagesize: 10

},

role: false,

homes: [],

workers: [],

total: 0,

tableData: [],

title: "新增",

dialogVisible: false,

form: {},

formRules: {

}

};

},

components: {},

created() {},

watch: {},

mounted() {

this.getTableList();

this.getAddInfo();

this.getworkers();

this.getTime();

},

methods: {

lastweek() {

this.getBeforNday(this.base, 7);

console.log(this.dateFormat2);

this.getTableList();

},

nextweek() {

this.getBeforNday(this.base, -7);

console.log(this.dateFormat2);

this.getTableList();

},

getTime() {

var myDate = new Date();

var year = myDate.getFullYear();

var month = myDate.getMonth() + 1;

var date = myDate.getDate();

var str = myDate.getDay();

console.log(str, 888);

if (str == 1) {

this.getBeforNday(myDate, 1);

}

if (str == 2) {

this.getBeforNday(myDate, 2);

}

if (str == 3) {

this.getBeforNday(myDate, 3);

}

if (str == 4) {

this.getBeforNday(myDate, 4);

}

if (str == 5) {

this.getBeforNday(myDate, 5);

}

if (str == 6) {

this.getBeforNday(myDate, 6);

}

if (str == 0) {

this.getBeforNday(myDate, 0);

}

},

getBeforNday(date, n) {

var todays = date.getTime();

var today = new Date();

this.today = today.setTime(todays);

var yesterday_milliseconds = date.getTime() - n * 1000 * 60 * 60 * 24;

var yesterday = new Date();

yesterday.setTime(yesterday_milliseconds);

var strYear = yesterday.getFullYear();

var strDay = yesterday.getDate();

var strMonth = yesterday.getMonth() + 1;

var strdate = yesterday.getDay();

if (strdate == 0) {

}

if (strMonth

strMonth = "0" + strMonth;

}

let datastr = strYear + "年" + strMonth + "月" + strDay + "日";

let md = strMonth + "-" + strDay;

this.sunday = md;

this.lastsunday = datastr;

this.dateFormat1 = strYear + "-" + strMonth + "-" + strDay;

this.base = yesterday;

this.getotherday(yesterday, -1);

this.getotherday(yesterday, -2);

this.getotherday(yesterday, -3);

this.getotherday(yesterday, -4);

this.getotherday(yesterday, -5);

this.getotherday(yesterday, -6);

this.getotherday(yesterday, -7);

},

getotherday(date, n) {

var yesterday_milliseconds = date.getTime() - n * 1000 * 60 * 60 * 24;

var yesterday = new Date();

yesterday.setTime(yesterday_milliseconds);

var strYear = yesterday.getFullYear();

var strDay = yesterday.getDate();

var strMonth = yesterday.getMonth() + 1;

var strdate = yesterday.getDay();

if (strMonth

strMonth = "0" + strMonth;

}

if (strDay

strDay = "0" + strDay;

}

if (n == -1) {

this.monday = strMonth + "." + strDay;

this.monday1 =

"星期一" + "(" + strYear + " / " + strMonth + " / " + strDay + ")";

this.nextMonday = strYear + "年" + strMonth + "月" + strDay + "日";

this.dateFormat2 =

strYear + "-" + strMonth + "-" + strDay + " " + "00:00:00";

}

if (n == -2) {

this.thursday = strMonth + "." + strDay;

this.thursday1 =

"星期二" + "(" + strYear + " / " + strMonth + " / " + strDay + ")";

this.dateFormat3 = strYear + "-" + strMonth + "-" + strDay;

}

if (n == -3) {

this.wednesday = strMonth + "." + strDay;

this.wednesday1 =

"星期三" + "(" + strYear + " / " + strMonth + " / " + strDay + ")";

this.dateFormat4 = strYear + "-" + strMonth + "-" + strDay;

}

if (n == -4) {

this.thuesday = strMonth + "." + strDay;

this.thuesday1 =

"星期四" + "(" + strYear + " / " + strMonth + " / " + strDay + ")";

this.dateFormat5 = strYear + "-" + strMonth + "-" + strDay;

}

if (n == -5) {

this.friday = strMonth + "." + strDay;

this.friday1 =

"星期五" + "(" + strYear + " / " + strMonth + " / " + strDay + ")";

this.dateFormat6 = strYear + "-" + strMonth + "-" + strDay;

}

if (n == -6) {

this.saturday = strMonth + "." + strDay;

this.saturday1 =

"星期六" + "(" + strYear + " / " + strMonth + " / " + strDay + ")";

this.dateFormat7 = strYear + "-" + strMonth + "-" + strDay;

}

if (n == -7) {

this.sunday = strMonth + "." + strDay;

this.sunday1 =

"星期天" + "(" + strYear + " / " + strMonth + " / " + strDay + ")";

this.lastsunday = strYear + "年" + strMonth + "月" + strDay + "日";

this.dateFormat8 =

strYear + "-" + strMonth + "-" + strDay + " " + "00:00:00";

}

},

handleChange_1(data) {

console.log(data);

},

handleChange_2(data) {

console.log(data, 123);

},

dialogClosed() {

this.form = {};

this.title = "新增";

},

//获取workers

async getworkers() {

const { data: res } = await this.$http.post(

"",

{

page: { pagesize: 10000, start: 0 }

}

);

this.workers = res.data;

},

async getTableList() {

var a = sessionStorage.getItem("elderlyHomeId");

if (a == 0) {

const { data: res } = await this.$http.post(

"",

{

schedulingDay: this.dateFormat2,

page: {

pagesize: 1000,

start: 0

}

}

);

if (res.msg !== "success") {

return this.$message.error("接口出错!");

}

this.tableData = res.data;

this.total = res.data.length;

} else {

const { data: res } = await this.$http.post(

"",

{

elderlyHomeId: a,

schedulingDay: this.dateFormat2,

page: {

pagesize: 1000,

start: 0

}

}

);

if (res.msg !== "success") {

return this.$message.error("接口出错!");

}

this.tableData = res.data;

this.total = res.data.length;

}

},

async removeUserById(id) {

// 弹框询问用户是否删除数据

const confirmResult = await this.$confirm(

"此操作将永久删除该数据, 是否继续?",

"提示",

{

confirmButtonText: "确定",

cancelButtonText: "取消",

type: "warning"

}

).catch(err => err);

// 如果用户确认删除,则返回值为字符串 confirm

// 如果用户取消了删除,则返回值为字符串 cancel

// console.log(confirmResult)

if (confirmResult !== "confirm") {

return this.$message.info("已取消删除");

}

const { data: res } = await this.$http.post(

"5003/nurseHome/nurseSubstitute/del?id=" + id

);

if (res.msg !== "success") {

return this.$message.error("删除数据失败");

}

this.getTableList();

this.$message.success("删除数据成功!");

},

//添加or修改

showEditDialog(row) {

this.form = row;

this.title = "修改排班";

this.dialogVisible = true;

},

async handleSubmit() {

this.$refs.formRef.validate(async valid => {

if (!valid) return;

if (this.title === "修改排班") {

request({

url: "",

data: this.form

}).then(res => {

this.getTableList();

this.$message.success("修改数据成功!");

});

this.dialogVisible = false;

} else {

var a = sessionStorage.getItem("elderlyHomeId");

this.form.elderlyHomeId = a;

this.form.schedulingDay = this.dateFormat2;

request({

url: "",

data: this.form

}).then(res => {

this.getTableList();

this.$message.success("添加数据成功!");

});

this.dialogVisible = false;

}

});

},

handleSelectionChange(val) {

this.checkedList = val;

},

handleCurrentChange(newPage) {

this.queryInfo.pagenum = newPage;

this.getTableList();

}

}

};

效果图

mysql员工星期排班表设计_vue+element项目做员工排班表相关推荐

  1. mysql 表设计工具_非常好用的一个表设计工具(EZDML)

    表结构设计器(EZDML) 这是一个数据库建表的小软件,可快速的进行数据库表结构设计,建立数据模型.类似大家常用的数据库建模工具如PowerDesigner.ERWIN.ER-Studio和Ratio ...

  2. 刷百度下拉那个词与百度快排点击原理是什么?做快排网站降权怎么办?

    前言:这是白杨SEO公众号原创第344篇.为什么写这个?因为之前群里有人问百度下拉词原理是什么?还有一些朋友反映说做快排网站严重降权怎么办?今天就来分享一下. 声明:不管是下拉还是快排,白杨SEO均不 ...

  3. java签到 表设计_java springboot 7天签到功能设计 数据库表设计 加代码

    实现一个类似于这样的签到功能 (参考的百度网盘签到页面) 数据表是一个用户只有一条签到记录的设计, 没有使用签到一次表中加一条数据, 那样的话数据太多了 表结构: CREATE TABLE `sign ...

  4. 货币兑换表设计mysql_不同币种换汇及汇率数据库表结构设计

    要实现汇率和换汇相关的功能,效果如下图: 首先要提供一个查看实时汇率信息的表,该表用来从三方获取对应币种的换汇汇率信息.核心字段包括以下内容: id:ID,数据库主键 currency_code_fr ...

  5. VS创建props属性表并在新项目中导入props属性表

    创建props属性表过程见配置PCL的一个例子:VS2019配置PCL 上面一篇执行完现在生成了pclX64.props 创建一个新的项目: 创建好了之后,复制进来两个文件,那个pcd模板文件见上面那 ...

  6. MySQL之库表设计篇:一到五范式、BC范式与反范式详解

    引言 MySQL的库表设计,在很多时候我们都是率性而为,往往在前期的设计中考虑并不全面,同时对于库表结构的划分也并不明确,所以很多时候在开发过程中,代码敲着敲着会去重构某张表结构,甚至大面积重构多张表 ...

  7. 玩转MySQL:14000字来详解库表设计

    引言 MySQL的库表设计,在很多时候我们都是率性而为,往往在前期的设计中考虑并不全面,同时对于库表结构的划分也并不明确,所以很多时候在开发过程中,代码敲着敲着会去重构某张表结构,甚至大面积重构多张表 ...

  8. Mysql之表设计浅析

    在后端开发中,经常需要设计数据库表,下面简单聊一下mysql的表设计原则. 1.命名规范 数据库表名.字段名.索引名等都需要统一命名规范,且需要具有可读性,英文或英文简写,切忌中英文混用. 反例: a ...

  9. 大数据之路—— 事实表设计

    十一.数据模型篇-- 事实表设计 11.1 事实表基础 11.1.1 事实表特性 11.1.2 事实表设计原则 11.1.3 事实的设计准则 11.1.4 事实表设计方法 11.2 事务事实表 11. ...

最新文章

  1. kubernetes学习笔记之十三:基于calico的网络策略入门
  2. R语言使用ggplot2包geom_jitter()函数绘制分组(strip plot,一维散点图)带状图(颜色配置:连续色彩、离散色彩、色彩梯度)实战
  3. java四种xml_Java中四种XML解析技术
  4. Android 开机自动运行和添加删除桌面快捷方式
  5. boost::geometry::sym_difference用法的测试程序
  6. VC 为静态控件添加事件
  7. 这个偏僻的小山村竟出了12位博士28位硕士,高产“学霸”背后原因曝光......
  8. Swift标识符和关键字
  9. BAT在AI领域投资收购大起底:当我们说搞AI时我们要搞些什么?
  10. android ndk 头文件,笔记:Android源码和NDK目录及头文件
  11. [原]ActiveReport6 for net使用(一)
  12. 反恐精英ol永恒python厉害吗_【CS】Python高阶
  13. java代码计算两个时间相差的天数:
  14. android21 下载,21下载2021安卓最新版_手机app官方版免费安装下载_豌豆荚
  15. Java日期工具-Joda-Time和FastDateFormat
  16. 如何用项目甘特图,做好项目汇报
  17. 关于树莓派4B的屏幕输入信号源由HDMI变为AV2的处理方法
  18. 针对AttributeError: ‘tensorflow.python.framework.ops.EagerTensor‘ ....no attribute ‘reshape‘问题的解决办法。
  19. GDB/MI 命令总结
  20. 使用这10个随机网站生成器来丰富浏览器的首页

热门文章

  1. 寒假第三周学习总结与反思
  2. 解释一下java的短路运算,Java短路运算符和非短路运算符详解
  3. 2022年计算机考研408考点清单(1.0版本已更完——欢迎指正)
  4. python 字符串转16进制数字
  5. Python——验证码输入
  6. std::vector概述
  7. JAVA毕业设计华北地区阔叶林木叶部病虫害图像管理系统计算机源码+lw文档+系统+调试部署+数据库
  8. RISC-V “异军”突起,英特尔:消灭不了就加入它
  9. oracle merge into 用法详解
  10. Java Statement一次执行多条sql语句