<template> 
 | 
  <div class="Questionnairemanagement"> 
 | 
    <!-- 右侧数据 --> 
 | 
  
 | 
    <div class="leftvlue"> 
 | 
      <div class="leftvlue-bg"> 
 | 
        <el-row :gutter="20"> 
 | 
          <!--用户数据--> 
 | 
          <el-col :span="24" :xs="24"> 
 | 
            <el-form 
 | 
              :model="queryParams" 
 | 
              ref="queryForm" 
 | 
              size="small" 
 | 
              :inline="true" 
 | 
              v-show="showSearch" 
 | 
              label-width="98px" 
 | 
            > 
 | 
  
 | 
              <el-form-item label="患者姓名" prop="name"> 
 | 
                <el-input 
 | 
                  v-model="queryParams.name" 
 | 
                  placeholder="请输入姓名" 
 | 
                  maxlength="30" 
 | 
                  @keyup.enter.native="handleQuery" 
 | 
                /> 
 | 
              </el-form-item> 
 | 
  
 | 
              <el-form-item label="联系电话" prop="telcode"> 
 | 
                <el-input 
 | 
                  v-model="queryParams.telcode" 
 | 
                  placeholder="请输入联系电话" 
 | 
                  maxlength="30" 
 | 
                  @keyup.enter.native="handleQuery" 
 | 
                /> 
 | 
              </el-form-item> 
 | 
  
 | 
              <el-form-item> 
 | 
                <el-button 
 | 
                  type="primary" 
 | 
                  icon="el-icon-search" 
 | 
                  size="medium" 
 | 
                  @click="handleQuery" 
 | 
                  >搜索</el-button 
 | 
                > 
 | 
                <el-button 
 | 
                  icon="el-icon-refresh" 
 | 
                  size="medium" 
 | 
                  @click="resetQuery" 
 | 
                  >重置</el-button 
 | 
                > 
 | 
              </el-form-item> 
 | 
            </el-form> 
 | 
  
 | 
            <el-row :gutter="10" class="mb8"> 
 | 
              <el-col :span="1.5"> 
 | 
                <el-button 
 | 
                  type="primary" 
 | 
                  plain 
 | 
                  icon="el-icon-plus" 
 | 
                  size="medium" 
 | 
                  @click="handleAdd" 
 | 
                  v-hasPermi="['system:user:add']" 
 | 
                  >新增</el-button 
 | 
                > 
 | 
              </el-col> 
 | 
  
 | 
              <el-col :span="1.5"> 
 | 
                <el-button 
 | 
                  type="danger" 
 | 
                  plain 
 | 
                  icon="el-icon-delete" 
 | 
                  size="medium" 
 | 
                  :disabled="multiple" 
 | 
                  @click="handleDelete" 
 | 
                  v-hasPermi="['system:user:remove']" 
 | 
                  >删除</el-button 
 | 
                > 
 | 
              </el-col> 
 | 
  
 | 
              <el-col :span="6"> 
 | 
                <div class="documentf"> 
 | 
                  <div class="document"> 
 | 
                    <el-button 
 | 
                      type="info" 
 | 
                      plain 
 | 
                      icon="el-icon-upload2" 
 | 
                      size="medium" 
 | 
                      @click="handleImport" 
 | 
  
 | 
                      >导入</el-button 
 | 
                    > 
 | 
                  </div> 
 | 
                  <div class="document"> 
 | 
                    <el-button 
 | 
                      type="warning" 
 | 
                      plain 
 | 
                      icon="el-icon-download" 
 | 
                      size="medium" 
 | 
                      @click="handleExport" 
 | 
  
 | 
                      >导出</el-button 
 | 
                    > 
 | 
                  </div> 
 | 
                </div> 
 | 
              </el-col> 
 | 
              <!-- <el-col :span="1.5"> </el-col> --> 
 | 
            </el-row> 
 | 
            <el-table 
 | 
              v-loading="loading" 
 | 
              :data="userList" 
 | 
              height="808" 
 | 
              @selection-change="handleSelectionChange" 
 | 
            > 
 | 
              <el-table-column type="selection" width="50" align="center" /> 
 | 
              <!-- <el-table-column 
 | 
                fixed 
 | 
                label="序号" 
 | 
                align="center" 
 | 
                key="id" 
 | 
                prop="id" 
 | 
              /> --> 
 | 
              <el-table-column 
 | 
                fixed 
 | 
                label="姓名" 
 | 
          width="100" 
 | 
                align="center" 
 | 
                key="name" 
 | 
                prop="name" 
 | 
              /> 
 | 
              <el-table-column label="性别"width="100" align="center" key="sex" prop="sex"> 
 | 
                <template slot-scope="scope"> 
 | 
                  <span>{{ scope.row.sex == 1 ? "男" : "女" }}</span> 
 | 
                </template> 
 | 
              </el-table-column> 
 | 
              <el-table-column 
 | 
                label="年龄" 
 | 
                align="center" 
 | 
                key="age" 
 | 
                prop="age" 
 | 
                width="60" 
 | 
              /> 
 | 
              <el-table-column 
 | 
                label="出生年月" 
 | 
                align="center" 
 | 
                key="birthdate" 
 | 
                prop="birthdate" 
 | 
                width="120" 
 | 
              > 
 | 
              </el-table-column> 
 | 
              <el-table-column 
 | 
                label="证件号码" 
 | 
                align="center" 
 | 
                key="idcardno" 
 | 
                prop="idcardno" 
 | 
                width="190" 
 | 
              /> 
 | 
  
 | 
              <el-table-column 
 | 
                label="联系方式" 
 | 
                align="center" 
 | 
                key="telcode" 
 | 
                prop="telcode" 
 | 
                width="120" 
 | 
              /> 
 | 
              <el-table-column 
 | 
                label="建档日期" 
 | 
                align="center" 
 | 
                key="createTime" 
 | 
                prop="createTime" 
 | 
                width="160" 
 | 
              > 
 | 
                <template slot-scope="scope"> 
 | 
                  <span>{{ formatTime(scope.row.createTime) }}</span> 
 | 
                </template> 
 | 
              </el-table-column> 
 | 
              <el-table-column 
 | 
                label="更新日期" 
 | 
                align="center" 
 | 
                prop="archivetime" 
 | 
                width="160" 
 | 
              > 
 | 
                <template slot-scope="scope"> 
 | 
                  <span>{{ formatTime(scope.row.archivetime) }}</span> 
 | 
                </template> 
 | 
              </el-table-column> 
 | 
              <el-table-column 
 | 
                fixed="right" 
 | 
                label="操作" 
 | 
                align="center" 
 | 
                width="190" 
 | 
                class-name="small-padding fixed-width" 
 | 
              > 
 | 
                <template slot-scope="scope"> 
 | 
  
 | 
                  <el-button 
 | 
                    size="medium" 
 | 
                    type="text" 
 | 
                    @click="handleDelete(scope.row)" 
 | 
                    ><span class="button-textxg" 
 | 
                      ><i class="el-icon-menu"></i>删除</span 
 | 
                    ></el-button 
 | 
                  > 
 | 
                </template> 
 | 
              </el-table-column> 
 | 
            </el-table> 
 | 
  
 | 
            <pagination 
 | 
              v-show="total > 0" 
 | 
              :total="total" 
 | 
              :page.sync="queryParams.pageNum" 
 | 
              :limit.sync="queryParams.pageSize" 
 | 
              @pagination="getList" 
 | 
            /> 
 | 
          </el-col> 
 | 
        </el-row> 
 | 
      </div> 
 | 
    </div> 
 | 
    <el-dialog title="选择任务" :visible.sync="distributeVisible" width="70%"> 
 | 
      <div class="preview-left"> 
 | 
        <el-form 
 | 
          :model="queryParams" 
 | 
          ref="queryForm" 
 | 
          size="small" 
 | 
          :inline="true" 
 | 
          label-width="98px" 
 | 
        > 
 | 
          <el-select 
 | 
            @change="distribute" 
 | 
            v-model="tasktopic" 
 | 
            placeholder="请选择任务类型" 
 | 
          > 
 | 
            <el-option 
 | 
              v-for="item in taskoptions" 
 | 
              :key="item.value" 
 | 
              :label="item.label" 
 | 
              :value="item.value" 
 | 
            > 
 | 
            </el-option> 
 | 
          </el-select> 
 | 
        </el-form> 
 | 
        <el-table v-loading="loading" :data="taskuserList"> 
 | 
          <el-table-column 
 | 
            label="任务名称" 
 | 
            fixed 
 | 
            align="center" 
 | 
            key="taskName" 
 | 
            prop="taskName" 
 | 
            width="140" 
 | 
            :show-overflow-tooltip="true" 
 | 
          /> 
 | 
          <el-table-column 
 | 
            label="任务描述" 
 | 
            align="center" 
 | 
            key="taskDesc" 
 | 
            prop="taskDesc" 
 | 
            width="180" 
 | 
            :show-overflow-tooltip="true" 
 | 
          /> 
 | 
          <el-table-column 
 | 
            label="服务项目" 
 | 
            align="center" 
 | 
            key="templatename" 
 | 
            prop="templatename" 
 | 
          /> 
 | 
          <el-table-column 
 | 
          label="总任务/已随访" 
 | 
          align="center" 
 | 
          key="nickName" 
 | 
          width="120" 
 | 
          prop="nickName" 
 | 
        > 
 | 
          <template slot-scope="scope"> 
 | 
            <span 
 | 
              >{{ scope.row.wfs ? scope.row.wfs + scope.row.yfs : "" }}/{{ 
 | 
                scope.row.yfs 
 | 
              }}</span 
 | 
            > 
 | 
          </template> 
 | 
        </el-table-column> 
 | 
          <el-table-column 
 | 
            label="创建人" 
 | 
            align="center" 
 | 
            key="createBy" 
 | 
            prop="createBy" 
 | 
            width="120" 
 | 
            :show-overflow-tooltip="true" 
 | 
          /> 
 | 
          <el-table-column 
 | 
            label="创建时间" 
 | 
            sortable 
 | 
            align="center" 
 | 
            prop="createTime" 
 | 
            width="160" 
 | 
          > 
 | 
            <template slot-scope="scope"> 
 | 
              <span>{{ formatTime(scope.row.createTime) }}</span> 
 | 
            </template> 
 | 
          </el-table-column> 
 | 
          <el-table-column 
 | 
            label="状态" 
 | 
            fixed="right" 
 | 
            align="center" 
 | 
            key="sendState" 
 | 
            prop="sendState" 
 | 
            width="120" 
 | 
          > 
 | 
            <template slot-scope="scope"> 
 | 
              <dict-tag 
 | 
                :options="dict.type.task_status" 
 | 
                :value="scope.row.sendState" 
 | 
              /> 
 | 
            </template> 
 | 
          </el-table-column> 
 | 
  
 | 
          <el-table-column 
 | 
            label="任务详情" 
 | 
            fixed="right" 
 | 
            align="center" 
 | 
            width="200" 
 | 
            class-name="small-padding fixed-width" 
 | 
          > 
 | 
            <template slot-scope="scope"> 
 | 
              <el-button 
 | 
                size="medium" 
 | 
                type="text" 
 | 
                @click="handleUpdate(scope.row)" 
 | 
                ><span class="button-xq" 
 | 
                  ><i class="el-icon-s-data"></i>选择派发</span 
 | 
                ></el-button 
 | 
              > 
 | 
            </template> 
 | 
          </el-table-column> 
 | 
        </el-table> 
 | 
  
 | 
        <pagination 
 | 
          v-show="tasktotal > 0" 
 | 
          :total="tasktotal" 
 | 
          :page.sync="queryParams.pageNum" 
 | 
          :limit.sync="queryParams.pageSize" 
 | 
          @pagination="distribute" 
 | 
        /> 
 | 
      </div> 
 | 
    </el-dialog> 
 | 
  
 | 
    <!-- 添加或修改用户配置对话框 --> 
 | 
    <el-dialog 
 | 
      :title="amendtag ? '修改患者信息' : '新增患者'" 
 | 
      :visible.sync="Labelchange" 
 | 
      width="900px" 
 | 
    > 
 | 
      <el-form ref="form" :model="form" :rules="rules" label-width="100px"> 
 | 
        <el-row> 
 | 
          <el-col :span="8"> 
 | 
            <el-form-item label="姓名" 
 | 
          width="100" prop="name"> 
 | 
              <el-input 
 | 
                v-model="form.name" 
 | 
                placeholder="请输入姓名" 
 | 
                maxlength="30" 
 | 
              /> 
 | 
            </el-form-item> 
 | 
          </el-col> 
 | 
          <el-col :span="8"> 
 | 
            <el-form-item label="性别"width="100" prop="sex"> 
 | 
              <el-select v-model="form.sex" placeholder="请选择性别"> 
 | 
                <el-option 
 | 
                  v-for="dict in sextype" 
 | 
                  :key="dict.value" 
 | 
                  :label="dict.label" 
 | 
                  :value="dict.value" 
 | 
                ></el-option> 
 | 
              </el-select> 
 | 
            </el-form-item> 
 | 
          </el-col> 
 | 
          <el-col :span="8"> 
 | 
            <el-form-item label="年龄" prop="age"> 
 | 
              <el-input 
 | 
                v-model="form.age" 
 | 
                placeholder="请输入年龄" 
 | 
                maxlength="30" 
 | 
              /> 
 | 
            </el-form-item> 
 | 
          </el-col> 
 | 
        </el-row> 
 | 
        <el-row v-if="!amendtag"> 
 | 
          <el-col :span="8"> 
 | 
            <el-form-item label="民族" prop="name"> 
 | 
              <el-input 
 | 
                v-model="form.nation" 
 | 
                placeholder="请输入民族" 
 | 
                maxlength="30" 
 | 
              /> 
 | 
            </el-form-item> 
 | 
          </el-col> 
 | 
          <el-col :span="8"> 
 | 
            <el-form-item label="籍贯" prop="age"> 
 | 
              <el-input 
 | 
                v-model="form.nativePlace" 
 | 
                placeholder="请输入籍贯" 
 | 
                maxlength="30" 
 | 
              /> 
 | 
            </el-form-item> 
 | 
          </el-col> 
 | 
          <el-col :span="8"> 
 | 
            <el-form-item label="联系方式" prop="telcode"> 
 | 
              <el-input 
 | 
                v-model="form.telcode" 
 | 
                placeholder="请输入联系方式" 
 | 
                maxlength="30" 
 | 
              /> 
 | 
            </el-form-item> 
 | 
          </el-col> 
 | 
        </el-row> 
 | 
  
 | 
        <el-row v-if="!amendtag"> 
 | 
          <el-col :span="12"> 
 | 
            <el-form-item label="出生地" prop="idcardno"> 
 | 
              <el-input 
 | 
                v-model="form.birthplace" 
 | 
                placeholder="国、省、地市、区县、街道等详细信息" 
 | 
                maxlength="50" 
 | 
              /> 
 | 
            </el-form-item> </el-col 
 | 
          ><el-col :span="12"> 
 | 
            <el-form-item label="居住地" prop="idcardno"> 
 | 
              <el-input 
 | 
                v-model="form.placeOfResidence" 
 | 
                placeholder="国、省、地市、区县、街道等详细信息" 
 | 
                maxlength="50" 
 | 
              /> 
 | 
            </el-form-item> 
 | 
          </el-col> 
 | 
        </el-row> 
 | 
  
 | 
        <el-row> 
 | 
          <el-col :span="amendtag ? 12 : 24" v-if="!amendtag"> 
 | 
            <el-form-item label="患者类型"> 
 | 
              <el-select v-model="form.pattype" placeholder="请选择类型"> 
 | 
                <el-option 
 | 
                  v-for="item in Patienttype" 
 | 
                  :key="item.value" 
 | 
                  :label="item.label" 
 | 
                  :value="item.value" 
 | 
                ></el-option> 
 | 
              </el-select> 
 | 
            </el-form-item> 
 | 
          </el-col> 
 | 
          <!-- <el-col :span="12" v-if="amendtag"> 
 | 
            <el-form-item label="过滤说明"> 
 | 
              <el-select v-model="form.notrequiredreason" placeholder="请选择过滤类型"> 
 | 
                <el-option 
 | 
                  v-for="item in dict.type.futter_patient" 
 | 
                  :key="item.value" 
 | 
                  :label="item.label" 
 | 
                  :value="item.value" 
 | 
                ></el-option> 
 | 
              </el-select> 
 | 
            </el-form-item> 
 | 
          </el-col> --> 
 | 
        </el-row> 
 | 
        <el-row> 
 | 
          <el-col :span="24" v-if="amendtag"> 
 | 
            <el-form-item label="过滤原因"> 
 | 
              <el-input 
 | 
                v-model="form.notrequiredreason" 
 | 
                type="textarea" 
 | 
                placeholder="请输入过滤原因" 
 | 
              ></el-input> 
 | 
            </el-form-item> 
 | 
          </el-col> 
 | 
        </el-row> 
 | 
        <el-row> 
 | 
          <el-col :span="24" v-if="!amendtag"> 
 | 
            <el-form-item label="备注"> 
 | 
              <el-input 
 | 
                v-model="form.remark" 
 | 
                type="textarea" 
 | 
                placeholder="请输入内容" 
 | 
              ></el-input> 
 | 
            </el-form-item> 
 | 
          </el-col> 
 | 
        </el-row> 
 | 
      </el-form> 
 | 
      <div slot="footer" class="dialog-footer"> 
 | 
        <el-button type="primary" @click="submitForm">确 定</el-button> 
 | 
        <el-button @click="cancel">取 消</el-button> 
 | 
      </div> 
 | 
    </el-dialog> 
 | 
  
 | 
    <!-- 用户导入对话框 --> 
 | 
    <el-dialog 
 | 
      :title="upload.title" 
 | 
      :visible.sync="upload.open" 
 | 
      width="70%" 
 | 
      append-to-body 
 | 
    > 
 | 
      <el-steps :active="dractive" simple> 
 | 
        <el-step title="上传导入文件" icon="el-icon-upload"></el-step> 
 | 
        <el-step title="导入检查" icon="el-icon-picture"></el-step> 
 | 
        <el-step title="导入结果" icon="el-icon-picture"></el-step> 
 | 
      </el-steps> 
 | 
      <!-- 上传导入文件 --> 
 | 
      <div class="download" v-if="dractive == 1"> 
 | 
        <el-upload 
 | 
          class="upload-demo" 
 | 
          ref="upload" 
 | 
          :limit="1" 
 | 
          accept=".xlsx, .xls" 
 | 
          :headers="upload.headers" 
 | 
          :action="upload.url" 
 | 
          :disabled="upload.isUploading" 
 | 
          :on-progress="handleFileUploadProgress" 
 | 
          :on-success="handleFileSuccess" 
 | 
          drag 
 | 
        > 
 | 
          <i class="el-icon-upload"></i> 
 | 
          <div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div> 
 | 
          <div class="el-upload__tip text-center" slot="tip"> 
 | 
            <!-- <div class="el-upload__tip" slot="tip"> 
 | 
              <el-checkbox v-model="upload.updateSupport" /> 
 | 
              是否更新已经存在的用户数据 
 | 
            </div> --> 
 | 
            <span>仅允许导入xls、xlsx格式文件。</span> 
 | 
            <el-link 
 | 
              type="primary" 
 | 
              :underline="false" 
 | 
              style="font-size: 24px; vertical-align: baseline" 
 | 
              @click="importTemplate" 
 | 
              >下载模板 
 | 
            </el-link> 
 | 
            <!-- <el-link 
 | 
              type="success" 
 | 
              :underline="false" 
 | 
              style="font-size: 24px; vertical-align: baseline" 
 | 
              href="http://m.qpic.cn/psc?/V50ZTolo1AIhq00dqrJP2169QM2VHGTU/ruAMsa53pVQWN7FLK88i5qfmCJclyMduqqL6kjE4h7TXDAjimVtmLmTyGVfF4qlkyOISsYQ4Mxx705X2tkXEIUPrfCS4L4yK.f11SmO8Tq0!/b&bo=twb0AgAAAAADB2U!&rf=viewer_4" 
 | 
              target="_blank" 
 | 
            > 
 | 
              查看模板</el-link 
 | 
            > --> 
 | 
          </div> 
 | 
        </el-upload> 
 | 
      </div> 
 | 
      <!-- 导入检查 --> 
 | 
      <div class="uploading" v-else-if="dractive == 2"> 
 | 
        <el-table :data="uploadingData" style="width: 100%"> 
 | 
          <el-table-column prop="serial" label="患者id"> </el-table-column> 
 | 
          <el-table-column prop="name" label="姓名" 
 | 
          width="100"> </el-table-column> 
 | 
          <el-table-column prop="sex" label="性别"width="100"> </el-table-column> 
 | 
          <el-table-column prop="idcardno" width="300" label="证件号码"> </el-table-column> 
 | 
          <el-table-column prop="goday" label="出生日期"> </el-table-column> 
 | 
          <el-table-column prop="telcode" width="200" label="联系方式"> </el-table-column> 
 | 
          <el-table-column prop="createTime"  width="200" label="创建日期"> 
 | 
          </el-table-column> 
 | 
        </el-table> 
 | 
        <!-- <pagination 
 | 
          v-show="total > 0" 
 | 
          :total="total" 
 | 
          :page.sync="queryParams.pageNum" 
 | 
          :limit.sync="queryParams.pageSize" 
 | 
          @pagination="geterryList" 
 | 
        /> --> 
 | 
      </div> 
 | 
      <!-- 完成 --> 
 | 
      <div class="drexamine" v-else-if="dractive == 3"> 
 | 
        <img src="@/assets/images/导入.png" /> 
 | 
        <p>导入患者成功!</p> 
 | 
        <p> 
 | 
          本次 
 | 
          <!-- <span style="color: #158bb8; font-size: 20px">{{ 
 | 
            ImportQuantity 
 | 
          }}</span> 
 | 
          条数据 --> 
 | 
          成功导入<span style="color: #72d3a9; font-size: 20px">{{ 
 | 
            uploadingData.length?uploadingData.length:0 
 | 
          }}</span 
 | 
          >位患者 
 | 
        </p> 
 | 
      </div> 
 | 
      <div v-if="dractive == 3"> 
 | 
        <el-table :data="uploadingData" style="width: 100%"> 
 | 
          <el-table-column prop="serial" label="序号"> </el-table-column> 
 | 
          <el-table-column prop="name" label="姓名" 
 | 
          width="100"> </el-table-column> 
 | 
          <el-table-column prop="sex" label="性别"width="100"> </el-table-column> 
 | 
          <el-table-column prop="certificatenum" label="证件号码"> 
 | 
          </el-table-column> 
 | 
          <el-table-column prop="goday" label="出生日期"> </el-table-column> 
 | 
          <el-table-column prop="menum" label="本人联系方式"> </el-table-column> 
 | 
          <el-table-column prop="younum" label="亲属联系方式"> 
 | 
          </el-table-column> 
 | 
          <el-table-column prop="tag" label="患者标签"> </el-table-column> 
 | 
          <el-table-column prop="erry" label="错误原因"> </el-table-column> 
 | 
          <el-table-column prop="opinion" label="处理意见"> </el-table-column> 
 | 
        </el-table> 
 | 
        <pagination 
 | 
          v-show="total > 0" 
 | 
          :total="total" 
 | 
          :page.sync="queryParams.pageNum" 
 | 
          :limit.sync="queryParams.pageSize" 
 | 
          @pagination="geterryList" 
 | 
        /> 
 | 
      </div> 
 | 
  
 | 
      <div slot="footer" class="dialog-footer" v-if="dractive == 3"> 
 | 
        <!-- <el-button type="primary" @click="submitFileForm">下一步</el-button> --> 
 | 
        <el-button @click="submitclose">完成</el-button> 
 | 
        <!-- <el-button type="warning" @click="submitclose">导出失败数据</el-button> --> 
 | 
      </div> 
 | 
      <div slot="footer" v-else> 
 | 
        <el-button type="primary" @click="submitFileForm">下一步</el-button> 
 | 
        <el-button @click="submitclose">取 消</el-button> 
 | 
      </div> 
 | 
    </el-dialog> 
 | 
    <!-- 跳转服务对话框 --> 
 | 
    <el-dialog title="选择服务类型" :visible.sync="serviceVisible"> 
 | 
      <el-card class="box-card"> 
 | 
        <el-radio-group v-model="serviceradio"> 
 | 
          <el-radio :label="1">宣教随访</el-radio> 
 | 
          <el-radio :label="2">门诊服务</el-radio> 
 | 
          <el-radio :label="3">出院服务</el-radio> 
 | 
          <el-radio :label="4">复诊服务</el-radio> 
 | 
          <el-radio :label="5">体检通知</el-radio> 
 | 
          <el-radio :label="6">问卷服务</el-radio> 
 | 
        </el-radio-group> 
 | 
      </el-card> 
 | 
      <div slot="footer" class="dialog-footer"> 
 | 
        <el-button @click="serviceVisible = false">取 消</el-button> 
 | 
        <el-button type="primary" @click="CreateService">创建服务</el-button> 
 | 
      </div> 
 | 
    </el-dialog> 
 | 
  </div> 
 | 
</template> 
 | 
  
 | 
<script> 
 | 
import { delUser } from "@/api/system/user"; 
 | 
import { 
 | 
  getTasklist, 
 | 
  Externallist, 
 | 
  Externaledit, 
 | 
  Externalpatient, 
 | 
  delExternal, 
 | 
} from "@/api/AiCentre/index"; 
 | 
import { listtag } from "@/api/system/label"; 
 | 
import { getToken } from "@/utils/auth"; 
 | 
import Treeselect from "@riophae/vue-treeselect"; 
 | 
import store from "@/store"; 
 | 
import "@riophae/vue-treeselect/dist/vue-treeselect.css"; 
 | 
  
 | 
export default { 
 | 
  name: "Patient", 
 | 
  dicts: [ 
 | 
    "sys_normal_disable", 
 | 
    "task_status", 
 | 
    "sys_user_sex", 
 | 
    "futter_patient", 
 | 
  ], 
 | 
  components: { Treeselect }, 
 | 
  data() { 
 | 
    return { 
 | 
      // 遮罩层 
 | 
      loading: true, 
 | 
      // 选中数组 
 | 
      ids: [], 
 | 
      // 非单个禁用 
 | 
      single: true, 
 | 
      // 非多个禁用 
 | 
      multiple: true, 
 | 
      // 显示搜索条件 
 | 
      showSearch: true, 
 | 
      // 总条数 
 | 
      total: 0, 
 | 
      tasktotal: 0, 
 | 
      // 用户表格数据 
 | 
      userList: null, 
 | 
      taskuserList: null, 
 | 
      // 弹出层标题 
 | 
      title: "", 
 | 
      // 部门树选项 
 | 
      deptOptions: undefined, 
 | 
      options: [], 
 | 
      uploadingData:[], 
 | 
      // 是否显示弹出层 
 | 
      open: false, 
 | 
      // 部门名称 
 | 
      deptName: undefined, 
 | 
      // 默认密码 
 | 
      initPassword: undefined, 
 | 
      amendtag: false, //是否修改 
 | 
      serviceVisible: false, 
 | 
      serviceradio: 1, 
 | 
      distributeVisible: false, 
 | 
      tasktopic: "5", //新增类型 
 | 
      // 查询参数 
 | 
      topqueryParams: { 
 | 
        pageNum: 1, 
 | 
        pageSize: 10, 
 | 
        userName: undefined, 
 | 
        tagid: undefined, 
 | 
        topic: undefined, 
 | 
      }, 
 | 
      // 日期范围 
 | 
      dateRange: [], 
 | 
      taskoptions: [], 
 | 
      paperstypes: [ 
 | 
        { papersname: "身份证" }, 
 | 
        { papersname: "护照" }, 
 | 
        { papersname: "中国港澳居民身份证" }, 
 | 
        { papersname: "中国台湾居民身份证" }, 
 | 
      ], 
 | 
      Patienttype: [ 
 | 
        { 
 | 
          value: "1", 
 | 
          label: "在院患者", 
 | 
        }, 
 | 
  
 | 
        { 
 | 
          value: "3", 
 | 
          label: "体检患者", 
 | 
        }, 
 | 
        { 
 | 
          value: "4", 
 | 
          label: "出院患者", 
 | 
        }, 
 | 
      ], 
 | 
      sextype: [ 
 | 
        { 
 | 
          value: 1, 
 | 
          label: "男", 
 | 
        }, 
 | 
        { 
 | 
          value: 2, 
 | 
          label: "女", 
 | 
        }, 
 | 
      ], 
 | 
  
 | 
      cardlist: [ 
 | 
        { 
 | 
          name: "患者总数", 
 | 
          value: 123, 
 | 
        }, 
 | 
        { 
 | 
          name: "在院患者", 
 | 
          value: 23, 
 | 
          router: "/patient/inpatient", 
 | 
        }, 
 | 
        { 
 | 
          name: "出院患者", 
 | 
          value: 41, 
 | 
          router: "/patient/hospital", 
 | 
        }, 
 | 
        { 
 | 
          name: "离世患者", 
 | 
          value: 0, 
 | 
        }, 
 | 
      ], 
 | 
      source: [ 
 | 
        { 
 | 
          value: 0, 
 | 
          label: "所属患者", 
 | 
        }, 
 | 
        { 
 | 
          value: 1, 
 | 
          label: "科室患者", 
 | 
        }, 
 | 
        { 
 | 
          value: 2, 
 | 
          label: "病区患者", 
 | 
        }, 
 | 
      ], 
 | 
      // 表单参数 
 | 
      form: { 
 | 
        name: "", 
 | 
        age: "", 
 | 
        sex: "", 
 | 
        tagList: [], 
 | 
        idcardno: "", 
 | 
        telcode: "", 
 | 
        idcardtype: "", 
 | 
        relativetelcode: "", 
 | 
      }, 
 | 
      activeName: "first", //侧边选择 
 | 
      //导入进度 
 | 
      dractive: 1, 
 | 
      // 导入展示表单 
 | 
      uploadingData: {}, 
 | 
      total: 0, // 总条数 
 | 
      ImportQuantity: 999, //导入患者数量 
 | 
      Labelchange: false, //修改新增弹窗 
 | 
      propss: { multiple: true }, 
 | 
      optionstag: [], //标签列表 
 | 
      defaultProps: { 
 | 
        children: "children", 
 | 
        label: "label", 
 | 
      }, 
 | 
      // 用户导入参数 
 | 
      upload: { 
 | 
        // 是否显示弹出层(用户导入) 
 | 
        open: false, 
 | 
        // 弹出层标题(用户导入) 
 | 
        title: "", 
 | 
        // 是否禁用上传 
 | 
        isUploading: false, 
 | 
        // 是否更新已经存在的用户数据 
 | 
        updateSupport: 0, 
 | 
        // 设置上传的请求头部 
 | 
        headers: { Authorization: "Bearer " + getToken() }, 
 | 
        // 上传的地址 
 | 
        url: process.env.VUE_APP_BASE_API + "/smartor/import/importPatInfo", 
 | 
      }, 
 | 
      // 查询参数 
 | 
      queryParams: { 
 | 
        pageNum: 1, 
 | 
        pageSize: 10, 
 | 
  
 | 
      }, 
 | 
      // 表单校验 
 | 
      rules: { 
 | 
        name: [ 
 | 
          { required: true, message: "用户名称不能为空", trigger: "blur" }, 
 | 
          { 
 | 
            min: 2, 
 | 
            max: 20, 
 | 
            message: "用户名称长度必须介于 2 和 20 之间", 
 | 
            trigger: "blur", 
 | 
          }, 
 | 
        ], 
 | 
  
 | 
        sex: [{ required: true, message: "性别不能为空", trigger: "blur" }], 
 | 
        age: [{ required: true, message: "年龄不能为空", trigger: "blur" }], 
 | 
        nation: [{ required: true, message: "民族不能为空", trigger: "blur" }], 
 | 
        telcode: [ 
 | 
          { required: true, message: "联系方式不能为空", trigger: "blur" }, 
 | 
          { 
 | 
            pattern: /^1[3|4|5|6|7|8|9][0-9]\d{8}$/, 
 | 
            message: "请输入正确的手机号码", 
 | 
            trigger: "blur", 
 | 
          }, 
 | 
        ], 
 | 
  
 | 
        idcardno: [ 
 | 
          { required: true, message: "证件号能为空", trigger: "blur" }, 
 | 
          { 
 | 
            pattern: 
 | 
              /^\d{6}((((((19|20)\d{2})(0[13-9]|1[012])(0[1-9]|[12]\d|30))|(((19|20)\d{2})(0[13578]|1[02])31)|((19|20)\d{2})02(0[1-9]|1\d|2[0-8])|((((19|20)([13579][26]|[2468][048]|0[48]))|(2000))0229))\d{3})|((((\d{2})(0[13-9]|1[012])(0[1-9]|[12]\d|30))|((\d{2})(0[13578]|1[02])31)|((\d{2})02(0[1-9]|1\d|2[0-8]))|(([13579][26]|[2468][048]|0[048])0229))\d{2}))(\d|X|x)$/, 
 | 
            message: "请输入正确的身份证号码", 
 | 
            trigger: "blur", 
 | 
          }, 
 | 
        ], 
 | 
  
 | 
      }, 
 | 
    }; 
 | 
  }, 
 | 
  watch: { 
 | 
    // 根据名称筛选部门树 
 | 
    deptName(val) { 
 | 
      this.$refs.tree.filter(val); 
 | 
    }, 
 | 
  }, 
 | 
  created() { 
 | 
    this.getList(); 
 | 
    this.gettabList(); 
 | 
    //获取已筛选后的可选任务类型 
 | 
    this.taskoptions = store.getters.Serviceauthority; 
 | 
  }, 
 | 
  methods: { 
 | 
    /** 查询患者列表 */ 
 | 
    getList() { 
 | 
      this.loading = true; 
 | 
      Externallist(this.queryParams).then((response) => { 
 | 
        this.userList = response.rows; 
 | 
        this.total = response.total; 
 | 
        this.loading = false; 
 | 
      }); 
 | 
    }, 
 | 
    handleClick() { 
 | 
      this.getList(); 
 | 
    }, 
 | 
    findLabelByValue(data, value) { 
 | 
      const item = data.find((item) => item.value === value); 
 | 
      return item ? item.label : null; 
 | 
    }, 
 | 
    /** 查询标签列表 */ 
 | 
    gettabList() { 
 | 
      const tagqueryParams = { 
 | 
        pageNum: 1, 
 | 
        pageSize: 1000, 
 | 
        tagname: undefined, 
 | 
        tagdescription: undefined, 
 | 
        tagcategoryid: "0", 
 | 
      }; 
 | 
      listtag(tagqueryParams).then((response) => { 
 | 
        console.log(response); 
 | 
        this.optionstag = response.rows; 
 | 
      }); 
 | 
    }, 
 | 
    // 查询导入展示列表 
 | 
    geterryList() { 
 | 
      this.loading = true; 
 | 
      listJob(this.queryParams).then((response) => { 
 | 
        this.jobList = 1; 
 | 
        this.total = 1; 
 | 
        this.loading = false; 
 | 
      }); 
 | 
    }, 
 | 
    Distributionservice(row) { 
 | 
      this.serviceVisible = true; 
 | 
    }, 
 | 
  
 | 
    // 取消按钮 
 | 
    cancel() { 
 | 
      this.Labelchange = false; 
 | 
      this.reset(); 
 | 
    }, 
 | 
    // 表单重置 
 | 
    reset() { 
 | 
      this.form = { 
 | 
        name: "", 
 | 
        age: "", 
 | 
        sex: "", 
 | 
        tagList: [], 
 | 
        idcardno: "", 
 | 
        telcode: "", 
 | 
        idcardtype: "", 
 | 
        relativetelcode: "", 
 | 
      }; 
 | 
      // this.resetForm("form"); 
 | 
    }, 
 | 
    /** 搜索按钮操作 */ 
 | 
    handleQuery() { 
 | 
      this.queryParams.pageNum = 1; 
 | 
      this.getList(); 
 | 
    }, 
 | 
    /** 重置按钮操作 */ 
 | 
    resetQuery() { 
 | 
      this.dateRange = []; 
 | 
      this.resetForm("queryForm"); 
 | 
      this.$refs.tree.setCurrentKey(null); 
 | 
      this.handleQuery(); 
 | 
    }, 
 | 
    // 多选框选中数据 
 | 
    handleSelectionChange(selection) { 
 | 
      this.ids = selection.map((item) => item.id); 
 | 
      this.single = selection.length != 1; 
 | 
      this.multiple = !selection.length; 
 | 
    }, 
 | 
  
 | 
    /** 新增按钮操作 */ 
 | 
    handleAdd() { 
 | 
      this.reset(); 
 | 
      this.Labelchange = true; 
 | 
      this.amendtag = false; 
 | 
    }, 
 | 
    /** 修改按钮操作 */ 
 | 
    handleUpdate(row) { 
 | 
      const userIds = row.id || this.ids; 
 | 
      Externalpatient(userIds).then((response) => { 
 | 
        console.log(response); 
 | 
        this.form = response.data; 
 | 
      }); 
 | 
      this.amendtag = true; 
 | 
      this.Labelchange = true; 
 | 
    }, 
 | 
    //修改/新增患者 
 | 
    submitForm() { 
 | 
      this.$refs["form"].validate((valid) => { 
 | 
        if (valid) { 
 | 
          if (this.amendtag) { 
 | 
            this.form.isoperation = 2; 
 | 
            this.form.notrequiredFlag = 1; 
 | 
            Externaledit(this.form) 
 | 
              .then((response) => { 
 | 
                console.log(response); 
 | 
              }) 
 | 
              .then(() => { 
 | 
                this.getList(); 
 | 
                this.$modal.msgSuccess("患者过滤成功"); 
 | 
              }); 
 | 
          } else { 
 | 
            this.form.isoperation = 1; 
 | 
            Externaledit(this.form) 
 | 
              .then((response) => { 
 | 
                console.log(response); 
 | 
              }) 
 | 
              .then(() => { 
 | 
                this.getList(); 
 | 
                this.$modal.msgSuccess("添加成功"); 
 | 
              }); 
 | 
          } 
 | 
          this.reset(); 
 | 
          // this.idds = ""; 
 | 
          this.Labelchange = false; 
 | 
        } 
 | 
      }); 
 | 
    }, 
 | 
  
 | 
    /** 删除按钮操作 */ 
 | 
    handleDelete(row) { 
 | 
      const userIds =[ row.id] 
 | 
      this.$modal 
 | 
        .confirm('是否确认删除用户编号为"' + userIds + '"的数据项?') 
 | 
        .then(function () { 
 | 
          return delExternal(userIds); 
 | 
        }) 
 | 
        .then(() => { 
 | 
          this.getList(); 
 | 
          this.$modal.msgSuccess("删除成功"); 
 | 
        }) 
 | 
        .catch(() => {}); 
 | 
    }, 
 | 
    //服务跳转 
 | 
    CreateService() { 
 | 
      this.$router.push({ 
 | 
        path: "/followvisit/particty", 
 | 
        query: { type: this.serviceradio }, 
 | 
      }); 
 | 
    }, 
 | 
    distribute() { 
 | 
      this.distributeVisible = true; 
 | 
      if (this.tasktopic == 1) { 
 | 
        this.topqueryParams.type = 3; 
 | 
      } else if (this.tasktopic == 2) { 
 | 
        this.topqueryParams.type = 1; 
 | 
      } else if (this.tasktopic == 3) { 
 | 
        this.topqueryParams.type = 1; 
 | 
      } else if (this.tasktopic == 4) { 
 | 
        this.topqueryParams.type = 1; 
 | 
      } else if (this.tasktopic == 5) { 
 | 
        this.topqueryParams.type = 1; 
 | 
      } else if (this.tasktopic == 6) { 
 | 
        this.topqueryParams.type = 2; 
 | 
      } 
 | 
      this.topqueryParams.typename = this.findLabelByValue( 
 | 
        this.taskoptions, 
 | 
        this.tasktopic 
 | 
      ); 
 | 
      getTasklist(this.topqueryParams).then((response) => { 
 | 
        this.taskuserList = response.rows; 
 | 
        this.tasktotal = response.total; 
 | 
        this.$forceUpdate(); 
 | 
      }); 
 | 
    }, 
 | 
    /** 导出按钮操作 */ 
 | 
    handleExport() { 
 | 
      this.download( 
 | 
        "smartor/patarchive/export", 
 | 
        { 
 | 
          ...this.queryParams, 
 | 
        }, 
 | 
        `user_${new Date().getTime()}.xlsx` 
 | 
      ); 
 | 
    }, 
 | 
    /** 导入按钮操作 */ 
 | 
    handleImport() { 
 | 
      this.upload.title = "用户导入"; 
 | 
      this.upload.open = true; 
 | 
    }, 
 | 
    /** 下载模板操作 */ 
 | 
    importTemplate() { 
 | 
      this.download( 
 | 
        "smartor/import/getImportPatTemplate", 
 | 
        {}, 
 | 
        `user_template_${new Date().getTime()}.xlsx` 
 | 
      ); 
 | 
    }, 
 | 
    // 文件上传中处理 
 | 
    handleFileUploadProgress(event, file, fileList) { 
 | 
      this.upload.isUploading = true; 
 | 
    }, 
 | 
    // 文件上传成功处理 
 | 
    handleFileSuccess(response, file, fileList) { 
 | 
      // this.upload.open = false; 
 | 
      this.upload.isUploading = false; 
 | 
      this.uploadingData = response.rows; 
 | 
      this.$refs.upload.clearFiles(); 
 | 
      // this.$alert( 
 | 
      //   "<div style='overflow: auto;overflow-x: hidden;max-height: 70vh;padding: 10px 20px 0;'>" + 
 | 
      //     response.msg + 
 | 
      //     "</div>", 
 | 
      //   "导入结果", 
 | 
      //   { dangerouslyUseHTMLString: true } 
 | 
      // ); 
 | 
      // this.getList(); 
 | 
    }, 
 | 
    // 提交上传文件 
 | 
    submitFileForm() { 
 | 
      // 上传 
 | 
      if (this.dractive == 1) { 
 | 
        this.$refs.upload.submit(); 
 | 
        this.dractive++; 
 | 
      } else { 
 | 
        this.dractive++; 
 | 
      } 
 | 
    }, 
 | 
    submitclose() { 
 | 
      this.upload.open = false; 
 | 
      this.dractive = 1; 
 | 
      this.uploadingData=[], 
 | 
      this.getList(); 
 | 
    }, 
 | 
  }, 
 | 
}; 
 | 
</script> 
 | 
  
 | 
<style lang="scss" scoped> 
 | 
.Questionnairemanagement { 
 | 
  display: flex; 
 | 
} 
 | 
.sidecolumn { 
 | 
  width: 180px; 
 | 
  min-height: 100vh; 
 | 
  text-align: center; 
 | 
  //   display: flex; 
 | 
  margin-top: 20px; 
 | 
  margin: 20px; 
 | 
  padding: 15px; 
 | 
  background: #d0e9fd; 
 | 
  border: 1px solid #dcdfe6; 
 | 
  -webkit-box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.12), 
 | 
    0 0 6px 0 rgba(0, 0, 0, 0.04); 
 | 
  .sidecolumn-top { 
 | 
    display: flex; 
 | 
    justify-content: space-between; 
 | 
    .top-wj { 
 | 
      font-size: 20px; 
 | 
    } 
 | 
    .top-tj { 
 | 
      font-size: 18px; 
 | 
  
 | 
      color: rgb(0, 89, 255); 
 | 
      cursor: pointer; 
 | 
    } 
 | 
  } 
 | 
  .center-ss { 
 | 
    margin-top: 30px; 
 | 
    .input-with-select { 
 | 
      height: 40px !important; 
 | 
    } 
 | 
  } 
 | 
  .bottom-fl { 
 | 
    margin-top: 30px; 
 | 
    display: center !important; 
 | 
  } 
 | 
} 
 | 
.preview-left { 
 | 
  margin: 20px; 
 | 
  //   margin: 20px; 
 | 
  padding: 30px; 
 | 
  background: #ffff; 
 | 
  border: 1px solid #dcdfe6; 
 | 
  -webkit-box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.12), 
 | 
    0 0 6px 0 rgba(0, 0, 0, 0.04); 
 | 
  .scriptTopic-dev { 
 | 
    margin-bottom: 25px; 
 | 
    font-size: 20px !important; 
 | 
    .dev-text { 
 | 
      margin-bottom: 10px; 
 | 
    } 
 | 
  } 
 | 
} 
 | 
::v-deep.el-tabs--left, 
 | 
.el-tabs--right { 
 | 
  overflow: hidden; 
 | 
  align-items: center; 
 | 
  display: flex; 
 | 
} 
 | 
::v-deep.el-input--medium .el-input__inner { 
 | 
  height: 40px !important; 
 | 
} 
 | 
::v-deep.el-tabs--right .el-tabs__active-bar.is-right { 
 | 
  height: 40px; 
 | 
  width: 5px; 
 | 
  left: 0; 
 | 
} 
 | 
::v-deep.el-tabs--right .el-tabs__item.is-right { 
 | 
  display: block; 
 | 
  text-align: left; 
 | 
  font-size: 20px; 
 | 
} 
 | 
::v-deep.leftvlue .el-card__body { 
 | 
  background: #d0e9fd; 
 | 
} 
 | 
::v-deep.leftvlue .el-card__body:hover { 
 | 
  background: #8dc8f8; 
 | 
  cursor: pointer; /* 鼠标悬浮时变为手形 */ 
 | 
} 
 | 
.leftvlue { 
 | 
  width: 100%; 
 | 
  margin-top: 10px; 
 | 
} 
 | 
.leftvlue-bg { 
 | 
  //   display: flex; 
 | 
  //   flex: 1; 
 | 
  margin-top: 20px; 
 | 
  //   margin: 20px; 
 | 
  padding: 30px; 
 | 
  background: #ffff; 
 | 
  border: 1px solid #dcdfe6; 
 | 
  -webkit-box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.12), 
 | 
    0 0 6px 0 rgba(0, 0, 0, 0.04); 
 | 
  .mulsz { 
 | 
    font-size: 20px; 
 | 
  } 
 | 
} 
 | 
.el-button--primary.is-plain { 
 | 
  color: #ffffff; 
 | 
  background: #409eff; 
 | 
  border-color: #4fabe9; 
 | 
} 
 | 
.document { 
 | 
  width: 100px; 
 | 
  height: 50px; 
 | 
} 
 | 
.documentf { 
 | 
  display: flex; 
 | 
  justify-content: flex-end; 
 | 
} 
 | 
.download { 
 | 
  text-align: center; 
 | 
  .el-upload__tip { 
 | 
    font-size: 23px; 
 | 
  } 
 | 
  .el-upload__text { 
 | 
    font-size: 23px; 
 | 
  } 
 | 
} 
 | 
.uploading { 
 | 
  margin-top: 20px; 
 | 
  margin: 20px; 
 | 
  padding: 30px; 
 | 
  background: #ffffff; 
 | 
  border: 1px solid #dcdfe6; 
 | 
  -webkit-box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.12), 
 | 
    0 0 6px 0 rgba(0, 0, 0, 0.04); 
 | 
} 
 | 
.drexamine { 
 | 
  display: flex; 
 | 
  align-items: center; 
 | 
  justify-content: center; 
 | 
  padding: 20px; 
 | 
  background: #daeaf5; 
 | 
  img { 
 | 
    width: 50px; 
 | 
    height: 50px; 
 | 
  } 
 | 
} 
 | 
.button-textsc { 
 | 
  color: #28cfe6; 
 | 
} 
 | 
.button-textxg { 
 | 
  color: #de7897; 
 | 
} 
 | 
</style> 
 |