WXL
2023-11-27 ea19bff6e73e7c00bb2e273a747ae27e57dcbc08
src/views/followvisit/outpatient/index.vue
@@ -88,36 +88,12 @@
          >
        </el-col>
        <el-col :span="1.5">
          <el-button
            type="success"
            plain
            icon="el-icon-edit"
            size="medium"
            :disabled="single"
            @click="handleUpdate"
            v-hasPermi="['system:user:edit']"
            >修改</el-button
          >
        </el-col>
        <el-col :span="1.5">
          <el-button
            type="danger"
            plain
            icon="el-icon-delete"
            size="medium"
            :disabled="multiple"
            @click="handleDelete"
            v-hasPermi="['system:user:remove']"
            >删除</el-button
          >
        </el-col>
        <el-col :span="19">
          <div class="documentf">
            <div class="document">
              <el-button
                type="warning"
                plain
                icon="el-icon-download"
                icon="el-icon-upload2"
                size="medium"
                @click="handleExport"
                v-hasPermi="['system:user:export']"
@@ -126,13 +102,80 @@
            </div>
          </div>
        </el-col>
        <el-col :span="1.5">
          <div class="documentf">
            <div class="document">
              <el-button
                type="success"
                plain
                icon="el-icon-download"
                size="medium"
                @click="toleadExport"
                v-hasPermi="['system:user:export']"
                >导入</el-button
              >
            </div>
          </div>
        </el-col>
        <el-col :span="1.5">
          <div class="documentf">
            <div class="document">
              <el-button
                type="info"
                icon="el-icon-refresh"
                size="medium"
                @click="TaskReset"
                v-hasPermi="['system:user:export']"
                >任务重置</el-button
              >
            </div>
          </div>
        </el-col>
        <el-col :span="1.5">
          <div class="documentf">
            <div class="document">
              <el-button
                type="success"
                icon="el-icon-position"
                size="medium"
                @click="AllStarted"
                v-hasPermi="['system:user:export']"
                >全部开始</el-button
              >
            </div>
          </div>
        </el-col>
        <el-col :span="1.5">
          <div class="documentf">
            <div class="document">
              <el-button
                type="warning"
                icon="el-icon-remove"
                size="medium"
                @click="AllStop"
                v-hasPermi="['system:user:export']"
                >全部停止</el-button
              >
            </div>
          </div>
        </el-col>
        <el-col :span="1.5">
          <div class="documentf">
            <div class="document">
              <el-button
                type="primary"
                icon="el-icon-remove"
                size="medium"
                @click="Sendtimesetting"
                v-hasPermi="['system:user:export']"
                >发送时间设置</el-button
              >
            </div>
          </div>
        </el-col>
        <!-- <el-col :span="1.5"> </el-col> -->
      </el-row>
      <!-- <right-toolbar
              :showSearch.sync="showSearch"
              @queryTable="getList"
              :columns="columns"
            ></right-toolbar> -->
      <el-table
        v-loading="loading"
        :data="userList"
@@ -147,41 +190,31 @@
        />
        <el-table-column
          label="任务名称"
          label="病历号"
          align="center"
          sortable
          key="userName"
          prop="userName"
          :show-overflow-tooltip="true"
          width="120"
        />
        <el-table-column label="姓名" align="center" key="types" prop="types" />
        <el-table-column
          label="服务模板"
          align="center"
          key="types"
          prop="types"
        />
        <el-table-column
          label="创建日期"
          label="年龄"
          align="center"
          key="nickName"
          prop="nickName"
        />
        <el-table-column
          label="待执行/总数"
          label="科室"
          align="center"
          key="phonenumber"
          prop="phonenumber"
          width="120"
        >
          <template slot-scope="scope">
            <span style="margin-left: 10px"
              >{{ scope.row.date }}/{{ scope.row.data }}</span
            >
          </template>
        </el-table-column>
        <el-table-column
          label="执行状态"
          label="疾病名称"
          align="center"
          key="topicnumber"
          prop="topicnumber"
@@ -189,21 +222,52 @@
          :show-overflow-tooltip="true"
        >
          <template slot-scope="scope">
            <div>执行完成/执行失败</div>
            <div>轻度骨裂</div>
          </template>
        </el-table-column>
        <el-table-column
          label="审核人"
          label="随访状态"
          align="center"
          key="topicnumber"
          prop="topicnumber"
          width="120"
          :show-overflow-tooltip="true"
        >
          <template slot-scope="scope">
            <div>未完成</div>
          </template>
        </el-table-column>
        <el-table-column
          label="随访方案"
          align="center"
          key="topicnumberaa"
          prop="topicnumberaa"
          sortable
          width="120"
          :show-overflow-tooltip="true"
        />
        <el-table-column
          label="宣教材料"
          align="center"
          key="topicnumberaa"
          prop="topicnumberaa"
          width="120"
        />
        <el-table-column
          label="随访方式"
          align="center"
          key="topicnumberaa"
          prop="topicnumberaa"
          width="120"
        />
        <el-table-column
          label="随访人员"
          align="center"
          key="topicnumberaa"
          prop="topicnumberaa"
          width="120"
        />
        <el-table-column
          label="审核时间"
          label="就诊时间"
          sortable
          align="center"
          prop="createTime"
@@ -214,25 +278,31 @@
          </template>
        </el-table-column>
        <el-table-column
          label="操作"
          label="随访时间"
          sortable
          align="center"
          width="120"
          class-name="small-padding fixed-width"
          prop="createTime"
          width="160"
        >
          <template slot-scope="scope">
            <el-button
              size="medium"
              type="text"
              @click="handleUpdate(scope.row)"
              v-hasPermi="['system:user:edit']"
              ><span class="button-zx"
                ><i class="el-icon-s-promotion"></i>开始执行</span
              ></el-button
            >
            <span>{{ parseTime(scope.row.createTime) }}</span>
          </template>
        </el-table-column>
        <el-table-column
          label="任务详情"
          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="操作"
          align="center"
          width="200"
          class-name="small-padding fixed-width"
@@ -241,28 +311,28 @@
            <el-button
              size="medium"
              type="text"
              @click="handleUpdate(scope.row)"
              v-hasPermi="['system:user:edit']"
              ><span class="button-xq"
                ><i class="el-icon-s-data"></i>详情</span
              ></el-button
            >
            <el-button
              size="medium"
              type="text"
              @click="handleUpdate(scope.row)"
              @click="followupvisit(scope.row)"
              v-hasPermi="['system:user:edit']"
              ><span class="button-bb"
                ><i class="el-icon-s-order"></i>报表</span
                ><i class="el-icon-s-promotion"></i>重新随访</span
              ></el-button
            >
            <el-button
              size="medium"
              type="text"
              @click="handleUpdate(scope.row)"
              @click="handlestop(scope.row)"
              v-hasPermi="['system:user:edit']"
              ><span class="button-sc"
                ><i class="el-icon-delete"></i>删除</span
                ><i class="el-icon-delete"></i>停止</span
              ></el-button
            >
            <el-button
              size="medium"
              type="text"
              @click="Seedetails(scope.row)"
              v-hasPermi="['system:user:edit']"
              ><span class="button-zx"
                ><i class="el-icon-s-order"></i>查看详情</span
              ></el-button
            >
          </template>
@@ -331,6 +401,81 @@
        <el-button @click="cancel">返 回</el-button>
      </div>
    </el-dialog>
    <!-- 修改发送时间对话框 -->
    <el-dialog
      title="发送时间设置"
      :visible.sync="modificationVisible"
      width="45%"
    >
      <div style="margin-bottom: 20px; color: red">
        统一修改当天未发送的任务时间
      </div>
      <el-form
        :model="ruleForm"
        :rules="rules"
        ref="ruleForm"
        label-width="120px"
        class="demo-ruleForm"
      >
        <el-form-item label="发送日期">
          <el-date-picker
            v-model="ruleForm.value1"
            type="date"
            placeholder="选择日期"
          >
          </el-date-picker>
        </el-form-item>
        <el-form-item label="时间段" prop="type">
          <el-checkbox-group v-model="ruleForm.type">
            <el-checkbox label="上午" name="type"></el-checkbox>
            <el-checkbox label="下午" name="type"></el-checkbox>
            <el-checkbox label="晚上" name="type"></el-checkbox>
          </el-checkbox-group>
        </el-form-item>
        <el-form-item label="上午时间区间" required>
          <el-time-picker
            is-range
            v-model="ruleForm.value2"
            range-separator="至"
            start-placeholder="开始时间"
            end-placeholder="结束时间"
            placeholder="选择时间范围"
          >
          </el-time-picker>
        </el-form-item>
        <el-form-item label="下午时间区间" required>
          <el-time-picker
            is-range
            v-model="ruleForm.value3"
            range-separator="至"
            start-placeholder="开始时间"
            end-placeholder="结束时间"
            placeholder="选择时间范围"
          >
          </el-time-picker>
        </el-form-item>
        <el-form-item label="晚上时间区间" required>
          <el-time-picker
            is-range
            v-model="ruleForm.value4"
            range-separator="至"
            start-placeholder="开始时间"
            end-placeholder="结束时间"
            placeholder="选择时间范围"
          >
          </el-time-picker>
        </el-form-item>
      </el-form>
      <span slot="footer" class="dialog-footer">
        <el-button @click="modificationVisible = false">取 消</el-button>
        <el-button type="primary" @click="modificationVisible = false"
          >确 定</el-button
        >
      </span>
    </el-dialog>
  </div>
</template>
@@ -371,6 +516,8 @@
      title: "新增门诊随访",
      // 是否显示修改、添加弹出层
      addalteropen: false,
      // 修改发送时间对话框
      modificationVisible: false,
      // 部门名称
      deptName: undefined,
      // 默认密码
@@ -379,8 +526,9 @@
      dateRange: [],
      // 岗位选项
      postOptions: [],
      // 角色选项
      roleOptions: [],
      ruleForm: {
        type: [],
      },
      dynamicTags: ["选项一", "选项二", "选项三"], //选项
      inputVisible: false,
      inputValue: "",
@@ -696,20 +844,20 @@
      // });
    },
    /** 修改按钮操作 */
    handleUpdate(row) {
      this.reset();
      const userId = row.userId || this.ids;
      getUser(userId).then((response) => {
        this.form = response.data;
        this.postOptions = response.posts;
        this.roleOptions = response.roles;
        this.$set(this.form, "postIds", response.postIds);
        this.$set(this.form, "roleIds", response.roleIds);
        this.addalteropen = true;
        this.title = "修改用户";
        this.form.password = "";
      });
    },
    // handleUpdate(row) {
    //   this.reset();
    //   const userId = row.userId || this.ids;
    //   getUser(userId).then((response) => {
    //     this.form = response.data;
    //     this.postOptions = response.posts;
    //     this.roleOptions = response.roles;
    //     this.$set(this.form, "postIds", response.postIds);
    //     this.$set(this.form, "roleIds", response.roleIds);
    //     this.addalteropen = true;
    //     this.title = "修改用户";
    //     this.form.password = "";
    //   });
    // },
    /** 重置密码按钮操作 */
    handleResetPwd(row) {
      this.$prompt('请输入"' + row.userName + '"的新密码', "提示", {
@@ -761,6 +909,58 @@
        })
        .catch(() => {});
    },
    // 全部停止
    AllStop() {
      this.$modal
        .confirm("是否停止全部任务?")
        .then(function () {
          return console.log("停止成功");
        })
        .then(() => {
          this.getList();
          this.$modal.msgWarning("停止成功");
        })
        .catch(() => {});
    },
    // 全部开始
    AllStarted() {
      this.$modal
        .confirm("是否开启全部任务?")
        .then(function () {
          return console.log("开启成功");
        })
        .then(() => {
          this.getList();
          this.$modal.msgSuccess("开启成功");
        })
        .catch(() => {});
    },
    // 任务重置
    TaskReset() {
      this.$modal
        .confirm("是否重置选中的任务项?")
        .then(function () {
          return console.log("选中成功");
        })
        .then(() => {
          this.getList();
          this.$modal.msgSuccess("重置成功");
        })
        .catch(() => {});
    },
    // 设置发送时间
    Sendtimesetting() {
      this.modificationVisible = true;
    },
    // 跳转详情页
    Seedetails() {
      this.$router.push({
        path: "/followvisit/record/detailpage/",
        query: { id: "1" },
      });
    },
    // 导入按钮
    toleadExport() {},
    /** 导出按钮操作 */
    handleExport() {
      this.download(
@@ -783,7 +983,7 @@
}
.document {
  width: 100px;
  // width: 100px;
  height: 50px;
}
@@ -866,15 +1066,24 @@
}
.button-bb {
  font-weight: 500;
  color: #2ba05c;
  background-color: #2ba05c;
  padding: 5px;
  border-radius: 1px;
  color: #ffffff;
}
.button-xq {
  font-weight: 500;
  color: #409eff;
  background-color: #409eff;
  padding: 5px;
  border-radius: 1px;
  color: #ffffff;
}
.button-sc {
  font-weight: 500;
  color: #dd302a;
  background-color: #dd302a;
  padding: 5px;
  border-radius: 1px;
  color: #ffffff;
}
.button-zx {
  background: #4fabe9;
@@ -889,9 +1098,10 @@
  }
}
::v-deep.el-checkbox-group {
  span {
    font-size: 24px;
  }
}
// 选项字体放大
// ::v-deep.el-checkbox-group {
//   span {
//     font-size: 24px;
//   }
// }
</style>