Merge branch 'master' of http://101.37.69.204:3000/mozhe/demo
This commit is contained in:
commit
d539928e20
|
@ -54,7 +54,7 @@
|
||||||
<span>物料清单</span>
|
<span>物料清单</span>
|
||||||
</router-link>
|
</router-link>
|
||||||
</el-dropdown-item>
|
</el-dropdown-item>
|
||||||
<el-dropdown-item @click="handleDate(scope.row)">任务备注</el-dropdown-item>
|
<!-- <el-dropdown-item @click="handleDate(scope.row)">任务备注</el-dropdown-item> -->
|
||||||
<el-dropdown-item @click="handleAdd(scope.row)" v-if="scope.row.parentId == 0">新增</el-dropdown-item>
|
<el-dropdown-item @click="handleAdd(scope.row)" v-if="scope.row.parentId == 0">新增</el-dropdown-item>
|
||||||
<!-- <el-dropdown-item @click="handleUpdate(scope.row)">修改</el-dropdown-item> -->
|
<!-- <el-dropdown-item @click="handleUpdate(scope.row)">修改</el-dropdown-item> -->
|
||||||
</el-dropdown-menu>
|
</el-dropdown-menu>
|
||||||
|
@ -246,28 +246,35 @@ function getDays(start, end) {
|
||||||
* 改变表格单元格颜色
|
* 改变表格单元格颜色
|
||||||
*/
|
*/
|
||||||
function handleChangeCellStyle({ row, column, rowIndex, columnIndex }) {
|
function handleChangeCellStyle({ row, column, rowIndex, columnIndex }) {
|
||||||
|
let cellStyle = {}
|
||||||
|
|
||||||
|
for (const item of row.record) {
|
||||||
|
if (item.recordDate == column.label) {
|
||||||
|
cellStyle.backgroundColor = item.ganttColor
|
||||||
|
}
|
||||||
|
}
|
||||||
// 获取两个日期之间的所有日期
|
// 获取两个日期之间的所有日期
|
||||||
const planDates = row.record.map(v => v.recordDate)
|
//column.label == dayjs(row.planStartDate).format('YYYY-MM-DD')
|
||||||
let arr = planDates.filter(v => allDates.indexOf(v) > -1)
|
// const planDates = row.record.map(v => v.recordDate)
|
||||||
|
|
||||||
let cellStyle = {} //column.label == dayjs(row.planStartDate).format('YYYY-MM-DD')
|
// let arr = planDates.filter(v => allDates.indexOf(v) > -1)
|
||||||
if (arr.includes(column.label)) {
|
// if (arr.includes(column.label)) {
|
||||||
if (row.ganttColor) {
|
// if (row.ganttColor) {
|
||||||
cellStyle.backgroundColor = row.ganttColor
|
// cellStyle.backgroundColor = row.ganttColor
|
||||||
} else {
|
// } else {
|
||||||
cellStyle.backgroundColor = '#FFC000'
|
// cellStyle.backgroundColor = '#FFC000'
|
||||||
}
|
// }
|
||||||
|
|
||||||
if (rowIndex % 2 == 0) {
|
// if (rowIndex % 2 == 0) {
|
||||||
if (row.ganttColor) {
|
// if (row.ganttColor) {
|
||||||
cellStyle.backgroundColor = row.ganttColor
|
// cellStyle.backgroundColor = row.ganttColor
|
||||||
} else {
|
// } else {
|
||||||
cellStyle.backgroundColor = '#00B050'
|
// cellStyle.backgroundColor = '#00B050'
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
} else {
|
// } else {
|
||||||
cellStyle.backgroundColor = 'white'
|
// cellStyle.backgroundColor = 'white'
|
||||||
}
|
// }
|
||||||
return cellStyle
|
return cellStyle
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue