Commit 891ffaaf authored by miaojiale's avatar miaojiale

联调筛查查询接口

parent adcc7f5c
import request from "@/utils/request"
/* 首页 */
export function addMedicalunion(data = {}) {
return request({
url: "/cloud-upms/sys/union/addOrUpdate",
method: "post",
data,
})
}
// 医联体授权
export function baseUnion(data = {}) {
return request({
url: "/cloud-upms/user/base/union",
method: "post",
data,
})
}
// 累计上报
export function getRankTotal(params = {}) {
return request({
url: "/disease-data/rank/total",
method: "get",
params,
})
}
//当前季度
export function getCurrentQuarter(params = {}) {
return request({
url: "/disease-data/rank/currentQuarter",
method: "get",
params,
})
}
export function deleteUnion(id) {
return request({
url: `/cloud-upms/sys/union/${id}`,
method: "delete",
})
}
......@@ -9,6 +9,14 @@ export function addMedicalunion(data = {}) {
data,
})
}
// 医联体授权
export function baseUnion(data = {}) {
return request({
url: "/cloud-upms/user/base/union",
method: "post",
data,
})
}
export function medicalunionList(params = {}) {
return request({
url: "/cloud-upms/sys/union/list",
......
......@@ -31,13 +31,13 @@
>
<!-- 表头插槽 -->
<template slot="header" slot-scope="scope">
<span :style="{ fontSize: fontSize[fontIndex] }">{{
<span :style="{ fontSize: fontSize + 'px' }">{{
column.label
}}</span>
</template>
<!-- 表内容插槽 -->
<template slot-scope="scope">
<span :style="{ fontSize: fontSize[fontIndex] }">
<span :style="{ fontSize: fontSize + 'px' }">
{{ scope.row[column.value] || "--" }}</span
>
</template>
......@@ -57,7 +57,7 @@
>
<!-- 表头插槽 -->
<template slot="header" slot-scope="scope">
<span :style="{ fontSize: fontSize[fontIndex] }">{{
<span :style="{ fontSize: fontSize + 'px' }">{{
column.label
}}</span>
</template>
......@@ -74,7 +74,7 @@
:disabled="
op.formatter ? op.formatter(scope.row).disabled : false
"
:style="[{ fontSize: fontSize[fontIndex] }, op.style]"
:style="[{ fontSize: fontSize + 'px' }, op.style]"
:type="
op.formatter
? op.formatter(scope.row).type
......@@ -183,7 +183,6 @@ export default {
},
data() {
return {
fontSize: ["12px", "14px", "16px"],
httpPrefix:
process.env.NODE_ENV === "development"
? "/api"
......@@ -192,7 +191,7 @@ export default {
},
computed: {
...mapGetters({
fontIndex: "table/fontIndex",
fontSize: "table/fontSize",
}),
totalCounts() {
return this.totalCount - 0
......
......@@ -160,8 +160,10 @@
filterable
remote
reserve-keyword
:multiple="item.multiple ? true : false"
:placeholder="item.placeholder"
:remote-method="item.remoteFunc"
v-el-select-loadmore="loadmore"
@change="item.func ? item.func($event) : {}"
>
<el-option
......@@ -332,6 +334,7 @@ export default {
type: Boolean,
default: true,
},
current: Number,
formData: {
type: Array,
},
......@@ -350,7 +353,27 @@ export default {
type: Array,
},
},
directives: {
/** 下拉框懒加载 */
"el-select-loadmore": {
bind(el, binding) {
const SELECTWRAP_DOM = el.querySelector(
".el-select-dropdown .el-select-dropdown__wrap"
)
SELECTWRAP_DOM.addEventListener("scroll", function () {
const condition =
this.scrollHeight - this.scrollTop <= this.clientHeight
if (condition) {
binding.value()
}
})
},
},
},
methods: {
loadmore() {
this.$emit("loadMore", this.current + 1)
},
open() {
this.visible = true
},
......
......@@ -9,7 +9,6 @@
:show-summary="showSummary"
:span-method="spanMethod"
:data="tableData"
border
:show-overflow-tooltip="true"
:highlight-current-row="highLight"
:max-height="maxHeight || maxTableHeight"
......@@ -17,15 +16,17 @@
:header-row-class-name="headerClass"
:row-style="rowStyle"
:expand-row-keys="expands"
@row-click="rowClick"
:cell-style="cellStyle"
@sort-change="sortChange"
style="width: 100%"
:default-expand-all="defaultExpandAll"
:style="{ fontSize: fontSize + 'px' }"
:header-cell-style="{ fontSize: fontSize + 'px' }"
@row-click="rowClick"
@sort-change="sortChange"
@select="selectChange"
@selection-change="selectionChange"
@select-all="selectAll"
@cell-click="cellClick"
:default-expand-all="defaultExpandAll"
>
<el-table-column
v-if="tabType"
......@@ -216,6 +217,10 @@
placeholder="请选择"
no-data-text=" "
no-match-text=" "
:disabled="disabled"
:remote="col2.remote"
:allow-create="col2.allowCreate"
:remote-method="col2.remoteMethod"
@change="
col2.enterFunc
? col2.enterFunc(scope.row, scope.$index)
......@@ -224,11 +229,7 @@
scope.$index
)
"
:disabled="disabled"
:remote="col2.remote"
:allow-create="col2.allowCreate"
@focus="changeSelect(scope.row)"
:remote-method="col2.remoteMethod"
>
<el-option
v-for="item in col2.opts
......@@ -268,8 +269,8 @@
column.tabType === 'selection' &&
column.operType === 'checkbox'
"
style="margin-left: 4px"
v-model="column['checkAll']"
style="margin-left: 4px"
@change="handleCheckAllChange($event, column)"
></el-checkbox>
</template>
......@@ -283,9 +284,9 @@
<template v-for="(op, opIndex) in column.operations">
<template v-if="!op.isHidden || !op.isHidden(scope.row)">
<el-dropdown
size="large"
v-if="op.type === 'dropdown'"
:key="opIndex"
size="large"
style="margin: 0 10px"
trigger="click"
>
......@@ -329,12 +330,12 @@
v-else-if="op.type === 'switch'"
:key="opIndex"
class="switch-cell"
@click="handleSwitch(scope.row, scope.$index, op)"
:disabled="
op.formatter
? op.formatter(scope.row).disabled
: false
"
@click="handleSwitch(scope.row, scope.$index, op)"
>
<el-switch
v-model="scope.row[column.value]"
......@@ -345,8 +346,8 @@
</div>
<el-button
v-else
:size="size"
:key="opIndex"
:size="size"
:disabled="
op.formatter
? op.formatter(scope.row).disabled
......@@ -531,19 +532,19 @@
no-data-text=" "
no-match-text=" "
:disabled="disabled"
:remote="column.remote"
:allow-create="column.allowCreate"
:remote-method="column.remoteMethod"
@change="
column.enterFunc
? column.enterFunc(scope.row, scope.$index)
: changeProject(scope.row[column.value], scope.$index)
"
:remote="column.remote"
:allow-create="column.allowCreate"
@focus="
column.focusFunc
? column.focusFunc(scope.row, scope.$index)
: {}
"
:remote-method="column.remoteMethod"
>
<el-option
v-for="item in column.opts
......@@ -671,8 +672,8 @@
<!-- html -->
<template v-if="column.type === 'html'">
<div
v-html="scope.row[column.value]"
class="highlight"
v-html="scope.row[column.value]"
></div>
</template>
<!-- 展开列表 -->
......@@ -684,14 +685,14 @@
>
<template v-for="(expand, index) in column.expandColumns">
<el-form-item
:label="`【${expand.label}】`"
:key="index"
v-if="!expand.hidden"
:key="index"
:label="`【${expand.label}】`"
>
<!-- 字体高亮 -->
<div
class="el-alert el-alert--info is-light"
v-if="scope.row[expand.value]"
class="el-alert el-alert--info is-light"
>
<div
class="el-alert__content highlight"
......@@ -726,8 +727,20 @@
<script>
import resize from "./resize.js"
import { mapGetters } from "vuex"
export default {
name: "ElTableSelf",
// filters: {
// statusFilter(status) {
// const typeMap = ['warm', 'success', 'danger']
// return typeMap[status]
// },
// statusFilter2(status) {
// const typeMap = ['danger', 'success']
// return typeMap[status]
// }
// },
mixins: [resize],
props: {
listLoading: Boolean, // tab 加载层
......@@ -761,21 +774,13 @@ export default {
rowStyle: Function,
defaultExpandAll: Boolean,
},
// filters: {
// statusFilter(status) {
// const typeMap = ['warm', 'success', 'danger']
// return typeMap[status]
// },
// statusFilter2(status) {
// const typeMap = ['danger', 'success']
// return typeMap[status]
// }
// },
mixins: [resize],
computed: {
totalCounts() {
return this.totalCount - 0
},
...mapGetters({
fontSize: "table/fontSize",
}),
},
methods: {
// switch点击
......@@ -857,6 +862,7 @@ export default {
}
}
.el-table-self {
border: 1px solid #f6f6f6;
margin-top: 20px;
.tab-svg {
width: 24px;
......@@ -930,7 +936,7 @@ export default {
::v-deep .default {
th {
background-color: #eef5fd !important;
background-color: #f6f6f6 !important;
color: #586276;
}
}
......
......@@ -11,16 +11,22 @@
<div
v-for="(item, index) in fontList"
:key="index"
:class="['font', index == fontIndex ? 'active' : '']"
class="font"
@click="changeFont(index)"
>
<div class="label">{{ item.label }}</div>
</div>
</div>
<div v-show="curSelectedIndex != -1" class="community" @click="openModalFlag">
<div
v-show="curSelectedIndex != -1"
class="community"
@click="openModalFlag"
>
<img src="~@/assets/img/DataCenter/shift.png" alt />
{{
curSelectedIndex != -1 ? screeningList[curSelectedIndex].title : ""
curSelectedIndex != -1
? screeningList[curSelectedIndex - 1].title
: ""
}}
</div>
......@@ -28,13 +34,22 @@
<img src="~@/assets/img/DataCenter/user.png" alt />
<avatar></avatar>
</div>
<el-popover placement="top-start" width="200" trigger="click" popper-class="message-pop">
<div v-for="(item,index) in messageList" :key="index" class="message-box mb-24">
<el-popover
placement="top-start"
width="200"
trigger="click"
popper-class="message-pop"
>
<div
v-for="(item, index) in messageList"
:key="index"
class="message-box mb-24"
>
<div class="top-box mb-12">
<span class="blue-dot mt-5 mr-8"></span>
<span class="top-text">{{item.date}}</span>
<span class="top-text">{{ item.date }}</span>
</div>
<div class="main-text ml-8">{{item.message}}</div>
<div class="main-text ml-8">{{ item.message }}</div>
</div>
<template slot="reference">
<el-badge :value="messageCount" :class-name="'badge'">
......@@ -71,8 +86,8 @@ export default {
},
props: {
curSelectedIndex: {
type: Number,
default: -1,
type: String,
default: "",
},
},
data() {
......@@ -95,21 +110,21 @@ export default {
},
],
fontList: [
{ fontSize: "12px", label: "A-" },
{ fontSize: "14px", label: "A" },
{ fontSize: "16px", label: "A+" },
{ fontSize: "-", label: "A-" },
{ fontSize: 14, label: "A" },
{ fontSize: "+", label: "A+" },
],
fontIndex: localStorage.getItem("fontIndex") || 1,
messageList:[
fontSize: localStorage.getItem("fontSize") - 0 || 14,
messageList: [
{
date:"2022-12-12",
message:"驳回修改病例【6条】"
date: "2022-12-12",
message: "驳回修改病例【6条】",
},
{
date:"2022-12-12",
message:"驳回修改病例【6条】"
date: "2022-12-12",
message: "驳回修改病例【6条】",
},
]
],
}
},
computed: {
......@@ -141,9 +156,22 @@ export default {
this.$emit("openModalFlag")
},
changeFont(i) {
this.fontIndex = i
this.$store.commit("table/setFontIndex", i)
localStorage.setItem("fontIndex", i)
let fontSize = this.fontList[i].fontSize
if (fontSize == "-") {
if (this.fontSize > 12) {
this.fontSize = this.fontSize - 2
}
} else if (fontSize == "+") {
if (this.fontSize < 18) {
this.fontSize = this.fontSize + 2
}
} else {
this.fontSize = 14
}
// this.fontIndex = i
this.$store.commit("table/setFontSize", this.fontSize)
localStorage.setItem("fontSize", this.fontSize)
console.log(this.fontSize)
},
},
}
......@@ -207,16 +235,16 @@ export default {
line-height: 40px;
cursor: pointer;
margin-left: 20px;
}
.active {
box-sizing: border-box;
background: #ffffff;
height: 40px;
color: #4e68ff;
padding: 1px;
.label {
height: 36px;
border: 1px solid #4e68ff;
&:active {
box-sizing: border-box;
background: #ffffff;
height: 40px;
color: #4e68ff;
padding: 1px;
.label {
height: 36px;
border: 1px solid #4e68ff;
}
}
}
}
......@@ -289,4 +317,4 @@ export default {
display: none;
}
}
</style>
\ No newline at end of file
</style>
......@@ -58,18 +58,18 @@
<li
v-for="(item, index) in screeningList"
:key="index"
@click="selectedIndex = index"
@click="selectedIndex = item.value"
>
<div class="screeningItem">
<div class="circle">
<img
v-if="selectedIndex !== index"
v-if="selectedIndex !== item.value"
src="~@/assets/img/DataCenter/circle.png"
alt
srcset
/>
<img
v-if="selectedIndex == index"
v-if="selectedIndex == item.value"
src="~@/assets/img/DataCenter/selected.png"
alt
srcset
......@@ -122,18 +122,21 @@ export default {
screeningList: [
{
title: "社区筛查",
value: "1",
src: require("@/assets/img/DataCenter/shequ.png"),
},
{
title: "医院筛查",
value: "2",
src: require("@/assets/img/DataCenter/yiyuan.png"),
},
{
title: "体检筛查",
value: "3",
src: require("@/assets/img/DataCenter/tijian.png"),
},
],
selectedIndex: 0,
selectedIndex: "1",
curSelectedIndex: "",
}
},
......@@ -144,6 +147,7 @@ export default {
collapse: "settings/collapse",
header: "settings/header",
device: "settings/device",
// selectedIndex: "table/selectedIndex",
}),
classObj() {
return {
......@@ -153,19 +157,17 @@ export default {
},
created() {
this.selectedIndex = localStorage.getItem("selectedIndex") || ""
this.curSelectedIndex = String(this.selectedIndex)
? this.selectedIndex - 0
: -1
this.curSelectedIndex = String(this.selectedIndex) ? this.selectedIndex : ""
},
mounted() {
if (!this.selectedIndex) {
this.modalFlag = true
this.selectedIndex = 0
this.selectedIndex = "1"
} else {
this.selectedIndex = this.selectedIndex - 0
this.selectedIndex = this.selectedIndex
this.curSelectedIndex = String(this.selectedIndex)
? this.selectedIndex
: -1
: ""
}
// console.log(this.curSelectedIndex)
......@@ -187,7 +189,7 @@ export default {
setSelectedIndex() {
console.log(this.selectedIndex)
this.curSelectedIndex = this.selectedIndex
localStorage.setItem("selectedIndex", this.selectedIndex)
this.$store.commit("table/setSelectedIndex", this.selectedIndex)
this.modalFlag = false
},
openModalFlag() {
......
const state = {
fontIndex: localStorage.getItem("fontIndex") || 1,
fontSize: localStorage.getItem("fontSize") || 1,
selectedIndex: localStorage.getItem("selectedIndex") || "",
}
const getters = {
fontIndex: (state) => state.fontIndex,
fontSize: (state) => state.fontSize,
selectedIndex: (state) => state.selectedIndex,
}
const mutations = {
setFontIndex(state, fontIndex) {
state.fontIndex = fontIndex
setFontSize(state, fontSize) {
state.fontSize = fontSize
},
setSelectedIndex(state, selectedIndex) {
state.selectedIndex = selectedIndex
localStorage.setItem("selectedIndex", selectedIndex)
},
}
const actions = {}
......
......@@ -184,7 +184,7 @@ html {
.cell {
overflow: hidden;
font-size: $base-font-size-default;
// font-size: $base-font-size-default;
font-weight: normal;
color: #606266;
text-overflow: ellipsis;
......@@ -345,7 +345,6 @@ html {
}
}
.flex {
display: flex;
}
......@@ -374,4 +373,3 @@ html {
.fr {
float: right;
}
......@@ -4,6 +4,7 @@
<div class="left box">
<video :src="videoSrc" controls class="video" />
</div>
<!-- 新闻会议tab -->
<div class="right box tabbox">
<el-tabs v-model="curTab">
<el-tab-pane
......@@ -29,16 +30,39 @@
</div>
<!-- 数据分析 -->
<div class="dataAnalysis">
<div class="title_box">
<div class="title">数据分析</div>
<div class="empty"></div>
</div>
<div class="flex">
<div class="left box cenbox">
<div class="box_title text-center">联盟地图</div>
<img class="map" src="~@/assets/img/Home/map.png" alt="" />
</div>
<div class="right box cenbox cenboxs" style="background: transparent">
<div class="right box tabbox">
<el-tabs v-model="exTab">
<el-tab-pane
v-for="(e, index) in example"
:key="index"
:label="e.title"
:name="e.title"
>
<ul class="tabslist" style="height: 100%">
<li v-for="(item, index) in exampleList" :key="index">
<div class="left">
<div class="circle"></div>
{{ item.title }}
</div>
<div class="right">
{{ item.date }}
</div>
</li>
</ul>
</el-tab-pane>
</el-tabs>
</div>
</div>
</div>
<!-- 健康科普 -->
<div class="dataAnalysis">
<div class="flex" style="margin-bottom: 0px">
<div class="left box cenbox cenboxs" style="background: transparent">
<div class="range">
<div class="box_title text-center">累计上报量机构排名</div>
<div class="rangecontent">
......@@ -50,8 +74,8 @@
:style="{ color: index < 3 ? '#4E68FF' : '#333333' }"
>
<div>{{ index + 1 }}</div>
<div>{{ item.name }}</div>
<div>{{ item.value }}</div>
<div>{{ item.unionName }}</div>
<div>{{ item.nums }}</div>
</li>
</ul>
</div>
......@@ -62,42 +86,48 @@
<div class="top10"></div>
<ul class="rangeList">
<li
v-for="(item, index) in rangeList"
v-for="(item, index) in curQuarterList"
:key="index"
:style="{ color: index < 3 ? '#4E68FF' : '#333333' }"
>
<div>{{ index + 1 }}</div>
<div>{{ item.name }}</div>
<div>{{ item.value }}</div>
<div>{{ item.unionName }}</div>
<div>{{ item.nums }}</div>
</li>
</ul>
</div>
</div>
</div>
</div>
</div>
<!-- 健康科普 -->
<div class="healthPopularization">
<div class="title_box">
<div class="title">健康科普</div>
<div class="empty"></div>
</div>
<ul class="typeList">
<li
v-for="(item, index) in typeList"
:key="index"
:style="{ backgroundImage: 'url(' + item.src + ')' }"
@click="
$router.push({
path: '/healthpopularization',
query: { tabIndex: index },
})
"
<div
class="right box tabbox"
style="background: transparent; padding-top: 0px"
>
{{ item.name }}
</li>
</ul>
<!-- 健康科普 -->
<div class="healthPopularization">
<div class="title_box">
<div class="title">健康科普</div>
<div class="empty"></div>
</div>
<ul class="typeList">
<li
v-for="(item, index) in typeList"
:key="index"
:style="{ backgroundImage: 'url(' + item.src + ')' }"
@click="
$router.push({
path: '/healthpopularization',
query: { tabIndex: index },
})
"
>
{{ item.name }}
</li>
</ul>
</div>
</div>
</div>
</div>
<!-- 科学研究 -->
<div class="scientificresearch">
<div class="title_box">
......@@ -133,11 +163,28 @@
</div>
</template>
<script>
import { getRankTotal, getCurrentQuarter } from "@/api/Home"
export default {
data() {
return {
// videoSrc: require("../../../public/aaa.mp4"),
videoSrc: "",
exTab: "浙江省典型案例",
example: [
{
title: "浙江省典型案例",
},
],
exampleList: [
{
title: "典型案例小标题典型案例小标题",
date: "2022-09-26",
},
{
title: "典型案例小标题典型案例小标题",
date: "2022-09-26",
},
],
tabList: [
{
title: "新闻会议",
......@@ -188,18 +235,8 @@ export default {
},
],
curTab: "新闻会议",
rangeList: [
{ name: "包头医学院第二附属医院", value: 12345 },
{ name: "温州市中心医院", value: 222 },
{ name: "南方医科大学南海医院", value: 12345 },
{ name: "包头医学院第二附属医院", value: 12345 },
{ name: "包头医学院第二附属医院", value: 12345 },
{ name: "包头医学院第二附属医院", value: 12345 },
{ name: "包头医学院第二附属医院", value: 12345 },
{ name: "包头医学院第二附属医院", value: 12345 },
{ name: "包头医学院第二附属医院", value: 12345 },
{ name: "包头医学院第二附属医院", value: 12345 },
],
rangeList: [], // 上报排名
curQuarterList: [], //当前季度排名
typeList: [
{
src: require("@/assets/img/Home/shaicha.png"),
......@@ -239,19 +276,39 @@ export default {
},
watch: {},
mounted() {
console.log(document.querySelector("#vue-admin-beautiful"))
document
.querySelector("#vue-admin-beautiful")
.addEventListener("scroll", () => {
let scrollTop = document.querySelector("#vue-admin-beautiful").scrollTop
if (scrollTop >= 700) {
this.showFixed = true
} else {
this.showFixed = false
this.getRankTotal()
this.getCurrentQuarter()
// console.log(document.querySelector("#vue-admin-beautiful"))
this.$nextTick(() => {
document
.querySelector("#vue-admin-beautiful")
.addEventListener("scroll", () => {
let scrollTop = document.querySelector("#vue-admin-beautiful")
.scrollTop
if (scrollTop >= 700) {
this.showFixed = true
} else {
this.showFixed = false
}
})
})
},
methods: {
getRankTotal() {
getRankTotal().then((res) => {
if (res.code == 1) {
this.rangeList = res.data
}
})
},
getCurrentQuarter() {
getCurrentQuarter().then((res) => {
if (res.code == 1) {
this.curQuarterList = res.data
}
})
},
},
methods: {},
}
</script>
<style lang="scss" scoped>
......@@ -262,7 +319,7 @@ export default {
margin-bottom: 38px;
.box {
width: 48%;
height: 300px;
// height: 300px;
// background: blue;
background: #fff;
.video {
......@@ -277,7 +334,11 @@ export default {
.tabslist {
height: 220px;
padding-right: 8px;
overflow: auto;
overflow: hidden;
&:hover {
overflow: overlay;
}
li {
display: flex;
align-items: center;
......@@ -371,13 +432,14 @@ export default {
}
}
.healthPopularization {
margin-bottom: 38px;
.typeList {
display: flex;
flex-wrap: wrap;
justify-content: space-between;
li {
cursor: pointer;
width: 22%;
width: 43%;
margin-bottom: 24px;
height: 188px;
display: flex;
justify-content: center;
......
......@@ -42,6 +42,7 @@
import paginationMixin from "@/components/TabComponents/mixin"
import { getPatientPage } from "@/api/patient.js"
import ConfigForms from "./components/ConfigForms.vue"
import { mapGetters } from "vuex"
export default {
name: "ScreeningIndex",
mixins: [paginationMixin],
......@@ -55,73 +56,149 @@ export default {
cacheForm: {},
searchList: [
{
type: "input",
label: "姓名",
prop: "patientName",
type: "date",
label: "筛查时间",
prop: "createTime",
placeholder: "请选择时间",
valueFormat: "yyyy-MM-dd",
},
{
label: "筛查审核状态",
type: "select",
prop: "checkStatus",
opts: [
{ label: "待审核", value: "1" },
{ label: "驳回修改", value: "2" },
{ label: "合格", value: "3" },
{ label: "不合格", value: "4" },
],
},
{
label: "风险评估结果",
type: "select",
prop: "riskRank",
opts: [
{ label: "低危", value: "c" },
{ label: "中危", value: "b" },
{ label: "高危", value: "a" },
],
},
{
label: "性别",
type: "select",
prop: "gender",
prop: "sex",
optsFormatter: () => {
return this.dictMap && this.dictMap["d-sex"]
},
},
{
type: "daterange",
dateType: "datetimerange",
label: "创建时间",
prop: "CreateTime",
valueFormat: "yyyy-MM-dd HH:mm:ss",
},
{
type: "daterange",
dateType: "datetimerange",
label: "保存时间",
prop: "Time",
valueFormat: "yyyy-MM-dd HH:mm:ss",
type: "input",
label: "关键词",
placeholder: "请输入医联体/姓名/身份证",
prop: "keyParam",
},
{
type: "button",
icon: "el-icon-search",
value: "搜索",
value: "查询",
},
],
columns: [
{
label: "姓名",
label: "医联体",
minWidth: 120,
value: "hzxx_xm",
value: "unionName",
formatter: (row) => {
return row.unionName ? row.unionName : "--"
},
},
{
label: "出生日期",
label: "姓名",
minWidth: 120,
value: "hzxx_csrq",
formatter: (row) => {
return row.name ? row.name : "--"
},
value: "name",
},
{
label: "性别",
minWidth: 80,
value: "hzxx_xb",
value: "sex",
formatter: (row) => {
return this.$handle.formatDicList(
this.dictMap["d-sex"],
row.hzxx_xb
)
return row.sex
? this.$handle.formatDicList(this.dictMap["d-sex"], row.sex + "")
: "--"
},
},
{
label: "创建时间",
minWidth: 180,
sortable: "custom",
value: "create_time",
label: "身份证",
minWidth: 120,
value: "idCard",
formatter: (row) => {
return row.idCard ? row.idCard : "--"
},
},
{
label: "年龄",
minWidth: 120,
value: "age",
formatter: (row) => {
return row.age ? row.age : "--"
},
},
{
label: "保存时间",
label: "筛查时间",
minWidth: 180,
sortable: "custom",
value: "update_time",
// sortable: "custom",
value: "createTime",
formatter: (row) => {
return row.createTime ? row.createTime : "--"
},
},
{
label: "风险评估结果",
minWidth: 120,
value: "riskRank",
formatter: (row) => {
return row.riskRank ? row.riskRank : "--"
},
},
{
label: "是否内镜",
minWidth: 120,
value: "isInnerCheck",
formatter: (row) => {
let arr = [
{ label: "", value: "0" },
{ label: "", value: "1" },
]
let label
if (String(row.isInnerCheck)) {
label = arr.filter((e) => e.value == row.isInnerCheck)[0].label
} else {
label = "--"
}
return label
},
},
{
label: "筛查审核状态",
minWidth: 120,
value: "checkStatus",
formatter: (row) => {
let arr = [
{ label: "待审核", value: "1" },
{ label: "驳回修改", value: "2" },
{ label: "合格", value: "3" },
{ label: "不合格", value: "4" },
]
let label
if (row.checkStatus) {
label = arr.filter((e) => e.value == row.checkStatus)[0].label
} else {
label = "--"
}
return label
},
},
{
label: "操作",
......@@ -141,15 +218,26 @@ export default {
{
func: this.handleAdd,
formatter(row) {
return {
label: "修改",
type: "text",
if (row.checkStatus != 3 && row.checkStatus != 4) {
return {
label: "修改",
type: "text",
}
} else {
return {
label: "",
type: "text",
style: {
display: "none",
},
}
}
},
},
],
},
],
searchForm: {},
}
},
methods: {
......@@ -170,6 +258,7 @@ export default {
},
// 查询
handleFormSearch(form) {
this.searchForm = form
this.pageIndex = 1
this.handleSearch(form)
},
......@@ -179,16 +268,18 @@ export default {
const data = {}
for (let key in params) {
if (params[key] !== "" && params[key] !== null) {
if (key.includes("Time") && params[key]) {
data["start" + key] = params[key][0]
data["end" + key] = params[key][1]
} else {
data[key] = params[key]
}
// if (key.includes("Time") && params[key]) {
// data["start" + key] = params[key][0]
// data["end" + key] = params[key][1]
// } else {
data[key] = params[key]
// }
}
}
data.current = this.pageIndex
data.size = this.pageSize
data.isGraft = 0
data.patientFrom = this.selectedIndex
getPatientPage(data).then((res) => {
this.listLoading = false
if (res.code === 1) {
......@@ -199,8 +290,18 @@ export default {
})
},
},
computed: {
...mapGetters({
selectedIndex: "table/selectedIndex",
}),
},
created() {
// this.handleFormSearch()
this.handleFormSearch()
},
watch: {
selectedIndex(v) {
this.handleFormSearch(this.searchForm)
},
},
}
</script>
......
......@@ -181,6 +181,7 @@ export default {
methods: {
// 获取list
getMedicalunionList() {
this.listLoading = true
medicalunionList({
size: this.pageSize,
current: this.pageIndex,
......@@ -188,6 +189,7 @@ export default {
if (res.code == 1) {
this.total = res.data.total
this.tableData = res.data.records
this.listLoading = false
}
})
},
......
......@@ -20,21 +20,30 @@
@currentPageChange="handleCurrentChange"
/>
<dialog-form
ref="dialog"
width="750px"
:close-modal="false"
ref="dialog"
:title="title"
:form-edit="formEdit"
:form-data="formData"
@handleConfirm="handleConfirm"
></dialog-form>
<dialog-form
width="450px"
ref="role"
width="450px"
title="角色授权"
:form-data="formDataRole"
@handleConfirm="handleRoleConfirm"
></dialog-form>
<dialog-form
ref="consortiaRole"
width="450px"
title="医联体授权"
:form-data="consortiaDataRole"
:current="current"
@handleConfirm="handleConsortiaConfirm"
@loadMore="loadMore"
></dialog-form>
</div>
</template>
......@@ -50,10 +59,12 @@ import {
resetPassword,
} from "@/api/user"
import { getOrgList, getDepartPage } from "@/api/org"
import { medicalunionList, baseUnion } from "@/api/medicalunion-management"
import { mapGetters } from "vuex"
export default {
name: "user",
name: "User",
mixins: [paginationMixin],
data() {
const isAdmin = this.$store.getters["user/roles"].find(
(_) => _.roleCode === "admin"
......@@ -72,7 +83,6 @@ export default {
})
}
})
const orgList = []
getOrgList().then((res) => {
if (res.code === 1) {
......@@ -95,6 +105,7 @@ export default {
}
return {
listLoading: false,
current: 1,
isAdd: false,
id: null,
// 查询列表
......@@ -119,6 +130,7 @@ export default {
func: this.handleAdd,
},
],
searchQuery: "",
columns: [
{
label: "用户姓名",
......@@ -201,6 +213,14 @@ export default {
color: "#409EFF",
},
},
{
func: this.handleConsortia,
icon: "el-icon-office-building",
label: "医联体授权",
style: {
color: "#67C23A",
},
},
{
func: this.handleReset,
label: "重置密码",
......@@ -350,10 +370,25 @@ export default {
multiple: true,
},
],
consortiaList: [],
consortiaDataRole: [
{
type: "remote",
label: "医联体",
placeholder: "请输入医联体",
prop: "consortiaList",
opts: [],
multiple: true,
remoteFunc: this.searchConsortia,
rules: [
{ required: true, message: "请选择医联体", trigger: "change" },
],
multiple: true,
},
],
originalList: [],
}
},
mixins: [paginationMixin],
computed: {
...mapGetters({
roles: "user/roles",
......@@ -363,7 +398,60 @@ export default {
return this.roles.find((_) => _.roleCode === "admin")
},
},
created() {
this.handleFormSearch()
this.loadMore()
},
methods: {
loadMore(current = 1) {
let params = {
current: current,
unionName: this.searchQuery ? this.searchQuery : undefined,
size: 20,
}
medicalunionList(params).then((res) => {
if (res.code === 1) {
const d = res.data.records || []
if (d.length > 0) {
this.current = res.data.current - 0
d.forEach((item) => {
this.consortiaList.push({
label: item.unionName,
value: item.id,
})
})
this.consortiaDataRole[0].opts = [...this.consortiaList]
}
}
})
},
searchConsortia(query) {
if (query !== "") {
// this.loading = true
this.searchQuery = query
console.log(query)
this.consortiaList = []
this.consortiaDataRole[0].opts = []
this.loadMore()
// this.consortiaList = []
} else {
this.options = []
}
},
handleConsortiaConfirm(unionIds) {
console.log(unionIds, this.rowId)
const data = {
userId: this.rowId,
unionIds: unionIds.consortiaList,
}
baseUnion(data).then((res) => {
if (res.code === 1) {
this.$message.success("授权成功")
this.handleSearch()
this.$refs.consortiaRole.close()
}
})
},
orgChange(orgId) {
const list = []
this.$refs.dialog.initFields({ deptId: "" })
......@@ -439,6 +527,10 @@ export default {
}
})
},
handleConsortia({ id }) {
this.rowId = id
this.$refs.consortiaRole.open()
},
handleRoleConfirm(form) {
const data = {
roleList: this.originalList.concat(form.roleList).map((_) => {
......@@ -559,8 +651,5 @@ export default {
this.$router.push(`detail?id=${row.id}`)
},
},
created() {
this.handleFormSearch()
},
}
</script>
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