|
|
@@ -0,0 +1,898 @@
|
|
|
+<template>
|
|
|
+ <div class="app-container">
|
|
|
+ <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
|
|
+ <!-- <el-form-item label="工作日ID" prop="workdayId">
|
|
|
+ <el-input
|
|
|
+ v-model="queryParams.workdayId"
|
|
|
+ placeholder="请输入工作日ID"
|
|
|
+ clearable
|
|
|
+ @keyup.enter.native="handleQuery"
|
|
|
+ />
|
|
|
+ </el-form-item> -->
|
|
|
+ <el-form-item label="年份" prop="year">
|
|
|
+ <el-select v-model="queryParams.year" placeholder="请选择年份" clearable>
|
|
|
+ <el-option v-for="item in year_select" :key="item.value" :label="item.value" :value="item.value" ></el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="月份" prop="month">
|
|
|
+
|
|
|
+ <el-select v-model="queryParams.month" placeholder="请选择月份" clearable>
|
|
|
+ <el-option v-for="item in month_select" :key="item.value" :label="item.value" :value="item.value" ></el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+
|
|
|
+ <el-form-item>
|
|
|
+ <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
|
|
+ <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+
|
|
|
+ <el-row :gutter="10" class="mb8">
|
|
|
+ <el-col :span="1.5">
|
|
|
+ <el-button
|
|
|
+ type="primary"
|
|
|
+ plain
|
|
|
+ icon="el-icon-plus"
|
|
|
+ size="mini"
|
|
|
+ @click="handleAdd"
|
|
|
+
|
|
|
+ >新增</el-button>
|
|
|
+ </el-col>
|
|
|
+ <!-- <el-col :span="1.5">
|
|
|
+ <el-button
|
|
|
+ type="success"
|
|
|
+ plain
|
|
|
+ icon="el-icon-edit"
|
|
|
+ size="mini"
|
|
|
+ :disabled="single"
|
|
|
+ @click="handleUpdate"
|
|
|
+
|
|
|
+ >修改</el-button> -->
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="1.5">
|
|
|
+ <el-button
|
|
|
+ type="danger"
|
|
|
+ plain
|
|
|
+ icon="el-icon-delete"
|
|
|
+ size="mini"
|
|
|
+ :disabled="multiple"
|
|
|
+ @click="handleDelete"
|
|
|
+
|
|
|
+ >删除</el-button>
|
|
|
+ </el-col>
|
|
|
+ <!-- <el-col :span="1.5">
|
|
|
+ <el-button
|
|
|
+ type="warning"
|
|
|
+ plain
|
|
|
+ icon="el-icon-download"
|
|
|
+ size="mini"
|
|
|
+ @click="handleExport"
|
|
|
+
|
|
|
+ >导出</el-button>
|
|
|
+ </el-col> -->
|
|
|
+
|
|
|
+ </el-row>
|
|
|
+
|
|
|
+ <el-table v-loading="loading" :data="scheduleList" @selection-change="handleSelectionChange">
|
|
|
+ <el-table-column type="selection" width="55" align="center" />
|
|
|
+ <!-- <el-table-column label="工作日ID" align="center" prop="workdayId" /> -->
|
|
|
+ <el-table-column label="年份" align="center" prop="year" width="180">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <span>{{ scope.row.year }}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="月份" align="center" prop="month" width="180">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <span>{{ scope.row.month}}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <!-- <el-table-column label="第1日是否工作" align="center" prop="day01" /> -->
|
|
|
+ <el-table-column label="第1日是否工作" align="center" key="day01" >
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-switch v-model="scope.row.day01" :active-value="1" :inactive-value="0" @change="handleStatusChange(scope.row,1)"></el-switch>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="第2日是否工作" align="center" key="day02" >
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-switch v-model="scope.row.day02" :active-value="1" :inactive-value="0" @change="handleStatusChange(scope.row,2)"></el-switch>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="第3日是否工作" align="center" key="day03" >
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-switch v-model="scope.row.day03" :active-value="1" :inactive-value="0" @change="handleStatusChange(scope.row,3)"></el-switch>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="第4日是否工作" align="center" key="day04" >
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-switch v-model="scope.row.day04" :active-value="1" :inactive-value="0" @change="handleStatusChange(scope.row,4)"></el-switch>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="第5日是否工作" align="center" key="day05" >
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-switch v-model="scope.row.day05" :active-value="1" :inactive-value="0" @change="handleStatusChange(scope.row,5)"></el-switch>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="第6日是否工作" align="center" key="day06" >
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-switch v-model="scope.row.day06" :active-value="1" :inactive-value="0" @change="handleStatusChange(scope.row,6)"></el-switch>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="第7日是否工作" align="center" key="day07" >
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-switch v-model="scope.row.day07" :active-value="1" :inactive-value="0" @change="handleStatusChange(scope.row,7)"></el-switch>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="第8日是否工作" align="center" key="day08" >
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-switch v-model="scope.row.day08" :active-value="1" :inactive-value="0" @change="handleStatusChange(scope.row,8)"></el-switch>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="第9日是否工作" align="center" key="day09" >
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-switch v-model="scope.row.day09" :active-value="1" :inactive-value="0" @change="handleStatusChange(scope.row,9)"></el-switch>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="第10日是否工作" align="center" key="day10" >
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-switch v-model="scope.row.day10" :active-value="1" :inactive-value="0" @change="handleStatusChange(scope.row,10)"></el-switch>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="第11日是否工作" align="center" key="day11" >
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-switch v-model="scope.row.day11" :active-value="1" :inactive-value="0" @change="handleStatusChange(scope.row,11)"></el-switch>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="第12日是否工作" align="center" key="day12" >
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-switch v-model="scope.row.day12" :active-value="1" :inactive-value="0" @change="handleStatusChange(scope.row,12)"></el-switch>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="第13日是否工作" align="center" key="day13" >
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-switch v-model="scope.row.day13" :active-value="1" :inactive-value="0" @change="handleStatusChange(scope.row,13)"></el-switch>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="第14日是否工作" align="center" key="day14" >
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-switch v-model="scope.row.day14" :active-value="1" :inactive-value="0" @change="handleStatusChange(scope.row,14)"></el-switch>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="第15日是否工作" align="center" key="day15" >
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-switch v-model="scope.row.day15" :active-value="1" :inactive-value="0" @change="handleStatusChange(scope.row,15)"></el-switch>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="第16日是否工作" align="center" key="day16" >
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-switch v-model="scope.row.day16" :active-value="1" :inactive-value="0" @change="handleStatusChange(scope.row,16)"></el-switch>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="第17日是否工作" align="center" key="day17" >
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-switch v-model="scope.row.day17" :active-value="1" :inactive-value="0" @change="handleStatusChange(scope.row,17)"></el-switch>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="第18日是否工作" align="center" key="day18" >
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-switch v-model="scope.row.day18" :active-value="1" :inactive-value="0" @change="handleStatusChange(scope.row,18)"></el-switch>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="第19日是否工作" align="center" key="day19" >
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-switch v-model="scope.row.day19" :active-value="1" :inactive-value="0" @change="handleStatusChange(scope.row,19)"></el-switch>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="第20日是否工作" align="center" key="day20" >
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-switch v-model="scope.row.day20" :active-value="1" :inactive-value="0" @change="handleStatusChange(scope.row,20)"></el-switch>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="第21日是否工作" align="center" key="day21" >
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-switch v-model="scope.row.day21" :active-value="1" :inactive-value="0" @change="handleStatusChange(scope.row,21)"></el-switch>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="第22日是否工作" align="center" key="day22" >
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-switch v-model="scope.row.day22" :active-value="1" :inactive-value="0" @change="handleStatusChange(scope.row,22)"></el-switch>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="第23日是否工作" align="center" key="day23" >
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-switch v-model="scope.row.day23" :active-value="1" :inactive-value="0" @change="handleStatusChange(scope.row,23)"></el-switch>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="第24日是否工作" align="center" key="day24" >
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-switch v-model="scope.row.day24" :active-value="1" :inactive-value="0" @change="handleStatusChange(scope.row,24)"></el-switch>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="第25日是否工作" align="center" key="day25" >
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-switch v-model="scope.row.day25" :active-value="1" :inactive-value="0" @change="handleStatusChange(scope.row,25)"></el-switch>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="第26日是否工作" align="center" key="day26" >
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-switch v-model="scope.row.day26" :active-value="1" :inactive-value="0" @change="handleStatusChange(scope.row,26)"></el-switch>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="第27日是否工作" align="center" key="day27" >
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-switch v-model="scope.row.day27" :active-value="1" :inactive-value="0" @change="handleStatusChange(scope.row,27)"></el-switch>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="第28日是否工作" align="center" key="day28" >
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-switch v-model="scope.row.day28" :active-value="1" :inactive-value="0" @change="handleStatusChange(scope.row,28)"></el-switch>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="第29日是否工作" align="center" key="day29" >
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-switch v-model="scope.row.day29" :active-value="1" :inactive-value="0" @change="handleStatusChange(scope.row,29)"></el-switch>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="第30日是否工作" align="center" key="day30" >
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-switch v-model="scope.row.day30" :active-value="1" :inactive-value="0" @change="handleStatusChange(scope.row,30)"></el-switch>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="第31日是否工作" align="center" key="day31" >
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <el-switch v-model="scope.row.day31" :active-value="1" :inactive-value="0" @change="handleStatusChange(scope.row,31)"></el-switch>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+
|
|
|
+ <el-table-column label="当月工作日总数" align="center" prop="workdayCount" />
|
|
|
+ <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <!-- <el-button
|
|
|
+ size="mini"
|
|
|
+ type="text"
|
|
|
+ icon="el-icon-edit"
|
|
|
+ @click="handleUpdate(scope.row)"
|
|
|
+
|
|
|
+ >修改</el-button> -->
|
|
|
+ <el-button
|
|
|
+ size="mini"
|
|
|
+ type="text"
|
|
|
+ icon="el-icon-delete"
|
|
|
+ @click="handleDelete(scope.row)"
|
|
|
+
|
|
|
+ >删除</el-button>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ <!-- 添加或修改APS月度班制排班对话框 -->
|
|
|
+ <el-dialog :title="title" :visible.sync="open" width="75%" append-to-body>
|
|
|
+ <el-form ref="form" :model="form" :rules="rules" label-width="120px">
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="8">
|
|
|
+
|
|
|
+ <!-- <el-form-item label="工作日ID" prop="workdayId">
|
|
|
+ <el-input v-model="form.workdayId" placeholder="请输入工作日ID" />
|
|
|
+ </el-form-item> -->
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="8" >
|
|
|
+ <!-- <el-form-item label="年份" prop="year">
|
|
|
+ <el-input v-model="form.year" placeholder="请输入年份" />
|
|
|
+ </el-form-item> -->
|
|
|
+ <el-form-item label="年份" prop="year">
|
|
|
+ <el-select v-model="form.year" placeholder="请选择年份">
|
|
|
+ <el-option v-for="item in year_select" :key="item.value" :label="item.value" :value="item.value" ></el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+
|
|
|
+ </el-col>
|
|
|
+
|
|
|
+ <el-col :span="8" >
|
|
|
+ <!-- <el-form-item label="月份" prop="month">
|
|
|
+ <el-input v-model="form.month" placeholder="请输入月份" />
|
|
|
+ </el-form-item> -->
|
|
|
+ <el-form-item label="月份" prop="month">
|
|
|
+
|
|
|
+ <el-select v-model="form.month" placeholder="请选择月份">
|
|
|
+ <el-option v-for="item in month_select" :key="item.value" :label="item.value" :value="item.value" ></el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+
|
|
|
+ </el-row>
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="第1日是否工作" prop="day01">
|
|
|
+ <el-radio-group v-model="form.day01">
|
|
|
+ <el-radio
|
|
|
+ v-for="dict in workday_status"
|
|
|
+ :key="dict.value"
|
|
|
+ :label="parseInt(dict.value)"
|
|
|
+ >{{dict.label}}</el-radio>
|
|
|
+ </el-radio-group>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="第2日是否工作" prop="day02">
|
|
|
+ <el-radio-group v-model="form.day02">
|
|
|
+ <el-radio
|
|
|
+ v-for="dict in workday_status"
|
|
|
+ :key="dict.value"
|
|
|
+ :label="parseInt(dict.value)"
|
|
|
+ >{{dict.label}}</el-radio>
|
|
|
+ </el-radio-group>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="第3日是否工作" prop="day03">
|
|
|
+ <el-radio-group v-model="form.day03">
|
|
|
+ <el-radio
|
|
|
+ v-for="dict in workday_status"
|
|
|
+ :key="dict.value"
|
|
|
+ :label="parseInt(dict.value)"
|
|
|
+ >{{dict.label}}</el-radio>
|
|
|
+ </el-radio-group>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="第4日是否工作" prop="day04">
|
|
|
+ <el-radio-group v-model="form.day04">
|
|
|
+ <el-radio
|
|
|
+ v-for="dict in workday_status"
|
|
|
+ :key="dict.value"
|
|
|
+ :label="parseInt(dict.value)"
|
|
|
+ >{{dict.label}}</el-radio>
|
|
|
+ </el-radio-group>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="第5日是否工作" prop="day05">
|
|
|
+ <el-radio-group v-model="form.day05">
|
|
|
+ <el-radio
|
|
|
+ v-for="dict in workday_status"
|
|
|
+ :key="dict.value"
|
|
|
+ :label="parseInt(dict.value)"
|
|
|
+ >{{dict.label}}</el-radio>
|
|
|
+ </el-radio-group>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="第6日是否工作" prop="day06">
|
|
|
+ <el-radio-group v-model="form.day06">
|
|
|
+ <el-radio
|
|
|
+ v-for="dict in workday_status"
|
|
|
+ :key="dict.value"
|
|
|
+ :label="parseInt(dict.value)"
|
|
|
+ >{{dict.label}}</el-radio>
|
|
|
+ </el-radio-group>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="第7日是否工作" prop="day07">
|
|
|
+ <el-radio-group v-model="form.day07">
|
|
|
+ <el-radio
|
|
|
+ v-for="dict in workday_status"
|
|
|
+ :key="dict.value"
|
|
|
+ :label="parseInt(dict.value)"
|
|
|
+ >{{dict.label}}</el-radio>
|
|
|
+ </el-radio-group>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="第8日是否工作" prop="day08">
|
|
|
+ <el-radio-group v-model="form.day08">
|
|
|
+ <el-radio
|
|
|
+ v-for="dict in workday_status"
|
|
|
+ :key="dict.value"
|
|
|
+ :label="parseInt(dict.value)"
|
|
|
+ >{{dict.label}}</el-radio>
|
|
|
+ </el-radio-group>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="第9日是否工作" prop="day09">
|
|
|
+ <el-radio-group v-model="form.day09">
|
|
|
+ <el-radio
|
|
|
+ v-for="dict in workday_status"
|
|
|
+ :key="dict.value"
|
|
|
+ :label="parseInt(dict.value)"
|
|
|
+ >{{dict.label}}</el-radio>
|
|
|
+ </el-radio-group>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="第10日是否工作" prop="day10">
|
|
|
+ <el-radio-group v-model="form.day10">
|
|
|
+ <el-radio
|
|
|
+ v-for="dict in workday_status"
|
|
|
+ :key="dict.value"
|
|
|
+ :label="parseInt(dict.value)"
|
|
|
+ >{{dict.label}}</el-radio>
|
|
|
+ </el-radio-group>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="第11日是否工作" prop="day11">
|
|
|
+ <el-radio-group v-model="form.day11">
|
|
|
+ <el-radio
|
|
|
+ v-for="dict in workday_status"
|
|
|
+ :key="dict.value"
|
|
|
+ :label="parseInt(dict.value)"
|
|
|
+ >{{dict.label}}</el-radio>
|
|
|
+ </el-radio-group>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="第12日是否工作" prop="day12">
|
|
|
+ <el-radio-group v-model="form.day12">
|
|
|
+ <el-radio
|
|
|
+ v-for="dict in workday_status"
|
|
|
+ :key="dict.value"
|
|
|
+ :label="parseInt(dict.value)"
|
|
|
+ >{{dict.label}}</el-radio>
|
|
|
+ </el-radio-group>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="第13日是否工作" prop="day13">
|
|
|
+ <el-radio-group v-model="form.day13">
|
|
|
+ <el-radio
|
|
|
+ v-for="dict in workday_status"
|
|
|
+ :key="dict.value"
|
|
|
+ :label="parseInt(dict.value)"
|
|
|
+ >{{dict.label}}</el-radio>
|
|
|
+ </el-radio-group>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="第14日是否工作" prop="day14">
|
|
|
+ <el-radio-group v-model="form.day14">
|
|
|
+ <el-radio
|
|
|
+ v-for="dict in workday_status"
|
|
|
+ :key="dict.value"
|
|
|
+ :label="parseInt(dict.value)"
|
|
|
+ >{{dict.label}}</el-radio>
|
|
|
+ </el-radio-group>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="第15日是否工作" prop="day15">
|
|
|
+ <el-radio-group v-model="form.day15">
|
|
|
+ <el-radio
|
|
|
+ v-for="dict in workday_status"
|
|
|
+ :key="dict.value"
|
|
|
+ :label="parseInt(dict.value)"
|
|
|
+ >{{dict.label}}</el-radio>
|
|
|
+ </el-radio-group>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="第16日是否工作" prop="day16">
|
|
|
+ <el-radio-group v-model="form.day16">
|
|
|
+ <el-radio
|
|
|
+ v-for="dict in workday_status"
|
|
|
+ :key="dict.value"
|
|
|
+ :label="parseInt(dict.value)"
|
|
|
+ >{{dict.label}}</el-radio>
|
|
|
+ </el-radio-group>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="第17日是否工作" prop="day17">
|
|
|
+ <el-radio-group v-model="form.day17">
|
|
|
+ <el-radio
|
|
|
+ v-for="dict in workday_status"
|
|
|
+ :key="dict.value"
|
|
|
+ :label="parseInt(dict.value)"
|
|
|
+ >{{dict.label}}</el-radio>
|
|
|
+ </el-radio-group>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="第18日是否工作" prop="day18">
|
|
|
+ <el-radio-group v-model="form.day18">
|
|
|
+ <el-radio
|
|
|
+ v-for="dict in workday_status"
|
|
|
+ :key="dict.value"
|
|
|
+ :label="parseInt(dict.value)"
|
|
|
+ >{{dict.label}}</el-radio>
|
|
|
+ </el-radio-group>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="第19日是否工作" prop="day19">
|
|
|
+ <el-radio-group v-model="form.day19">
|
|
|
+ <el-radio
|
|
|
+ v-for="dict in workday_status"
|
|
|
+ :key="dict.value"
|
|
|
+ :label="parseInt(dict.value)"
|
|
|
+ >{{dict.label}}</el-radio>
|
|
|
+ </el-radio-group>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="第20日是否工作" prop="day20">
|
|
|
+ <el-radio-group v-model="form.day20">
|
|
|
+ <el-radio
|
|
|
+ v-for="dict in workday_status"
|
|
|
+ :key="dict.value"
|
|
|
+ :label="parseInt(dict.value)"
|
|
|
+ >{{dict.label}}</el-radio>
|
|
|
+ </el-radio-group>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="第21日是否工作" prop="day21">
|
|
|
+ <el-radio-group v-model="form.day21">
|
|
|
+ <el-radio
|
|
|
+ v-for="dict in workday_status"
|
|
|
+ :key="dict.value"
|
|
|
+ :label="parseInt(dict.value)"
|
|
|
+ >{{dict.label}}</el-radio>
|
|
|
+ </el-radio-group>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="第22日是否工作" prop="day22">
|
|
|
+ <el-radio-group v-model="form.day22">
|
|
|
+ <el-radio
|
|
|
+ v-for="dict in workday_status"
|
|
|
+ :key="dict.value"
|
|
|
+ :label="parseInt(dict.value)"
|
|
|
+ >{{dict.label}}</el-radio>
|
|
|
+ </el-radio-group>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="第23日是否工作" prop="day23">
|
|
|
+ <el-radio-group v-model="form.day23">
|
|
|
+ <el-radio
|
|
|
+ v-for="dict in workday_status"
|
|
|
+ :key="dict.value"
|
|
|
+ :label="parseInt(dict.value)"
|
|
|
+ >{{dict.label}}</el-radio>
|
|
|
+ </el-radio-group>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="第24日是否工作" prop="day24">
|
|
|
+ <el-radio-group v-model="form.day24">
|
|
|
+ <el-radio
|
|
|
+ v-for="dict in workday_status"
|
|
|
+ :key="dict.value"
|
|
|
+ :label="parseInt(dict.value)"
|
|
|
+ >{{dict.label}}</el-radio>
|
|
|
+ </el-radio-group>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="第25日是否工作" prop="day25">
|
|
|
+ <el-radio-group v-model="form.day25">
|
|
|
+ <el-radio
|
|
|
+ v-for="dict in workday_status"
|
|
|
+ :key="dict.value"
|
|
|
+ :label="parseInt(dict.value)"
|
|
|
+ >{{dict.label}}</el-radio>
|
|
|
+ </el-radio-group>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="第26日是否工作" prop="day26">
|
|
|
+ <el-radio-group v-model="form.day26">
|
|
|
+ <el-radio
|
|
|
+ v-for="dict in workday_status"
|
|
|
+ :key="dict.value"
|
|
|
+ :label="parseInt(dict.value)"
|
|
|
+ >{{dict.label}}</el-radio>
|
|
|
+ </el-radio-group>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="第27日是否工作" prop="day27">
|
|
|
+ <el-radio-group v-model="form.day27">
|
|
|
+ <el-radio
|
|
|
+ v-for="dict in workday_status"
|
|
|
+ :key="dict.value"
|
|
|
+ :label="parseInt(dict.value)"
|
|
|
+ >{{dict.label}}</el-radio>
|
|
|
+ </el-radio-group>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="第28日是否工作" prop="day28">
|
|
|
+ <el-radio-group v-model="form.day28">
|
|
|
+ <el-radio
|
|
|
+ v-for="dict in workday_status"
|
|
|
+ :key="dict.value"
|
|
|
+ :label="parseInt(dict.value)"
|
|
|
+ >{{dict.label}}</el-radio>
|
|
|
+ </el-radio-group>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="第29日是否工作" prop="day29">
|
|
|
+ <el-radio-group v-model="form.day29">
|
|
|
+ <el-radio
|
|
|
+ v-for="dict in workday_status"
|
|
|
+ :key="dict.value"
|
|
|
+ :label="parseInt(dict.value)"
|
|
|
+ >{{dict.label}}</el-radio>
|
|
|
+ </el-radio-group>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="第30日是否工作" prop="day30">
|
|
|
+ <el-radio-group v-model="form.day30">
|
|
|
+ <el-radio
|
|
|
+ v-for="dict in workday_status"
|
|
|
+ :key="dict.value"
|
|
|
+ :label="parseInt(dict.value)"
|
|
|
+ >{{dict.label}}</el-radio>
|
|
|
+ </el-radio-group>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="8">
|
|
|
+ <el-form-item label="第31日是否工作" prop="day31">
|
|
|
+ <el-radio-group v-model="form.day31">
|
|
|
+ <el-radio
|
|
|
+ v-for="dict in workday_status"
|
|
|
+ :key="dict.value"
|
|
|
+ :label="parseInt(dict.value)"
|
|
|
+ >{{dict.label}}</el-radio>
|
|
|
+ </el-radio-group>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ </el-form>
|
|
|
+ <div slot="footer" class="dialog-footer">
|
|
|
+ <el-button type="primary" @click="submitForm">确 定</el-button>
|
|
|
+ <el-button @click="cancel">取 消</el-button>
|
|
|
+ </div>
|
|
|
+ </el-dialog>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script>
|
|
|
+import { listSchedule, getSchedule, delSchedule, addSchedule, updateSchedule } from "@/api/aps_workday_schedule/schedule";
|
|
|
+
|
|
|
+export default {
|
|
|
+ name: "Schedule",
|
|
|
+ // dicts: ['workday_status','year_select','month_select'],
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ workday_status:[{"label":"工作","value":"1"},{"label":"休息","value":"0"},],
|
|
|
+ year_select:[
|
|
|
+ {"value":2025},{"value":2026},{"value":2027},{"value":2028}
|
|
|
+ ],
|
|
|
+ month_select:[
|
|
|
+ {"value":1},{"value":2},{"value":3},{"value":4},
|
|
|
+ {"value":5},{"value":6},{"value":7},{"value":8},
|
|
|
+ {"value":9},{"value":10},{"value":11},{"value":12},
|
|
|
+ ],
|
|
|
+ isAdd:1,
|
|
|
+ // 遮罩层
|
|
|
+ loading: true,
|
|
|
+ // 选中数组
|
|
|
+ ids: [],
|
|
|
+ // 非单个禁用
|
|
|
+ single: true,
|
|
|
+ // 非多个禁用
|
|
|
+ multiple: true,
|
|
|
+ // 显示搜索条件
|
|
|
+ showSearch: true,
|
|
|
+ // 总条数
|
|
|
+ total: 0,
|
|
|
+ // APS月度班制排班表格数据
|
|
|
+ scheduleList: [],
|
|
|
+ //年份选择列表
|
|
|
+ yearOptions:[],
|
|
|
+ //月份选择列表
|
|
|
+ monthOptions:[],
|
|
|
+ // 弹出层标题
|
|
|
+ title: "",
|
|
|
+ // 是否显示弹出层
|
|
|
+ open: false,
|
|
|
+
|
|
|
+ // 查询参数
|
|
|
+ queryParams: {
|
|
|
+ pageNum: 1,
|
|
|
+ pageSize: 10,
|
|
|
+ // workdayId: null,
|
|
|
+ year: null,
|
|
|
+ month: null,
|
|
|
+
|
|
|
+ workdayCount: null
|
|
|
+ },
|
|
|
+ // 表单参数
|
|
|
+ form: {},
|
|
|
+ // 表单校验
|
|
|
+ rules: {
|
|
|
+ // workdayId: [
|
|
|
+ // { required: true, message: "工作日ID不能为空", trigger: "blur" }
|
|
|
+ // ],
|
|
|
+ year: [
|
|
|
+ { required: true, message: "年份不能为空", trigger: "blur" }
|
|
|
+ ],
|
|
|
+ month: [
|
|
|
+ { required: true, message: "月份不能为空", trigger: "blur" }
|
|
|
+ ],
|
|
|
+ }
|
|
|
+ };
|
|
|
+ },
|
|
|
+ created() {
|
|
|
+ this.getList();
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ /** 查询APS月度班制排班列表 */
|
|
|
+ getList() {
|
|
|
+ this.loading = true;
|
|
|
+ listSchedule(this.queryParams).then(response => {
|
|
|
+ this.scheduleList = response.data;
|
|
|
+ // this.scheduleList.forEach(item=>{
|
|
|
+
|
|
|
+ // })
|
|
|
+ this.total = response.total;
|
|
|
+ this.loading = false;
|
|
|
+ });
|
|
|
+ },
|
|
|
+ // 取消按钮
|
|
|
+ cancel() {
|
|
|
+ this.open = false;
|
|
|
+ this.reset();
|
|
|
+ },
|
|
|
+ // 表单重置
|
|
|
+ reset() {
|
|
|
+ this.form = {
|
|
|
+ sequenceId: null,
|
|
|
+ // workdayId: null,
|
|
|
+ year: null,
|
|
|
+ month: null,
|
|
|
+ day01: 1,
|
|
|
+ day02: 1,
|
|
|
+ day03: 1,
|
|
|
+ day04: 1,
|
|
|
+ day05: 1,
|
|
|
+ day06: 1,
|
|
|
+ day07: 1,
|
|
|
+ day08: 1,
|
|
|
+ day09: 1,
|
|
|
+ day10: 1,
|
|
|
+ day11: 1,
|
|
|
+ day12: 1,
|
|
|
+ day13: 1,
|
|
|
+ day14: 1,
|
|
|
+ day15: 1,
|
|
|
+ day16: 1,
|
|
|
+ day17: 1,
|
|
|
+ day18: 1,
|
|
|
+ day19: 1,
|
|
|
+ day20: 1,
|
|
|
+ day21: 1,
|
|
|
+ day22: 1,
|
|
|
+ day23: 1,
|
|
|
+ day24: 1,
|
|
|
+ day25: 1,
|
|
|
+ day26: 1,
|
|
|
+ day27: 1,
|
|
|
+ day28: 1,
|
|
|
+ day29: 1,
|
|
|
+ day30: 1,
|
|
|
+ day31: 1,
|
|
|
+ workdayCount: null
|
|
|
+ };
|
|
|
+
|
|
|
+ },
|
|
|
+ /** 搜索按钮操作 */
|
|
|
+ handleQuery() {
|
|
|
+ this.queryParams.pageNum = 1;
|
|
|
+ this.getList();
|
|
|
+ },
|
|
|
+ /** 重置按钮操作 */
|
|
|
+ resetQuery() {
|
|
|
+ this.resetForm("queryForm");
|
|
|
+ this.handleQuery();
|
|
|
+ },
|
|
|
+ // 多选框选中数据
|
|
|
+ handleSelectionChange(selection) {
|
|
|
+ this.ids = selection.map(item => item.sequenceId)
|
|
|
+ this.single = selection.length!==1
|
|
|
+ this.multiple = !selection.length
|
|
|
+ },
|
|
|
+ /** 新增按钮操作 */
|
|
|
+ handleAdd() {
|
|
|
+ this.reset();
|
|
|
+ this.isAdd =1;
|
|
|
+ this.open = true;
|
|
|
+ this.title = "添加APS月度班制排班";
|
|
|
+ },
|
|
|
+ /** 修改按钮操作 */
|
|
|
+ handleUpdate(row) {
|
|
|
+ this.reset();
|
|
|
+ this.isAdd = 0;
|
|
|
+ const sequenceId = row.sequenceId || this.ids
|
|
|
+ getSchedule(sequenceId).then(response => {
|
|
|
+ let obj = response.data.data;
|
|
|
+ this.form = obj;
|
|
|
+ this.open = true;
|
|
|
+ this.title = "修改APS月度班制排班";
|
|
|
+ });
|
|
|
+ },
|
|
|
+ /** 提交按钮 */
|
|
|
+ submitForm() {
|
|
|
+ this.$refs["form"].validate(valid => {
|
|
|
+ if (valid) {
|
|
|
+ if (this.form.sequenceId != null) {
|
|
|
+ delete this.form.workdayCount;
|
|
|
+ updateSchedule(this.form).then(response => {
|
|
|
+ this.$message.success("修改成功");
|
|
|
+ this.open = false;
|
|
|
+ this.getList();
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ addSchedule(this.form).then(response => {
|
|
|
+ this.$message.success("新增成功");
|
|
|
+ this.open = false;
|
|
|
+ this.getList();
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
+ /** 删除按钮操作 */
|
|
|
+ handleDelete(row) {
|
|
|
+ const sequenceIds = row.sequenceId || this.ids;
|
|
|
+ this.$confirm('是否确认删除APS月度班制排班编号为"' + sequenceIds + '"的数据项?').then(function() {
|
|
|
+ return delSchedule(sequenceIds);
|
|
|
+ }).then(() => {
|
|
|
+ this.getList();
|
|
|
+ this.$message.success("删除成功");
|
|
|
+ }).catch(() => {});
|
|
|
+ },
|
|
|
+ /** 导出按钮操作 */
|
|
|
+ handleExport() {
|
|
|
+ // this.download('aps_workday_schedule/schedule/export', {
|
|
|
+ // ...this.queryParams
|
|
|
+ // }, `schedule_${new Date().getTime()}.xlsx`)
|
|
|
+ },
|
|
|
+ // 用户状态修改
|
|
|
+ handleStatusChange(row,index) {
|
|
|
+ eval("row.status="+"row.day"+(index>9?index:"0"+index));
|
|
|
+ let text = row.status === "0" ? "正常" : "休息";
|
|
|
+ var workDay = "day"+(index>9?index:"0"+index);
|
|
|
+ this.$confirm('确认要"' + text + '""' + index + '"工作日状态吗?').then(function() {
|
|
|
+ var node = {
|
|
|
+ "sequenceId":row.sequenceId,
|
|
|
+ [workDay]:row.status,
|
|
|
+ }
|
|
|
+
|
|
|
+ return updateSchedule(node);
|
|
|
+ }).then(() => {
|
|
|
+ this.$message.success(text + "成功");
|
|
|
+ }).catch(function() {
|
|
|
+ row.status = row.status === "0" ? "1" : "0";
|
|
|
+ });
|
|
|
+ },
|
|
|
+ }
|
|
|
+};
|
|
|
+</script>
|