Browse Source

import

master
pengjun 1 year ago
parent
commit
76937b5fc1
  1. 210
      src/components/patientRegister/ImportOrgData.vue
  2. 21
      src/components/patientRegister/PatientRegisterList.vue
  3. 2
      src/store/index.js

210
src/components/patientRegister/ImportOrgData.vue

@ -0,0 +1,210 @@
<template>
<div style="font-size: 14px">
<div style="display: flex">
<div>
<span>体检单位</span>
<el-select v-model="customerOrgId" placeholder="请选择体检单位" :filter-method="filterMethod" default-first-option
clearable filterable @clear="customerOrg = deepCopy(customerOrgAll)" style="margin-left: 10px"
@change="changeCustomerOrg" size="small">
<el-option v-for="item in customerOrg" :key="item.id" :label="item.displayName" :value="item.id">
{{ item.displayName }}
</el-option>
</el-select>
</div>
<div style="margin-left: 20px">
<span>单位体检次数</span>
<el-select v-model="customerOrgRegister" placeholder="次数" style="width: 60px; margin-left: 10px" size="small"
@change="changeTimes" value-key="id">
<el-option v-for="item in customerOrgRegisterList" :key="item.id" :label="item.medicalTimes" :value="item.id" />
</el-select>
</div>
<div style="margin-left: 10px">
<el-button class="commonbutton" @click="btnImport">开始导入</el-button>
</div>
</div>
<div>
<el-table :data="tableData" ref="customerOrgGroups" style="margin-top: 2px" row-key="id" border height="240px"
size="small" highlight-current-row :row-class-name="handleRowClassName" @row-click="rowClick">
<el-table-column type="index" label="序号" width="40" align="center" />
<el-table-column prop="importSuccessNum" label="导入成功数" min-width="60" />
<el-table-column prop="importErrorNum" label="导入错误数" min-width="60" />
<el-table-column prop="deleteSuccessNum" label="删除成功数" min-width="60" />
<el-table-column prop="deleteErrorNum" label="删除错误数" min-width="60" />
<el-table-column prop="importErrorMessages" label="导入错误信息" min-width="200" />
<el-table-column prop="deleteErrorMessages" label="删除错误信息" min-width="200" />
</el-table>
</div>
</div>
</template>
<script>
import moment from "moment";
import Sortable from "sortablejs";
import { getapi, postapi, putapi, deletapi } from "@/api/api";
import { mapState } from "vuex";
import {
getPagePriv,
checkPagePriv,
dddw,
deepCopy,
objCopy,
arrayExistObj,
} from "../../utlis/proFunc";
export default {
components: {
},
data() {
return {
pagePriv: {
routeUrlorPageName: "ImportOrgData", //
privs: [], //
},
customerOrg: [], //
customerOrgGroups: [], //
customerOrgId: "", //id
customerOrgRegisterList: [], //
customerOrgRegisterId: '', //
};
},
computed: {
...mapState(["personnelUnit", "window", "dict", "dialogWin", "dataTransOpts"]),
},
created() {
//
// let userPriv = window.sessionStorage.getItem("userPriv");
// if (userPriv)
// this.pagePriv.privs = deepCopy(getPagePriv(this.pagePriv.routeUrlorPageName));
},
mounted() {
//
this.dictInit();
},
methods: {
moment,
checkPagePriv,
dddw,
deepCopy,
//
handleRowClassName({ row, rowIndex }) {
// highLightBg 'selected'
//console.log(rowIndex, row)
//return row.highLightBg == 'selected' ? 'high-light-bg' : '';
if (row.choosed) {
return "current-row";
} else {
return "";
}
},
//
dictInit() {
//
getapi("/api/app/customer-org/parent-all").then((res) => {
if (res.code != -1) {
this.customerOrgAll = res.data;
let lfind = arrayExistObj(this.customerOrgAll, "id", this.dict.personOrgId);
if (lfind > -1) this.customerOrgAll.splice(lfind, 1);
this.customerOrg = deepCopy(this.customerOrgAll);
}
});
},
filterMethod(keyWords) {
if (keyWords) {
this.customerOrg = [];
this.customerOrgAll.forEach((item) => {
if (
item.displayName.toLowerCase().indexOf(keyWords.toLowerCase()) > -1 ||
item.simpleCode.toLowerCase().indexOf(keyWords.toLowerCase()) > -1
// || item.shortName.toLowerCase().indexOf(keyWords.toLowerCase()) > - 1
) {
this.customerOrg.push(item);
}
});
} else {
this.customerOrg = deepCopy(this.customerOrgAll);
}
},
//
changeCustomerOrg(v) {
if (!v) {
this.customerOrgRegisterList = [];
this.customerOrgRegister = {};
this.customerOrgGroups = [];
this.isDrag = false;
this.form.id = "";
setTimeout(() => {
this.dataTransOpts.refresh.customer_org_group_detail.M++;
}, 20);
return;
}
getapi(
`/api/app/customerorgregister/getlistincustomerorgid?CustomerOrgId=${v}`
).then((res) => {
if (res.code != -1) {
this.customerOrgRegisterList = res.data;
if (res.data.length > 0) {
this.customerOrgRegister = res.data[res.data.length - 1];
this.getCustomerOrgGroup(this.customerOrgRegister.id);
} else {
this.customerOrgRegister = {};
this.customerOrgGroups = [];
this.isDrag = false;
}
}
});
},
//
changeTimes(v) {
this.getCustomerOrgGroup(v.id);
},
//
btnImport() {
let body = {
customerOrgRegisterId: this.customerOrgRegisterId
}
postapi('/api/app/patientregister/CreatePatientRegisterFromCustomerOrgInterface', body)
.then(res => {
if (res.code > -1) {
//
}
})
},
//
rowClick(row) {
},
},
};
</script>
<style scoped>
@import "../../assets/css/global_button.css";
@import "../../assets/css/global_dialog.css";
@import "../../assets/css/global_table.css";
@import "../../assets/css/global_form.css";
@import "../../assets/css/global_input.css";
@import "../../assets/css/global.css";
.btnClass {
width: 100px;
margin-bottom: 5px;
}
</style>

21
src/components/patientRegister/PatientRegisterList.vue

@ -131,6 +131,9 @@
</el-tabs>
</div>
<div style="margin-left: 10px;">
<div v-show="checkPagePriv(pagePriv.privs, '导入青藏数据')" class="listBtn">
<el-button type="success" class="commonbutton" @click="btnImportOrgData">导入青藏数据</el-button>
</div>
<div v-show="checkPagePriv(pagePriv.privs, '人员登记')" class="listBtn">
<el-button type="success" class="commonbutton" @click="btnAdd">人员登记</el-button>
</div>
@ -205,6 +208,12 @@
<Camera :id="patientRegister.patientRegisterId" />
</el-dialog>
<!-- 导入企业数据 -->
<el-dialog title="导入企业数据" :visible.sync="dialogWin.ImportOrgData" width="600"
:append-to-body="true" :close-on-click-modal="false">
<ImportOrgData />
</el-dialog>
<!-- 列排序 -->
<el-dialog title="列排序" :visible.sync="dialogColSort" width="300px" :append-to-body="true"
:close-on-click-modal="false">
@ -270,7 +279,7 @@ import PatientRegisterAsbItem from "../../components/patientRegister/patientRegi
import ElProgressOCX from "../../components/report/ElProgressOCX.vue";
import PatientRegisterEditGroupBatch from "./PatientRegisterEditGroupBatch.vue";
import PatientRegisterEditItemBatch from "./PatientRegisterEditItemBatch.vue";
import ImportOrgData from "./ImportOrgData.vue";
import LocalConfig from "../../components/common/LocalConfig.vue";
@ -284,6 +293,7 @@ export default {
PatientRegisterEditItemBatch, //
ElProgressOCX,
LocalConfig,
ImportOrgData,
},
data() {
return {
@ -634,6 +644,15 @@ export default {
// }
},
// ()
btnImportOrgData(){
//
this.dataTransOpts.plus.ImportOrgData++
this.dialogWin.ImportOrgData = true
},
//
btnAdd() {
if (!this.peisid || this.peisid == 'null') {

2
src/store/index.js

@ -416,6 +416,7 @@ export default new Vuex.Store({
PatientRegisterForChoose: 0, // 体检人员查询窗口
OccDisease: 0, // 职业病
WebBooking: 0, // 网上预约
ImportOrgData:0, // 导入企业(青藏公司)数据
}
},
@ -436,6 +437,7 @@ export default new Vuex.Store({
OccDisease: false, // 职业病
Label: false, // 补打条码
WebBooking: false, // 网上预约
ImportOrgData:false, // 导入企业(青藏公司)数据
}
},

Loading…
Cancel
Save