WXL
2024-05-31 49fcdb7178dffc69769e2fb8cb6a03e204cb1e68
src/views/followvisit/tasklist/index.vue
@@ -105,7 +105,6 @@
            size="medium"
            :disabled="single"
            @click="handleUpdate"
            >修改</el-button
          >
        </el-col>
@@ -149,7 +148,13 @@
        @selection-change="handleSelectionChange"
      >
        <el-table-column type="selection" width="50" align="center" />
        <el-table-column label="序号" fixed align="center" key="taskid" prop="taskid" />
        <el-table-column
          label="序号"
          fixed
          align="center"
          key="taskid"
          prop="taskid"
        />
        <el-table-column
          label="任务名称"
@@ -172,9 +177,8 @@
          key="nickName"
          prop="nickName"
        >
          <template slot-scope="scope">
            <span>{{ scope.row.wfs}}/{{ scope.row.yfs }}</span>
            <span>{{ scope.row.wfs }}/{{ scope.row.yfs }}</span>
          </template>
        </el-table-column>
        <el-table-column
@@ -214,21 +218,22 @@
        >
          <template slot-scope="scope">
            <el-button
              v-if="scope.row.status != 1"
              size="medium"
              type="text"
              @click="handleUpdate(scope.row)"
              @click="sponsor(scope.row)"
              ><span class="button-zx"
                ><i class="el-icon-s-promotion"></i>任务发起</span
              ></el-button
            >
            <el-button
              size="medium"
              type="text"
              @click="handleUpdate(scope.row)"
              ><span class="button-zx"
                ><i class="el-icon-s-promotion"></i>依照新增</span
            <el-button size="medium" type="text" @click="newAdd(scope.row)"
              ><span class="button-xj"
                ><i class="el-icon-circle-plus-outline"></i>依照新增</span
              ></el-button
            >
            <el-button size="medium" type="text" @click="stop(scope.row)"
              ><span class="button-zt"
                ><i class="el-icon-circle-plus-outline"></i>暂停任务</span
              ></el-button
            >
          </template>
@@ -333,7 +338,13 @@
  resetUserPwd,
  changeUserStatus,
} from "@/api/system/user";
import { getTasklist, getTaskInfo } from "@/api/AiCentre/index";
import {
  getTasklist,
  getTaskInfo,
  Editsingletask,
  delTaskInfo,
  TaskTemplateSendExecution,
} from "@/api/AiCentre/index";
import Treeselect from "@riophae/vue-treeselect";
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
@@ -623,21 +634,7 @@
        this.options = [];
      }
    },
    // 门诊随访状态修改
    handleStatusChange(row) {
      let text = row.status === "0" ? "启用" : "停用";
      this.$modal
        .confirm('确认要"' + text + '""' + row.userName + '"用户吗?')
        .then(function () {
          return changeUserStatus(row.userId, row.status);
        })
        .then(() => {
          this.$modal.msgSuccess(text + "成功");
        })
        .catch(function () {
          row.status = row.status === "0" ? "1" : "0";
        });
    },
    // 取消按钮
    cancel() {
      this.addalteropen = false;
@@ -715,22 +712,22 @@
      });
    },
    // 删除任务
    deletefn(){},
    /** 重置密码按钮操作 */
    handleResetPwd(row) {
      this.$prompt('请输入"' + row.userName + '"的新密码', "提示", {
        confirmButtonText: "确定",
        cancelButtonText: "取消",
        closeOnClickModal: false,
        inputPattern: /^.{5,20}$/,
        inputErrorMessage: "用户密码长度必须介于 5 和 20 之间",
      })
        .then(({ value }) => {
          resetUserPwd(row.userId, value).then((response) => {
            this.$modal.msgSuccess("修改成功,新密码是:" + value);
          });
        })
        .catch(() => {});
    deletefn() {},
    // 任务发起
    sponsor(row) {
      if (row.sendState != 1) {
        TaskTemplateSendExecution().then((res) => {});
      }
    },
    // 依照新增
    newAdd(row) {
      TaskTemplateSendExecution().then((res) => {});
    },
    // 暂停
    stop(row) {
      if (row.sendState == 2 || row.sendState == 3) {
        TaskTemplateSendExecution().then((res) => {});
      }
    },
    /** 提交按钮 */
@@ -888,6 +885,18 @@
  border-radius: 1px;
  color: #ffffff;
}
.button-xj {
  background: #815c94;
  padding: 5px;
  border-radius: 1px;
  color: #ffffff;
}
.button-zt {
  background: #f9c116;
  padding: 5px;
  border-radius: 1px;
  color: #ffffff;
}
::v-deep.el-radio-group {
  span {
@@ -895,6 +904,9 @@
  }
}
::v-deep.el-button + .el-button {
  margin-left: 0;
}
::v-deep.el-checkbox-group {
  span {
    font-size: 24px;