|
@@ -1,7 +1,7 @@
|
|
<template>
|
|
<template>
|
|
<div>
|
|
<div>
|
|
- <SearchBoxVue :data="searchData" :codes="tableShowCode" @search="handleSearch" @reset="handleReset" @codesChange="handleCodesChange" />
|
|
+ <SearchBoxVue :data="searchData" :codes="tableShowCode" @search="handleSearch" @reset="handleReset" @codesChange="handleCodesChange" @create="handleCreate" />
|
|
- <TableBoxVue :loading="loading" :data="tableData" :codes="tableShowCode" style="margin-top: -40px;" @download="handleDownLoad" />
|
|
+ <TableBoxVue :loading="loading" :data="tableData" :codes="tableShowCode" style="margin-top: -40px;" @download="handleDownLoad" @edit="handleEdit" @refresh="handleRefresh" />
|
|
<pagination
|
|
<pagination
|
|
:auto-scroll="false"
|
|
:auto-scroll="false"
|
|
:total="paginationData.total"
|
|
:total="paginationData.total"
|
|
@@ -9,6 +9,8 @@
|
|
:limit="paginationData.page_size"
|
|
:limit="paginationData.page_size"
|
|
@pagination="handlePagination"
|
|
@pagination="handlePagination"
|
|
/>
|
|
/>
|
|
|
|
+ <!-- 新建、编辑 -->
|
|
|
|
+ <CreateDaialogVue v-if="createData.bSwitch" :data="createData" @refresh="handleRefresh" />
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
@@ -17,12 +19,14 @@ import SearchBoxVue from './components/SearchBox.vue'
|
|
import TableBoxVue from './components/TableBox.vue'
|
|
import TableBoxVue from './components/TableBox.vue'
|
|
import { userSearchLogExport } from '@/api/excel'
|
|
import { userSearchLogExport } from '@/api/excel'
|
|
import { illnessList } from '@/api/knowledge'
|
|
import { illnessList } from '@/api/knowledge'
|
|
|
|
+import CreateDaialogVue from './components/CreateDaialog.vue'
|
|
// import { dateFormat } from '@/filters/index'
|
|
// import { dateFormat } from '@/filters/index'
|
|
|
|
|
|
export default {
|
|
export default {
|
|
components: {
|
|
components: {
|
|
SearchBoxVue,
|
|
SearchBoxVue,
|
|
- TableBoxVue
|
|
+ TableBoxVue,
|
|
|
|
+ CreateDaialogVue
|
|
},
|
|
},
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
@@ -70,6 +74,10 @@ export default {
|
|
total: 0,
|
|
total: 0,
|
|
page: 1,
|
|
page: 1,
|
|
page_size: 10
|
|
page_size: 10
|
|
|
|
+ },
|
|
|
|
+ createData: {
|
|
|
|
+ bSwitch: false,
|
|
|
|
+ id: ''
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
},
|
|
@@ -142,79 +150,24 @@ export default {
|
|
const { p } = res
|
|
const { p } = res
|
|
this.paginationData.total = p.count
|
|
this.paginationData.total = p.count
|
|
this.tableData = p.list
|
|
this.tableData = p.list
|
|
- this.tableData = [{
|
|
|
|
- 'id': 20,
|
|
|
|
- 'FLAG': 'EK_ZLSJBMC',
|
|
|
|
- 'KSMC': '儿科',
|
|
|
|
- 'JBMC': '这里是疾病名称',
|
|
|
|
- 'BM': '这里是别名',
|
|
|
|
- 'JBBM': '这里是疾病编码',
|
|
|
|
- 'JBZD': '这里是鉴别诊断',
|
|
|
|
- 'ZZ': '这里是症状',
|
|
|
|
- 'TZ': '这里是体征',
|
|
|
|
- 'YP': '这里是药品',
|
|
|
|
- 'ZL': '这里是治疗',
|
|
|
|
- 'JC': '这里是检查',
|
|
|
|
- 'JJ': '这里是检验',
|
|
|
|
- 'BFZ': '这里是并发症',
|
|
|
|
- 'CKWX': '这里是参考文献',
|
|
|
|
- 'created_at': '2023-06-06 14:24:51',
|
|
|
|
- 'updated_at': '2023-06-06 14:24:51'
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- 'id': 21,
|
|
|
|
- 'FLAG': 'ZLSJBMCYYY',
|
|
|
|
- 'KSMC': '',
|
|
|
|
- 'JBMC': '这里是疾病名称111',
|
|
|
|
- 'BM': '这里是别名111',
|
|
|
|
- 'JBBM': '这里是疾病编码111',
|
|
|
|
- 'JBZD': '这里是鉴别诊断111',
|
|
|
|
- 'ZZ': '这里是症状111',
|
|
|
|
- 'TZ': '这里是体征111',
|
|
|
|
- 'YP': '这里是药品111',
|
|
|
|
- 'ZL': '这里是治疗111',
|
|
|
|
- 'JC': '这里是检查111',
|
|
|
|
- 'JJ': '这里是检验111',
|
|
|
|
- 'BFZ': '这里是并发症111',
|
|
|
|
- 'CKWX': '这里是参考文献111',
|
|
|
|
- 'created_at': '2023-06-06 14:24:51',
|
|
|
|
- 'updated_at': '2023-06-06 14:24:51'
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- 'id': 22,
|
|
|
|
- 'FLAG': 'ZLSJBMCEEE',
|
|
|
|
- 'KSMC': '',
|
|
|
|
- 'JBMC': '这里是疾病名称222',
|
|
|
|
- 'BM': '这里是别名222',
|
|
|
|
- 'JBBM': '这里是疾病编码222',
|
|
|
|
- 'JBZD': '',
|
|
|
|
- 'ZZ': '',
|
|
|
|
- 'TZ': '',
|
|
|
|
- 'YP': '',
|
|
|
|
- 'ZL': '',
|
|
|
|
- 'JC': '',
|
|
|
|
- 'JJ': '',
|
|
|
|
- 'BFZ': '',
|
|
|
|
- 'CKWX': '',
|
|
|
|
- 'created_at': '2023-06-06 14:24:51',
|
|
|
|
- 'updated_at': '2023-06-06 14:24:51'
|
|
|
|
- }
|
|
|
|
- ]
|
|
|
|
}).catch(error => {
|
|
}).catch(error => {
|
|
console.log(error)
|
|
console.log(error)
|
|
}).finally(() => {
|
|
}).finally(() => {
|
|
this.loading = false
|
|
this.loading = false
|
|
})
|
|
})
|
|
},
|
|
},
|
|
|
|
+ // 分页
|
|
handlePagination(param) {
|
|
handlePagination(param) {
|
|
this.paginationData.page = param.page
|
|
this.paginationData.page = param.page
|
|
this.paginationData.limit = param.limit
|
|
this.paginationData.limit = param.limit
|
|
this.getList()
|
|
this.getList()
|
|
},
|
|
},
|
|
|
|
+ // 搜索
|
|
handleSearch() {
|
|
handleSearch() {
|
|
this.paginationData.page = 1
|
|
this.paginationData.page = 1
|
|
this.getList()
|
|
this.getList()
|
|
},
|
|
},
|
|
|
|
+ // 重置
|
|
handleReset() {
|
|
handleReset() {
|
|
this.searchData = {
|
|
this.searchData = {
|
|
FLAG: '',
|
|
FLAG: '',
|
|
@@ -239,6 +192,7 @@ export default {
|
|
SSBM: ''
|
|
SSBM: ''
|
|
}
|
|
}
|
|
},
|
|
},
|
|
|
|
+ // 导出
|
|
handleDownLoad() {
|
|
handleDownLoad() {
|
|
const { name, dep_id, time, keyword } = this.searchData
|
|
const { name, dep_id, time, keyword } = this.searchData
|
|
const params = {
|
|
const params = {
|
|
@@ -267,6 +221,19 @@ export default {
|
|
navigator.msSaveBlob(blob, fileName)
|
|
navigator.msSaveBlob(blob, fileName)
|
|
}
|
|
}
|
|
})
|
|
})
|
|
|
|
+ },
|
|
|
|
+ // 新增
|
|
|
|
+ handleCreate() {
|
|
|
|
+ this.createData.id = ''
|
|
|
|
+ this.createData.bSwitch = true
|
|
|
|
+ },
|
|
|
|
+ handleEdit(row) {
|
|
|
|
+ this.createData.id = row.id
|
|
|
|
+ this.createData.bSwitch = true
|
|
|
|
+ },
|
|
|
|
+ // 刷新
|
|
|
|
+ handleRefresh() {
|
|
|
|
+ this.getList()
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|