Commit 5743429f authored by liang's avatar liang

列表排序

parent b6f32a0d
......@@ -79,8 +79,8 @@ export default {
})
},
methods: {
changeShow() {
this.$emit("changeShow")
changeShow(isRefresh) {
this.$emit("changeShow", isRefresh)
},
refreshData(data) {
// this.refreshFlag = false
......
<template>
<div>
<FollowReview :currentRow="currentRow" titlePosition="top" @update="update">
<template #button>
<el-button
style="padding: 8px 20px"
v-if="isShowEdit"
@click="handleEdit"
>修 改</el-button
>
<el-button
style="padding: 8px 20px; margin-left: 20px"
@click="$emit('back')"
>返 回</el-button
>
</template>
</FollowReview>
</div>
<FollowReview
:currentRow="currentRow"
ref="follow"
titlePosition="top"
@update="update"
>
<template #button>
<el-button style="padding: 8px 20px" v-if="isShowEdit" @click="handleEdit"
>修 改</el-button
>
<el-button
style="padding: 8px 20px; margin-left: 20px"
@click="$emit('back')"
>返 回</el-button
>
</template>
</FollowReview>
</template>
<script>
......@@ -35,21 +35,14 @@ export default {
},
methods: {
handleEdit() {
const { patientId, followId } = this.currentRow
this.$router.push({
path: "/followupentry",
query: {
patientId,
followId,
model: "edit",
getData: 1,
formType: 2,
},
})
this.$emit("handleEdit", this.currentRow)
},
update(val) {
this.isLast = val
},
refresh() {
this.$refs.follow.refreshFollow()
},
},
computed: {
isShowEdit() {
......
......@@ -58,6 +58,7 @@
v-for="form in followForms"
:key="form.id"
:form="form"
ref="myForm"
:patientId="currentRow.patientId"
:followId="followId"
></MyCustomForm>
......@@ -152,6 +153,12 @@ export default {
},
},
methods: {
refreshFollow() {
const refs = this.$refs["myForm"]
refs.map((ele) => {
ele.getFollowDetail()
})
},
getLogList() {
const obj = {
patientId: this.currentRow.patientId,
......
<template>
<!-- 随访查询 -->
<div class="screeningSearch">
<div v-show="!isDetail && !show">
<div v-show="!isDetail && !isEdit">
<div class="top">
<form-components
ref="form"
:forms="formList"
:form-edit="formEdit"
@handleSearch="onSearch"
@handleSearch="onClickSearch"
></form-components>
</div>
<div class="bot">
......@@ -23,15 +22,20 @@
:page-size="pageSize"
@pageSizeChange="handleSizeChange"
@currentPageChange="handleCurrentChange"
:sortChange="sortChange"
/>
</div>
</div>
<FollowUpDetail
:currentRow="currentRow"
v-if="isDetail"
@back="back"
></FollowUpDetail>
<followupentry v-if="show" @changeShow="changeShow"></followupentry>
<div v-show="!isEdit">
<FollowUpDetail
:currentRow="currentRow"
@handleEdit="handleEdit"
ref="follow"
v-if="isDetail"
@back="back"
></FollowUpDetail>
</div>
<followupentry v-if="isEdit" @changeShow="changeShow"></followupentry>
</div>
</template>
<script>
......@@ -52,7 +56,7 @@ export default {
data() {
return {
isDetail: false,
show: false,
isEdit: false,
followId: "",
listLoading: false,
keyword: "",
......@@ -65,6 +69,7 @@ export default {
formatter: (row) => {
return row.unionName ? row.unionName : "--"
},
sortable: "custom",
},
{
label: "姓名",
......@@ -73,6 +78,7 @@ export default {
return row.name ? row.name : "--"
},
value: "name",
sortable: "custom",
},
{
label: "性别",
......@@ -84,6 +90,7 @@ export default {
row.sex + ""
)
},
sortable: "custom",
},
{
label: "身份证",
......@@ -92,6 +99,7 @@ export default {
formatter: (row) => {
return row.idCard ? row.idCard : "--"
},
sortable: "custom",
},
{
label: "年龄",
......@@ -100,6 +108,7 @@ export default {
formatter: (row) => {
return row.age ? row.age : "--"
},
sortable: "custom",
},
{
label: "筛查时间",
......@@ -108,6 +117,7 @@ export default {
formatter: (row) => {
return row.screeningTime ? row.screeningTime : "--"
},
sortable: "custom",
},
{
label: "审核状态",
......@@ -119,10 +129,11 @@ export default {
String(row.checkStatus)
)
},
sortable: "custom",
},
{
label: "风险评估结果",
minWidth: 120,
minWidth: 130,
value: "riskRank",
formatter: (row) => {
let riskRank = {
......@@ -132,14 +143,16 @@ export default {
}
return row.riskRank ? riskRank[row.riskRank] : "--"
},
sortable: "custom",
},
{
label: "上次随访时间",
value: "followTime",
minWidth: 120,
minWidth: 130,
formatter: (row) => {
return row.followTime ? row.followTime : "--"
},
sortable: "custom",
},
{
label: "随访进度",
......@@ -151,6 +164,7 @@ export default {
String(row.followBatch)
)
},
sortable: "custom",
},
{
label: "操作",
......@@ -268,7 +282,7 @@ export default {
],
},
],
formEdit: {},
cacheForm: {},
currentRow: {},
}
},
......@@ -286,19 +300,39 @@ export default {
},
mounted() {
const followId = this.$route.query.followId
const isEdit = this.$route.query.model === "edit"
// 从随访录入跳转过来显示处理
if (followId) {
this.handleDetail({ ...this.$route.query })
this.isEdit = isEdit
this.isDetail = !isEdit
if (this.isDetail) {
this.handleDetail(this.$route.query)
}
}
// this.formEdit = sessionStorage.getItem('followQuery-form') ? JSON.parse(sessionStorage.getItem('followQuery-form')) : {}
this.pageSize = Number(sessionStorage.getItem("followQuery-pageSize")) || 10
this.pageIndex =
Number(sessionStorage.getItem("followQuery-pageIndex")) || 1
this.getCurrentFormByType(2)
},
methods: {
changeShow() {
this.$router.push({ query: {} })
this.show = false
changeShow(isRefresh) {
let query = {}
if (this.isDetail) {
const { patientId, followId, followBatch } = this.$route.query
query = {
patientId,
followId,
followBatch,
}
}
if (isRefresh) {
if (this.isDetail) {
this.$refs.follow.refresh()
}
this.handleSearch()
}
this.$router.replace({ path: "/followupquery", query })
this.isEdit = false
},
back() {
this.isDetail = false
......@@ -311,7 +345,6 @@ export default {
this.modifiedFlag = !this.modifiedFlag
},
setSelectedIndex(i) {
console.log(this.selectedIndex)
this.selectedIndex = i
sessionStorage.setItem("homeSelectedIndex", this.selectedIndex)
},
......@@ -319,12 +352,13 @@ export default {
console.log(v)
},
handleEdit(data, i, index) {
this.show = true
this.$router.push({
// path: "/followupentry",
this.isEdit = true
this.$router.replace({
path: "/followupquery",
query: {
patientId: data.patientId,
followId: data.id,
followId: data.followId,
followBatch: data.followBatch,
model: "edit",
getData: 1,
formType: 2,
......@@ -334,19 +368,25 @@ export default {
handleDetail(row) {
this.isDetail = true
this.currentRow = row
},
onSearch(form) {
console.log(form)
this.pageIndex = 1
sessionStorage.setItem("followQuery-form", JSON.stringify(form))
this.formEdit = form
this.handleSearch()
this.$router.replace({
path: "/followupquery",
query: {
patientId: row.patientId,
followId: row.followId,
followBatch: row.followBatch,
},
})
},
onClickSearch() {
this.pageIndex = 1
this.handleSearch()
},
async handleSearch() {
sortChange({ prop, order }) {
const sort = order ? (order === "ascending" ? "asc" : "desc") : ""
const sortField = order ? prop : ""
this.handleSearch({ sortField, sort })
},
async handleSearch(form = {}) {
this.listLoading = true
let params = {
......@@ -354,11 +394,10 @@ export default {
pageNum: this.pageIndex,
formId: this.formId,
...this.$refs.form.form,
...form,
patientFrom: sessionStorage.getItem("selectedIndex"), //筛查场景
}
if (this.formEdit) {
params = { ...Object.assign(this.formEdit, params) }
}
params = Object.assign(this.cacheForm, params)
for (let key in params) {
if (params[key] !== "" && params[key] !== null) {
if (key.includes("Time") && params[key]) {
......
......@@ -20,6 +20,7 @@
:total-count="total"
:page-sizes="pageSizes"
:page-size="pageSize"
:sort-change="sortChange"
@pageSizeChange="handleSizeChange"
@currentPageChange="handleCurrentChange"
/>
......@@ -57,6 +58,7 @@ export default {
formatter: (row) => {
return row.unionName ? row.unionName : "--"
},
sortable: "custom",
},
{
label: "姓名",
......@@ -65,6 +67,7 @@ export default {
return row.name ? row.name : "--"
},
value: "name",
sortable: "custom",
},
{
label: "性别",
......@@ -76,6 +79,7 @@ export default {
row.sex + ""
)
},
sortable: "custom",
},
{
label: "身份证",
......@@ -84,6 +88,7 @@ export default {
formatter: (row) => {
return row.idCard ? row.idCard : "--"
},
sortable: "custom",
},
{
label: "年龄",
......@@ -92,6 +97,7 @@ export default {
formatter: (row) => {
return row.age ? row.age : "--"
},
sortable: "custom",
},
{
label: "筛查时间",
......@@ -100,11 +106,12 @@ export default {
formatter: (row) => {
return row.screeningTime ? row.screeningTime : "--"
},
sortable: "custom",
},
{
label: "风险评估结果",
minWidth: 120,
minWidth: 130,
value: "riskRank",
formatter: (row) => {
let riskRank = {
......@@ -114,14 +121,16 @@ export default {
}
return row.riskRank ? riskRank[row.riskRank] : "--"
},
sortable: "custom",
},
{
label: "上次随访时间",
value: "followTime",
minWidth: 120,
minWidth: 130,
formatter: (row) => {
return row.followTime ? row.followTime : "--"
},
sortable: "custom",
},
{
label: "随访进度",
......@@ -133,6 +142,7 @@ export default {
String(row.followBatch)
)
},
sortable: "custom",
},
{
label: "计划随访时间",
......@@ -143,7 +153,8 @@ export default {
// String(row.nextFollowTime)
// )
// },
minWidth: 120,
sortable: "custom",
minWidth: 130,
},
{
label: "操作",
......@@ -261,6 +272,7 @@ export default {
},
],
formEdit: {},
cacheForm: {},
}
},
computed: {
......@@ -294,6 +306,11 @@ export default {
this.pageIndex = 1
this.handleSearch()
},
sortChange({ prop, order }) {
const sort = order ? (order === "ascending" ? "asc" : "desc") : ""
const sortField = order ? prop : ""
this.handleSearch({ sortField, sort })
},
rowOpration(data, i) {
sessionStorage.setItem("formEdit", JSON.stringify(data))
this.$router.push({
......@@ -307,11 +324,13 @@ export default {
})
this.show = true
},
async handleSearch() {
async handleSearch(form = {}) {
Object.assign(this.cacheForm, form)
this.listLoading = true
let params = {
pageSize: this.pageSize,
pageNum: this.pageIndex,
...this.cacheForm,
}
params.patientFrom = this.selectedIndex
if (this.formEdit) {
......
......@@ -347,7 +347,11 @@ export default {
// 筛查提交
this.dialogType = "submit"
if (this.formType == 2) {
this.$refs.followDialog.dialogVisible = true
if (this.$route.query.model === "edit") {
this.$emit("changeShow", true)
} else {
this.$refs.followDialog.dialogVisible = true
}
} else {
this.$refs.showDialog.dialogVisible = true
}
......
......@@ -113,6 +113,7 @@ export default {
formatter: (row) => {
return row.unionName ? row.unionName : "--"
},
sortable: "custom",
},
{
label: "姓名",
......@@ -121,6 +122,7 @@ export default {
return row.name ? row.name : "--"
},
value: "name",
sortable: "custom",
},
{
label: "性别",
......@@ -131,6 +133,7 @@ export default {
? this.$handle.formatDicList(this.dictMap["d-sex"], row.sex + "")
: "--"
},
sortable: "custom",
},
// {
// label: "身份证",
......@@ -147,15 +150,16 @@ export default {
formatter: (row) => {
return row.age ? row.age : "--"
},
sortable: "custom",
},
{
label: "筛查时间",
minWidth: 180,
// sortable: "custom",
value: "createTime",
formatter: (row) => {
return row.createTime ? row.createTime : "--"
},
sortable: "custom",
},
{
label: "风险评估结果",
......@@ -169,11 +173,13 @@ export default {
}
return row.riskRank ? riskRank[row.riskRank] : "--"
},
sortable: "custom",
},
{
label: "是否内镜",
minWidth: 120,
value: "isInnerCheck",
sortable: "custom",
formatter: (row) => {
let arr = [
{ label: "", value: "0" },
......@@ -207,6 +213,7 @@ export default {
}
return label
},
sortable: "custom",
},
{
label: "操作",
......@@ -282,9 +289,9 @@ export default {
},
sortChange({ prop, order }) {
const asc = order ? (order === "ascending" ? true : false) : ""
const column = order ? prop : ""
this.handleSearch({ "orders[0].asc": asc, "orders[0].column": column })
const sort = order ? (order === "ascending" ? "asc" : "desc") : ""
const sortField = order ? prop : ""
this.handleSearch({ sortField, sort })
},
// 查询
handleFormSearch(form) {
......
......@@ -18,9 +18,7 @@ export default {
items: [1, 2, 3, 4, 5, 6, 7, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3],
}
},
mounted() {
},
mounted() {},
}
</script>
<style lang="scss">
......
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