Commit 6b4f34da authored by 何鹏程's avatar 何鹏程

完成新需求

parent d443333b
import request from '../util/ajax'
export function queryIntegrationList(params) {
return request({
url: '/api/team/pre/queryIntegrationList?params=mdxtptPre&token=' + params.token,
method: 'POST',
data: params
})
}
export function queryDetail(params) {
return request({
url: '/api/team/pre/queryInfoById?params=mdxtptPre&token=' + params.token,
method: 'POST',
data: params
})
}
This diff is collapsed.
<template>
<div class="main-wrapper">
<div class="main-body">
<div class="main-content">
<div class="main-page">
<div class="main-page-header">
<p class="title">院前急救信息</p>
<el-form
:inline="true"
:model="searchForm"
ref="searchForm"
size="small"
>
<el-form-item
prop="patientType"
label="病种"
>
<el-select
v-model="searchForm.patientType"
placeholder="请选择病种"
style="width: 100%"
:clearable="true"
>
<el-option
v-for="item in patientTypeList"
:label="item.name"
:key="item.id"
:value="item.val"
/>
</el-select>
</el-form-item>
<el-form-item
prop="time"
label="急救时间"
>
<el-date-picker
type="datetimerange"
start-placeholder="开始日期"
end-placeholder="结束日期"
v-model="searchForm.time"
style="width: 100%;"
prefix-icon="el-icon-date"
format="yyyy-MM-dd HH:mm:ss"
value-format="yyyy-MM-dd HH:mm:ss"
></el-date-picker>
</el-form-item>
<div class="btns">
<el-button
type="primary"
size="small"
@click="searchFormSub"
>查询</el-button>
<el-button
size="small"
@click="resetForm('searchForm')"
>重置</el-button>
</div>
</el-form>
</div>
<div class="main-page-body">
<div class="mainContent">
<div class="bt">
<el-button
type="primary"
size="small"
v-if="!checkPermission()"
@click="goDetail('add')"
>新增</el-button>
</div>
<table-mixin
:pageSize="pageSize"
:pageNum="pageNum"
:total="total"
:pagination="pagination"
:handleSizeChange="handleSizeChange"
:handleCurrentChange="handleCurrentChange"
>
<el-table
v-loading="tableData.loading"
:data="tableData.body"
@sort-change="handleSortChange"
>
<div
slot="empty"
class="noData"
></div>
<el-table-column
label="序号"
type="index"
min-width="50"
>
</el-table-column>
<el-table-column
v-for="(item,index) in tableData.head"
:prop="item.key"
:label="item.name"
align="left"
:formatter="item.formatter"
:sortable="item.sortable"
:fixed="item.fixed"
:key="index"
:min-width="item.width"
:show-overflow-tooltip="true"
>
</el-table-column>
<el-table-column
label="操作"
align="left"
width="auto"
min-width="150px"
fixed="right"
>
<template slot-scope="scope">
<el-link
type="primary"
:disabled="scope.row.patientType === 5"
@click="goDetail('detail', scope.row)"
>查看详情</el-link>
<!-- <el-link
type="primary"
:disabled="scope.row.patientType === 5"
@click="goDetail('update', scope.row)"
v-if="!checkPermission()"
>修改</el-link> -->
</template>
</el-table-column>
</el-table>
</table-mixin>
</div>
</div>
</div>
</div>
</div>
</div>
</template>
<script>
import { tableDataMixin } from '../../common/js/mixin'
import { queryIntegrationList } from '@/api/data'
import { getDic } from '../../util/dict'
export default {
name: 'LogPage',
mixins: [tableDataMixin],
data() {
return {
searchForm: {
operateType: '',
time: []
},
patientTypeList: [],
token: '',
tableData: {
loading: false,
head: [
{
name: '患者姓名',
key: 'patientName',
sortable: false,
width: '100',
fixed: false
},
{
name: '性别',
key: 'sex',
sortable: false,
width: '80',
fixed: false,
formatter: (row, column, cellValue, index) => {
return cellValue === 1 ? '男' : cellValue === 2 ? '女' : ''
}
},
{
name: '年龄',
key: 'age',
sortable: false,
width: '80',
fixed: false
},
{
name: '发病时间',
key: 'onsetTime',
sortable: false,
width: '200',
fixed: false
},
{
name: '120急救申请时间',
key: 'firstAidApplicationTime',
sortable: false,
width: '200',
fixed: false
},
{
name: '从现场出发时间',
key: 'departureTime',
sortable: false,
width: '200',
fixed: false
},
{
name: '车牌号',
key: 'licensePlateNumber',
sortable: false,
width: '120',
fixed: false
},
{
name: '申请机构',
key: 'applicant',
sortable: false,
width: '100',
fixed: false
},
{
name: '身份证号',
key: 'identityNumber',
sortable: false,
width: '200',
fixed: false
},
{
name: '请求绿道',
key: 'patientType',
sortable: false,
width: '100',
fixed: false,
formatter: (row, column, cellValue, index) => {
return ['', '胸痛中心', '卒中中心', '创伤中心', '烧伤中心', '其他'][cellValue] || ''
}
},
{
name: '院前诊断',
key: 'preHospitalDiagnosis',
sortable: false,
width: '200',
fixed: false
},
{
name: '接诊医院',
key: 'clinicalHospital',
sortable: false,
width: '200',
fixed: false
},
{
name: '转出医院',
key: 'outhospitalName',
sortable: false,
width: '200',
fixed: false
}
],
body: [],
option: [],
condition: []
}
}
},
mounted() {
// 获取字典
getDic(['patient_type']).then(res => {
this.patientTypeList = res.patient_type
console.log(this.patientTypeList)
})
const query = this.$route.query
this.token = query.token
if (this.token) {
this.search()
} else {
this.$message.error('无效数据,请联系管理员')
}
},
methods: {
getTableData() {
this.tableData.loading = true
const params = {
patientType: this.searchForm.patientType,
pageNo: this.pageNum,
pageSize: this.pageSize,
token: this.token,
params: 'mdxtptPre'
}
if (this.searchForm.time && this.searchForm.time.length === 2) {
params.time = this.searchForm.time[0] + "_" + this.searchForm.time[1]
}
queryIntegrationList(params).then((res) => {
if (res.msg == 201) {
this.dealTableResponse(res)
} else {
this.$message.error(res.content)
}
})
},
logTypeFormatter(row, column, cellValue, index) {
const logType = this.logTypeList.find(i => i.val === cellValue)
return logType ? logType.name : ''
},
goDetail(type, row) {
const query = {
type: type,
token: this.token
}
if (type === 'update' || type === 'detail') {
query.patientType = row.patientType
query.associationId = row.associationId
}
const routerData = this.$router.resolve({
path: '/data/detail',
query: query
})
window.open(routerData.href, '_blank')
}
}
}
</script>
<style lang="scss" scoped>
.mainContent {
padding: 20px;
.bt {
text-align: right;
margin-bottom: 16px;
}
}
</style>
......@@ -59,6 +59,12 @@ router.beforeEach((to, from, next) => {
})
return
}
if (whiteList.indexOf(to.path) >= 0) {
console.log('该页面无需登录即可访问')
next()
return
}
// console.log('token', token)
// console.log('_token', _token)
// console.log('userInfo', userInfo)
......
......@@ -38,6 +38,14 @@ const staticRoute = [
{
path: '/business/hospital/detail',
component: () => import('../page/hospital/detail')
},
{
path: '/data',
component: () => import('../page/data')
},
{
path: '/data/detail',
component: () => import('../page/data/detail')
}
]
const routeHandle = (map) => {
......
......@@ -7,7 +7,9 @@ const whiteList = [
'/error/500',
'/bigScreen',
'/bigscreen',
'/business/hospital/detail'
'/business/hospital/detail',
'/data',
'/data/detail'
// '/register'
]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment