WXL
2024-09-12 2c4c416bf7950c72ffa2543a218e4fd993ee2af2
src/views/patient/propaganda/QuestionnaireTask.vue
@@ -176,6 +176,26 @@
                    </div>
                  </div>
                </el-form-item>
                <el-row>
                  <el-col :span="12"
                    ><el-form-item label="开场白" prop="kcb">
                      <el-input
                        type="textarea"
                          :rows="3"
                        v-model="form.kcb"
                        placeholder="请输入开场白"
                      /> </el-form-item
                  ></el-col>
                  <el-col :span="12"
                    ><el-form-item label="结束语" prop="jsy">
                      <el-input
                        type="textarea"
                        :rows="3"
                        v-model="form.jsy"
                        placeholder="请输入结束语"
                      /> </el-form-item
                  ></el-col>
                </el-row>
              </el-form>
            </div>
          </div>
@@ -286,6 +306,7 @@
                        </el-option>
                      </el-select>
                    </el-col>
                    <el-col :span="1.5">
                      <el-button
                        type="primary"
@@ -293,7 +314,7 @@
                        icon="el-icon-plus"
                        size="medium"
                        :disabled="!patientqueryParams.allhosp"
                        @click="handleAddpatient"
                        @click="handleQuery"
                        >新增</el-button
                      >
                    </el-col>
@@ -317,7 +338,7 @@
                    @details="detailhz"
                    @handleUpdate="handleUpdate"
                    :currentList="overallCase"
                    :tableLabel="tableLabelhz"
                    :tableLabel="tableLabelhzwb"
                    :serialnumber="false"
                    :searchTrue="true"
                    :multiplechoice="false"
@@ -369,6 +390,18 @@
                  @keyup.enter.native="handleQuery"
                ></el-input>
              </el-form-item>
              <el-select
                v-model="patientqueryParams.topica"
                placeholder="请选择患者来源"
              >
                <el-option
                  v-for="item in source"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value"
                >
                </el-option>
              </el-select>
              <el-form-item>
                <el-button
@@ -564,7 +597,7 @@
  getQtemplatelist,
  getQtemplateobj,
  TaskQuestioncomit,
  Questionnairetaskget,
  Questionnairetaskgetson,
  gethetaskinfo,
  delhetaskinfo,
  Editsingletask,
@@ -597,13 +630,25 @@
      questionList: [],
      // 患者表单
      tableLabelhz: [
        { label: "患者", width: "", prop: "name" },
        { label: "身份证", width: "200", prop: "idcardno" },
        { label: "性别", width: "", prop: "sex" },
        { label: "年龄", width: "", prop: "age" },
        { label: "医生", width: "", prop: "drname" },
        { label: "科室", width: "", prop: "deptName" },
        { label: "就诊/出院日期", width: "280", prop: "inhosptime" },
        { label: "出院日期", width: "150", prop: "inhosptime" },
          { label: "患者", width: "", prop: "name" },
          { label: "身份证", width: "200", prop: "idcardno" },
          { label: "性别", width: "", prop: "sex" },
          { label: "年龄", width: "", prop: "age" },
          { label: "医生", width: "", prop: "drname" },
          { label: "科室", width: "240", prop: "deptname" },
          { label: "病区", width: "240", prop: "leavehospitaldistrictname" },
      ],
      // 患者表单
      tableLabelhzwb: [
      { label: "出院日期", width: "150", prop: "inhosptime" },
          { label: "患者", width: "", prop: "name" },
          { label: "身份证", width: "200", prop: "sfzh" },
          { label: "性别", width: "", prop: "sex" },
          { label: "年龄", width: "", prop: "age" },
          { label: "医生", width: "", prop: "drname" },
          { label: "科室", width: "180", prop: "deptName" },
          { label: "病区", width: "150", prop: "leavehospitaldistrictname" },
      ],
      tableLabelwj: [
@@ -651,6 +696,7 @@
      patientqueryParams: {
        pageNum: 1, //
        pageSize: 10,
        topica:0,//0全部1科室2病区
      },
      topicoptions: [{ children: [{ children: [] }] }],
      showSearch: true, //
@@ -718,6 +764,8 @@
        templatename: "",
        templateid: null,
        libtemplateid: null,
        kcb:'亲爱的患者-家属,您好!我们是浙中医大二院的医护人员,为了更好地了解您的康复情况,请您抽一点宝贵时间,完成这份随访问卷。',
        jsy:'请您注意休息和营养,生活上要劳逸结合,适当锻炼,戒烟限酒,保持心情舒畅,定期复诊。那本次回访就到这里,祝您身体健康!',
      },
      taskoptions: [
        {
@@ -733,6 +781,21 @@
          label: "体检病人",
        },
      ],
      source: [
        {
          value: 0,
          label: "所有患者",
        },
        {
          value: 1,
          label: "科室患者",
        },
        {
          value: 2,
          label: "病区患者",
        },
      ],
      tasktypes: [
        {
          value: 1,
@@ -962,6 +1025,8 @@
    },
    // 保存
    submitForm(formName) {
      console.log(this.form.patTaskRelevances,'1.patTaskRelevances');
      console.log(this.overallCase,'this.form.overallCase');
      if (this.time4 && this.form.sendType == 3)
        this.form.showTimeMorn = this.time4;
      this.form.sendTimeslot = [
@@ -990,7 +1055,7 @@
      } else {
        return this.$modal.msgError("时间信息缺失");
      }
      console.log(this.form.patTaskRelevances,'2.patTaskRelevances');
      const filteredArray = this.variableList.filter(
        (item) =>
          item.name !== "姓名" && item.name !== "电话" && item.name !== "地址"
@@ -1030,7 +1095,7 @@
        this.Tasktemplate = row;
        this.questionList = row.svyTemplateLibScripts;
        getQtemplateobj({ svyid: row.svyid }).then((res) => {
          if (res.code==200) {
          if (res.code == 200) {
            this.questionList = res.rows[0].svyTemplateLibScripts;
            this.previewtf = true;
          }
@@ -1090,13 +1155,14 @@
      });
      if (this.patientqueryParams.allhosp == 1) {
        this.tableLabelhz = [
          { label: "出院日期", width: "150", prop: "inhosptime" },
          { label: "患者", width: "", prop: "name" },
          { label: "身份证", width: "200", prop: "idcardno" },
          { label: "性别", width: "", prop: "sex" },
          { label: "年龄", width: "", prop: "age" },
          { label: "医生", width: "", prop: "drname" },
          { label: "科室", width: "", prop: "deptName" },
          { label: "就诊/出院日期", width: "280", prop: "inhosptime" },
          { label: "科室", width: "180", prop: "deptname" },
          { label: "病区", width: "150", prop: "leavehospitaldistrictname" },
        ];
      } else if (this.patientqueryParams.allhosp == 2) {
        this.tableLabelhz = [
@@ -1104,7 +1170,8 @@
          { label: "性别", width: "", prop: "sex" },
          { label: "年龄", width: "", prop: "age" },
          { label: "诊断", width: "", prop: "diagname" },
          { label: "就诊科室", width: "", prop: "deptName" },
          { label: "科室", width: "", prop: "deptname" },
        { label: "病区", width: "", prop: "leavehospitaldistrictname" },
          { label: "入院日期", width: "", prop: "inhosptime" },
          { label: "创建人", width: "", prop: "createBy" },
        ];
@@ -1128,11 +1195,10 @@
    handleUpdate() {},
    handleDelete() {},
    handleExport() {},
    // 选择患者表数据
    handleSelectionChange(selection) {
      console.log("多选患者");
      this.SelectPatientslist = selection;
      console.log("多选患者",selection);
      this.SelectPatientslist = structuredClone(selection);
      this.multiple = !selection.length;
      // 赋值给整体选中数组
@@ -1142,8 +1208,15 @@
          item.isoperation = 1;
          item.patid = item.id;
          item.hospType = this.patientqueryParams.allhosp;
          item.sfzh = item.idcardno;
          item.deptCode = item.deptcode;
          item.deptName = item.deptname;
          item.admindate = item.inhosptime;
          item.sfzh = item.idcardno;
          console.log(item);
          this.overallCase.push(item);
          this.form.patTaskRelevances.push(item);
          console.log(this.form.patTaskRelevances,'patTaskRelevances');
        }
      });
    },
@@ -1189,6 +1262,18 @@
    },
    getList() {},
    handleQuery() {
      // if (this.patientqueryParams.topica == 0) {
      //   this.patientqueryParams.leavehospitaldistrictcodes =
      //     store.getters.leavehospitaldistrictcodes;
      //   this.patientqueryParams.leaveldeptcodes = store.getters.leaveldeptcodes;
      // } else if (this.patientqueryParams.topica == 1) {
      //   this.patientqueryParams.leavehospitaldistrictcodes = null;
      //   this.patientqueryParams.leaveldeptcodes = store.getters.leaveldeptcodes;
      // } else if (this.patientqueryParams.topica == 2) {
      //   this.patientqueryParams.leavehospitaldistrictcodes =
      //     store.getters.leavehospitaldistrictcodes;
      //   this.patientqueryParams.leaveldeptcodes = null;
      // }
      this.handleAddpatient();
    },
    resetQuery() {},
@@ -1222,10 +1307,12 @@
        templatename: "",
        templateid: null,
        libtemplateid: null,
        kcb:'亲爱的患者-家属,您好!我们是浙中医大二院的医护人员,为了更好地了解您的康复情况,请您抽一点宝贵时间,完成这份随访问卷。',
        jsy:'生活上要劳逸结合,注意休息和营养,适当锻炼,戒烟限酒,保持心情舒畅,定期复诊。那本次回访就到这里,祝您身体健康!',
      };
      this.questionList = [];
      if (this.id) {
        Questionnairetaskget({ taskid: this.id }).then((res) => {
        Questionnairetaskgetson({ taskid: this.id }).then((res) => {
          let filteredArray = "";
          if (res.code == 200) {
            this.form = res.data;