| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142 |
- <template>
- <div class="business">
- <Head :headText="headText"></Head>
- <div class="count-top-right">
- <date-temp :types="1" @pickerVal="pickerVal"></date-temp>
- </div>
- <el-calendar class="doBusinessContainer" :first-day-of-week="7">
- <template slot="dateCell" slot-scope="{date, data}">
- <div class="time-duration">
- <el-time-picker
- is-range
- v-model="value1"
- size="mini"
- range-separator="-"
- start-placeholder="开始时间"
- end-placeholder="结束时间"
- placeholder="选择时间范围"
- format="hh:mm"
- @change="setHours"
- ></el-time-picker>
- </div>
- <div class="dataJoin">{{ data.day.split('-').slice(2).join('')}}</div>
- </template>
- </el-calendar>
- </div>
- </template>
- <script>
- import Head from "../main/index";
- import DateTemp from "../evaluate/dateTemp";
- import {queryHours,updateHours} from '@/api/doBusiness/business.js'
- export default {
- data() {
- return {
- headText: "营业时间调整",
- value1: [new Date(), new Date()],
- date:""
- };
- },
- components: {
- Head,
- DateTemp
- },
- methods: {
- pickerVal(val) {
- console.log(val);
- this.date = val
- },
- getHours(){
- let params = {
- postParams:{
- criteria:{
- projectId:'Pj4419000005',
- date:'201902'
- }
- }
- }
- queryHours(params).then(res=>{
- console.log(res)
- })
- },
- setHours(){
- let params = {
- postParams:{
- projectId:'Pj4419000005',
- date:'201902',
- openTime:'080000',
- endTime:'220000'
- }
- }
- updateHours(params).then(res=>{
- console.log(res)
- })
- }
- },
- mounted(){
- this.getHours()
- }
- };
- </script>
- <style lang="scss" scoped>
- .count-top-right {
- width: 148px;
- padding: 16px;
- }
- .doBusinessContainer {
- margin-top: 20px;
- background: #fff;
- .time-duration {
- .el-input__inner {
- width: 134px;
- padding: 0;
- border: none;
- font-size: 14px;
- font-family: PingFangSC-Regular, PingFang SC;
- font-weight: 400;
- color: rgba(100, 108, 115, 1);
- line-height: 24px;
- padding: 1px 12px;
- height: 24px;
- background: rgba(245, 246, 247, 1);
- border-radius: 12px;
- margin-right: 17px;
- }
- .el-range-editor .el-range-input {
- border: none;
- background: rgba(245, 246, 247, 1);
- }
- }
- .dataJoin {
- height: 22px;
- font-size: 16px;
- font-family: PingFangSC-Regular, PingFang SC;
- font-weight: 400;
- color: rgba(31, 36, 41, 1);
- line-height: 22px;
- }
- }
- </style>
- <style lang="scss">
- .business {
- .el-calendar-table thead th {
- text-align: right;
- height: 20px;
- font-size: 14px;
- font-family: PingFangSC-Regular, PingFang SC;
- font-weight: 400;
- color: rgba(100, 106, 115, 1);
- line-height: 20px;
- padding-right: 15px;
- }
- .el-calendar__header {
- display: none;
- }
- .el-range-editor--mini .el-range-input {
- background: #f5f6f7;
- }
- .el-calendar-table .el-calendar-day {
- display: flex;
- }
- }
- </style>
|