WXL
2024-08-06 17b041e2e7ebd5afe75403fefc57cc6a88b51dad
src/views/patient/patient/profile/index.vue
@@ -145,27 +145,27 @@
            <el-col :span="24"
              ><div class="xinz-inf">
                <el-tag
                  :key="tag"
                  :key="tag.tagname"
                  type="success"
                  v-for="tag in dynamicTags"
                  closable
                  :disable-transitions="false"
                  @close="handleClose(tag)"
                >
                  {{ tag }}
                  {{ tag.tagname }}
                </el-tag>
                <el-select
                  v-model="inputValue"
                  v-if="inputVisible"
                  v-model="inputValue"
                  @change="handleInputConfirm"
                  filterable
                  allow-create
                  default-first-option
                  placeholder="请选择"
                  placeholder="请选择/查询"
                >
                  <el-option
                    v-for="item in options"
                    :key="item.tagname"
                    :key="item.tagid"
                    :label="item.tagname"
                    :value="item.tagname"
                  >
@@ -433,15 +433,19 @@
          </div>
          <el-divider></el-divider>
          <div style="margin-top: 10px">
            随访状态:已终止<span style="color: #2775b6"
            {{ item.name }}状态:已终止<span style="color: #2775b6"
              >(终止原因:患者痊愈回访结束,终止时间:2023-12-18 12:00)</span
            >
          </div>
          <div style="margin-top: 10px">
            随访发送时间:<span style="color: #2775b6">2023-11-23 12:00</span>
            {{ item.name }}发送时间:<span style="color: #2775b6"
              >2023-11-23 12:00</span
            >
          </div>
          <div style="margin-top: 10px">
            随访完成时间:<span style="color: #2775b6">2023-12-18 12:00</span>
            {{ item.name }}完成时间:<span style="color: #2775b6"
              >2023-12-18 12:00</span
            >
          </div>
          <div style="margin-top: 10px">
            疼痛程度:<span style="color: #2775b6">中度</span>
@@ -454,16 +458,17 @@
              border-left: 4px solid rgb(65, 161, 190);
            "
          >
            人工随访记录
            人工{{ item.name }}记录
          </div>
          <div style="margin-top: 10px">
            <el-row :gutter="20">
              <el-col :span="6"
                >随访日期:
                >{{ item.name }}日期:
                <span style="color: #2775b6">2023-11-22 11:22</span></el-col
              >
              <el-col :span="6"
                >随访人: <span style="color: #2775b6">吴小龙</span></el-col
                >{{ item.name }}人:
                <span style="color: #2775b6">吴小龙</span></el-col
              >
              <el-col :span="6"
                >患者配合度: <span style="color: #2775b6">高</span></el-col
@@ -471,10 +476,12 @@
            </el-row>
          </div>
          <div style="margin-top: 10px">
            随访结果: <span style="color: #2775b6">患者痊愈,身体倍棒</span>
            {{ item.name }}结果:
            <span style="color: #2775b6">患者痊愈,身体倍棒</span>
          </div>
          <div style="margin-top: 10px">
            随访备注: <span style="color: #2775b6">提醒注意饮食健康</span>
            {{ item.name }}备注:
            <span style="color: #2775b6">提醒注意饮食健康</span>
          </div>
        </el-card>
      </div>
@@ -650,6 +657,7 @@
      titletb: "新增联系方式",
      activeTab: "userinfo",
      id: "",
      loading: false,
      activeName: "health", //一类导航
      sonactiveName: "outpatient", //健康监测导航
      sontwoactiveName: "blood", //医疗档案导航
@@ -759,6 +767,9 @@
    };
  },
  created() {
    this.id = this.$route.query.id;
    this.getuserinfo();
    this.gettabList();
    this.$nextTick(function () {
      this.echartdom = document.getElementById("xyeCharts");
      this.xtechartdom = document.getElementById("xteCharts");
@@ -774,9 +785,6 @@
      this.xueyangechartsInit();
      this.twechartsInit();
    });
    this.id = this.$route.query.id;
    this.getuserinfo();
    this.gettabList();
  },
  methods: {
@@ -789,6 +797,9 @@
        this.tableData = response.rows;
      });
    },
    processElement(element) {
      return { ...element, isoperation: null };
    },
    // 获取基础信息
    getuserinfo() {
      const queryParams = {
@@ -799,18 +810,23 @@
      // 患者基础信息
      messagelistpatient(queryParams).then((response) => {
        this.userform = response.rows[0];
        this.dynamicTags = response.rows[0].tagList;
        // this.dynamicTags = response.rows[0].tagList;
        this.dynamicTags = response.rows[0].tagList.map(this.processElement);
        console.log(this.dynamicTags);
      });
      // 病史信息
      getmedicalhistory({ pid: this.id }).then((res) => {
        this.form = res.rows[0];
        if (res.code == 200 && res.rows[0]) {
          this.form = res.rows[0];
        }
      });
      // 联系信息
      this.getcontactlist();
    },
    // 保存患者档案
    savefile() {
      this.userform.tagList = this.dynamicTags;
      // this.userform.tagList = this.dynamicTags;
      this.userform.isoperation = 2;
      alterpatient(this.userform).then((res) => {
        if (res.code == 200) {
          this.$modal.msgSuccess("基础信息保存成功");
@@ -920,46 +936,83 @@
        .catch(() => {});
    },
    tableRowClassName({ row, rowIndex }) {
      console.log(row);
      if (row.isdefault == "1") {
        return "warning-row";
      }
      return "";
    },
    /** 查询标签列表 */
    gettabList() {
      const tagqueryParams = {
        pageNum: 1,
        pageSize: 1000,
        tagcategoryid: "0",
      };
      listtag(tagqueryParams).then((response) => {
        this.options = response.rows;
      });
    },
    // tab切换
    handleClick(tab, event) {
      console.log(tab, event);
    },
    // 联系方式新增
    Addanumber() {},
    // 标签--------------------------
    /** 查询标签列表 */
    gettabList() {
      const tagqueryParams = {
        pageNum: 1,
        pageSize: 10000,
        tagcategoryid: "0",
      };
      listtag(tagqueryParams).then((response) => {
        this.options = response.rows;
        console.log(this.options, "标签");
      });
    },
    remoteMethod(value) {
      const illnessqueryParams = {
        pageNum: 1,
        pageSize: 100,
        tagname: value,
        tagcategoryid: "0",
      };
      this.loading = true;
      setTimeout(() => {
        this.loading = false;
        listtag(illnessqueryParams).then((response) => {
          this.options = response.rows;
        });
      }, 200);
    },
    handleClose(tag) {
      const lindex = this.dynamicTags.indexOf(tag);
      this.dynamicTags.splice(this.dynamicTags.indexOf(tag), 1);
      this.userform.tagList[lindex].isoperation = 3;
    },
    showInput() {
      this.inputVisible = true;
      this.$nextTick((_) => {
        this.$refs.saveTagInput.$refs.input.focus();
      });
      console.log("展示");
    },
    handleInputConfirm() {
      let inputValue = this.inputValue;
      if (inputValue) {
        this.dynamicTags.push(inputValue);
      let tagvalue = {};
      let tagname = this.inputValue;
      if (tagname) {
        listtag({
          pageNum: 1,
          pageSize: 1000,
          tagcategoryid: "0",
          tagname: tagname,
        }).then((res) => {
          if (res.rows[0]) {
            tagvalue = res.rows[0];
            tagvalue.isoperation = 1;
          } else {
            tagvalue = {
              tagname: tagname,
              isoperation: 1,
            };
          }
          console.log(tagvalue);
          this.userform.tagList.push(tagvalue);
          this.dynamicTags.push(tagvalue);
          console.log(this.userform.tagList);
          console.log(this.dynamicTags);
        });
      }
      console.log("关了");
      this.inputVisible = false;
      this.inputValue = "";
    },
@@ -1452,7 +1505,7 @@
}
.xinz-inf {
  font-size: 18px;
  white-space: nowrap;
  // white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;