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>
@@ -627,10 +624,7 @@
                  <tr>
                    <th
                      :style="{
                        width:
                          index == 1 || index == chapter005.groupData.length - 1
                            ? '100px'
                            : '',
                        width: index == 3 ? '300px' : '50px',
                      }"
                      v-for="(header, index) in chapter005.publicHeader"
                      :key="index"
@@ -1156,11 +1150,7 @@
                  <tr>
                    <th
                      :style="{
                        width:
                          index == 1 ||
                          index == chapter005.scoreData1.length - 1
                            ? '100px'
                            : '',
                        width: index == 3 ? '300px' : '50px',
                      }"
                      v-for="(header, index) in chapter005.publicHeader"
                      :key="index"
@@ -1392,11 +1382,11 @@
          <p>餐前教育的注意事项是什么?</p>
          <div class="bk-tx">
            <textarea
              v-model="chapter005.textAreaItem.text28"
              v-model="chapter005.textAreaItem.text228"
              style="border: 0"
              placeholder="请输入内容"
              rows="5"
              @blur="onBlurChange('text28')"
              @blur="onBlurChange('text228')"
            ></textarea>
          </div>
          <h3 id="c017">
@@ -1482,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>
@@ -1666,11 +1646,7 @@
                  <tr>
                    <th
                      :style="{
                        width:
                          index == 1 ||
                          index == chapter005.scoreData2.length - 1
                            ? '100px'
                            : '',
                        width: index == 3 ? '300px' : '50px',
                      }"
                      v-for="(header, index) in chapter005.publicHeader"
                      :key="index"
@@ -1838,11 +1814,7 @@
                  <tr>
                    <th
                      :style="{
                        width:
                          index == 1 ||
                          index == chapter005.scoreData3.length - 1
                            ? '100px'
                            : '',
                        width: index == 3 ? '300px' : '50px',
                      }"
                      v-for="(header, index) in chapter005.publicHeader"
                      :key="index"
@@ -2171,11 +2143,7 @@
                  <tr>
                    <th
                      :style="{
                        width:
                          index == 1 ||
                          index == chapter005.scoreData4.length - 1
                            ? '100px'
                            : '',
                        width: index == 3 ? '300px' : '50px',
                      }"
                      v-for="(header, index) in chapter005.publicHeader"
                      :key="index"
@@ -2604,7 +2572,7 @@
                  <td>
                    <textarea
                      rows="2"
                      style="min-width: 80px;max-width:80px;font-size: 14px"
                      style="min-width: 80px; max-width: 80px; font-size: 14px"
                      v-model="chapter005.textTh.text1"
                      @blur="changeThVal($event, 'text1')"
                    />
@@ -2613,7 +2581,7 @@
                  <td>
                    <textarea
                      rows="2"
                      style="min-width: 80px;max-width:80px;font-size: 14px"
                      style="min-width: 80px; max-width: 80px; font-size: 14px"
                      v-model="chapter005.textTh.text2"
                      @blur="changeThVal($event, 'text2')"
                    />
@@ -2622,7 +2590,7 @@
                  <td>
                    <textarea
                      rows="2"
                      style="min-width: 80px;max-width:80px;font-size: 14px"
                      style="min-width: 80px; max-width: 80px; font-size: 14px"
                      v-model="chapter005.textTh.text3"
                      @blur="changeThVal($event, 'text3')"
                    />
@@ -2631,7 +2599,7 @@
                  <td>
                    <textarea
                      rows="2"
                      style="min-width: 80px;max-width:80px;font-size: 14px"
                      style="min-width: 80px; max-width: 80px; font-size: 14px"
                      v-model="chapter005.textTh.text4"
                      @blur="changeThVal($event, 'text4')"
                    />
@@ -2642,7 +2610,7 @@
                  <td>
                    <textarea
                      rows="2"
                      style="min-width: 80px;max-width:80px;font-size: 14px"
                      style="min-width: 80px; max-width: 80px; font-size: 14px"
                      v-model="chapter005.textTh.text5"
                      @blur="changeThVal($event, 'text5')"
                    />
@@ -2651,7 +2619,7 @@
                  <td>
                    <textarea
                      rows="2"
                      style="min-width: 80px;max-width:80px;font-size: 14px"
                      style="min-width: 80px; max-width: 80px; font-size: 14px"
                      v-model="chapter005.textTh.text6"
                      @blur="changeThVal($event, 'text6')"
                    />
@@ -2660,7 +2628,7 @@
                  <td>
                    <textarea
                      rows="2"
                      style="min-width: 80px;max-width:80px;font-size: 14px"
                      style="min-width: 80px; max-width: 80px; font-size: 14px"
                      v-model="chapter005.textTh.text7"
                      @blur="changeThVal($event, 'text7')"
                    />
@@ -2669,7 +2637,7 @@
                  <td>
                    <textarea
                      rows="2"
                      style="min-width: 80px;max-width:80px;font-size: 14px"
                      style="min-width: 80px; max-width: 80px; font-size: 14px"
                      v-model="chapter005.textTh.text8"
                      @blur="changeThVal($event, 'text8')"
                    />
@@ -2724,7 +2692,7 @@
              </tbody>
            </table>
          </div>
          <p><br/></p>
          <p><br /></p>
          <h3 id="c020">
            <span class="bk-h3"
              ><span class="bj1-h3">六</span>  餐后保育 </span
@@ -3102,7 +3070,7 @@
  </div>
</template>
<script>
import {getResourcePath} from "@/assets/methods/resources.js";
import { getResourcePath } from "@/assets/methods/resources.js";
import examinations from "@/components/examinations/index.vue";
import { getFileMd5, getPublicImage } from "../js/tool.js";
import drawflow from "@/components/drawflow";
@@ -3116,6 +3084,10 @@
    },
    questionData: {
      type: Object,
    },
    isSearch: {
      type: Boolean,
      default: false,
    },
  },
  data() {
@@ -3555,30 +3527,24 @@
    drawflow,
  },
  async created() {
    const localData = JSON.parse(localStorage.getItem("chapter005"));
    if (localData) {
      this.chapter005 = { ...Object.assign(this.chapter005, localData) };
    if (!this.isSearch) {
      const localData = JSON.parse(localStorage.getItem("chapter005"));
      if (localData) {
        this.chapter005 = { ...Object.assign(this.chapter005, localData) };
      }
      this.chapter005.videOneUrl = await getResourcePath(
        "439b0bde62a5098875c77e2492676577"
      );
      this.chapter005.videoTwoUrl = await getResourcePath(
        "1a878261410b01ee8e4e0602a1fe935f"
      );
      this.chapter005.videoFourUrl = await getResourcePath(
        "6cf2619beb704b3d79de04f0775c8ba3"
      );
      this.chapter005.videoFiveUrl = await getResourcePath(
        "8400384441ad9236d5eab24f500ec2c7"
      );
    }
    this.chapter005.videOneUrl = await getResourcePath(
      "439b0bde62a5098875c77e2492676577"
    );
    this.chapter005.videoTwoUrl = await getResourcePath(
      "1a878261410b01ee8e4e0602a1fe935f"
    );
    this.chapter005.videoFourUrl = await getResourcePath(
      "6cf2619beb704b3d79de04f0775c8ba3"
    );
    this.chapter005.videoFiveUrl = await getResourcePath(
      "8400384441ad9236d5eab24f500ec2c7"
    );
    // this.chapter005.videOneUrl =
    //   "https://jsek.bnuic.com/file/api/ApiDownload?md5=439b0bde62a5098875c77e2492676577";
    // this.chapter005.videoTwoUrl =
    //   "https://jsek.bnuic.com/file/api/ApiDownload?md5=1a878261410b01ee8e4e0602a1fe935f";
    // this.chapter005.videoFourUrl =
    //   "https://jsek.bnuic.com/file/api/ApiDownload?md5=6cf2619beb704b3d79de04f0775c8ba3";
    // this.chapter005.videoFiveUrl =
    //   "https://jsek.bnuic.com/file/api/ApiDownload?md5=8400384441ad9236d5eab24f500ec2c7";
  },
  methods: {
    activityOne() {
@@ -3686,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) {
@@ -3706,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) {
@@ -3749,7 +3719,7 @@
            if (type == "3") {
              that.chapter005.pictrueListThree.push(getPublicImage(e));
            }
            that.$emit('Upload_initViewer',"")
            that.$emit("Upload_initViewer", "");
            localStorage.setItem("chapter005", JSON.stringify(that.chapter005));
          }, 1000);
        })