WXL (wul)
4 天以前 5f4d48e663c47eb7390e4a1784d773d6814889ff
测试完成
已修改9个文件
1405 ■■■■■ 文件已修改
src/api/AiCentre/external.js 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/followvisit/again/index.vue 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/followvisit/discharge/index.vue 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/followvisit/discharge/outpatientService.vue 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/followvisit/record/detailpage/index.vue 1021 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/followvisit/record/physical/index.vue 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/followvisit/zbAgain/index.vue 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/knowledge/questionnaire/compilequer/index.vue 43 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/patient/patient/outpatient.vue 311 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/AiCentre/external.js
@@ -92,7 +92,7 @@
    data: data
  });
}
// 新增服务
// 再次随访服务
export function addserviceSubtask(data) {
  return request({
    url: "/smartor/serviceSubtask/addSubTaskAgain",
@@ -100,4 +100,12 @@
    data: data
  });
}
// 再次随访服务
export function addSubtask(data) {
  return request({
    url: "/smartor/serviceSubtask/addSubTask",
    method: "post",
    data: data
  });
}
src/views/followvisit/again/index.vue
@@ -1197,8 +1197,9 @@
      });
    },
    affiliation() {
      this.topqueryParams.drcode = store.getters.hisUserId;
      this.topqueryParams.nurseId = store.getters.hisUserId;
      this.topqueryParams.managementDoctor = store.getters.hisUserId;
      this.getList(1);
    },
    onthatday() {
src/views/followvisit/discharge/index.vue
@@ -1408,9 +1408,8 @@
      });
    },
    affiliation() {
      this.topqueryParams.drcode = store.getters.hisUserId;
      this.topqueryParams.nurseId = store.getters.hisUserId;
      this.topqueryParams.managementDoctor = store.getters.name;
      this.topqueryParams.managementDoctor = store.getters.hisUserId;
      this.getList(1);
    },
    onthatday() {
src/views/followvisit/discharge/outpatientService.vue
@@ -1181,8 +1181,9 @@
      });
    },
    affiliation() {
      this.topqueryParams.drcode = store.getters.hisUserId;
      this.topqueryParams.nurseId = store.getters.hisUserId;
      this.topqueryParams.managementDoctor = store.getters.hisUserId;
      this.getList(1);
    },
    onthatday() {
src/views/followvisit/record/detailpage/index.vue
@@ -213,118 +213,412 @@
        </el-table>
      </div>
    </div>
    <div class="Followuserinfos">
      <div>
        <el-form
          ref="userform"
          :model="form"
          :rules="userrules"
          label-width="120px"
        >
    <div class="action-container">
      <div class="call-action">
        <div class="call-container">
          <!-- <div class="call-header">
            <h2>一键呼叫功能</h2>
          </div> -->
          <div class="headline">
            <div>人工处理</div>
            <el-row :gutter="20">
              <el-col :span="8"
                ><el-form-item label="联系电话">
                  <el-input
                    placeholder="联系电话缺失"
                    v-model="userform.telcode"
                  >
                    <el-button
                      slot="append"
                      icon="el-icon-phone"
                      @click="handleCall(userform.telcode, 'tel')"
                      :disabled="!isValidPhone(userform.telcode)"
                    ></el-button
                  ></el-input> </el-form-item
              ></el-col>
              <el-col :span="8"
                ><el-form-item label="联系人电话">
                  <el-input
                    placeholder="联系人电话缺失"
                    v-model="userform.relativetelcode"
                  >
                    <el-button
                      slot="append"
                      icon="el-icon-phone"
                      @click="handleCall(userform.relativetelcode, 'relative')"
                      :disabled="!isValidPhone(userform.relativetelcode)"
                    ></el-button
                  ></el-input> </el-form-item
              ></el-col>
              <el-col :span="8"
                ><el-form-item label="联系人关系">
                  <el-input
                    placeholder="联系人关系缺失"
                    v-model="userform.relation"
                  ></el-input> </el-form-item
              ></el-col>
            </el-row>
            <div style="margin-left: 30px">
              <el-button type="primary" plain @click="Editsingletasksonyic('')"
                >保存服务</el-button
              >
            </div>
            <div>随访内容</div>
          </div>
          <el-row :gutter="20" v-if="callStatus !== 'idle'">
            <el-col :span="24">
              <el-alert
                :title="callStatusText"
                :type="callStatusType"
                :closable="false"
                show-icon
              />
            </el-col>
          </el-row>
          <div>
            <el-tabs v-model="activeName" type="border-card">
              <el-tab-pane name="wj">
                <span class="mulsz" slot="label"
                  ><i class="el-icon-notebook-1"></i> 问卷随访结果</span
                >
                <div class="CONTENT">
                  <div class="title">{{ taskname ? taskname : "问卷" }}</div>
          <!-- 挂断按钮(仅在通话中显示) -->
          <el-row :gutter="20" v-if="callStatus === 'connected'">
            <el-col :span="24" style="text-align: center; margin-top: 10px">
              <el-button
                type="danger"
                icon="el-icon-phone"
                @click="endCurrentCall"
                :loading="isEndingCall"
              >
                挂断电话
              </el-button>
            </el-col>
          </el-row>
          <el-form-item label="随访记录">
            <el-input type="textarea" v-model="form.remark"></el-input>
          </el-form-item>
                  <div class="preview-left" v-if="!Voicetype">
                    <div
                      class="topic-dev"
                      v-for="(item, index) in tableDatatop"
                      :key="item.id"
                    >
                      <!-- 单选 -->
                      <div
                        :class="
                          item.isabnormal
                            ? 'scriptTopic-isabnormal'
                            : 'scriptTopic-dev'
                        "
                        :key="index"
                        v-if="item.scriptType == 1 && !item.astrict"
                      >
                        <div class="dev-text">
                          {{ index + 1 }}、[单选]<span>{{
                            item.scriptContent
                          }}</span>
                        </div>
                        <div class="dev-xx">
                          <el-radio-group
                            v-model="item.scriptResult"
                            @change="
                              handleOptionChange(
                                $event,
                                index,
                                item.svyLibTemplateTargetoptions,
                                item
                              )
                            "
                          >
                            <el-radio
                              v-for="(
                                items, indexs
                              ) in item.svyLibTemplateTargetoptions"
                              :class="items.isabnormal ? 'red-star' : ''"
                              :key="indexs"
                              :label="items.optioncontent"
                              >{{ items.optioncontent }}</el-radio
                            >
                          </el-radio-group>
                        </div>
                        <div
                          v-if="item.showAppendInput"
                          class="append-input-container"
                        >
                          <el-input
                            type="textarea"
                            :rows="2"
                            placeholder="请输入具体信息"
                            v-model="item.answerps"
                            clearable
                          ></el-input>
                        </div>
                        <div v-show="item.prompt">
                          <el-alert :title="item.prompt" type="warning">
                          </el-alert>
                        </div>
                      </div>
                      <!-- 多选 -->
                      <div
                        :class="
                          item.isabnormal
                            ? 'scriptTopic-isabnormal'
                            : 'scriptTopic-dev'
                        "
                        :key="index"
                        v-if="item.scriptType == 2 && !item.astrict"
                      >
                        <div class="dev-text">
                          {{ index + 1 }}、[多选]<span>{{
                            item.scriptContent
                          }}</span>
                        </div>
                        <div class="dev-xx">
                          <el-checkbox-group
                            v-model="item.scriptResult"
                            @change="updateScore($event, index, item)"
                          >
                            <el-checkbox
                              :class="items.isabnormal ? 'red-star' : ''"
                              @change="$forceUpdate()"
                              v-for="(
                                items, indexs
                              ) in item.svyLibTemplateTargetoptions"
                              :key="indexs"
                              :label="items.optioncontent"
                            >
                              {{ items.optioncontent }}
                            </el-checkbox>
                          </el-checkbox-group>
                        </div>
                        <div v-show="item.prompt && item.scriptResult[0]">
                          <el-alert :title="item.prompt" type="warning">
                          </el-alert>
                        </div>
                      </div>
                      <!-- 填空 -->
                      <div
                        class="scriptTopic-dev"
                        :key="index"
                        v-if="item.scriptType == 4 && !item.astrict"
                      >
                        <div class="dev-text">
                          {{ index + 1 }}、[问答]<span>{{
                            item.scriptContent
                          }}</span>
                        </div>
                        <div class="dev-xx">
                          <el-input
                            type="textarea"
                            :rows="2"
                            placeholder="请输入答案"
                            v-model="item.scriptResult"
                            clearable
                          >
                          </el-input>
                        </div>
                      </div>
                    </div>
                  </div>
          <el-form-item label="处理意见">
            <div>
              <el-button plain type="warning" @click="Editsingletaskson('1')"
                >暂不处理</el-button
              >
              <el-button plain type="success" @click="Editsingletaskson('2')"
                >病情稳定</el-button
              >
              <el-button plain type="primary" @click="Editsingletaskson('3')"
                >通知就诊</el-button
              >
              <!-- <el-button type="danger" @click="Editsingletaskson('4')"
    >失访</el-button
  > -->
              <el-button plain type="info" @click="Editsingletaskson('5')"
                >中心随访</el-button
              >
              <el-button
                type="primary"
                round
                v-if="this.form.isVisitAgain != 2"
                @click="sendAgain()"
                >再次随访</el-button
              >
            </div>
          </el-form-item>
        </el-form>
        <el-collapse>
          <el-collapse-item title="查看当前患者信息" name="1">
                  <div class="preview-left" v-else>
                    <div
                      class="topic-dev"
                      v-for="(item, index) in tableDatatop"
                      :key="item.id"
                    >
                      <div v-if="item.targetvalue">
                        <div class="dev-text">
                          {{ index + 1 }}、[单选]<span>{{
                            item.questiontext
                          }}</span>
                        </div>
                        <div class="dev-xx">
                          <el-radio-group
                            v-model="item.matchedtext"
                            @change="
                              handleOptionChange(
                                $event,
                                index,
                                item.ivrTaskScriptTargetoptionList,
                                item
                              )
                            "
                          >
                            <el-radio
                              v-for="(items, index) in item.scriptResult"
                              :key="items"
                              :label="items"
                              >{{ items }}</el-radio
                            >
                          </el-radio-group>
                        </div>
                        <div v-show="item.prompt">
                          <el-alert :title="item.prompt" type="warning">
                          </el-alert>
                        </div>
                      </div>
                      <div class="scriptTopic-dev" :key="index" v-else>
                        <div class="dev-text">
                          {{ index + 1 }}、[问答]<span>{{
                            item.questiontext
                          }}</span>
                        </div>
                        <div class="dev-xx">
                          <el-input
                            type="textarea"
                            :rows="2"
                            placeholder="请输入答案"
                            v-model="item.matchedtext"
                            clearable
                          >
                          </el-input>
                        </div>
                      </div>
                    </div>
                  </div>
                  <el-button
                    v-if="Voicetype"
                    type="primary"
                    @click="yuyingetdetail"
                    >保存服务详情</el-button
                  >
                  <el-button v-else type="primary" @click="getdetail"
                    >保存服务详情</el-button
                  >
                </div>
              </el-tab-pane>
              <el-tab-pane name="yy">
                <span class="mulsz" slot="label"
                  ><i class="el-icon-headset"></i> 语音随访详情</span
                >
                <div class="borderdiv">
                  <div class="title">{{ taskname ? taskname : "问卷" }}</div>
                  <div
                    style="
                      display: flex;
                      text-align: center;
                      align-items: center;
                      color: #59a0f0;
                    "
                  >
                    完整语音:
                    <mini-audio
                      :audio-source="
                        voice ? voice : '@assets/order/example.mp3'
                      "
                    ></mini-audio>
                  </div>
                  <div class="preview-left">
                    <div v-for="item in voiceDatatop">
                      <div class="leftside">
                        <i class="el-icon-phone-outline"></i
                        ><span>{{ item.questiontext }}</span>
                      </div>
                      <div class="offside">
                        <i class="el-icon-user"></i>
                        <div class="offside-value">
                          <el-input
                            type="textarea"
                            :autosize="{ minRows: 1 }"
                            v-model="item.asrtext"
                          ></el-input>
                          <div>
                            <mini-audio
                              :audio-source="
                                item.questionvoice
                                  ? item.questionvoice
                                  : '@assets/order/example.mp3'
                              "
                            ></mini-audio>
                          </div>
                        </div>
                      </div>
                    </div>
                  </div>
                  <el-button
                    v-if="Voicetype"
                    type="primary"
                    @click="yuyingetdetail"
                    >保存随访详情</el-button
                  >
                  <el-button v-else type="primary" @click="getdetail"
                    >保存随访详情</el-button
                  >
                </div>
              </el-tab-pane>
            </el-tabs>
          </div>
        </div>
      </div>
      <div class="manual-action">
        <div class="Followuserinfos">
          <div>
            <el-form
              ref="userform"
              :model="form"
              :rules="userrules"
              label-width="120px"
            >
              <div class="headline">
                <div>人工处理</div>
                <div style="margin: 0 30px">
                  <el-button
                    type="primary"
                    plain
                    @click="Editsingletasksonyic('')"
                    >保存基础信息</el-button
                  >
                </div>
                <div>
                  <el-button
                    type="primary"
                    round
                    v-if="this.form.isVisitAgain != 2"
                    @click="sendAgain()"
                    >再次随访</el-button
                  >
                </div>
              </div>
              <el-row>
                <el-col :span="14"
                  ><el-form-item label="联系电话">
                    <el-input
                      placeholder="联系电话缺失"
                      v-model="userform.telcode"
                    >
                      <el-button
                        slot="append"
                        icon="el-icon-phone"
                        @click="handleCall(userform.telcode, 'tel')"
                        :disabled="!isValidPhone(userform.telcode)"
                      ></el-button
                    ></el-input> </el-form-item
                ></el-col>
              </el-row>
              <el-row>
                <el-col :span="14"
                  ><el-form-item label="联系人电话">
                    <el-input
                      placeholder="联系人电话缺失"
                      v-model="userform.relativetelcode"
                    >
                      <el-button
                        slot="append"
                        icon="el-icon-phone"
                        @click="
                          handleCall(userform.relativetelcode, 'relative')
                        "
                        :disabled="!isValidPhone(userform.relativetelcode)"
                      ></el-button
                    ></el-input> </el-form-item
                ></el-col>
                <el-col :span="10"
                  ><el-form-item label="联系人关系">
                    <el-input
                      placeholder="联系人关系缺失"
                      v-model="userform.relation"
                    ></el-input> </el-form-item
                ></el-col>
              </el-row>
              <div class="call-controls">
                <CallButton
                  ref="callButton"
                  :phoneNumber="currentPhoneNumber"
                  style="display: none"
                />
                <div v-if="callStatus === 'connected'" class="hangup-btn">
                  <el-button
                    type="danger"
                    icon="el-icon-phone"
                    @click="endCurrentCall"
                    :loading="isEndingCall"
                  >
                    挂断电话
                  </el-button>
                </div>
                <div class="call-status" v-if="callStatus !== 'idle'">
                  <el-alert
                    :title="callStatusText"
                    :type="callStatusType"
                    :closable="false"
                    show-icon
                  />
                </div>
              </div>
              <el-form-item label="随访记录">
                <el-input type="textarea" v-model="form.remark"></el-input>
              </el-form-item>
              <el-form-item label="处理意见">
                <div>
                  <el-button
                    plain
                    type="warning"
                    @click="Editsingletaskson('1')"
                    >暂不处理</el-button
                  >
                  <el-button
                    plain
                    type="success"
                    @click="Editsingletaskson('2')"
                    >病情稳定</el-button
                  >
                  <el-button
                    plain
                    type="primary"
                    @click="Editsingletaskson('3')"
                    >通知就诊</el-button
                  >
                  <el-button plain type="info" @click="Editsingletaskson('5')"
                    >中心随访</el-button
                  >
                </div>
              </el-form-item>
            </el-form>
            <div class="detailed">
              <h3>患者档案信息</h3>
              <el-form ref="userform" :model="userform" label-width="100px">
                <el-row :gutter="20">
                  <el-col :span="12">
@@ -374,261 +668,13 @@
                      /> </el-form-item
                  ></el-col>
                </el-row>
                <!-- <el-row :gutter="20">
                  <el-col :span="24">
                    <el-form-item label="标签" prop="desc">
                      <div class="xinz-inf">
                        <el-tag
                          :key="tag.tagname"
                          type="success"
                          v-for="tag in dynamicTags"
                          :disable-transitions="false"
                        >
                          {{ tag.tagname }}
                        </el-tag>
                      </div>
                    </el-form-item>
                  </el-col>
                </el-row> -->
              </el-form>
            </div>
          </el-collapse-item>
        </el-collapse>
          </div>
        </div>
      </div>
    </div>
    <div>
      <h2>一键呼叫功能</h2>
      <CallButton
        ref="callButton"
        :phoneNumber="currentPhoneNumber"
        style="display: none"
      />
    </div>
    <div>
      <el-tabs v-model="activeName" type="border-card">
        <el-tab-pane name="wj">
          <span class="mulsz" slot="label"
            ><i class="el-icon-notebook-1"></i> 问卷随访结果</span
          >
          <div class="CONTENT">
            <div class="title">{{ taskname ? taskname : "问卷" }}</div>
            <div class="preview-left" v-if="!Voicetype">
              <div
                class="topic-dev"
                v-for="(item, index) in tableDatatop"
                :key="item.id"
              >
                <!-- 单选 -->
                <div
                  :class="
                    item.isabnormal
                      ? 'scriptTopic-isabnormal'
                      : 'scriptTopic-dev'
                  "
                  :key="index"
                  v-if="item.scriptType == 1 && !item.astrict"
                >
                  <div class="dev-text">
                    {{ index + 1 }}、[单选]<span>{{ item.scriptContent }}</span>
                  </div>
                  <div class="dev-xx">
                    <el-radio-group
                      v-model="item.scriptResult"
                      @change="
                        handleOptionChange(
                          $event,
                          index,
                          item.svyLibTemplateTargetoptions
                        )
                      "
                    >
                      <el-radio
                        v-for="(
                          items, indexs
                        ) in item.svyLibTemplateTargetoptions"
                        :class="items.isabnormal ? 'red-star' : ''"
                        :key="indexs"
                        :label="items.optioncontent"
                        >{{ items.optioncontent }}</el-radio
                      >
                    </el-radio-group>
                  </div>
                  <div v-show="item.prompt">
                    <el-alert :title="item.prompt" type="warning"> </el-alert>
                  </div>
                </div>
                <!-- 多选 -->
                <div
                  :class="
                    item.isabnormal
                      ? 'scriptTopic-isabnormal'
                      : 'scriptTopic-dev'
                  "
                  :key="index"
                  v-if="item.scriptType == 2 && !item.astrict"
                >
                  <div class="dev-text">
                    {{ index + 1 }}、[多选]<span>{{ item.scriptContent }}</span>
                  </div>
                  <div class="dev-xx">
                    <el-checkbox-group
                      v-model="item.scriptResult"
                      @change="updateScore($event, index, item)"
                    >
                      <el-checkbox
                        :class="items.isabnormal ? 'red-star' : ''"
                        @change="$forceUpdate()"
                        v-for="(
                          items, indexs
                        ) in item.svyLibTemplateTargetoptions"
                        :key="indexs"
                        :label="items.optioncontent"
                      >
                        {{ items.optioncontent }}
                      </el-checkbox>
                    </el-checkbox-group>
                  </div>
                  <div v-show="item.prompt && item.scriptResult[0]">
                    <el-alert :title="item.prompt" type="warning"> </el-alert>
                  </div>
                </div>
                <!-- 填空 -->
                <div
                  class="scriptTopic-dev"
                  :key="index"
                  v-if="item.scriptType == 4 && !item.astrict"
                >
                  <div class="dev-text">
                    {{ index + 1 }}、[问答]<span>{{ item.scriptContent }}</span>
                  </div>
                  <div class="dev-xx">
                    <el-input
                      type="textarea"
                      :rows="2"
                      placeholder="请输入答案"
                      v-model="item.scriptResult"
                      clearable
                    >
                    </el-input>
                  </div>
                </div>
              </div>
            </div>
            <div class="preview-left" v-else>
              <div
                class="topic-dev"
                v-for="(item, index) in tableDatatop"
                :key="item.id"
              >
                <div v-if="item.targetvalue">
                  <div class="dev-text">
                    {{ index + 1 }}、[单选]<span>{{ item.questiontext }}</span>
                  </div>
                  <div class="dev-xx">
                    <el-radio-group
                      v-model="item.matchedtext"
                      @change="handleOptionChange($event, index, item)"
                    >
                      <el-radio
                        v-for="(items, index) in item.scriptResult"
                        :key="items"
                        :label="items"
                        >{{ items }}</el-radio
                      >
                    </el-radio-group>
                  </div>
                  <div v-show="item.prompt">
                    <el-alert :title="item.prompt" type="warning"> </el-alert>
                  </div>
                </div>
                <div class="scriptTopic-dev" :key="index" v-else>
                  <div class="dev-text">
                    {{ index + 1 }}、[问答]<span>{{ item.questiontext }}</span>
                  </div>
                  <div class="dev-xx">
                    <el-input
                      type="textarea"
                      :rows="2"
                      placeholder="请输入答案"
                      v-model="item.matchedtext"
                      clearable
                    >
                    </el-input>
                  </div>
                </div>
              </div>
            </div>
            <el-button v-if="Voicetype" type="primary" @click="yuyingetdetail"
              >保存服务详情</el-button
            >
            <el-button v-else type="primary" @click="getdetail"
              >保存服务详情</el-button
            >
          </div>
        </el-tab-pane>
        <el-tab-pane name="yy">
          <span class="mulsz" slot="label"
            ><i class="el-icon-headset"></i> 语音随访详情</span
          >
          <div class="borderdiv">
            <div class="title">{{ taskname ? taskname : "问卷" }}</div>
            <div
              style="
                display: flex;
                text-align: center;
                align-items: center;
                color: #59a0f0;
              "
            >
              完整语音:
              <mini-audio
                :audio-source="
                  voice ? voice : '@assets/order/example.mp3'
                "
              ></mini-audio>
            </div>
            <div class="preview-left">
              <div v-for="item in voiceDatatop">
                <div class="leftside">
                  <i class="el-icon-phone-outline"></i
                  ><span>{{ item.questiontext }}</span>
                </div>
                <div class="offside">
                  <i class="el-icon-user"></i>
                  <div class="offside-value">
                    <el-input
                      type="textarea"
                      :autosize="{ minRows: 1 }"
                      v-model="item.asrtext"
                    ></el-input>
                    <div>
                      <mini-audio
                        :audio-source="
                          item.questionvoice
                            ? item.questionvoice
                            : '@assets/order/example.mp3'
                        "
                      ></mini-audio>
                    </div>
                  </div>
                </div>
              </div>
            </div>
            <el-button v-if="Voicetype" type="primary" @click="yuyingetdetail"
              >保存随访详情</el-button
            >
            <el-button v-else type="primary" @click="getdetail"
              >保存随访详情</el-button
            >
          </div>
        </el-tab-pane>
      </el-tabs>
    </div>
    <el-dialog
      title="患者再次随访"
      v-dialogDrags
@@ -1070,7 +1116,6 @@
      const queryParams = {
        pid: Number(this.patid),
        allhosp: "0",
        pageNum: 1,
      };
      // 患者基础信息
      messagelistpatient(queryParams).then((response) => {
@@ -1193,6 +1238,7 @@
          scriptid: item.id,
          excep: excep,
          questiontext: item.scriptContent,
          answerps: item.answerps || null, // 添加附加信息
        };
        if (item.scriptType == 2 && item.scriptResult[0]) {
          obj.asrtext = item.scriptResult.join("&");
@@ -1239,7 +1285,7 @@
            })
            .catch(() => {
              if (this.form.serviceType == 13) {
                if (this.visitCount!=1) {
                if (this.visitCount != 1) {
                  this.$router.push({
                    path: "/logisticsservice/zbAgain",
                  });
@@ -1249,7 +1295,7 @@
                  });
                }
              } else if (this.form.serviceType == 2) {
                if (this.visitCount!=1) {
                if (this.visitCount != 1) {
                  this.$router.push({
                    path: "/logisticsservice/again",
                  });
@@ -1549,7 +1595,7 @@
        })
        .catch(() => {});
    },
    handleOptionChange(a, b, c) {
    aahandleOptionChange(a, b, c) {
      const result = c.find((item) => item.optioncontent == a);
      if (result.nextQuestion == 0) {
        this.tableDatatop = this.tableDatatop.reduce((acc, item, i) => {
@@ -1576,6 +1622,98 @@
      } else {
        this.tableDatatop[b].isabnormal = false;
      }
      this.$forceUpdate();
    },
    // 在methods部分,修改handleOptionChange方法:
    handleOptionChange(selectedOption, questionIndex, options, a) {
      if (document.activeElement) {
        document.activeElement.blur();
      }
      // 找到被选中的选项对象
      const selectedOptionObj = options.find(
        (item) => item.optioncontent == selectedOption
      );
      // 处理异常状态高亮
      this.tableDatatop[questionIndex].isabnormal =
        !!selectedOptionObj.isabnormal;
      // 处理附加输入框显示
      this.tableDatatop[questionIndex].showAppendInput =
        selectedOptionObj.appendflag == 1;
        console.log(this.tableDatatop);
      // if (!this.tableDatatop[questionIndex].showAppendInput) {
      //   this.tableDatatop[questionIndex].answerps = ""; // 清除附加信息
      // }
      // 保存当前题目之前已经隐藏的题目状态
      const previouslyHiddenBeforeCurrent = this.tableDatatop
        .slice(0, questionIndex)
        .map((item, index) => (item.astrict ? index : -1))
        .filter((index) => index !== -1);
      // 保存之前因nextQuestion=0而隐藏的题目范围
      const previouslyHiddenByEnd = this.tableDatatop
        .map((item, index) => (item.hiddenByEnd ? index : -1))
        .filter((index) => index !== -1);
      // 如果branchFlag为1,处理题目跳转
      if (a.branchFlag == 1) {
        if (selectedOptionObj.nextQuestion == 0) {
          // 结束问答 - 隐藏后面所有题目并标记
          this.tableDatatop = this.tableDatatop.map((item, index) => ({
            ...item,
            astrict: index > questionIndex,
            hiddenByEnd: index > questionIndex, // 标记这些题目是被结束问答隐藏的
          }));
        } else {
          // 正常跳转逻辑
          const nextQuestionIndex = selectedOptionObj.nextQuestion - 1;
          this.tableDatatop = this.tableDatatop.map((item, index) => {
            // 保留当前题目之前的隐藏状态
            if (index < questionIndex) {
              return {
                ...item,
                astrict: previouslyHiddenBeforeCurrent.includes(index),
                hiddenByEnd: false, // 清除结束标记
              };
            }
            // 当前题目总是可见
            if (index === questionIndex) {
              return { ...item, astrict: 0, hiddenByEnd: false };
            }
            // 显示目标下一题
            if (index === nextQuestionIndex) {
              return { ...item, astrict: 0, hiddenByEnd: false };
            }
            // 如果是之前被结束问答隐藏的题目,现在应该恢复显示
            if (item.hiddenByEnd) {
              return { ...item, astrict: 0, hiddenByEnd: false };
            }
            // 隐藏当前题和目标题之间的题目
            if (index > questionIndex && index < nextQuestionIndex) {
              return { ...item, astrict: 1, hiddenByEnd: false };
            }
            // 其他情况保持原状
            return item;
          });
        }
      } else {
        // 如果没有跳转,只需确保下一题可见
        this.tableDatatop = this.tableDatatop.map((item, index) => ({
          ...item,
          astrict: index === questionIndex + 1 ? 0 : item.astrict,
          hiddenByEnd: index === questionIndex + 1 ? false : item.hiddenByEnd,
        }));
      }
      this.$forceUpdate();
    },
    overdata() {
@@ -1659,65 +1797,143 @@
};
</script>
<style lang="scss">
<style lang="scss" scoped>
.Followupdetailspage {
  margin: 10px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.action-container {
  display: flex;
  gap: 20px;
  margin: 0 10px 20px 10px;
  .manual-action {
    flex: 1;
    min-width: 0;
    height: 100%; /* 确保高度继承 */
  }
  .call-action {
    width: 60%;
    min-width: 0;
    height: 100%; /* 确保高度继承 */
  }
}
.call-container {
  padding: 20px;
  background: #fff;
  border: 1px solid #dcdfe6;
  box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.12), 0 0 6px 0 rgba(0, 0, 0, 0.04);
  border-radius: 4px;
  height: 100%;
  .call-header {
    margin-bottom: 20px;
    h2 {
      font-size: 20px;
      color: #333;
      margin: 0;
      padding-bottom: 10px;
      border-bottom: 1px solid #eee;
    }
  }
  .call-status {
    margin-bottom: 20px;
  }
  .hangup-btn {
    text-align: center;
    margin-top: 20px;
  }
}
.Followuserinfo {
  margin: 20px 10px;
  margin: 10px 10px 0 10px;
  align-items: center;
  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);
  box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.12), 0 0 6px 0 rgba(0, 0, 0, 0.04);
  .userinfo-text {
    font-size: 20px;
    margin-right: 20px;
    margin-bottom: 10px;
  }
  .userinfo-value {
    color: rgb(15, 139, 211);
    span {
      margin-right: 20px;
    }
  }
}
::v-deep.el-table .warning-row {
  background: #c4e2ee;
}
.Followuserinfos {
  margin: 20px 10px;
  align-items: center;
  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);
  box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.12), 0 0 6px 0 rgba(0, 0, 0, 0.04);
  height: 100%; /* 确保高度继承 */
  min-height: 880px; /* 最小高度与随访内容一致 */
  display: flex;
  flex-direction: column;
  .userinfo-text {
    font-size: 20px;
    margin-right: 20px;
    margin-bottom: 10px;
  }
  .userinfo-value {
    color: rgb(15, 139, 211);
    span {
      margin-right: 20px;
    }
  }
  .el-form {
    flex: 1;
    overflow-y: auto; /* 内容超过高度时显示滚动条 */
    max-height: calc(880px - 60px); /* 减去padding */
    padding-right: 10px; /* 防止滚动条遮挡内容 */
  }
}
.append-input-container {
  margin-top: 15px;
  padding: 10px;
  background-color: #f5f7fa;
  border-radius: 4px;
  border: 1px solid #dcdfe6;
}
.borderdiv {
  min-height: 60vh;
  font-size: 20px;
  padding: 30px;
  .title {
    font-size: 22px;
    font-weight: bold;
    margin-bottom: 20px;
    text-align: center;
  }
  .leftside {
    margin: 30px 0;
    span {
      width: 400px;
      margin-left: 20px;
@@ -1727,9 +1943,11 @@
      border-radius: 10px;
    }
  }
  .offside {
    display: flex;
    flex-direction: row-reverse;
    .offside-value {
      padding: 10px;
      background: rgb(217, 173, 253);
@@ -1739,8 +1957,15 @@
    }
  }
}
.topic-dev[inert] {
  opacity: 0.5;
  pointer-events: none;
}
.CONTENT {
  padding: 10px;
  height: 100%;
  min-height: 660px; /* 设置最小高度 */
  .title {
    font-size: 22px;
    font-weight: bold;
@@ -1748,40 +1973,47 @@
    text-align: center;
  }
}
.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);
  box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.12), 0 0 6px 0 rgba(0, 0, 0, 0.04);
  max-height: 580px; /* 设置最大高度 */
  overflow-y: auto; /* 内容超过高度时显示滚动条 */
  .topic-dev {
    margin-bottom: 25px;
    font-size: 20px !important;
    .dev-text {
      margin-bottom: 10px;
    }
  }
}
.scriptTopic-isabnormal {
  color: red;
}
.detailed {
  width: 88%;
  border-radius: 8px;
  padding: 30px;
  margin-bottom: 30px;
  background-color: #ddf0f8;
  .bg-purple {
    margin-bottom: 20px;
  }
  .spanvalue {
    display: inline-block;
    min-width: 200px;
    border-bottom: 1px solid rgb(172, 172, 172);
  }
}
.headline {
  font-size: 24px;
  height: 40px;
@@ -1789,79 +2021,94 @@
  padding-left: 5px;
  margin-bottom: 10px;
  display: flex;
  // justify-content: space-between;
  .Add-details {
    font-size: 18px;
    color: #02a7f0;
    cursor: pointer;
  }
}
.red-star {
  ::v-deep.el-radio__label {
    position: relative;
    padding-right: 10px; /* 根据需要调整 */
    padding-right: 10px;
  }
  ::v-deep.el-radio__label::after {
    content: "*";
    color: red;
    position: absolute;
    right: -5px; /* 根据需要调整 */
    right: -5px;
    top: 0;
  }
  ::v-deep.el-input-group__textarea {
    white-space: pre-wrap; /* 保持空白符序列并正常换行 */
    word-break: break-all; /* 在长单词或URL地址内部进行换行 */
    white-space: pre-wrap;
    word-break: break-all;
  }
  ::v-deep.el-checkbox__label {
    position: relative;
    padding-right: 10px; /* 根据需要调整 */
    padding-right: 10px;
  }
  ::v-deep.el-checkbox__label::after {
    content: "*";
    color: red;
    position: absolute;
    right: -5px; /* 根据需要调整 */
    right: -5px;
    top: 0;
  }
}
::v-deep.offside-value .el-radio__label {
  color: #fff;
}
::v-deep.el-link.el-link--default {
  color: #02a7f0 !important;
}
.el-message-box__btns button:nth-child(2) {
  margin-left: 10px;
  background-color: #f57676;
  border-color: #f57676;
}
.el-icon-phone {
  transition: all 0.3s;
}
.el-button[disabled] .el-icon-phone {
  color: #c0c4cc;
}
.el-button:not([disabled]) .el-icon-phone {
  color: #409eff;
}
.el-button:not([disabled]):hover .el-icon-phone {
  color: #66b1ff;
  transform: scale(1.1);
}
.mulsz {
  font-size: 25px;
  margin-top: 20px;
}
.el-input.is-disabled .el-input__inner {
  background-color: #fff; /* 背景颜色 */
  border-color: #dcdfe6; /* 边框颜色 */
  color: #080808 !important; /* 文字颜色 */
  cursor: not-allowed; /* 鼠标样式 */
  background-color: #fff;
  border-color: #dcdfe6;
  color: #080808 !important;
  cursor: not-allowed;
}
.el-textarea.is-disabled .el-textarea__inner {
  background-color: #fff; /* 背景颜色 */
  border-color: #dcdfe6; /* 边框颜色 */
  color: #080808 !important; /* 文字颜色 */
  cursor: not-allowed; /* 鼠标样式 */
  background-color: #fff;
  border-color: #dcdfe6;
  color: #080808 !important;
  cursor: not-allowed;
}
</style>
src/views/followvisit/record/physical/index.vue
@@ -711,7 +711,6 @@
      const queryParams = {
        pid: Number(this.patid),
        allhosp: "0",
        pageNum: 1,
      };
      // 患者基础信息
      messagelistpatient(queryParams).then((response) => {
src/views/followvisit/zbAgain/index.vue
@@ -1187,8 +1187,8 @@
      });
    },
    affiliation() {
      this.topqueryParams.drcode = store.getters.hisUserId;
      this.topqueryParams.nurseId = store.getters.hisUserId;
      this.topqueryParams.managementDoctor = store.getters.hisUserId;
      this.getList(1);
    },
    onthatday() {
src/views/knowledge/questionnaire/compilequer/index.vue
@@ -262,7 +262,7 @@
                  <el-option
                    class="ruleFormaa"
                    v-for="item in flatArray"
                    :key="item.deptCode"
                    :key="item.id"
                    :label="item.label"
                    :value="item.deptCode"
                  >
@@ -285,7 +285,7 @@
                  <el-option
                    class="ruleFormaa"
                    v-for="item in flatArray"
                    :key="item.deptCode"
                    :key="item.id"
                    :label="item.label"
                    :value="item.deptCode"
                  >
@@ -566,10 +566,10 @@
                    </el-form-item></el-col
                  >
                  <el-col :span="12"
                    ><el-form-item label="是否可用">
                      <el-radio-group v-model="topicobj.isenable">
                    ><el-form-item label="是否隐藏">
                      <el-radio-group v-model="topicobj.ishide">
                        <el-radio
                          v-for="(item, index) in usable"
                          v-for="(item, index) in hides"
                          :label="item.value"
                          >{{ item.label }}</el-radio
                        >
@@ -582,8 +582,8 @@
                  v-if="topicobj.scriptType == 1"
                >
                  <el-radio-group v-model="topicobj.branchFlag">
                    <el-radio :label="1">是</el-radio>
                    <el-radio :label="0">否</el-radio>
                    <el-radio label="1">是</el-radio>
                    <el-radio label="0">否</el-radio>
                  </el-radio-group>
                </el-form-item>
                <el-form-item label="选中提示" v-if="topicobj.scriptType != 1">
@@ -656,6 +656,12 @@
                        <el-radio-group v-model="item.isabnormal">
                          <el-radio :label="1">是</el-radio>
                          <el-radio :label="0">否</el-radio>
                        </el-radio-group>
                      </el-form-item>
                      <el-form-item label="是否选中收集附加信息">
                        <el-radio-group v-model="item.appendflag">
                          <el-radio label="1">是</el-radio>
                          <el-radio label="0">否</el-radio>
                        </el-radio-group>
                      </el-form-item>
                    </el-row>
@@ -749,9 +755,7 @@
        >
        <el-button type="primary" @click="laststep()">上一步</el-button>
        <el-button type="info" @click="closeFm('ruleForm')">关闭</el-button>
        <el-button @click="toExamine('ruleForm')"
          >保存问题数据</el-button
        >
        <el-button @click="toExamine('ruleForm')">保存问题数据</el-button>
      </div>
      <!-- 问卷预览 -->
      <div v-if="Editprogress == 3">
@@ -1215,8 +1219,8 @@
                            style="width: 100px; height: 100px"
                            :src="item.picturePath"
                            :preview-src-list="
                                item.picturePath ? [item.picturePath] : []
                              "
                              item.picturePath ? [item.picturePath] : []
                            "
                          >
                          </el-image>
                        </div>
@@ -1299,6 +1303,7 @@
        svyTemplateLibScripts: [],
        tempDetpRelevances: [],
        svyLibTemplateTagList: [],
        suitway: [],
        scoreType: "4",
        isenable: "0",
        longTemp: "0",
@@ -1404,6 +1409,10 @@
      usable: [
        { value: "0", label: "可用" },
        { value: "1", label: "停用" },
      ],
      hides: [
        { value: 0, label: "正常" },
        { value: 1, label: "隐藏" },
      ],
      longtype: [
        { value: "0", label: "普通任务" },
@@ -1622,8 +1631,8 @@
          this.confirmillness();
          this.putbelongDepts();
          this.$modal.closeLoading();
          // this.$router.go(-1);
          window.location.reload();
          this.$router.go(-1);
          // window.location.reload();
        });
      } else {
        this.ruleForm.isoperation = 1;
@@ -1643,8 +1652,8 @@
    // 题目校验
    toExamine() {
      // 遍历题目集合
      for (let i = 0; i <  this.ruleForm.svyTemplateLibScripts.length; i++) {
        const question =  this.ruleForm.svyTemplateLibScripts[i];
      for (let i = 0; i < this.ruleForm.svyTemplateLibScripts.length; i++) {
        const question = this.ruleForm.svyTemplateLibScripts[i];
        // 如果 scriptType 为 4,则跳过当前题目
        if (question.scriptType === 4) {
@@ -1675,7 +1684,7 @@
      // 如果所有题目都校验通过,返回 true
      console.log("所有题目校验通过,选项名称无重复");
       this.Departmenttreatment();
      this.Departmenttreatment();
    },
    // 科室/院区处理
src/views/patient/patient/outpatient.vue
@@ -67,16 +67,16 @@
            ></el-cascader>
          </el-form-item>
          <el-form-item label="就诊日期">
              <el-date-picker
                v-model="dateRange"
                style="width: 240px"
                value-format="yyyy-MM-dd"
                type="daterange"
                range-separator="-"
                start-placeholder="开始日期"
                end-placeholder="结束日期"
              ></el-date-picker>
              <!-- <el-date-picker
            <el-date-picker
              v-model="dateRange"
              style="width: 240px"
              value-format="yyyy-MM-dd"
              type="daterange"
              range-separator="-"
              start-placeholder="开始日期"
              end-placeholder="结束日期"
            ></el-date-picker>
            <!-- <el-date-picker
                v-model="dateRange"
                type="datetimerange"
                value-format="yyyy-MM-dd HH:mm:ss"
@@ -85,7 +85,7 @@
                :default-time="['12:00:00']"
              >
              </el-date-picker> -->
            </el-form-item>
          </el-form-item>
          <el-row>
            <!-- <el-form-item label=" 就诊日期 " prop="admitdate">
              <el-date-picker
@@ -150,6 +150,18 @@
              @click="handleDelete"
              v-hasPermi="['system:user:remove']"
              >删除</el-button
            >
          </el-col>
          <el-col :span="1.5">
            <el-button
              type="warning"
              plain
              icon="el-icon-plus"
              size="medium"
              :disabled="multiple"
              @click="handleBatchAddTask"
            >
              批量添加任务</el-button
            >
          </el-col>
          <el-col :span="19">
@@ -228,7 +240,13 @@
              <el-button
                size="medium"
                type="text"
                @click="gettoken360(scope.row.idcardno,scope.row.drcode,scope.row.drname)"
                @click="
                  gettoken360(
                    scope.row.idcardno,
                    scope.row.drcode,
                    scope.row.drname
                  )
                "
                ><span class="button-textsc">{{
                  scope.row.patname
                }}</span></el-button
@@ -337,7 +355,107 @@
        />
      </el-col>
    </el-row>
    <el-dialog
      title="批量添加任务"
      :visible.sync="batchTaskVisible"
      width="90%"
      append-to-body
    >
      <el-row :gutter="20">
        <!-- 左侧:选中患者列表 -->
        <el-col :span="12">
          <div class="batch-patient-section">
            <h4>选中患者({{ selectedPatients.length }}人)</h4>
            <el-table
              :data="selectedPatients"
              border
              style="width: 100%"
              size="small"
            >
              <el-table-column prop="patname" label="姓名" width="100" />
              <el-table-column prop="sex" label="性别" width="80">
                <template slot-scope="scope">
                  {{ scope.row.sex === 1 ? "男" : "女" }}
                </template>
              </el-table-column>
              <el-table-column
                label="就诊时间"
                align="center"
                key="admitdate"
                prop="admitdate"
              >
                <template slot-scope="scope">
                  <span>{{ formatTime(scope.row.admitdate) }}</span>
                </template>
              </el-table-column>
              <el-table-column prop="outhospno" label="病案号" />
              <el-table-column prop="deptname" label="科室" />
            </el-table>
          </div>
        </el-col>
        <!-- 右侧:任务列表 -->
        <el-col :span="12">
          <div class="batch-task-section">
            <h4>任务列表(请选择1个任务)</h4>
            <el-table
              :data="taskList"
              border
              style="width: 100%"
              size="small"
              @current-change="handleTaskSelectionChange"
              highlight-current-row
            >
              <el-table-column
                label="任务名称"
                fixed
                align="center"
                key="taskName"
                prop="taskName"
                :show-overflow-tooltip="true"
              />
              <el-table-column
                label="服务项目"
                align="center"
                key="templatename"
                prop="templatename"
                :show-overflow-tooltip="true"
              />
              <el-table-column
                label="创建人"
                align="center"
                key="createBy"
                prop="createBy"
                :show-overflow-tooltip="true"
              />
              <el-table-column
                label="创建时间"
                sortable
                align="center"
                prop="createTime"
              >
                <template slot-scope="scope">
                  <span>{{ formatTime(scope.row.createTime) }}</span>
                </template>
              </el-table-column>
            </el-table>
          </div>
        </el-col>
      </el-row>
      <!-- 底部按钮 -->
      <div slot="footer" class="dialog-footer">
        <el-button @click="batchTaskVisible = false">取 消</el-button>
        <el-button
          type="primary"
          :loading="batchLoading"
          @click="submitBatchTask"
          >创建任务</el-button
        >
      </div>
    </el-dialog>
    <!-- 用户导入对话框 -->
    <el-dialog
      :title="upload.title"
@@ -383,6 +501,7 @@
          </div>
        </el-upload>
      </div>
      <!-- 导入检查 -->
      <div class="uploading" v-else-if="dractive == 2">
        <el-table :data="uploadingData" style="width: 100%">
@@ -446,7 +565,7 @@
import { getToken } from "@/utils/auth";
import Treeselect from "@riophae/vue-treeselect";
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
import { query360PatInfo } from "@/api/AiCentre/index";
import { query360PatInfo, getTasklist, addSubtask } from "@/api/AiCentre/index";
import store from "@/store";
@@ -509,6 +628,12 @@
      Labelchange: false, //修改新增弹窗
      propss: { multiple: true },
      optionstag: [], //标签列表
      batchTaskVisible: false, // 弹窗可见性
      selectedPatients: [], // 选中的患者列表
      taskList: [], // 任务列表
      selectedTask: null, // 选中的任务列表
      batchLoading: false, // 批量提交加载状态
      deptcode: "",
      Patientrange: [
        {
          name: "全部",
@@ -680,9 +805,9 @@
      if (this.dateRange) {
        this.queryParams.beginTime = this.dateRange[0];
        this.queryParams.endTime = this.dateRange[1];
      }else{
        this.queryParams.beginTime = '';
        this.queryParams.endTime = '';
      } else {
        this.queryParams.beginTime = "";
        this.queryParams.endTime = "";
      }
      listPatouthosp(this.queryParams).then((response) => {
        this.userList = response.rows;
@@ -733,11 +858,11 @@
      });
    },
    //患者360跳转
    gettoken360(sfzh,drcode,drname) {
    gettoken360(sfzh, drcode, drname) {
      this.postData.YeWuXX.BingRenXX.ZhengJianHM = sfzh;
      if (this.postData.XiaoXiTou.ZuHuMC=='丽水市中医院') {
        this.postData.YeWuXX.YongHuXX.YongHuID = '1400398571877961728';
        this.postData.YeWuXX.YongHuXX.YongHuXM = 'LSZYY';
      if (this.postData.XiaoXiTou.ZuHuMC == "丽水市中医院") {
        this.postData.YeWuXX.YongHuXX.YongHuID = "1400398571877961728";
        this.postData.YeWuXX.YongHuXX.YongHuXM = "LSZYY";
      }
      query360PatInfo(this.postData).then((res) => {
@@ -796,7 +921,7 @@
        leaveldeptcodes: [],
        leavehospitaldistrictcodes: [],
      };
        this.handleQuery();
      this.handleQuery();
    },
    // 多选框选中数据
    handleSelectionChange(selection) {
@@ -913,6 +1038,113 @@
      this.upload.open = false;
      this.dractive = 1;
    },
    /** 批量添加任务按钮点击 */
    handleBatchAddTask() {
      // 校验是否选中患者
      if (this.ids.length === 0) {
        this.$modal.msgWarning("请至少选中1名患者");
        return;
      }
      // 获取选中患者的科室信息(用于校验同一科室)
      const patientDepts = new Set();
      let deptcode = "";
      this.ids.forEach((patId) => {
        const patient = this.userList.find((item) => item.patid === patId);
        if (patient) {
          patientDepts.add(patient.deptname);
          deptcode = patient.deptcode;
        }
      });
      // 校验是否同一科室
      if (patientDepts.size > 1) {
        this.$modal.msgError("选中的患者不属于同一科室,无法批量添加任务");
        return;
      }
      // 获取选中患者列表
      this.selectedPatients = this.userList.filter((item) =>
        this.ids.includes(item.patid)
      );
      // 显示弹窗
      this.batchTaskVisible = true;
      // 获取任务列表
      this.loadTaskList(deptcode);
    },
    /** 加载任务列表 */
    loadTaskList(deptcode) {
      this.batchLoading = true;
      let topqueryParams = {
        pageNum: 1,
        pageSize: 10,
        serviceType: 3,
        type: 2,
        deptcode: deptcode,
      };
      getTasklist(topqueryParams).then((response) => {
        this.taskList = response.rows;
        this.batchLoading = false;
      });
    },
    /** 处理任务选择变化 */
    handleTaskSelectionChange(currentRow) {
      this.selectedTask = currentRow;
    },
    // 重写批量提交方法
    async submitBatchTask() {
      // 校验是否选中任务
      if (!this.selectedTask) {
        this.$modal.msgWarning("请选择1个任务");
        return;
      }
      this.batchLoading = true;
      const successPatients = [];
      const failedPatients = [];
      try {
        // 遍历选中的患者,逐个调用接口
        for (const patient of this.selectedPatients) {
          const params = {
            taskId: this.selectedTask.taskId,
            taskName: this.selectedTask.taskName,
            serviceType: this.selectedTask.serviceType,
            ...patient,
            age: "",
          };
          try {
            await addSubtask(params);
            successPatients.push(patient.patname);
          } catch (error) {
            failedPatients.push(patient.patname);
          }
        }
        // 显示处理结果
        let message = `成功为 ${successPatients.length} 名患者添加任务`;
        if (failedPatients.length > 0) {
          message += `,${failedPatients.length} 名患者添加失败`;
        }
        this.$modal.msgSuccess(message);
        this.batchTaskVisible = false;
        this.getList(); // 刷新患者列表
      } catch (error) {
        this.$modal.msgError("批量添加任务过程中出错");
      } finally {
        this.batchLoading = false;
      }
    },
    /** 批量添加患者任务接口 */
    batchAddPatientTask(params) {},
  },
};
</script>
@@ -963,4 +1195,41 @@
.button-textsc {
  color: #28cfe6;
}
.batch-patient-section,
.batch-task-section {
  padding: 15px;
  border: 1px solid #ebeef5;
  border-radius: 4px;
  margin-bottom: 15px;
}
.el-table--enable-row-hover .el-table__body tr:hover > td {
  background-color: #f5f7fa;
}
.el-table__body tr.current-row > td {
  background-color: #e6f7ff;
}
/* 禁用状态下按钮样式 */
.el-button.is-disabled {
  cursor: not-allowed;
}
.batch-patient-section h4,
.batch-task-section h4 {
  margin-top: 0;
  margin-bottom: 15px;
  color: #303133;
  font-size: 16px;
}
/* 表格样式优化 */
.el-table {
  margin-bottom: 10px;
}
/* 弹窗底部按钮间距 */
.dialog-footer {
  text-align: right;
  padding: 10px 20px 20px;
}
</style>