qinxianzhangyao
2024-04-25 74a7a2bbef241a023110ff24c8e7c84025e267f5
src/views/system/circle/index.vue
@@ -1,30 +1,78 @@
<template>
  <div class="app-container">
    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
    <el-form
      :model="queryParams"
      ref="queryForm"
      size="small"
      :inline="true"
      v-show="showSearch"
      label-width="68px"
    >
      <el-form-item label="姓名" prop="name">
        <el-input  v-model="queryParams.name" placeholder="请输入姓名" style="width: 100px"
          @keyup.enter.native="handleQuery" />
        <el-input
          v-model="queryParams.name"
          placeholder="请输入姓名"
          style="width: 100px"
          @keyup.enter.native="handleQuery"
        />
      </el-form-item>
      <el-form-item label="体检号" prop="tjNum">
        <el-input style="width: 170px" v-model="queryParams.tjNum" placeholder="请输入体检号" clearable
          @keyup.enter.native="handleQuery" @blur="hb" ref="inputName" />
        <el-input
          style="width: 170px"
          v-model="queryParams.tjNum"
          placeholder="请输入体检号"
          clearable
          @keyup.enter.native="handleQuery"
          @blur="hb"
          ref="inputName"
        />
      </el-form-item>
      <el-form-item label="登记时间" prop="createTimeList">
        <el-date-picker v-model="createTimeList" type="datetimerange" align="right" :picker-options="pickerOptions"
          style="width: 310px" start-placeholder="开始日期" end-placeholder="结束日期" :default-time="['00:00:00', '23:00:00']"
          format="yyyy-MM-dd HH:mm" value-format="yyyy-MM-dd HH:mm" @change="dateChangebirthday1">
        <el-date-picker
          v-model="createTimeList"
          type="datetimerange"
          align="right"
          :picker-options="pickerOptions"
          style="width: 310px"
          start-placeholder="开始日期"
          end-placeholder="结束日期"
          :default-time="['00:00:00', '23:00:00']"
          format="yyyy-MM-dd HH:mm"
          value-format="yyyy-MM-dd HH:mm"
          @change="dateChangebirthday1"
        >
        </el-date-picker>
      </el-form-item>
      <el-form-item label="单位名称" prop="firmId">
        <el-select :remote-method="getRemoteData" v-model="queryParams.firmId" value-key="drugManufacturerId" remote
          filterable placeholder="请选择单位名称" clearable @change="searchSelect">
          <el-option v-for="dict in CompanyList" :key="dict.drugManufacturerId" :label="dict.cnName"
            :value="dict.drugManufacturerId" />
        <el-select
          :remote-method="getRemoteData"
          v-model="queryParams.firmId"
          value-key="drugManufacturerId"
          remote
          filterable
          placeholder="请选择单位名称"
          clearable
          @change="searchSelect"
        >
          <el-option
            v-for="dict in CompanyList"
            :key="dict.drugManufacturerId"
            :label="dict.cnName"
            :value="dict.drugManufacturerId"
          />
        </el-select>
      </el-form-item>
      <el-form-item>
        <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
        <el-button
          type="primary"
          icon="el-icon-search"
          size="mini"
          @click="handleQuery"
          >搜索</el-button
        >
        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
          >重置</el-button
        >
      </el-form-item>
    </el-form>
@@ -47,50 +95,142 @@
    </el-row> -->
    <template>
      <el-table border style="margin: 14px; width: 99%" v-loading="loading" :data="orderList"
        @selection-change="handleSelectionChange" ref="multipleTable">
        <el-table-column type="selection" width="40px" align="center" height="10px" fixed="left" />
        <el-table-column label="序号" align="center" prop="newID" width="50px" fixed="left" height="10px" />
        <el-table-column label="姓名" align="center" prop="tjCustomerName" height="10px" width="90px" fixed="left"
          :show-overflow-tooltip="true" />
        <el-table-column label="性别" align="center" prop="tjCustomerSex" width="50px" height="10px"
          :show-overflow-tooltip="true">
      <el-table
        border
        style="margin: 14px; width: 99%"
        v-loading="loading"
        :data="orderList"
        @selection-change="handleSelectionChange"
        ref="multipleTable"
      >
        <el-table-column
          type="selection"
          width="40px"
          align="center"
          height="10px"
          fixed="left"
        />
        <el-table-column
          label="序号"
          align="center"
          prop="newID"
          width="50px"
          fixed="left"
          height="10px"
        />
        <el-table-column
          label="姓名"
          align="center"
          prop="tjCustomerName"
          height="10px"
          width="90px"
          fixed="left"
          :show-overflow-tooltip="true"
        />
        <el-table-column
          label="性别"
          align="center"
          prop="tjCustomerSex"
          width="50px"
          height="10px"
          :show-overflow-tooltip="true"
        >
          <template slot-scope="scope">
            <span v-if="scope.row.tjCustomerSex == '0'">男</span>
            <span v-if="scope.row.tjCustomerSex == '1'">女</span>
            <span v-if="scope.row.tjCustomerSex == '2'">未知</span>
          </template>
        </el-table-column>
        <el-table-column label="年龄" align="center" prop="tjCustomerAge" height="10px" width="60px"
          :show-overflow-tooltip="true" />
        <el-table-column label="电话" align="center" prop="tjCustomerPhone" :show-overflow-tooltip="true" height="10px"
          width="110px" />
        <el-table-column label="体检类型" align="center" prop="tjType" height="10px" width="80px"
          :show-overflow-tooltip="true">
        <el-table-column
          label="年龄"
          align="center"
          prop="tjCustomerAge"
          height="10px"
          width="60px"
          :show-overflow-tooltip="true"
        />
        <el-table-column
          label="电话"
          align="center"
          prop="tjCustomerPhone"
          :show-overflow-tooltip="true"
          height="10px"
          width="110px"
        />
        <el-table-column
          label="体检类型"
          align="center"
          prop="tjType"
          height="10px"
          width="80px"
          :show-overflow-tooltip="true"
        >
          <template slot-scope="scope">
            <span v-if="scope.row.tjType == '1'">个人</span>
            <span v-if="scope.row.tjType == '2'">团队</span>
          </template>
        </el-table-column>
        <el-table-column label="体检号" align="center" prop="tjNumber" :show-overflow-tooltip="true" width="160px" />
        <el-table-column label="所选套餐" align="center" prop="pacName" height="10px" :show-overflow-tooltip="true"
          width="140px" />
        <el-table-column label="体检次数" align="center" prop="tjCount" height="10px" width="100px" />
        <el-table-column label="登记人" align="center" prop="createBy" height="10px" :show-overflow-tooltip="true"
          width="100px" />
        <el-table-column label="登记时间" align="center" prop="createTime" width="155px" height="10px"
          :show-overflow-tooltip="true">
        <el-table-column
          label="体检号"
          align="center"
          prop="tjNumber"
          :show-overflow-tooltip="true"
          width="160px"
        />
        <el-table-column
          label="所选套餐"
          align="center"
          prop="pacName"
          height="10px"
          :show-overflow-tooltip="true"
          width="140px"
        />
        <el-table-column
          label="体检次数"
          align="center"
          prop="tjCount"
          height="10px"
          width="100px"
        />
        <el-table-column
          label="登记人"
          align="center"
          prop="createBy"
          height="10px"
          :show-overflow-tooltip="true"
          width="100px"
        />
        <el-table-column
          label="登记时间"
          align="center"
          prop="createTime"
          width="155px"
          height="10px"
          :show-overflow-tooltip="true"
        >
          <template slot-scope="scope">
            <span>{{ parseTime(scope.row.createTime) }}</span>
          </template>
        </el-table-column>
        <el-table-column label="报告时间" align="center" prop="reportTime" width="155px" height="10px"
          :show-overflow-tooltip="true">
        <el-table-column
          label="报告时间"
          align="center"
          prop="reportTime"
          width="155px"
          height="10px"
          :show-overflow-tooltip="true"
        >
          <template slot-scope="scope">
            <span>{{ parseTime(scope.row.reportTime) }}</span>
          </template>
        </el-table-column>
        <el-table-column label="备注" align="center" prop="remark" height="10px" :show-overflow-tooltip="true" />
        <el-table-column
          label="备注"
          align="center"
          prop="remark"
          height="10px"
          :show-overflow-tooltip="true"
        />
        <!-- <el-table-column label="创建人" align="center" prop="createBy" /> -->
        <!-- <el-table-column label="更新人" align="center" prop="updateBy" /> -->
        <!-- <el-table-column label="单位名称" align="center" prop="dictCompName" :show-overflow-tooltip="true" height="10px" /> -->
@@ -104,16 +244,44 @@
                }}</span>
              </template>
            </el-table-column> -->
        <el-table-column fixed="right" label="操作" align="center" class-name="small-padding fixed-width" height="10px"
          width="88px">
        <el-table-column
          fixed="right"
          label="操作"
          align="center"
          class-name="small-padding fixed-width"
          height="10px"
          width="88px"
        >
          <template slot-scope="scope">
            <el-button size="mini" type="text" icon="el-icon-document" @click="investigation(scope.row)"
              v-hasPermi="['hosp:order:edit']" title="详情" style="margin-right: 15px"></el-button>
            <el-button
              size="mini"
              type="text"
              icon="el-icon-document"
              @click="investigation(scope.row)"
              v-hasPermi="['hosp:order:edit']"
              title="详情"
              style="margin-right: 15px"
            ></el-button>
            <el-button
              size="mini"
              type="text"
              icon="el-icon-time"
              @click="handleUpdate(scope.row)"
              v-hasPermi="['hosp:order:edit']"
              title="问卷记录"
              style="margin-right: 15px"
            ></el-button>
              
                <el-button size="mini"  v-if="scope.row.tjCount >= 2" type="text" icon="el-icon-s-operation" @click="contrastgation(scope.row)"
              v-hasPermi="['hosp:order:edit']" title="数据对比" style="margin-right: 15px"></el-button>
            <el-button
              size="mini"
              v-if="scope.row.tjCount >= 2"
              type="text"
              icon="el-icon-s-operation"
              @click="contrastgation(scope.row)"
              v-hasPermi="['hosp:order:edit']"
              title="数据对比"
              style="margin-right: 15px"
            ></el-button>
          </template>
        </el-table-column>
      </el-table>
@@ -121,51 +289,111 @@
    <div class="pag">
      <div class="pag1">
        <pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize"
          @pagination="getList" />
        <pagination
          v-show="total > 0"
          :total="total"
          :page.sync="queryParams.pageNum"
          :limit.sync="queryParams.pageSize"
          @pagination="getList"
        />
      </div>
    </div>
    <el-drawer title="我是标题" :visible.sync="drawer" :with-header="false" size="40%">
      <el-divider content-position="center"><span style="font-size:18px;font-weight: 800;">满意度回访调查</span></el-divider>
    <el-drawer
      title="我是标题"
      :visible.sync="drawer"
      :with-header="false"
      size="65%"
    >
      <el-divider content-position="center"
        ><span style="font-size: 18px; font-weight: 800"
          >满意度回访调查</span
        ></el-divider
      >
      <div class="drawer1">
        <div>
        <el-row>
          <el-col :span="12">
          <!-- <div class="drawer2"> -->
            <div style="margin-bottom: 10px">体检人:{{ gation.tjCustomerName }}</div><br />
            <div>联系电话:{{ gation.tjCustomerPhone }}
              <a class="a">切换号码</a></div>
            <el-button style="margin: 10px 5px; width: 80px" type="primary" size="mini"
              @click="dialogVisibles">拨号</el-button>
            <div style="margin-bottom: 10px">
              体检人:{{ gation.tjCustomerName }}
            </div>
            <br />
            <div>
              联系电话:{{ gation.tjCustomerPhone }} <a class="a">切换号码</a>
            </div>
            <el-button
              style="margin: 10px 5px; width: 80px"
              type="primary"
              size="mini"
              @click="dialogVisibles"
              >拨号</el-button
            >
          <!-- </div> -->
          <el-tabs v-model="activeNames" type="card" @tab-click="handleClick">
            <el-tab-pane label="基本信息" name="first">
              <!-- <div class="drawer3"> -->
                <div style="margin: 10px 10px;">姓名:{{ gation.tjCustomerName }}</div>
                <div style="margin: 10px 10px;">年龄:{{ gation.tjCustomerAge }}</div>
                <div style="margin: 10px 10px;">团体/个人:{{ gation.tjType ? "团队" : "个人" }}</div>
                <div style="margin: 10px 10px;">联系人:{{ gation.checkDoctor }}</div>
                <div style="margin: 10px 10px;">体检次数:{{ gation.tjCount }}</div>
                <div style="margin: 10px 10px;">性别:{{ gation.tjCustomerSex ? "女" : "男" }}</div>
                <div style="margin: 10px 10px;">体检号:{{ gation.tjNumber }}</div>
                <div style="margin: 10px 10px;">报告时间:{{ gation.createTime }}</div>
                <div style="margin: 10px 10px;">体检时间:{{ gation.finishTime }}</div>
                <el-button type="primary" size="mini" @click="viewReport1">最近一次体检报告</el-button>
                <div style="margin: 10px 10px">
                  姓名:{{ gation.tjCustomerName }}
                </div>
                <div style="margin: 10px 10px">
                  年龄:{{ gation.tjCustomerAge }}
                </div>
                <div style="margin: 10px 10px">
                  团体/个人:{{ gation.tjType ? "团队" : "个人" }}
                </div>
                <div style="margin: 10px 10px">
                  联系人:{{ gation.checkDoctor }}
                </div>
                <div style="margin: 10px 10px">
                  体检次数:{{ gation.tjCount }}
                </div>
                <div style="margin: 10px 10px">
                  性别:{{ gation.tjCustomerSex ? "女" : "男" }}
                </div>
                <div style="margin: 10px 10px">
                  体检号:{{ gation.tjNumber }}
                </div>
                <div style="margin: 10px 10px">
                  报告时间:{{ gation.createTime }}
                </div>
                <div style="margin: 10px 10px">
                  体检时间:{{ gation.finishTime }}
                </div>
                <el-button type="primary" size="mini" @click="viewReport1"
                  >最近一次体检报告</el-button
                >
              <!-- </div> -->
            </el-tab-pane>
            <el-tab-pane label="发送短信" name="second">
              <el-form ref="form" :model="form" label-width="80px">
                <el-form-item label="短信通知">
                  <el-select v-model="form.region" placeholder="请选择短信通知" @change="sendtext">
                    <el-option v-for="dict in sendtextList" :key="dict.id" :label="dict.tempTitle"
                      :value="dict.id"></el-option>
                    <el-select
                      v-model="form.region"
                      placeholder="请选择短信通知"
                      @change="sendtext"
                    >
                      <el-option
                        v-for="dict in sendtextList"
                        :key="dict.id"
                        :label="dict.tempTitle"
                        :value="dict.id"
                      ></el-option>
                  </el-select>
                </el-form-item>
                <el-form-item label="短信内容">
                  <el-input style="width: 230px" type="textarea" :rows="13" placeholder="请输入短信内容" v-model="textarea">
                    <el-input
                      style="width: 230px"
                      type="textarea"
                      :rows="13"
                      placeholder="请输入短信内容"
                      v-model="textarea"
                    >
                  </el-input>
                </el-form-item>
                <el-form-item>
                  <el-button type="primary" size="mini" @click="sendingtext">提交发送</el-button>
                    <el-button type="primary" size="mini" @click="sendingtext"
                      >提交发送</el-button
                    >
                  <el-button>取消</el-button>
                </el-form-item>
              </el-form>
@@ -173,60 +401,158 @@
            <el-tab-pane label="发送邮件" name="third">
              <el-form ref="form" :model="form" label-width="80px">
                <el-form-item label="邮件通知">
                  <el-select v-model="form.region1" placeholder="请选择邮件通知" @change="sendTemplate">
                    <el-option v-for="dict in sendTemplateList" :key="dict.id" :label="dict.tempTitle"
                      :value="dict.id"></el-option>
                    <el-select
                      v-model="form.region1"
                      placeholder="请选择邮件通知"
                      @change="sendTemplate"
                    >
                      <el-option
                        v-for="dict in sendTemplateList"
                        :key="dict.id"
                        :label="dict.tempTitle"
                        :value="dict.id"
                      ></el-option>
                  </el-select>
                </el-form-item>
                <el-form-item label="邮件内容">
                  <el-input style="width: 230px" type="textarea" :rows="13" placeholder="请输入邮件内容" v-model="textarea1">
                    <el-input
                      style="width: 230px"
                      type="textarea"
                      :rows="13"
                      placeholder="请输入邮件内容"
                      v-model="textarea1"
                    >
                  </el-input>
                </el-form-item>
                <el-form-item>
                  <el-button type="primary" size="mini" @click="sendingmail">提交发送</el-button>
                    <el-button type="primary" size="mini" @click="sendingmail"
                      >提交发送</el-button
                    >
                </el-form-item>
              </el-form>
            </el-tab-pane>
            <el-tab-pane label="健康宣教" name="fourth">
              <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch"
                label-width="100px">
                <el-form
                  :model="queryParams"
                  ref="queryForm"
                  size="small"
                  :inline="true"
                  v-show="showSearch"
                  label-width="100px"
                >
                <el-form-item label="知识库类型" prop="emertype">
                  <el-select v-model="queryParam.emertype" filterable placeholder="请选择知识库类型" clearable>
                    <el-option v-for="dict in emertype" :key="dict.emertype" :label="dict.emertype"
                      :value="dict.emertype" />
                  </el-select> </el-form-item><br />
                    <el-select
                      v-model="queryParam.emertype"
                      filterable
                      placeholder="请选择知识库类型"
                      clearable
                    >
                      <el-option
                        v-for="dict in emertype"
                        :key="dict.emertype"
                        :label="dict.emertype"
                        :value="dict.emertype"
                      />
                    </el-select> </el-form-item
                  ><br />
                <el-form-item label="知识库标题" prop="emertitle">
                  <el-select v-model="queryParam.emertitle" filterable placeholder="请选择知识库标题" clearable>
                    <el-option v-for="dict in emertype" :key="dict.emertitle" :label="dict.emertitle"
                      :value="dict.emertitle" />
                    <el-select
                      v-model="queryParam.emertitle"
                      filterable
                      placeholder="请选择知识库标题"
                      clearable
                    >
                      <el-option
                        v-for="dict in emertype"
                        :key="dict.emertitle"
                        :label="dict.emertitle"
                        :value="dict.emertitle"
                      />
                  </el-select>
                </el-form-item>
                <el-form-item>
                  <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuerys">搜索</el-button>
                    <el-button
                      type="primary"
                      icon="el-icon-search"
                      size="mini"
                      @click="handleQuerys"
                      >搜索</el-button
                    >
                </el-form-item>
                <el-table height="600px" v-loading="loading" :data="emerList" v-show="emerc" style="width: 400px">
                  <el-table
                    height="600px"
                    v-loading="loading"
                    :data="emerList"
                    v-show="emerc"
                    style="width: 400px"
                  >
                  <el-table-column label="知识库内容" prop="emercontent" />
                </el-table>
              </el-form>
            </el-tab-pane>
          </el-tabs>
        </div>
        <div>
          </el-col>
          <el-col :span="12">
            <div v-if="wenjuan == true">
          <div>
            <el-form v-for="(item, index) in intList" :key="index">
              <el-form-item>{{ index + 1 > 9 ? index + 1 : "0" + (index + 1) }}.{{ item.question }}(必填)<br />
                <label v-for="(item5, index) in item.tjSurveyOptionsList" :key="index">
                  <input type="radio" :name="item5.qid" :value="item5.oid" @click="fn" /><label class="inp">{{
                    item5.ooption }}</label>
                  <el-form-item
                    >{{ index + 1 > 9 ? index + 1 : "0" + (index + 1) }}.{{
                      item.question
                    }}(必填)<br />
                    <label
                      v-for="(item5, index) in item.tjSurveyOptionsList"
                      :key="index"
                    >
                      <input
                        type="radio"
                        :name="item5.qid"
                        :value="item5.oid"
                        @click="fn"
                      /><label class="inp">{{ item5.ooption }}</label>
                </label>
              </el-form-item>
            </el-form>
          </div>
          <el-button type="primary" size="mini" @click="tijiao">提交</el-button>
              <el-button type="primary" size="mini" @click="tijiao"
                >提交</el-button
              >
        </div>
            <div v-if="wenjuan == false">
              <Write :forms="formss" @fMethod="fatherSub"></Write>
            </div>
          </el-col>
        </el-row>
      </div>
    </el-drawer>
    <!-- 问卷记录对话框 -->
    <el-dialog :visible.sync="wenjuanopen" width="800px" append-to-body>
      <div style="width: 100%" class="outside">
        <el-timeline>
          <el-timeline-item
            placement="top"
            v-for="(item, index) in suifangList"
            :key="index"
          >
            <el-card>
              {{ item.createTime }}
              <h4>体检号:{{ item.tjNumber }}</h4>
              <span class="mx" @click="lookmingxi(item)">查看明细</span>
            </el-card>
          </el-timeline-item>
        </el-timeline>
      </div>
    </el-dialog>
    <DataView
      v-if="formModel && formKey"
      ref="viewOrUpdateDialog"
      :fields="fields"
      :form-key="formKey"
      :form-model="formModel"
    />
  </div>
</template>
@@ -234,21 +560,33 @@
var inpArr = document.getElementsByTagName("input"),
  result = "";
import print from "print-js";
import { getsendEmail, getsendMessage, getNewDateList } from "@/api/hosp/order";
import moment from "moment";
import Write from "@/components/write";
import { listSendTemplate } from "@/api/hosp/sendTemplate";
import {
  listSendTemplate,
} from "@/api/hosp/sendTemplate";
import { getPdf, printCode, getWenJuanList } from "@/api/hosp/order";
  getPdf,
  printCode,
  getWenJuanList,
  getsendEmail,
  getsendMessage,
  getNewDateList,
  getRecordByTjNumber,
  listFormFieldsRequest,
  listFormDataTableRequest,
} from "@/api/hosp/order";
import { addSurveyRecord } from "@/api/hosp/surveyRecord";
import { listEmer, getDictEmerList } from "@/api/system/emer";
import ViewPdf from "@/components/ViewPdf";
import { getCompany, queryCompany } from "@/api/team/tuanti";
import DataView from "@/components/dataView";
export default {
  components: {
    ViewPdf,
    Write,
    DataView,
  },
  name: "Order",
  inject: ["reload"],
  data() {
    return {
      data: [],
@@ -259,6 +597,14 @@
      ooids: "",
      tjSurveyList: [],
      intList: {},
      formss: {
        tjNumber: "",
        formkey: "",
      },
      formKey: "",
      formModel: {},
      fields: [],
      wenjuan: true,
      mid: "1",
      emerc: false,
      // 知识库表格数据
@@ -276,6 +622,8 @@
      dialogVisible: false,
      daoZhenDan: false,
      Projectopen: false,
      wenjuanopen: false,
      suifangList: [],
      src: "",
      url: "",
      flag: true,
@@ -345,7 +693,6 @@
        djbeginTime: undefined,
        djendTime: undefined,
        name: undefined,
      },
      queryParam: {
        emertitle: null,
@@ -409,8 +756,8 @@
      getNewDateList().then((res) => {
        this.createTimeList = [
            moment(res.data).format("YYYY-MM-DD 00:00:00"),
            moment(res.data).format("YYYY-MM-DD 23:59:00")
          ];;
          moment(res.data).format("YYYY-MM-DD 23:59:00"),
        ];
          this.getList();
      });
    },
@@ -460,12 +807,19 @@
    },
    contrastgation(row) {
      const tjNumber = row.tjNumber
      const tjCustomerName = row.tjCustomerName
      const tjCustomerSex = row.tjCustomerSex
      const tjCustomerPhone = row.tjCustomerPhone
      this.$router.push({ path: '/hosp/datacomparison', query: { tjNumber: tjNumber,tjCustomerName:tjCustomerName,tjCustomerSex:tjCustomerSex, tjCustomerPhone:tjCustomerPhone} })
      const tjNumber = row.tjNumber;
      const tjCustomerName = row.tjCustomerName;
      const tjCustomerSex = row.tjCustomerSex;
      const tjCustomerPhone = row.tjCustomerPhone;
      this.$router.push({
        path: "/hosp/datacomparison",
        query: {
          tjNumber: tjNumber,
          tjCustomerName: tjCustomerName,
          tjCustomerSex: tjCustomerSex,
          tjCustomerPhone: tjCustomerPhone,
        },
      });
    },
    // 最近一次体检报告
@@ -585,7 +939,6 @@
      this.getList();
    },
    hb() {
      console.log(this.queryParams.tjNum);
      if (this.queryParams.tjNum != undefined) {
        this.handleQuery();
      }
@@ -597,7 +950,7 @@
    },
    /** 重置按钮操作 */
    resetQuery() {
      this.createTimeList = []
      this.createTimeList = [];
      this.resetForm("queryForm");
      this.handleQuery();
    },
@@ -618,56 +971,105 @@
    investigation(row) {
      this.gation = row;
      this.drawer = true;
      let mid = "1";
      this.formss.tjNumber = this.gation.tjNumber;
      let mid = "22";
      printCode(mid).then((response) => {
        if (response.data) {
        this.intList = response.data;
          this.wenjuan = true;
        } else {
          this.formss.formkey = response.msg;
          this.wenjuan = false;
        }
        this.drawer = true;
      });
      this.querySendTemplate.tempType = 1
      listSendTemplate(this.querySendTemplate).then(response => {
      this.querySendTemplate.tempType = 1;
      listSendTemplate(this.querySendTemplate).then((response) => {
        // 邮件模板
        this.sendTemplateList = response.rows;
      });
      this.querySendTemplate.tempType = 2
      listSendTemplate(this.querySendTemplate).then(response => {
      this.querySendTemplate.tempType = 2;
      listSendTemplate(this.querySendTemplate).then((response) => {
        // 短信模板
        this.sendtextList = response.rows;
      });
    },
    fatherSub() {
      this.hangshu = false;
      this.reload();
    },
    sendTemplate(val) {
      this.tempIds = val
      this.sendTemplateList.forEach(item => {
        if (item.id == val) {
          this.textarea1 = item.tempContent
    handleUpdate(row) {
      this.reset();
      let tjNumber = row.tjNumber;
      getRecordByTjNumber(tjNumber).then((res) => {
        if (res.data.length != 0) {
          this.wenjuanopen = true;
          res.data.sort(
              (a, b) =>
                new Date(b.createTime).getTime() -
                new Date(a.createTime).getTime()
            );
          this.suifangList = res.data;
        } else {
          this.$message.warning("暂无问卷记录!");
        }
      })
      });
    },
    lookmingxi(val) {
      this.formKey = val.formKey;
      if(this.suifangList.length <= 1 ){
        this.wenjuanopen = false;
      }
      let data = {
        formKey: this.formKey,
      };
      listFormDataTableRequest(data).then((res) => {
        res.data.rows.forEach((item) => {
          if (item.id == val.id) {
            this.formModel = item;
          }
        });
        listFormFieldsRequest(this.formKey).then((res) => {
          this.fields = res.data;
          this.$refs.viewOrUpdateDialog.showDialog();
        });
      });
    },
    sendTemplate(val) {
      this.tempIds = val;
      this.sendTemplateList.forEach((item) => {
        if (item.id == val) {
          this.textarea1 = item.tempContent;
        }
      });
    },
    sendtext(val) {
      this.tempId = val
      this.sendtextList.forEach(item => {
      this.tempId = val;
      this.sendtextList.forEach((item) => {
        if (item.id == val) {
          this.textarea = item.tempContent
          this.textarea = item.tempContent;
        }
      })
      });
    },
    // 发送短信
    sendingtext() {
      if (this.tempId) {
        let orderIds = []
        orderIds.push(this.gation.orderId)
        let orderIds = [];
        orderIds.push(this.gation.orderId);
        let data = {
          orderIds: orderIds,
          tempId: this.tempId
        }
          tempId: this.tempId,
        };
        getsendMessage(data).then((res) => {
          if (res.code === 200) {
            this.$modal.msgSuccess("发送成功");
            this.getList()
            this.getList();
          }
        })
        this.drawer = false
        });
        this.drawer = false;
      } else {
        this.$modal.msgError("请选择短信模板");
      }
@@ -676,23 +1078,22 @@
    // 发送邮件
    sendingmail() {
      if (this.tempId) {
        let orderIds = []
        orderIds.push(this.gation.orderId)
        let orderIds = [];
        orderIds.push(this.gation.orderId);
        let data = {
          orderIds: orderIds,
          tempId: this.tempIds
        }
          tempId: this.tempIds,
        };
        getsendEmail(data).then((res) => {
          if (res.code === 200) {
            this.$modal.msgSuccess("发送成功");
            this.getList()
            this.getList();
          }
        })
        this.drawer = false
        });
        this.drawer = false;
      } else {
        this.$modal.msgError("请选择邮件模板");
      }
    },
    //提交按钮
@@ -717,7 +1118,7 @@
              oid: result,
              ooption: this.ooption,
            });
            let fromBy = "pc端"
            let fromBy = "pc端";
            let mid = "1";
            let mname = "满意度回访模板1";
            this.data.push({
@@ -762,7 +1163,7 @@
      // tjSurveyRecord.push(this.data);
      addSurveyRecord(this.data).then((res) => {
        this.$modal.msgSuccess("问卷提交成功");
      })
      });
    },
    /** 导出按钮操作 */
@@ -825,8 +1226,12 @@
  flex-direction: row;
  justify-content: space-evenly;
  align-items: flex-start;
  padding: 10px 20px;
}
.mx {
  color: #1890ff;
  cursor: pointer;
}
.drawer2 {
  height: 100px;
  display: flex;
@@ -874,4 +1279,13 @@
.inp {
  font-weight: normal;
}
.outside {
  width: 500px;
  max-height: 700px;
  overflow-y: auto;
  display: flex;
  margin-top: 8px;
  flex-direction: column;
}
</style>