WXL
2025-07-01 a22820cfed42dd22b21208b7a310d5d46dc759c0
src/views/followvisit/satisfaction/index.vue
@@ -14,10 +14,10 @@
        <el-form-item label="任务名称">
          <el-input v-model="topqueryParams.name"></el-input>
        </el-form-item>
        <el-form-item label="审核人">
        <el-form-item label="发起人">
          <el-input v-model="topqueryParams.name"></el-input>
        </el-form-item>
        <el-form-item label="审核时间">
        <el-form-item label="发起时间">
          <el-date-picker
            v-model="dateRange"
            style="width: 240px"
@@ -28,7 +28,7 @@
            end-placeholder="结束日期"
          ></el-date-picker>
        </el-form-item>
        <el-form-item label="随访类型" prop="status">
        <el-form-item label="调查类型" prop="status">
          <el-select v-model="topqueryParams.topic" placeholder="请选择">
            <el-option
              v-for="item in topicoptions"
@@ -39,18 +39,7 @@
            </el-option>
          </el-select>
        </el-form-item>
        <el-form-item label="模版" prop="status">
          <el-select v-model="topqueryParams.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 label="门诊随访状态" prop="status">
        <el-form-item label="调查状态" prop="status">
          <el-select v-model="topqueryParams.topic" placeholder="请选择">
            <el-option
              v-for="item in topicoptions"
@@ -77,13 +66,23 @@
      <el-divider></el-divider>
      <el-row :gutter="10" class="mb8">
        <el-col :span="1.5">
          <el-select 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-col>
        <el-col :span="1.5">
          <el-button
            type="primary"
            plain
            icon="el-icon-plus"
            size="medium"
            :disabled="!tasktopic"
            @click="handleAdd"
            v-hasPermi="['system:user:add']"
            >新增</el-button
          >
        </el-col>
@@ -111,7 +110,7 @@
            >删除</el-button
          >
        </el-col>
        <el-col :span="19">
        <el-col :span="1.5">
          <div class="documentf">
            <div class="document">
              <el-button
@@ -142,131 +141,99 @@
        <el-table-column
          label="序号"
          align="center"
          key="userId"
          prop="userId"
          key="id"
          prop="id"
        />
        <el-table-column
          label="任务名称"
          label="病区"
          align="center"
          sortable
          key="userName"
          prop="userName"
          key="hospitaldistrictname"
          prop="hospitaldistrictname"
          :show-overflow-tooltip="true"
        />
        <el-table-column
          label="服务模板"
          label="科室"
          width="100"
          align="center"
          key="types"
          prop="types"
        />
        <el-table-column
          label="创建日期"
          align="center"
          key="nickName"
          prop="nickName"
        />
        <el-table-column
          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="执行状态"
          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"
          key="deptname"
          prop="deptname"
          :show-overflow-tooltip="true"
        />
        <el-table-column
          label="姓名"
          align="center"
          key="age"
          prop="age"
          width="120"
        />
        <el-table-column
          label="联系电话"
          align="center"
          key="phone"
          prop="phone"
        />
        <el-table-column
          label="真实性(20)"
          align="center"
          key="authenticity"
          prop="authenticity"
        />
        <el-table-column
          label="一周内完成(20)"
          align="center"
          key="weekFinish"
          prop="weekFinish"
        />
        <el-table-column
          label="规范性(10)"
          align="center"
          key="standard"
          prop="standard"
        />
        <el-table-column
          label="及时性(10)"
          align="center"
          key="timeliness"
          prop="timeliness"
        />
        <el-table-column
          label="宣教情况(10)"
          align="center"
          key="library"
          prop="library"
        />
        <el-table-column
          label="环境满意度(10)"
          align="center"
          key="environment"
          prop="environment"
        />
        <el-table-column
          label="审核时间"
          label="医生满意度(10)"
          align="center"
          key="doctorSatisfaction"
          prop="doctorSatisfaction"
        />
        <el-table-column
          label="护士满意度(10)"
          align="center"
          key="nurseSatisfaction"
          prop="nurseSatisfaction"
          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="操作"
          label="总分"
          align="center"
          width="120"
          class-name="small-padding fixed-width"
        >
          <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
            >
          </template>
        </el-table-column>
        <el-table-column
          label="任务详情"
          align="center"
          width="200"
          class-name="small-padding fixed-width"
        >
          <template slot-scope="scope">
            <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)"
              v-hasPermi="['system:user:edit']"
              ><span class="button-bb"
                ><i class="el-icon-s-order"></i>报表</span
              ></el-button
            >
            <el-button
              size="medium"
              type="text"
              @click="handleUpdate(scope.row)"
              v-hasPermi="['system:user:edit']"
              ><span class="button-sc"
                ><i class="el-icon-delete"></i>删除</span
              ></el-button
            >
          </template>
        </el-table-column>
          key="total"
          prop="total"
          sortable
        />
      </el-table>
      <pagination
@@ -277,7 +244,7 @@
        @pagination="getList"
      />
    </el-row>
    <!-- 添加或修改门诊随访对话框 -->
    <!-- 添加或修改影像随访对话框 -->
    <el-dialog
      :title="title"
      :visible.sync="addalteropen"
@@ -320,7 +287,7 @@
        </el-row>
        <el-row :gutter="20">
          <el-col :span="24">
            <el-form-item label="门诊随访要求">
            <el-form-item label="影像随访要求">
              <el-input type="textarea" v-model="form.desc"></el-input>
            </el-form-item>
          </el-col>
@@ -336,14 +303,11 @@
<script>
import {
  listUser,
  getUser,
  delUser,
  addUser,
  updateUser,
  resetUserPwd,
  listsatisfaction,
  delsatisfaction,
  updatesatisfaction,
  changeUserStatus,
} from "@/api/system/user";
} from "@/api/AiCentre/index";
import Treeselect from "@riophae/vue-treeselect";
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
@@ -368,7 +332,7 @@
      // 用户表格数据
      userList: null,
      // 弹出层标题
      title: "新增门诊随访",
      title: "新增影像随访",
      // 是否显示修改、添加弹出层
      addalteropen: false,
      // 部门名称
@@ -379,18 +343,33 @@
      dateRange: [],
      // 岗位选项
      postOptions: [],
      taskoptions: [
        {
          value: "1",
          label: "门诊病人",
        },
        {
          value: "2",
          label: "出院病人",
        },
        {
          value: "3",
          label: "医护人员",
        },
      ],
      tasktopic: null, //新增类型
      // 角色选项
      roleOptions: [],
      dynamicTags: ["选项一", "选项二", "选项三"], //选项
      inputVisible: false,
      inputValue: "",
      previewVisible: false, //门诊随访预览弹框
      previewVisible: false, //影像随访预览弹框
      radio: "",
      radios: [],
      previewtype: 2, //预览门诊随访类型
      previewtype: 2, //预览影像随访类型
      total: 0, // 总条数
      ImportQuantity: 999, //导门诊随访数量
      //预览门诊随访信息
      ImportQuantity: 999, //导影像随访数量
      //预览影像随访信息
      previewvalue: {
        username: "这个医生对你怎么样",
      },
@@ -398,56 +377,6 @@
      list: [],
      loading: false,
      states: [
        "Alabama",
        "Alaska",
        "Arizona",
        "Arkansas",
        "California",
        "Colorado",
        "Connecticut",
        "Delaware",
        "Florida",
        "Georgia",
        "Hawaii",
        "Idaho",
        "Illinois",
        "Indiana",
        "Iowa",
        "Kansas",
        "Kentucky",
        "Louisiana",
        "Maine",
        "Maryland",
        "Massachusetts",
        "Michigan",
        "Minnesota",
        "Mississippi",
        "Missouri",
        "Montana",
        "Nebraska",
        "Nevada",
        "New Hampshire",
        "New Jersey",
        "New Mexico",
        "New York",
        "North Carolina",
        "North Dakota",
        "Ohio",
        "Oklahoma",
        "Oregon",
        "Pennsylvania",
        "Rhode Island",
        "South Carolina",
        "South Dakota",
        "Tennessee",
        "Texas",
        "Utah",
        "Vermont",
        "Virginia",
        "Washington",
        "West Virginia",
        "Wisconsin",
        "Wyoming",
      ],
      pickerOptions: {
        disabledDate(time) {
@@ -578,10 +507,10 @@
    });
  },
  methods: {
    /** 查询门诊随访列表 */
    /** 查询影像随访列表 */
    getList() {
      this.loading = true;
      listUser(this.addDateRange(this.topqueryParams, this.dateRange)).then(
      listsatisfaction(this.topqueryParams).then(
        (response) => {
          this.userList = response.rows;
          this.total = response.total;
@@ -589,7 +518,7 @@
        }
      );
    },
    // 查看门诊随访详情
    // 查看影像随访详情
    Referencequestion(row) {
      this.previewVisible = true;
    },
@@ -606,21 +535,6 @@
      } else {
        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() {
@@ -686,45 +600,19 @@
    },
    /** 新增按钮操作 */
    handleAdd() {
      this.reset();
      this.addalteropen = true;
      // getUser().then((response) => {
      //   this.postOptions = response.posts;
      //   this.roleOptions = response.roles;
      //   this.title = "新增门诊随访";
      //   this.form.password = this.initPassword;
      // });
      // this.reset();
      // this.addalteropen = true;
      this.$router.push({
        path: "/Intelligentcenter/satisfaction/particulars",
        query: { type: this.tasktopic },
      });
    },
    /** 修改按钮操作 */
    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 + '"的新密码', "提示", {
        confirmButtonText: "确定",
        cancelButtonText: "取消",
        closeOnClickModal: false,
        inputPattern: /^.{5,20}$/,
        inputErrorMessage: "用户密码长度必须介于 5 和 20 之间",
      })
        .then(({ value }) => {
          resetUserPwd(row.userId, value).then((response) => {
            this.$modal.msgSuccess("修改成功,新密码是:" + value);
          });
        })
        .catch(() => {});
    },
    /** 提交按钮 */
@@ -732,14 +620,8 @@
      this.$refs["form"].validate((valid) => {
        if (valid) {
          if (this.form.userId != undefined) {
            updateUser(this.form).then((response) => {
            updatesatisfaction(this.form).then((response) => {
              this.$modal.msgSuccess("修改成功");
              this.open = false;
              this.getList();
            });
          } else {
            addUser(this.form).then((response) => {
              this.$modal.msgSuccess("新增成功");
              this.open = false;
              this.getList();
            });
@@ -753,7 +635,7 @@
      this.$modal
        .confirm('是否确认删除用户编号为"' + userIds + '"的数据项?')
        .then(function () {
          return delUser(userIds);
          return delsatisfaction(userIds);
        })
        .then(() => {
          this.getList();