WXL
2023-12-11 dc3d15dfe0c4a4a85bc5b4df7959b84a02beb064
src/comp/smartor3/dwo/dw_list_pat_archive.vue
@@ -2,33 +2,76 @@
      <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-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-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-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-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
      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="iccardno" label="  证件号码 " align="center"/>
      <el-table-column prop="idno" 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="iccardtype" label="  证件类型 " align="center"/>
      <el-table-column
        prop="relativetelcode"
        label="  亲属号码 "
        align="center"
      />
      <el-table-column prop="idtype" 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"/>
@@ -41,14 +84,26 @@
                  <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"/>
    <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";
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'],
  dicts: ["sys_user_sex", "sys_patientfrom"],
      data() {
         return {
         parent:null,
@@ -75,18 +130,17 @@
            pageNum: 1,
            pageSize: 10,
            name: null,
            iccardno: null,
        idno: null,
            source: null,
            telcode: null,
            orgid: null,
            isupload: null,
            uploadTime: null
        uploadTime: null,
         },
       // 表单参数
         form: {},
      // 表单校验
          rules: {
          }
      rules: {},
         };
      },
      created() {
@@ -96,33 +150,31 @@
      methods: {
         getList() {
            this.loading = true;
            listpat_archive(this.queryParams).then(response => {
      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
      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])
    handleAdd() {
      this.$parent.HandleCmdDefault("bill.new", this.ids[0]);
         },
         handleUpdate()
         {
            this.$parent.HandleCmdDefault("bill.open",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.selectionRowChanged(row.patid);
           //this.$parent.patid = row.patid
         }
      }
   }
    },
  },
};
   </script>