pengjun 1 year ago
parent
commit
a7e023c815
  1. 132
      src/components/patientRegister/PatientRegisterEdit.vue
  2. 219
      src/components/third/ThirdMedicalCenterBookDateList.vue
  3. 178
      src/components/third/ThirdMedicalCenterEdit.vue
  4. 340
      src/components/third/thirdMedicalCenter.vue
  5. 497
      src/components/webBooking/WebBookingMzak.vue
  6. 6
      src/router/index.js
  7. 7
      src/store/index.js
  8. 3
      src/views/basic-dictionary/ThirdPartyInterfaces.vue
  9. 48
      src/views/customerOrg/customerOrgGroup.vue

132
src/components/patientRegister/PatientRegisterEdit.vue

@ -21,6 +21,9 @@
<div style="margin-left: 5px;" v-show="checkPagePriv(pagePriv.privs, '个人预约')">
<el-button type="primary" class="commonbutton" @click="btnWebBooking" style="width:70px;">个人预约</el-button>
</div>
<div style="margin-left: 5px;">
<el-button type="primary" class="commonbutton" @click="btnWebBookingMzak" style="width:70px;">人寿预约</el-button>
</div>
<div style="margin-left: 5px;" v-show="checkPagePriv(pagePriv.privs, '同步团检预约')">
<el-button type="primary" class="commonbutton" @click="btnDownOrg"
:disabled="(form.customerOrgId == dict.personOrgId) || !form.id">同步团检预约</el-button>
@ -591,6 +594,11 @@
<WebBooking />
</el-dialog>
<el-dialog title="网上预约--人寿" :visible.sync="dialogWin.WebBookingMzak" width="800px" :close-on-click-modal="false"
:append-to-body="true" :show-close="false" @close="close_dialogWin_WebBookingMzak">
<WebBookingMzak />
</el-dialog>
<!-- checkStrictly: true, expandTrigger: 'hover', -->
<el-dialog title="选择单位" :visible.sync="dialogOrg" width="800px" :close-on-click-modal="false"
:append-to-body="true">
@ -672,7 +680,7 @@ import {
birthdayToAge, ageToBirthday, deepCopy, arrayFilter, arrayReduce, parsIcCardtoLocal,
reMadeOrgTree, arrayExistObj, isValidMobileNumber
} from "../../utlis/proFunc";
import { getTreePids,madeTree } from "../../utlis/tree";
import { getTreePids, madeTree } from "../../utlis/tree";
import { photoParse, savePeoplePhoto, } from "../../utlis/proApi";
import Camera from "./Camera.vue";
import PatientRegisterItem from "./PatientRegisterItem.vue";
@ -683,7 +691,7 @@ import Charge from "../../views/charge/charge.vue";
import PatientRegisterEditQuery from "../../components/patientRegister/PatientRegisterEditQuery.vue";
import OccDisease from "../../components/occDisease/OccDisease.vue"
import WebBooking from "../../components/webBooking/WebBooking.vue"
import WebBookingMzak from "../../components/webBooking/WebBookingMzak.vue"
import PatientLisRequest from "../../components/patientRegister/PatientLisRequest.vue";
import PatientPacsRequest from "../../components/patientRegister/PatientPacsRequest.vue";
import Queue from "../../components/queue/Queue.vue";
@ -700,7 +708,7 @@ export default {
OccDisease,
PatientLisRequest,
PatientPacsRequest,
WebBooking,
WebBooking, WebBookingMzak,
Queue
},
// isDoctor: '0:/1:()'
@ -877,7 +885,7 @@ export default {
thirdInterfaceId: '', //
queueParams: {}, //
};
},
@ -1115,16 +1123,16 @@ export default {
}
},
changeChooseOrgId(v){
changeChooseOrgId(v) {
let parentId = null
if(v){
if (v) {
parentId = v[v.length - 1]
//
let lfind = arrayExistObj(this.patientRegister.customerOrgs,'parentId',parentId)
if(lfind > -1) return
lfind = arrayExistObj(this.patientRegister.customerOrgs,'id',parentId)
if(lfind > -1 && this.patientRegister.customerOrgs[lfind].isChild == 'N') return
}else{
let lfind = arrayExistObj(this.patientRegister.customerOrgs, 'parentId', parentId)
if (lfind > -1) return
lfind = arrayExistObj(this.patientRegister.customerOrgs, 'id', parentId)
if (lfind > -1 && this.patientRegister.customerOrgs[lfind].isChild == 'N') return
} else {
return
}
@ -1146,7 +1154,7 @@ export default {
this.patientRegister.customerOrgs.push(e)
}
});
this.patientRegister.customerOrgTreeAll = madeTree(this.patientRegister.customerOrgs,'treeChildren','parentId','id',null)
this.patientRegister.customerOrgTreeAll = madeTree(this.patientRegister.customerOrgs, 'treeChildren', 'parentId', 'id', null)
// console.log('this.patientRegister.customerOrgTreeAll', this.patientRegister.customerOrgTreeAll)
resolve(treeData)
}
@ -1391,7 +1399,7 @@ export default {
patientRegisterId: row.id
}
this.dialogWin.queue = true
this.dataTransOpts.plus.queue++
this.dataTransOpts.plus.queue++
},
//
@ -2236,7 +2244,7 @@ export default {
.finally(() => {
this.printing = false
})
} else if (this.LocalConfig.patientRegister.printGuideLabel.indexOf('patient') > -1 && this.LocalConfig.patientRegister.printGuideLabel.indexOf('lis') > -1 ) {
} else if (this.LocalConfig.patientRegister.printGuideLabel.indexOf('patient') > -1 && this.LocalConfig.patientRegister.printGuideLabel.indexOf('lis') > -1) {
this.guidePrintEasy('0008', isPreview, toOutShell)
.then(res => {
return this.lisPrint('0002', isPreview, toOutShell)
@ -2289,7 +2297,7 @@ export default {
.finally(() => {
this.printing = false
})
} else if (this.LocalConfig.patientRegister.printGuideLabel.indexOf('lis') > -1) {
} else if (this.LocalConfig.patientRegister.printGuideLabel.indexOf('lis') > -1) {
this.lisPrint('0002', isPreview, toOutShell)
.then(res => {
resolve(res)
@ -2356,7 +2364,7 @@ export default {
this.patientRegister.prList[lfind].guidePrintTimes = 1;
}
}
resolve(res)
resolve(res)
} else {
reject(res.message)
}
@ -2639,10 +2647,10 @@ export default {
let e = this.dataTransOpts.tableM.register_check_asbitem[i];
if (e.isCharge == 'Y' || e.checkCompleteFlag != '0') {
continue
} else {
} else {
// this.occAsbitems
lfind = arrayExistObj(this.occAsbitems, 'id', e.asbitemId)
if(lfind == -1) this.dataTransOpts.tableM.register_check_asbitem.splice(i, 1)
if (lfind == -1) this.dataTransOpts.tableM.register_check_asbitem.splice(i, 1)
}
}
@ -2712,6 +2720,19 @@ export default {
this.dialogWin.WebBooking = true
},
//
btnWebBookingMzak() {
this.dataTransOpts.tableS.appoint_patient_register = {}
this.dataTransOpts.tableM.appoint_register_asbitem = []
this.dataTransOpts.tableS.appoint_patient_register = {}
this.dataTransOpts.tableM.appoint_register_asbitem = []
this.dataTransOpts.plus.WebBookingMzak++
this.dialogWin.WebBookingMzak = true
},
//
async close_dialogWin_WebBooking() {
// console.log('this.dataTransOpts.tableS.appoint_patient_register',this.dataTransOpts.tableS.appoint_patient_register)
@ -2794,6 +2815,81 @@ export default {
this.changeIdNo() //
},
// --寿
async close_dialogWin_WebBookingMzak() {
// console.log('this.dataTransOpts.tableS.appoint_patient_register',this.dataTransOpts.tableS.appoint_patient_register)
// console.log('this.dataTransOpts.tableM.appoint_register_asbitem',this.dataTransOpts.tableM.appoint_register_asbitem)
//
let appoint_patient_register = this.dataTransOpts.tableS.appoint_patient_register
if (!appoint_patient_register.appointPatientRegisterId) return
await this.initFormData(this.dataTransOpts.tableS.patient_register.id)
// "appointPatientRegisterId": "string",
// "personId": "string",
// "personName": "string",
// "idNo": "string",
// "sexId": "string",
// "sexName": "string",
// "maritalStatusId": "string",
// "maritalStatusName": "string",
// "customerOrgId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
// "customerOrgName": "string",
// "childCustomerOrgName": "string",
// "customerOrgGroupId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
// "customerOrgGroupName": "string",
// "medicalPackageId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
// "medicalPackageName": "string",
// "completeFlag": "string",
// "appointDate": "2024-06-09T11:46:34.962Z",
// "remark": "string",
// "medicalCenterId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
// "customerOrgRegisterId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
// "pregnantFlag": "string",
// "pregnantFlagName": "string",
// "height": 0,
// "weight": 0
delete appoint_patient_register.medicalCenterId
Object.assign(this.form, appoint_patient_register,
{
patientName: appoint_patient_register.personName,
completeFlag: '1',
}
)
console.log('this.form', JSON.stringify(this.form))
//
// "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
// "asbitemId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
// "standardPrice": 0,
// "chargePrice": 0,
// "payTypeFlag": "string",
// "isCharge": "string",
// "amount": 0
//
// "appointRegisterAsbitemId": "00000000-0000-0000-0000-000000000000",
// "asbitemId": "3a126b34-f6f0-56a1-e899-a092874acde7",
// "asbitemName": "(",
// "itemTypeId": "3a126ac6-2fbf-ca50-82a4-73dcc5a5028b",
// "itemTypeName": "",
// "appointPatientRegisterId": "3a12ebf4-565a-dbc4-4f2d-d72cd3050cab",
// "standardPrice": 45.00,
// "chargePrice": 30.50,
// "payTypeFlag": "\u0000",
// "isCharge": "N",
// "amount": 1,
// "isInMedicalPackage": "N",
// "itemTypeDisplayOrder": 28,
// "displayOrder": 1
this.dataTransOpts.tableM.register_check_asbitem = deepCopy(this.dataTransOpts.tableM.appoint_register_asbitem)
//
if (this.form.customerOrgGroupId) this.changeCustomerOrgGroupId()
this.changeIdNo() //
},
btnLabel() {
if (!this.form.id) {
this.$message.warning({ showClose: true, message: '人员信息尚未保存!' })

219
src/components/third/ThirdMedicalCenterBookDateList.vue

@ -0,0 +1,219 @@
<template>
<div>
<div>
<div class="contenttitle">
明细记录
</div>
<!--公共表分类信息-->
<div style="display: flex; font-size: 14px">
<div :style="'display: block;width:' + (window.pageWidth - window.pageMarginWidth - 110 - 5) + 'px;'">
<el-table id="thirdMedicalCenterBookingDate" :data="thirdMedicalCenterBookingDate"
ref="thirdMedicalCenterBookingDate" row-key="id" border :height="`${tableHeight}px`" size="small"
highlight-current-row :row-class-name="handleRowClassName">
<el-table-column type="index" label="序号" width="50" align="center" />
<el-table-column label="体检中心" prop="thirdMedicalCenterId" min-width="200" align="center" />
<el-table-column prop="bookingDate" label="可约日期" min-width="130" align="center" />
</el-table>
</div>
<!--按钮-->
<div style="display: block; margin-left: 5px">
<div style="margin-top: 5px">
<el-button class="commonbutton" @click="btnSetBookDate">设置预约日期</el-button>
</div>
</div>
</div>
</div>
<!-- 新增或者编辑弹框 -->
<el-dialog title="设置可预约日期" :close-on-click-modal="false" :visible.sync="setting" width="240px"
@close="close_setting">
<div>
<el-table :data="form.bookingDates" border height="480px" size="small" highlight-current-row
:row-class-name="handleRowClassName" row-key="id">
<el-table-column label="可约日期" min-width="150" align="center">
<template slot-scope="scope">
<el-date-picker v-model="scope.row.bookingDate" type="date" placeholder="可约日期" size="small"
value-format="yyyy-MM-dd" style="width: 150px;" />
</template>
</el-table-column>
<el-table-column fixed="right" label="操作" width="60" align="center">
<template slot-scope="scope">
<i class="el-icon-delete" @click="form.bookingDates.splice(scope.$index, 1)"
style="font-size: 24px;color: red;cursor:pointer;"></i>
</template>
</el-table-column>
</el-table>
<div>
<el-button class="commonbutton" @click="form.bookingDates.push({ id: Math.random(), bookingDate: '' })">新增</el-button>
<el-button class="commonbutton" @click="btnSubmit">确定</el-button>
</div>
</div>
</el-dialog>
<!-- -->
</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: "commonTable", //
privs: [], //
},
thirdMedicalCenterBookingDate: [], //
setting: false,
form: {
thirdMedicalCenterId: "",
bookingDates: []
}
};
},
computed: {
...mapState(["pickerOptions", "personnelUnit", "window", "dict", "dialogWin", "dataTransOpts"]),
tableHeight() {
let h = this.window.pageHeight < 600 ? 600 : this.window.pageHeight
return h - this.window.pageHeaderHeight - this.window.cardHeaderHeight - this.window.pageMarginHeight - 360
},
},
created() {
//
let userPriv = window.sessionStorage.getItem("userPriv");
if (userPriv)
this.pagePriv.privs = deepCopy(getPagePriv(this.pagePriv.routeUrlorPageName));
// ID
this.dataTransOpts.tableS.third_medical_center_booking_date.id = ''
},
mounted() {
//
this.dictInit();
},
methods: {
moment,
checkPagePriv,
dddw,
deepCopy,
getList(body) {
// body = {
// "thirdMedicalCenterId": "string",
// "keyWord": "string"
// }
this.thirdMedicalCenterBookingDate = []
if (!body.thirdMedicalCenterId) return
postapi('/api/app/ThirdMedicalCenter/GetThirdMedicalCenterBookingDateList', body).then(res => {
if (res.code > -1) {
this.thirdMedicalCenterBookingDate = res.data
}
})
},
btnSubmit() {
let body = {
thirdMedicalCenterId: this.form.thirdMedicalCenterId,
bookingDates: []
}
this.form.bookingDates.forEach(e => {
if (e.bookingDate) body.bookingDates.push(e.bookingDate)
});
postapi('/api/app/ThirdMedicalCenter/CreateThirdMedicalCenterBookingDate', body)
.then(res => {
if (res.code > -1) {
this.setting = false
}
})
},
close_setting() {
this.getList({ thirdMedicalCenterId: this.dataTransOpts.tableS.third_medical_center.id })
},
//
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() {
},
btnSetBookDate() {
if (!this.dataTransOpts.tableS.third_medical_center.id) {
this.$message.warning({ showClose: true, message: '未选择体检中心' })
return
}
this.form.thirdMedicalCenterId = this.dataTransOpts.tableS.third_medical_center.id
this.form.bookingDates = deepCopy(this.thirdMedicalCenterBookingDate)
this.setting = true
}
},
//
watch: {
//
"dataTransOpts.refresh.third_medical_center_booking_date.M": {
// immediate:true,
handler(newVal, oldVal) {
console.log(`watch 公共表分类 newVal:${newVal} oldVal:${oldVal} thirdMedicalCenterId: ${this.dataTransOpts.tableS.third_medical_center.id}`);
if (newVal != oldVal) this.getList({ thirdMedicalCenterId: this.dataTransOpts.tableS.third_medical_center.id });
}
},
},
};
</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>

178
src/components/third/ThirdMedicalCenterEdit.vue

@ -0,0 +1,178 @@
<template>
<div>
<el-form :model="form" label-width="80px" :rules="rules" ref="form">
<!--
<el-row>
<el-col :span="24">
<el-form-item prop="id" label="编号">
<el-input v-model="form.id" size="small" :disabled="editType == 'update'" />
</el-form-item>
</el-col>
</el-row>
-->
<el-row>
<el-col :span="24">
<el-form-item prop="displayName" label="体检中心">
<el-input v-model="form.displayName" size="small" />
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<el-form-item prop="customerOrgGroupId" label="分组">
<el-select v-model="form.customerOrgGroupId" placeholder="请选择" filterable style="width: 500px" size="small">
<el-option v-for="item in customerOrgGroups" :key="item.id" :label="item.displayName" :value="item.id">
</el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
</el-form>
<div style="display: flex;margin-top: 15px;justify-content:space-between;">
<div></div>
<div style="display: flex;">
<el-button class="commonbutton" @click="dialogWin.ThirdMedicalCenterEdit = false">关闭</el-button>
<!--
<el-button type="success" @click="computePrice">同比折算组合项目价格</el-button>
-->
<el-button class="commonbutton" type="primary" @click="onSubmit('form')">确定</el-button>
</div>
</div>
</div>
</template>
<script>
import moment from "moment";
import { getapi, postapi, putapi, deletapi } from "@/api/api";
import { mapState } from "vuex";
import {
dddw,
deepCopy,
objCopy,
arrayExistObj,
} from "../../utlis/proFunc";
export default {
components: {
},
props: ["params"],
data() {
return {
form: {
id: "",
displayName: "",
customerOrgGroupId:"",
},
editType: 'insert', // update
formOri: {}, //
formInit: {}, //
rules: {
customerOrgGroupId: [{ required: true, message: "请填写分组", trigger: "blur" }],
displayName: [{ required: true, message: "请填写体检中心", trigger: "blur" }],
},
customerOrgGroups:[]
};
},
computed: {
...mapState(["dict", "dialogWin", "dataTransOpts"]),
},
created() {
this.formInit = deepCopy(this.form);
},
mounted() {
//
this.dictInit();
this.getFormData(this.params.id);
},
methods: {
moment, dddw, deepCopy,
//
dictInit() {
//
postapi("/api/app/CustomerOrgGroup/GetBasicList").then((res) => {
if (res.code != -1) {
this.customerOrgGroups = res.data;
}
});
},
//
getFormData(id) {
if (id) {
postapi('/api/app/ThirdMedicalCenter/Get', { thirdMedicalCenterId: id })
.then(res => {
if (res.code != -1) {
this.formOri = deepCopy(res.data)
this.form = deepCopy(res.data)
}
})
this.editType = 'update'
} else {
console.log('this.formInit', this.formInit)
this.form = deepCopy(this.formInit)
this.editType = 'insert'
}
},
onSubmit(formName) {
this.$refs[formName].validate((valid, fields) => {
if (!valid) {
this.$message.warning(fields[Object.keys(fields)[0]][0].message);
return false;
}
let url = '/api/app/ThirdMedicalCenter/Create'
let body = deepCopy(this.form);
body.thirdMedicalCenterId = body.id
if (this.editType == 'update') {
url = '/api/app/ThirdMedicalCenter/Update'
}
//
postapi(url, body)
.then(res => {
if (res.code != -1) {
console.log("操作成功!");
this.dataTransOpts.tableS.third_medical_center.id = res.data.id
this.dialogWin.ThirdMedicalCenterEdit = false;
}
});
});
},
},
//
watch: {
// ID
"dataTransOpts.refresh.third_medical_center.S": {
// immediate: true,
handler(newVal, oldVal) {
console.log(`watch 体检分组 newVal:${newVal} oldVal:${oldVal} this.params.id: ${this.params.id}`);
if(newVal != oldVal) this.getFormData(this.params.id);
}
},
},
};
</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>

340
src/components/third/thirdMedicalCenter.vue

@ -0,0 +1,340 @@
<template>
<div>
<div>
<div class="contenttitle">
基础资料 /<span class="contenttitleBold">第三方体检中心</span>
</div>
<!--公共表分类信息-->
<div style="display: flex; font-size: 14px">
<div :style="'display: block;width:' + (window.pageWidth - window.pageMarginWidth - 110 - 5) + 'px;'">
<el-table :data="thirdMedicalCenters" ref="thirdMedicalCenters" row-key="id" border height="340px" size="small"
highlight-current-row :row-class-name="handleRowClassName" @row-click="rowClick">
<el-table-column type="index" label="序号" width="50" align="center" />
<el-table-column label="编号" prop="id" min-width="200" align="center" />
<el-table-column prop="displayName" label="第三方体检中心" min-width="150" />
<el-table-column prop="customerOrgGroupId" label="分组" min-width="150">
<template slot-scope="scope">
{{ dddw(customerOrgGroups,'id',scope.row.customerOrgGroupId,'displayName') }}
</template>
</el-table-column>
<el-table-column prop="creatorName" label="创建者" min-width="80" align="center" />
<el-table-column label="创建时间" min-width="150" align="center">
<template slot-scope="scope">
{{ scope.row.creationTime ? moment(scope.row.creationTime).format("yyyy-MM-DD HH:mm:ss") : "" }}
</template>
</el-table-column>
<el-table-column prop="lastModifierName" label="修改者" min-width="80" align="center" />
<el-table-column label="修改时间" min-width="150" align="center">
<template slot-scope="scope">
{{ scope.row.lastModificationTime ? moment(scope.row.lastModificationTime).format("yyyy-MM-DD HH:mm:ss")
: "" }}
</template>
</el-table-column>
<el-table-column label="操作" align="center">
<template>
<el-tag class="move" style="
cursor: move;
background-color: rgb(245, 245, 245);
border: none;
" draggable="true">
<i class="el-icon-d-caret" style="width: 1rem; height: 1rem; color: rgb(113, 113, 113)"></i>
</el-tag>
</template>
</el-table-column>
</el-table>
</div>
<!--按钮-->
<div style="display: block; margin-left: 5px">
<div style="margin-top: 5px">
<el-button class="commonbutton" @click="btnAdd('')">新增</el-button>
</div>
<div style="margin-top: 5px">
<el-button class="commonbutton" @click="btnEdit">编辑</el-button>
</div>
<div style="margin-top: 5px">
<el-button class="deleteButton" @click="btnDel">删除</el-button>
</div>
<div style="margin-top: 5px">
<el-button class="commonbutton" @click="btnSetTopOrBottom(1)">置顶</el-button>
</div>
<div style="margin-top: 5px">
<el-button class="commonbutton" @click="btnSetTopOrBottom(2)">置底</el-button>
</div>
<div style="margin-top: 5px">
<el-button class="commonbutton" @click="btnSort" :disabled="!isDrag">保存排序</el-button>
</div>
</div>
</div>
<!--可预约信息 -->
<div>
<ThirdMedicalCenterBookDateList :thirdMedicalCenter="curThirdMedicalCenter" />
</div>
</div>
<!-- 新增或者编辑弹框 -->
<el-dialog :title="dataTransOpts.tableS.third_medical_center.id ? '编辑' : '新增'" :close-on-click-modal="false"
:visible.sync="dialogWin.ThirdMedicalCenterEdit" width="600px" @close="close_dialogWinThirdMedicalCenterEdit">
<ThirdMedicalCenterEdit :params="ThirdMedicalCenterEditParams" />
</el-dialog>
<!-- -->
</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";
import ThirdMedicalCenterBookDateList from "./ThirdMedicalCenterBookDateList.vue";
import ThirdMedicalCenterEdit from "./ThirdMedicalCenterEdit.vue";
export default {
components: {
ThirdMedicalCenterBookDateList, ThirdMedicalCenterEdit
},
data() {
return {
pagePriv: {
routeUrlorPageName: "thirdMedicalCenter", //
privs: [], //
},
thirdMedicalCenters: [], //
curThirdMedicalCenter: {}, //
ThirdMedicalCenterEditParams: {}, //
isDrag: false,
customerOrgGroups:[]
};
},
computed: {
...mapState(["personnelUnit", "window", "dict", "dialogWin", "dataTransOpts"]),
},
created() {
//
let userPriv = window.sessionStorage.getItem("userPriv");
if (userPriv)
this.pagePriv.privs = deepCopy(getPagePriv(this.pagePriv.routeUrlorPageName));
// ID
this.dataTransOpts.tableS.third_medical_center.id = ''
this.rowDrop();
},
mounted() {
//
this.dictInit();
},
methods: {
moment,
checkPagePriv,
dddw,
deepCopy,
//
btnSort() {
let result = [];
this.thirdMedicalCenters.forEach((item, index) => {
result.push({ id: item.id, displayOrder: index });
});
postapi("/api/app/ThirdMedicalCenter/UpdateSortMany", {
itemList: result,
}).then((res) => {
console.log("操作成功");
this.isDrag = false;
});
},
//Sortable
rowDrop() {
this.$nextTick(() => {
const el = document.querySelector(".el-table__body-wrapper tbody");
//console.log('el0',el)
const that = this;
Sortable.create(el, {
handle: ".move",
animation: 300,
//
onEnd({ newIndex, oldIndex }) {
that.isDrag = true;
const currRow = that.thirdMedicalCenters.splice(oldIndex, 1)[0];
that.thirdMedicalCenters.splice(newIndex, 0, currRow);
console.log("el", el);
},
});
});
},
//
btnSetTopOrBottom(sortType) {
if (!this.dataTransOpts.tableS.third_medical_center.id) {
this.$message.warning("请选择操作的数据");
return;
}
let lfind = arrayExistObj(this.thirdMedicalCenters, "id", this.dataTransOpts.tableS.third_medical_center.id);
let currentRow = {};
// ?id=${this.dataTransOpts.tableS.third_medical_center.id}&SortType=2`
postapi('/api/app/ThirdMedicalCenter/UpdateManySort', { thirdMedicalCenterId: this.dataTransOpts.tableS.third_medical_center.id, sortType }
).then((res) => {
console.log("操作成功");
currentRow = this.thirdMedicalCenters.splice(lfind, 1)[0]; //
if (sortType == 2) {
this.thirdMedicalCenters.push(currentRow);
} else {
this.thirdMedicalCenters.unshift(currentRow);
}
this.$refs["thirdMedicalCenters"].setCurrentRow(currentRow);
});
},
//
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() {
//
postapi("/api/app/CustomerOrgGroup/GetBasicList").then((res) => {
if (res.code != -1) {
this.customerOrgGroups = res.data;
}
});
postapi("/api/app/ThirdMedicalCenter/GetList").then((res) => {
if (res.code != -1) {
this.thirdMedicalCenters = res.data;
}
});
},
//
rowClick(row) {
this.dataTransOpts.tableS.third_medical_center.id = row.id
this.curThirdMedicalCenter = row;
this.dataTransOpts.refresh.third_medical_center_booking_date.M++;
},
// (id)
btnAdd(id) {
if (!id) this.dataTransOpts.tableS.third_medical_center.id = ''
if (!id) this.dataTransOpts.refresh.common_table.M++; //
this.ThirdMedicalCenterEditParams = {
id
}
this.dataTransOpts.refresh.third_medical_center.S++
this.dialogWin.ThirdMedicalCenterEdit = true;
},
//
btnEdit() {
if (!this.dataTransOpts.tableS.third_medical_center.id) {
this.$message.warning("请先选择分类记录");
return;
}
this.btnAdd(this.dataTransOpts.tableS.third_medical_center.id)
},
//
btnDel() {
if (!this.dataTransOpts.tableS.third_medical_center.id) {
this.$message.warning("请选择需要操作的数据");
return;
}
this.$confirm("此操作将永久删除该记录, 是否继续?", "提示", {
confirmButtonText: "是",
cancelButtonText: " 否 ",
type: "warning",
})
.then(() => {
return postapi('/api/app/ThirdMedicalCenter/Delete', { thirdMedicalCenterId: this.dataTransOpts.tableS.third_medical_center.id });
})
.then((res) => {
if (res.code != -1) {
console.log("删除成功");
let lfind = arrayExistObj(this.thirdMedicalCenters, "id", this.dataTransOpts.tableS.third_medical_center.id);
if (lfind > -1) this.thirdMedicalCenters.splice(lfind, 1);
this.dataTransOpts.tableS.third_medical_center.id = ''
this.dataTransOpts.refresh.common_table.M++
}
})
.catch((err) => {
if (err == "cancel") {
console.log("已取消删除");
// this.$message.info("");
}
});
},
// /
close_dialogWinThirdMedicalCenterEdit() {
let id = this.dataTransOpts.tableS.third_medical_center.id
if (id) {
//
postapi('/api/app/ThirdMedicalCenter/Get', { thirdMedicalCenterId: id })
.then(res => {
if (res.code > -1) {
let lfind = arrayExistObj(this.thirdMedicalCenters, 'id', id)
if (lfind > -1) {
objCopy(res.data, this.thirdMedicalCenters[lfind])
} else {
lfind = this.thirdMedicalCenters.length
this.thirdMedicalCenters.push(res.data)
}
//
this.$refs["thirdMedicalCenters"].setCurrentRow(); //
this.$refs["thirdMedicalCenters"].setCurrentRow(this.thirdMedicalCenters[lfind]);
// common_table
this.curThirdMedicalCenter = deepCopy(res.data);
}
})
} else {
//
this.dataTransOpts.tableS.third_medical_center.id = this.curThirdMedicalCenter.id || ''
}
this.dataTransOpts.refresh.common_table.M++;
},
},
};
</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>

497
src/components/webBooking/WebBookingMzak.vue

@ -0,0 +1,497 @@
<template>
<div style="margin-top: -15px;">
<div style="display: flex;justify-content: space-between;">
<div
style="display: flex;flex-wrap: wrap;background-color: #fff;border-radius: 8px;align-items: center;padding: 2px;width:700px;">
<div class="query">
<!--
<el-select v-model="query.thirdInterfaceId" placeholder="请选择" style="width: 100px" size="small">
<el-option v-for="item in thirdInterfaces" :key="item.id" :label="item.displayName" :value="item.id" />
</el-select>
-->
<el-date-picker v-model="query.startDate" type="date" placeholder="起始日期" size="small"
style="width:90px;" value-format="yyyy-MM-dd" :picker-options="pickerOptions" />
<span class="spanClass"></span>
<el-date-picker v-model="query.endDate" type="date" placeholder="截止日期" size="small"
style="width:90px;" value-format="yyyy-MM-dd" :picker-options="pickerOptions" />
</div>
<div class="query">
<span class="spanClass">检索关键字</span>
<el-input placeholder="姓名、电话、身份证号" v-model="query.keyWord" size="small" clearable style="width: 240px" />
</div>
<div class="query">
<span class="spanClass">状态</span>
<el-select v-model="query.medicalStatus" placeholder="请选择" clearable style="width: 80px" size="small">
<el-option v-for="item in localDict.medicalStatus" :key="item.value" :label="item.label" :value="item.value">
</el-option>
</el-select>
</div>
</div>
<div style="margin-top: -38px;width: 80px;">
<div>
<el-button @click="peopleIcCard" class="commonbutton" style="width:80px;font-size: 14px;">读身份证</el-button>
</div>
<div>
<el-button class="commonbutton" @click="btnQuery" style="margin-top: 6px; width:80px;">查询</el-button>
</div>
</div>
</div>
<div>
<el-table :data="tableData" border style="width: 100%" row-key="id" height="430" highlight-current-row
size="small" @row-click="rowClick" ref="webBooking">
<el-table-column label="姓名" width="80" prop="patientName" align="center" />
<el-table-column label="身份证号" width="150" prop="idNo" align="center" />
<el-table-column label="预约时间" width="150" prop="bookingDate" align="center" />
<el-table-column label="手机号" width="130" prop="phone" align="center" />
<el-table-column label="性别" width="40" prop="sexId" align="center" />
<el-table-column label="年龄" width="40" prop="age" align="center" />
<el-table-column label="单位" width="150" prop="customerOrgId" align="center" />
<el-table-column label="单位体检次数" width="150" prop="customerOrgRegisterId" align="center" />
<el-table-column label="分组/套餐" width="120" prop="customerOrgGroupId" align="center">
<template slot-scope="scope">
<div>{{ scope.row.customerOrgGroupId ? scope.row.customerOrgGroupId : scope.row.medicalPackageName }}
</div>
</template>
</el-table-column>
<el-table-column label="预约编号" width="120" prop="thirdBookingId" align="center" />
<el-table-column label="状态" width="50" prop="medicalStatus" align="center" >
<template slot-scope="scope">
{{ dddw(localDict.medicalStatus,'value',scope.row.medicalStatus,'label') }}
</template>
</el-table-column>
</el-table>
</div>
<div style="margin-top: 10px; display: flex;justify-content: space-between;">
<div style="margin: -8px 0 0 0; font-size: 12px;">
{{ asbDesc }}
</div>
<div>
<el-button v-if="false" @click="btnTest">测试</el-button>
</div>
<div>
<el-button class="commonbutton" @click="btnOk">确定</el-button>
<el-button class="commonbutton" @click="btnClose">关闭</el-button>
</div>
</div>
</div>
</template>
<script>
import { mapState } from "vuex";
import { getapi, postapi, putapi, deletapi } from "@/api/api";
import { dddw, deepCopy } from "../../utlis/proFunc";
import moment from "moment";
export default {
components: {
},
data() {
return {
thirdInterfaces: [],
tableData: [],
currRowData: {},
tableDataDetails: [],
query: {
thirdInterfaceId: "",
idNo: "",
mobilePhone: "",
appointStartDate: "",
appointStopDate: "",
completeFlag: "0",
keyWord:'',
startDate:'',
endDate:'',
medicalStatus:'0'
},
asbDesc: '', //
localDict:{
medicalStatus:[
{label:'未开始',value:'0'}, // 0 1 2
{label:'已登记',value:'1'},
{label:'已完成',value:'2'},
]
}
};
},
created() {
let today = moment(new Date()).format("yyyy-MM-DD")
this.query.endDate = today
this.query.startDate = today
},
updated() {
// this.$nextTick(() => {
// this.$refs['webBookingDetaills'].doLayout()
// })
},
//
mounted() {
//
this.enterToQuery()
this.funMounted()
},
computed: {
...mapState([
"pickerOptions",
"window",
"dict",
"dataTransOpts",
"dialogWin"
]),
},
methods: {
dddw,
funMounted() {
this.dictInit()
// .then(res => {
// //this.btnQuery()
// })
},
//
dictInit() {
// return new Promise((resolve, reject) => {
// let curDate = moment(new Date()).format('YYYY-MM-DD')
// this.query.appointStartDate = curDate
// this.query.appointStopDate = moment(Date.now() + 3600 * 1000 * 24 * 7).format('YYYY-MM-DD')
// this.query.idNo = ''
// this.query.mobilePhone = ''
// this.tableData = []
// this.tableDataDetails = []
// // 07
// postapi("/api/app/ThirdInterface/GetListByThirdInterfaceTypeAsync", { thirdInterfaceType: "07" })
// .then(res => {
// if (res.code > -1) {
// this.thirdInterfaces = res.data
// if (res.data && Array.isArray(res.data) && res.data.length > 0) this.query.thirdInterfaceId = res.data[0].id
// resolve(res)
// } else {
// reject(res.message)
// }
// })
// .catch(err => {
// reject(err)
// })
// })
},
//
peopleIcCard() {
if (!this.$peisAPI) {
this.$message.info({ showClose: true, message: "此功能,需要在壳客户端才可运行!" })
return
}
this.$peisAPI.peopleIcCard().then(res => {
// console.log('peopleIcCard', res)
let lres = JSON.parse(res)
if (lres.code >= -1) {
let idNos = parsIcCardtoLocal(lres.data, this.dict.sex, this.dict.nation)
this.query.idNo = idNos.IDCode
this.query.keyWord = idNos.IDCode
// this.form.patientName = idNos.Name
// this.form.birthDate = idNos.birthDate
// this.form.sexId = idNos.sexId
// this.form.age = idNos.age
// this.form.nationId = idNos.nationId
// this.form.idNo = idNos.IDCode
// this.form.address = idNos.Address
// this.peoplePhoto = 'data:image/bmp;base64,' + idNos.Photo
// this.patientRegister.photo = 'data:image/bmp;base64,' + idNos.Photo
this.btnQuery()
} else {
this.$message.error({ showClose: true, message: `${lres.message}` })
}
})
},
//
btnQuery() {
// if (!(this.query.appointStartDate && this.query.appointStopDate)) {
// this.$message.error({ showClose: true, message: "" })
// return
// }
// if (!(this.query.idNo || this.query.mobilePhone)) {
// this.$message.error({ showClose: true, message: "" })
// return
// }
if (!(this.query.startDate && this.query.endDate)) {
this.$message.error({ showClose: true, message: "必须选择日期段!" })
return
}
this.currRowData = {}
this.tableData = []
this.tableDataDetails = []
let body = deepCopy(this.query)
// body.appointStartDate = this.query.appointStartDate + " 00:00:00"
// body.appointStopDate = this.query.appointStopDate + " 23:59:59"
body.startDate = this.query.startDate + " 00:00:00"
body.endDate = this.query.endDate + " 23:59:59"
postapi('/api/app/ThirdBooking/GetThirdBookingList', body)
.then(res => {
if (res.code > -1) {
this.tableData = res.data
if (res.data && Array.isArray(res.data) && res.data.length == 1) {
this.rowClick(res.data[0])
this.$refs['webBooking'].setCurrentRow(res.data[0]);
}
}
})
},
btnTest() {
console.log('this.thirdInterfaces', this.thirdInterfaces)
console.log('this.tableData', this.tableData)
console.log('this.currRowData', this.currRowData)
console.log('this.tableDataDetails', this.tableDataDetails)
console.log('this.query', this.query)
},
rowClick(row) {
this.currRowData = row
// this.tableDataDetails = []
// postapi('/api/app/AppointPatientRegister/GetAppointRegisterAsbitemListById', {
// thirdInterFaceId: this.query.thirdInterfaceId,
// appointPatientRegisterId: row.appointPatientRegisterId
// }).then(res => {
// if (res.code > -1) {
// res.data.forEach(e => {
// e.discount = e.standardPrice == 0 ? 100: Math.floor(e.chargePrice * 10000/e.standardPrice)/100
// if(!e.isBelongGroupPackage){
// e.isBelongGroupPackage = e.isInMedicalPackage
// }
// // e.standTotal = e.amount * e.standardPrice
// e.total = e.amount * e.chargePrice
// });
// this.tableDataDetails = res.data
// }
// })
},
//
btnOk() {
// if (!this.currRowData.appointPatientRegisterId) {
// this.$message.warning({ showClose: true, message: "" })
// return
// }
if (!this.currRowData.thirdBookingId) {
this.$message.warning({ showClose: true, message: "请选择预约的记录" })
return
}
this.dataTransOpts.tableS.appoint_patient_register = this.dataTrans(this.currRowData)
// this.dataTransOpts.tableM.appoint_register_asbitem = deepCopy(this.tableDataDetails)
this.dialogWin.WebBookingMzak = false
},
dataTrans(curRow){
// { //
// "appointPatientRegisterId": "string",
// "personId": "string",
// "personName": "string",
// "idNo": "string",
// "mobileTelephone": "string",
// "sexId": "string",
// "sexName": "string",
// "maritalStatusId": "string",
// "maritalStatusName": "string",
// "customerOrgId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
// "customerOrgName": "string",
// "childCustomerOrgName": "string",
// "customerOrgGroupId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
// "customerOrgGroupName": "string",
// "medicalPackageId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
// "medicalPackageName": "string",
// "completeFlag": "string",
// "appointDate": "2024-09-27T08:53:32.520Z",
// "remark": "string",
// "medicalCenterId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
// "customerOrgRegisterId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
// "pregnantFlag": "string",
// "pregnantFlagName": "string",
// "height": 0,
// "weight": 0
// }
// { // 寿
// "thirdBookingId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
// "patientName": "string",
// "customerOrgGroupId": "string",
// "idNo": "string",
// "sexId": "string",
// "age": 0,
// "bookingDate": "2024-09-27T08:53:32.306Z",
// "phone": "string",
// "medicalStatus": "string",
// "customerOrgRegisterId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
// "customerOrgId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
// }
let ret = Object.assign({},curRow,{
appointPatientRegisterId:curRow.thirdBookingId,
mobileTelephone:curRow.phone,
personName:curRow.patientName
})
return ret
},
//
btnClose() {
this.dataTransOpts.tableS.appoint_patient_register = {}
this.dataTransOpts.tableM.appoint_register_asbitem = []
this.dialogWin.WebBookingMzak = false
},
//
getSummaries(param) {
const { columns, data } = param;
const sumCol = [6] //
const sums = [];
let count = this.tableDataDetails.length
let pack = this.tableDataDetails.filter(e => { return e.isBelongGroupPackage == 'Y' }).length
this.asbDesc = `共选 ${count} 个项目,其中套餐/分组 ${pack} 个,加做 ${count - pack}`
columns.forEach((column, index) => {
//console.log('column, index,data',column, index,data)
//
if (index == 1) {
sums[index] = `合计`;
return;
}
//
if (sumCol.indexOf(index) == -1) {
sums[index] = '';
return;
}
sums[index] = 0
data.forEach(e => {
if (!isNaN(e[column.property])) {
if (index == 1) {
sums[index] += e[column.property] * e['amount']
} else {
sums[index] += e[column.property]
}
}
})
sums[index] = Math.round(sums[index] * 100) / 100 //+ ' ';
// const values = data.map(item => Number(item[column.property]));
// if (!values.every(value => isNaN(value))) {
// sums[index] = values.reduce((prev, curr) => {
// const value = Number(curr);
// if (!isNaN(value)) {
// //return prev + curr; //
// return prev + curr; //
// } else {
// return prev;
// }
// }, 0);
// sums[index] = sums[index].toFixed(2) + ' ';
// } else {
// sums[index] = 'N/A';
// }
});
this.totalStand = sums[1];
//console.log('this.totalFoucs/this.discountFoucs',this.totalFoucs,this.discountFoucs)
if (!this.totalFoucs) this.total = sums[5];
if (!this.discountFoucs) this.discount = Math.round(this.total * 10000 / this.totalStand) / 100;
return sums;
},
//
enterToQuery() {
// console.log('enterToTab');
this.$nextTick(() => {
let inputs = document.querySelectorAll(["input"]); // //.inline-input
//
inputs.forEach((input, i) => {
// console.log('input',input);
input.addEventListener('keydown', (event) => {
if (event.keyCode === 13) {
//
event.preventDefault();
//
// console.log(input.getAttribute('placeholder'),input.value)
let placeholder = input.getAttribute('placeholder')
switch (placeholder) {
case '预约手机号':
case '身份证号':
case '姓名、电话、身份证号':
this.btnQuery()
input.select()
break;
}
}
});
input.addEventListener('click', (event) => {
let placeholder = input.getAttribute('placeholder')
switch (placeholder) {
case '预约手机号':
case '身份证号':
case '姓名、电话、身份证号':
input.select()
break;
}
});
});
});
},
},
//()
watch: {
"dataTransOpts.plus.WebBookingMzak": {
// immediate:true,
handler(newVal, oldVal) {
console.log(`watch dataTransOpts.plus.WebBookingMzak newVal: ${newVal}, oldVal: ${oldVal} `);
if (newVal != oldVal) this.funMounted()
}
},
},
};
</script>
<style scoped>
@import '../../assets/css/global_card.css';
@import '../../assets/css/global_input.css';
@import '../../assets/css/global_table.css';
@import '../../assets/css/global.css';
.query {
margin-right: 10px;
font-size: 14px;
color: #232748;
font-weight: 400;
font-family: "NotoSansSC-Regular";
}
.spanClass {
font-size: 14px;
padding: 0 2px 0 0;
}
</style>

6
src/router/index.js

@ -230,6 +230,12 @@ const routes = [{
component: () =>
import ("../components/commonTable/commonTableType.vue"),
},
{
path: "/thirdMedicalCenter",
name: '第三方体检中心',
component: () =>
import ("../components/third/thirdMedicalCenter.vue"),
},
{
path: "/summary-items",
name: '汇总项目类别',

7
src/store/index.js

@ -429,6 +429,8 @@ export default new Vuex.Store({
room_detail: { S: 0, M: 0 }, // 房间关联的组合项目
common_table: { S: 0, M: 0 }, // 公共表
common_table_type: { S: 0, M: 0 }, // 公共表
third_medical_center: { S: 0, M: 0 }, // 公共表
third_medical_center_booking_date: { S: 0, M: 0 }, // 公共表
},
//表当前数据(单条记录 S--single)
@ -468,6 +470,8 @@ export default new Vuex.Store({
room_detail: { id: '' }, // 房间关联组合项目
common_table: { id: '' }, // 公共表
common_table_type: { id: '' }, // 公共表
third_medical_center: { id: '' }, // 公共表
third_medical_center_booking_date: { id: '' }, // 公共表
},
//表当前数据(多条记录 M--more)
tableM: {
@ -509,6 +513,7 @@ export default new Vuex.Store({
PatientRegisterForChoose: 0, // 体检人员查询窗口
OccDisease: 0, // 职业病
WebBooking: 0, // 网上预约
WebBookingMzak: 0, // 人寿预约
ImportOrgData: 0, // 导入企业(青藏公司)数据
queue: 0, // 排队信息
}
@ -532,6 +537,7 @@ export default new Vuex.Store({
OccDisease: false, // 职业病
Label: false, // 补打条码
WebBooking: false, // 网上预约
WebBookingMzak: false, // 网上预约--人寿
ImportOrgData: false, // 导入企业(青藏公司)数据
RoomEdit: false, //房间
queue: false, // 排队信息
@ -539,6 +545,7 @@ export default new Vuex.Store({
CommonTableTypeEdit: false, //公共表类别
CommonTableEdit: false, //公共表
PacsTemplate: false, // pacs结果模版
ThirdMedicalCenterEdit:false,
}
},

3
src/views/basic-dictionary/ThirdPartyInterfaces.vue

@ -395,6 +395,9 @@ export default {
},{
id:"11",
displayName:"危急值短信推送"
},{
id:"12",
displayName:"第三方预约对接"
}]
}
},

48
src/views/customerOrg/customerOrgGroup.vue

@ -30,7 +30,7 @@
<div>
<el-table :data="customerOrgGroups" ref="customerOrgGroups" style="margin-top: 2px" row-key="id" border
height="240px" size="small" highlight-current-row :row-class-name="handleRowClassName"
@row-click="rowClick">
@row-click="rowClick" id="customerOrgGroups">
<el-table-column type="index" label="序号" width="50" align="center" />
<el-table-column label="id" prop="id" min-width="200" align="center" />
<el-table-column prop="displayName" label="名称" min-width="150" />
@ -96,6 +96,9 @@
<div v-show="checkPagePriv(pagePriv.privs, '保存排序')" style="margin-top: 5px">
<el-button class="commonbutton" @click="btnSort" :disabled="!isDrag">保存排序</el-button>
</div>
<div style="margin-top: 5px">
<el-button class="commonbutton" @click="btnExport('customerOrgGroups')">导出分组</el-button>
</div>
</div>
</div>
@ -115,6 +118,7 @@
</template>
<script>
import moment from "moment";
import FileSaver from 'file-saver';
import Sortable from "sortablejs";
import { getapi, postapi, putapi, deletapi } from "@/api/api";
import { mapState } from "vuex";
@ -237,6 +241,48 @@ export default {
});
},
//
btnExport(elId) {
// HTML
// let table = document.getElementById(elId); //.cloneNode(true)
this.$nextTick(() => {
// let refsTable = this.$refs[elId] //.cloneNode(true) true
let table = document.getElementById(elId)
// console.log('table,refsTable', table, refsTable)
let tableData = table.innerHTML
let fileName = moment(new Date()).format('yyyyMMDDHHmmss')
let blob = new Blob([tableData], { type: "text/plain;charset=utf-8" });
FileSaver.saveAs(blob, fileName + '.xls');
//
// 使html2canvasHTML
// let cloneTable = table.cloneNode(true) //[elId]
/*
html2canvas(table).then(canvas => {
// a
const link = document.createElement('a');
link.href = canvas.toDataURL('image/jpeg');
link.download = fileName + '.jpg';
document.body.appendChild(link);
link.click();
//document.body.removeChild(link);
// // PDF
// var pdf = new jsPDF();
// // PDF
// pdf.addImage(canvas.toDataURL('image/png'), 'PNG', 0, 0, canvas.width, canvas.height);
// // PDF
// pdf.save('.pdf');
});
*/
})
},
//Sortable
rowDrop() {
// this.$nextTick(() => {

Loading…
Cancel
Save