WXL
2023-12-15 4e32f1188e9d0cafd3511994d2d13617ca6e08f9
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
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
<template>
  <div>
    <el-row v-if="false" :gutter="10" class="mb8">
      <el-col :span="1.5">
        <el-button
          size="mini"
          plain="true"
          icon="el-icon-plus"
          v-hasPermi="['smartor:patinhosp:add']"
          type="primary"
          @click="handleAdd"
          >新增</el-button
        >
      </el-col>
      <el-col :span="1.5">
        <el-button
          size="mini"
          plain="true"
          icon="el-icon-edit"
          :disabled="single"
          v-hasPermi="['smartor:patinhosp:edit']"
          type="success"
          @click="handleUpdate"
          >修改</el-button
        >
      </el-col>
      <el-col :span="1.5">
        <el-button
          size="mini"
          plain="true"
          icon="el-icon-delete"
          :disabled="multiple"
          v-hasPermi="['smartor:patinhosp:remove']"
          type="danger"
          @click="handleDelete"
          >删除</el-button
        >
      </el-col>
      <el-col :span="1.5">
        <el-button
          size="mini"
          plain="true"
          icon="el-icon-download"
          v-hasPermi="['smartor:patinhosp:export']"
          type="warning"
          @click="handleExport"
          >导出</el-button
        >
      </el-col>
      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList" />
    </el-row>
    <el-table
      v-loading="loading"
      :data="dataList"
      @selection-change="handleSelectionChange"
      @row-click="rowChanged"
    >
      <el-table-column width="50" type="selection" align="center" />
      <el-table-column prop="patid" label="  自增ID " align="center" />
      <el-table-column prop="name" label="  姓名 " align="center" />
      <el-table-column prop="sex" label="  性别   1:男  2:女" align="center" />
      <el-table-column prop="idcardno" label="  证件号码 " align="center" />
      <el-table-column prop="birthdate" label="  生日 " align="center" />
      <el-table-column prop="age" label="  年龄 " align="center" />
      <el-table-column prop="source" label="  来源 " align="center" />
      <el-table-column prop="archivetime" label="  建档时间 " align="center" />
      <el-table-column prop="archiveby" label="  建档人 " align="center" />
      <el-table-column prop="telcode" label="  手机号码 " align="center" />
      <el-table-column
        prop="relativetelcode"
        label="  亲属号码 "
        align="center"
      />
      <el-table-column prop="idcardtype" label="  证件类型 " align="center" />
      <el-table-column prop="orgid" label="  机构ID " align="center" />
      <el-table-column prop="openid" label="  微信openid " align="center" />
      <el-table-column prop="del_flag" label="  删除标记 " align="center" />
      <el-table-column prop="update_by" label="  更新人 " align="center" />
      <el-table-column prop="update_time" label="  更新时间 " align="center" />
      <el-table-column prop="create_by" label="  创建人 " align="center" />
      <el-table-column prop="create_time" label="  创建时间 " align="center" />
      <el-table-column prop="isupload" label="  上传标记 " align="center" />
      <el-table-column prop="upload_time" label="  上传时间 " align="center" />
      <el-table-column prop="pid" label=" 父ID" align="center" />
      <el-table-column prop="guid" label=" GUID" align="center" />
    </el-table>
    <pagination
      :total="total"
      :limit.sync="queryParams.pageSize"
      @pagination="getList"
      :page.sync="queryParams.pageNum"
      v-show="total &gt; 0"
    />
  </div>
</template>
<script>
import {
  listpat_archive,
  getpat_archive,
  delpat_archive,
  addpat_archive,
  updatepat_archive,
} from "@/api/smartor3/pat_archive";
export default {
  name: "dw_list_pat_archive",
  dicts: ["sys_user_sex", "sys_patientfrom"],
  data() {
    return {
      parent: null,
      // 遮罩层
      loading: true, //true,
      // 选中数组
      ids: [],
      // 非单个禁用
      single: true,
      // 非多个禁用
      multiple: true,
      // 显示搜索条件
      showSearch: false,
      // 总条数
      total: 0,
      // 表格数据
      dataList: [],
      // 弹出层标题
      title: "",
      // 是否显示弹出层
      open: false,
      // 查询参数
      queryParams: {
        pageNum: 1,
        pageSize: 10,
        name: null,
        idcardno: null,
        source: null,
        telcode: null,
        orgid: null,
        isupload: null,
        uploadTime: null,
      },
      // 表单参数
      form: {},
      // 表单校验
      rules: {},
    };
  },
  created() {
    //this.getList();
    this.getList();
  },
  methods: {
    getList() {
      this.loading = true;
      listpat_archive(this.queryParams).then((response) => {
        this.dataList = 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])
    },
    handleAdd() {
      this.$parent.HandleCmdDefault("bill.new", this.ids[0]);
    },
    handleUpdate() {
      this.$parent.HandleCmdDefault("bill.open", this.ids[0]);
    },
    rowChanged(row) {
      //alert(row.patid)
      //console.log(row)
      this.$parent.selectionRowChanged(row.patid);
      //this.$parent.patid = row.patid
    },
  },
};
</script>