浏览代码

患者基础信息诊断

wjj 1 周之前
父节点
当前提交
5fe3942e8b
共有 3 个文件被更改,包括 314 次插入0 次删除
  1. 20 0
      src/api/patientBase.js
  2. 13 0
      src/router/index.js
  3. 281 0
      src/views/patientBase/index.vue

+ 20 - 0
src/api/patientBase.js

@@ -0,0 +1,20 @@
+import request from '@/utils/request'
+
+// 查询患者基本信息列表
+export function listInfo(query) {
+  return request({
+    url: '/app/patientBase/list',
+    method: 'get',
+    params: query
+  })
+}
+
+
+// 诊断患者基本信息
+export function diagnose(data) {
+  return request({
+    url: '/app/patientBase/diagnose',
+    method: 'post',
+    data: data
+  })
+}

+ 13 - 0
src/router/index.js

@@ -260,6 +260,19 @@ export const constantRoutes = [
         meta: { title: '用户信息采集', icon: 'form', affix: false }
       }
     ]
+  },
+   {
+    path: '/patientBase',
+    component: Layout,
+    redirect: 'noredirect',
+    children: [
+      {
+        path: 'Index',
+        component: (resolve) => require(['@/views/patientBase/index'], resolve),
+        name: '患者诊断',
+        meta: { title: '患者诊断', icon: 'form', affix: false }
+      }
+    ]
   },
   {
     path: '/follow',

+ 281 - 0
src/views/patientBase/index.vue

@@ -0,0 +1,281 @@
+<template>
+  <div class="app-container">
+    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
+      <el-form-item label="姓名" prop="name">
+        <el-input
+          v-model="queryParams.name"
+          placeholder="请输入姓名"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <!-- <el-form-item label="理疗方案" prop="projectId">
+        <el-input
+          v-model="queryParams.projectId"
+          placeholder="请输入理疗方案"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item> -->
+      
+      <el-form-item label="状态" prop="doctorStatus">
+        <el-select v-model="queryParams.doctorStatus" placeholder="请选择状态" clearable size="small">
+          <el-option
+            v-for="dict in doctorStatusOptions"
+            :key="dict.dictValue"
+            :label="dict.dictLabel"
+            :value="dict.dictValue"
+          />
+        </el-select>
+      </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 border v-loading="loading" :data="infoList" >
+      <el-table-column label="ID" align="center" prop="id" />
+      <el-table-column label="姓名" align="center" prop="name" />
+      <el-table-column label="性别" align="center" prop="sex">
+        <template slot-scope="scope">
+          <dict-tag :options="sexOptions" :value="scope.row.sex"/>
+        </template>
+      </el-table-column>
+      <el-table-column label="年龄" align="center" prop="age" />
+      <el-table-column label="用户绑定状态" align="center" prop="status" >
+        <template slot-scope="scope">
+          <dict-tag :options="statusOptions" :value="scope.row.status"/>
+        </template>
+      </el-table-column>
+      <el-table-column label="医生完善状态" align="center" prop="doctorStatus" >
+        <template slot-scope="scope">
+          <dict-tag :options="doctorStatusOptions" :value="scope.row.doctorStatus"/>
+        </template>
+      </el-table-column>
+      <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
+        <template slot-scope="scope">
+          <el-button
+            v-if="scope.row.doctorStatus == 0"
+            size="mini"
+            type="text"
+            icon="el-icon-edit"
+            @click="handleDiagnose(scope.row)"
+          >诊断</el-button>
+          <el-button
+            v-if="scope.row.doctorStatus == 1"
+            size="mini"
+            type="text"
+            icon="el-icon-edit"
+            @click="handleDetail(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="700px" append-to-body>
+      <el-form ref="form" :model="form" :rules="rules" label-width="80px">
+        <el-form-item label="姓名" prop="name">
+          <el-input :disabled="true" v-model="form.name" placeholder="请输入姓名" />
+        </el-form-item>
+        <el-form-item label="性别" prop="sex">
+          <el-select :disabled="true" v-model="form.sex" placeholder="请选择性别">
+            <el-option
+              v-for="dict in sexOptions"
+              :key="dict.dictValue"
+              :label="dict.dictLabel"
+              :value="parseInt(dict.dictValue)"
+            ></el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item label="年龄" prop="age">
+          <el-input :disabled="true" v-model="form.age" placeholder="请输入年龄" />
+        </el-form-item>
+        <el-form-item label="基本信息" prop="baseInfo">
+          <el-input :disabled="true"  v-model="form.baseInfo" type="textarea" placeholder="请输入内容" />
+        </el-form-item>
+        <el-form-item label="诊断结果" prop="diagnosisResult">
+          <el-input   v-model="form.diagnosisResult" type="textarea" placeholder="请输入内容" />
+        </el-form-item>
+        <el-form-item label="治疗目标" prop="treatmentTarget">
+          <el-input   v-model="form.treatmentTarget" type="textarea" placeholder="请输入内容" />
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button v-if="form.doctorStatus == 0" type="primary" @click="submitForm">确 定</el-button>
+        <el-button @click="cancel">取 消</el-button>
+      </div>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import { listInfo,diagnose} from "@/api/patientBase";
+
+
+export default {
+  name: "Info",
+  data() {
+    return {
+      // 遮罩层
+      loading: true,
+      // 导出遮罩层
+      exportLoading: false,
+      // 选中数组
+      ids: [],
+      // 非单个禁用
+      single: true,
+      // 非多个禁用
+      multiple: true,
+      // 显示搜索条件
+      showSearch: true,
+      // 总条数
+      total: 0,
+      // 患者基本信息表格数据
+      infoList: [],
+      // 弹出层标题
+      title: "",
+      // 是否显示弹出层
+      open: false,
+      // 性别 0-女 1-男字典
+      sexOptions: [
+        {dictValue: '0',dictLabel:'女'},
+        {dictValue: '1',dictLabel:'男'}
+      ],
+      // 状态
+      statusOptions: [
+        {dictValue: '0',dictLabel:'未绑定'},
+        {dictValue: '1',dictLabel:'已绑定'}
+      ],
+      //医生完善状态
+      doctorStatusOptions:[
+        {dictValue: '0',dictLabel:'未完善'},
+        {dictValue: '1',dictLabel:'已完善'}
+      ],
+      //理疗选项
+      projectOptions:[],
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        name: null,
+        sex: null,
+        age: null,
+        baseInfo: null,
+        diagnosisResult: null,
+        treatmentTreatment: null,
+        doctorId: null,
+        projectId: null,
+        userId: null,
+        status: null,
+        doctorStatus: null
+      },
+      // 表单参数
+      form: {},
+      // 表单校验
+      rules: {
+        diagnosisResult: [
+          { required: true, message: "诊断结果不能为空", trigger: "blur" }
+        ],
+        treatmentTarget: [
+          { required: true, message: "治疗目标不能为空", trigger: "blur" }
+        ],
+      }
+    };
+  },
+  created() {
+    this.getList();
+  },
+  methods: {
+    /** 查询患者基本信息列表 */
+    getList() {
+      this.loading = true;
+      listInfo(this.queryParams).then(response => {
+        this.infoList = response.data.list;
+        this.total = response.data.total;
+        this.loading = false;
+      });
+    },
+    // 取消按钮
+    cancel() {
+      this.open = false;
+      this.reset();
+    },
+    // 表单重置
+    reset() {
+      this.form = {
+        id: null,
+        name: null,
+        sex: null,
+        age: null,
+        baseInfo: null,
+        diagnosisResult: null,
+        treatmentTreatment: null,
+        doctorId: null,
+        projectId: null,
+        createTime: null,
+        updateTime: null,
+        userId: null,
+        status: 0,
+        doctorStatus: 0
+      };
+      this.resetForm("form");
+    },
+    /** 搜索按钮操作 */
+    handleQuery() {
+      this.queryParams.pageNum = 1;
+      this.getList();
+    },
+    /** 重置按钮操作 */
+    resetQuery() {
+      this.resetForm("queryForm");
+      this.handleQuery();
+    },
+   
+    /** 新增按钮操作 */
+    handleAdd() {
+      this.reset();
+      this.open = true;
+      this.title = "添加患者基本信息";
+    },
+    /** 诊断按钮操作 */
+    handleDiagnose(row) {
+      this.reset();
+      const id = row.id || this.ids
+      this.form = row;
+      this.open = true;
+      this.title = "诊断患者基本信息";
+    },
+    handleDetail(row){
+        this.reset();
+        this.form = row;
+        this.open = true;
+        this.title = "患者基本信息"
+    },
+    /** 提交按钮 */
+    submitForm() {
+      this.$refs["form"].validate(valid => {
+        if (valid) {
+            diagnose(this.form).then(response => {
+              this.msgSuccess("诊断成功");
+              this.open = false;
+              this.getList();
+            });
+        }
+      });
+    },
+  }
+};
+</script>