WXL (wul)
2 天以前 23f74bc3f782d183f66a08bd8ce4790cc61f4e61
src/views/followvisit/discharge/index.vue
@@ -17,7 +17,7 @@
                  font-weight: 600;
                "
              >
                {{ item.value ? item.value : 0 }}
                {{ item.value ? item.value : 0 ? item.value : 0 }}
              </div>
            </div>
          </el-card>
@@ -118,18 +118,6 @@
          <el-input
            v-model="topqueryParams.updateBy"
            placeholder="请输入随访人员"
          ></el-input>
        </el-form-item>
        <el-form-item label="主治医生" prop="drname">
          <el-input
            v-model="topqueryParams.drname"
            placeholder="请输入主治医生"
          ></el-input>
        </el-form-item>
        <el-form-item label="经管医生" prop="managementDoctor">
          <el-input
            v-model="topqueryParams.managementDoctor"
            placeholder="请输入主治医生"
          ></el-input>
        </el-form-item>
@@ -269,32 +257,9 @@
            </div>
          </div>
        </el-col>
        <el-col :span="1.5">
          <div class="documentf">
            <div class="document">
              <el-tooltip
                content="请先选中服务"
                placement="top"
                :disabled="!multiple"
              >
                <div class="tooltip-wrapper">
                  <el-button
                    type="primary"
                    :disabled="multiple"
                    class="purple-button"
                    @click="scoreDialogVisible = true"
                  >
                    满意度调查
                  </el-button>
                </div>
              </el-tooltip>
            </div>
          </div>
        </el-col>
      </el-row>
      <el-table
        v-loading="loading"
        ref="userform"
        :data="userList"
        :row-class-name="tableRowClassName"
        @selection-change="handleSelectionChange"
@@ -316,20 +281,7 @@
          align="center"
          key="sendname"
          prop="sendname"
        >
          <template slot-scope="scope">
            <el-button
              size="medium"
              type="text"
              @click="
                gettoken360(scope.row.sfzh, scope.row.drcode, scope.row.drname)
              "
              ><span class="button-textsc">{{
                scope.row.sendname
              }}</span></el-button
            >
          </template>
        </el-table-column>
        />
        <el-table-column
          label="任务状态"
          align="center"
@@ -446,13 +398,6 @@
          width="120"
        />
        <el-table-column
          label="经管医生"
          align="center"
          key="managementDoctor"
          prop="managementDoctor"
          width="120"
        />
        <el-table-column
          label="出院天数"
          width="120"
          align="center"
@@ -565,18 +510,12 @@
          prop="remark"
        >
          <template slot-scope="scope" v-if="scope.row.remark">
            <el-tooltip
              :content="scope.row.remark"
              placement="top"
              effect="dark"
            <el-tag
              type="warning"
              v-if="scope.row.sendstate != 5 && scope.row.sendstate != 4"
              >{{ scope.row.remark }}</el-tag
            >
              <el-tag
                type="warning"
                v-if="scope.row.sendstate != 5 && scope.row.sendstate != 4"
                >{{ scope.row.remark }}</el-tag
              >
              <el-tag type="warning" v-else>{{ scope.row.remark }}</el-tag>
            </el-tooltip>
            <el-tag type="warning" v-else>{{ scope.row.remark }}</el-tag>
          </template>
        </el-table-column>
        <el-table-column
@@ -599,12 +538,10 @@
                v-if="scope.row.isVisitAgain!=2"
                @click="followupvisit(scope.row)"
                ><span class="button-bb"
                  ><i class="el-icon-s-promotion"></i>再次随访</span
                ></el-button
              >
            </el-tooltip>
            <el-tooltip
              v-if="scope.row.sendstate == 1 || scope.row.sendstate == 2"
                  ><i class="el-icon-s-promotion"></i></span
              ></el-button>
            </el-tooltip> -->
            <!-- <el-tooltip
              class="item"
              effect="dark"
              content="暂停服务"
@@ -615,10 +552,8 @@
                type="text"
                @click="handlestop(scope.row)"
                v-hasPermi="['system:user:edit']"
                ><span class="button-sc"
                  ><i class="el-icon-remove-outline"></i>暂停服务</span
                ></el-button
              >
                ><span class="button-sc"><i class="el-icon-delete"></i></span
              ></el-button>
            </el-tooltip> -->
            <el-button size="medium" type="text" @click="Seedetails(scope.row)"
              ><span class="button-zx"
@@ -645,181 +580,6 @@
        @pagination="getList"
      />
    </el-row>
    <!-- 满意度弹框 -->
    <el-dialog
      title="随访满意度评分"
      :visible.sync="scoreDialogVisible"
      width="80%"
      :close-on-click-modal="false"
    >
      <el-table :data="selectedRows" border style="width: 100%">
        <el-table-column
          label="姓名"
          width="100"
          align="center"
          prop="sendname"
        />
        <el-table-column
          label="任务名称"
          width="180"
          align="center"
          prop="taskName"
        />
        <!-- 新增评分列 -->
        <el-table-column
          label="真实性(20)"
          align="center"
          key="authenticity"
          prop="authenticity"
          width="150"
        >
          <template slot-scope="scope">
            <el-input-number
              v-model="scope.row.authenticity"
              :min="0"
              :max="20"
              :step="1"
              size="small"
            />
          </template>
        </el-table-column>
        <el-table-column
          label="一周内完成(20)"
          align="center"
          key="weekFinish"
          prop="weekFinish"
          width="150"
        >
          <template slot-scope="scope">
            <el-input-number
              v-model="scope.row.weekFinish"
              :min="0"
              :max="20"
              :step="1"
              size="small"
            />
          </template>
        </el-table-column>
        <el-table-column
          label="规范性(10)"
          align="center"
          key="standard"
          prop="standard"
          width="150"
        >
          <template slot-scope="scope">
            <el-input-number
              v-model="scope.row.standard"
              :min="0"
              :max="10"
              :step="1"
              size="small"
            />
          </template>
        </el-table-column>
        <el-table-column
          label="及时性(10)"
          align="center"
          key="timeliness"
          prop="timeliness"
          width="150"
        >
          <template slot-scope="scope">
            <el-input-number
              v-model="scope.row.timeliness"
              :min="0"
              :max="10"
              :step="1"
              size="small"
            />
          </template>
        </el-table-column>
        <el-table-column
          label="宣教情况(10)"
          align="center"
          key="library"
          prop="library"
          width="150"
        >
          <template slot-scope="scope">
            <el-input-number
              v-model="scope.row.library"
              :min="0"
              :max="10"
              :step="1"
              size="small"
            />
          </template>
        </el-table-column>
        <el-table-column
          label="环境满意度(10)"
          align="center"
          key="environment"
          prop="environment"
          width="150"
        >
          <template slot-scope="scope">
            <el-input-number
              v-model="scope.row.environment"
              :min="0"
              :max="10"
              :step="1"
              size="small"
            />
          </template>
        </el-table-column>
        <el-table-column
          label="医生满意度(10)"
          align="center"
          key="doctorSatisfaction"
          prop="doctorSatisfaction"
          width="150"
        >
          <template slot-scope="scope">
            <el-input-number
              v-model="scope.row.doctorSatisfaction"
              :min="0"
              :max="10"
              :step="1"
              size="small"
            />
          </template>
        </el-table-column>
        <el-table-column
          label="护士满意度(10)"
          align="center"
          key="nurseSatisfaction"
          prop="nurseSatisfaction"
          width="150"
        >
          <template slot-scope="scope">
            <el-input-number
              v-model="scope.row.nurseSatisfaction"
              :min="0"
              :max="10"
              :step="1"
              size="small"
            />
          </template>
        </el-table-column>
        <el-table-column
          label="总分"
          align="center"
          key="total"
          prop="total"
          fixed="right"
        >
          <template slot-scope="scope">
            <span>{{ calculateTotal(scope.row) }}</span>
          </template>
        </el-table-column>
      </el-table>
      <div slot="footer" class="dialog-footer">
        <el-button @click="scoreDialogVisible = false">取消</el-button>
        <el-button type="primary" @click="saveScores">保存</el-button>
      </div>
    </el-dialog>
    <!-- 添加或修改影像随访对话框 -->
    <el-dialog
      :title="amendtag ? '修改患者信息' : '新增患者'"
@@ -859,25 +619,11 @@
            </el-form-item>
          </el-col>
        </el-row>
        <el-row >
          <el-col :span="8">
            <el-form-item label="过滤医生" width="100" prop="filterDrname">
              <el-input
                v-model="form.filterDrname"
                placeholder="请输入医生姓名"
                maxlength="30"
              />
            </el-form-item>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="24">
            <el-form-item label="过滤原因">
              <el-input
                v-model="form.notrequiredreason"
                type="textarea"
                placeholder="请输入过滤原因"
              ></el-input>
            <el-form-item label="门诊随访要求">
              <el-input type="textarea" v-model="form.desc"></el-input>
            </el-form-item>
          </el-col>
        </el-row>
@@ -962,78 +708,6 @@
        >
      </span>
    </el-dialog>
    <!-- 再次随访 -->
    <el-dialog title="患者再次随访" :visible.sync="dialogFormVisible">
      <el-form ref="zcform" :rules="zcrules" :model="zcform" label-width="80px">
        <el-form-item label="任务名称">
          <el-input
            style="width: 400px"
            disabled
            v-model="zcform.taskName"
          ></el-input>
        </el-form-item>
        <el-form-item label="患者名称">
          <el-input
            style="width: 400px"
            disabled
            v-model="zcform.sendname"
          ></el-input>
        </el-form-item>
        <el-form-item label="年龄">
          <el-input
            style="width: 400px"
            disabled
            v-model="zcform.age"
          ></el-input>
        </el-form-item>
        <el-form-item label="科室">
          <el-input
            style="width: 400px"
            disabled
            v-model="zcform.deptname"
          ></el-input>
        </el-form-item>
        <el-form-item label="病区">
          <el-input
            style="width: 400px"
            disabled
            v-model="zcform.leavehospitaldistrictname"
          ></el-input>
        </el-form-item>
        <el-form-item label="随访方式" prop="resource">
          <el-radio-group v-model="zcform.resource">
            <el-radio label="1">本病区随访</el-radio>
            <el-radio label="2">随访中心随访</el-radio>
          </el-radio-group>
        </el-form-item>
        <!-- <el-form-item label="即刻发送">
          <el-switch v-model="zcform.delivery"></el-switch>
        </el-form-item> -->
        <el-form-item label="出院时间">
          <el-input
            style="width: 400px"
            disabled
            v-model="zcform.endtime"
          ></el-input>
        </el-form-item>
        <el-form-item label="随访完成时间" prop="date1">
          <el-date-picker
            type="date"
            placeholder="选择日期"
            v-model="zcform.date1"
            style="width: 100%"
          ></el-date-picker>
        </el-form-item>
        <el-form-item label="随访记录">
          <el-input type="textarea" v-model="zcform.remark"></el-input>
        </el-form-item>
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button @click="dialogFormVisible = false">取 消</el-button>
        <el-button type="primary" @click="setupsubtask">确认创建服务</el-button>
      </div>
    </el-dialog>
  </div>
</template>
@@ -1045,14 +719,7 @@
  resetUserPwd,
  changeUserStatus,
} from "@/api/system/user";
import {
  getTaskservelist,
  buidegetTasklist,
  addserviceSubtask,
  query360PatInfo,
  addsatisfaction,
} from "@/api/AiCentre/index";
import { alterpatient, particularpatient } from "@/api/patient/homepage";
import { getTaskservelist, buidegetTasklist } from "@/api/AiCentre/index";
import Treeselect from "@riophae/vue-treeselect";
import store from "@/store";
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
@@ -1109,13 +776,31 @@
      radios: [],
      previewtype: 2, //预览影像随访类型
      total: 0, // 总条数
      // 满意度调查数据
      scoreDialogVisible: false,
      selectedRows: [],
      ImportQuantity: 999, //导影像随访数量
      //预览影像随访信息
      previewvalue: {
        username: "这个医生对你怎么样",
      },
      value: [],
      list: [],
      topicoptionssort: [
        {
          value: 0,
          label: "出院时间(正序)",
        },
        {
          value: 1,
          label: "出院时间(倒序)",
        },
        {
          value: 2,
          label: "发送时间(正序)",
        },
        {
          value: 3,
          label: "发送时间(倒序)",
        },
      ],
      sourcetype: [
        {
          value: 1,
@@ -1154,10 +839,10 @@
          name: "待随访",
          value: 0,
        },
        // {
        //   name: "已发送",
        //   value: 0,
        // },
        {
          name: "已发送",
          value: 0,
        },
        // {
        //   name: "表单已发送",
@@ -1181,32 +866,11 @@
        qystatus: "",
        btstatus: "",
      },
      topicoptionssort: [
        {
          value: 0,
          label: "出院时间(正序)",
        },
        {
          value: 1,
          label: "出院时间(倒序)",
        },
        {
          value: 2,
          label: "发送时间(正序)",
        },
        {
          value: 3,
          label: "发送时间(倒序)",
        },
      ],
      // 查询参数
      topqueryParams: {
        pageNum: 1,
        pageSize: 10,
        sendstate: 2,
        sort: 2, //0 出院时间(正序)    1 出院时间(倒序)   2 发送时间(正序)    3 发送时间(倒序)
        serviceType: 2,
        searchscope: 3,
        visitCount: 1,
        scopetype: [],
        leaveldeptcodes: [],
@@ -1340,33 +1004,20 @@
    this.getList(1);
  },
  methods: {
    /** 查询随访服务列表 */
    /** 查询门诊随访服务列表 */
    getList(refresh) {
      // 默认全部
      if (this.topqueryParams.searchscope == 3) {
        this.topqueryParams.leaveldeptcodes = store.getters.belongDepts.map(
          (obj) => obj.deptCode
        );
        this.topqueryParams.leavehospitaldistrictcodes =
          store.getters.belongWards.map((obj) => obj.districtCode);
      }
      // 接受异常跳转
      if (this.errtype) {
        this.topqueryParams.leavehospitaldistrictcodes.push(
          this.leavehospitaldistrictcode
        );
        console.log(this.topqueryParams.leavehospitaldistrictcodes, "11");
      }
      this.loading = true;
      if (
        this.topqueryParams.leavehospitaldistrictcodes[0] &&
        this.topqueryParams.leaveldeptcodes[0]
      ) {
        this.topqueryParams.deptOrDistrict = 2;
      } else {
        this.topqueryParams.deptOrDistrict = 1;
      }
      if (!this.topqueryParams.leavehospitaldistrictcodes)
        this.topqueryParams.leavehospitaldistrictcodes = [];
      if (!this.topqueryParams.leaveldeptcodes)
        this.topqueryParams.leaveldeptcodes = [];
      getTaskservelist(this.topqueryParams).then((response) => {
        this.userList = response.rows[0].serviceSubtaskList;
        this.total = response.total;
@@ -1378,7 +1029,7 @@
          this.ycvalue = response.rows[0].yc;
          this.cardlist[2].value = response.rows[0].fssb;
          this.cardlist[3].value = response.rows[0].dsf;
          // this.cardlist[4].value = response.rows[0].yfs2;
          this.cardlist[4].value = response.rows[0].yfs2;
          this.yfsvalue = response.rows[0].yfs;
        }
        this.loading = false;
@@ -1409,7 +1060,7 @@
    },
    affiliation() {
      this.topqueryParams.managementDoctor = store.getters.hisUserId;
      this.topqueryParams.managementDoctorCode= store.getters.hisUserId;
      this.getList(1);
    },
    onthatday() {
@@ -1422,13 +1073,11 @@
      return now.toISOString().slice(0, 10); // 截取前10个字符,即 YYYY-MM-DD
    },
    buidegetTasklist(type) {
      if (this.topqueryParams.searchscope == 3) {
        this.topqueryParams.leaveldeptcodes = store.getters.belongDepts.map(
          (obj) => obj.deptCode
        );
        this.topqueryParams.leavehospitaldistrictcodes =
          store.getters.belongWards.map((obj) => obj.districtCode);
      }
      this.topqueryParams.leaveldeptcodes = store.getters.belongDepts.map(
        (obj) => obj.deptCode
      );
      this.topqueryParams.leavehospitaldistrictcodes =
        store.getters.belongWards.map((obj) => obj.districtCode);
      // 接受异常跳转
      if (this.errtype) {
        this.topqueryParams.leavehospitaldistrictcodes.push(
@@ -1454,7 +1103,7 @@
          this.ycvalue = response.rows[0].yc;
          this.cardlist[3].value = response.rows[0].fssb;
          this.cardlist[4].value = response.rows[0].dsf;
          // this.cardlist[5].value = response.rows[0].yfs2;
          this.cardlist[5].value = response.rows[0].yfs2;
          this.yfsvalue = response.rows[0].yfs;
        }
        this.loading = false;
@@ -1537,18 +1186,19 @@
    },
    /** 搜索按钮操作 */
    handleQuery(refresh) {
      if (this.topqueryParams.searchscope == 3) {
        this.topqueryParams.leaveldeptcodes = store.getters.belongDepts.map(
          (obj) => obj.deptCode
        );
        this.topqueryParams.leavehospitaldistrictcodes =
          store.getters.belongWards.map((obj) => obj.districtCode);
      }
      this.topqueryParams.leaveldeptcodes = store.getters.belongDepts.map(
        (obj) => obj.deptCode
      );
      this.topqueryParams.leavehospitaldistrictcodes =
        store.getters.belongWards.map((obj) => obj.districtCode);
      this.topqueryParams.pageNum = 1;
      this.topqueryParams.startOutHospTime = this.dateRange[0];
      this.topqueryParams.endOutHospTime = this.dateRange[1];
      this.topqueryParams.startSendDateTime = this.dateRangefs[0];
      this.topqueryParams.endSendDateTime = this.dateRangefs[1];
      console.log(221);
      this.getList(refresh);
    },
    // 患者范围处理
@@ -1560,13 +1210,10 @@
      if (type == 1) {
        this.topqueryParams.leaveldeptcodes.push(code);
        this.topqueryParams.leavehospitaldistrictcodes = [];
        this.topqueryParams.searchscope = 1;
      } else if (type == 2) {
        this.topqueryParams.leavehospitaldistrictcodes.push(code);
        this.topqueryParams.leaveldeptcodes = [];
        this.topqueryParams.searchscope = 2;
      } else {
        this.topqueryParams.searchscope = 3;
      }
    },
    /** 重置按钮操作 */
@@ -1579,72 +1226,14 @@
        sendstate: 2,
        sort: 2, //0 出院时间(正序)    1 出院时间(倒序)   2 发送时间(正序)    3 发送时间(倒序)
        serviceType: 2,
        searchscope: 3,
        visitCount: 1,
        scopetype: [],
        leaveldeptcodes: [],
        leavehospitaldistrictcodes: [],
      };
      this.handleQuery(1);
    },
    handleSelectionChange(rows) {
      this.selectedRows = rows.map((row) => {
        // 初始化评分字段
        return {
          ...row,
          authenticity: row.authenticity || 0,
          weekFinish: row.weekFinish || 0,
          standard: row.standard || 0,
          timeliness: row.timeliness || 0,
          library: row.library || 0,
          environment: row.environment || 0,
          doctorSatisfaction: row.doctorSatisfaction || 0,
          nurseSatisfaction: row.nurseSatisfaction || 0,
        };
      });
      if (this.selectedRows.length > 0) {
        this.multiple = false;
      } else {
        this.multiple = true;
      }
    },
    // 计算总分
    calculateTotal(row) {
      return (
        (row.authenticity || 0) +
        (row.weekFinish || 0) +
        (row.standard || 0) +
        (row.timeliness || 0) +
        (row.library || 0) +
        (row.environment || 0) +
        (row.doctorSatisfaction || 0) +
        (row.nurseSatisfaction || 0)
      );
    },
    // 保存评分
    saveScores() {
      this.selectedRows.forEach((item) => {
        item.createBy = null;
        item.patName = item.sendname;
        item.hospitaldistrictname = item.leavehospitaldistrictname;
      });
      addsatisfaction(this.selectedRows).then((res) => {
        if (res.code == 200) {
          this.$message.success("评分保存成功");
          this.scoreDialogVisible = false;
          this.selectedRows=[];
          this.$refs.userform.clearSelection()
        } else {
          this.$modal.msgWarning("评分保存失败");
          this.scoreDialogVisible = false;
          this.selectedRows=[];
          this.$refs.userform.clearSelection()
        }
      });
      // 这里可以添加保存逻辑,如调用API保存评分
    // 多选框选中数据
    handleSelectionChange(selection) {
      this.ids = selection.map((item) => item.userId);
      this.single = selection.length != 1;
      this.multiple = !selection.length;
    },
    //删除选项
    handleClose(tag) {
@@ -1811,52 +1400,6 @@
        },
      });
    },
    // 再次随访
    followupvisit(row) {
      this.zcform = row;
      this.zcform.endtime = this.formatTime(this.zcform.endtime);
      this.dialogFormVisible = true;
    },
    onSubmit() {},
    // 暂停服务
    handlestop(row) {
      let objson = row;
      this.$modal
        .confirm(
          '是否确认暂停任务名称为"' +
            row.taskName +
            '患者名称为"' +
            row.sendname +
            '"的数据项?'
        )
        .then(() => {
          getTaskservelist({
            patid: row.patid,
            taskid: row.taskid,
          }).then((res) => {
            if (res.code == 200) {
              objson.sendstate = 4;
              objson.remark = "服务暂停";
              Editsingletaskson(objson).then((res) => {
                if (res.code) {
                  this.$modal.msgSuccess("记录成功");
                  this.getList(1);
                }
              });
            }
          });
        })
        .catch(() => {});
    },
    // 患者过滤触发
    handleUpdate(row) {
      particularpatient(row.patid).then((response) => {
        this.form = response.data;
        this.form.filterDrname = store.getters.nickName;
      });
      this.amendtag = true;
      this.Labelchange = true;
    },
    // 便捷按钮
    toleadExport(too) {
      if (too == 1) {
@@ -1885,48 +1428,6 @@
        return "warning-row";
      }
      return "";
    },
    // 创建再次随访服务
    setupsubtask() {
      this.$refs["zcform"].validate((valid) => {
        if (valid) {
          this.zcform.remark =
            this.zcform.remark + "【" + this.getCurrentTime() + "】";
          let form = structuredClone(this.zcform);
          form.longSendTime = this.formatTime(form.date1);
          form.finishtime = "";
          if (form.resource) {
            if (form.resource == 2) {
              form.serviceType = 13;
            }
          } else {
            this.$modal.msgError("未选择随访方式");
          }
          form.id = null;
          form.sendstate = 2;
          form.preachform = form.preachformson;
          form.longTask = 0;
          addserviceSubtask(form).then((res) => {
            if (res.code == 200) {
              this.$modal.msgSuccess("创建成功");
            } else {
              this.$modal.msgError("创建失败");
            }
            this.dialogFormVisible = false;
          });
        }
      });
    },
    getCurrentTime() {
      const now = new Date();
      const year = now.getFullYear();
      const month = String(now.getMonth() + 1).padStart(2, "0");
      const day = String(now.getDate()).padStart(2, "0");
      const hours = String(now.getHours()).padStart(2, "0");
      const minutes = String(now.getMinutes()).padStart(2, "0");
      const seconds = String(now.getSeconds()).padStart(2, "0");
      return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
    },
  },
};
@@ -2079,28 +1580,7 @@
    font-size: 24px;
  }
}
.purple-button {
  background-color: #7e22ce;
  border-color: #7e22ce;
  color: #fff;
}
.purple-button:hover,
.purple-button:focus {
  background-color: #9333ea;
  border-color: #9333ea;
}
.purple-button:active {
  background-color: #6b21a8;
  border-color: #6b21a8;
}
.purple-button.is-disabled {
  background-color: #d8b4fe;
  border-color: #d8b4fe;
  opacity: 1; /* 保持禁用状态透明度 */
}
// 选项字体放大
// ::v-deep.el-checkbox-group {
//   span {