Commit 18648705 authored by jingnan's avatar jingnan 👀

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

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