Commit 580ce5f9 authored by hezhen's avatar hezhen

Merge branch 'base-modify' of http://113.105.137.151:22280/youjj/cloud-platform-ui into base-modify

parents f201ba17 ad5dd677
import fetch from 'utils/fetch';
export function getDispatchList(query) {
return fetch({
url: '/vehicle/dispatch/page',
method: 'get',
params: query
});
}
\ No newline at end of file
...@@ -77,29 +77,29 @@ export const constantRouterMap = [{ ...@@ -77,29 +77,29 @@ export const constantRouterMap = [{
component: _import('error/401'), component: _import('error/401'),
hidden: true hidden: true
}, },
{ // {
// path: '/',
// component: Layout,
// redirect: '/dashboard',
// name: '首页',
// hidden: true,
// children: [{
// path: 'dashboard',
// component: _import('dashboard/index')
// }]
// },
{
path: '/', path: '/',
component: Layout, component: Layout,
redirect: '/dashboard', redirect: '/index',
name: '首页', name: '首页',
hidden: true, hidden: true,
children: [{ children: [{
path: 'dashboard', path: 'index',
component: _import('dashboard/index') component: _import('index/index')
}] }]
}, },
// {
// path: '/',
// component: Layout,
// redirect: '/baseManager/userManager',
// name: '首页',
// hidden: true,
// children: [{
// path: 'userManager',
// component: _import('admin/user/index')
// }]
// },
{ {
path: '/introduction', path: '/introduction',
component: Layout, component: Layout,
......
<!--车辆排班 保养弹框-->
<template>
<el-dialog :title="currentItem.title" :visible.sync="jinyong" width="10%">
<el-form :model="currentItem" ref="currentItem" label-width="120px">
<el-form-item label="车牌号:">
<span>{{currentItem.item.numberPlate}}</span>
</el-form-item>
<el-form-item label="当前停靠公司:">
<span>{{currentItem.item.parkCompanyName}}</span>
</el-form-item>
<el-form-item label="还车公司:">
<span>{{currentItem.ii.vehicleBookRecord.retCompanyName}}</span>
</el-form-item>
<el-form-item label="申请人:">
<span>{{currentItem.ii.vehicleBookRecord.bookUserName}}</span>
</el-form-item>
<el-form-item label="禁用时间:">
<span>{{currentItem.ii.vehicleBookRecord.bookStartDate}}~{{currentItem.ii.vehicleBookRecord.bookEndDate}}</span>
</el-form-item>
<el-form-item label="禁用说明:">
<span>{{currentItem.ii.vehicleBookRecord.remark}}</span>
</el-form-item>
</el-form>
<!-- <div slot="footer" class="dialog-footer">
<el-button @click="cancel()">取消禁用</el-button>
</div> -->
</el-dialog>
</template>
<script>
import {mapGetters} from 'vuex';
import ElRow from "element-ui/packages/row/src/row";
import ElCol from "element-ui/packages/col/src/col";
import ElFormItem from "../../../node_modules/element-ui/packages/form/src/form-item.vue";
import {
agreeBook,
cancleBook,
rejectBook
} from 'api/vehicle/vehicleSchedulManage';
export default {
components: {
ElFormItem,
ElCol,
ElRow},
props: ["currentItem"],
name: 'disableModal',
data() {
return {
jinyong:false,
}
},
created() {
},
watch: {
jinyong(newValue, oldValue){
if(!newValue){
this.$emit("jinyongDialogEvent", false);
}
},
},
mounted() {
this.jinyong = true;
},
methods: {
/**
* 弹框-取消
* */
cancel() {
console.log("取消禁用");
cancleBook(this.currentItem.ii.vehicleBookRecord.id).then(response => {this.$emit("jinyongDialogEvent", true);});
}
}
}
</script>
This diff is collapsed.
<!--车辆排班 保养弹框-->
<template>
<el-dialog :title="currentItem.title" :visible.sync="zhanlan" width="10%">
<el-form :model="currentItem" ref="currentItem" label-width="120px">
<el-form-item label="车牌号:">
<span>{{currentItem.item.numberPlate}}</span>
</el-form-item>
<el-form-item label="所属公司:">
<span>{{currentItem.item.subordinateBranchName}}</span>
</el-form-item>
<el-form-item label="申请人:">
<span>{{currentItem.ii.vehicleBookRecord.bookUserName}}</span>
</el-form-item>
<el-form-item label="当前停靠公司:">
<span>{{currentItem.item.parkCompanyName}}</span>
</el-form-item>
<el-form-item label="还车公司:">
<span>{{currentItem.ii.vehicleBookRecord.retCompanyName}}</span>
</el-form-item>
<el-form-item label="预定时间:">
<span>{{currentItem.ii.vehicleBookRecord.bookStartDate}}~{{currentItem.ii.vehicleBookRecord.bookEndDate}}</span>
</el-form-item>
<el-form-item label="用途:">
<span>{{currentItem.title == "展览用车"?"展览": currentItem.title == "预定用车"?"预定":""}}</span>
</el-form-item>
<el-form-item label="申请说明:">
<span>{{currentItem.ii.vehicleBookRecord.remark}}</span>
</el-form-item>
</el-form>
<!-- <div slot="footer" v-if='currentItem.title == "展览用车" && currentItem.ii.vehicleBookRecord.status==2' class="dialog-footer">
<el-button @click="cancel()">取消用车</el-button>
</div>
<div slot="footer" v-if='currentItem.title == "预定用车" && currentItem.ii.vehicleBookRecord.status==1' class="dialog-footer">
<el-button type="primary" @click="agree()">同 意</el-button>
<el-button @click="notAgree()">不同意</el-button>
</div> -->
</el-dialog>
</template>
<script>
import {mapGetters} from 'vuex';
import ElRow from "element-ui/packages/row/src/row";
import ElCol from "element-ui/packages/col/src/col";
import ElFormItem from "../../../node_modules/element-ui/packages/form/src/form-item.vue";
import {
agreeBook,
cancleBook,
rejectBook
} from 'api/vehicle/vehicleSchedulManage';
export default {
components: {
ElFormItem,
ElCol,
ElRow},
props: ["currentItem"],
name: 'vehicleExhibitionModal',
data() {
return {
zhanlan:false,
}
},
created() {
console.log(this.currentItem);
},
watch: {
zhanlan(newValue, oldValue){
if(!newValue){
this.$emit("zhanlanDialogEvent", false);
}
},
},
mounted() {
this.zhanlan = true;
},
methods: {
/**
* 弹框-取消
* */
cancel() {
console.log("展览取消用车");
cancleBook(this.currentItem.ii.vehicleBookRecord.id).then(response => {this.$emit("zhanlanDialogEvent", true);});
},
/**
* 确定用车
* */
handelOk(){
console.log("展览确定用车");
agreeBook(this.currentItem.ii.vehicleBookRecord.id).then(response => {this.$emit("zhanlanDialogEvent", true);});
},
/**
* 同意
*/
agree(){
console.log("同意");
agreeBook(this.currentItem.ii.vehicleBookRecord.id).then(response => {this.$emit("zhanlanDialogEvent", true);});
},
/**
* 不同意
*/
notAgree(){
console.log("不同意");
rejectBook(this.currentItem.ii.vehicleBookRecord.id).then(response => {this.$emit("zhanlanDialogEvent", true);});
},
}
}
</script>
<!--车辆排班 保养弹框-->
<template>
<el-dialog title="保养用车" :visible.sync="baoyang" width="10%">
<el-form :model="currentItem" ref="currentItem" label-width="120px">
<el-form-item label="车牌号:">
<span>{{currentItem.item.numberPlate}}</span>
</el-form-item>
<el-form-item label="所属公司:">
<span>{{currentItem.item.subordinateBranchName}}</span>
</el-form-item>
<el-form-item label="当前停靠公司:">
<span>{{currentItem.item.parkCompanyName}}</span>
</el-form-item>
<el-form-item label="还车公司:">
<span>{{currentItem.ii.vehicleBookRecord.retCompanyName}}</span>
</el-form-item>
<el-form-item label="保养人:">
<span>{{currentItem.ii.vehicleBookRecord.bookUserName}}</span>
</el-form-item>
<el-form-item label="预定时间:">
<span>{{currentItem.ii.vehicleBookRecord.bookStartDate}}~{{currentItem.ii.vehicleBookRecord.bookEndDate}}</span>
</el-form-item>
<el-form-item label="用途:">
<span>保养</span>
</el-form-item>
<el-form-item label="保养项目:">
<span></span>
</el-form-item>
</el-form>
<!-- <div slot="footer" class="dialog-footer" v-if="currentItem.ii.vehicleBookRecord.status==2">
<el-button @click="cancel()">取消用车</el-button>
</div>
<div slot="footer" v-if='currentItem.ii.vehicleBookRecord.status==1' class="dialog-footer">
<el-button type="primary" @click="agree()">同 意</el-button>
<el-button @click="notAgree()">不同意</el-button>
</div> -->
</el-dialog>
</template>
<script>
import {mapGetters} from 'vuex';
import ElRow from "element-ui/packages/row/src/row";
import ElCol from "element-ui/packages/col/src/col";
import ElFormItem from "../../../node_modules/element-ui/packages/form/src/form-item.vue";
import {
agreeBook,
cancleBook,
rejectBook
} from 'api/vehicle/vehicleSchedulManage';
export default {
components: {
ElFormItem,
ElCol,
ElRow},
props: ["currentItem"],
name: 'vehicleMaintenanceModal',
data() {
return {
baoyang:false,
}
},
created() {
console.log(this.currentItem);
},
watch: {
baoyang(newValue, oldValue){
if(!newValue){
this.$emit("baoyangDialogEvent", false);
}
},
},
mounted() {
this.baoyang = true;
},
methods: {
/**
* 保养-弹框-取消
* */
cancel() {
cancleBook(this.currentItem.ii.vehicleBookRecord.id).then(response => {this.$emit("zhanlanDialogEvent", true);});
this.$emit("baoyangDialogEvent", true);
},
/**
* 同意
*/
agree(){
console.log("同意");
agreeBook(this.currentItem.ii.vehicleBookRecord.id).then(response => {this.$emit("zhanlanDialogEvent", true);});
},
/**
* 不同意
*/
notAgree(){
console.log("不同意");
rejectBook(this.currentItem.ii.vehicleBookRecord.id).then(response => {this.$emit("zhanlanDialogEvent", true);});
},
}
}
</script>
<!--车辆排班 保养弹框-->
<template>
<el-dialog title="安排用车" :visible.sync="anpai" class="user-car">
<el-form :model="form" ref="form" :rules="rules" label-width="140px">
<el-form-item label="车牌号">
<span>{{currentItem.item.numberPlate}}</span>
</el-form-item>
<el-form-item label="车型名称">
<span>{{currentItem.item.vehicleModel.name}}</span>
</el-form-item>
<el-row>
<el-col :span="8">
<el-form-item label="当前停靠公司:">
<span>{{currentItem.item.parkCompanyName}}</span>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="所属公司">
<span>{{currentItem.item.subordinateBranchName}}</span>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="公里数">
<span>{{currentItem.item.maintenanceMileage}}km</span>
</el-form-item>
</el-col>
</el-row>
<el-form-item label="房车配置">
<span>{{currentItem.item.vehicleModel.keyword}}</span>
</el-form-item>
<el-form-item label="选择时间" prop="times">
<el-date-picker
v-model="form.times"
type="datetimerange"
:picker-options="pickerOptions0"
placeholder="选择时间范围">
</el-date-picker>
</el-form-item>
<el-form-item label="还车分公司" prop="arrivalBranchCompanyName">
<el-autocomplete
class="inline-input"
v-model="form.arrivalBranchCompanyName"
:fetch-suggestions="querySearch"
placeholder="请输入内容"
@select="handleSelectArrivalCompanyName"
></el-autocomplete>
</el-form-item>
<el-form-item label="用途" prop="bookType">
<!--bookType 2-租车、1-分公司使用、3-维修、4、展览、5、旅游、6、保养、7、预约中、8、禁用-->
<el-select class="filter-item" v-model="form.bookType" placeholder="请选择用途">
<el-option label="展览" value="4"></el-option>
<el-option label="房车游" value="5"></el-option>
<el-option label="保养" value="6"></el-option>
<el-option label="禁用" value="8"></el-option>
<!--<el-option v-for="item in getAllUseType() " :key="item.code" :label="item.val"-->
<!--:value="item.code"></el-option>-->
</el-select>
</el-form-item>
<el-form-item label="使用人" prop="vehicleUsername">
<el-input v-model="form.vehicleUsername" placeholder="请输入使用人"></el-input>
</el-form-item>
<el-form-item label="使用人联系方式" prop="vehicleUserPhone">
<el-input v-model="form.vehicleUserPhone" placeholder="请输入使用人联系方式"></el-input>
</el-form-item>
<el-form-item label="说明">
<el-input v-model="form.remark" :rows="3" placeholder="请输入说明"></el-input>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="cancel()">取消</el-button>
<el-button type="primary" @click="handelOk('form')">确 定</el-button>
</div>
</el-dialog>
</template>
<style>
.user-car .el-row{
margin-bottom: 0;
}
</style>
<script>
import {mapGetters} from 'vuex';
import {
VEHICLE_CONSTANT_VEHICLE_BRAND,
VEHICLE_CONSTANT_VEHICLE_USE,
VEHICLE_CONSTANT_BRAND_CODE_UNKOWN,
BELONG_TO_TYPE_OWN,
VEHICLE_CONSTANT_USE_TYPE_UNKOWN,
VEHICLE_CONSTANT_STATUS_NORMAL
} from '../../store/modules/baseInfo';
import {
getConstantByTypeAndCode,
getConstantListByType,
getAllInsuranceCompany,
getInsuranceCompany
} from 'api/base_info/constant/';
import {
getAllCompany,
getAll
} from 'api/base_info/branch_company/';
import {
bookPlan
} from 'api/vehicle/vehicleSchedulManage';
import ElRow from "element-ui/packages/row/src/row";
import ElCol from "element-ui/packages/col/src/col";
import ElFormItem from "../../../node_modules/element-ui/packages/form/src/form-item.vue";
import {
formatDate
} from 'utils/dateFormattor';
export default {
components: {
ElFormItem,
ElCol,
ElRow},
props: ["currentItem"],
name: 'vehiclePlanModal',
data() {
return {
pickerOptions0: {
disabledDate(time) {
return time.getTime() < Date.now() - 8.64e7;
}
},
anpai:false,
allCompaniesArr:[],
form:{
remark: "",
vehicleUsername: "",
arrivalBranchCompanyId: undefined,//还车分公司id
arrivalBranchCompanyName: "",//还车分公司名称
vehicleUserPhone:"",//使用人联系电话
bookType: undefined,//用途
times: [],
},
rules: {
vehicleUsername: [
{
type: 'string',
required: true,
message: '请输入使用人姓名',
trigger: 'blur'
},
{
min: 0,
max: 20,
message: '长度小于 20 个字符',
trigger: 'blur'
}
],
arrivalBranchCompanyName:{
type: 'string',
required: true,
message: '请选择还车公司',
trigger: 'change'
},
vehicleUserPhone:{
type: 'string',
required: true,
message: '请输入使用人联系方式',
trigger: 'blur'
},
bookType:{
type: 'string',
required: true,
message: '请选择用途',
trigger: 'change'
},
times: {
required: true,
message: '请选择时间',
}
}
}
},
created() {
console.log(this.currentItem);
getAll()
.then(response => {
this.allCompaniesArr = response.data;
})
getAllCompany(codeAndBranchCompany => {
this.allCompanies = codeAndBranchCompany;
});
},
watch: {
anpai(newValue, oldValue){
if(!newValue){
this.$emit("anpaiDialogEvent", false);
}
},
},
mounted() {
this.anpai = true;
},
methods: {
/**
* 还车分公司
*/
handleSelectArrivalCompanyName(item){
this.form.arrivalBranchCompanyId = item.id;
this.form.arrivalBranchCompanyName = item.name;
console.log(item);
},
querySearch(queryString, cb) {
let selectArry = [];
this.allCompaniesArr.map(function(item){
item.value = item.name;
selectArry.push(item);
});
this.selectArry = selectArry;
var results = queryString ? selectArry.filter(this.createFilter(queryString)) : selectArry;
// 调用 callback 返回建议列表的数据
cb(results);
},
createFilter(queryString) {
return (restaurant) => {
return (restaurant.name.indexOf(queryString.toLowerCase()) != -1);
};
},
/**
* 弹框-取消
* */
cancel() {
this.$emit("anpaiDialogEvent", false);
},
/**
* 确定用车
* */
handelOk(formName){
const set = this.$refs;
console.log(this.form.times);
set[formName].validate(valid => {
if (valid) {
let params = {
vehicleId:this.currentItem.item.id,
bookStartDate: formatDate(this.form.times[0], "yyyy-MM-dd hh")+":00:00",//预定开始时间
bookEndDate: formatDate(this.form.times[1], "yyyy-MM-dd hh")+":00:00",//预定结束时间
retCompany: this.form.arrivalBranchCompanyId,//还车分公司
bookType: this.form.bookType,//预定车辆用途类型
vehicleUsername: this.form.vehicleUsername,//使用人姓名
vehicleUserPhone: this.form.vehicleUserPhone,//使用人电话
remark: this.form.remark//说明
};
bookPlan(params).then(response => {
if (response.status === 200) {
this.$emit("anpaiDialogEvent", true);
} else {
this.$notify({
title: '失败',
message: '操作失败!',
type: 'error',
duration: 2000
});
}
})
}
})
},
}
}
</script>
This diff is collapsed.
This diff is collapsed.
...@@ -91,7 +91,7 @@ ...@@ -91,7 +91,7 @@
</div> </div>
<!--车辆排班--> <!--车辆排班-->
<!--bookType 1-租车、2-分公司使用、3-维修、4、展览、5、旅游、6、保养、7、预约中、8、禁用--> <!--bookType 1-租车、2-分公司使用、3-维修、4、展览、5、旅游、6、保养、7、预约中、8、禁用-->
<div style="display: flex;"> <div style="display: flex;margin-bottom: 20px;">
<span class="tip-co bg-1"></span><span>租房车</span> <span class="tip-co bg-1"></span><span>租房车</span>
<span class="tip-co bg-5"></span><span>房车游</span> <span class="tip-co bg-5"></span><span>房车游</span>
<span class="tip-co bg-4"></span><span>展览</span> <span class="tip-co bg-4"></span><span>展览</span>
...@@ -99,29 +99,31 @@ ...@@ -99,29 +99,31 @@
<span class="tip-co bg-7"></span><span>预约中</span> <span class="tip-co bg-7"></span><span>预约中</span>
<span class="tip-co bg-8"></span><span>禁用</span> <span class="tip-co bg-8"></span><span>禁用</span>
</div> </div>
<div style="position: relative;padding: 10px;padding-left: 0;width: 100%;overflow-x:auto;" v-if="currentMonth"> <el-table :key='tableKey' :data="list" v-loading.body="listLoading" border fit highlight-current-row
<div style="display: flex;"> style="width: 100%;cursor: pointer;" class="schedul-tb">
<div class="day-title" style="min-width: 200px;max-width:200px;background: #eef1f6;">日期({{currentMonth}}~{{nextMonth}}月)</div> <el-table-column width="220" align="center" :label="firstTime">
<div class="day-title" style="background: #eef1f6;" v-for="item in tempDayList" :key="item.day" ><span>{{item.day}}</span></div> <template scope="scope">
</div> <div @click="toVehicleRecords(scope.row)">
<div v-for="item in list" :key="item.id" style="display: flex;">
<div class="v-list" style="display: inline-block;" @click="toVehicleRecords(item)">
<div style="color: #bfcbd9;font-size: 14px;"> <div style="color: #bfcbd9;font-size: 14px;">
现在位置:{{item.parkCompanyName}} 现在位置:{{scope.row.parkCompanyName}}
</div>
<div>{{item.numberPlate}}<img src="../../../assets/images/detail.png" style="width: 15px;margin-left: 10px;"/></div>
<div style="color: #bfcbd9;font-size: 14px;">{{item.vehicleModel?item.vehicleModel.name:''}}</div>
</div>
<div class="day-title flex-jca-fdc" style="padding: 0;" v-for="iitem in item.temp" :key="iitem.day" >
<!--@click="ii.bg?toShowDialog(item, iitem, ii):''"-->
<div v-for="ii in iitem.children" :key="ii.time" class="ii-day" :class="ii.bg" @click="toShowDialog(item, iitem, ii)">
<span v-if="ii.timeEtr=='00'" style="position: absolute;color: rgb(255, 255, 255);left: -18px;top: 60px;">{{ii.timeEtr}}</span>
<span v-else style="position: absolute;color: #fff;top: -17px;right: 0;">{{ii.timeEtr}}</span>
<span style="position: absolute;color: #fff;z-index: 11;">{{ii.timeStr}}</span>
</div> </div>
<div>{{scope.row.numberPlate}}<img src="../../../assets/images/detail.png" style="width: 15px;margin-left: 10px;"/></div>
<div style="color: #bfcbd9;font-size: 14px;">{{scope.row.vehicleModel?scope.row.vehicleModel.name:''}}</div>
</div> </div>
</template>
</el-table-column>
<el-table-column width="60" align="center" :label="item.day" v-for="item in tempDayList" :key="item.day">
<template scope="scope">
<div v-for="iitem in scope.row.temp" :key="iitem.day" v-if="iitem.time == item.time">
<div v-for="ii in iitem.children" :key="ii.time" :data-ii="ii.time" :data-endhour="ii.endhour" class="ii-day" :class="ii.bg" @click="toShowDialog(scope.row, iitem, ii)">
<span v-if="ii.timeEtr == '00'" style="position: absolute;color: #fff;left: -20px;bottom: 0">{{ii.timeEtr}}</span>
<span v-else style="position: absolute;color: #fff;top: -24px;right: 0;">{{ii.timeEtr}}</span>
<span style="position: absolute;color: #fff;z-index: 11;left: 0;">{{ii.timeStr}}</span>
</div> </div>
</div> </div>
</template>
</el-table-column>
</el-table>
<div v-show="!listLoading" class="pagination-container"> <div v-show="!listLoading" class="pagination-container">
<el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange"
:current-page.sync="listQuery.page" :page-sizes="[10,20,30, 50]" :page-size="listQuery.limit" :current-page.sync="listQuery.page" :page-sizes="[10,20,30, 50]" :page-size="listQuery.limit"
...@@ -149,6 +151,9 @@ ...@@ -149,6 +151,9 @@
flex-direction: column; flex-direction: column;
justify-content: space-around; justify-content: space-around;
} }
.schedul-tb .el-table .cell{
padding: 0;
}
.tip-co{ .tip-co{
padding: 10px; padding: 10px;
margin-right: 10px; margin-right: 10px;
...@@ -177,8 +182,9 @@ ...@@ -177,8 +182,9 @@
background: #d7d7d7; background: #d7d7d7;
} }
.ii-day{ .ii-day{
height: 4.16%; height: 3px;
position: relative; width: 60px;
margin-left: -19px;
} }
.day-title{ .day-title{
border-right:1px solid #bfcbd9; border-right:1px solid #bfcbd9;
...@@ -369,6 +375,7 @@ ...@@ -369,6 +375,7 @@
data() { data() {
return { return {
animate: false, animate: false,
firstTime: "",//排期表-第一个字段名称
marqueeList: [], marqueeList: [],
modalTitle: "创建", modalTitle: "创建",
BASE_API: process.env.BASE_API, BASE_API: process.env.BASE_API,
...@@ -385,6 +392,7 @@ ...@@ -385,6 +392,7 @@
list: null, list: null,
total: null, total: null,
listLoading: true, listLoading: true,
endTime: "",//结束时间为0点时有值
listQuery: { listQuery: {
page: 1, page: 1,
limit: 10, limit: 10,
...@@ -429,6 +437,7 @@ ...@@ -429,6 +437,7 @@
} else { } else {
this.nextMonth = 1; this.nextMonth = 1;
} }
this.firstTime = "日期("+this.currentMonth+"~"+this.nextMonth+")"
this.getTempDayList(); this.getTempDayList();
this.mar = setInterval(this.showMarquee, 2000); this.mar = setInterval(this.showMarquee, 2000);
getAll() getAll()
...@@ -847,6 +856,7 @@ ...@@ -847,6 +856,7 @@
setColor(){ setColor(){
let temp = []; let temp = [];
this.list.map(function(item){ this.list.map(function(item){
let endTime = '';
item.temp.map(function(ttemp){ item.temp.map(function(ttemp){
let children = []; let children = [];
let tt = "";//yyyy-MM-dd hh:mm:ss let tt = "";//yyyy-MM-dd hh:mm:ss
...@@ -878,6 +888,13 @@ ...@@ -878,6 +888,13 @@
if(iitem.bookEndDate == tt){ if(iitem.bookEndDate == tt){
if (iitem.bookType == 1 || iitem.bookType == 5 || iitem.bookType == 4){ if (iitem.bookType == 1 || iitem.bookType == 5 || iitem.bookType == 4){
pp.timeEtr = h; pp.timeEtr = h;
if(h == "00"){
let cc = new Date(tt);
console.log(cc);
let te = cc.getTime()-24*60*60;
endTime = timestamp2Date(te).substring(0, 13) +":00:00";
console.log(endTime);
}
} }
pp.bg = ""; pp.bg = "";
} }
...@@ -888,32 +905,17 @@ ...@@ -888,32 +905,17 @@
ttemp.children = children ttemp.children = children
}); });
}); });
console.log(this.list);
}, },
/** /**
* tempDayList * tempDayList
**/ **/
getTempDayList(){ getTempDayList(){
let temp = []; let temp = [];
let list = this.list;
let currentMonth = getCurrentMonth();
for(let i = 0; i < 30; i++){ for(let i = 0; i < 30; i++){
let t = []; let t = [];
let tymd = getymdTimeByDay(i); let tymd = getymdTimeByDay(i);
let children = []; temp.push({day: getTimeByDay(i), month: getMonth(i), time: tymd});
let tt = "";//yyyy-MM-dd hh:mm:ss
let h = "";
let bg = "";
for(let ii = 0; ii < 24; ii ++) {
if (ii < 10) {
h = "0" + ii;
tt = tymd + " 0" + ii + ":00:00";
} else {
tt = tymd + " " + ii + ":00:00";
h = ii;
}
children.push({time: tt, h: h, bg: bg});
}
temp.push({day: getTimeByDay(i), month: getMonth(i), children: children});
} }
this.tempDayList = temp; this.tempDayList = temp;
}, },
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment