Commit 590a7c39 authored by jingnan's avatar jingnan 👀

SQCDP没到日子的显示空白,不默认绿色

parent bc8f8ba8
......@@ -137,6 +137,7 @@
v-for="item in optionData"
:key="item.id"
:value="item.value"
:disabled="item.value==='White'"
:label="item.label"
/>
</el-select>
......@@ -162,6 +163,7 @@
v-for="item in optionData"
:key="item.id"
:value="item.value"
:disabled="item.value==='White'"
:label="item.label"
/>
</el-select>
......@@ -186,6 +188,7 @@
<el-option
v-for="item in optionData"
:key="item.id"
:disabled="item.value==='White'"
:value="item.value"
:label="item.label"
/>
......@@ -211,6 +214,7 @@
<el-option
v-for="item in optionData"
:key="item.id"
:disabled="item.value==='White'"
:value="item.value"
:label="item.label"
/>
......@@ -236,6 +240,7 @@
<el-option
v-for="item in optionData"
:key="item.id"
:disabled="item.value==='White'"
:value="item.value"
:label="item.label"
/>
......@@ -443,6 +448,14 @@ export default {
this.$api.searchApi('FactoryCalendar', params)
.then((res) => {
res.items.content.map((item) => {
const isWhite = this.isDateAfterToday(item.calendar)
if (isWhite) {
item.srisk = 'White'
item.qrisk = 'White'
item.crisk = 'White'
item.drisk = 'White'
item.prisk = 'White'
}
item.calendar = item.calendar.substr(5, 5)
if (!item.srisk) {
item.srisk += ''
......@@ -594,6 +607,10 @@ export default {
// 重置弹出框
reset(message) {
this.$utils.showMessageSuccess(message)
},
isDateAfterToday(date) {
const today = new Date()
return new Date(date) > today
}
}
}
......
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