WXL
2024-04-24 f3bf99618bc379a9fa91cefefc813f770dcddc53
src/views/patient/propaganda/particty.vue
@@ -11,7 +11,7 @@
          ></el-step>
          <el-step
            icon="el-icon-user"
            title="任主体"
            title="任务主体"
            description="在本部选择服务患者"
          ></el-step>
          <el-step icon="el-icon-user" title="模版确认"></el-step>
@@ -36,11 +36,31 @@
            </div>
            <div class="jic-value">
              <el-form ref="form" :model="form" label-width="105px">
                <el-form-item label="模版名称:">
                <el-row :gutter="20">
                  <el-col :span="12"
                    ><el-form-item label="任务名称">
                      <el-input
                        style="width: 220px"
                        v-model="form.taskName"
                        placeholder="请输入任务名称"
                      /> </el-form-item
                  ></el-col>
                  <el-col :span="12"
                    ><el-form-item label="模版名称">
                      <el-input
                        style="width: 220px"
                        :disabled="true"
                        v-model="form.templatename"
                        placeholder="请在下列选择"
                      /> </el-form-item
                  ></el-col>
                </el-row>
                <el-form-item label="任务描述">
                  <el-input
                    style="width: 220px"
                    v-model="form.templatename"
                    placeholder="请在下列选择"
                    type="textarea"
                    v-model="form.taskDesc"
                    placeholder="请输入任务描述"
                  />
                </el-form-item>
                <el-form-item label="发送设置:" v-if="currenttype != 2">
@@ -145,12 +165,17 @@
                    v-show="showSearch"
                    label-width="98px"
                  >
                    <el-form-item label="宣教主题" v-if="currenttype == 1">
                    <el-form-item
                      label="宣教主题"
                      v-if="currenttype == 1 || currenttype == 8"
                    >
                      <el-input v-model="topqueryParams.name"></el-input>
                    </el-form-item>
                    <el-form-item
                      label="随访名称"
                      v-if="currenttype == 2 || currenttype == 3"
                      v-if="
                        currenttype == 2 || currenttype == 3 || currenttype == 7
                      "
                    >
                      <el-input
                        v-model="topqueryParams.name"
@@ -175,7 +200,7 @@
                    <el-form-item
                      label="宣教类型"
                      prop="status"
                      v-if="currenttype == 1"
                      v-if="currenttype == 1 || currenttype == 8"
                    >
                      <el-select
                        v-model="topqueryParams.topic"
@@ -211,7 +236,9 @@
                    <el-form-item
                      label="随访类型"
                      prop="status"
                      v-if="currenttype == 2 || currenttype == 3"
                      v-if="
                        currenttype == 2 || currenttype == 3 || currenttype == 7
                      "
                    >
                      <el-select
                        v-model="topqueryParams.topic"
@@ -547,7 +574,7 @@
              <el-form-item label="患者名称:">
                <el-input v-model="patientqueryParams.name"></el-input>
              </el-form-item>
              <el-form-item label="患者来源" prop="status">
              <!-- <el-form-item label="患者来源" prop="status">
                <el-select
                  v-model="patientqueryParams.topic"
                  placeholder="请选择"
@@ -560,36 +587,28 @@
                  >
                  </el-option>
                </el-select>
              </el-form-item>
              <el-form-item label="出院科室" prop="status">
              </el-form-item> -->
              <el-form-item label="就诊科室" prop="status">
                <el-select
                  v-model="patientqueryParams.topic"
                  placeholder="请选择"
                >
                  <el-option
                    v-for="item in topicoptions"
                    :key="item.value"
                    :label="item.label"
                    :value="item.value"
                  <el-option-group
                    v-for="group in topicoptions[0].children"
                    :key="group.deptName"
                    :label="group.deptName"
                  >
                  </el-option>
                    <el-option
                      v-for="item in group.children"
                      :key="item.deptId"
                      :label="item.deptName"
                      :value="item.deptId"
                    >
                    </el-option>
                  </el-option-group>
                </el-select>
              </el-form-item>
              <el-form-item label="出院病区" prop="status">
                <el-select
                  v-model="patientqueryParams.topic"
                  placeholder="请选择"
                >
                  <el-option
                    v-for="item in topicoptions"
                    :key="item.value"
                    :label="item.label"
                    :value="item.value"
                  >
                  </el-option>
                </el-select>
              </el-form-item>
              <el-form-item>
                <el-button
                  type="primary"
@@ -645,12 +664,13 @@
  getFollowuplist,
  getQtemplatelist,
  getTaskInfo,
  addhetask,
  gethetaskinfo,
  delhetaskinfo,
  Editsingletask,
  getvFollowup,
} from "@/api/AiCentre/index";
import { listDept } from "@/api/system/dept";
import SFtable from "@/components/SFtable"; //表格组件
export default {
@@ -673,8 +693,8 @@
        { label: "患者名称", width: "", prop: "name" },
        { label: "性别", width: "", prop: "sex" },
        { label: "年龄", width: "", prop: "age" },
        { label: "就诊科室", width: "", prop: "impTemplate" },
        { label: "入院日期", width: "", prop: "uploadTime" },
        { label: "就诊科室", width: "", prop: "deptName" },
        { label: "入院日期", width: "", prop: "inhosptime" },
        { label: "创建人(缺)", width: "", prop: "update_by" },
      ],
      tableLabelxj: [
@@ -683,37 +703,37 @@
        { label: "宣教形式", width: "", prop: "playType" },
        { label: "适用方式", width: "", prop: "suitway" },
        { label: "修改日期", width: "", prop: "uploadTime" },
        { label: "创建人(缺)", width: "", prop: "update_by" },
        { label: "创建人(缺)", width: "", prop: "updateBy" },
      ],
      tableLabelmz: [
        { label: "随访名称", width: "", prop: "templateName" },
        { label: "主要内容", width: "", prop: "note" },
        { label: "修改日期", width: "", prop: "updateTime" },
        { label: "创建人(缺)", width: "", prop: "update_by" },
        { label: "创建人(缺)", width: "", prop: "updateBy" },
      ],
      tableLabelcy: [
        { label: "随访名称", width: "", prop: "templateName" },
        { label: "随访计划", width: "", prop: "impTemplate" },
        { label: "修改日期", width: "", prop: "uploadTime" },
        { label: "创建人(缺)", width: "", prop: "update_by" },
        { label: "创建人(缺)", width: "", prop: "updateBy" },
      ],
      tableLabelfz: [
        { label: "通知名称", width: "", prop: "templateName" },
        { label: "通知模版", width: "", prop: "impTemplate" },
        { label: "修改日期", width: "", prop: "uploadTime" },
        { label: "创建人(缺)", width: "", prop: "update_by" },
        { label: "创建人(缺)", width: "", prop: "updateBy" },
      ],
      tableLabeltj: [
        { label: "通知名称", width: "", prop: "name" },
        { label: "通知模版", width: "", prop: "impTemplate" },
        { label: "修改日期", width: "", prop: "uploadTime" },
        { label: "创建人(缺)", width: "", prop: "update_by" },
        { label: "创建人(缺)", width: "", prop: "updateBy" },
      ],
      tableLabelwj: [
        { label: "问卷名称", width: "", prop: "name" },
        { label: "问卷模版", width: "", prop: "impTemplate" },
        { label: "修改日期", width: "", prop: "uploadTime" },
        { label: "创建人(缺)", width: "", prop: "update_by" },
        { label: "创建人(缺)", width: "", prop: "updateBy" },
      ],
      // 变量
      tableLabelvariable: [
@@ -740,7 +760,7 @@
        pageNum: 1, //
        pageSize: 10,
      },
      topicoptions: [],
      topicoptions: [{ children: [{ children: [] }] }],
      showSearch: true, //
      total: 0, //
      sontotal: 0, //
@@ -826,7 +846,8 @@
  created() {
    this.id = this.$route.query.id;
    this.form.type = this.$route.query.type;
    this.form.hospType = this.$route.query.type;
    this.listDept();
    this.Getdetails();
    this.Acquisitiontype();
  },
@@ -869,53 +890,36 @@
      };
      this.currenttype = this.$route.query.type;
      console.log(this.currenttype, "1");
      if (this.currenttype == 1) {
      if (this.currenttype == 1 || this.currenttype == 8) {
        // 医技宣教,普通宣教
        this.title = "宣教内容列表";
        this.tableLabel = this.tableLabelxj;
        this.checkboxlist = [
          "线下",
          "视频",
          "纸质",
          "语音",
          "短信",
          "微信公众号",
          "微信小程序",
          "支付宝",
          "二维码",
          "钉钉",
          "线下(口头宣教、电视宣教、纸质)",
          "线上(短信/钉钉的文本、图文链接)",
        ];
        getlibrarylist(queryParams).then((response) => {
          this.userList = response.rows;
          this.total = response.total;
        });
      } else if (this.currenttype == 2) {
      } else if (
        this.currenttype == 2 ||
        this.currenttype == 3 ||
        this.currenttype == 7
      ) {
        // 出院、门诊、专病随访
        this.title = "随访内容列表";
        this.tableLabel = this.tableLabelmz;
        this.checkboxlist = ["线下", "纸质", "语音", "短信", "微信公众号"];
        this.checkboxlist = ["线下", "AI语音外呼", "人工电话"];
        getFollowuplist(queryParams).then((response) => {
          this.userList = response.rows;
          this.total = response.total;
        });
      } else if (this.currenttype == 3) {
        this.title = "随访计划列表";
        this.tableLabel = this.tableLabelcy;
        this.checkboxlist = ["线下", "纸质", "语音", "短信", "微信公众号"];
        getFollowuplist(queryParams).then((response) => {
          this.userList = response.rows;
          this.total = response.total;
        });
      } else if (this.currenttype == 4) {
      } else if (this.currenttype == 4 || this.currenttype == 5) {
        // 复诊、体检通知
        this.title = "通知内容列表";
        this.tableLabel = this.tableLabelfz;
        this.checkboxlist = ["语音", "短信", "微信公众号"];
        getFollowuplist(queryParams).then((response) => {
          this.userList = response.rows;
          this.total = response.total;
        });
      } else if (this.currenttype == 5) {
        this.title = "通知内容列表";
        this.tableLabel = this.tableLabeltj;
        this.checkboxlist = ["纸质", "语音", "短信", "微信公众号"];
        this.checkboxlist = ["线下", "AI语音外呼", "人工电话", "短信"];
        getFollowuplist(queryParams).then((response) => {
          this.userList = response.rows;
          this.total = response.total;
@@ -924,14 +928,8 @@
        this.title = "问卷内容列表";
        this.tableLabel = this.tableLabelwj;
        this.checkboxlist = [
          "线下",
          "视频",
          "纸质",
          "语音",
          "短信",
          "微信公众号",
          "微信小程序",
          "钉钉",
          "线下(纸质)",
          "线上(短信/钉钉的文本、问卷链接)",
        ];
        getQtemplatelist(queryParams).then((response) => {
          this.userList = response.rows;
@@ -947,6 +945,7 @@
    // 保存
    submitForm(formName) {
      this.form.serviceform = this.checkList.join(",");
      this.form.hospType = this.currenttype;
      const filteredArray = this.variableList.filter(
        (item) =>
          item.name !== "姓名" && item.name !== "电话" && item.name !== "地址"
@@ -969,27 +968,18 @@
          this.$router.go(-1);
        }
      });
      // 提交
      // this.$refs[formName].validate((valid, object) => {
      //   if (valid) {
      //     alert("submit!");
      //   } else {
      //     console.log("error submit!!", object);
      //     return false;
      //   }
      // });
    },
    // ----------------------表格子组件事件
    // 选择模版
    selectfn(row, type) {
      console.log(row);
      console.log(type);
      // 模版情况下获取模版信息
      if (type == 1) {
        if (
          this.currenttype == 2 ||
          this.currenttype == 4 ||
          this.currenttype == 3
          this.currenttype == 3 ||
          currenttype == 5 ||
          currenttype == 7
        ) {
          this.form.templatename = row.templateName;
          this.form.templateid = row.id;
@@ -1060,7 +1050,9 @@
      console.log(this.ids);
    },
    getList() {},
    handleQuery() {},
    handleQuery() {
      this.handleAddpatient();
    },
    resetQuery() {},
    handleClosehz() {
      this.dialogVisiblepatient = false;
@@ -1094,6 +1086,13 @@
          console.log(res);
        });
      }
    },
    // 获取科室列表
    listDept() {
      listDept().then((res) => {
        this.topicoptions = this.handleTree(res.data, "deptId");
        console.log(this.topicoptions, "topicoptions");
      });
    },
    // 新增派送患者
    AddDispatchpatients() {
@@ -1170,10 +1169,12 @@
      }
      this.form.sendTimeslot = combinedData;
      // 展示数据临时存储日期、早、中、晚
      console.log(11);
      console.log(this.time2, "this.time2");
      this.form.sendlimitabegin = this.daytime.join(",");
      this.form.sendlimitaend = this.time1.join(",");
      this.form.sendlimitnbegin = this.time2.join(",");
      this.form.sendlimitnend = this.time3.join(",");
      if (this.time1) this.form.sendlimitaend = this.time1.join(",");
      if (this.time2) this.form.sendlimitnbegin = this.time2.join(",");
      if (this.time3) this.form.sendlimitnend = this.time3.join(",");
      console.log(combinedData, "combinedData");
    },
  },
@@ -1332,6 +1333,12 @@
    font-size: 24px;
  }
}
::v-deep.el-input.is-disabled .el-input__inner {
  background-color: #f5f7fa;
  border-color: #dfe4ed;
  color: rgb(253, 66, 66);
  cursor: not-allowed;
}
::v-deep.el-checkbox-group {
  span {
    font-size: 24px;