unknown
2024-06-07 eeff64f494ed72d8acaa13d653c9f3ee181ac950
src/books/lifeCare/view/chapter005.vue
@@ -191,8 +191,8 @@
                    :style="{
                      width:
                        index == 0 ||
                        index == chapter005.tableData151.length - 1
                          ? '100px'
                        index == chapter005.headersData.length - 1
                          ? '150px'
                          : '',
                    }"
                    v-for="(header, index) in chapter005.headersData"
@@ -209,23 +209,20 @@
                >
                  <td v-for="(cell, cellIndex) in row" :key="cellIndex">
                    <template v-if="cell === ''">
                      <input
                        type="text"
                        v-model="chapter005.tableData151[rowIndex][cellIndex]"
                        @blur="
                          updateCell(rowIndex, cellIndex, $event.target.value)
                        "
                      />
                      <div
                        contenteditable
                        @blur="updateCell(rowIndex, cellIndex, $event)"
                      >
                        {{ chapter005.tableData151[rowIndex][cellIndex] }}
                      </div>
                    </template>
                    <template v-else>
                      <input
                        :readonly="cellIndex == 0"
                        type="text"
                        :value="chapter005.tableData151[rowIndex][cellIndex]"
                        @blur="
                          updateCell(rowIndex, cellIndex, $event.target.value)
                        "
                      />
                      <div
                        :contenteditable="cellIndex != 0"
                        @blur="updateCell(rowIndex, cellIndex, $event)"
                      >
                        {{ chapter005.tableData151[rowIndex][cellIndex] }}
                      </div>
                    </template>
                  </td>
                </tr>
@@ -1475,30 +1472,20 @@
                >
                  <td v-for="(cell, cellIndex) in row" :key="cellIndex">
                    <template v-if="cell === ''">
                      <input
                        type="text"
                        v-model="chapter005.tableData155[rowIndex][cellIndex]"
                        @blur="
                          updateCell155(
                            rowIndex,
                            cellIndex,
                            $event.target.value
                          )
                        "
                      />
                      <div
                        contenteditable
                        @blur="updateCell155(rowIndex, cellIndex, $event)"
                      >
                        {{ chapter005.tableData155[rowIndex][cellIndex] }}
                      </div>
                    </template>
                    <template v-else>
                      <input
                        type="text"
                        :value="chapter005.tableData155[rowIndex][cellIndex]"
                        @blur="
                          updateCell155(
                            rowIndex,
                            cellIndex,
                            $event.target.value
                          )
                        "
                      />
                      <div
                        contenteditable
                        @blur="updateCell155(rowIndex, cellIndex, $event)"
                      >
                        {{ chapter005.tableData155[rowIndex][cellIndex] }}
                      </div>
                    </template>
                  </td>
                </tr>
@@ -3665,9 +3652,9 @@
      }
      localStorage.setItem("chapter005", JSON.stringify(this.chapter005));
    },
    updateCell(rowIndex, cellIndex, value) {
    updateCell(rowIndex, cellIndex, e) {
      // 更新单元格数据
      this.$set(this.chapter005.tableData151[rowIndex], cellIndex, value);
      this.$set(this.chapter005.tableData151[rowIndex], cellIndex, e.target.innerText);
      localStorage.setItem("chapter005", JSON.stringify(this.chapter005));
    },
    updateCell152(rowIndex, cellIndex, value) {
@@ -3685,9 +3672,13 @@
      this.$set(this.chapter005.tableData154[rowIndex], cellIndex, value);
      localStorage.setItem("chapter005", JSON.stringify(this.chapter005));
    },
    updateCell155(rowIndex, cellIndex, value) {
    updateCell155(rowIndex, cellIndex, e) {
      // 更新单元格数据
      this.$set(this.chapter005.tableData155[rowIndex], cellIndex, value);
      this.$set(
        this.chapter005.tableData155[rowIndex],
        cellIndex,
        e.target.innerText
      );
      localStorage.setItem("chapter005", JSON.stringify(this.chapter005));
    },
    updateCell156(rowIndex, cellIndex, value) {