| | |
| | | <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="iccardno" /> |
| | | <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"> |
| | | <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="idno" /> |
| | | <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> |
| | |
| | | v-hasPermi="['smartor:patarchive:remove']">删除</el-button> |
| | | </template> |
| | | </el-table-column--> |
| | | </el-table> |
| | | </el-table> |
| | | </template> |
| | | <script> |
| | | import { listPatarchive, getPatarchive, delPatarchive, addPatarchive, updatePatarchive } from "@/api/smartor/patarchive"; |
| | | 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, |
| | | iccardno: 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" } |
| | | ], |
| | | } |
| | | }; |
| | | 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, |
| | | idno: 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; |
| | | }, |
| | | created() { |
| | | this.getList(); |
| | | getList() { |
| | | this.loading = true; |
| | | listPatarchive(this.queryParams).then((response) => { |
| | | this.patarchiveList = response.rows; |
| | | this.total = response.total; |
| | | this.loading = false; |
| | | }); |
| | | }, |
| | | 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> |
| | | // 多选框选中数据 |
| | | 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> |