WXL
7 天以前 ddba78219616742fdf473c50fdc4985fa0a8553b
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
<template>
  <el-table v-loading="loading" :data="patarchiveList" @row-click="rowChanged">
    <!--el-table-column type="selection" width="55" align="center" /-->
    <el-table-column label=" 自增ID " align="center" prop="patid" />
    <el-table-column label=" 姓名 " align="center" prop="name" />
    <el-table-column label=" 性别 " align="center" prop="sex">
      <template slot-scope="scope">
        <dict-tag :options="dict.type.sys_user_sex" :value="scope.row.sex" />
      </template>
    </el-table-column>
    <el-table-column label=" 证件号码 " align="center" prop="idcardno" />
    <el-table-column label=" 生日 " align="center" prop="birthdate" width="180">
      <template slot-scope="scope">
        <span>{{ parseTime(scope.row.birthdate, "{y}-{m}-{d}") }}</span>
      </template>
    </el-table-column>
    <el-table-column label=" 年龄 " align="center" prop="age" />
    <el-table-column label=" 来源 " align="center" prop="source">
      <template slot-scope="scope">
        <dict-tag
          :options="dict.type.sys_patientfrom"
          :value="scope.row.source"
        />
      </template>
    </el-table-column>
    <el-table-column label=" 手机号码 " align="center" prop="telcode" />
    <el-table-column label=" 机构ID " align="center" prop="orgid">
      <template slot-scope="scope">
        <dict-tag
          :options="dict.type.sys_patientfrom"
          :value="scope.row.orgid"
        />
      </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" icon="el-icon-edit" @click="handleUpdate(scope.row)"
            v-hasPermi="['smartor:patarchive:edit']">修改</el-button>
          <el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)"
            v-hasPermi="['smartor:patarchive:remove']">删除</el-button>
        </template>
      </el-table-column-->
  </el-table>
</template>
<script>
import {
  listPatarchive,
  getPatarchive,
  delPatarchive,
  addPatarchive,
  updatePatarchive,
} from "@/api/smartor/patarchive";
export default {
  name: "PatarchiveList",
  dicts: ["sys_user_sex", "sys_patientfrom"],
  data() {
    return {
      parent: null,
      // 遮罩层
      loading: true,
      // 选中数组
      ids: [],
      // 非单个禁用
      single: true,
      // 非多个禁用
      multiple: true,
      // 显示搜索条件
      showSearch: true,
      // 总条数
      total: 0,
      // 患者档案表格数据
      patarchiveList: [],
      // 弹出层标题
      title: "",
      // 是否显示弹出层
      open: false,
      // 查询参数
      queryParams: {
        pageNum: 1,
        pageSize: 10,
        name: null,
        idcardno: null,
        source: null,
        telcode: null,
        orgid: null,
        isupload: null,
        uploadTime: null,
      },
      // 表单参数
      form: {},
      // 表单校验
      rules: {
        delFlag: [
          { required: true, message: " 删除标记 不能为空", trigger: "blur" },
        ],
        isupload: [
          { required: true, message: " 上传标记 不能为空", trigger: "blur" },
        ],
      },
    };
  },
  created() {
    this.getList();
  },
  methods: {
    initial(parent) {
      this.parent = parent;
    },
    getList() {
      this.loading = true;
      listPatarchive(this.queryParams).then((response) => {
        this.patarchiveList = response.rows;
        this.total = response.total;
        this.loading = false;
      });
    },
    // 多选框选中数据
    handleSelectionChange(selection) {
      this.ids = selection.map((item) => item.patid);
      this.single = selection.length !== 1;
      this.multiple = !selection.length;
      //alert("selections:"+this.ids[0])
      //this.$parent.selectionChanged(this.ids[0])
    },
    rowChanged(row) {
      //alert(row.patid)
      //console.log(row)
      //this.$parent.selectionChanged(row.patid)
      this.$parent.patid = row.patid;
    },
  },
};
</script>