4 changed files with 318 additions and 14 deletions
-
17src/components/patientRegister/PatientRegisterEdit.vue
-
286src/components/webBooking/WebBooking.vue
-
2src/store/index.js
-
23vue.config.js
@ -0,0 +1,286 @@ |
|||
<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.appointStartDate" 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.appointStopDate" 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.mobilePhone" size="small" clearable style="width: 110px" /> |
|||
</div> |
|||
<div class="query"> |
|||
<span class="spanClass">身份证号</span> |
|||
<el-input placeholder="身份证号" v-model="query.idNo" size="small" clearable style="width: 155px" /> |
|||
</div> |
|||
|
|||
<div class="query" v-if="false"> |
|||
<span class="spanClass">状态</span> |
|||
<el-select v-model="query.completeFlag" placeholder="请选择" clearable style="width: 80px" size="small"> |
|||
<el-option v-for="item in dict.completeFlag" :key="item.id" :label="item.displayName" :value="item.id"> |
|||
</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: 12px;">读身份证</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="300" highlight-current-row |
|||
size="small" @row-click="rowClick"> |
|||
<el-table-column label="组合项目" width="120" prop="asbitemName" /> |
|||
<el-table-column label="操作" width="130" prop="operate"> |
|||
<template slot-scope="scope"> |
|||
<el-select v-model="scope.row.operate" placeholder="请操作方式" size="small" :disabled="scope.row.disabled" |
|||
@change="changeOperate(scope.row)"> |
|||
<el-option v-for="(item, index) in options" :key="index" :label="item.label" :value="item.value" /> |
|||
</el-select> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="条码分组" width="120" prop="sampleGroupName" /> |
|||
<el-table-column label="检验申请号" width="180" prop="lisRequestNo"> |
|||
<template slot-scope="scope"> |
|||
<el-select v-model="scope.row.lisRequestNo" size="small" :disabled="scope.row.disabled"> |
|||
<el-option v-for="(item, index) in lisRequestNos" :key="index" :label="item.lisRequestNo" |
|||
:value="item.lisRequestId" /> |
|||
</el-select> |
|||
</template> |
|||
</el-table-column> |
|||
</el-table> |
|||
</div> |
|||
<div style="margin-top: 10px; display: flex;justify-content: space-between;"> |
|||
<div> |
|||
<el-button v-if="true" @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" |
|||
}, |
|||
pickerOptions: { |
|||
disabledDate(time) { |
|||
return time.getTime() > Date.now(); |
|||
}, |
|||
shortcuts: [{ |
|||
text: '今天', |
|||
onClick(picker) { |
|||
picker.$emit('pick', new Date()); |
|||
} |
|||
}, { |
|||
text: '昨天', |
|||
onClick(picker) { |
|||
const date = new Date(); |
|||
date.setTime(date.getTime() - 3600 * 1000 * 24); |
|||
picker.$emit('pick', date); |
|||
} |
|||
}, { |
|||
text: '一周前', |
|||
onClick(picker) { |
|||
const date = new Date(); |
|||
date.setTime(date.getTime() - 3600 * 1000 * 24 * 7); |
|||
picker.$emit('pick', date); |
|||
} |
|||
}] |
|||
}, |
|||
}; |
|||
}, |
|||
|
|||
created() { |
|||
|
|||
}, |
|||
|
|||
//挂载完成 |
|||
mounted() { |
|||
this.funMounted() |
|||
}, |
|||
|
|||
computed: { |
|||
...mapState([ |
|||
"window", |
|||
"dict", |
|||
"dataTransOpts", |
|||
"dialogWin" |
|||
]), |
|||
}, |
|||
|
|||
methods: { |
|||
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 = curDate |
|||
// 获取接口列表,传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.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() { |
|||
this.currRowData = {} |
|||
this.tableData = [] |
|||
this.tableDataDetails = [] |
|||
|
|||
this.query.appointStartDate = "2024-01-01 00:00:00" |
|||
this.query.appointStopDate = "2024-07-01 00:00:00" |
|||
|
|||
postapi('/api/app/AppointPatientRegister/GetListByFilter', this.query) |
|||
.then(res => { |
|||
if (res.code > -1) { |
|||
this.tableData = res.data |
|||
} |
|||
}) |
|||
}, |
|||
|
|||
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 |
|||
}, |
|||
|
|||
// 点击确定 |
|||
btnOk() { |
|||
if (!this.currRowData.id) { |
|||
this.$message.warning({ showClose: true, message: "请选择预约的记录" }) |
|||
return |
|||
} |
|||
|
|||
this.dialogWin.WebBooking = false |
|||
}, |
|||
|
|||
// 点击关闭 |
|||
btnClose() { |
|||
this.dialogWin.WebBooking = false |
|||
}, |
|||
|
|||
}, |
|||
|
|||
//监听事件() |
|||
watch: { |
|||
"dataTransOpts.plus.WebBooking": { |
|||
// immediate:true, |
|||
handler(newVal, oldVal) { |
|||
console.log(`watch 职业病 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> |
|||
Write
Preview
Loading…
Cancel
Save
Reference in new issue