| | |
| | | <!-- eslint-disable no-irregular-whitespace --> |
| | | <template> |
| | | <div class="chapter" num="3"> |
| | | <div class="page-box" page="19"> |
| | |
| | | index == 0 || |
| | | index == chapter002.headersData.length - 2 || |
| | | index == chapter002.headersData.length - 1 |
| | | ? '100px' |
| | | : '', |
| | | ? '120px' |
| | | : '40px', |
| | | }" |
| | | v-for="(header, index) in chapter002.headersData" |
| | | :key="index" |
| | |
| | | > |
| | | <td v-for="(cell, cellIndex) in row" :key="cellIndex"> |
| | | <template v-if="cell === ''"> |
| | | <input |
| | | type="text" |
| | | v-model="chapter002.tableData121[rowIndex][cellIndex]" |
| | | @blur=" |
| | | updateCell(rowIndex, cellIndex, $event.target.value) |
| | | " |
| | | /> |
| | | <div |
| | | contenteditable |
| | | @blur="updateCell(rowIndex, cellIndex, $event)" |
| | | > |
| | | {{ chapter002.tableData121[rowIndex][cellIndex] }} |
| | | </div> |
| | | </template> |
| | | <template v-else> |
| | | <input |
| | | :readonly="cellIndex == 0" |
| | | type="text" |
| | | :value="chapter002.tableData121[rowIndex][cellIndex]" |
| | | @blur=" |
| | | updateCell(rowIndex, cellIndex, $event.target.value) |
| | | " |
| | | /> |
| | | <div |
| | | :contenteditable="cellIndex != 0" |
| | | @blur="updateCell(rowIndex, cellIndex, $event)" |
| | | > |
| | | {{ chapter002.tableData121[rowIndex][cellIndex] }} |
| | | </div> |
| | | </template> |
| | | </td> |
| | | </tr> |
| | |
| | | <table class="table111 table122"> |
| | | <thead> |
| | | <tr> |
| | | <th rowspan="3">日期</th> |
| | | <th rowspan="3">姓名</th> |
| | | <th rowspan="3" style="width: 55px">日期</th> |
| | | <th rowspan="3" style="width: 55px">姓名</th> |
| | | <th colspan="3">晨间检查情况</th> |
| | | <th colspan="8">全日观察情况</th> |
| | | <th colspan="2">交班</th> |
| | |
| | | > |
| | | <td v-for="(cell, cellIndex) in row" :key="cellIndex"> |
| | | <template v-if="cell === ''"> |
| | | <input |
| | | type="text" |
| | | :value="chapter002.tableData122[rowIndex][cellIndex]" |
| | | @blur=" |
| | | updateCell122(rowIndex, cellIndex, $event.target.value) |
| | | " |
| | | /> |
| | | <div |
| | | contenteditable |
| | | @blur="updateCell122(rowIndex, cellIndex, $event)" |
| | | > |
| | | {{ chapter002.tableData122[rowIndex][cellIndex] }} |
| | | </div> |
| | | </template> |
| | | <template v-else> |
| | | <input |
| | | type="text" |
| | | :value="chapter002.tableData122[rowIndex][cellIndex]" |
| | | @blur=" |
| | | updateCell122(rowIndex, cellIndex, $event.target.value) |
| | | " |
| | | /> |
| | | <div |
| | | contenteditable |
| | | @blur="updateCell122(rowIndex, cellIndex, $event)" |
| | | > |
| | | {{ chapter002.tableData122[rowIndex][cellIndex] }} |
| | | </div> |
| | | </template> |
| | | </td> |
| | | </tr> |
| | |
| | | > |
| | | <td v-for="(cell, cellIndex) in row" :key="cellIndex"> |
| | | <template v-if="cell === ''"> |
| | | <input |
| | | type="text" |
| | | v-model="chapter002.tableData123[rowIndex][cellIndex]" |
| | | <div |
| | | contenteditable |
| | | @blur=" |
| | | updateCell123(rowIndex, cellIndex, $event.target.value) |
| | | " |
| | | /> |
| | | > |
| | | {{ chapter002.tableData123[rowIndex][cellIndex] }} |
| | | </div> |
| | | </template> |
| | | <template v-else> |
| | | <input |
| | | type="text" |
| | | :value="cell" |
| | | <div |
| | | contenteditable |
| | | @blur=" |
| | | updateCell123(rowIndex, cellIndex, $event.target.value) |
| | | " |
| | | /> |
| | | > |
| | | {{ cell }} |
| | | </div> |
| | | </template> |
| | | </td> |
| | | </tr> |
| | |
| | | this.chapter002.isInspectOpen = !this.chapter002.isInspectOpen; |
| | | localStorage.setItem("chapter002", JSON.stringify(this.chapter002)); |
| | | }, |
| | | updateCell(rowIndex, cellIndex, value) { |
| | | updateCell(rowIndex, cellIndex, e) { |
| | | // 更新单元格数据 |
| | | this.$set(this.chapter002.tableData121[rowIndex], cellIndex, value); |
| | | this.$set( |
| | | this.chapter002.tableData121[rowIndex], |
| | | cellIndex, |
| | | e.target.innerText |
| | | ); |
| | | localStorage.setItem("chapter002", JSON.stringify(this.chapter002)); |
| | | }, |
| | | updateCell122(rowIndex, cellIndex, value) { |
| | | updateCell122(rowIndex, cellIndex, e) { |
| | | // 更新单元格数据 |
| | | this.$set(this.chapter002.tableData122[rowIndex], cellIndex, value); |
| | | this.$set( |
| | | this.chapter002.tableData122[rowIndex], |
| | | cellIndex, |
| | | e.target.innerText |
| | | ); |
| | | localStorage.setItem("chapter002", JSON.stringify(this.chapter002)); |
| | | }, |
| | | updateCell123(rowIndex, cellIndex, value) { |
| | | updateCell123(rowIndex, cellIndex, e) { |
| | | // 更新单元格数据 |
| | | this.$set(this.chapter002.tableData123[rowIndex], cellIndex, value); |
| | | this.$set( |
| | | this.chapter002.tableData123[rowIndex], |
| | | cellIndex, |
| | | e.target.innerText |
| | | ); |
| | | localStorage.setItem("chapter002", JSON.stringify(this.chapter002)); |
| | | }, |
| | | updateCellGroup(rowIndex, cellIndex, value) { |
| | | // 更新单元格数据 |
| | | this.$set(this.chapter002.groupData[rowIndex], cellIndex, value); |
| | | this.$set( |
| | | this.chapter002.groupData[rowIndex], |
| | | cellIndex, |
| | | value |
| | | ); |
| | | if (cellIndex == 4) { |
| | | this.$set( |
| | | this.chapter002.groupData[rowIndex], |
| | |
| | | }, |
| | | updateCellDesign(rowIndex, cellIndex, value) { |
| | | // 更新单元格数据 |
| | | this.$set(this.chapter002.designData[rowIndex], cellIndex, value); |
| | | this.$set( |
| | | this.chapter002.designData[rowIndex], |
| | | cellIndex, |
| | | value |
| | | ); |
| | | if (cellIndex == 4) { |
| | | this.$set( |
| | | this.chapter002.designData[rowIndex], |
| | |
| | | }, |
| | | updateCellInspect(rowIndex, cellIndex, value) { |
| | | // 更新单元格数据 |
| | | this.$set(this.chapter002.inspectData[rowIndex], cellIndex, value); |
| | | this.$set( |
| | | this.chapter002.inspectData[rowIndex], |
| | | cellIndex, |
| | | value |
| | | ); |
| | | if (cellIndex == 4) { |
| | | this.$set( |
| | | this.chapter002.inspectData[rowIndex], |