zhanghua
2025-07-16 7c20fd15b7fbc2bd5756b39d5ab655cc849ffcc3
src/views/operate/writManager/components/inquest_record/edit.vue
@@ -260,9 +260,10 @@
      });
    },
    handlePrint(e) {},
    judgeLength(word, length) {
      for (let index = 0; word.length < length; index++) {
        word += " ";
    judgeLength(word, length, char) {
      let wordLength = word.length;
      for (let index = 0; wordLength + index < length; index++) {
        word += char ? "  " : " ";
      }
      return word;
    },
@@ -283,8 +284,27 @@
            linebreaks: true,
          });
          var data = that.form;
          data.jc_address = that.judgeLength(data.jc_address, 33);
          debugger;
          data.jc_address = that.judgeLength(data.jc_address, 20, true);
          data.jc_user1 = that.judgeLength(data.jc_user1, 9, true);
          data.jc_user2 = that.judgeLength(data.jc_user2, 9, true);
          data.jc_card1 = that.judgeLength(data.jc_card1, 13, false);
          data.jc_card2 = that.judgeLength(data.jc_card2, 12, false);
          data.recorder = that.judgeLength(data.recorder, 9, true);
          data.weather = that.judgeLength(data.weather, 7, true);
          data.bjc_name = that.judgeLength(data.bjc_name, 16, true);
          data.bjc_code = that.judgeLength(data.bjc_code, 36, false);
          data.bjc_address = that.judgeLength(data.bjc_address, 11, true);
          data.bjc_phone = that.judgeLength(data.bjc_phone, 12, false);
          data.current_person = that.judgeLength(data.current_person, 12, true);
          data.position = that.judgeLength(data.position, 9, true);
          data.current_person_phone = that.judgeLength(
            data.current_person_phone,
            24,
            false
          );
          data.relation = that.judgeLength(data.relation, 6, true);
          data.eyewitness = that.judgeLength(data.eyewitness, 25, true);
          doc.setData(data);
          /*向文档中写入数据*/
          doc.render();
@@ -307,7 +327,7 @@
<style scoped>
.content {
  width: 90%;
  width: 805px;
  margin: auto;
  line-height: 2 !important;
}