WXL (wul)
5 天以前 2736806c9fbccb6e3fdf981a6f48a9343e21fa4a
提交
已修改4个文件
已添加2个文件
1643 ■■■■■ 文件已修改
src/views/complaint/complaintmy/index.vue 1054 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/followvisit/again/index.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/followvisit/record/detailpage/components/AdviceList.vue 362 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/followvisit/record/detailpage/index.vue 225 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
随访外链.zip 补丁 | 查看 | 原始文档 | blame | 历史
随访通用8.18.zip 补丁 | 查看 | 原始文档 | blame | 历史
src/views/complaint/complaintmy/index.vue
@@ -1,877 +1,323 @@
<template>
  <div class="app-container">
    <el-row :gutter="20">
      <!--用户数据-->
      <el-col :span="24" :xs="24">
        <el-form
          :model="topqueryParams"
          ref="queryForm"
          size="small"
          :inline="true"
          v-show="showSearch"
          label-width="98px"
        >
          <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-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>
            <el-button
              type="primary"
              icon="el-icon-search"
              size="medium"
              @click="handleQuery"
              >搜索</el-button
            >
            <el-button icon="el-icon-refresh" size="medium" @click="resetQuery"
              >重置</el-button
            >
          </el-form-item>
        </el-form>
        <el-divider></el-divider>
        <el-row :gutter="10" class="mb8">
          <el-col :span="1.5">
            <el-button
              type="primary"
              icon="el-icon-plus"
              size="medium"
              @click="handleAdd"
              v-hasPermi="['system:user:add']"
              >新增</el-button
            >
          </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"
                  size="medium"
                  @click="handleExport"
                  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"
          @selection-change="handleSelectionChange"
        >
          <el-table-column type="selection" width="50" align="center" />
          <el-table-column
            label="序号"
            align="center"
            key="userId"
            prop="userId"
          />
    <!-- æœç´¢æ  -->
    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="70px">
      <el-form-item label="建议类型" prop="adviceType">
        <el-select v-model="queryParams.adviceType" placeholder="全部类型" clearable style="width: 130px">
          <el-option label="投诉" value="1" />
          <el-option label="建议" value="2" />
          <el-option label="表扬" value="3" />
        </el-select>
      </el-form-item>
      <el-form-item label="内容" prop="content">
        <el-input v-model="queryParams.content" placeholder="请输入内容关键字" clearable style="width: 180px" @keyup.enter.native="handleQuery" />
      </el-form-item>
      <el-form-item label="创建者" prop="createBy">
        <el-input v-model="queryParams.createBy" placeholder="请输入创建者" clearable style="width: 140px" @keyup.enter.native="handleQuery" />
      </el-form-item>
      <el-form-item>
        <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
      </el-form-item>
    </el-form>
          <el-table-column
            label="病人姓名"
            align="center"
            sortable
            key="userName"
            prop="userName"
             width="100"
            :show-overflow-tooltip="true"
          />
          <el-table-column
            label="手机号"
            align="center"
            key="types"
            prop="types"
          />
          <el-table-column
            label="性别"width="100"
            align="center"
            key="nickName"
            prop="nickName"
          />
          <el-table-column
            label="投诉方式"
            align="center"
            key="phonenumber"
            prop="phonenumber"
            width="120"
          />
          <el-table-column
            label="投诉对象"
            align="center"
            key="topicnumber"
            prop="topicnumber"
            width="120"
            :show-overflow-tooltip="true"
          />
          <el-table-column
            label="级别"
            align="center"
            key="topicnumberaa"
            prop="topicnumberaa"
            sortable
            width="120"
            :show-overflow-tooltip="true"
          />
          <el-table-column
            label="投诉日期"
            sortable
            align="center"
            prop="createTime"
            width="160"
          >
            <template slot-scope="scope">
              <span>{{ formatTime(scope.row.createTime) }}</span>
            </template>
          </el-table-column>
          <el-table-column
            label="操作"
            align="center"
            width="160"
            class-name="small-padding fixed-width"
          >
            <template slot-scope="scope">
              <el-button
                size="medium"
                type="text"
                icon="el-icon-edit"
                @click="handleUpdate(scope.row)"
                v-hasPermi="['system:user:edit']"
                >修改</el-button
              >
            </template>
          </el-table-column>
        </el-table>
        <pagination
          v-show="total > 0"
          :total="total"
          :page.sync="topqueryParams.pageNum"
          :limit.sync="topqueryParams.pageSize"
          @pagination="getList"
        />
    <!-- æ“ä½œæ  -->
    <el-row :gutter="10" class="mb8">
      <el-col :span="1.5">
        <el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd">新增</el-button>
      </el-col>
      <el-col :span="1.5">
        <el-button type="danger" plain icon="el-icon-delete" size="mini" :disabled="multiple" @click="handleDelete">删除</el-button>
      </el-col>
      <el-col :span="1.5">
        <el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport">导出</el-button>
      </el-col>
      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList" />
    </el-row>
    <!-- æ·»åŠ æˆ–ä¿®æ”¹æŠ•è¯‰å¯¹è¯æ¡† -->
    <el-dialog
      :title="title"
      :visible.sync="addalteropen"
      width="900px"
      append-to-body
    >
      <el-form ref="form" :model="form" label-width="80px">
    <!-- è¡¨æ ¼ -->
    <el-table v-loading="loading" :data="adviceList" @selection-change="handleSelectionChange">
      <el-table-column type="selection" width="50" align="center" />
      <el-table-column label="建议类型" align="center" prop="adviceType" width="100">
        <template slot-scope="scope">
          <el-tag :type="adviceTypeTag(scope.row.adviceType)" size="small">{{ adviceTypeText(scope.row.adviceType) }}</el-tag>
        </template>
      </el-table-column>
      <el-table-column label="内容" align="center" prop="content" min-width="200" :show-overflow-tooltip="true" />
      <el-table-column label="涉及科室" align="center" prop="deptCodes" width="140" :show-overflow-tooltip="true">
        <template slot-scope="scope">{{ getDeptNames(scope.row.deptCodes) }}</template>
      </el-table-column>
      <el-table-column label="涉及病区" align="center" prop="wardCodes" width="140" :show-overflow-tooltip="true">
        <template slot-scope="scope">{{ getWardNames(scope.row.wardCodes) }}</template>
      </el-table-column>
      <el-table-column label="涉及人员" align="center" prop="involvedUsers" width="120" :show-overflow-tooltip="true" />
      <el-table-column label="备注" align="center" prop="remark" min-width="140" :show-overflow-tooltip="true" />
      <el-table-column label="创建者" align="center" prop="createBy" width="100" />
      <el-table-column label="创建时间" align="center" prop="createTime" width="160" />
      <el-table-column label="操作" align="center" width="120" class-name="small-padding fixed-width">
        <template slot-scope="scope">
          <el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)">修改</el-button>
          <el-button size="mini" type="text" icon="el-icon-delete" style="color: #f56c6c" @click="handleDelete(scope.row)">删除</el-button>
        </template>
      </el-table-column>
    </el-table>
    <pagination
      v-show="total > 0"
      :total="total"
      :page.sync="queryParams.pageNum"
      :limit.sync="queryParams.pageSize"
      @pagination="getList"
    />
    <!-- æ–°å¢ž/编辑弹窗 -->
    <el-dialog :title="title" :visible.sync="open" width="600px" append-to-body :close-on-click-modal="false">
      <el-form ref="form" :model="form" :rules="rules" label-width="100px">
        <el-form-item label="建议类型" prop="adviceType">
          <el-radio-group v-model="form.adviceType">
            <el-radio label="1">投诉</el-radio>
            <el-radio label="2">建议</el-radio>
            <el-radio label="3">表扬</el-radio>
          </el-radio-group>
        </el-form-item>
        <el-row :gutter="20">
          <el-col :span="12"
            ><el-form-item label="病人姓名">
              <el-input v-model="form.name"></el-input> </el-form-item
          ></el-col>
          <el-col :span="12"
            ><el-form-item label="性别"width="100">
              <el-radio v-model="form.radio" label="1">男</el-radio>
              <el-radio v-model="form.radio" label="2">女</el-radio>
              <el-radio v-model="form.radio" label="3">未知</el-radio>
            </el-form-item></el-col
          >
        </el-row>
        <el-row :gutter="20">
          <el-col :span="24">
            <el-form-item label="联系电话">
              <div style="margin-top: 15px">
                <el-input
                  placeholder="请输入手机号"
                  v-model="form.telcode"
                  class="input-with-select"
                >
                  <el-button slot="append" icon="el-icon-search"></el-button>
                </el-input>
              </div>
          <el-col :span="12">
            <el-form-item label="任务ID" prop="subid">
              <el-input v-model="form.subid" placeholder="任务ID" />
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="服务ID" prop="taskid">
              <el-input v-model="form.taskid" placeholder="服务ID" />
            </el-form-item>
          </el-col>
        </el-row>
        <el-row :gutter="20">
          <el-col :span="12">
            <el-form-item label="投诉类型">
              <el-select v-model="form.region" placeholder="请选择活动区域">
                <el-option label="区域一" value="shanghai"></el-option>
                <el-option label="区域二" value="beijing"></el-option>
              </el-select>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="投诉日期">
              <el-date-picker
                v-model="form.value2"
                align="right"
                type="date"
                placeholder="选择日期"
                :picker-options="pickerOptions"
              >
              </el-date-picker>
            <el-form-item label="病人ID" prop="patid">
              <el-input v-model="form.patid" placeholder="病人ID" />
            </el-form-item>
          </el-col>
        </el-row>
        <el-row :gutter="20">
          <el-col :span="12">
            <el-form-item label="投诉级别">
              <el-select v-model="form.region" placeholder="请选择活动区域">
                <el-option label="一级" value="shanghai"></el-option>
                <el-option label="二级" value="beijing"></el-option>
              </el-select>
            </el-form-item>
          </el-col>
          <el-col :span="12"
            ><el-form-item label="门诊日期">
              <el-date-picker
                v-model="form.value2"
                align="right"
                type="date"
                placeholder="选择日期"
                :picker-options="pickerOptions"
              >
              </el-date-picker> </el-form-item
          ></el-col>
        </el-row>
        <el-row :gutter="20">
          <el-col :span="12">
            <el-form-item label="投诉对象搜索">
              <el-select
                v-model="value"
                multiple
                filterable
                remote
                reserve-keyword
                placeholder="请输入关键词"
                :remote-method="remoteMethod"
                :loading="loading"
              >
                <el-option
                  v-for="item in options"
                  :key="item.value"
                  :label="item.label"
                  :value="item.value"
                >
                </el-option>
              </el-select>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="投诉对象显示">
              <div>{{ form.name }}</div>
            </el-form-item>
          </el-col>
        </el-row>
        <el-row :gutter="20">
          <el-col :span="12">
            <el-form-item label="投诉描述">
              <el-input type="textarea" v-model="form.desc"></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="投诉要求">
              <el-input type="textarea" v-model="form.desc"></el-input>
            </el-form-item>
          </el-col>
        </el-row>
        <el-form-item label="涉及科室" prop="deptCodes">
          <el-select v-model="form.deptCodes" multiple filterable clearable placeholder="请选择涉及科室(可多选)" style="width: 100%">
            <el-option v-for="d in deptOptions" :key="d.value" :label="d.label" :value="d.value" />
          </el-select>
        </el-form-item>
        <el-form-item label="涉及病区" prop="wardCodes">
          <el-select v-model="form.wardCodes" multiple filterable clearable placeholder="请选择涉及病区(可多选)" style="width: 100%">
            <el-option v-for="w in wardOptions" :key="w.value" :label="w.label" :value="w.value" />
          </el-select>
        </el-form-item>
        <el-form-item label="涉及人员" prop="involvedUsers">
          <el-input v-model="form.involvedUsers" placeholder="涉及人员代码,多个用逗号分隔" />
        </el-form-item>
        <el-form-item label="内容" prop="content">
          <el-input type="textarea" :rows="4" v-model="form.content" placeholder="请输入投诉/建议/表扬内容" />
        </el-form-item>
        <el-form-item label="备注" prop="remark">
          <el-input type="textarea" :rows="2" v-model="form.remark" placeholder="请输入备注" />
        </el-form-item>
      </el-form>
      <div slot="footer" class="dialog-footer">
        <el-button type="primary" @click="submitForm">提 äº¤</el-button>
        <el-button @click="cancel">返 å›ž</el-button>
        <el-button @click="open = false">取 æ¶ˆ</el-button>
        <el-button type="primary" @click="submitForm">ç¡® å®š</el-button>
      </div>
    </el-dialog>
  </div>
</template>
<script>
import {
  listUser,
  getUser,
  delUser,
  addUser,
  updateUser,
  resetUserPwd,
  changeUserStatus,
} from "@/api/system/user";
import Treeselect from "@riophae/vue-treeselect";
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
import { listAdvice, getAdvice, addAdvice, updateAdvice, delAdvice } from "@/api/followvisit/advice";
import store from "@/store";
export default {
  name: "User",
  dicts: ["sys_normal_disable", "sys_user_sex"],
  components: { Treeselect },
  name: "ComplaintMy",
  data() {
    return {
      // é®ç½©å±‚
      loading: true,
      // é€‰ä¸­æ•°ç»„
      ids: [],
      // éžå•个禁用
      single: true,
      // éžå¤šä¸ªç¦ç”¨
      multiple: true,
      // æ˜¾ç¤ºæœç´¢æ¡ä»¶
      showSearch: true,
      // æ€»æ¡æ•°
      total: 0,
      // ç”¨æˆ·è¡¨æ ¼æ•°æ®
      userList: null,
      // å¼¹å‡ºå±‚标题
      title: "新增投诉",
      // æ˜¯å¦æ˜¾ç¤ºä¿®æ”¹ã€æ·»åŠ å¼¹å‡ºå±‚
      addalteropen: false,
      // éƒ¨é—¨åç§°
      deptName: undefined,
      // é»˜è®¤å¯†ç 
      initPassword: undefined,
      // æ—¥æœŸèŒƒå›´
      dateRange: [],
      // å²—位选项
      postOptions: [],
      // è§’色选项
      roleOptions: [],
      dynamicTags: ["选项一", "选项二", "选项三"], //选项
      inputVisible: false,
      inputValue: "",
      previewVisible: false, //投诉预览弹框
      radio: "",
      radios: [],
      previewtype: 2, //预览投诉类型
      total: 0, // æ€»æ¡æ•°
      ImportQuantity: 999, //导投诉数量
      //预览投诉信息
      previewvalue: {
        username: "这个医生对你怎么样",
      },
      value: [],
      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) {
          return time.getTime() > Date.now();
        },
        shortcuts: [
          {
            text: "今天",
            onClick(picker) {
              picker.$emit("pick", new Date());
            },
          },
          {
            text: "昨天",
            onClick(picker) {
              const date = new Date();
              date.setTime(date.getTime() - 3600 * 1000 * 24);
              picker.$emit("pick", date);
            },
          },
          {
            text: "一周前",
            onClick(picker) {
              const date = new Date();
              date.setTime(date.getTime() - 3600 * 1000 * 24 * 7);
              picker.$emit("pick", date);
            },
          },
        ],
      },
      // è¡¨å•参数
      form: {
        phonenumber: "",
        totagid: "",
        types: "",
        nickName: "",
        qystatus: "",
        btstatus: "",
      },
      //导入进度
      dractive: 1,
      // å¯¼å…¥å±•示表单
      uploadingData: {},
      // æŸ¥è¯¢å‚æ•°
      topqueryParams: {
      adviceList: [],
      total: 0,
      ids: [],
      single: true,
      multiple: true,
      showSearch: true,
      title: "",
      open: false,
      queryParams: {
        pageNum: 1,
        pageSize: 10,
        userName: undefined,
        tagid: undefined,
        topic: undefined,
        adviceType: undefined,
        content: undefined,
        createBy: undefined
      },
      propss: { multiple: true },
      options: [],
      topicoptions: [
        {
          value: 1,
          label: "单选",
        },
        {
          value: 2,
          label: "多选",
        },
        {
          value: 3,
          label: "填空",
        },
      ],
      // è¡¨å•校验
      form: {},
      rules: {
        userName: [
          { required: true, message: "用户名称不能为空", trigger: "blur" },
          {
            min: 2,
            max: 20,
            message: "用户名称长度必须介于 2 å’Œ 20 ä¹‹é—´",
            trigger: "blur",
          },
        ],
        nickName: [
          { required: true, message: "用户昵称不能为空", trigger: "blur" },
        ],
        password: [
          { required: true, message: "用户密码不能为空", trigger: "blur" },
          {
            min: 5,
            max: 20,
            message: "用户密码长度必须介于 5 å’Œ 20 ä¹‹é—´",
            trigger: "blur",
          },
        ],
        email: [
          {
            type: "email",
            message: "请输入正确的邮箱地址",
            trigger: ["blur", "change"],
          },
        ],
        phonenumber: [
          {
            pattern: /^1[3|4|5|6|7|8|9][0-9]\d{8}$/,
            message: "请输入正确的手机号码",
            trigger: "blur",
          },
        ],
        IDnumber: [
          {
            pattern:
              /^\d{6}((((((19|20)\d{2})(0[13-9]|1[012])(0[1-9]|[12]\d|30))|(((19|20)\d{2})(0[13578]|1[02])31)|((19|20)\d{2})02(0[1-9]|1\d|2[0-8])|((((19|20)([13579][26]|[2468][048]|0[48]))|(2000))0229))\d{3})|((((\d{2})(0[13-9]|1[012])(0[1-9]|[12]\d|30))|((\d{2})(0[13578]|1[02])31)|((\d{2})02(0[1-9]|1\d|2[0-8]))|(([13579][26]|[2468][048]|0[048])0229))\d{2}))(\d|X|x)$/,
            message: "请输入正确的身份证号码",
            trigger: "blur",
          },
        ],
      },
        adviceType: [{ required: true, message: "请选择建议类型", trigger: "change" }],
        content: [{ required: true, message: "请输入内容", trigger: "blur" }]
      }
    };
  },
  watch: {},
  computed: {
    deptOptions() {
      return (store.getters.belongDepts || []).map(d => ({ label: d.deptName, value: d.deptCode }));
    },
    wardOptions() {
      return (store.getters.belongWards || []).map(w => ({ label: w.districtName, value: w.districtCode }));
    }
  },
  created() {
    this.getList();
    this.getConfigKey("sys.user.initPassword").then((response) => {
      this.initPassword = response.msg;
    });
  },
  // æœç´¢
  mounted() {
    this.list = this.states.map((item) => {
      return { value: `value:${item}`, label: `label:${item}` };
    });
  },
  methods: {
    /** æŸ¥è¯¢æŠ•诉列表 */
    adviceTypeText(t) {
      const map = { "1": "投诉", "2": "建议", "3": "表扬" };
      return map[t] || "未知";
    },
    adviceTypeTag(t) {
      const map = { "1": "danger", "2": "primary", "3": "success" };
      return map[t] || "info";
    },
    getDeptNames(codes) {
      if (!codes) return "-";
      return codes.split(",").filter(Boolean).map(c => {
        const found = this.deptOptions.find(d => d.value == c);
        return found ? found.label : c;
      }).join("、") || "-";
    },
    getWardNames(codes) {
      if (!codes) return "-";
      return codes.split(",").filter(Boolean).map(c => {
        const found = this.wardOptions.find(w => w.value == c);
        return found ? found.label : c;
      }).join("、") || "-";
    },
    getList() {
      this.loading = true;
      listUser(this.addDateRange(this.topqueryParams, this.dateRange)).then(
        (response) => {
          this.userList = response.rows;
          this.total = response.total;
          this.loading = false;
        }
      );
    },
    // æŸ¥çœ‹æŠ•诉详情
    Referencequestion(row) {
      this.previewVisible = true;
    },
    // æ·»åŠ å¼¹æ¡†æœç´¢
    remoteMethod(query) {
      if (query !== "") {
        this.loading = true;
        setTimeout(() => {
          this.loading = false;
          this.options = this.list.filter((item) => {
            return item.label.toLowerCase().indexOf(query.toLowerCase()) > -1;
          });
        }, 200);
      } 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() {
      this.addalteropen = false;
      this.reset();
    },
    // è¡¨å•重置
    reset() {
      this.form = {
        userId: undefined,
        deptId: undefined,
        userName: undefined,
        nickName: undefined,
        password: undefined,
        phonenumber: undefined,
        email: undefined,
        sex: undefined,
        status: "0",
        remark: undefined,
        postIds: [],
        roleIds: [],
      const body = {
        adviceType: this.queryParams.adviceType || undefined,
        content: this.queryParams.content || undefined,
        createBy: this.queryParams.createBy || undefined
      };
      this.resetForm("form");
      const query = {
        pageNum: this.queryParams.pageNum,
        pageSize: this.queryParams.pageSize
      };
      listAdvice(body, query).then(res => {
        this.adviceList = res.rows || [];
        this.total = res.total || 0;
        this.loading = false;
      }).catch(() => { this.loading = false; });
    },
    /** æœç´¢æŒ‰é’®æ“ä½œ */
    handleQuery() {
      this.topqueryParams.pageNum = 1;
      this.queryParams.pageNum = 1;
      this.getList();
    },
    /** é‡ç½®æŒ‰é’®æ“ä½œ */
    resetQuery() {
      this.dateRange = [];
      this.resetForm("queryForm");
      this.topqueryParams.deptId = undefined;
      this.$refs.tree.setCurrentKey(null);
      this.queryParams.adviceType = undefined;
      this.queryParams.content = undefined;
      this.queryParams.createBy = undefined;
      this.handleQuery();
    },
    // å¤šé€‰æ¡†é€‰ä¸­æ•°æ®
    handleSelectionChange(selection) {
      this.ids = selection.map((item) => item.userId);
      this.single = selection.length != 1;
      this.ids = selection.map(item => item.id);
      this.single = selection.length !== 1;
      this.multiple = !selection.length;
    },
    //删除选项
    handleClose(tag) {
      this.dynamicTags.splice(this.dynamicTags.indexOf(tag), 1);
    reset() {
      this.form = {
        id: undefined,
        subid: undefined,
        taskid: undefined,
        patid: undefined,
        adviceType: "1",
        deptCodes: [],
        wardCodes: [],
        involvedUsers: "",
        content: "",
        remark: ""
      };
    },
    //触发新增输入
    showInput() {
      this.inputVisible = true;
      this.$nextTick((_) => {
        this.$refs.saveTagInput.$refs.input.focus();
      });
    },
    //获取失去焦点触发
    handleInputConfirm() {
      let inputValue = this.inputValue;
      if (inputValue) {
        this.dynamicTags.push(inputValue);
      }
      this.inputVisible = false;
      this.inputValue = "";
    },
    /** æ–°å¢žæŒ‰é’®æ“ä½œ */
    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.title = "新增投诉建议";
      this.open = true;
    },
    /** ä¿®æ”¹æŒ‰é’®æ“ä½œ */
    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 = "";
      this.title = "修改投诉建议";
      getAdvice(row.id).then(res => {
        const data = res.data || {};
        this.form = {
          id: data.id,
          subid: data.subid,
          taskid: data.taskid,
          patid: data.patid,
          adviceType: data.adviceType || "1",
          deptCodes: data.deptCodes ? data.deptCodes.split(",").filter(Boolean) : [],
          wardCodes: data.wardCodes ? data.wardCodes.split(",").filter(Boolean) : [],
          involvedUsers: data.involvedUsers || "",
          content: data.content || "",
          remark: data.remark || ""
        };
        this.open = true;
      });
    },
    /** é‡ç½®å¯†ç æŒ‰é’®æ“ä½œ */
    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(() => {});
    },
    /** æäº¤æŒ‰é’® */
    submitForm: function () {
      this.$refs["form"].validate((valid) => {
        if (valid) {
          if (this.form.userId != undefined) {
            updateUser(this.form).then((response) => {
              this.$modal.msgSuccess("修改成功");
              this.open = false;
              this.getList();
            });
    submitForm() {
      this.$refs["form"].validate(valid => {
        if (!valid) return;
        const data = {
          id: this.form.id,
          subid: this.form.subid,
          taskid: this.form.taskid,
          patid: this.form.patid,
          adviceType: this.form.adviceType,
          deptCodes: this.form.deptCodes.join(","),
          wardCodes: this.form.wardCodes.join(","),
          involvedUsers: this.form.involvedUsers,
          content: this.form.content,
          remark: this.form.remark,
          delFlag: "0"
        };
        const api = this.form.id ? updateAdvice(data) : addAdvice(data);
        api.then(res => {
          if (res.code === 200) {
            this.$modal.msgSuccess(this.form.id ? "修改成功" : "新增成功");
            this.open = false;
            this.getList();
          } else {
            addUser(this.form).then((response) => {
              this.$modal.msgSuccess("新增成功");
              this.open = false;
              this.getList();
            });
            this.$modal.msgError(res.msg || "操作失败");
          }
        }
        });
      });
    },
    /** åˆ é™¤æŒ‰é’®æ“ä½œ */
    handleDelete(row) {
      const userIds = row.userId || this.ids;
      this.$modal
        .confirm('是否确认删除用户编号为"' + userIds + '"的数据项?')
        .then(function () {
          return delUser(userIds);
        })
        .then(() => {
      const ids = row.id ? [row.id] : this.ids;
      if (!ids.length) {
        this.$modal.msgWarning("请选择要删除的数据");
        return;
      }
      this.$modal.confirm("是否确认删除所选投诉建议?").then(() => {
        return delAdvice(ids.join(","));
      }).then(res => {
        if (res.code === 200) {
          this.getList();
          this.$modal.msgSuccess("删除成功");
        })
        .catch(() => {});
        }
      }).catch(() => {});
    },
    /** å¯¼å‡ºæŒ‰é’®æ“ä½œ */
    handleExport() {
      this.download(
        "system/user/export",
        "/system/serviceSubtaskAdvice/export",
        {
          ...this.topqueryParams,
          adviceType: this.queryParams.adviceType,
          content: this.queryParams.content,
          createBy: this.queryParams.createBy
        },
        `user_${new Date().getTime()}.xlsx`
        `随访建议数据_${new Date().getTime()}.xlsx`
      );
    },
  },
};
</script>
<style lang="scss" scoped>
.el-button--primary.is-plain {
  color: #ffffff;
  background: #409eff;
  border-color: #4fabe9;
}
.document {
  width: 100px;
  height: 50px;
}
.documentf {
  display: flex;
  justify-content: flex-end;
}
.download {
  text-align: center;
  .el-upload__tip {
    font-size: 23px;
  }
  .el-upload__text {
    font-size: 23px;
  }
}
.uploading {
  margin-top: 20px;
  margin: 20px;
  padding: 30px;
  background: #ffffff;
  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);
}
.el-tag + .el-tag {
  margin-left: 10px;
}
.button-new-tag {
  margin-left: 10px;
  height: 32px;
  line-height: 30px;
  padding-top: 0;
  padding-bottom: 0;
}
.input-new-tag {
  width: 90px;
  margin-left: 10px;
  vertical-align: bottom;
}
.drexamine {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 30px;
  background: #daeaf5;
  img {
    width: 100px;
    height: 100px;
  }
}
.qrcode-dialo {
  // text-align: center;
  //   display: flex;
  margin: 20px;
  padding: 30px;
  background: #edf1f7;
  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);
  .topic-dev {
    margin-bottom: 25px;
    font-size: 20px !important;
    .dev-text {
      margin-bottom: 10px;
    }
  }
}
::v-deep.el-radio-group {
  span {
    font-size: 24px;
  }
}
::v-deep.el-checkbox-group {
  span {
    font-size: 24px;
  }
}
</style>
};
</script>
src/views/followvisit/again/index.vue
@@ -1178,7 +1178,7 @@
        this.topqueryParams.leavehospitaldistrictcodes[0] &&
        this.topqueryParams.visitDeptCodes[0]
      ) {
        this.topqueryParams.deptOrDistrict = 4;
        this.topqueryParams.deptOrDistrict = 2;
      } else {
        this.topqueryParams.deptOrDistrict = 1;
      }
src/views/followvisit/record/detailpage/components/AdviceList.vue
@@ -1,89 +1,71 @@
<template>
  <div class="advice-list">
    <!-- æœç´¢æ  -->
    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" label-width="70px">
      <el-form-item label="建议类型" prop="adviceType">
        <el-select v-model="queryParams.adviceType" placeholder="全部类型" clearable style="width: 140px">
          <el-option label="投诉" value="1" />
          <el-option label="建议" value="2" />
          <el-option label="表扬" value="3" />
        </el-select>
      </el-form-item>
      <el-form-item label="内容" prop="content">
        <el-input v-model="queryParams.content" placeholder="请输入内容关键字" clearable style="width: 180px" />
      </el-form-item>
      <el-form-item>
        <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
      </el-form-item>
    </el-form>
  <div class="advice-blocks">
    <!-- ç±»åž‹ Tab å±•示 -->
    <el-tabs v-model="activeType">
      <el-tab-pane
        v-for="type in adviceTypes"
        :key="type.value"
        :name="type.value"
      >
        <span slot="label">
          <span class="tab-icon">{{ type.icon }}</span> {{ type.label }}
        </span>
    <!-- æ“ä½œæ  -->
    <el-row :gutter="10" class="mb8">
      <el-col :span="1.5">
        <el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd">新增</el-button>
      </el-col>
      <el-col :span="1.5">
        <el-button type="danger" plain icon="el-icon-delete" size="mini" :disabled="multiple" @click="handleDelete">删除</el-button>
      </el-col>
      <el-col :span="1.5">
        <el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport">导出</el-button>
      </el-col>
    </el-row>
        <!-- æœ‰è®°å½• -->
        <div v-if="getAdviceByType(type.value)" class="advice-content" :class="type.className">
          <div class="advice-head">
            <span class="advice-label">{{ type.label }}内容</span>
            <el-button size="mini" type="primary" plain icon="el-icon-edit" @click="handleEdit(type.value)">修改</el-button>
          </div>
          <div class="advice-text">{{ getAdviceByType(type.value).content }}</div>
          <div class="advice-meta" v-if="getAdviceByType(type.value).deptCodes || getAdviceByType(type.value).wardCodes">
            <span v-if="getAdviceByType(type.value).deptCodes" class="meta-item">
              <i class="el-icon-office-building"></i>{{ getDeptNames(getAdviceByType(type.value).deptCodes) }}
            </span>
            <span v-if="getAdviceByType(type.value).wardCodes" class="meta-item">
              <i class="el-icon-s-home"></i>{{ getWardNames(getAdviceByType(type.value).wardCodes) }}
            </span>
          </div>
          <div class="advice-meta" v-if="getAdviceByType(type.value).involvedUsers">
            <span class="meta-item"><i class="el-icon-user"></i>涉及人员:{{ getAdviceByType(type.value).involvedUsers }}</span>
          </div>
          <div class="advice-meta" v-if="getAdviceByType(type.value).remark">
            <span class="meta-item">备注:{{ getAdviceByType(type.value).remark }}</span>
          </div>
          <div class="advice-foot">
            <span>{{ getAdviceByType(type.value).createBy || "-" }}</span>
            <span>{{ getAdviceByType(type.value).createTime || "-" }}</span>
          </div>
        </div>
    <!-- è¡¨æ ¼ -->
    <el-table v-loading="loading" :data="adviceList" @selection-change="handleSelectionChange">
      <el-table-column type="selection" width="50" align="center" />
      <el-table-column label="建议类型" align="center" prop="adviceType" width="100">
        <template slot-scope="scope">
          <el-tag :type="adviceTypeTag(scope.row.adviceType)" size="small">
            {{ adviceTypeText(scope.row.adviceType) }}
          </el-tag>
        </template>
      </el-table-column>
      <el-table-column label="内容" align="center" prop="content" min-width="200" :show-overflow-tooltip="true" />
      <el-table-column label="涉及科室" align="center" prop="deptCodes" width="140" :show-overflow-tooltip="true">
        <template slot-scope="scope">{{ getDeptNames(scope.row.deptCodes) }}</template>
      </el-table-column>
      <el-table-column label="涉及病区" align="center" prop="wardCodes" width="140" :show-overflow-tooltip="true">
        <template slot-scope="scope">{{ getWardNames(scope.row.wardCodes) }}</template>
      </el-table-column>
      <el-table-column label="备注" align="center" prop="remark" min-width="150" :show-overflow-tooltip="true" />
      <el-table-column label="创建者" align="center" prop="createBy" width="100" />
      <el-table-column label="创建时间" align="center" prop="createTime" width="160" />
      <el-table-column label="操作" align="center" width="120" class-name="small-padding fixed-width">
        <template slot-scope="scope">
          <el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)">修改</el-button>
          <el-button size="mini" type="text" icon="el-icon-delete" style="color: #f56c6c" @click="handleDelete(scope.row)">删除</el-button>
        </template>
      </el-table-column>
    </el-table>
    <pagination
      v-show="total > 0"
      :total="total"
      :page.sync="queryParams.pageNum"
      :limit.sync="queryParams.pageSize"
      @pagination="getList"
    />
        <!-- ç©ºæ€ -->
        <div v-else class="advice-empty">
          <span class="empty-icon">{{ type.icon }}</span>
          <p>暂无{{ type.label }}记录</p>
          <el-button size="small" type="primary" plain icon="el-icon-plus" @click="handleAdd(type.value)">新增{{ type.label }}</el-button>
        </div>
      </el-tab-pane>
    </el-tabs>
    <!-- æ–°å¢ž/编辑弹窗 -->
    <el-dialog :title="title" :visible.sync="open" width="600px" append-to-body :close-on-click-modal="false">
      <el-form ref="form" :model="form" :rules="rules" label-width="100px">
        <el-form-item label="建议类型" prop="adviceType">
          <el-radio-group v-model="form.adviceType">
            <el-radio label="1">投诉</el-radio>
            <el-radio label="2">建议</el-radio>
            <el-radio label="3">表扬</el-radio>
          </el-radio-group>
    <el-dialog
      :title="dialogTitle"
      :visible.sync="open"
      width="560px"
      append-to-body
      :close-on-click-modal="false"
    >
      <el-form ref="form" :model="form" :rules="rules" label-width="90px">
        <el-form-item label="类型">
          <el-tag :type="currentTypeTag" size="small">{{ currentTypeText }}</el-tag>
        </el-form-item>
        <el-form-item label="涉及科室" prop="deptCodes">
          <el-select v-model="form.deptCodes" multiple filterable clearable placeholder="请选择涉及科室" style="width: 100%">
          <el-select v-model="form.deptCodes" multiple filterable clearable placeholder="请选择涉及科室(可多选)" style="width: 100%">
            <el-option v-for="d in deptOptions" :key="d.value" :label="d.label" :value="d.value" />
          </el-select>
        </el-form-item>
        <el-form-item label="涉及病区" prop="wardCodes">
          <el-select v-model="form.wardCodes" multiple filterable clearable placeholder="请选择涉及病区" style="width: 100%">
          <el-select v-model="form.wardCodes" multiple filterable clearable placeholder="请选择涉及病区(可多选)" style="width: 100%">
            <el-option v-for="w in wardOptions" :key="w.value" :label="w.label" :value="w.value" />
          </el-select>
        </el-form-item>
@@ -91,7 +73,7 @@
          <el-input v-model="form.involvedUsers" placeholder="涉及人员代码,多个用逗号分隔" />
        </el-form-item>
        <el-form-item label="内容" prop="content">
          <el-input type="textarea" :rows="3" v-model="form.content" placeholder="请输入投诉/建议/表扬内容" />
          <el-input type="textarea" :rows="4" v-model="form.content" :placeholder="'请输入' + currentTypeText + '内容'" />
        </el-form-item>
        <el-form-item label="备注" prop="remark">
          <el-input type="textarea" :rows="2" v-model="form.remark" placeholder="请输入备注" />
@@ -106,7 +88,7 @@
</template>
<script>
import { listAdvice, getAdvice, addAdvice, updateAdvice, delAdvice } from "@/api/followvisit/advice";
import { listAdvice, getAdvice, addAdvice, updateAdvice } from "@/api/followvisit/advice";
import store from "@/store";
export default {
@@ -123,23 +105,19 @@
    return {
      loading: false,
      adviceList: [],
      total: 0,
      ids: [],
      single: true,
      multiple: true,
      title: "",
      activeType: "1",
      open: false,
      queryParams: {
        pageNum: 1,
        pageSize: 10,
        adviceType: undefined,
        content: undefined
      },
      dialogTitle: "",
      currentType: "1",
      form: {},
      rules: {
        adviceType: [{ required: true, message: "请选择建议类型", trigger: "change" }],
        content: [{ required: true, message: "请输入内容", trigger: "blur" }]
      }
      },
      adviceTypes: [
        { value: "1", label: "投诉", icon: "⚠️", className: "type-complaint", tagType: "danger" },
        { value: "2", label: "建议", icon: "💡", className: "type-suggest", tagType: "primary" },
        { value: "3", label: "表扬", icon: "👍", className: "type-praise", tagType: "success" }
      ]
    };
  },
  computed: {
@@ -148,77 +126,56 @@
    },
    wardOptions() {
      return (store.getters.belongWards || []).map(w => ({ label: w.districtName, value: w.districtCode }));
    },
    currentTypeText() {
      const t = this.adviceTypes.find(x => x.value === this.currentType);
      return t ? t.label : "";
    },
    currentTypeTag() {
      const t = this.adviceTypes.find(x => x.value === this.currentType);
      return t ? t.tagType : "info";
    }
  },
  created() {
    this.getList();
  },
  methods: {
    adviceTypeText(t) {
      const map = { "1": "投诉", "2": "建议", "3": "表扬" };
      return map[t] || "未知";
    },
    adviceTypeTag(t) {
      const map = { "1": "danger", "2": "primary", "3": "success" };
      return map[t] || "info";
    getAdviceByType(type) {
      return this.adviceList.find(item => String(item.adviceType) === String(type));
    },
    getDeptNames(codes) {
      if (!codes) return "-";
      const arr = codes.split(",").filter(Boolean);
      const names = arr.map(c => {
      if (!codes) return "";
      return codes.split(",").filter(Boolean).map(c => {
        const found = this.deptOptions.find(d => d.value == c);
        return found ? found.label : c;
      });
      return names.join("、") || "-";
      }).join("、");
    },
    getWardNames(codes) {
      if (!codes) return "-";
      const arr = codes.split(",").filter(Boolean);
      const names = arr.map(c => {
      if (!codes) return "";
      return codes.split(",").filter(Boolean).map(c => {
        const found = this.wardOptions.find(w => w.value == c);
        return found ? found.label : c;
      });
      return names.join("、") || "-";
      }).join("、");
    },
    getList() {
      this.loading = true;
      // åˆ†é¡µå‚æ•°èµ° query,过滤条件走 body
      const body = {
        subid: this.subid || undefined,
        taskid: this.taskid || undefined,
        patid: this.patid || undefined,
        adviceType: this.queryParams.adviceType || undefined,
        content: this.queryParams.content || undefined
        patid: this.patid || undefined
      };
      const query = {
        pageNum: this.queryParams.pageNum,
        pageSize: this.queryParams.pageSize
      };
      const query = { pageNum: 1, pageSize: 100 };
      listAdvice(body, query).then(res => {
        this.adviceList = res.rows || [];
        this.total = res.total || 0;
        this.loading = false;
      }).catch(() => { this.loading = false; });
    },
    handleQuery() {
      this.queryParams.pageNum = 1;
      this.getList();
    },
    resetQuery() {
      this.queryParams.adviceType = undefined;
      this.queryParams.content = undefined;
      this.handleQuery();
    },
    handleSelectionChange(selection) {
      this.ids = selection.map(item => item.id);
      this.single = selection.length !== 1;
      this.multiple = !selection.length;
    },
    reset() {
    resetForm() {
      this.form = {
        id: undefined,
        adviceType: "1",
        adviceType: this.currentType,
        deptCodes: [],
        wardCodes: [],
        involvedUsers: "",
@@ -226,28 +183,35 @@
        remark: ""
      };
    },
    handleAdd() {
      this.reset();
      this.title = "新增投诉建议";
    handleAdd(type) {
      this.currentType = type;
      this.resetForm();
      this.dialogTitle = "新增" + this.currentTypeText;
      this.open = true;
    },
    handleUpdate(row) {
      this.reset();
      this.title = "修改投诉建议";
      getAdvice(row.id).then(res => {
        const data = res.data || {};
        this.form = {
          id: data.id,
          adviceType: data.adviceType || "1",
          deptCodes: data.deptCodes ? data.deptCodes.split(",").filter(Boolean) : [],
          wardCodes: data.wardCodes ? data.wardCodes.split(",").filter(Boolean) : [],
          involvedUsers: data.involvedUsers || "",
          content: data.content || "",
          remark: data.remark || ""
        };
        this.open = true;
      });
    handleEdit(type) {
      this.currentType = type;
      const existing = this.getAdviceByType(type);
      if (existing) {
        getAdvice(existing.id).then(res => {
          const data = res.data || existing;
          this.form = {
            id: data.id,
            adviceType: data.adviceType || type,
            deptCodes: data.deptCodes ? data.deptCodes.split(",").filter(Boolean) : [],
            wardCodes: data.wardCodes ? data.wardCodes.split(",").filter(Boolean) : [],
            involvedUsers: data.involvedUsers || "",
            content: data.content || "",
            remark: data.remark || ""
          };
          this.dialogTitle = "修改" + this.currentTypeText;
          this.open = true;
        });
      }
    },
    submitForm() {
      this.$refs["form"].validate(valid => {
        if (!valid) return;
@@ -275,41 +239,77 @@
          }
        });
      });
    },
    handleDelete(row) {
      const ids = row.id ? [row.id] : this.ids;
      if (!ids.length) {
        this.$modal.msgWarning("请选择要删除的数据");
        return;
      }
      this.$modal.confirm("是否确认删除所选投诉建议?").then(() => {
        return delAdvice(ids.join(","));
      }).then(res => {
        if (res.code === 200) {
          this.getList();
          this.$modal.msgSuccess("删除成功");
        }
      }).catch(() => {});
    },
    handleExport() {
      this.download(
        "/system/serviceSubtaskAdvice/export",
        {
          subid: this.subid,
          taskid: this.taskid,
          patid: this.patid,
          adviceType: this.queryParams.adviceType,
          content: this.queryParams.content
        },
        `随访建议数据_${new Date().getTime()}.xlsx`
      );
    }
  }
};
</script>
<style lang="scss" scoped>
.advice-list {
  padding: 10px 0;
.advice-blocks {
  padding: 0;
  ::v-deep .el-tabs__item {
    .tab-icon {
      margin-right: 4px;
    }
  }
}
.advice-content {
  padding: 16px 20px;
  border-radius: 6px;
  border-left: 4px solid transparent;
  background: #fafafa;
  &.type-complaint { border-left-color: #f56c6c; }
  &.type-suggest { border-left-color: #409eff; }
  &.type-praise { border-left-color: #67c23a; }
  .advice-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    .advice-label {
      font-size: 14px;
      font-weight: 600;
      color: #303133;
    }
  }
  .advice-text {
    font-size: 14px;
    color: #303133;
    line-height: 1.7;
    margin-bottom: 10px;
    word-break: break-all;
  }
  .advice-meta {
    font-size: 13px;
    color: #909399;
    margin-bottom: 6px;
    .meta-item {
      display: inline-block;
      margin-right: 16px;
      i { margin-right: 4px; color: #606266; }
    }
  }
  .advice-foot {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #c0c4cc;
    padding-top: 10px;
    border-top: 1px solid #ebeef5;
  }
}
.advice-empty {
  padding: 50px 0;
  text-align: center;
  .empty-icon { font-size: 36px; display: block; margin-bottom: 12px; }
  p { color: #c0c4cc; font-size: 14px; margin-bottom: 16px; }
}
</style>
src/views/followvisit/record/detailpage/index.vue
@@ -368,7 +368,7 @@
            <div>随访内容</div>
          </div>
          <div>
            <el-tabs v-model="activeName" type="border-card">
            <el-tabs v-model="activeName" type="card">
              <el-tab-pane name="wj">
                <span class="mulsz" slot="label"
                  ><i class="el-icon-notebook-1"></i> é—®å·éšè®¿ç»“æžœ</span
@@ -984,106 +984,79 @@
            </el-form>
          </div>
          <!-- æ‚£è€…档案信息 -->
          <div class="detailed">
            <h3>患者档案信息</h3>
            <el-form ref="userform" :model="userform" label-width="100px">
              <el-row :gutter="20">
                <el-col :span="12">
                  <el-form-item label="患者姓名" prop="name">
                    <el-input
                      v-model="userform.name"
                      placeholder="请输入姓名"
                      maxlength="30"
                    ></el-input>
                  </el-form-item>
                </el-col>
              </el-row>
              <el-row :gutter="20">
                <el-col :span="12">
                  <el-form-item label="性别" prop="sex">
                    <el-select v-model="userform.sex" placeholder="请选择">
                      <el-option label="男" :value="1"> </el-option>
                      <el-option label="女" :value="2"> </el-option>
                    </el-select>
                  </el-form-item>
                </el-col>
                <el-col :span="12">
                  <el-form-item label="年龄" prop="age">
                    <el-input
                      v-model="userform.age"
                      placeholder="请输入年龄"
                      maxlength="20"
                    ></el-input>
                  </el-form-item>
                </el-col>
              </el-row>
              <el-row :gutter="20">
                <el-col :span="12">
                  <el-form-item label="联系方式" prop="telcode">
                    <el-input
                      v-model="userform.telcode"
                      placeholder="请输入联系方式"
                      maxlength="20"
                    />
                  </el-form-item>
                </el-col>
                <el-col :span="12">
                  <el-form-item label="亲属联系方式" prop="relativetelcode">
                    <el-input
                      v-model="userform.relativetelcode"
                      placeholder="请输入亲属联系方式"
                      maxlength="20"
                    ></el-input>
                  </el-form-item>
                </el-col>
              </el-row>
              <el-row :gutter="20">
                <el-col :span="24">
                  <el-form-item label="诊断名称" prop="leavediagname">
                    <el-input
                      v-model="form.leavediagname"
                      placeholder="请输入诊断"
                      maxlength="50"
                    ></el-input>
                  </el-form-item>
                </el-col>
              </el-row>
              <el-row :gutter="20">
                <el-col :span="24">
                  <el-form-item label="出生地" prop="birthplace">
                    <el-input
                      v-model="userform.birthplace"
                      placeholder="国、省、地市、区县、街道等详细信息"
                      maxlength="50"
                    />
                  </el-form-item>
                </el-col>
              </el-row>
              <el-row :gutter="20">
                <el-col :span="24">
                  <el-form-item label="居住地" prop="placeOfResidence">
                    <el-input
                      v-model="userform.placeOfResidence"
                      placeholder="国、省、地市、区县、街道等详细信息"
                      maxlength="50"
                    />
                  </el-form-item>
                </el-col>
              </el-row>
            </el-form>
          <!-- æŠ˜å é¢æ¿ï¼šæ‚£è€…档案信息 + æŠ•诉建议 -->
          <div class="collapse-section">
            <el-collapse v-model="collapseActive" accordion>
              <el-collapse-item title="患者档案信息" name="patient">
                <el-form ref="userform2" :model="userform" label-width="90px" size="small">
                  <el-row :gutter="16">
                    <el-col :span="12">
                      <el-form-item label="患者姓名">
                        <el-input v-model="userform.name" placeholder="请输入姓名" maxlength="30"></el-input>
                      </el-form-item>
                    </el-col>
                    <el-col :span="12">
                      <el-form-item label="性别">
                        <el-select v-model="userform.sex" placeholder="请选择" style="width: 100%">
                          <el-option label="男" :value="1"></el-option>
                          <el-option label="女" :value="2"></el-option>
                        </el-select>
                      </el-form-item>
                    </el-col>
                  </el-row>
                  <el-row :gutter="16">
                    <el-col :span="12">
                      <el-form-item label="年龄">
                        <el-input v-model="userform.age" placeholder="请输入年龄" maxlength="20"></el-input>
                      </el-form-item>
                    </el-col>
                    <el-col :span="12">
                      <el-form-item label="联系方式">
                        <el-input v-model="userform.telcode" placeholder="请输入联系方式" maxlength="20"></el-input>
                      </el-form-item>
                    </el-col>
                  </el-row>
                  <el-row :gutter="16">
                    <el-col :span="24">
                      <el-form-item label="亲属电话">
                        <el-input v-model="userform.relativetelcode" placeholder="请输入亲属联系方式" maxlength="20"></el-input>
                      </el-form-item>
                    </el-col>
                  </el-row>
                  <el-row :gutter="16">
                    <el-col :span="24">
                      <el-form-item label="诊断名称">
                        <el-input v-model="form.leavediagname" placeholder="请输入诊断" maxlength="50"></el-input>
                      </el-form-item>
                    </el-col>
                  </el-row>
                  <el-row :gutter="16">
                    <el-col :span="24">
                      <el-form-item label="出生地">
                        <el-input v-model="userform.birthplace" placeholder="国、省、地市、区县、街道等" maxlength="50"></el-input>
                      </el-form-item>
                    </el-col>
                  </el-row>
                  <el-row :gutter="16">
                    <el-col :span="24">
                      <el-form-item label="居住地">
                        <el-input v-model="userform.placeOfResidence" placeholder="国、省、地市、区县、街道等" maxlength="50"></el-input>
                      </el-form-item>
                    </el-col>
                  </el-row>
                </el-form>
              </el-collapse-item>
              <el-collapse-item title="投诉建议" name="advice" v-if="orgname=='缙云县人民医院'">
                <AdviceList :subid="taskid" :taskid="id" :patid="patid" />
              </el-collapse-item>
            </el-collapse>
          </div>
        </div>
      </div>
    </div>
    <!-- æŠ•诉建议 -->
    <el-card class="advice-card">
      <div slot="header" class="clearfix">
        <span class="detail-title">投诉建议</span>
      </div>
      <AdviceList :subid="taskid" :taskid="id" :patid="patid" />
    </el-card>
    <!-- çŸ­ä¿¡å‘送对话框 -->
    <el-dialog title="短信发送" :visible.sync="smsDialogVisible">
      <!-- æ³¨æ„è¿™é‡Œä½¿ç”¨äº† smsDialogVisible ä»¥åŒºåˆ†å·²æœ‰çš„ dialogFormVisible -->
@@ -1420,6 +1393,7 @@
    return {
      visitAgain: 1,
      activeNames: ["next"], // åªå±•å¼€"下次随访",其他都折叠
      collapseActive: ["patient"], // äººå·¥å¤„理折叠面板激活项(默认展开患者档案)
      userid: "",
      defaultKey: false, //是否可默认填报
      currentPhoneNumber: "",
@@ -4155,12 +4129,57 @@
  background-color: #fff;
}
.advice-card {
  margin: 0 10px 20px 10px;
  .detail-title {
    font-size: 16px;
    font-weight: 600;
    color: #303133;
.collapse-section {
  width: 100%;
  align-self: stretch;
  margin-top: 10px;
  ::v-deep .el-collapse {
    border: none;
    .el-collapse-item__header {
      background: linear-gradient(135deg, #ecf5ff 0%, #f5f9ff 100%);
      border-radius: 8px;
      padding: 0 20px;
      height: 48px;
      font-size: 16px;
      font-weight: 700;
      color: #303133;
      border-bottom: 1px solid #e4e7ed;
      margin-bottom: 8px;
      letter-spacing: 1px;
      .el-collapse-item__arrow {
        font-size: 16px;
        color: #409eff;
      }
      &:hover {
        background: linear-gradient(135deg, #e0efff 0%, #ecf5ff 100%);
      }
      &.is-active {
        border-bottom-color: transparent;
        color: #409eff;
      }
    }
    .el-collapse-item__wrap {
      border-bottom: none;
      padding: 4px 2px 8px;
    }
    .el-collapse-item__content {
      padding: 16px;
      background: #fff;
      border-radius: 8px;
      border: 1px solid #ebeef5;
      box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    }
  }
  .el-form-item {
    margin-bottom: 12px;
  }
}
</style>
Ëæ·ÃÍâÁ´.zip
Binary files differ
Ëæ·ÃͨÓÃ8.18.zip
Binary files differ