WXL
2024-08-13 d1367a2eafbc26cadf07abb3caa94a0d64d09cab
src/views/patient/patient/index.vue
@@ -171,6 +171,16 @@
                  >删除</el-button
                >
              </el-col>
              <el-col :span="1.5">
                <el-button
                  type="primary"
                  plain
                  icon="el-icon-s-promotion"
                  size="medium"
                  @click="distribute"
                  >向任务派发患者</el-button
                >
              </el-col>
              <el-col :span="6">
                <div class="documentf">
                  <div class="document">
@@ -354,6 +364,127 @@
        </el-row>
      </div>
    </div>
    <el-dialog title="选择任务" :visible.sync="distributeVisible" width="70%">
      <div class="preview-left">
        <el-form
          :model="queryParams"
          ref="queryForm"
          size="small"
          :inline="true"
          label-width="98px"
        >
          <el-select
            @change="distribute"
            v-model="tasktopic"
            placeholder="请选择任务类型"
          >
            <el-option
              v-for="item in taskoptions"
              :key="item.value"
              :label="item.label"
              :value="item.value"
            >
            </el-option>
          </el-select>
        </el-form>
        <el-table v-loading="loading" :data="taskuserList">
          <el-table-column
            label="任务名称"
            fixed
            align="center"
            key="taskName"
            prop="taskName"
            width="140"
            :show-overflow-tooltip="true"
          />
          <el-table-column
            label="任务描述"
            align="center"
            key="taskDesc"
            prop="taskDesc"
            width="180"
            :show-overflow-tooltip="true"
          />
          <el-table-column
            label="服务项目"
            align="center"
            key="templatename"
            prop="templatename"
          />
          <el-table-column
            label="待执行/总任务"
            align="center"
            key="nickName"
            prop="nickName"
          >
            <template slot-scope="scope">
              <span>{{ scope.row.wfs }}/{{ scope.row.yfs }}</span>
            </template>
          </el-table-column>
          <el-table-column
            label="创建人"
            align="center"
            key="createBy"
            prop="createBy"
            width="120"
            :show-overflow-tooltip="true"
          />
          <el-table-column
            label="创建时间"
            sortable
            align="center"
            prop="createTime"
            width="160"
          >
            <template slot-scope="scope">
              <span>{{ parseTime(scope.row.createTime) }}</span>
            </template>
          </el-table-column>
          <el-table-column
            label="状态"
            fixed="right"
            align="center"
            key="sendState"
            prop="sendState"
            width="120"
          >
            <template slot-scope="scope">
              <dict-tag
                :options="dict.type.task_status"
                :value="scope.row.sendState"
              />
            </template>
          </el-table-column>
          <el-table-column
            label="任务详情"
            fixed="right"
            align="center"
            width="200"
            class-name="small-padding fixed-width"
          >
            <template slot-scope="scope">
              <el-button
                size="medium"
                type="text"
                @click="handleUpdate(scope.row)"
                ><span class="button-xq"
                  ><i class="el-icon-s-data"></i>选择派发</span
                ></el-button
              >
            </template>
          </el-table-column>
        </el-table>
        <pagination
          v-show="tasktotal > 0"
          :total="tasktotal"
          :page.sync="queryParams.pageNum"
          :limit.sync="queryParams.pageSize"
          @pagination="distribute"
        />
      </div>
    </el-dialog>
    <!-- 添加或修改用户配置对话框 -->
    <el-dialog
@@ -660,19 +791,16 @@
  Exporterrorpatient,
  toleadpatient,
} from "@/api/patient/homepage";
import {
  getTaskservelist,
  getTaskInfo,
  Editsingletask,
} from "@/api/AiCentre/index";
import { getTasklist } from "@/api/AiCentre/index";
import { listtag } from "@/api/system/label";
import { getToken } from "@/utils/auth";
import Treeselect from "@riophae/vue-treeselect";
import store from "@/store";
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
export default {
  name: "Userhuanze",
  dicts: ["sys_normal_disable", "sys_user_sex"],
  dicts: ["sys_normal_disable", "task_status", "sys_user_sex"],
  components: { Treeselect },
  data() {
    return {
@@ -688,8 +816,10 @@
      showSearch: true,
      // 总条数
      total: 0,
      tasktotal: 0,
      // 用户表格数据
      userList: null,
      taskuserList: null,
      // 弹出层标题
      title: "",
      // 部门树选项
@@ -704,8 +834,19 @@
      amendtag: false, //是否修改
      serviceVisible: false,
      serviceradio: 1,
      distributeVisible: false,
      tasktopic: "5", //新增类型
      // 查询参数
      topqueryParams: {
        pageNum: 1,
        pageSize: 10,
        userName: undefined,
        tagid: undefined,
        topic: undefined,
      },
      // 日期范围
      dateRange: [],
      taskoptions: [],
      paperstypes: [
        { papersname: "身份证" },
        { papersname: "护照" },
@@ -864,6 +1005,8 @@
  created() {
    this.getList();
    this.gettabList();
    //获取已筛选后的可选任务类型
    this.taskoptions = store.getters.Serviceauthority;
  },
  methods: {
    /** 查询患者列表 */
@@ -879,6 +1022,10 @@
    },
    handleClick() {
      this.getList();
    },
    findLabelByValue(data, value) {
      const item = data.find((item) => item.value === value);
      return item ? item.label : null;
    },
    /** 查询标签列表 */
    gettabList() {
@@ -962,10 +1109,10 @@
      this.amendtag = true;
      this.Labelchange = true;
    },
    //修改/新增患者
    submitForm() {
      if (this.amendtag) {
        this.form.isoperation = 2;
        alterpatient(this.form)
          .then((response) => {
            console.log(response);
@@ -975,7 +1122,8 @@
            this.$modal.msgSuccess("修改成功");
          });
      } else {
        addpatient(this.form)
        this.form.isoperation = 1;
        alterpatient(this.form)
          .then((response) => {
            console.log(response);
          })
@@ -1008,6 +1156,31 @@
      this.$router.push({
        path: "/followvisit/particty",
        query: { type: this.serviceradio },
      });
    },
    distribute() {
      this.distributeVisible = true;
      if (this.tasktopic == 1) {
        this.topqueryParams.type = 3;
      } else if (this.tasktopic == 2) {
        this.topqueryParams.type = 1;
      } else if (this.tasktopic == 3) {
        this.topqueryParams.type = 1;
      } else if (this.tasktopic == 4) {
        this.topqueryParams.type = 1;
      } else if (this.tasktopic == 5) {
        this.topqueryParams.type = 1;
      } else if (this.tasktopic == 6) {
        this.topqueryParams.type = 2;
      }
      this.topqueryParams.typename = this.findLabelByValue(
        this.taskoptions,
        this.tasktopic
      );
      getTasklist(this.topqueryParams).then((response) => {
        this.taskuserList = response.rows;
        this.tasktotal = response.total;
        this.$forceUpdate();
      });
    },
    /** 导出按钮操作 */
@@ -1109,6 +1282,22 @@
    display: center !important;
  }
}
.preview-left {
  margin: 20px;
  //   margin: 20px;
  padding: 30px;
  background: #ffff;
  border: 1px solid #dcdfe6;
  -webkit-box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.12),
    0 0 6px 0 rgba(0, 0, 0, 0.04);
  .scriptTopic-dev {
    margin-bottom: 25px;
    font-size: 20px !important;
    .dev-text {
      margin-bottom: 10px;
    }
  }
}
::v-deep.el-tabs--left,
.el-tabs--right {
  overflow: hidden;