调度 油价管理预约时间只能选设置当前15分钟后的时间
This commit is contained in:
@@ -12,7 +12,7 @@ VUE_APP_UPLOAD_PRIVATE_URL = '/api/xkhl-dict/imageHandler/uploadProtectedImg'
|
||||
VUE_APP_DOMAIN = '192.168.0.199:38080'
|
||||
|
||||
# 开发环境,不会进行加密,会打印出数据
|
||||
VUE_APP_ENV = 'development'
|
||||
VUE_APP_ENV = 'production'
|
||||
#production
|
||||
|
||||
|
||||
|
||||
@@ -1,14 +1,6 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
title=""
|
||||
:visible="true"
|
||||
:show-close="false"
|
||||
top="20vh"
|
||||
width="500px"
|
||||
:close-on-click-modal="false"
|
||||
center
|
||||
custom-class="custom-dialog"
|
||||
><el-form label-width="80px" class="addStyle">
|
||||
<el-dialog title="" :visible="true" :show-close="false" top="20vh" width="500px" :close-on-click-modal="false" center
|
||||
custom-class="custom-dialog"><el-form label-width="80px" class="addStyle">
|
||||
<div class="adjust-frame">
|
||||
<div class="titleStyle">
|
||||
<p style="margin:0;color:#409EFF">新增快速调价任务</p>
|
||||
@@ -17,48 +9,22 @@
|
||||
<span>{{ multipleSelection.length }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<img
|
||||
class="close"
|
||||
@click="
|
||||
controlWindows.dialogAdjustStrategyPiliangAdd = false
|
||||
"
|
||||
src="@/assets/img/close_fill.png"
|
||||
alt=""
|
||||
/>
|
||||
<img class="close" @click="
|
||||
controlWindows.dialogAdjustStrategyPiliangAdd = false
|
||||
" src="@/assets/img/close_fill.png" alt="" />
|
||||
<div style="margin: 0 35px;">
|
||||
<template>
|
||||
<div style="margin:40px 0 20px;">
|
||||
<span style="margin: 15px 0; display: block;"
|
||||
>任务名称</span
|
||||
>
|
||||
<el-input
|
||||
type="textarea"
|
||||
:rows="2"
|
||||
placeholder="请输入内容"
|
||||
v-model="taskName"
|
||||
></el-input>
|
||||
<span style="margin: 15px 0; display: block;">任务名称</span>
|
||||
<el-input type="textarea" :rows="2" placeholder="请输入内容" v-model="taskName"></el-input>
|
||||
</div>
|
||||
<el-divider></el-divider>
|
||||
<div
|
||||
style="display:flex;align-items: center;justify-content: space-between;margin-bottom: 20px;"
|
||||
>
|
||||
<div style="display:flex;align-items: center;justify-content: space-between;margin-bottom: 20px;">
|
||||
<div class="mubiaocelue">
|
||||
<div
|
||||
class="special-exhibition"
|
||||
style="margin: -7px 0 12px;"
|
||||
>
|
||||
<span style="margin-right: 10px"
|
||||
>目标策略公式</span
|
||||
>
|
||||
<input
|
||||
class="strategy-input"
|
||||
type="text"
|
||||
v-model="
|
||||
convertPersonalPriceSyncStrategy
|
||||
"
|
||||
@keyup="inputHandle"
|
||||
@blur="blurHandle"
|
||||
/>
|
||||
<div class="special-exhibition" style="margin: -7px 0 12px;">
|
||||
<span style="margin-right: 10px">目标策略公式</span>
|
||||
<input class="strategy-input" type="text" v-model="convertPersonalPriceSyncStrategy
|
||||
" @keyup="inputHandle" @blur="blurHandle" />
|
||||
</div>
|
||||
<div style="margin: 0 0 0 auto;">
|
||||
执行时基础个人价变更
|
||||
@@ -66,11 +32,7 @@
|
||||
</div>
|
||||
<div class="mubiaocelue">
|
||||
<el-radio-group v-model="radio">
|
||||
<el-radio
|
||||
:label="1"
|
||||
@click.native.prevent="selectRadio"
|
||||
>立即应用到个人价</el-radio
|
||||
>
|
||||
<el-radio :label="1" @click.native.prevent="selectRadio">立即应用到个人价</el-radio>
|
||||
</el-radio-group>
|
||||
<el-radio-group v-model="dijiaRadio">
|
||||
<el-radio :label="0">忽略</el-radio>
|
||||
@@ -81,23 +43,13 @@
|
||||
<el-divider></el-divider>
|
||||
<div class="mubiaocelue" style="margin-bottom: 30px;">
|
||||
<span>任务类型</span>
|
||||
<el-radio-group
|
||||
v-model="taskTypeRadio"
|
||||
style="margin:0"
|
||||
>
|
||||
<el-radio-group v-model="taskTypeRadio" style="margin:0">
|
||||
<el-radio :label="1">实时</el-radio>
|
||||
<el-radio :label="2">预约</el-radio>
|
||||
<el-date-picker
|
||||
popper-class="disableButton"
|
||||
:disabled="taskTypeRadio !== 2"
|
||||
v-model="startTime"
|
||||
clearable
|
||||
format="yyyy-MM-dd HH:mm:ss"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
type="datetime"
|
||||
placeholder="预约时间"
|
||||
:picker-options="pickerOptions"
|
||||
/>
|
||||
<el-date-picker popper-class="disableButton" :disabled="taskTypeRadio !== 2"
|
||||
v-model="startTime" clearable format="yyyy-MM-dd HH:mm:ss"
|
||||
value-format="yyyy-MM-dd HH:mm:ss" type="datetime" placeholder="预约时间"
|
||||
:picker-options="pickerOptions" />
|
||||
</el-radio-group>
|
||||
</div>
|
||||
<!-- <div class="personal-block">
|
||||
@@ -133,26 +85,12 @@
|
||||
|
||||
<span class="dialog-footer">
|
||||
<template>
|
||||
<el-button
|
||||
style="margin-right: 20px;"
|
||||
type="info"
|
||||
@click="
|
||||
controlWindows.dialogAdjustStrategyPiliangAdd = false
|
||||
"
|
||||
>取 消</el-button
|
||||
>
|
||||
<el-popconfirm
|
||||
confirm-button-text="确定"
|
||||
cancel-button-text="取消"
|
||||
icon="el-icon-info"
|
||||
icon-color="red"
|
||||
title="一旦提交,将立即生效!是否确认提交?"
|
||||
placement="top"
|
||||
@onConfirm="confirm"
|
||||
>
|
||||
<el-button type="primary" slot="reference"
|
||||
>提交</el-button
|
||||
>
|
||||
<el-button style="margin-right: 20px;" type="info" @click="
|
||||
controlWindows.dialogAdjustStrategyPiliangAdd = false
|
||||
">取 消</el-button>
|
||||
<el-popconfirm confirm-button-text="确定" cancel-button-text="取消" icon="el-icon-info" icon-color="red"
|
||||
title="一旦提交,将立即生效!是否确认提交?" placement="top" @onConfirm="confirm">
|
||||
<el-button type="primary" slot="reference">提交</el-button>
|
||||
</el-popconfirm>
|
||||
</template>
|
||||
</span>
|
||||
@@ -164,6 +102,12 @@
|
||||
import AdjustTask from "@/api/AdjustTask/AdjustTask";
|
||||
import { parseTime } from "@/utils/disableTime.js";
|
||||
import moment from "moment";
|
||||
let xxx = () => {
|
||||
let b = new Date();
|
||||
// 获取分钟设置分钟
|
||||
b.setMinutes(b.getMinutes() + 15);
|
||||
return `${b.getHours()}:${b.getMinutes()}:${b.getSeconds()} - 23:59:00`
|
||||
};
|
||||
export default {
|
||||
props: {
|
||||
controlWindows: Object,
|
||||
@@ -180,15 +124,33 @@ export default {
|
||||
taskName: "",
|
||||
startTime: "",
|
||||
userCompany: this.$store.getters.user.userCompany,
|
||||
pickerOptions: {
|
||||
disabledDate(time) {
|
||||
return time.getTime() < Date.now() - 8.64e7;
|
||||
pickerOptions: {
|
||||
xxfn(){
|
||||
|
||||
},
|
||||
selectableRange:
|
||||
parseTime(
|
||||
new Date(moment().format("YYYY-MM-DD HH:mm:ss")),
|
||||
"{hh}:{ii}:{ss}"
|
||||
) + "- 23:59:00"
|
||||
disabledDate(time) {
|
||||
// return time.getTime() < Date.now() - 8.64e7;
|
||||
|
||||
// Date对象 获取当前时间+加15分钟和每一个time作比较 如果小于 返回true 禁用 如果大于等于 返回false 启用
|
||||
// 获取当前时间
|
||||
let b = new Date();
|
||||
// 获取分钟设置分钟
|
||||
// b.setMinutes(b.getMinutes() + 15);
|
||||
b.setDate(b.getDate() -1)
|
||||
// 判断当前时间分钟大不大于设置分钟
|
||||
if (time>b) {
|
||||
// 错误
|
||||
return false
|
||||
// 正确
|
||||
} else {
|
||||
return true
|
||||
}
|
||||
},
|
||||
selectableRange: xxx()
|
||||
// parseTime(
|
||||
// new Date(moment().add(15,'minutes').format("YYYY-MM-DD HH:mm:ss")),
|
||||
// "{hh}:{ii}:{ss}"
|
||||
// ) + "- 23:59:00"
|
||||
}
|
||||
};
|
||||
},
|
||||
@@ -285,9 +247,9 @@ export default {
|
||||
data,
|
||||
this.radio
|
||||
? {
|
||||
convertPersonalPrice:
|
||||
item.convertPersonalPrice
|
||||
}
|
||||
convertPersonalPrice:
|
||||
item.convertPersonalPrice
|
||||
}
|
||||
: {}
|
||||
)
|
||||
);
|
||||
@@ -334,26 +296,32 @@ export default {
|
||||
margin-top: 20px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
::v-deep {
|
||||
.el-divider--horizontal {
|
||||
margin: 30px 0;
|
||||
}
|
||||
|
||||
.custom-dialog {
|
||||
border-radius: 15px;
|
||||
|
||||
// .el-dialog__header {
|
||||
// padding: 10px 20px !important;
|
||||
// }
|
||||
.el-dialog__body {
|
||||
padding: 0 20px 10px;
|
||||
}
|
||||
|
||||
.adjust-frame {
|
||||
position: relative;
|
||||
> p {
|
||||
|
||||
>p {
|
||||
margin: 0;
|
||||
color: #333;
|
||||
font-size: 15px;
|
||||
}
|
||||
> .close {
|
||||
|
||||
>.close {
|
||||
position: absolute;
|
||||
width: 35px;
|
||||
height: 35px;
|
||||
@@ -362,24 +330,30 @@ export default {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.exhibition {
|
||||
padding: 0;
|
||||
|
||||
li {
|
||||
display: flex;
|
||||
margin-bottom: 15px;
|
||||
|
||||
span {
|
||||
flex: 1;
|
||||
|
||||
&:nth-of-type(1) {
|
||||
color: #a9a9a9;
|
||||
padding-right: 15px;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
&:nth-of-type(2) {
|
||||
text-align: left;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.tip {
|
||||
display: block;
|
||||
width: 150px;
|
||||
@@ -387,6 +361,7 @@ export default {
|
||||
line-height: 25px;
|
||||
color: #f00;
|
||||
}
|
||||
|
||||
.special-exhibition {
|
||||
padding-right: 15px;
|
||||
box-sizing: border-box;
|
||||
@@ -395,34 +370,44 @@ export default {
|
||||
width: 220px;
|
||||
line-height: 30px;
|
||||
background: rgba(211, 211, 211, 0.5);
|
||||
> span {
|
||||
|
||||
>span {
|
||||
flex: 1;
|
||||
|
||||
&:nth-of-type(1) {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
&:nth-of-type(2) {
|
||||
text-align: left;
|
||||
padding-left: 20px;
|
||||
}
|
||||
}
|
||||
> input {
|
||||
|
||||
>input {
|
||||
width: 100px;
|
||||
height: 20px;
|
||||
}
|
||||
}
|
||||
|
||||
.addStyle .el-form-item--medium .el-form-item__label {
|
||||
text-align: start;
|
||||
}
|
||||
|
||||
.addStyle .el-form-item__content .el-radio-group {
|
||||
box-shadow: none !important;
|
||||
}
|
||||
|
||||
.titleStyle {
|
||||
display: flex;
|
||||
|
||||
div {
|
||||
margin-left: auto;
|
||||
margin-right: 45px;
|
||||
}
|
||||
|
||||
.el-form-item--medium {
|
||||
|
||||
.el-form-item__label,
|
||||
.el-form-item__content {
|
||||
line-height: 17px;
|
||||
@@ -430,14 +415,17 @@ export default {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.dialog-footer {
|
||||
display: flex;
|
||||
justify-content: end;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.mubiaocelue {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
div {
|
||||
margin: 10px 0;
|
||||
}
|
||||
|
||||
@@ -26,7 +26,7 @@ module.exports = {
|
||||
[process.env.VUE_APP_BASE_API]: {
|
||||
// target: "http://uat.xingoil.com/adminapi",
|
||||
// target: 'https://www.xingoil.com/adminapi',
|
||||
target: `http://192.168.0.22:38080`,
|
||||
target: `http://119.177.60.118:8000/adminapi`,
|
||||
changeOrigin: true,
|
||||
pathRewrite: {
|
||||
['^' + process.env.VUE_APP_BASE_API]: ''
|
||||
|
||||
Reference in New Issue
Block a user