WXL
2025-03-14 12eb16cb5a087588fa5f598376b1f36d15ac81a3
src/views/followvisit/discharge/index.vue
@@ -17,7 +17,7 @@
                  font-weight: 600;
                "
              >
                {{ item.value }}
                {{ item.value ? item.value : 0 }}
              </div>
            </div>
          </el-card>
@@ -80,6 +80,17 @@
        </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-form-item>
        <el-form-item label="应随访时间">
          <el-date-picker
            v-model="dateRange"
            style="width: 240px"
@@ -213,14 +224,16 @@
        <el-table-column
          label="任务名称"
          fixed
          width="150"
          show-overflow-tooltip
          align="center"
          key="taskName"
          prop="taskName"
          width="180"
        />
        <!-- <el-table-column label="序号" fixed align="center" key="id" prop="id" /> -->
        <el-table-column
          label="姓名"
          width="100"
          align="center"
          key="sendname"
          prop="sendname"
@@ -231,7 +244,8 @@
              type="text"
              @click="
                $router.push({
                  path: '/patient/indexls'+'?current='+scope.row.sfzh
                  path: '/patient/indexls/',
                  query: { sfzh: scope.row.sfzh },
                })
              "
              ><span class="button-textsc">{{
@@ -261,7 +275,7 @@
              </div>
              <div v-if="scope.row.sendstate == 2">
                <el-tag type="primary" :disable-transitions="false"
                  >待执行</el-tag
                  >待随访</el-tag
                >
              </div>
              <div v-if="scope.row.sendstate == 3">
@@ -294,7 +308,7 @@
        />
        <el-table-column
          label="人工处理意见"
          label="处理意见"
          align="center"
          key="suggest"
          prop="suggest"
@@ -397,7 +411,7 @@
        /> -->
        <!-- <el-table-column label="年龄" align="center" key="age" prop="age" /> -->
        <!-- <el-table-column label="性别" align="center" key="sex" prop="sex" /> -->
        <!-- <el-table-column label="性别"width="100" align="center" key="sex" prop="sex" /> -->
        <!-- <el-table-column label="床号" align="center" key="badNo" prop="badNo" /> -->
        <el-table-column
          label="科室"
@@ -479,7 +493,7 @@
          label="操作"
          align="center"
          fixed="right"
          width="200"
          width="300"
          class-name="small-padding fixed-width"
        >
          <template slot-scope="scope">
@@ -664,46 +678,67 @@
    </el-dialog>
    <!-- 再次随访 -->
    <el-dialog title="患者再次随访" :visible.sync="dialogFormVisible">
      <el-form ref="form" :model="zcform" label-width="80px">
        <el-form-item label="患者名称">
          <el-input style="width: 400px" v-model="zcform.name"></el-input>
        </el-form-item>
      <el-form ref="zcform" :rules="zcrules" :model="zcform" label-width="80px">
        <el-form-item label="任务名称">
          <el-input style="width: 400px" v-model="zcform.name"></el-input>
          <el-input
            style="width: 400px"
            disabled
            v-model="zcform.taskName"
          ></el-input>
        </el-form-item>
        <el-form-item label="随访方式">
        <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-form-item label="即刻发送">
          <el-switch v-model="zcform.delivery"></el-switch>
        </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="随访时间" v-if="!zcform.delivery">
          <el-col :span="11">
            <el-date-picker
              type="date"
              placeholder="选择日期"
              v-model="zcform.date1"
              style="width: 100%"
            ></el-date-picker>
          </el-col>
          <el-col class="line" :span="2">-</el-col>
          <el-col :span="11">
            <el-time-picker
              placeholder="选择时间"
              v-model="zcform.date2"
              style="width: 100%"
            ></el-time-picker>
          </el-col>
        <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="dialogFormVisible = false"
          >确 定</el-button
        >
        <el-button type="primary" @click="setupsubtask">确认创建服务</el-button>
      </div>
    </el-dialog>
  </div>
@@ -711,15 +746,17 @@
<script>
import {
  listUser,
  getUser,
  delUser,
  addUser,
  updateUser,
  resetUserPwd,
  changeUserStatus,
} from "@/api/system/user";
import { getTaskservelist, buidegetTasklist } from "@/api/AiCentre/index";
import {
  getTaskservelist,
  buidegetTasklist,
  addserviceSubtask,
} from "@/api/AiCentre/index";
import Treeselect from "@riophae/vue-treeselect";
import store from "@/store";
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
@@ -822,7 +859,7 @@
          value: 0,
        },
        {
          name: "待执行",
          name: "待随访",
          value: 0,
        },
        {
@@ -835,7 +872,14 @@
        //   value: 0,
        // },
      ],
      zcrules: {
        date1: [
          { required: true, message: "请选择随访方式", trigger: "change" },
        ],
        resource: [
          { required: true, message: "请选择随访时间", trigger: "blur" },
        ],
      },
      // 表单参数
      form: {
        phonenumber: "",
@@ -849,6 +893,8 @@
      topqueryParams: {
        pageNum: 1,
        pageSize: 10,
        sendstate:2,
        sort: 1,
        serviceType: 2,
        searchscope: 3,
        scopetype: [],
@@ -865,7 +911,7 @@
        },
        {
          value: 2,
          label: "待执行",
          label: "待随访",
        },
        {
          value: 3,
@@ -952,6 +998,14 @@
        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;
      }
      getTaskservelist(this.topqueryParams).then((response) => {
        this.userList = response.rows[0].serviceSubtaskList;
        this.total = response.total;
@@ -1009,7 +1063,8 @@
      let obj = {
        pageNum: 1,
        pageSize: 10,
        leavehospitaldistrictcodes: this.topqueryParams.leavehospitaldistrictcodes,
        leavehospitaldistrictcodes:
          this.topqueryParams.leavehospitaldistrictcodes,
        sendstates: [2, 3],
        leaveldeptcodes: this.topqueryParams.leaveldeptcodes,
      };
@@ -1150,7 +1205,9 @@
        pageNum: 1,
        pageSize: 10,
        serviceType: 2,
        sendstate:2,
        searchscope: 2,
        sort: 1,
      };
      this.handleQuery(1);
    },
@@ -1292,7 +1349,6 @@
      if (row.preachformson) {
        if (row.preachformson.includes("3")) {
          type = 1;
          console.log(type, "rwo");
        }
      }
      this.$router.push({
@@ -1306,7 +1362,8 @@
      });
    },
    // 再次随访
    followupvisit() {
    followupvisit(row) {
      this.zcform = row;
      this.dialogFormVisible = true;
    },
    onSubmit() {},
@@ -1328,7 +1385,7 @@
          }).then((res) => {
            if (res.code == 200) {
              objson.sendstate = 4;
              objson.remark = '服务暂停';
              objson.remark = "服务暂停";
              Editsingletaskson(objson).then((res) => {
                if (res.code) {
                  this.$modal.msgSuccess("记录成功");
@@ -1369,6 +1426,33 @@
      }
      return "";
    },
    // 创建再次随访服务
    setupsubtask() {
      this.$refs['zcform'].validate((valid) => {
        if (valid) {
          let form = structuredClone(this.zcform);
          form.longSendTime = this.formatTime(form.date1);
          if (form.resource) {
            if (form.resource == 2) {
              form.serviceType = 10;
            }
          } else {
            this.$modal.msgError("未选择随访方式");
          }
          form.id = null;
          form.sendstate = 2;
          form.preachform = form.preachformson;
          addserviceSubtask(form).then((res) => {
            if (res.code == 200) {
              this.$modal.msgSuccess("创建成功");
            } else {
              this.$modal.msgError("创建失败");
            }
            this.dialogFormVisible = false;
          });
        }
      });
    },
  },
};
</script>