wjj 2 недель назад
Родитель
Сommit
02983391db
3 измененных файлов с 264 добавлено и 0 удалено
  1. 26 0
      src/api/collection.js
  2. 13 0
      src/router/index.js
  3. 225 0
      src/views/collection/index.vue

+ 26 - 0
src/api/collection.js

@@ -0,0 +1,26 @@
+import request from '@/utils/request'
+
+//查询初诊单列表
+export function list(query) {
+  return request({
+    url: '/app/collection/getCollectionList',
+    method: 'get',
+    params: query
+  })
+}
+
+// 查询用户采集详情
+export function detail(id) {
+  return request({
+    url: '/app/collection/detail/' + id,
+    method: 'get'
+  })
+}
+
+export function doctorConfirm(data) {
+  return request({
+    url: '/app/collection/doctorConfirm',
+    method: 'put',
+    data: data
+  })
+}

+ 13 - 0
src/router/index.js

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

+ 225 - 0
src/views/collection/index.vue

@@ -0,0 +1,225 @@
+<template>
+    <div class="app-container">
+        <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
+            <el-form-item label="患者姓名" prop="userName">
+                <el-input v-model="queryParams.userName" placeholder="请输入患者姓名" clearable size="small"
+                    @keyup.enter.native="handleQuery" />
+            </el-form-item>
+            <el-form-item label="医生确认" prop="doctorConfirm">
+                <el-select v-model="queryParams.doctorConfirm" placeholder="请选择" clearable size="small">
+                    <el-option label="未确认" value="0" />
+                    <el-option label="已确认" value="1" />
+                </el-select>
+            </el-form-item>
+            <el-form-item label="患者确认" prop="userConfirm">
+                <el-select v-model="queryParams.userConfirm" placeholder="请选择" clearable size="small">
+                    <el-option label="未确认" value="0" />
+                    <el-option label="已确认" value="1" />
+                </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 v-loading="loading" border :data="list" @selection-change="handleSelectionChange">
+            <el-table-column type="selection" width="55" align="center" />
+            <el-table-column label="患者姓名" align="center" prop="userName" />
+            <el-table-column label="患者补充说明" :show-overflow-tooltip="true" align="center" prop="userAdvice"></el-table-column>
+            <el-table-column label="患者确认状态" align="center" prop="userConfirm">
+                <template slot-scope="scope">
+                    <el-tag v-if="scope.row.userConfirm == 0">未确认</el-tag>
+                    <el-tag type="success" v-if="scope.row.userConfirm == 1">已确认</el-tag>
+                </template>
+            </el-table-column>
+            <el-table-column label="医生确认状态" align="center" prop="doctorConfirm">
+                <template slot-scope="scope">
+                    <el-tag v-if="scope.row.doctorConfirm == 0">未确认</el-tag>
+                    <el-tag type="success" v-if="scope.row.doctorConfirm == 1">已确认</el-tag>
+                </template>
+            </el-table-column>
+            <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
+                <template slot-scope="scope">
+                    <el-button size="mini" type="text" @click="handleDetial(scope.row)">详情</el-button>
+                    <el-button size="mini" type="text" @click="handleAdvice(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="采集信息详情" :visible.sync="collectionOpen" width="1000px" append-to-body>
+            <el-form ref="collectionForm" :model="collectionForm" label-width="110px">
+                <div v-for="(answer, index) in collectionForm.answers">
+                    <div style="margin-bottom: 20px;margin-top: 20px;">
+                        <span style="font-size: 15px;font-weight: bold;    margin-left: 31px">{{ answer.title }}</span>
+                    </div>
+                    <div style="margin-left: 31px;">
+                        <el-radio-group :disabled="true" v-model="collectionForm.answers[index].value">
+                            <el-radio v-for="dict in answer.options" :label="dict.value">{{ dict.name }}</el-radio>
+                        </el-radio-group>
+                    </div>
+                </div>
+            </el-form>
+            <div slot="footer" class="dialog-footer">
+                <el-button @click="cancel">关 闭</el-button>
+            </div>
+        </el-dialog>
+
+        <el-dialog title="医生建议"  :visible.sync="open" width="1000px" append-to-body>
+            <el-form ref="form" :rules="rules" :model="form" label-width="110px">
+                <el-form-item label="建议" prop="doctorAdvice">
+                    <el-input v-model="form.doctorAdvice" type="textarea" placeholder="请输入内容" />
+                </el-form-item>
+            </el-form>
+            <div slot="footer" class="dialog-footer">
+                <el-button type="primary" @click="submitForm">确 认</el-button>
+                <el-button @click="cancelAdvice">关 闭</el-button>
+            </div>
+        </el-dialog>
+    </div>
+</template>
+
+<script>
+import { list, detail, doctorConfirm } from "@/api/collection.js";
+export default {
+    name: "collection",
+    data() {
+        return {
+            queryParams: {
+                pageNum: 1,
+                pageSize: 10,
+            },
+            // 遮罩层
+            loading: true,
+            // 导出遮罩层
+            exportLoading: false,
+            // 选中数组
+            ids: [],
+            // 非单个禁用
+            single: true,
+            // 非多个禁用
+            multiple: true,
+            // 显示搜索条件
+            showSearch: true,
+            // 总条数
+            total: 0,
+            list: [],
+            // 弹出层标题
+            title: "",
+            // 是否显示弹出层
+            open: false,
+            queryParams: {
+                pageNum: 1,
+                pageSize: 10,
+                type: "0",
+            },
+            // 表单参数
+            form: {},
+            // 表单校验
+            rules: {
+                doctorAdvice:[{ required: true, message: '请输入医生建议', trigger: 'blur' },]
+
+            },
+            collectionForm: {
+                answers:[]
+            },
+            collectionOpen : false,
+        }
+    },
+    created() {
+        this.getList();
+    },
+
+    methods: {
+        submitForm() {
+            this.$refs["form"].validate(valid => {
+                if (valid) {
+                    // fill(this.form).then(res => {
+                    //     this.msgSuccess("填写成功");
+                    //     this.open = false;
+                    //     this.getList();
+                    // })
+                }
+            });
+        },
+        handleAdvice(row){
+            this.form={};
+            this.open = true;
+            this.form.id = row.id;
+        },
+        cancelAdvice(){
+            this.open = false;
+            this.reset();
+        },
+        submitForm(){
+            this.$refs["form"].validate(valid => {
+                if (valid) {
+                    doctorConfirm(this.form).then(res => {
+                        this.msgSuccess("填写成功");
+                        this.open = false;
+                        this.getList();
+                    })
+                }
+            });
+        },
+        handleDetial(row) {
+            detail(row.id).then(res => {
+                this.collectionForm = res.data;
+
+            })
+            this.collectionOpen = true;
+        },
+        // handleFill(row) {
+        //     detail(row.id).then(res => {
+        //         this.form = res.data
+        //     })
+        //     this.open = true;
+        // },
+        getList() {
+            this.loading = true;
+            list(this.queryParams).then(response => {
+                this.list = response.data.list;
+                this.total = response.data.total;
+                this.loading = false;
+            });
+        },
+
+        // 取消按钮
+        cancel() {
+            this.collectionOpen = false;
+            this.restCollection();
+        },
+        restCollection(){
+            this.collectionForm = {
+                answers:[]
+            };
+            this.resetForm("collectionForm");
+        },
+        // 表单重置
+        reset() {
+            this.form = {
+            };
+            this.resetForm("form");
+        },
+        /** 搜索按钮操作 */
+        handleQuery() {
+            this.queryParams.pageNum = 1;
+            this.getList();
+        },
+        /** 重置按钮操作 */
+        resetQuery() {
+            this.resetForm("queryForm");
+            this.handleQuery();
+        },
+        // 多选框选中数据
+        handleSelectionChange(selection) {
+            this.ids = selection.map(item => item.patientId)
+            this.single = selection.length !== 1
+            this.multiple = !selection.length
+        }
+    }
+
+};
+</script>