...
 
Commits (24)
NODE_ENV = 'production' NODE_ENV = 'production'
VUE_APP_BASE_API = '/disease-api/' VUE_APP_BASE_API = '/geca-api/'
<template>
<div class="widget-config">
<el-form
label-suffix=":"
v-if="this.data && Object.keys(this.data).length > 0"
labelPosition="left"
labelWidth="110px"
size="small"
>
<el-collapse v-model="collapse">
<el-collapse-item name="1" title="基本属性">
<el-form-item label="类型" v-if="data.type && !data.component">
<el-select
v-model="data.type"
style="width: 100%"
placeholder="请选择类型"
@change="handleChangeType"
:disabled="fieldNotEdit"
>
<el-option-group
v-for="group in fields"
:key="group.title"
:label="group.title"
>
<el-option
v-for="item in group.list"
:key="item.type"
:label="item.label"
:value="item.type"
>
</el-option>
</el-option-group>
</el-select>
</el-form-item>
<el-form-item label="属性值">
<el-input
v-model="data.prop"
clearable
placeholder="属性值"
:disabled="fieldNotEdit || propNotEdit"
></el-input>
</el-form-item>
<el-form-item label="标题">
<el-input
v-model="data.label"
clearable
placeholder="标题"
:disabled="
fieldNotEdit && !['group', 'dynamic'].includes(data.type)
"
></el-input>
</el-form-item>
<el-form-item label="宽度" v-if="data.subfield">
<el-input-number
style="width: 100%"
v-model="data.width"
controls-position="right"
placeholder="宽度"
:min="100"
></el-input-number>
</el-form-item>
<el-form-item
label="表单栅格"
v-if="!data.subfield && !['group'].includes(data.type)"
>
<el-input-number
style="width: 100%"
v-model="data.span"
controls-position="right"
placeholder="表单栅格"
:min="8"
:max="24"
></el-input-number>
</el-form-item>
<el-form-item
label="数据类型"
v-if="
[
'cascader',
'checkbox',
'radio',
'select',
'tree',
'upload',
'img',
'array',
'slider',
'timerange',
'daterange',
'datetimerange',
].includes(data.type)
"
>
<template slot="label">
<el-link
:underline="false"
href="https://avuejs.com/doc/dataType"
target="_blank"
>数据类型 <i class="el-icon-question"></i
></el-link>
</template>
<el-select
v-model="data.dataType"
placeholder="数据类型"
clearable
style="width: 100%"
>
<el-option label="String" value="string"></el-option>
<el-option label="Number" value="number"></el-option>
<el-option label="Array" value="array"></el-option>
</el-select>
</el-form-item>
<el-form-item label="深结构" v-if="data.type && !data.component">
<template slot="label">
<el-link
:underline="false"
href="https://avuejs.com/doc/form/form-bind"
target="_blank"
>深结构 <i class="el-icon-question"></i
></el-link>
</template>
<el-input
v-model="data.bind"
clearable
placeholder="深结构"
></el-input>
</el-form-item>
<el-form-item label="字段提示">
<template slot="label">
<el-link
:underline="false"
href="https://avuejs.com/doc/form/form-tip"
target="_blank"
>字段提示 <i class="el-icon-question"></i
></el-link>
</template>
<el-input
v-model="data.tip"
clearable
placeholder="字段提示"
></el-input>
</el-form-item>
<el-form-item
v-if="data.tip && !['upload'].includes(data.type)"
label="字段提示位置"
label-width="110px"
>
<el-select
v-model="data.tipPlacement"
placeholder="字段提示位置"
style="width: 100%"
clearable
>
<el-option label="上" value="top"></el-option>
<el-option label="下" value="bottom"></el-option>
<el-option label="左" value="left"></el-option>
<el-option label="右" value="right"></el-option>
</el-select>
</el-form-item>
<el-form-item label="标题提示">
<template slot="label">
<el-link
:underline="false"
href="https://avuejs.com/doc/form/form-tip"
target="_blank"
>标题提示 <i class="el-icon-question"></i
></el-link>
</template>
<el-input
v-model="data.labelTip"
clearable
placeholder="标题提示"
></el-input>
</el-form-item>
<el-form-item
v-if="data.labelTip && !['upload'].includes(data.type)"
label="标题提示位置"
label-width="110px"
>
<el-select
v-model="data.labelTipPlacement"
placeholder="标题提示位置"
clearable
>
<el-option label="上" value="top"></el-option>
<el-option label="下" value="bottom"></el-option>
<el-option label="左" value="left"></el-option>
<el-option label="右" value="right"></el-option>
</el-select>
</el-form-item>
<component :is="getComponent" :data="data"></component>
</el-collapse-item>
<el-collapse-item
name="2"
title="事件属性"
v-if="!['group', 'dynamic'].includes(data.type)"
>
<el-form-item label="change">
<el-input
v-model="data.change"
type="textarea"
placeholder="改变事件"
rows="5"
clearable
></el-input>
</el-form-item>
<el-form-item label="click">
<el-input
v-model="data.click"
type="textarea"
placeholder="点击事件"
rows="5"
></el-input>
</el-form-item>
<el-form-item label="focus">
<el-input
v-model="data.focus"
type="textarea"
placeholder="获取焦点事件"
rows="5"
></el-input>
</el-form-item>
<el-form-item label="blur">
<el-input
v-model="data.blur"
type="textarea"
placeholder="失去焦点事件"
rows="5"
></el-input>
</el-form-item>
</el-collapse-item>
<slot name="dbtable"></slot>
<el-collapse-item
name="99"
title="其他"
v-if="!['group', 'dynamic', 'title'].includes(data.type)"
>
<dynamic-sh :data="data"></dynamic-sh>
</el-collapse-item>
</el-collapse>
</el-form>
<div>拖拽字段进行配置</div>
</div>
</template>
<script>
import fields from "./fieldsConfig.js"
import DynamicSh from "./components/DynamicSh"
const dateArr = [
"year",
"month",
"week",
"date",
"datetime",
"time",
"daterange",
"timerange",
"datetimerange",
"dates",
]
export default {
name: "widget-config",
components: { DynamicSh },
props: {
data: {
type: Array | Object,
},
fieldNotEdit: {
type: Boolean,
default: false,
},
propNotEdit: {
type: Boolean,
default: false,
},
},
computed: {
getComponent() {
const prefix = "config-"
const { type, component } = this.data
if ((!type || component) && type != "ueditor") return prefix + "custom"
let result = "input"
if ([undefined, "input", "password", "url"].includes(type))
result = "input"
else if (dateArr.includes(type)) result = "date"
else if (["array", "img"].includes(type)) result = "array"
else if (["tree", "cascader"].includes(type)) result = "tree"
else if (["radio", "checkbox", "select"].includes(type)) result = "select"
else result = type
return prefix + result
},
},
data() {
return {
fields,
collapse: "1",
}
},
methods: {
async handleChangeType(type) {
if (type) {
const config = await this.getConfigByType(type)
config.prop = this.data.prop
for (let key in config) {
if (
config &&
Object.prototype.hasOwnProperty.call(config, key) &&
!["icon", "label", "span"].includes(key)
) {
const val = config[key]
this.$set(this.data, key, val)
}
}
}
},
getConfigByType(type) {
return new Promise((resolve, reject) => {
fields.forEach((field) => {
field.list.forEach((config) => {
if (config.type == type) resolve(config)
})
})
reject()
})
},
},
}
</script>
<style lang="scss">
.widget-config {
ul {
margin: 0;
padding: 0;
li {
display: flex;
align-items: center;
width: 100%;
.ghost {
list-style: none;
font-size: 0;
height: 35px;
}
}
}
}
</style>
...@@ -40,9 +40,6 @@ ...@@ -40,9 +40,6 @@
:disabled="propNotEdit" :disabled="propNotEdit"
></el-input> ></el-input>
</el-form-item> </el-form-item>
<el-form-item label="数据库">
<el-input :value="data.tableCode" clearable disabled></el-input>
</el-form-item>
<el-form-item label="标题"> <el-form-item label="标题">
<el-input <el-input
v-model="data.label" v-model="data.label"
......
<template>
<div>
<span
v-if="item.type == 'title'"
:style="item.styles"
style="margin-left: 5px"
>
{{ item.value }}
</span>
<component
v-else
:is="getComponent(item.type, item.component)"
v-bind="
Object.assign(deepClone(item), params, { size: item.size || 'small' })
"
:multiple="false"
:placeholder="item.placeholder || getPlaceholder(item)"
:dic="item.dicData"
:value="
['time', 'timerange', 'checkbox'].includes(item.type)
? item.dicData
: undefined
"
>
<span v-if="params.html" v-html="params.html"></span>
</component>
</div>
</template>
<script>
export default {
name: "widget-form-item",
props: {
item: {
type: Object,
default: () => {
return {}
},
},
params: {
type: Object,
default: () => {
return {}
},
},
},
data() {
return {
form: {},
}
},
methods: {
getComponent(type, component) {
let KEY_COMPONENT_NAME = "avue-"
let result = "input"
if (component) return component
else if (["array", "img", "url"].includes(type)) result = "array"
else if (type === "select") result = "select"
else if (type === "radio") result = "radio"
else if (type === "checkbox") result = "checkbox"
else if (["time", "timerange"].includes(type)) result = "time"
else if (
[
"dates",
"date",
"datetime",
"datetimerange",
"daterange",
"week",
"month",
"year",
].includes(type)
)
result = "date"
else if (type === "cascader") result = "cascader"
else if (type === "number") result = "input-number"
else if (type === "password") result = "input"
else if (type === "switch") result = "switch"
else if (type === "rate") result = "rate"
else if (type === "upload") result = "upload"
else if (type === "slider") result = "slider"
else if (type === "dynamic") result = "dynamic"
else if (type === "icon") result = "input-icon"
else if (type === "color") result = "input-color"
else if (type === "map") result = "input-map"
return KEY_COMPONENT_NAME + result
},
getPlaceholder(item) {
const label = item.label
if (
[
"select",
"checkbox",
"radio",
"tree",
"color",
"dates",
"date",
"datetime",
"datetimerange",
"daterange",
"week",
"month",
"year",
"map",
"icon",
].includes(item.type)
)
return `请选择 ${label}`
else return `请输入 ${label}`
},
},
}
</script>
...@@ -224,6 +224,9 @@ export default { ...@@ -224,6 +224,9 @@ export default {
if (data.type === "dynamic") { if (data.type === "dynamic") {
data.prop = "fixed_field" data.prop = "fixed_field"
} }
if (data.type == "title") {
delete data.label
}
data.cType = column.children.type === "form" ? "form" : "table" data.cType = column.children.type === "form" ? "form" : "table"
data.subfield = true data.subfield = true
delete data.icon delete data.icon
......
...@@ -4,12 +4,12 @@ module.exports = { ...@@ -4,12 +4,12 @@ module.exports = {
useTabs: false, useTabs: false,
semi: false, semi: false,
singleQuote: false, singleQuote: false,
quoteProps: 'as-needed', quoteProps: "as-needed",
jsxSingleQuote: false, jsxSingleQuote: false,
trailingComma: 'es5', trailingComma: "es5",
bracketSpacing: true, bracketSpacing: true,
jsxBracketSameLine: false, jsxBracketSameLine: false,
arrowParens: 'always', arrowParens: "always",
vueIndentScriptAndStyle: false, vueIndentScriptAndStyle: false,
endOfLine: 'lf', endOfLine: "auto",
} }
...@@ -18,6 +18,8 @@ export default { ...@@ -18,6 +18,8 @@ export default {
} }
#vue-admin-beautiful { #vue-admin-beautiful {
height: 100vh;
overflow: auto;
margin-right: calc(100% - 100vw); margin-right: calc(100% - 100vw);
} }
</style> </style>
...@@ -341,7 +341,7 @@ export function getQualityDetail(patientId) { ...@@ -341,7 +341,7 @@ export function getQualityDetail(patientId) {
// 协作组参数配置新增/修改 // 协作组参数配置新增/修改
export function setParamConfig(data) { export function setParamConfig(data) {
return request({ return request({
url: `/disease-data/sys/paramConfig/addOrUpdate`, url: `/disease-data/param/config`,
method: "post", method: "post",
data, data,
}) })
...@@ -350,7 +350,7 @@ export function setParamConfig(data) { ...@@ -350,7 +350,7 @@ export function setParamConfig(data) {
// 协作组参数配置列表 // 协作组参数配置列表
export function getParamConfigList(params) { export function getParamConfigList(params) {
return request({ return request({
url: `/disease-data/sys/paramConfig/list`, url: `/disease-data/param/config/page`,
method: "get", method: "get",
params, params,
}) })
...@@ -359,7 +359,7 @@ export function getParamConfigList(params) { ...@@ -359,7 +359,7 @@ export function getParamConfigList(params) {
// 删除配置 // 删除配置
export function delParamConfig(id) { export function delParamConfig(id) {
return request({ return request({
url: `/disease-data/sys/paramConfig/${id}`, url: `/disease-data/param/config?id=${id}`,
method: "delete", method: "delete",
}) })
} }
import request from "@/utils/request"
import { add } from "lodash"
/* 数据库管理 */
export function getDbPage(params = {}) {
return request({
url: "/cloud-upms/sys/db/info/page",
method: "get",
params,
})
}
export function getDbList(params = {}) {
return request({
url: "/cloud-upms/sys/db/info/list",
method: "get",
params,
})
}
export function addDb(data = {}) {
return request({
url: "/cloud-upms/sys/db/info",
method: "post",
data,
})
}
// 测试连接
export function testDb(data = {}) {
return request({
url: "/cloud-upms/sys/db/info/test/connection",
method: "post",
data,
})
}
// 根据数据库id 查数据表
export function getTableList(id) {
return request({
url: `/cloud-upms/sys/table/list?dbId=${id}`,
method: "get",
})
}
// 新增数据表
export function addDbTable(data = {}) {
return request({
url: "/cloud-upms/sys/table",
method: "post",
data,
})
}
import request from "@/utils/request"
export function getEncryptList(params = {}) {
return request({
url: `/disease-data/data/patient/page/encrypted/test`,
method: "get",
params,
})
}
...@@ -12,6 +12,7 @@ export function getFieldPage(params = {}) { ...@@ -12,6 +12,7 @@ export function getFieldPage(params = {}) {
params, params,
}) })
} }
export function delField(id) { export function delField(id) {
return request({ return request({
url: `/cloud-upms/field/dict/${id}`, url: `/cloud-upms/field/dict/${id}`,
...@@ -84,7 +85,7 @@ export function copyForm(data = {}) { ...@@ -84,7 +85,7 @@ export function copyForm(data = {}) {
// 获取 // 获取
export function getFormDetail(id) { export function getFormDetail(id) {
return request({ return request({
url: `/cloud-upms//org/form/${id}`, url: `/cloud-upms/org/form/${id}`,
method: "get", method: "get",
}) })
} }
......
import request from "@/utils/request"
/* 患者数据 */
export function getPatientPage(params = {}) {
let url = "/disease-data/data/patient/page?"
let keys = Object.keys(params)
for (let key of keys) {
url += `${encodeURIComponent(key)}=${params[key]}&`
}
url = url.substring(0, url.length - 1)
return request({
url: url,
method: "get",
})
}
// 随访分页
export function getPatientFollowPage(params = {}) {
let url = "/disease-data/data/patient/follow/page?"
let keys = Object.keys(params)
for (let key of keys) {
url += `${encodeURIComponent(key)}=${params[key]}&`
}
url = url.substring(0, url.length - 1)
return request({
url: url,
method: "get",
})
}
export function delPatient(id) {
return request({
url: `/cloud-upms/sys/menu/${id}`,
method: "delete",
})
}
// 填报
export function addPatient(data = {}, type = "") {
return request({
url: `/disease-data/data/patient/${type}`,
method: "post",
data,
})
}
/* 患者数据详情 */
export function getPatientDetail(params = {}) {
return request({
url: "/disease-data/data/patient/info",
method: "get",
params,
})
}
/* 获取表单填报记录list*/
export function getRecordList(params = {}) {
return request({
url: "/disease-data/data/patient/form/record/list",
method: "get",
params,
})
}
// 患者质控列表 分页查询
export function getQcPage(params = {}) {
return request({
url: "/disease-data/data/qc/page",
method: "get",
params,
})
}
// 质控
export function qcPatient(data = {}, type = "") {
return request({
url: `/disease-data/data/qc`,
method: "post",
data,
})
}
// 获取九院口腔癌患者信息(同屏对照使用)
export function getJYpatientInfo(params = {}) {
return request({
url: "/jiuyuan-gather/patient/kqa/info",
method: "get",
params,
})
}
// 获取九院口腔癌随访表(同屏对照使用)
export function getJYFollowInfo(params = {}) {
return request({
url: "/jiuyuan-gather/patient/kqa/follow/info",
method: "get",
params,
})
}
// 获取同济口腔 牙周病(yzb) | 口腔癌(kqa) 患者信息(同屏对照使用)
export function getTJpatientInfo(params = {}, diseases = "yzb") {
return request({
url: `/tjkq-gather/patient/${diseases}/info`,
method: "get",
params,
})
}
// 获取九院牙周炎患者信息(同屏对照使用)
export function getJYyzyPatientInfo(params = {}) {
return request({
url: "/jiuyuan-gather/patient/yzy/info",
method: "get",
params,
})
}
// 获取急性胰腺炎患者信息/检查信息/术治疗(同屏对照使用)
export function getJxyzyPatientInfo(type, params = {}) {
return request({
url: `/changhai-gather/patient/${type}/info`,
method: "get",
params,
})
}
// 获取中山医院病历/检查信息/治疗(同屏对照使用)
export function getZsyzyPatientInfo(params = {}) {
return request({
url: "/zsyzy-gather/patient/yzb/info",
method: "get",
params,
})
}
// 急性胰腺炎-评分表
// 评分表新增修改
export function saveApScore(data = {}) {
return request({
url: `disease-data/ap/score`,
method: "post",
data,
})
}
// 根据patientId查询评分表数据
export function getApScore(patientId) {
return request({
url: `/disease-data/ap/score/list?patientId=${patientId}`,
method: "get",
})
}
// 根据patientId+type查询(评分趋势图用)
export function getApScoreTypeList(params = {}) {
return request({
url: "disease-data/ap/score/type/list",
method: "get",
params,
})
}
// 根据patientId, scoreId查询detailList
export function getApScoreDetailList(params = {}) {
return request({
url: "/disease-data/ap/score/detail/list",
method: "get",
params,
})
}
...@@ -141,25 +141,21 @@ export function ssoLogin(token) { ...@@ -141,25 +141,21 @@ export function ssoLogin(token) {
}) })
} }
//异常反馈 //异常反馈
export function getAbnormalList(params) { export function getAbnormalList(params) {
return request({ return request({
url: `/disease-data/sys/message/exception/feedBack/select/all/msg`, url: `/disease-data/sys/message/exception/feedBack/select/all/msg`,
method: "get", method: "get",
params params,
}) })
} }
// 修改系统信息-点击单条消息(进行已读操作) // 修改系统信息-点击单条消息(进行已读操作)
export function setAbnormalStatus(params) { export function setAbnormalStatus(params) {
return request({ return request({
url: `/disease-data/sys/message/exception/feedBack/do/read`, url: `/disease-data/sys/message/exception/feedBack/do/read`,
method: "get", method: "get",
params params,
}) })
} }
...@@ -171,3 +167,11 @@ export function getFeedBackNumber(id) { ...@@ -171,3 +167,11 @@ export function getFeedBackNumber(id) {
}) })
} }
// 获取B端日志
export function getLogPage(params = {}) {
return request({
url: "/cloud-upms/sys/log/page",
method: "get",
params,
})
}
@charset "UTF-8";
/*针对英文单词,强制让单词换行,break-word不拆分单词, break-all拆分单词*/
* {
word-wrap: break-word; /*word-break: break-all;*/
}
html {
//font-size: calc(100vw / 7.5); /*1rem = 100px*/
}
body {
font-family: "Helvetica", "Tahoma", "Arial", "PingFang SC", "Microsoft Yahei",
"SimSun", "SimHei", "sans-serif";
color: #666;
background: #fff;
font-size: 14px;
}
.break-all {
word-break: break-all;
}
/*对齐方式*/
.text-left {
text-align: left;
}
.text-right {
text-align: right;
}
.text-center {
text-align: center;
}
/*图片居左、右、中*/
.img-left {
display: inline;
float: left;
}
.img-right {
display: inline;
float: right;
}
.img-center {
clear: both;
display: block;
margin: auto;
}
/*父容器要清除浮动*/
/*隐藏文字*/
.text-indent {
text-indent: -9999em;
}
.seo-text {
font-size: 0;
line-height: 0;
overflow: hidden;
}
/*图片控制尺寸*/
.img-overflow {
width: 100%;
height: 100%;
overflow: hidden;
}
/*img自适应*/
.img-responsive {
max-width: 100%;
height: auto;
display: block;
}
img {
border: none;
}
/*清除浮动*/
.fl {
float: left;
_display: inline;
*zoom: 1;
}
.fr {
float: right;
_display: inline;
*zoom: 1;
}
.clearfix {
*zoom: 1;
}
.clearfix:before,
.clearfix:after {
display: table;
line-height: 0;
content: "";
}
.clearfix:after {
clear: both;
}
/*外边距px*/
.margin-auto {
margin-left: auto;
margin-right: auto;
}
.mb30 {
margin-bottom: 30px;
}
/*字体加粗*/
.bold {
font-weight: bold;
}
/*1行显示省略号*/
.ellipsis {
width: 100%;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
display: block;
}
/*默认2行显示省略号 只适用于webkit内核*/
.ellipses-line2 {
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
}
.ellipses-line4 {
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 4;
-webkit-box-orient: vertical;
}
/*placeholder重置字体颜色*/
input::-webkit-input-placeholder,
textarea::-webkit-input-placeholder {
color: #999 !important;
font-size: 12px;
}
input:-moz-placeholder,
textarea:-moz-placeholder {
color: #999 !important;
font-size: 12px;
}
input:-ms-input-placeholder,
textarea:-ms-input-placeholder {
color: #999 !important;
font-size: 12px;
}
// 美化滚动条
::-webkit-scrollbar-track-piece {
background-color: #fff;
-webkit-border-radius: 0;
opacity: 0.5;
}
::-webkit-scrollbar {
width: 6px;
height: 10px;
}
::-webkit-scrollbar-thumb {
height: 30px;
background-color: #b8b8b8;
-webkit-border-radius: 6px;
outline: 1px solid transparent;
outline-offset: -2px;
border: 1px solid transparent;
filter: alpha(opacity = 30);
-moz-opacity: .5;
opacity: .5;
}
::-webkit-scrollbar-thumb:hover {
height: 30px;
background-color: #878987;
-webkit-border-radius: 6px;
}
/*隐藏*/
.hidden {
display: none;
}
.visible {
display: block;
}
/*将dcss容器里的所有元素设为默认值*/
.dcss html,
.dcss address,
.dcss blockquote,
.dcss body,
.dcss dd,
.dcss div,
.dcss dl,
.dcss dt,
.dcss fieldset,
.dcss form,
.dcss frame,
.dcss frameset,
.dcss h1,
.dcss h2,
.dcss h3,
.dcss h4,
.dcss h5,
.dcss h6,
.dcss noframes,
.dcss ol,
.dcss p,
.dcss ul,
.dcss center,
.dcss dir,
.dcss hr,
.dcss menu,
.dcss pre {
display: block;
}
.dcss li {
display: list-item;
}
.dcss head {
display: none;
}
.dcss table {
display: table;
}
.dcss tr {
display: table-row;
}
.dcss thead {
display: table-header-group;
}
.dcss tbody {
display: table-row-group;
}
.dcss tfoot {
display: table-footer-group;
}
.dcss col {
display: table-column;
}
.dcss colgroup {
display: table-column-group;
}
.dcss td,
.dcss th {
display: table-cell;
}
.dcss caption {
display: table-caption;
}
.dcss th {
font-weight: bolder;
text-align: center;
}
.dcss caption {
text-align: center;
}
.dcss body {
margin: 8px;
line-height: 1.12;
}
.dcss h1 {
font-size: 2em;
margin: 0.67em 0;
line-height: 1.5em;
}
.dcss h2 {
font-size: 1.5em;
margin: 0.75em 0;
line-height: 1.5em;
}
.dcss h3 {
font-size: 1.17em;
margin: 0.83em 0;
line-height: 1.5em;
}
.dcss h4 {
font-size: 1.09em;
margin: 1.12em 0;
line-height: 1.5em;
}
.dcss h4,
.dcss p,
.dcss blockquote,
.dcss ul,
.dcss fieldset,
.dcss form,
.dcss ol,
.dcss dl,
.dcss dir,
.dcss menu {
margin: 1.12em 0;
}
.dcss h5 {
font-size: 0.83em;
margin: 1.5em 0;
line-height: 1.5em;
}
.dcss h6 {
font-size: 0.75em;
margin: 1.67em 0;
line-height: 1.5em;
}
.dcss h1,
.dcss h2,
.dcss h3,
.dcss h4,
.dcss h5,
.dcss h6,
.dcss b,
.dcss strong {
font-weight: bolder;
}
.dcss blockquote {
margin-left: 40px;
margin-right: 40px;
}
.dcss i,
.dcss cite,
.dcss em,
.dcss var,
.dcss address {
font-style: italic;
}
.dcss pre,
.dcss tt,
.dcss code,
.dcss kbd,
.dcss samp {
font-family: monospace;
}
.dcss pre {
white-space: pre;
}
.dcss button,
.dcss textarea,
.dcss input,
.dcss object,
.dcss select {
display: inline-block;
}
.dcss big {
font-size: 1.17em;
}
.dcss small,
.dcss sub,
.dcss sup {
font-size: 0.83em;
}
.dcss sub {
vertical-align: sub;
}
.dcss sup {
vertical-align: super;
}
.dcss table {
border-spacing: 2px;
}
.dcss thead,
.dcss tbody,
.dcss tfoot {
vertical-align: middle;
}
.dcss td,
.dcss th {
vertical-align: inherit;
}
.dcss s,
.dcss strike,
.dcss del {
text-decoration: line-through;
}
.dcss hr {
border: 1px inset;
}
.dcss ol,
.dcss ul,
.dcss dir,
.dcss menu,
.dcss dd {
margin-left: 40px;
}
.dcss ol,
.dcss ul,
.dcss li {
list-style-type: decimal;
}
.dcss ol ul,
.dcss ul ol,
.dcss ul ul,
.dcss ol ol {
margin-top: 0;
margin-bottom: 0;
}
.dcss u,
.dcss ins {
text-decoration: underline;
}
.dcss br:before {
content: "A";
}
.dcss :before,
.dcss :after {
white-space: pre-line;
}
.dcss center {
text-align: center;
}
.dcss abbr,
.dcss acronym {
font-variant: small-caps;
letter-spacing: 0.1em;
}
.dcss :link,
.dcss :visited {
text-decoration: underline;
}
.dcss :focus {
outline: thin dotted invert;
}
.dcss BDO[DIR="ltr"] {
direction: ltr;
unicode-bidi: bidi-override;
}
.dcss BDO[DIR="rtl"] {
direction: rtl;
unicode-bidi: bidi-override;
}
.dcss *[DIR="ltr"] {
direction: ltr;
unicode-bidi: embed;
}
.dcss *[DIR="rtl"] {
direction: rtl;
unicode-bidi: embed;
}
@media print {
.dcss h1 {
page-break-before: always;
}
.dcss h1,
.dcss h2,
.dcss h3,
.dcss h4,
.dcss h5,
.dcss h6 {
page-break-after: avoid;
}
.dcss ul,
.dcss ol,
.dcss dl {
page-break-before: avoid;
}
}
//间距
$size-map: (
-2: -2px,
4: 4px,
5: 5px,
8: 8px,
10: 10px,
12: 12px,
15: 15px,
16: 16px,
20: 20px,
24: 24px,
25: 25px,
30: 30px,
32: 32px,
40: 40px,
50: 50px,
80: 80px,
140: 140px
);
@each $name in map-keys($size-map) {
$value: map-get($size-map, $name);
.mt-#{$name} {
margin-top: $value;
}
.mr-#{$name} {
margin-right: $value;
}
.mb-#{$name} {
margin-bottom: $value;
}
.ml-#{$name} {
margin-left: $value;
}
.margin-#{$name} {
margin: $value;
}
.pt-#{$name} {
padding-top: $value !important;
}
.pr-#{$name} {
padding-right: $value;
}
.pb-#{$name} {
padding-bottom: $value;
}
.pl-#{$name} {
padding-left: $value;
}
.pd-#{$name} {
padding: $value;
}
}
//字号
$font-map: (
10: 10px,
11: 11px,
14: 14px,
15: 15px,
18: 18px,
20: 20px,
24: 24px,
25: 25px,
30: 30px,
36: 36px,
40: 40px,
50: 50px,
80: 80px,
140: 140px
);
@each $size in map-keys($font-map) {
$value: map-get($font-map, $size);
.font-#{$size} {
font-size: $value;
}
}
@charset "UTF-8";
/*防止用户自定义背景颜色对网页的影响,添加让用户可以自定义字体 */
html {
-webkit-text-size-adjust: 100%; /*禁用Webkit内核浏览器的文字大小调整功能,默认是auto;*/
-ms-text-size-adjust: 100%; /*禁用IE内核浏览器的文字大小调整功能,默认是auto;*/
font-family: sans-serif;
-webkit-font-smoothing: antialiased;
height: 100%;
touch-action: manipulation; /*取消移动端click300ms的延迟*/
}
body {
height: 100%;
}
*,
*::before,
*::after {
margin: 0;
padding: 0;
box-sizing: border-box;
-webkit-tap-highlight-color: transparent;
}
/*此处增加dt,label针对bootstrap的加粗定义*/
dt,
label {
font-weight: normal;
font-size: 100%;
}
input,
button,
textarea,
select,
optgroup,
option {
font-size: 100%;
font-weight: normal;
outline: none;
}
h1,h2,h3,h4,h5{
padding: 0;
margin: 0;
font-weight: normal;
}
input,
button,
textarea {
-webkit-appearance: none;
}
/*去除ios按钮内阴影、圆角,对单选框、复选框有影响*/
input[type="checkbox"] {
-webkit-appearance: checkbox;
}
input[type="radio"] {
-webkit-appearance: radio;
}
input::-webkit-input-safebox-button {
display: none;
}
/*解决搜狗浏览器密码框自带安全键盘*/
input:focus,
textarea:focus {
outline: none;
}
th,
td,
button,
input,
select,
textarea {
-webkit-font-smoothing: antialiased;
-moz-font-smoothing: antialiased;
}
/*页面的字体抗锯齿,字体会更清晰圆滑*/
textarea {
resize: none;
border: 1px solid #ddd;
padding: 5px;
width: 100%;
border-radius: 0;
}
address, caption, cite, code, dfn, th, var, /*em,*/ i {
font-style: normal;
font-weight: normal;
}
sub,
sup {
vertical-align: baseline;
}
button {
overflow: visible;
vertical-align: middle;
outline: none;
height: auto;
}
/*去掉列表标签的默认样式*/
ul,
ol,
li {
list-style-type: none;
}
/*重置table样式*/
table {
border-collapse: collapse;
border-spacing: 0; /*table-layout: fixed;*/
}
/*table-layout: fixed; 表格布局尺寸固定(默认等分表格),表格的宽度不再由单元格的内容多少而决定,可自定义宽度(给th,td不起作用)*/
/*border-collapse: separate(独立边框); border-spacing:20px 20px(边框单元格间距离);*/
button {
cursor: pointer;
}
fieldset,
img {
border: 0;
}
/*a链接*/
a {
outline: none;
text-decoration: none;
color: #848484;
cursor: pointer;
}
a:focus {
outline: none;
text-decoration: none;
color: inherit;
}
a:hover {
outline: none;
color: #157df1;
text-decoration: none;
}
input::-webkit-inner-spin-button {
display: none;
}
@charset "utf-8";
// 全局
@import "reset";
@import "base";
//@import "reset-iview";
@import "index";
@function bvw($vw) {
@return $vw / 1440 * 100vw;
}
@function bvh($vh) {
@return $vh / 1024 * 100vh;
}
\ No newline at end of file
@charset "utf-8";
// 通用 全局
<template>
<el-row class="el-table-self">
<el-table
:max-height="maxHeight || maxTableHeight"
:height="tableHeight"
ref="selftab"
v-loading="listLoading"
:data="tableData"
:show-overflow-tooltip="true"
:highlight-current-row="highLight"
:header-row-class-name="headerClass"
style="width: 100%"
>
<template v-for="(column, index) in columns">
<template v-if="!column.type && !column.operType">
<el-table-column
:key="column.value"
:show-overflow-tooltip="true"
:fixed="column.fixed"
:prop="column.value"
:label="column.label"
:width="column.width"
:min-width="column.minWidth"
align="center"
:sortable="column.sortable"
:formatter="column.formatter"
:class-name="column.className"
:label-class-name="column.labelClassName"
>
<!-- 表头插槽 -->
<template slot="header" slot-scope="scope">
<span :style="{ fontSize: fontSize[fontIndex] }">{{
column.label
}}</span>
</template>
<!-- 表内容插槽 -->
<template slot-scope="scope">
<span :style="{ fontSize: fontSize[fontIndex] }">
{{ scope.row[column.value] }}</span
>
</template>
</el-table-column>
</template>
<template v-else>
<el-table-column
:key="index"
:fixed="column.fixed"
:prop="column.value"
:label="column.label"
:sortable="column.sortable"
:width="column.width"
:min-width="column.minWidth"
align="center"
>
<!-- 表头插槽 -->
<template slot="header" slot-scope="scope">
<span :style="{ fontSize: fontSize[fontIndex] }">{{
column.label
}}</span>
</template>
<!-- 表内容插槽 -->
<template slot-scope="scope">
<!-- 按钮 -->
<template
v-if="column.type === 'button' || column.operType === 'button'"
>
<!-- 按钮数组 -->
<template v-for="(op, opIndex) in column.operations">
<el-button
:key="opIndex"
:disabled="
op.formatter ? op.formatter(scope.row).disabled : false
"
:style="[{ fontSize: fontSize[fontIndex] }, op.style]"
:type="
op.formatter
? op.formatter(scope.row).type
: op.type || ''
"
:icon="op.icon"
@click="op.func(scope.row, scope.$index)"
>
{{
op.formatter
? op.formatter(scope.row).label
: op.label
? op.label
: scope.row[column.value]
}}
</el-button>
</template>
</template>
<!-- html -->
<template v-if="column.type === 'html'">
<div v-html="scope.row[column.value]" class="highlight"></div>
</template>
<!-- switch切换 启用 -->
<template v-if="column.type === 'switch'">
<el-switch
v-model="scope.row[column.value]"
@change="column.func(scope.row, scope.$index)"
>
</el-switch>
</template>
</template>
</el-table-column>
</template>
</template>
</el-table>
<!-- 分页 -->
<div v-if="pageSize && totalCounts > 0" class="pagination-footer">
<!-- <span class="description">{{ description }}</span> -->
<el-pagination
background
:current-page="currentPage"
:page-sizes="pageSizes"
:page-size="pageSize"
layout="total, sizes, prev, pager, next, jumper"
:total="totalCounts"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
></el-pagination>
</div>
</el-row>
</template>
<script>
import resize from "../TabComponents/resize.js"
import { mapGetters } from "vuex"
export default {
props: {
tableHeight: Number, // 表格的高度
maxHeight: Number, // 表格的最大高度
listLoading: Boolean, // table 加载层
pageSizes: Array, // 决定每页显示的条数[10,15,20,25]
pageSize: Number,
totalCount: [Number, String], // 表格数据总数
currentPage: { type: Number, default: 1 },
highLight: { type: Boolean, default: true },
headerClass: { type: String, default: "default" }, // 头部背景色Class名称,默认default
columns: Array, // 表格列配置数据,{vlaue:对应数据对象中的属性,label:对应的是标题文字,fixed:列是否固定,width:列宽, sortable:是否可排序,formatter:列格式化, className:对应的是列的样式类名}
tableData: Array, // 表格数据
},
mixins: [resize],
data() {
return {
fontSize: ["12px", "14px", "16px"],
}
},
computed: {
...mapGetters({
fontIndex: "table/fontIndex",
}),
totalCounts() {
return this.totalCount - 0
},
},
watch: {},
mounted() {},
methods: {
// 切换页面显示条数
handleSizeChange(val) {
this.$emit("pageSizeChange", val)
},
// 跳转页码
handleCurrentChange(val) {
this.$emit("currentPageChange", val)
},
},
}
</script>
<style lang="scss" scoped>
.el-table__empty-block {
position: relative;
min-height: 60px;
text-align: center;
width: 100%;
height: 100%;
}
.el-table__empty-text {
position: absolute;
left: 50%;
width: 110px;
height: 110px;
top: 50%;
line-height: 220px;
-ms-transform: translate(-50%, -50%);
transform: translate(-50%, -50%);
color: #5e7382;
background-position: center center;
background-repeat: no-repeat;
background-size: cover;
}
::v-deep {
.el-table {
thead {
.newHeader {
height: 60px;
background: #f6f6f6;
}
}
}
}
</style>
...@@ -272,7 +272,7 @@ ...@@ -272,7 +272,7 @@
</div> </div>
<div slot="footer"> <div slot="footer">
<el-button size="medium" v-if="btnCancel" @click="visible = false" <el-button size="medium" v-if="btnCancel" @click="visible = false"
>取消</el-button > </el-button
> >
<el-button <el-button
size="medium" size="medium"
...@@ -281,6 +281,7 @@ ...@@ -281,6 +281,7 @@
@click="handleConfirm" @click="handleConfirm"
>{{ confirmText }}</el-button >{{ confirmText }}</el-button
> >
<slot name="otherButton" :form="form"></slot>
</div> </div>
</el-dialog> </el-dialog>
</template> </template>
...@@ -301,7 +302,7 @@ export default { ...@@ -301,7 +302,7 @@ export default {
props: { props: {
confirmText: { confirmText: {
type: String, type: String,
default: "确认", default: " ",
}, },
appendToBody: { appendToBody: {
type: Boolean, type: Boolean,
...@@ -489,9 +490,6 @@ export default { ...@@ -489,9 +490,6 @@ export default {
text-align: center; text-align: center;
} }
} }
.el-input-group__prepend {
padding: 0;
}
.input-with-input { .input-with-input {
.el-input-group__prepend { .el-input-group__prepend {
background-color: #ffffff; background-color: #ffffff;
......
...@@ -67,7 +67,19 @@ ...@@ -67,7 +67,19 @@
:is-show-important="isShowImportant" :is-show-important="isShowImportant"
></form-dynamic> ></form-dynamic>
</div> </div>
<el-col
v-else-if="c.type === 'title'"
:xs="c.xs || 24"
:sm="c.sm || 24"
:md="c.md || 24"
:lg="c.span || 12"
:key="columnIndex"
v-show="c.display"
>
<div class="form_title" :style="c.styles">
<span>{{ c.value }}</span>
</div>
</el-col>
<el-col <el-col
:xs="c.xs || 24" :xs="c.xs || 24"
:sm="c.sm || 24" :sm="c.sm || 24"
......
...@@ -19,8 +19,15 @@ ...@@ -19,8 +19,15 @@
> >
<div class="flex"> <div class="flex">
<div> <div>
<el-upload-self
v-if="item.type === 'upload'"
v-bind="item"
:upload-query="{ formId, patientId, prefix: item.prop }"
v-model="form[item.prop]"
:disabled="item.disabled"
></el-upload-self>
<!-- 表单改文本 --> <!-- 表单改文本 -->
<template v-if="vwForm.detail"> <template v-else-if="vwForm.detail">
<form-item-text :item="item" :form="form"></form-item-text> <form-item-text :item="item" :form="form"></form-item-text>
</template> </template>
<template v-else> <template v-else>
...@@ -342,12 +349,6 @@ ...@@ -342,12 +349,6 @@
> >
</el-date-picker> </el-date-picker>
</template> </template>
<el-upload-self
v-if="item.type === 'upload'"
v-bind="item"
v-model="form[item.prop]"
:disabled="item.disabled"
></el-upload-self>
</div> </div>
<span <span
class="important_field" class="important_field"
...@@ -385,6 +386,11 @@ export default { ...@@ -385,6 +386,11 @@ export default {
vwForm: { vwForm: {
default: {}, default: {},
}, },
formId: {},
getPatientId: {
type: Function,
default: () => {},
},
getDefectsSet: { getDefectsSet: {
type: Function, type: Function,
default: () => {}, default: () => {},
...@@ -428,6 +434,9 @@ export default { ...@@ -428,6 +434,9 @@ export default {
defectsSet() { defectsSet() {
return this.getDefectsSet ? this.getDefectsSet() : [] return this.getDefectsSet ? this.getDefectsSet() : []
}, },
patientId() {
return this.getPatientId ? this.getPatientId() : ""
},
}, },
methods: { methods: {
scrollToView() { scrollToView() {
......
<template> <template>
<el-form ref="form" :model="form" :label-position="labelPosition" :inline="inlineFlag" :label-width="labelWidth" :size="size" @submit.native.prevent="handleSearch()" class="el-form-self" :style="formStyle"> <el-form
<el-col :xs="item.xs?item.xs:24" :sm="item.sm?item.sm:12" :md="item.md?item.md:8" :lg="item.lg?item.lg:8" :xl="item.xl?item.xl:6" v-for="(item,index) in forms" :key="index" v-if="!item.hidden"> ref="form"
<el-form-item :label="item.label?item.label+(item.hiddenColon?'':':'):''" :prop="item.prop" :rules="item.rules" :label-width="item.labelWidth || '110px'"> :model="form"
:label-position="labelPosition"
:inline="inlineFlag"
:label-width="labelWidth"
:size="size"
class="el-form-self"
:style="formStyle"
@submit.native.prevent="handleSearch()"
>
<el-col
v-for="(item, index) in forms"
v-if="!item.hidden"
:key="index"
:xs="item.xs ? item.xs : 24"
:sm="item.sm ? item.sm : 12"
:md="item.md ? item.md : 8"
:lg="item.lg ? item.lg : 8"
:xl="item.xl ? item.xl : 6"
>
<el-form-item
v-if="item.type != 'btn'"
:label="item.label ? item.label + (item.hiddenColon ? '' : ':') : ''"
:prop="item.prop"
:rules="item.rules"
:label-width="item.labelWidth || '110px'"
>
<!-- 输入框 --> <!-- 输入框 -->
<el-input v-if="item.type === 'input'" :id="item.id?item.id:''" v-model="form[item.prop]" :readonly="item.readonly" :disabled="item.disabled" :placeholder="item.placeholder" @focus="item.focusFunc?item.focusFunc($event):{}" @change="item.func?item.func($event):{}"> <el-input
<span :slot="item.slot?item.slot:'append'" v-if="item.unit">{{item.unit}}</span> v-if="item.type === 'input'"
:id="item.id ? item.id : ''"
v-model="form[item.prop]"
:readonly="item.readonly"
:disabled="item.disabled"
:placeholder="item.placeholder"
@focus="item.focusFunc ? item.focusFunc($event) : {}"
@change="item.func ? item.func($event) : {}"
>
<span v-if="item.unit" :slot="item.slot ? item.slot : 'append'">{{
item.unit
}}</span>
</el-input> </el-input>
<template v-if="item.type === 'textarea'"> <template v-if="item.type === 'textarea'">
<el-input type="textarea" :placeholder="item.placeholder" :rows="item.rows" :autosize="item.autosize" v-model="form[item.prop]" :minlength="item.minlength" :maxlength="item.maxlength" :show-word-limit="item.showLimit"></el-input> <el-input
v-model="form[item.prop]"
type="textarea"
:placeholder="item.placeholder"
:rows="item.rows"
:autosize="item.autosize"
:minlength="item.minlength"
:maxlength="item.maxlength"
:show-word-limit="item.showLimit"
></el-input>
</template> </template>
<!-- 模糊查询输入 --> <!-- 模糊查询输入 -->
<el-autocomplete :popper-class="item.popperClass" style="width:100%;" v-else-if="item.type === 'autocomplete'" v-model="form[item.prop]" :fetch-suggestions="item.func" :placeholder="item.placeholder" @select="item.selectfun?item.selectfun($event):{}" clearable> <el-autocomplete
v-else-if="item.type === 'autocomplete'"
v-model="form[item.prop]"
:popper-class="item.popperClass"
style="width: 100%"
:fetch-suggestions="item.func"
:placeholder="item.placeholder"
clearable
@select="item.selectfun ? item.selectfun($event) : {}"
>
<template slot-scope="{ item }"> <template slot-scope="{ item }">
<div class="name">{{ item.value }}</div> <div class="name">{{ item.value }}</div>
<span class="description">{{ item.description }}</span> <span class="description">{{ item.description }}</span>
...@@ -20,51 +74,161 @@ ...@@ -20,51 +74,161 @@
</el-autocomplete> </el-autocomplete>
<!-- 模糊查询选择 --> <!-- 模糊查询选择 -->
<el-select v-else-if="item.type === 'remote'" v-model="form[item.prop]" filterable remote reserve-keyword :placeholder="item.placeholder" :remote-method="item.remoteFunc"> <el-select
<el-option v-for="(opt,optIndex) in item.opts" :key="optIndex" :label="opt.label" :value="item.isSelect?opt.selectValue:opt.value"> v-else-if="item.type === 'remote'"
v-model="form[item.prop]"
filterable
remote
reserve-keyword
:placeholder="item.placeholder"
:remote-method="item.remoteFunc"
>
<el-option
v-for="(opt, optIndex) in item.opts"
:key="optIndex"
:label="opt.label"
:value="item.isSelect ? opt.selectValue : opt.value"
>
</el-option> </el-option>
</el-select> </el-select>
<!-- 日期区间 --> <!-- 日期区间 -->
<el-date-picker v-else-if="item.type === 'daterange'" v-model="form[item.prop]" type="daterange" align="right" unlink-panels range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期" :picker-options="item.options" :format="item.format" :value-format="item.valueFormat"> <el-date-picker
v-else-if="item.type === 'daterange'"
v-model="form[item.prop]"
type="daterange"
align="right"
unlink-panels
range-separator="-"
start-placeholder="开始日期"
end-placeholder="结束日期"
:picker-options="item.options"
:format="item.format"
:value-format="item.valueFormat"
>
</el-date-picker> </el-date-picker>
<!-- 日期 --> <!-- 日期 -->
<el-date-picker v-else-if="item.type === 'date'" v-model="form[item.prop]" :type="item.dateType?item.dateType:'date'" :placeholder="item.placeholder" :picker-options="item.options" :format="item.format" :value-format="item.valueFormat"> <el-date-picker
v-else-if="item.type === 'date'"
v-model="form[item.prop]"
:type="item.dateType ? item.dateType : 'date'"
:placeholder="item.placeholder"
:picker-options="item.options"
:format="item.format"
:value-format="item.valueFormat"
>
</el-date-picker> </el-date-picker>
<!-- 下拉框 --> <!-- 下拉框 -->
<el-select v-else-if="item.type === 'select'" clearable filterable :disabled="item.disabled" v-model="form[item.prop]" :placeholder="item.placeholder?item.placeholder:'请选择'" @change="item.func?item.func($event):{}"> <el-select
<el-option v-for="(opt,optIndex) in item.opts" :key="optIndex" :label="opt.label" :value="item.isSelect?opt.selectValue:opt.value"> v-else-if="item.type === 'select'"
v-model="form[item.prop]"
clearable
filterable
:disabled="item.disabled"
:placeholder="item.placeholder ? item.placeholder : '请选择'"
@change="item.func ? item.func($event) : {}"
>
<el-option
v-for="(opt, optIndex) in item.opts"
:key="optIndex"
:label="opt.label"
:value="item.isSelect ? opt.selectValue : opt.value"
>
</el-option> </el-option>
</el-select> </el-select>
<!-- 单选框 --> <!-- 单选框 -->
<el-radio :class="item.class" v-else-if="item.type === 'radio'" v-model="form[item.prop]" v-for="(opt,optIndex) in item.opts" :key="optIndex" :label="opt.value" @change="item.func?item.func($event):{}">{{opt.label}} <el-radio
v-for="(opt, optIndex) in item.opts"
v-else-if="item.type === 'radio'"
:key="optIndex"
v-model="form[item.prop]"
:class="item.class"
:label="opt.value"
@change="item.func ? item.func($event) : {}"
>{{ opt.label }}
</el-radio> </el-radio>
<!-- 级联 --> <!-- 级联 -->
<el-cascader v-else-if="item.type === 'cascader'" v-model="form[item.prop]" :style="'width:'+item.width" :options="item.list" :change-on-select="item.changeSelect" :show-all-levels="item.showLevel"></el-cascader> <el-cascader
v-else-if="item.type === 'cascader'"
v-model="form[item.prop]"
:style="'width:' + item.width"
:options="item.list"
:change-on-select="item.changeSelect"
:show-all-levels="item.showLevel"
></el-cascader>
<!-- 文字 --> <!-- 文字 -->
<span v-else-if="item.type === 'text'"> <span v-else-if="item.type === 'text'">
{{item.text?item.text:form[item.prop]}} {{ item.text ? item.text : form[item.prop] }}
</span> </span>
<!-- 数字输入框 --> <!-- 数字输入框 -->
<el-input-number v-else-if="item.type === 'number'" :controls="false" :min="item.min || 0" :precision="item.precision" v-model="form[item.prop]" :disabled="item.disabled || disabled" /> <el-input-number
v-else-if="item.type === 'number'"
v-model="form[item.prop]"
:controls="false"
:min="item.min || 0"
:precision="item.precision"
:disabled="item.disabled || disabled"
/>
<!-- 图标 --> <!-- 图标 -->
<span v-else-if="item.type === 'svg'"> <span v-else-if="item.type === 'svg'">
<svg-icon :style="item.style" :icon-class="item.iconClass" @click.native="clickSvg(item.func)" class="form-svg"></svg-icon> <svg-icon
:style="item.style"
:icon-class="item.iconClass"
class="form-svg"
@click.native="clickSvg(item.func)"
></svg-icon>
</span> </span>
</el-form-item> </el-form-item>
<div v-if="item.type == 'btn'" class="flex">
<template v-for="(btn, index) in item.list">
<el-button
v-if="btn.btnType == 'button'"
:key="index"
:type="btn.type"
:size="size"
:icon="btn.icon"
:style="btn.style"
@click="btn.func"
>
{{ btn.btnText }}
</el-button>
<div
v-if="btn.btnType == 'tobeModified'"
:key="index"
class="tobeModified"
:style="{ backgroundColor: modifiedFlag ? '#4E68FF' : '#fff' }"
@click="changeModified"
>
<i
:style="{ color: modifiedFlag ? '#fff' : '#d9d9d9' }"
class="el-icon-check"
></i>
<span :style="{ color: modifiedFlag ? '#fff' : '#000' }"
>待修改({{ btn.tobeModified }}</span
>
</div>
</template>
</div>
</el-col> </el-col>
<el-col :xs="24" :sm="24" :lg="24" v-if="lists" style="padding-left:120px;"> <el-col v-if="lists" :xs="24" :sm="24" :lg="24" style="padding-left: 120px">
<el-button v-for="(btn,index) in lists" :key="index" :type="btn.type" :size="size" :icon="btn.icon" @click="btn.func" :style="btn.style"> <el-button
{{btn.btnText}} v-for="(btn, index) in lists"
:key="index"
:type="btn.type"
:size="size"
:icon="btn.icon"
:style="btn.style"
@click="btn.func"
>
{{ btn.btnText }}
</el-button> </el-button>
</el-col> </el-col>
</el-form> </el-form>
...@@ -72,41 +236,41 @@ ...@@ -72,41 +236,41 @@
<script> <script>
export default { export default {
props: {
size: { type: String, default: "small" },
labelPosition: { type: String, default: "right" },
labelWidth: { type: String },
formStyle: { type: Object },
inlineFlag: { type: Boolean, default: false },
forms: { type: Array }, // 表单组,
lists: { type: Array }, // 按钮组
},
data() { data() {
const form = {} const form = {}
const { forms } = this.$props const { forms } = this.$props
forms.forEach(item => { forms.forEach((item) => {
if (!item.prop || item.hidden) return false if (!item.prop || item.hidden) return false
if ( if (
item.type === 'daterange' || item.type === "daterange" ||
item.type === 'checkboxList' || item.type === "checkboxList" ||
item.type === 'checkbox' || item.type === "checkbox" ||
item.type === 'cascader' || item.type === "cascader" ||
(item.type === 'select' && item.multiple) (item.type === "select" && item.multiple)
) { ) {
form[item.prop] = [] form[item.prop] = []
} else { } else {
form[item.prop] = '' form[item.prop] = ""
} }
}) })
return { return {
form form,
modifiedFlag: false,
} }
}, },
props: {
size: { type: String, default: 'small' },
labelPosition: { type: String, default: 'right' },
labelWidth: { type: String },
formStyle: { type: Object },
inlineFlag: { type: Boolean, default: false },
forms: { type: Array }, // 表单组,
lists: { type: Array } // 按钮组
},
methods: { methods: {
// 查询 // 查询
handleSearch() { handleSearch() {
this.$emit('handleSearch', this.form) this.$emit("handleSearch", this.form)
}, },
// 重置 // 重置
...@@ -117,9 +281,9 @@ export default { ...@@ -117,9 +281,9 @@ export default {
handleConfirm() { handleConfirm() {
this.loading = true this.loading = true
this.$refs.form.validate(valid => { this.$refs.form.validate((valid) => {
if (valid) { if (valid) {
this.$emit('handleConfirm', this.form) this.$emit("handleConfirm", this.form)
} else { } else {
this.loading = false this.loading = false
} }
...@@ -130,18 +294,18 @@ export default { ...@@ -130,18 +294,18 @@ export default {
initforms(formEdit) { initforms(formEdit) {
this.$nextTick(() => { this.$nextTick(() => {
const form = {} const form = {}
this.forms.forEach(item => { this.forms.forEach((item) => {
if (!item.prop || item.hidden) return false if (!item.prop || item.hidden) return false
if ( if (
item.type === 'daterange' || item.type === "daterange" ||
item.type === 'checkboxList' || item.type === "checkboxList" ||
item.type === 'checkbox' || item.type === "checkbox" ||
item.type === 'cascader' || item.type === "cascader" ||
(item.type === 'select' && item.multiple) (item.type === "select" && item.multiple)
) { ) {
form[item.prop] = [] form[item.prop] = []
} else { } else {
form[item.prop] = '' form[item.prop] = ""
} }
}) })
if (formEdit) { if (formEdit) {
...@@ -164,13 +328,19 @@ export default { ...@@ -164,13 +328,19 @@ export default {
// 点击图标 // 点击图标
clickSvg(str) { clickSvg(str) {
this.$emit(str) this.$emit(str)
} },
}
// 修改
changeModified() {
this.modifiedFlag = !this.modifiedFlag
},
},
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.el-form-self { .el-form-self {
width: 100%;
margin: 20px 0; margin: 20px 0;
overflow: hidden; overflow: hidden;
zoom: 1; zoom: 1;
...@@ -183,7 +353,29 @@ export default { ...@@ -183,7 +353,29 @@ export default {
.form-svg { .form-svg {
cursor: pointer; cursor: pointer;
} }
.el-form-item {
margin-right: 20px;
}
}
.tobeModified {
// width: 134px;
height: 31px;
margin-left: 20px;
background: #ffffff;
border-radius: 4px;
padding: 0px 8px;
border: 1px solid #d9d9d9;
display: flex;
align-items: center;
cursor: pointer;
.el-icon-check {
font-size: 18px;
margin-right: 8px;
}
span {
font-size: 14px;
font-family: AlibabaPuHuiTiR;
color: #333333;
}
} }
</style> </style>
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
</template> </template>
<template v-else> <template v-else>
<el-button size="small" type="primary">点击上传</el-button> <el-button size="middle" :type="btnType">点击上传</el-button>
</template> </template>
<div slot="tip" class="el-upload__tip">{{ tip }}</div> <div slot="tip" class="el-upload__tip">{{ tip }}</div>
</el-upload> </el-upload>
...@@ -54,7 +54,12 @@ export default { ...@@ -54,7 +54,12 @@ export default {
type: Boolean, type: Boolean,
default: false, default: false,
}, },
bucketName: { type: String }, //后端上传文件路径(参数) uploadQuery: {
type: Object,
default: () => {
return {}
},
}, //后端上传文件路径(参数)
listType: String, listType: String,
tip: String, tip: String,
multiple: Boolean, multiple: Boolean,
...@@ -72,7 +77,11 @@ export default { ...@@ -72,7 +77,11 @@ export default {
type: Boolean, type: Boolean,
default: false, default: false,
}, },
value: Array,//上传文件数组 绑定数组 btnType: {
type: String,
default: "primary",
},
value: Array, //上传文件数组 绑定数组
}, },
data() { data() {
return { return {
...@@ -91,13 +100,8 @@ export default { ...@@ -91,13 +100,8 @@ export default {
if (newValue === oldValue) return if (newValue === oldValue) return
this.fileList = newValue.map((_) => { this.fileList = newValue.map((_) => {
return { return {
name: _.fileName, name: _.file_name,
url: url: `${this.httpPrefix}/disease-data/file/info/${_.bucket_name}/${_.prefix}-${_.uuid_name}`,
this.httpPrefix +
"/disease-data/file/" +
_.bucketName +
"-" +
_.uuidName,
} }
}) })
}, },
...@@ -113,8 +117,7 @@ export default { ...@@ -113,8 +117,7 @@ export default {
action() { action() {
return ( return (
this.httpPrefix + this.httpPrefix +
"/disease-data/file/upload?bucketName=" + `/disease-data/file/upload?formId=${this.uploadQuery.formId}&patientId=${this.uploadQuery.patientId}&prefix=${this.uploadQuery.prefix}`
this.bucketName
) )
}, },
// 预览list // 预览list
...@@ -123,11 +126,7 @@ export default { ...@@ -123,11 +126,7 @@ export default {
return this.value.map((_) => { return this.value.map((_) => {
return ( return (
_.url || _.url ||
this.httpPrefix + `${this.httpPrefix}/disease-data/file/info/${_.bucket_name}/${_.prefix}-${_.uuid_name}`
"/disease-data/file/" +
_.bucketName +
"-" +
_.uuidName
) )
}) })
}, },
...@@ -163,27 +162,43 @@ export default { ...@@ -163,27 +162,43 @@ export default {
// 移除提醒 // 移除提醒
beforeRemove(file, fileList) { beforeRemove(file, fileList) {
return this.$confirm(`确定移除 ${file.fileName || file.name}?`) return this.$confirm(`确定移除 ${file.file_name || file.name}?`)
}, },
// 移除 // 移除
handleRemove({ url }, fileList) { handleRemove({ url }, fileList) {
const i = this.value.findIndex((_) => url.endsWith(_.uuidName)) const i = this.value.findIndex((_) => url.endsWith(_.uuid_name))
if (i > -1) this.value.splice(i, 1)// 静态移除 if (i > -1) this.value.splice(i, 1) // 静态移除
}, },
// 查看 // 查看
handlePreview(file) { handlePreview(file) {
const name = file.fileName || file.name const name = file.fileName || file.name
this.title = name this.title = name
let responseUrl
if (file.response) {
const _ = file.response.data
responseUrl = `${this.httpPrefix}/disease-data/file/info/${_.bucket_name}/${_.prefix}-${_.uuid_name}`
}
try {
if (name.match(/\.(png|jpg|jpeg)/)) { if (name.match(/\.(png|jpg|jpeg)/)) {
this.imgUrl = file.url this.imgUrl = file.url || responseUrl
this.$refs.image.clickHandler() this.$refs.image.clickHandler()
} else { } else {
const elink = document.createElement("a") const elink = document.createElement("a")
elink.download = name elink.download = name
elink.style.display = "none" elink.style.display = "none"
elink.href = file.url elink.href = file.url || responseUrl
document.body.appendChild(elink)
elink.click()
URL.revokeObjectURL(elink.href) // 释放URL 对象
document.body.removeChild(elink)
}
} catch {
const elink = document.createElement("a")
elink.download = name
elink.style.display = "none"
elink.href = file.url || responseUrl
document.body.appendChild(elink) document.body.appendChild(elink)
elink.click() elink.click()
URL.revokeObjectURL(elink.href) // 释放URL 对象 URL.revokeObjectURL(elink.href) // 释放URL 对象
...@@ -204,6 +219,5 @@ export default { ...@@ -204,6 +219,5 @@ export default {
<style lang="scss" scoped> <style lang="scss" scoped>
.el-upload-self { .el-upload-self {
font-size: 14px; font-size: 14px;
margin-bottom: 15px;
} }
</style> </style>
<template>
<div style="min-width: 1440px; overflow: overlay">
<header class="layout-header">
<div class="logotitle">
<div class="leftLogo"></div>
<div class="rightText">
国家消化道早癌防治中心联盟 <br />早期胃癌筛查项目
</div>
</div>
<div v-if="!allianceToken" class="login">
<div class="login_title text-center">
筛查随访数据库登录
<el-form
ref="form"
label-position="top"
:model="form"
label-suffix=":"
label-width="100%"
:rules="rules"
>
<el-form-item prop="username" label="登录名">
<el-input
v-model="form.username"
placeholder="请输入登录名"
></el-input>
</el-form-item>
<el-form-item prop="password" label="密码">
<el-input
v-model="form.password"
type="password"
placeholder="请输入密码"
></el-input>
</el-form-item>
<el-form-item>
<el-button
type="primary"
class="login_button"
:loading="loading"
@click="handleSubmit('form')"
>登录</el-button
>
</el-form-item>
</el-form>
</div>
</div>
<div v-if="allianceToken" class="userInfo">
<div class="white"></div>
<div class="text">欢迎,{{ userInfo.name }}</div>
<div class="exit" @click="logout">退出</div>
</div>
</header>
<div class="sider">
<el-menu
mode="horizontal"
:default-active="currentRoute"
class="siderMenu"
router
>
<el-menu-item
v-for="(item, index) in menuList"
:key="index"
:index="item.route"
style="width: 10%; text-align: center; min-width: 120px"
>
{{ item.name }}
</el-menu-item>
</el-menu>
</div>
<section style="overflow: hidden; padding: 32px 10%; background: #f3f3f3">
<transition name="fade-transform" mode="out-in">
<router-view></router-view>
</transition>
</section>
<footer class="layout-footer-center text-center">
copyright@ 联盟信息等
</footer>
</div>
</template>
<script>
import { loginRSA } from "@/config/settings"
import { getAccessToken } from "@/utils/accessToken"
import { encrypt, decrypt } from "@/utils/encryption"
export default {
data() {
return {
form: {
username: "",
password: "",
},
menuList: [
{
route: "/home",
name: "首页",
},
{
route: "/allianceintroduction",
name: "联盟介绍",
},
{
route: "/healthpopularization",
name: "健康科普",
},
{
route: "/scientificresearch",
name: "科学研究",
},
{
route: "/casesharing",
name: "案例分享",
},
],
loading: false,
rules: {
username: [
{ required: true, message: "请输入用户名", trigger: "blur" },
],
password: [
{ required: true, message: "请输入密码", trigger: "blur" },
{
type: "string",
min: 6,
message: "The password length cannot be less than 6 bits",
trigger: "blur",
},
],
},
allianceToken: getAccessToken(),
currentRoute: this.$route.path,
userInfo: {},
}
},
watch: {
$route: {
handler(v) {
this.currentRoute = this.$route.path
},
deep: true,
},
},
mounted() {
// if (localStorage.getItem('allianceToken')) {
// this.$router.push('/datacenter/home')
// }
this.userInfo = JSON.parse(localStorage.getItem("userInfo"))
},
methods: {
handleSubmit(name) {
this.$refs[name].validate((valid) => {
if (valid) {
this.loading = true
const data = Object.assign({}, this.form)
if (loginRSA) {
data.password = encodeURIComponent(encrypt(data.password))
data.userName = encodeURIComponent(encrypt(data.username))
}
this.$store
.dispatch("user/login", data)
.then(() => {
const routerPath =
!this.redirect || this.redirect === "/404" ? "/" : this.redirect
this.$router.push({ path: routerPath }).catch((e) => {})
this.loading = false
})
.catch((e) => {
this.loading = false
})
}
})
},
logout() {
const h = this.$createElement
this.$msgbox({
title: "提示",
message: h("p", null, [h("span", null, "是否确认退出登录?")]),
showCancelButton: true,
confirmButtonText: "确定",
cancelButtonText: "取消",
beforeClose: (action, instance, done) => {
if (action === "confirm") {
instance.confirmButtonLoading = true
instance.confirmButtonText = "执行中..."
this.$store.dispatch("user/logout").then(() => {
this.allianceToken = ""
done()
instance.confirmButtonLoading = false
})
} else {
done()
}
},
}).then((action) => {
// this.$message({
// type: "info",
// message: "action: " + action,
// })
})
},
},
}
</script>
<style lang="scss" scoped>
.layout-header {
height: 400px;
width: 100%;
background: url("~@/assets/img/Home/homeheaderbg.png") no-repeat;
background-position: center;
background-size: cover;
display: flex;
padding: 0 10% 0 5%;
justify-content: space-between;
align-items: center;
.logotitle {
height: 220px;
display: flex;
.leftLogo {
width: 72px;
height: 72px;
background: url("~@/assets/img/Home/stomach.png") no-repeat;
background-position: center;
background-size: cover;
}
.rightText {
min-width: 570px;
font-size: 42px;
font-family: AlibabaPuHuiTiB;
color: #ffffff;
margin-left: 14px;
}
}
.login {
width: 23%;
min-width: 334px;
height: 326px;
background: rgba(255, 255, 255, 0.96);
box-shadow: 0px 12px 36px 0px rgba(26, 35, 87, 0.4);
border-radius: 8px;
padding: 18px 40px;
.login_title {
height: 26px;
font-size: 22px;
font-family: AlibabaPuHuiTiM;
color: #4e68ff;
// line-height: 60px;
}
.login_button {
width: 100%;
height: 40px;
margin-top: 20px;
background: #4e68ff;
}
}
.userInfo {
height: 160px;
display: flex;
flex-direction: column;
align-items: flex-end;
.white {
width: 32px;
height: 4px;
background: #ffffff;
}
.text {
font-size: 20px;
font-family: AlibabaPuHuiTiM;
color: #ffffff;
margin: 10px 0;
}
.exit {
font-size: 16px;
cursor: pointer;
font-family: AlibabaPuHuiTiR;
text-decoration: underline;
color: rgba(255, 255, 255, 0.8);
line-height: 16px;
&:active {
color: #4e68ff;
}
}
}
}
.siderMenu {
padding: 0 10%;
background: #edefff;
}
.layout-footer-center {
width: 100%;
height: 108px;
background: #efefef;
line-height: 108px;
}
.el-menu--horizontal > .el-menu-item:not(.is-disabled):hover,
.el-menu--horizontal > .el-menu-item:not(.is-disabled):focus {
background-color: transparent;
}
.el-form-item {
text-align: left;
}
/* fade-transform */
.fade-transform-leave-active,
.fade-transform-enter-active {
transition: all 0.3s;
}
.fade-transform-enter {
opacity: 0;
transform: translateX(-30px);
}
.fade-transform-leave-to {
opacity: 0;
transform: translateX(30px);
}
</style>
...@@ -27,16 +27,16 @@ router.beforeResolve(async (to, from, next) => { ...@@ -27,16 +27,16 @@ router.beforeResolve(async (to, from, next) => {
let hasToken = store.getters["user/accessToken"] let hasToken = store.getters["user/accessToken"]
if (!loginInterception) hasToken = true if (!loginInterception) hasToken = true
if (hasToken) { if (hasToken) {
if (to.path === "/login") { if (to.path === "/home") {
next({ next()
path: "/", // { path: "/" }
})
if (progressBar) VabProgress.done() if (progressBar) VabProgress.done()
} else if (routesWhiteList.indexOf(to.path) !== -1) { } else if (routesWhiteList.indexOf(to.path) !== -1) {
next() next()
} else { } else {
const userInfo = store.getters["user/userInfo"] const userInfo = store.getters["user/userInfo"]
if (userInfo) { if (userInfo) {
console.log(to.path)
next() next()
} else { } else {
try { try {
...@@ -48,6 +48,7 @@ router.beforeResolve(async (to, from, next) => { ...@@ -48,6 +48,7 @@ router.beforeResolve(async (to, from, next) => {
accessRoutes = await store.dispatch("routes/setAllRoutes", menulist) accessRoutes = await store.dispatch("routes/setAllRoutes", menulist)
} }
router.addRoutes(accessRoutes) router.addRoutes(accessRoutes)
console.log(router)
if (accessRoutes.length === 1) { if (accessRoutes.length === 1) {
Message({ Message({
message: "暂无菜单权限,请联系管理员", message: "暂无菜单权限,请联系管理员",
...@@ -56,7 +57,7 @@ router.beforeResolve(async (to, from, next) => { ...@@ -56,7 +57,7 @@ router.beforeResolve(async (to, from, next) => {
}) })
await store.dispatch("user/resetAccessToken") await store.dispatch("user/resetAccessToken")
await resetRouter() await resetRouter()
next(`/login`) next(`/home`)
if (progressBar) VabProgress.done() if (progressBar) VabProgress.done()
} else { } else {
store.dispatch("dict/getDictData") //字典获取 store.dispatch("dict/getDictData") //字典获取
...@@ -67,7 +68,7 @@ router.beforeResolve(async (to, from, next) => { ...@@ -67,7 +68,7 @@ router.beforeResolve(async (to, from, next) => {
} }
} catch (error) { } catch (error) {
await store.dispatch("user/resetAccessToken") await store.dispatch("user/resetAccessToken")
next(`/login?redirect=${to.path}`) next(`/home?redirect=${to.path}`)
if (progressBar) VabProgress.done() if (progressBar) VabProgress.done()
} }
} }
...@@ -76,7 +77,7 @@ router.beforeResolve(async (to, from, next) => { ...@@ -76,7 +77,7 @@ router.beforeResolve(async (to, from, next) => {
if (routesWhiteList.indexOf(to.path) !== -1) { if (routesWhiteList.indexOf(to.path) !== -1) {
next() next()
} else { } else {
next(`/login?redirect=${to.path}`) next(`/home?redirect=${to.path}`)
if (progressBar) VabProgress.done() if (progressBar) VabProgress.done()
} }
} }
......
...@@ -24,7 +24,18 @@ module.exports = { ...@@ -24,7 +24,18 @@ module.exports = {
// 路由模式,可选值为 history 或 hash // 路由模式,可选值为 history 或 hash
routerMode: "hash", routerMode: "hash",
//不经过token校验的路由 //不经过token校验的路由
routesWhiteList: ["/login", "/404", "/401", "/sso", "/test"], routesWhiteList: [
// "/login",
"/404",
"/401",
"/sso",
"/test",
"/home",
"/allianceintroduction",
"/casesharing",
"/scientificresearch",
"/healthpopularization",
],
//加载时显示文字 //加载时显示文字
loadingText: "正在加载中...", loadingText: "正在加载中...",
//token名称 //token名称
...@@ -33,6 +44,8 @@ module.exports = { ...@@ -33,6 +44,8 @@ module.exports = {
tokenTableName: "agcs", tokenTableName: "agcs",
//token存储位置localStorage sessionStorage cookie //token存储位置localStorage sessionStorage cookie
storage: "localStorage", storage: "localStorage",
// 前缀名
storagePrefixName: "agcs",
//是否显示logo //是否显示logo
logo: true, logo: true,
//是否国定头部 固定fixed 不固定noFixed //是否国定头部 固定fixed 不固定noFixed
......
...@@ -58,14 +58,14 @@ export default { ...@@ -58,14 +58,14 @@ export default {
}, },
}, },
watch: { watch: {
// $route: { $route: {
// handler(route) { handler(route) {
// if ("mobile" === this.device) { if ("mobile" === this.device) {
// this.$store.dispatch("settings/foldSideBar") this.$store.dispatch("settings/foldSideBar")
// } }
// }, },
// immediate: true, immediate: true,
// }, },
}, },
created() { created() {
//重载所有路由 //重载所有路由
......
...@@ -53,7 +53,7 @@ export default { ...@@ -53,7 +53,7 @@ export default {
async () => { async () => {
const fullPath = this.$route.fullPath const fullPath = this.$route.fullPath
await this.$store.dispatch("user/logout") await this.$store.dispatch("user/logout")
this.$router.push(`/login?redirect=${fullPath}`) this.$router.push(`/home?redirect=${fullPath}`)
} }
) )
}, },
......
...@@ -4,10 +4,41 @@ ...@@ -4,10 +4,41 @@
<vab-remix-icon class="logo" icon-class="logo" /> <vab-remix-icon class="logo" icon-class="logo" />
<span class="hidden-xs-only">无症状人群胃癌筛查随访数据中心</span> <span class="hidden-xs-only">无症状人群胃癌筛查随访数据中心</span>
</div> </div>
<div class="right-panel"> <div class="userInfo">
<error-log></error-log> <error-log></error-log>
<!-- <avatar></avatar> -->
<div class="fontSelect">
<div
v-for="(item, index) in fontList"
:key="index"
:class="['font', index == fontIndex ? 'active' : '']"
@click="changeFont(index)"
>
<div class="label">{{ item.label }}</div>
</div>
</div>
<div
v-show="curSelectedIndex != -1"
class="community"
@click="openModalFlag"
>
<img src="~@/assets/img/DataCenter/shift.png" alt />
{{
curSelectedIndex != -1 ? screeningList[curSelectedIndex].title : ""
}}
</div>
<div class="user">
<img src="~@/assets/img/DataCenter/user.png" alt />
<avatar></avatar> <avatar></avatar>
</div> </div>
<el-badge :value="messageCount" :class-name="'badge'">
<div class="user">
<img src="~@/assets/img/DataCenter/message.png" alt />
消息
</div>
</el-badge>
</div>
</div> </div>
</template> </template>
...@@ -31,10 +62,37 @@ export default { ...@@ -31,10 +62,37 @@ export default {
FullScreenBar, FullScreenBar,
ThemeBar, ThemeBar,
}, },
props: {
curSelectedIndex: {
type: Number,
default: -1,
},
},
data() { data() {
return { return {
pulse: false, pulse: false,
isDot: true, isDot: true,
messageCount: 10,
screeningList: [
{
title: "社区筛查",
src: require("@/assets/img/DataCenter/shequ.png"),
},
{
title: "医院筛查",
src: require("@/assets/img/DataCenter/yiyuan.png"),
},
{
title: "体检筛查",
src: require("@/assets/img/DataCenter/tijian.png"),
},
],
fontList: [
{ fontSize: "12px", label: "A-" },
{ fontSize: "14px", label: "A" },
{ fontSize: "16px", label: "A+" },
],
fontIndex: localStorage.getItem("fontIndex") || 1,
} }
}, },
computed: { computed: {
...@@ -46,6 +104,8 @@ export default { ...@@ -46,6 +104,8 @@ export default {
feedBackNumber: "user/feedBackNumber", feedBackNumber: "user/feedBackNumber",
}), }),
}, },
created() {},
mounted() {},
methods: { methods: {
handleCollapse() { handleCollapse() {
this.$store.dispatch("settings/changeCollapse") this.$store.dispatch("settings/changeCollapse")
...@@ -60,6 +120,14 @@ export default { ...@@ -60,6 +120,14 @@ export default {
this.pulse = false this.pulse = false
}, 1000) }, 1000)
}, },
openModalFlag() {
this.$emit("openModalFlag")
},
changeFont(i) {
this.fontIndex = i
this.$store.commit("table/setFontIndex", i)
localStorage.setItem("fontIndex", i)
},
}, },
} }
</script> </script>
...@@ -75,6 +143,7 @@ export default { ...@@ -75,6 +143,7 @@ export default {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
color: #fff; color: #fff;
border-radius: 0px 0px 4px 4px;
.left-panel { .left-panel {
display: flex; display: flex;
align-items: center; align-items: center;
...@@ -104,61 +173,65 @@ export default { ...@@ -104,61 +173,65 @@ export default {
} }
} }
} }
.userInfo {
.right-panel {
display: flex; display: flex;
align-content: center;
align-items: center; align-items: center;
justify-content: flex-end; padding-right: 40px;
height: 74px; .fontSelect {
display: flex;
::v-deep { margin-right: 20px;
.user-avatar { .font {
margin-top: 2px; width: 40px;
margin-right: 5px; height: 40px;
font-weight: 600; background: #4e68ff;
border-radius: 4px;
border: 1px solid #ffffff;
text-align: center;
line-height: 40px;
cursor: pointer; cursor: pointer;
margin-left: 20px;
} }
.active {
.user-name { box-sizing: border-box;
position: relative; background: #ffffff;
margin-right: 35px; height: 40px;
margin-left: 5px; color: #4e68ff;
font-weight: 600; padding: 1px;
cursor: pointer; .label {
height: 36px;
border: 1px solid #4e68ff;
} }
.user-name + i {
position: absolute;
top: 4px;
right: 15px;
} }
svg {
width: 1em;
height: 1em;
margin-right: 20px;
font-size: $base-font-size-big;
color: $base-color-gray;
cursor: pointer;
fill: $base-color-gray;
} }
.community {
button { width: 106px;
svg { height: 30px;
margin-right: 0; white-space: nowrap;
color: $base-color-white; background: rgba(255, 255, 255, 0.1);
color: #fff;
display: flex;
justify-content: center;
align-items: center;
cursor: pointer; cursor: pointer;
fill: $base-color-white; img {
} margin-right: 4px;
width: 18px;
height: 18px;
} }
.el-badge {
margin-right: 20px;
padding: 0 5px;
svg {
margin-right: 0px;
} }
.user {
white-space: nowrap;
margin-left: 40px;
height: 30px;
display: flex;
justify-content: center;
align-items: center;
cursor: pointer;
color: #fff;
img {
margin-right: 4px;
width: 18px;
height: 18px;
} }
} }
} }
......
...@@ -32,7 +32,10 @@ ...@@ -32,7 +32,10 @@
}" }"
> >
<div :class="header === 'fixed' ? 'fixed-header' : ''"> <div :class="header === 'fixed' ? 'fixed-header' : ''">
<nav-bar></nav-bar> <nav-bar
:cur-selected-index="curSelectedIndex"
@openModalFlag="openModalFlag"
></nav-bar>
</div> </div>
<side-bar></side-bar> <side-bar></side-bar>
<div class="vab-main" :class="collapse ? 'is-collapse-main' : ''"> <div class="vab-main" :class="collapse ? 'is-collapse-main' : ''">
...@@ -40,6 +43,52 @@ ...@@ -40,6 +43,52 @@
</div> </div>
</div> </div>
<back-to-top transition-name="fade"></back-to-top> <back-to-top transition-name="fade"></back-to-top>
<el-dialog
custom-class="homeDialog"
:title="''"
:visible="modalFlag"
:close-on-click-modal="false"
:close-on-press-escape="false"
:show-close="false"
width="70%"
>
<div class="modalContent">
<div class="title">请选择您的筛查填报场景</div>
<ul class="list">
<li
v-for="(item, index) in screeningList"
:key="index"
@click="selectedIndex = index"
>
<div class="screeningItem">
<div class="circle">
<img
v-if="selectedIndex !== index"
src="~@/assets/img/DataCenter/circle.png"
alt
srcset
/>
<img
v-if="selectedIndex == index"
src="~@/assets/img/DataCenter/selected.png"
alt
srcset
/>
</div>
<div class="itemTitle">{{ item.title }}</div>
</div>
<div class="ItemIamge">
<img :src="item.src" alt />
</div>
</li>
</ul>
<div class="submit">
<el-button type="primary" class="btn" @click="setSelectedIndex"
>保存</el-button
>
</div>
</div>
</el-dialog>
</div> </div>
</template> </template>
...@@ -68,7 +117,25 @@ export default { ...@@ -68,7 +117,25 @@ export default {
}, },
mixins: [Media], mixins: [Media],
data() { data() {
return {} return {
modalFlag: false,
screeningList: [
{
title: "社区筛查",
src: require("@/assets/img/DataCenter/shequ.png"),
},
{
title: "医院筛查",
src: require("@/assets/img/DataCenter/yiyuan.png"),
},
{
title: "体检筛查",
src: require("@/assets/img/DataCenter/tijian.png"),
},
],
selectedIndex: 0,
curSelectedIndex: "",
}
}, },
computed: { computed: {
...mapGetters({ ...mapGetters({
...@@ -84,7 +151,24 @@ export default { ...@@ -84,7 +151,24 @@ export default {
} }
}, },
}, },
created() {
this.selectedIndex = localStorage.getItem("selectedIndex") || ""
this.curSelectedIndex = String(this.selectedIndex)
? this.selectedIndex - 0
: -1
},
mounted() { mounted() {
if (!this.selectedIndex) {
this.modalFlag = true
this.selectedIndex = 0
} else {
this.selectedIndex = this.selectedIndex - 0
this.curSelectedIndex = String(this.selectedIndex)
? this.selectedIndex
: -1
}
// console.log(this.curSelectedIndex)
this.$nextTick(() => { this.$nextTick(() => {
window.addEventListener( window.addEventListener(
"storage", "storage",
...@@ -100,6 +184,15 @@ export default { ...@@ -100,6 +184,15 @@ export default {
...mapActions({ ...mapActions({
handleFoldSideBar: "settings/foldSideBar", handleFoldSideBar: "settings/foldSideBar",
}), }),
setSelectedIndex() {
console.log(this.selectedIndex)
this.curSelectedIndex = this.selectedIndex
localStorage.setItem("selectedIndex", this.selectedIndex)
this.modalFlag = false
},
openModalFlag() {
this.modalFlag = true
},
}, },
} }
</script> </script>
...@@ -128,7 +221,7 @@ export default { ...@@ -128,7 +221,7 @@ export default {
} }
&.fixed.no-tags-bar { &.fixed.no-tags-bar {
padding-top: 56px; // padding-top: 56px;
} }
::v-deep { ::v-deep {
...@@ -190,7 +283,7 @@ export default { ...@@ -190,7 +283,7 @@ export default {
} }
&.fixed.no-tags-bar { &.fixed.no-tags-bar {
padding-top: 56px; // padding-top: 56px;
} }
.vab-main { .vab-main {
...@@ -236,6 +329,67 @@ export default { ...@@ -236,6 +329,67 @@ export default {
.side-bar-container { .side-bar-container {
top: 90px; top: 90px;
height: calc(100vh - 90px); height: calc(100vh - 90px);
border-radius: 0px 4px 4px 0px;
box-shadow: none;
}
}
::v-deep .homeDialog .el-dialog__header {
display: none;
}
.modalContent {
padding: 60px;
.title {
text-align: center;
height: 30px;
font-size: 24px;
font-family: AlibabaPuHuiTiM;
color: #333333;
line-height: 30px;
margin-bottom: 60px;
}
.list {
display: flex;
justify-content: space-between;
li {
cursor: pointer;
}
.screeningItem {
display: flex;
.circle {
width: 26px;
height: 26px;
margin-right: 12px;
img {
width: 100%;
height: 100%;
}
}
.itemTitle {
height: 24px;
font-size: 18px;
font-family: AlibabaPuHuiTiM;
color: #333333;
font-weight: bold;
line-height: 24px;
}
}
.ItemIamge {
width: 90%;
// height: 180px;
margin-top: 14px;
img {
width: 100%;
height: 100%;
}
}
}
.submit {
margin-top: 60px;
text-align: center;
.btn {
width: 100px;
height: 32px;
}
} }
} }
</style> </style>
...@@ -6,10 +6,9 @@ import store from "./store" ...@@ -6,10 +6,9 @@ import store from "./store"
import router from "./router" import router from "./router"
import "./plugins" import "./plugins"
import "./mixins" import "./mixins"
import "@/assets/style/common.scss"
// const { mockXHR } = require("../mock/static") // const { mockXHR } = require("../mock/static")
// mockXHR() // mockXHR()
Vue.config.productionTip = false Vue.config.productionTip = false
new Vue({ new Vue({
......
import Vue from "vue" import Vue from "vue"
import VueRouter from "vue-router" import VueRouter from "vue-router"
import Layout from "@/layouts" import Layout from "@/layouts"
import layout from "@/components/layout"
import EmptyLayout from "@/layouts/EmptyLayout" import EmptyLayout from "@/layouts/EmptyLayout"
Vue.use(VueRouter) Vue.use(VueRouter)
export const constantRoutes = [ export const constantRoutes = [
{ {
path: "/login", path: "/home",
component: () => import("@/views/login/index"), name: "Home",
hidden: true, // redirect: "/home",
name: "login", component: layout,
children: [
{
path: "/home",
component: () => import("@/views/Home/index"),
},
{
path: "/allianceintroduction",
component: () => import("@/views/Home/AllianceIntroduction/index"),
},
{
path: "/casesharing",
component: () => import("@/views/Home/CaseSharing/index"),
}, },
{
path: "/scientificresearch",
component: () => import("@/views/Home/ScientificResearch/index"),
},
{
path: "/healthpopularization",
component: () => import("@/views/Home/HealthPopularization/index"),
},
],
},
// {
// path: "/login",
// component: () => import("@/views/login/index"),
// hidden: true,
// name: "login",
// },
{ {
path: "/401", path: "/401",
name: "401", name: "401",
......
...@@ -3,10 +3,10 @@ ...@@ -3,10 +3,10 @@
* @description 所有全局配置的状态管理,如无必要请勿修改 * @description 所有全局配置的状态管理,如无必要请勿修改
*/ */
import defaultSettings from "@/config/settings"; import defaultSettings from "@/config/settings"
const { tagsBar, logo, layout, header, themeBar, skeleton } = defaultSettings; const { tagsBar, logo, layout, header, themeBar, skeleton } = defaultSettings
const theme = JSON.parse(localStorage.getItem("BYUI-VUE-THEME")) || ""; const theme = JSON.parse(localStorage.getItem("BYUI-VUE-THEME")) || ""
const state = { const state = {
tagsBar: theme.tagsBar || tagsBar, tagsBar: theme.tagsBar || tagsBar,
logo, logo,
...@@ -16,7 +16,7 @@ const state = { ...@@ -16,7 +16,7 @@ const state = {
skeleton, skeleton,
device: "desktop", device: "desktop",
themeBar, themeBar,
}; }
const getters = { const getters = {
collapse: (state) => state.collapse, collapse: (state) => state.collapse,
device: (state) => state.device, device: (state) => state.device,
...@@ -26,51 +26,51 @@ const getters = { ...@@ -26,51 +26,51 @@ const getters = {
tagsBar: (state) => state.tagsBar, tagsBar: (state) => state.tagsBar,
themeBar: (state) => state.themeBar, themeBar: (state) => state.themeBar,
skeleton: (state) => state.skeleton, skeleton: (state) => state.skeleton,
}; }
const mutations = { const mutations = {
changeLayout: (state, layout) => { changeLayout: (state, layout) => {
if (layout) state.layout = layout; if (layout) state.layout = layout
}, },
changeHeader: (state, header) => { changeHeader: (state, header) => {
if (header) state.header = header; if (header) state.header = header
}, },
changeTagsBar: (state, tagsBar) => { changeTagsBar: (state, tagsBar) => {
if (tagsBar) state.tagsBar = tagsBar; if (tagsBar) state.tagsBar = tagsBar
}, },
changeCollapse: (state) => { changeCollapse: (state) => {
state.collapse = !state.collapse; state.collapse = !state.collapse
}, },
foldSideBar: (state) => { foldSideBar: (state) => {
state.collapse = true; // state.collapse = true;
}, },
openSideBar: (state) => { openSideBar: (state) => {
state.collapse = false; state.collapse = false
}, },
toggleDevice: (state, device) => { toggleDevice: (state, device) => {
state.device = device; state.device = device
}, },
}; }
const actions = { const actions = {
changeLayout({ commit }, layout) { changeLayout({ commit }, layout) {
commit("changeLayout", layout); commit("changeLayout", layout)
}, },
changeHeader({ commit }, header) { changeHeader({ commit }, header) {
commit("changeHeader", header); commit("changeHeader", header)
}, },
changeTagsBar({ commit }, tagsBar) { changeTagsBar({ commit }, tagsBar) {
commit("changeTagsBar", tagsBar); commit("changeTagsBar", tagsBar)
}, },
changeCollapse({ commit }) { changeCollapse({ commit }) {
commit("changeCollapse"); commit("changeCollapse")
}, },
foldSideBar({ commit }) { foldSideBar({ commit }) {
commit("foldSideBar"); commit("foldSideBar")
}, },
openSideBar({ commit }) { openSideBar({ commit }) {
commit("openSideBar"); commit("openSideBar")
}, },
toggleDevice({ commit }, device) { toggleDevice({ commit }, device) {
commit("toggleDevice", device); commit("toggleDevice", device)
}, },
}; }
export default { state, getters, mutations, actions }; export default { state, getters, mutations, actions }
const state = {
fontIndex: localStorage.getItem("fontIndex") || 1,
}
const getters = {
fontIndex: (state) => state.fontIndex,
}
const mutations = {
setFontIndex(state, fontIndex) {
state.fontIndex = fontIndex
},
}
const actions = {}
export default {
state,
getters,
mutations,
actions,
}
...@@ -35,6 +35,7 @@ const mutations = { ...@@ -35,6 +35,7 @@ const mutations = {
setAccessToken(accessToken) setAccessToken(accessToken)
}, },
setUserInfo(state, userInfo) { setUserInfo(state, userInfo) {
localStorage.setItem("userInfo", JSON.stringify(userInfo))
state.userInfo = userInfo state.userInfo = userInfo
}, },
setGroup(state, group) { setGroup(state, group) {
...@@ -82,7 +83,7 @@ const actions = { ...@@ -82,7 +83,7 @@ const actions = {
} }
let { menuList, user, roleList, group } = data let { menuList, user, roleList, group } = data
if (menuList && user) { if (menuList && user) {
dispatch("getFeedBackNumber", user.id) // dispatch("getFeedBackNumber", user.id)
commit("setMenuList", menuList) commit("setMenuList", menuList)
commit("setUserInfo", user) commit("setUserInfo", user)
commit("setRoles", roleList) commit("setRoles", roleList)
......
...@@ -8,9 +8,9 @@ ...@@ -8,9 +8,9 @@
$base-color-default: #4e68ff; $base-color-default: #4e68ff;
$base-z-index: 999; $base-z-index: 999;
$base-menu-background: #08203d; $base-menu-background: #252C49;
$base-menu-children-background: #08203d; $base-menu-children-background: #252C49;
$base-menu-background-active: #164884; $base-menu-background-active: #546184;
$base-menu-color: hsla(0, 0%, 100%, 0.95); $base-menu-color: hsla(0, 0%, 100%, 0.95);
$base-menu-color-active: hsla(0, 0%, 100%, 0.95); $base-menu-color-active: hsla(0, 0%, 100%, 0.95);
$base-title-color: #fff; $base-title-color: #fff;
...@@ -30,7 +30,7 @@ $base-color-orange: #ff6700; ...@@ -30,7 +30,7 @@ $base-color-orange: #ff6700;
$base-color-red: #ff4d4f; $base-color-red: #ff4d4f;
$base-color-gray: rgba(0, 0, 0, 0.65); $base-color-gray: rgba(0, 0, 0, 0.65);
$base-main-width: 1279px; $base-main-width: 1279px;
$base-border-radius: 2px; $base-border-radius: 4px;
$base-border-color: #dcdfe6; $base-border-color: #dcdfe6;
$base-form-width: 600px; $base-form-width: 600px;
$base-input-height: 32px; $base-input-height: 32px;
......
const ls = window.localStorage const ls = window.localStorage
const ss = window.sessionStorage const ss = window.sessionStorage
import { storagePrefixName } from "@/config/settings"
export const Local = { export const Local = {
get(key, def) { get(key, def) {
let value = null let value = null
try { try {
value = JSON.parse(ls.getItem(key)) value = JSON.parse(ls.getItem(storagePrefixName + "-" + key))
} catch (e) { } catch (e) {
console.log(" ") console.log(" ")
} }
...@@ -19,14 +20,14 @@ export const Local = { ...@@ -19,14 +20,14 @@ export const Local = {
ls.setItem(i, JSON.stringify(setting[i])) ls.setItem(i, JSON.stringify(setting[i]))
} }
} else { } else {
ls.setItem(key, JSON.stringify(val)) ls.setItem(storagePrefixName + "-" + key, JSON.stringify(val))
} }
} catch (e) { } catch (e) {
console.log("'") console.log("'")
} }
}, },
remove(key) { remove(key) {
ls.removeItem(key) ls.removeItem(storagePrefixName + "-" + key)
}, },
clear() { clear() {
ls.clear() ls.clear()
...@@ -36,7 +37,7 @@ export const Local = { ...@@ -36,7 +37,7 @@ export const Local = {
export const Session = { export const Session = {
get(key) { get(key) {
try { try {
return JSON.parse(ss.getItem(key)) return JSON.parse(ss.getItem(storagePrefixName + "-" + key))
} catch (e) { } catch (e) {
return null return null
} }
...@@ -48,11 +49,11 @@ export const Session = { ...@@ -48,11 +49,11 @@ export const Session = {
ss.setItem(i, JSON.stringify(setting[i])) ss.setItem(i, JSON.stringify(setting[i]))
} }
} else { } else {
ss.setItem(key, JSON.stringify(val)) ss.setItem(storagePrefixName + "-" + key, JSON.stringify(val))
} }
}, },
remove(key) { remove(key) {
ss.removeItem(key) ss.removeItem(storagePrefixName + "-" + key)
}, },
clear() { clear() {
ss.clear() ss.clear()
......
<template>
<div>联盟介绍</div>
</template>
<script>
export default {
data () {
return {}
},
methods: {},
mounted () { },
watch: {}
}
</script>
<style lang="scss" scoped>
</style>
\ No newline at end of file
<template>
<div>案例分享</div>
</template>
<script>
export default {
data () {
return {}
},
methods: {},
mounted () { },
watch: {}
}
</script>
<style lang="scss" scoped>
</style>
\ No newline at end of file
<template>
<div class="commonList">
<ul class="left_bar">
<li
v-for="(item, index) in leftBar"
:key="index"
:class="index == activeBar ? 'activeBar' : ''"
@click="changeActive(index)"
>
{{ item.name }}
</li>
</ul>
<div v-if="!showText" class="right_list">
<div class="list_title">
{{ leftBar[activeBar].name }}
</div>
<ul class="list">
<li v-for="(item, index) in leftBar[activeBar].list" :key="index">
<div class="leftImg">
<img src="~@/assets/img/Home/shenghuo.png" alt="" />
</div>
<div class="rightCon">
<div class="top">
<div class="rc_title">{{ item.title }}</div>
<div class="rc_date">{{ item.time }}</div>
</div>
<div class="bottom" @click="viewDetail(index)">查看</div>
</div>
</li>
</ul>
</div>
<div v-if="showText" class="right_content">
<div class="breadcum">
<div
v-for="(item, index) in showTitle"
:key="index"
:class="[index != showTitle.length - 1 ? 'before' : 'now']"
@click="back(index)"
>
{{ item }}<span v-if="index != showTitle.length - 1"> / </span>
</div>
</div>
{{ showText }}
</div>
</div>
</template>
<script>
export default {
data() {
return {
activeBar: 0,
leftBar: [
{
name: "筛查",
list: [
{
id: 1,
title: "筛查数据的科学性",
text: "123",
time: "2022/06-30",
},
{
id: 2,
title: "筛查数据的科学性",
text: "1",
time: "2022/06-30",
},
],
},
{
name: "生活",
},
{
name: "医学知识",
},
{
name: "其他",
},
],
showText: "",
showTitle: [],
}
},
mounted() {
console.log(this.$route)
if (this.$route.query.tabIndex) {
this.activeBar = this.$route.query.tabIndex
}
},
methods: {
changeActive(i) {
this.activeBar = i
this.showText = ""
},
viewDetail(i) {
this.showText = this.leftBar[this.activeBar].list[i].text
this.showTitle[0] = this.leftBar[this.activeBar].name
this.showTitle[1] = this.leftBar[this.activeBar].list[i].title
console.log(this.showText)
},
back(index) {
if (index == 0) {
this.showText = ""
}
},
},
}
</script>
<style lang="scss" scoped>
.commonList {
display: flex;
justify-content: space-between;
.left_bar {
width: 188px;
height: 760px;
background: #ffffff;
border-radius: 4px;
padding: 20px 0;
li {
width: 188px;
height: 52px;
font-size: 16px;
font-family: AlibabaPuHuiTiM;
display: flex;
justify-content: center;
align-items: center;
cursor: pointer;
// background: rgba(78, 104, 255, 0.1);
}
.activeBar {
color: #4e68ff;
background: rgba(78, 104, 255, 0.1);
}
}
.right_list {
width: calc(100% - 208px);
height: 760px;
background: #ffffff;
border-radius: 4px;
padding: 32px;
.list_title {
height: 37px;
font-size: 16px;
font-family: AlibabaPuHuiTiR;
color: rgba(0, 0, 0, 0.8);
border-bottom: 1px solid #efefef;
}
.list {
li {
display: flex;
align-items: center;
margin-top: 20px;
.leftImg {
width: 132px;
height: 98px;
border-radius: 4px;
margin-right: 20px;
img {
width: 100%;
height: 100%;
}
}
.rightCon {
display: flex;
flex-direction: column;
justify-content: space-between;
height: 98px;
.rc_title {
font-size: 16px;
font-family: AlibabaPuHuiTiR;
color: #333333;
}
.rc_date {
font-size: 14px;
font-family: Roboto-Regular, Roboto;
font-weight: 400;
color: #999999;
}
.bottom {
cursor: pointer;
width: 68px;
height: 28px;
background: rgba(78, 104, 255, 0.1);
border-radius: 16px;
text-align: center;
font-size: 14px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #4e68ff;
line-height: 28px;
&:hover {
background: rgba(78, 104, 255, 0.2);
}
}
}
}
}
}
.right_content {
width: calc(100% - 208px);
height: 760px;
background: #ffffff;
border-radius: 4px;
padding: 32px;
}
}
.breadcum {
display: flex;
.before {
font-size: 16px;
font-family: AlibabaPuHuiTiR;
color: rgba(0, 0, 0, 0.4);
cursor: pointer;
&:hover {
color: #4e68ff;
}
}
.now {
margin-left: 5px;
font-size: 16px;
font-family: AlibabaPuHuiTiR;
}
}
</style>
<template>
<div class="commonList">
<ul class="left_bar">
<li
v-for="(item, index) in leftBar"
:key="index"
:class="index == activeBar ? 'activeBar' : ''"
@click="changeActive(index)"
>
{{ item.name }}
</li>
</ul>
<div class="right_list">
<div class="list_title">
{{ leftBar[activeBar].name }}
</div>
<ul class="list">
<li v-for="(item, index) in leftBar[activeBar].list" :key="index">
<div class="left_text">
<div class="circle"></div>
<div class="title">{{ item.title }}</div>
</div>
<div class="rig_date">
{{ item.time }}
</div>
</li>
</ul>
</div>
</div>
</template>
<script>
export default {
data() {
return {
activeBar: 0,
leftBar: [
{
name: "筛查技术方案",
list: [
{
title: "筛查数据的科学性",
text: "",
time: "2022/06-30",
},
{
title: "筛查数据的科学性",
text: "",
time: "2022/06-30",
},
],
},
{
name: "筛查指南",
},
{
name: "学术成果",
},
{
name: "项目进展与成果",
},
],
}
},
watch: {},
mounted() {
if (this.$route.query.tabIndex) {
this.activeBar = this.$route.query.tabIndex
}
},
methods: {
changeActive(i) {
this.activeBar = i
// this.$router.replace("/scientificresearch")
},
},
}
</script>
<style lang="scss" scoped>
.commonList {
display: flex;
justify-content: space-between;
.left_bar {
width: 188px;
height: 760px;
background: #ffffff;
border-radius: 4px;
padding: 20px 0;
li {
width: 188px;
height: 52px;
font-size: 16px;
font-family: AlibabaPuHuiTiM;
display: flex;
justify-content: center;
align-items: center;
cursor: pointer;
// background: rgba(78, 104, 255, 0.1);
}
.activeBar {
color: #4e68ff;
background: rgba(78, 104, 255, 0.1);
}
}
.right_list {
width: calc(100% - 208px);
height: 760px;
background: #ffffff;
border-radius: 4px;
padding: 32px;
.list_title {
height: 37px;
font-size: 16px;
font-family: AlibabaPuHuiTiR;
color: rgba(0, 0, 0, 0.8);
border-bottom: 1px solid #efefef;
}
.list {
li {
height: 22px;
font-size: 16px;
font-family: AlibabaPuHuiTiR;
color: #333333;
line-height: 22px;
margin-top: 20px;
display: flex;
justify-content: space-between;
align-items: center;
cursor: pointer;
.left_text {
display: flex;
align-items: center;
.circle {
width: 6px;
height: 6px;
background: #4e68ff;
border-radius: 50%;
margin-right: 8px;
}
}
.rig_date {
font-size: 14px;
font-family: Roboto-Regular, Roboto;
font-weight: 400;
color: #999999;
}
}
}
}
}
</style>
<template>
<div id="con">
<div class="top flex">
<div class="left box">
<video :src="videoSrc" controls class="video" />
</div>
<div class="right box tabbox">
<el-tabs v-model="curTab">
<el-tab-pane
v-for="(e, index) in tabList"
:key="index"
:label="e.title"
:name="e.title"
>
<ul class="tabslist">
<li v-for="(item, index) in noticeList" :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 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="range">
<div class="box_title text-center">累计上报量机构排名</div>
<div class="rangecontent">
<div class="top10"></div>
<ul class="rangeList">
<li
v-for="(item, index) in rangeList"
:key="index"
:style="{ color: index < 3 ? '#4E68FF' : '#333333' }"
>
<div>{{ index + 1 }}</div>
<div>{{ item.name }}</div>
<div>{{ item.value }}</div>
</li>
</ul>
</div>
</div>
<div class="range">
<div class="box_title text-center">当前季度上报量机构排名</div>
<div class="rangecontent">
<div class="top10"></div>
<ul class="rangeList">
<li
v-for="(item, index) in rangeList"
:key="index"
:style="{ color: index < 3 ? '#4E68FF' : '#333333' }"
>
<div>{{ index + 1 }}</div>
<div>{{ item.name }}</div>
<div>{{ item.value }}</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 },
})
"
>
{{ item.name }}
</li>
</ul>
</div>
<!-- 科学研究 -->
<div class="scientificresearch">
<div class="title_box">
<div class="title">科学研究</div>
<div class="empty"></div>
</div>
<ul class="researchList">
<li
v-for="(item, index) in researchList"
:key="index"
@click="
$router.push({
path: '/scientificresearch',
query: { tabIndex: index },
})
"
>
{{ item }}
</li>
</ul>
</div>
<!-- 粘性定位 -->
<div v-show="showFixed" class="fixed_box">
<ul class="f_list">
<li v-for="(item, index) in rigBarList" :key="index">
<img :src="item.src" alt="" /><span>{{ item.name }}</span>
</li>
<li class="qrc_Box">
<div class="qr_name">问题反馈群</div>
</li>
</ul>
</div>
</div>
</template>
<script>
export default {
data() {
return {
// videoSrc: require("../../../public/aaa.mp4"),
videoSrc: "",
tabList: [
{
title: "新闻会议",
},
{
title: "通知公告",
},
{
title: "学术动态",
},
],
noticeList: [
{
title: "典型案例小标题典型案例小标题",
date: "2022-09-26",
},
{
title: "典型案例小标题典型案例小标题",
date: "2022-09-26",
},
{
title: "典型案例小标题典型案例小标题",
date: "2022-09-26",
},
{
title: "典型案例小标题典型案例小标题",
date: "2022-09-26",
},
{
title: "典型案例小标题典型案例小标题",
date: "2022-09-26",
},
{
title: "典型案例小标题典型案例小标题",
date: "2022-09-26",
},
{
title: "典型案例小标题典型案例小标题",
date: "2022-09-26",
},
{
title: "典型案例小标题典型案例小标题",
date: "2022-09-26",
},
{
title: "典型案例小标题典型案例小标题",
date: "2022-09-26",
},
],
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 },
],
typeList: [
{
src: require("@/assets/img/Home/shaicha.png"),
name: "筛查",
route: "/healthpopularization",
},
{
src: require("@/assets/img/Home/shenghuo.png"),
name: "生活",
},
{
src: require("@/assets/img/Home/yixuezhishi.png"),
name: "医学知识",
},
{
src: require("@/assets/img/Home/qita.png"),
name: "其他",
},
],
rigBarList: [
{
src: require("@/assets/img/Home/kefu.png"),
name: "客服",
},
{
src: require("@/assets/img/Home/youxiang.png"),
name: "邮箱",
},
{
src: require("@/assets/img/Home/dizhi.png"),
name: "地址",
},
],
researchList: ["筛查技术方案", "筛查指南", "学术成果", "项目进展与成果"],
showFixed: false,
}
},
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
}
})
},
methods: {},
}
</script>
<style lang="scss" scoped>
#con {
.flex {
display: flex;
justify-content: space-between;
margin-bottom: 38px;
.box {
width: 48%;
height: 300px;
// background: blue;
background: #fff;
.video {
width: 100%;
height: 100%;
object-fit: cover;
}
}
.tabbox {
padding: 8px 16px;
overflow: hidden;
.tabslist {
height: 220px;
padding-right: 8px;
overflow: auto;
li {
display: flex;
align-items: center;
justify-content: space-between;
font-size: 14px;
font-family: AlibabaPuHuiTiR;
color: #666666;
margin-bottom: 16px;
cursor: pointer;
.left {
display: flex;
align-items: center;
.circle {
width: 4px;
height: 4px;
background: #7085fe;
border-radius: 50%;
margin-right: 8px;
}
}
}
}
}
}
.dataAnalysis {
.box_title {
width: 180px;
height: 36px;
background: #4e68ff;
border-radius: 0px 0px 4px 4px;
font-size: 16px;
font-family: AlibabaPuHuiTiM;
color: #ffffff;
margin: 0 auto;
line-height: 36px;
}
.cenbox {
height: 458px;
// background: url("~@/assets/img/Home/map.png") no-repeat center center;
// background-size: cover;
.map {
width: 100%;
height: 422px;
object-fit: contain;
}
}
.cenboxs {
display: flex;
justify-content: space-between;
.range {
width: 46%;
background: #ffffff;
border-radius: 4px;
border: 1px solid #d2d7f5;
padding: 0 7px;
.rangecontent {
margin-top: 6px;
height: 408px;
background: rgba(78, 104, 255, 0.06);
border-radius: 4px;
padding: 8px;
font-size: 14px;
font-family: AlibabaPuHuiTiM;
// color: #4e68ff;
.rangeList {
li {
margin-bottom: 14px;
display: flex;
justify-content: space-between;
div:nth-child(1) {
width: 20px;
}
div:nth-child(2) {
flex: 1;
}
div:nth-child(3) {
text-align: right;
}
}
}
}
.top10 {
height: 32px;
background: url("~@/assets/img/Home/top10.png") no-repeat center
center;
background-size: contain;
margin-bottom: 8px;
}
}
}
}
.healthPopularization {
margin-bottom: 38px;
.typeList {
display: flex;
justify-content: space-between;
li {
cursor: pointer;
width: 22%;
height: 188px;
display: flex;
justify-content: center;
align-items: center;
font-size: 24px;
color: #ffffff;
background-position: center center;
background-repeat: no-repeat;
background-size: cover;
}
}
}
.scientificresearch {
.researchList {
display: flex;
margin-bottom: 20px;
li {
width: 188px;
height: 64px;
background: #ffffff;
box-shadow: 0px 4px 1px 1px #3d58f9;
text-align: center;
line-height: 64px;
border-radius: 4px;
border: 1px solid rgba(78, 104, 255, 0.12);
font-size: 16px;
font-family: AlibabaPuHuiTiM;
color: #333333;
margin-right: 20px;
cursor: pointer;
}
}
}
.title_box {
display: flex;
margin-bottom: 24px;
.title {
width: 64px;
height: 30px;
font-size: 16px;
font-family: AlibabaPuHuiTiM;
color: #4e68ff;
line-height: 22px;
border-bottom: 2px solid #4e68ff;
}
.empty {
flex: 1;
height: 30px;
border-bottom: 2px solid #ffffff;
}
}
.fixed_box {
background: #fff;
position: fixed;
padding: 20px 10px;
right: 30px;
bottom: 300px;
z-index: 1000;
.f_list {
li {
display: flex;
align-items: center;
margin-bottom: 30px;
img {
width: 20px;
height: 20px;
margin-right: 5px;
}
span {
width: 28px;
font-size: 14px;
font-family: AlibabaPuHuiTiR;
color: #333333;
}
}
.qrc_Box {
right: 0;
display: block;
position: absolute;
width: 180px;
height: 214px;
background: #546184
linear-gradient(225deg, #707c9c 0%, #94a0c1 0%, #546184 100%);
border-radius: 4px;
padding: 10px;
text-align: center;
.qr_name {
width: 100%;
height: 24px;
font-size: 18px;
font-family: AlibabaPuHuiTiM;
color: #ffffff;
line-height: 24px;
}
}
}
}
}
</style>
<template>
<div class="audit-qualitycontrol">
<div class="aq-top-tab">
<el-tabs v-model="type" @tab-click="handleClick">
<el-tab-pane label="筛查病例数据" name="0"></el-tab-pane>
<el-tab-pane label="随访病例数据" name="1"></el-tab-pane>
</el-tabs>
</div>
<div class="aq-bot-table">
<div class="table-top-tab">
<el-tabs v-model="auditStatus" type="card" @tab-click="handleClick">
<el-tab-pane label="待审核" name="0"></el-tab-pane>
<el-tab-pane label="已审核" name="1"></el-tab-pane>
</el-tabs>
<div v-show="auditStatus == 1" class="keyExplain">
字段说明<img src="~@/assets/img/DataCenter/question.png" alt="" />
</div>
</div>
<div class="bot-table">
<customs-table
ref="table"
:table-data="tableData"
:columns="columns"
:header-class="'newHeader'"
:list-loading="listLoading"
:current-page="pageIndex"
:total-count="total"
:page-sizes="pageSizes"
:page-size="pageSize"
@pageSizeChange="handleSizeChange"
@currentPageChange="handleCurrentChange"
/>
</div>
</div>
</div>
</template>
<script>
import CustomsTable from "@/components/CustomsTable"
import paginationMixin from "@/components/TabComponents/mixin"
export default {
components: {
CustomsTable,
},
mixins: [paginationMixin],
data() {
return {
type: "0",
auditStatus: "0",
listLoading: false,
columns: [
{
label: "医联体",
minWidth: 120,
value: "title",
},
{
label: "已审核(例)",
minWidth: 120,
value: "file",
},
{
label: "待审核(例)备份",
minWidth: 120,
value: "uploadTime",
},
{
label: "最新上报时间",
minWidth: 120,
value: "editTime",
},
{
label: "操作",
width: 220,
fixed: "right",
operType: "button",
operations: [
{
func: this.auditHandle,
label: "审核",
type: "text",
},
],
},
],
tableData: [
{
title: "第一个",
isOpen: true,
},
],
}
},
watch: {},
mounted() {},
methods: {
handleClick() {
console.log("type:" + this.type, "auditStatus" + this.auditStatus)
if (this.auditStatus == 1) {
this.columns[this.columns.length - 1].operations[0].label =
"修改审核意见"
} else {
this.columns[this.columns.length - 1].operations[0].label = "审核"
}
},
auditHandle(data, i) {
console.log(data, i)
},
},
}
</script>
<style lang="scss" scoped>
.audit-qualitycontrol {
padding: 20px 0;
.table-top-tab {
margin-bottom: 15px;
position: relative;
.keyExplain {
position: absolute;
display: flex;
align-items: center;
right: 0;
top: 10%;
font-size: 16px;
font-family: AlibabaPuHuiTiR;
color: #999999;
img {
width: 18px;
height: 18px;
margin-left: 5px;
transform: translateY(1px);
}
}
}
.aq-bot-table {
padding: 20px;
::v-deep {
.el-tabs__nav {
border: none;
}
.el-tabs__item {
margin-right: 10px;
border: 1px solid #e4e7ed;
border-radius: 5px 5px 0 0;
}
.is-active {
background: #4e68ff;
color: #fff;
}
}
}
}
::v-deep {
.el-tabs__item {
padding-left: 20px !important;
font-size: 18px;
font-family: AlibabaPuHuiTiM;
}
.is-active {
color: #4e68ff;
}
}
</style>
<template>
<div>体检</div>
</template>
<script>
export default {
data() {
return {}
},
methods: {},
mounted() {},
watch: {},
}
</script>
<style lang="scss" scoped></style>
<template>
<div>医院质控</div>
</template>
<script>
export default {
data() {
return {}
},
methods: {},
mounted() {},
watch: {},
}
</script>
<style lang="scss" scoped></style>
<template>
<div class="dataCenter">
<div class="header">
<div
v-for="(item, index) in headList"
:key="index"
:class="['btn', selectedIndex == index ? 'active' : '']"
@click="setSelectedIndex(index)"
>
{{ item }}
</div>
</div>
<customs-table
ref="table"
:table-data="tableData"
:columns="columns"
:header-class="'newHeader'"
:list-loading="listLoading"
:current-page="pageIndex"
:total-count="total"
:page-sizes="pageSizes"
:page-size="pageSize"
@pageSizeChange="handleSizeChange"
@currentPageChange="handleCurrentChange"
/>
</div>
</template>
<script>
import CustomsTable from "@/components/CustomsTable"
import paginationMixin from "@/components/TabComponents/mixin"
export default {
// 数据概览
name: "",
components: {
CustomsTable,
},
mixins: [paginationMixin],
data() {
return {
listLoading: false,
selectedIndex: sessionStorage.getItem("homeSelectedIndex") - 0 || 0,
headList: ["社区筛查", "医院筛查", "体检筛查"],
columns: [
{
label: "医联体",
minWidth: 120,
value: "name",
},
{
label: "累计上报量",
minWidth: 120,
value: "1",
},
{
label: "最近一季度上报量",
minWidth: 120,
value: "2",
},
{
label: "累计审核合格量",
minWidth: 120,
value: "3",
},
{
label: "高风险",
minWidth: 120,
value: "4",
},
{
label: "中风险",
minWidth: 120,
value: "5",
},
{
label: "低风险",
minWidth: 120,
value: "6",
},
{
label: "胃癌",
minWidth: 120,
value: "7",
},
{
label: "早期胃癌",
minWidth: 120,
value: "8",
},
{
label: "食道癌",
minWidth: 120,
value: "9",
},
],
tableData: [
{
name: "1",
1: 2,
},
],
}
},
watch: {},
mounted() {},
methods: {
setSelectedIndex(i) {
console.log(this.selectedIndex)
this.selectedIndex = i
sessionStorage.setItem("homeSelectedIndex", this.selectedIndex)
},
},
}
</script>
<style lang="scss" scoped>
.dataCenter {
padding: 24px;
height: 100%;
display: flex;
flex-direction: column;
.header {
display: flex;
margin-bottom: 20px;
.btn {
cursor: pointer;
width: 112px;
height: 48px;
background: #ffffff;
border-radius: 4px;
border: 1px solid #dddddd;
font-size: 16px;
font-family: AlibabaPuHuiTiM;
color: #000;
text-align: center;
line-height: 48px;
margin-right: 24px;
}
.active {
background: #4e68ff;
border: none;
color: #ffffff;
}
}
}
</style>
<template>
<div class="screeningSearch">
<div class="top">
<form-components ref="formList" :forms="formList"></form-components>
</div>
<div class="bot">
<customs-table
ref="table"
:table-data="tableData"
:columns="columns"
:header-class="'newHeader'"
:list-loading="listLoading"
:current-page="pageIndex"
:total-count="total"
:page-sizes="pageSizes"
:page-size="pageSize"
@pageSizeChange="handleSizeChange"
@currentPageChange="handleCurrentChange"
/>
</div>
</div>
</template>
<script>
import FormComponents from "@/components/FormComponents"
import CustomsTable from "@/components/CustomsTable"
import paginationMixin from "@/components/TabComponents/mixin"
import { getEncryptList } from "@/api/encrtpttest"
// import * as CryptoJS from "crypto-js"
import getSha256 from "crypto-js/sha256"
import md5 from "js-md5"
export default {
components: {
CustomsTable,
FormComponents,
},
mixins: [paginationMixin],
data() {
return {
listLoading: false,
modifiedFlag: false,
encryptIdcard: "",
columns: [
{
label: "姓名",
value: "name",
minWidth: 120,
},
{
label: "生日",
value: "birthday",
minWidth: 120,
},
{
label: "身份证",
value: "encryptedIdCard",
minWidth: 120,
},
],
tableData: [],
formList: [
{
xs: 24,
sm: 12,
md: 12,
lg: 7,
xl: 7,
type: "input",
label: "身份证",
prop: "idCard",
placeholder: "请输入身份证",
rules: [],
},
{
xs: 1,
sm: 2,
md: 2,
lg: 2,
xl: 2,
type: "btn",
list: [
{
btnType: "button",
type: "",
style: {
width: "80px",
height: "32px",
borderRadius: "4px",
fontSize: "14px",
marginLeft: "40px",
},
btnText: "查询",
func: () => {
this.onSearch()
},
},
],
},
],
}
},
watch: {},
mounted() {
this.handleSearch()
},
methods: {
changeModified() {
this.modifiedFlag = !this.modifiedFlag
},
setSelectedIndex(i) {
console.log(this.selectedIndex)
this.selectedIndex = i
sessionStorage.setItem("homeSelectedIndex", this.selectedIndex)
},
changePage(v) {
this.page[v.type] = v.value
console.log(this.page)
this.$refs.customTable.loading = false
},
onSearch() {
let idCard = this.$refs.formList.form.idCard
if (idCard) {
let data = md5(idCard)
data = "pa" + data + "1+"
const sha256Encrypt = getSha256(data).toString() // data - 需要加密的数据
//增量计算哈希值,减少内存
// const encryptedHexStr = CryptoJS.enc.Hex.parse(sha256Encrypt)
// const mic = CryptoJS.enc.Base64.stringify(encryptedHexStr) // base64加密
this.encryptIdcard = sha256Encrypt
this.handleSearch()
} else {
this.encryptIdcard = ""
this.handleSearch()
}
},
handleSearch() {
let params = {
current: this.pageIndex,
size: this.pageSize,
}
if (this.encryptIdcard) {
params.idCard = this.encryptIdcard
}
console.log(params)
getEncryptList(params).then((res) => {
if (res.code == 1) {
this.tableData = res.data.records
this.total = res.data.total
}
})
},
},
}
</script>
<style lang="scss" scoped>
.screeningSearch {
.top {
width: 100%;
// height: 72px;
padding: 0 116px 0 44px;
display: flex;
justify-content: space-between;
align-items: center;
}
.bot {
padding: 0 24px;
}
}
</style>
<template>
<div class="screeningSearch">
<div class="top">
<form-components :forms="formList"></form-components>
</div>
<div class="bot">
<customs-table
ref="table"
:table-data="tableData"
:columns="columns"
:header-class="'newHeader'"
:list-loading="listLoading"
:current-page="pageIndex"
:total-count="total"
:page-sizes="pageSizes"
:page-size="pageSize"
@pageSizeChange="handleSizeChange"
@currentPageChange="handleCurrentChange"
/>
</div>
</div>
</template>
<script>
import FormComponents from "@/components/FormComponents"
import CustomsTable from "@/components/CustomsTable"
import paginationMixin from "@/components/TabComponents/mixin"
export default {
components: {
FormComponents,
CustomsTable,
},
mixins: [paginationMixin],
data() {
return {
listLoading: false,
keyword: "",
modifiedFlag: false,
columns: [
{
label: "医联体",
minWidth: 120,
value: "groupName",
},
{
label: "姓名",
minWidth: 120,
value: "name",
},
{
label: "性别",
minWidth: 120,
value: "sex",
},
{
label: "身份证",
minWidth: 120,
value: "idCard",
},
{
label: "年龄",
minWidth: 120,
value: "age",
},
{
label: "筛查时间",
minWidth: 120,
value: "screenTime",
},
{
label: "风险评估结果",
minWidth: 120,
value: "result",
},
{
label: "上次随访时间",
minWidth: 120,
value: "targetFieldCode",
},
{
label: "筛查审核状态",
minWidth: 180,
value: "createTime",
},
{
label: "操作",
width: 220,
fixed: "right",
operType: "button",
operations: [
{
func: this.rowOpration,
formatter(row) {
return {
label: " 录入",
type: "text",
}
},
},
],
},
],
tableData: [
{
groupName: "第一个",
},
{
groupName: "第一个",
},
{
groupName: "第一个",
},
{
groupName: "第一个",
},
{
groupName: "第一个",
},
{
groupName: "第一个",
},
{
groupName: "第一个",
},
{
groupName: "第一个",
},
{
groupName: "第十个",
},
{
groupName: "第一个",
},
{
groupName: "第一个",
},
{
groupName: "第一个",
},
{
groupName: "第一个",
},
{
groupName: "第一个",
},
{
groupName: "第一个",
},
{
groupName: "第一个",
},
{
groupName: "第一个",
},
{
groupName: "第十个",
},
{
groupName: "第一个",
},
{
groupName: "第er一个",
},
],
formList: [
{
type: "select",
label: "筛查时间",
prop: "screeningTime",
placeholder: "请选择时间",
rules: [],
opts: [{ label: "123", value: "1" }],
},
{
type: "select",
label: "随访审核状态",
prop: "screeningStatus",
placeholder: "请选择随访状态",
rules: [],
opts: [{ label: "123", value: "1" }],
},
{
type: "select",
label: "随访进度",
prop: "screeningProgress",
placeholder: "请选择随访进度",
rules: [],
opts: [{ label: "123", value: "1" }],
},
{
type: "select",
label: "计划随访时间",
prop: "planScreeningTime",
placeholder: "请选择计划随访时间",
rules: [],
opts: [{ label: "123", value: "1" }],
},
{
type: "input",
label: "关键词",
prop: "keyWord",
placeholder: "请输入医联体/姓名/身份证",
rules: [],
},
{
type: "btn",
list: [
{
btnType: "button",
type: "",
style: {
width: "80px",
height: "32px",
borderRadius: "4px",
fontSize: "14px",
marginLeft: "40px",
},
btnText: "查询",
func: () => {
this.onSearch()
},
},
{
btnType: "tobeModified",
tobeModified: 20,
},
],
},
],
}
},
watch: {},
mounted() {
this.total = 20
},
methods: {
changeModified() {
this.modifiedFlag = !this.modifiedFlag
},
setSelectedIndex(i) {
console.log(this.selectedIndex)
this.selectedIndex = i
sessionStorage.setItem("homeSelectedIndex", this.selectedIndex)
},
handleSizeChange(v) {
console.log(v)
},
onSearch() {
console.log(123456)
},
rowOpration(row, index) {
console.log(row, index)
},
},
}
</script>
<style lang="scss" scoped>
.screeningSearch {
.top {
width: 100%;
// height: 72px;
padding: 0 116px 0 44px;
display: flex;
justify-content: space-between;
align-items: center;
}
.bot {
padding: 0 24px;
}
}
</style>
<template>
<div class="screeningSearch">
<div class="top">
<form-components :forms="formList"></form-components>
</div>
<div class="bot">
<customs-table
ref="table"
:table-data="tableData"
:columns="columns"
:header-class="'newHeader'"
:list-loading="listLoading"
:current-page="pageIndex"
:total-count="total"
:page-sizes="pageSizes"
:page-size="pageSize"
@pageSizeChange="handleSizeChange"
@currentPageChange="handleCurrentChange"
/>
</div>
</div>
</template>
<script>
import FormComponents from "@/components/FormComponents"
import CustomsTable from "@/components/CustomsTable"
import paginationMixin from "@/components/TabComponents/mixin"
export default {
components: {
CustomsTable,
FormComponents,
},
mixins: [paginationMixin],
data() {
return {
listLoading: false,
keyword: "",
modifiedFlag: false,
columns: [
{
label: "医联体",
value: "name",
minWidth: 120,
},
{
label: "姓名",
value: "1",
minWidth: 120,
},
{
label: "性别",
value: "2",
minWidth: 120,
},
{
label: "身份证",
value: "3",
minWidth: 120,
},
{
label: "年龄",
minWidth: 120,
},
{
label: "筛查时间",
value: "5",
minWidth: 120,
},
{
label: "风险评估结果",
value: "6",
minWidth: 120,
},
{
label: "上次随访时间",
value: "7",
minWidth: 120,
},
{
label: "随访进度",
value: "8",
minWidth: 120,
},
{
label: "计划随访时间",
value: "9",
minWidth: 120,
},
{
label: "操作",
width: 220,
fixed: "right",
operType: "button",
operations: [
{
func: this.rowOpration,
formatter(row) {
return {
label: " 录入",
type: "text",
}
},
},
],
},
],
tableData: [
{
name: "1",
1: 2,
},
],
formList: [
{
xs: 24,
sm: 12,
md: 12,
lg: 7,
xl: 7,
type: "select",
label: "计划随访时间",
prop: "planScreeningTime",
placeholder: "请选择计划随访时间",
rules: [],
opts: [{ label: "123", value: "1" }],
},
{
xs: 24,
sm: 12,
md: 12,
lg: 7,
xl: 7,
type: "input",
label: "关键词",
prop: "keyWord",
placeholder: "请输入医联体/姓名/身份证",
rules: [],
},
{
xs: 24,
sm: 12,
md: 12,
lg: 7,
xl: 7,
type: "select",
label: "随访进度",
prop: "screeningProgress",
placeholder: "请选择随访进度",
rules: [],
opts: [{ label: "123", value: "1" }],
},
{
xs: 1,
sm: 2,
md: 2,
lg: 2,
xl: 2,
type: "btn",
list: [
{
btnType: "button",
type: "",
style: {
width: "80px",
height: "32px",
borderRadius: "4px",
fontSize: "14px",
marginLeft: "40px",
},
btnText: "查询",
func: () => {
this.onSearch()
},
},
// {
// btnType: "tobeModified",
// tobeModified: 20,
// },
],
},
],
}
},
watch: {},
mounted() {},
methods: {
changeModified() {
this.modifiedFlag = !this.modifiedFlag
},
setSelectedIndex(i) {
console.log(this.selectedIndex)
this.selectedIndex = i
sessionStorage.setItem("homeSelectedIndex", this.selectedIndex)
},
changePage(v) {
this.page[v.type] = v.value
console.log(this.page)
this.$refs.customTable.loading = false
},
onSearch() {
console.log(123456)
},
},
}
</script>
<style lang="scss" scoped>
.screeningSearch {
.top {
width: 100%;
// height: 72px;
padding: 0 116px 0 44px;
display: flex;
justify-content: space-between;
align-items: center;
}
.bot {
padding: 0 24px;
}
}
</style>
<template>
<div class="main-box">
<div class="total-box">
<div class="box-title">
<div class="blue-area mr-12"></div>
<span class="bold-font">总体情况</span>
</div>
<el-row :gutter="20" class="data-box">
<el-col :span="6" v-for="(item,index) in totalList" :key="index">
<div class="grid-content mb-12">{{item.label}}</div>
<h1>{{totalData[item.prop]}}</h1>
</el-col>
</el-row>
</div>
<div class="person-area">
<div class="box-title">
<div class="blue-area mr-12"></div>
<span class="bold-font">个人绩效情况</span>
</div>
<div class="type-box">
<span class="mr-10">选择统计周期:</span>
<el-radio-group v-model="periodType">
<el-radio-button label="month">月度</el-radio-button>
<el-radio-button label="season">季度</el-radio-button>
<el-radio-button label="year">年度</el-radio-button>
</el-radio-group>
</div>
<div class="type-box">
<span class="mr-10">选择统计年份:</span>
<el-select v-model="yearBtn" placeholder="请选择">
<el-option v-for="item in yearList" :value="item" :key="item" :label="item"></el-option>
</el-select>
</div>
<el-table :data="tableData" border show-summary class="mt-20">
<el-table-column
v-for="(item,index) in tableColumn"
:key="index"
:prop="item.prop"
:label="item.label"
:width="item.width"
></el-table-column>
</el-table>
</div>
</div>
</template>
<script>
export default {
data() {
return {
totalList:[
{
label:"累计审核病例数",
prop:"account"
},
{
label:"累计审核合格病例数",
prop:"account"
},
{
label:"累计审核驳回修改病例数",
prop:"account"
},
{
label:"累计审核不合格病例数",
prop:"account"
},
],
totalData:{
account:1600
},
periodType:"month",
yearList: [2021],
yearBtn:2022,
tableData:[{
id: '12987122',
name: '王小虎',
season: '234',
amount2: '3.2',
amount3: 10
}, {
id: '12987123',
name: '王小虎',
season: '165',
amount2: '4.43',
amount3: 12
}, {
id: '12987124',
name: '王小虎',
season: '324',
amount2: '1.9',
amount3: 9
}, {
id: '12987125',
name: '王小虎',
season: '621',
amount2: '2.2',
amount3: 17
}, {
id: '12987126',
name: '王小虎',
season: '539',
amount2: '4.1',
amount3: 15
}]
}
},
methods: {
getNow() {
const nowDate = new Date()
this.yearBtn = nowDate.getFullYear();
if(!this.yearList.find((item) => item == this.yearBtn)){
this.yearList.push(this.yearBtn)
this.yearList.sort((a, b) => {
return a - b
})
}
},
},
mounted() {},
created() {
this.getNow();
},
watch: {},
computed:{
tableColumn(){
const listM=[
{
label:"月份",
prop:"month"
},
{
label:"审核病例数(例)",
prop:"count"
},
]
const listS=[
{
label:"季度",
prop:"season"
},
{
label:"审核病例数(例)",
prop:"count"
},
]
if(this.periodType == 'month'){
return listM
}
if(this.periodType == 'season'){
return listS
}
}
}
}
</script>
<style lang="scss" scoped>
::v-deep {
.data-box {
margin: 24px 0px;
border-bottom: 1px solid #f3f3f3;
}
.el-col {
text-align: center;
margin: 12px 0px 28px;
border-right: 1px solid #f3f3f3;
.grid-content {
font-size: 16px;
font-family: AlibabaPuHuiTiR;
color: #333333;
}
h1 {
color: #4e68ff;
font-weight: bold;
font-size: 32px;
}
}
.el-col:last-child {
border-right: none;
}
}
.main-box {
margin: 24px;
}
.box-title {
display: flex;
flex-direction: row;
}
.blue-area {
width: 4px;
height: 24px;
background: #4e68ff;
}
.bold-font {
font-size: 18px;
font-family: AlibabaPuHuiTiM;
color: #333333;
font-weight: bold;
}
.type-box {
display: flex;
flex-direction: row;
margin: 32px 0px 0px;
line-height: 32px;
}
</style>
<template>
<div>2222</div>
</template>
<template>
<div>草稿箱</div>
</template>
<script>
export default {
data() {
return {}
},
methods: {},
mounted() {},
watch: {},
}
</script>
<style lang="scss" scoped></style>
<template>
<ConfigForms form-type="1"></ConfigForms>
</template>
<script>
import ConfigForms from "./components/ConfigForms.vue"
export default {
name: "ScreeningAdd",
components: {
ConfigForms,
},
data() {
return {}
},
methods: {},
created() {},
}
</script>
<style lang="scss" scoped></style>
<template>
<div>
<el-tabs
v-model="activeName"
type="card"
style="margin-top: 10px"
v-loading="fromLoading"
v-if="formTabs && formTabs.length > 0"
@tab-click="handleTabClick"
>
<el-tab-pane
:label="form.label"
:name="'index' + index"
v-for="(form, index) in formTabs"
:key="form.id"
>
<transition mode="out-in" name="fade-transform">
<div v-show="activeName === 'index' + index">
<template v-if="form.formId">
<form-tab
:patient-id="patientId"
:patient-standby-id="patientStandbyId"
:form="form"
:disabled="disabled"
contrast
@setFormJson="setFormJson"
@handleConfirm="handleConfirm"
></form-tab>
</template>
</div>
</transition>
</el-tab-pane>
</el-tabs>
<el-empty v-else description="暂无数据"></el-empty>
</div>
</template>
<script>
import mixin from "./mixin"
export default {
name: "ConfigForms",
mixins: [mixin],
props: {
disabled: Boolean,
formType: String,
patientId: String,
},
data() {
return {}
},
methods: {
handleConfirm(data, done, cb) {
this.addPatient(data, done, cb)
},
},
created() {
// 字典formType 1 筛查表单
this.getCurrentFormByType(this.formType)
},
}
</script>
<template>
<el-container>
<el-main v-loading="pageLoading" class="transition-box">
<i
v-if="contrast"
:class="asideShow ? 'el-icon-s-unfold' : 'el-icon-s-fold'"
:title="asideShow ? '收起' : '展开'"
class="arrow"
@click="asideShow = !asideShow"
></i>
<el-empty v-if="isEmpty" description="暂无数据"></el-empty>
<template v-if="!isEmpty">
<!-- 多次记录 -->
<el-row v-if="form.fillType === 1">
<tags-scroll-bar
v-if="repeatedlyList.length > 0"
:tags-list="repeatedlyList"
:props="{ label: 'time' }"
ref="tags"
@change="changeRepeate"
:disabled="disabled"
@add="handleAdd"
></tags-scroll-bar>
</el-row>
<el-row class="header">
<template v-if="formData.percent.autoPercent">
<span class="label">自动采集完整度:</span>
<span class="value">{{ formData.percent.autoPercent }}%</span>
</template>
<template v-if="formData.percent.personalPercent">
<span class="label">人工补录完整度:</span>
<span class="value"
>{{ formData.percent.personalPercent }}%</span
></template
>
<span class="label"> 仅显示重要字段 :</span>
<span class="value">
<el-switch v-model="isShowImprotant" @change="imFieldChange">
</el-switch>
</span>
</el-row>
<div
class="my-form"
ref="my-form"
:class="externalScroll ? 'no-scroll' : ''"
>
<custom-form
ref="form"
@scrollTop="scrollTop"
:options="widgetFormPreview"
@handleConfirm="handleConfirm"
:form-edit="formData.formEdit"
></custom-form>
</div>
</template>
</el-main>
<el-aside
:width="sideWidth"
class="transition-box"
:class="{ hidden: !asideShow }"
v-if="contrast"
>
<div class="side-content"></div>
</el-aside>
</el-container>
</template>
<script>
import { getPatientDetail, getRecordList } from "@/api/patient.js"
import { getFormDetail } from "@/api/field"
import CustomForm from "@/components/FormComponents/CustomForm/index"
import TagsScrollBar from "@/components/TagsScrollBar/index"
export default {
name: "FormTab",
props: {
externalScroll: Boolean, //外部滚动
disabled: Boolean,
contrast: Boolean, //同屏对照
form: Object,
patientId: String,
patientStandbyId: String,
getAll: Boolean, // 获取页面所有数据
},
components: { CustomForm, TagsScrollBar },
provide() {
return {
formId: this.form.formId,
getPatientId: () => {
return this.patientId || this.patientStandbyId
},
}
},
data() {
return {
btnType: "",
isShowImprotant: false,
asideShow: true,
widgetFormPreview: {},
formData: {
formEdit: {},
percent: {},
formRecordId: null,
},
loading: false,
formloading: false,
repeatedlyList: [],
formCacheList: [],
}
},
// mixins: [resizeMixin],
computed: {
isEmpty() {
return !(Object.keys(this.widgetFormPreview) || this.widgetFormPreview)
.length
},
sideWidth() {
return this.asideShow ? "200px" : "0px"
},
pageLoading() {
return this.loading || this.formloading
},
},
methods: {
initData() {
this.formData.formRecordId = null
this.formCacheList = []
this.getPatientDetail()
if (this.form.fillType === 1) {
this.$nextTick(() => {
this.$refs.form && this.$refs.form.resetForm()
})
this.getRecordList()
}
},
scrollTop() {
this.$refs["my-form"].scrollTop = 0
},
handleAdd() {
this.$refs.form && this.$refs.form.resetForm()
this.formData = {
formEdit: {},
percent: {},
formRecordId: null,
}
},
// 切换时间
changeRepeate(index) {
const item = this.repeatedlyList[index]
if (item.id === this.formData.formRecordId) return
const data = this.formCacheList.find((_) => _.formRecordId === item.id)
if (data) {
this.$refs.form && this.$refs.form.resetForm()
this.formData = data
return
}
this.formData.formRecordId = item.id
this.getPatientDetail()
},
imFieldChange(val) {
this.$refs.form.imFieldChange(val)
},
initForm() {
this.formloading = true
if (this.form.formJson) {
const obj = eval("(" + this.form.formJson + ")")
if (this.disabled) {
obj.menuBtn = false
obj.disabled = true
obj.detail = true
}
setTimeout(() => {
this.widgetFormPreview = obj
this.formloading = false
}, 100)
return
}
getFormDetail(this.form.formId)
.then((res) => {
if (res.code === 1 && res.data) {
const formJson = res.data.formJson
this.$emit("setFormJson", formJson)
const obj = eval("(" + formJson + ")")
if (this.disabled) {
obj.menuBtn = false
obj.disabled = true
obj.detail = true
}
this.widgetFormPreview = obj
}
})
.finally(() => {
this.formloading = false
})
},
handleConfirm(data, done) {
this.$emit(
"handleConfirm",
{
data,
formId: this.form.formId,
patientId: this.patientId || this.patientStandbyId,
formRecordId: this.formData.formRecordId,
},
done,
(res) => {
// 多次填写的表单新增时,获取最新数据
if (this.form.fillType === 1 && !this.formData.formRecordId) {
this.getRecordList(res.data.formRecordId)
}
this.formatData(res, this.form.fillType !== 1)
}
)
},
getPatientDetail() {
this.$nextTick(() => {
this.$refs.form && this.$refs.form.resetForm()
})
if (!this.patientId || this.form.silent) return
this.loading = true
getPatientDetail({
patientId: this.patientId,
formId: this.form.formId,
formRecordId: this.formData.formRecordId,
})
.then((res) => {
this.formatData(res)
})
.finally(() => {
this.loading = false
})
},
formatData(res, cache) {
const d = res.data || {}
const form = d.data || {}
if (form["YZZKJC"] && typeof form["YZZKJC"] === "string") {
form["YZZKJC"] = JSON.parse(form["YZZKJC"])
}
if (!cache) {
this.formData.formEdit = form
}
this.formData.formRecordId = d.formRecordId
this.formData.percent = d.percent || {}
const index = this.formCacheList.findIndex(
(_) => _.formRecordId === d.formRecordId
)
if (index > -1) {
this.formCacheList.splice(index, 1, this.deepClone(this.formData))
} else {
this.formCacheList.push(this.deepClone(this.formData))
}
},
getRecordList(formRecordId) {
if (!this.patientId) return
getRecordList({
patientId: this.patientId,
formId: this.form.formId,
}).then((res) => {
this.repeatedlyList = res.data.map((_, index) => {
return {
..._,
time: _.createTime,
}
})
this.$nextTick(() => {
const el = this.$refs.tags
if (el) {
el.tabActive =
formRecordId ||
(this.repeatedlyList[0] && this.repeatedlyList[0].id)
}
})
})
},
},
created() {
this.initForm()
if (this.getAll) {
// 监听patientId 获取页面所有数据
this.$watch(
"patientId",
() => {
this.initData()
},
{ immediate: true }
)
} else {
// 监听form.silent 获取当前tab页数据
this.$watch(
"form.silent",
() => {
this.initData()
},
{ immediate: true }
)
}
},
}
</script>
<style scoped lang="scss">
.el-main {
position: relative;
padding: 0;
.arrow {
position: absolute;
right: 0;
top: 0;
cursor: pointer;
font-size: 22px;
z-index: 9;
}
.header {
box-shadow: 0 1px 4px rgb(0 21 41 / 8%);
padding-right: 20px;
position: relative;
font-size: 15px;
}
}
.el-aside {
padding-left: 10px;
border-left: 1px solid #ccc;
.side-content {
// height: calc(100vh - #{"272px"});
// overflow: auto;
}
}
.my-form {
height: calc(100vh - #{"270px"});
overflow-y: auto;
padding-top: 20px;
position: relative;
&::-webkit-scrollbar-thumb {
background-color: #fff;
}
&:hover::-webkit-scrollbar-thumb {
background-color: rgba(0, 0, 0, 0.4);
}
&.no-scroll {
height: auto;
}
}
.label {
font-size: 14px;
color: #8492a6;
line-height: 38px;
float: left;
margin-right: 20px;
}
.value {
font-size: 14px;
line-height: 38px;
float: left;
font-weight: 600;
margin-right: 50px;
}
.el-slider {
float: left;
width: 150px;
}
.transition-box {
transition: all 0.2s;
&.hidden {
opacity: 0;
height: 0px;
}
}
</style>
import { addPatient } from "@/api/patient.js"
import FormTab from "./FormTab"
import { mapGetters } from "vuex"
import { getCurrentFormByType } from "@/api/coop-group.js"
export default {
components: { FormTab },
data() {
return {
activeName: "index0",
fromLoading: false,
patientStandbyId: null, // 备用id
formTabs: [],
formTabsList: [],
isUpdated: false,
name: "",
patient_number: "",
}
},
computed: {
...mapGetters({
group: ["user/group"],
}),
},
methods: {
handleTabClick({ index, name }) {
const { formId, id, silent } = this.formTabs[index]
if (formId && silent) {
this.formTabs[index]["silent"] = false //控制是否获取接口数据
return
}
this.formTabs.splice(index, 1, {
...this.formTabsList.find((_) => _.id === id),
})
},
async addPatient(data, done, cb, type) {
addPatient(data, type)
.then((res) => {
this.$message.success("操作成功")
if (res.data) {
this.isUpdated = true
this.patientStandbyId = res.data.patientId
if (
cb &&
Object.prototype.toString.call(cb) === "[object Function]"
) {
cb(res)
}
}
})
.finally((e) => {
done()
})
},
// json存储
setFormJson(formJson) {
const idx = this.activeName.replace("index", "")
this.formTabs[idx].formJson = formJson
this.formTabsList[idx].formJson = formJson
},
getCurrentFormByType(type = 1) {
this.fromLoading = true
getCurrentFormByType({
type: 1,
groupId: this.group.groupId,
})
.then((res) => {
if (res.code === 1) {
const formTabs = []
this.formTabsList = res.data.map((item, index) => {
if (index === 0) {
formTabs.push({
silent: false,
...item,
label: item.tabName,
})
} else {
formTabs.push({
id: item.id,
silent: true,
label: item.tabName,
})
}
return {
...item,
silent: false,
label: item.tabName,
}
})
this.formTabs = formTabs
}
})
.finally(() => {
this.fromLoading = false
})
},
},
}
<template>
<div class="container">
<div v-show="!isDetail">
<direct-search
ref="form"
:label-position="'right'"
:forms="searchList"
:style="{ textAlign: 'left' }"
@handleSearch="handleFormSearch"
/>
<el-table-self
ref="table"
:table-data="tableData"
:columns="columns"
:list-loading="listLoading"
:current-page="pageIndex"
:total-count="total"
:page-sizes="pageSizes"
:page-size="pageSize"
@pageSizeChange="handleSizeChange"
@currentPageChange="handleCurrentChange"
:sortChange="sortChange"
/>
</div>
<div v-if="isDetail">
<div>
<el-button icon="el-icon-back" @click="isDetail = false"
>返 回</el-button
>
</div>
<ConfigForms
form-type="1"
:patient-id="patientId"
:disabled="disabled"
></ConfigForms>
</div>
</div>
</template>
<script>
import paginationMixin from "@/components/TabComponents/mixin"
import { getPatientPage } from "@/api/patient.js"
import ConfigForms from "./components/ConfigForms.vue"
export default {
name: "ScreeningIndex",
mixins: [paginationMixin],
components: { ConfigForms },
data() {
return {
isDetail: false,
listLoading: false,
disabled: false,
tableData: [],
cacheForm: {},
searchList: [
{
type: "input",
label: "姓名",
prop: "patientName",
},
{
label: "性别",
type: "select",
prop: "gender",
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: "button",
icon: "el-icon-search",
value: "搜索",
},
],
columns: [
{
label: "姓名",
minWidth: 120,
value: "hzxx_xm",
},
{
label: "出生日期",
minWidth: 120,
value: "hzxx_csrq",
},
{
label: "性别",
minWidth: 80,
value: "hzxx_xb",
formatter: (row) => {
return this.$handle.formatDicList(
this.dictMap["d-sex"],
row.hzxx_xb
)
},
},
{
label: "创建时间",
minWidth: 180,
sortable: "custom",
value: "create_time",
},
{
label: "保存时间",
minWidth: 180,
sortable: "custom",
value: "update_time",
},
{
label: "操作",
width: 180,
fixed: "right",
operType: "button",
operations: [
{
func: this.handleView,
formatter(row) {
return {
label: "查看",
type: "text",
}
},
},
{
func: this.handleAdd,
formatter(row) {
return {
label: "修改",
type: "text",
}
},
},
],
},
],
}
},
methods: {
handleView(row) {
this.handleAdd(row, null, true)
},
handleAdd({ patient_id, hzxx_xm }, index, disabled = false) {
this.disabled = disabled
this.isDetail = true
this.patientId = patient_id || null
this.name = hzxx_xm
},
sortChange({ prop, order }) {
const asc = order ? (order === "ascending" ? true : false) : ""
const column = order ? prop : ""
this.handleSearch({ "orders[0].asc": asc, "orders[0].column": column })
},
// 查询
handleFormSearch(form) {
this.pageIndex = 1
this.handleSearch(form)
},
handleSearch(form) {
this.listLoading = true
const params = Object.assign(this.cacheForm, form)
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]
}
}
}
data.current = this.pageIndex
data.size = this.pageSize
getPatientPage(data).then((res) => {
this.listLoading = false
if (res.code === 1) {
const d = res.data
this.tableData = d.records || []
this.total = Number(d.total)
}
})
},
},
created() {
this.handleFormSearch()
},
}
</script>
<style lang="scss" scoped></style>
<template>
<el-row class="page-container dict">
<el-container class="page-main" :gutter="20">
<el-aside width="250px" class="left-content">
<el-col :span="24" class="left-search">
<el-input
v-model.trim="searchVal"
clearable
:placeholder="placeholder"
>
</el-input>
</el-col>
<el-col class="dict-list" ref="dict">
<el-col
v-for="(item, index) in tableList"
:key="item.id"
class="dict-item"
>
<span
@click="handClick(index, item)"
:class="{ active: index == isActive }"
style="cursor: pointer"
>
<strong>
{{ item.label }}
</strong>
- {{ item.value }}
</span>
</el-col>
</el-col>
</el-aside>
<el-main>
<div style="text-align: right">
<el-input
v-model.trim="keyWord"
clearable
placeholder="关键字"
style="width: 220px; margin-right: 5px"
>
</el-input>
<el-button type="primary" @click="handleSave" :loading="loading"
>保存配置</el-button
>
</div>
<el-table-self
style="margin-top: 10px"
ref="table"
:table-data="fields"
:columns="columns"
:list-loading="listLoading"
/>
</el-main>
</el-container>
</el-row>
</template>
<script>
import { setExportFields, getTableFields, getExportConfigFields } from "@/api/coop-group"
export default {
name: "ExportFieldConfig",
props: {
groupId: String,
},
data() {
return {
isActive: -1,
placeholder: "搜索数据库",
name: "",
searchVal: "",
keyWord: "",
typeId: "",
fieldList: [],
configuredFieldList: [],
tableCode: "",
loading: false,
listLoading: false,
columns: [
{
label: "字段名称",
minWidth: 120,
value: "fieldName",
},
{
label: "字段code",
minWidth: 200,
value: "fieldCode",
},
{
operType: "checkbox",
label: "是否导出",
minWidth: 100,
value: "isExport",
tabType: "selection",
},
{
operType: "checkbox",
label: "是否脱敏",
minWidth: 100,
value: "isDesensitized",
tabType: "selection",
},
{
operType: "input",
type: "number",
label: "排序号",
width: 120,
inputWidth: 108,
value: "sort",
showInput: true,
},
],
}
},
watch: {
groupId(groupId) {
if (groupId) {
this.getTableFields()
this.getFields()
}
},
},
computed: {
// 数据库表过滤
tableList() {
const dictTable = this.dictMap["table"] || []
const list = dictTable.filter(
(_) =>
!this.searchVal ||
_.label.includes(this.searchVal) ||
_.value.includes(this.searchVal)
)
this.isActive = this.getListIdx(list, this.typeId)
return list
},
// 全部字段和已配置字段
fieldValue() {
return this.fieldList.map((field) => {
let configuredField = this.configuredFieldList.find(
(_) => _.fieldCode === field.fieldCode
)
return {
...field,
sort: (configuredField && configuredField.sort) || undefined,
isExport: Boolean(configuredField),
isDesensitized: Boolean(
configuredField && configuredField.isDesensitized
),
}
})
},
fields() {
return this.fieldValue.filter(
(_) =>
!this.keyWord ||
_.fieldName.includes(this.keyWord) ||
_.fieldCode.includes(this.keyWord)
)
},
},
methods: {
// 点击左侧列表
handClick(index, { type, label, id, value }) {
if (!this.groupId) {
this.$message.warning("请先选择协作组")
return
}
this.name = label
this.tableCode = value
this.isActive = index
this.typeId = id
this.fieldList = []
this.getTableFields()
this.getFields()
},
// 全部字段
getTableFields() {
getTableFields({ tableCode: this.tableCode, groupId: this.groupId }).then(
(res) => {
this.fieldList = res.data
}
)
},
// 已配置字段
getFields() {
getExportConfigFields({ tableCode: this.tableCode, groupId: this.groupId })
.then((res) => {
this.configuredFieldList = res.data
})
.catch((e) => {
this.configuredFieldList = []
})
},
handleSave() {
if (!this.groupId) {
this.$message.warning("请先选择协作组")
return
}
if (!this.fieldValue.length) {
this.$message.warning("没有可保存的数据")
return
}
const list = this.fieldValue
.filter((_) => _.isExport)
.map((_) => {
delete _.isExport
return {
..._,
isDesensitized: _.isDesensitized ? 1 : 0,
}
})
const table = {
tableCode: this.tableCode,
tableName: this.name,
groupId: this.groupId,
}
this.loading = true
setExportFields(table, list)
.then((res) => {
this.$message.success("配置成功")
})
.finally(() => {
this.loading = false
})
},
getListIdx(list = [], id) {
let listIdx = -1
for (var i = 0; i < list.length; i++) {
if (list[i].id === id) {
listIdx = i
break
}
}
return listIdx
},
},
}
</script>
<style lang="scss" scoped>
::v-deep .el-main {
padding: 0px 0 0 10px;
}
</style>
...@@ -184,14 +184,6 @@ export default { ...@@ -184,14 +184,6 @@ export default {
prop: "tabName", prop: "tabName",
rules: [{ required: true, message: "请输入表单重命名" }], rules: [{ required: true, message: "请输入表单重命名" }],
}, },
{
type: "select",
label: "机构/科室",
placeholder: "请选择机构/科室",
prop: "deptId",
opts: [],
rules: [{ required: true, message: "请选择机构/科室" }],
},
{ {
type: "select", type: "select",
label: "类型", label: "类型",
...@@ -202,6 +194,7 @@ export default { ...@@ -202,6 +194,7 @@ export default {
}, },
rules: [{ required: true, message: "请选择类型" }], rules: [{ required: true, message: "请选择类型" }],
}, },
{ {
type: "select", type: "select",
label: "填报方式", label: "填报方式",
...@@ -219,6 +212,14 @@ export default { ...@@ -219,6 +212,14 @@ export default {
], ],
rules: [{ required: true, message: "请选择填报方式" }], rules: [{ required: true, message: "请选择填报方式" }],
}, },
{
type: "select",
label: "机构/科室",
placeholder: "请选择机构/科室",
prop: "deptId",
opts: [],
},
{ {
type: "select", type: "select",
label: "对照模板", label: "对照模板",
...@@ -273,7 +274,6 @@ export default { ...@@ -273,7 +274,6 @@ export default {
}) })
}, },
handleCopyAdd(row) { handleCopyAdd(row) {
const data = Object.assign({}, row) const data = Object.assign({}, row)
delete data.id delete data.id
......
...@@ -50,10 +50,13 @@ export default { ...@@ -50,10 +50,13 @@ export default {
// 查询列表 // 查询列表
searchList: [ searchList: [
{ {
label: "参数代码", label: "类型",
type: "input", type: "select",
prop: "code", prop: "type",
placeholder: "请输入参数代码", placeholder: "请输入类型",
optsFormatter: () => {
return this.dictMap && this.dictMap["sys_param_type"]
},
}, },
{ {
label: "参数值", label: "参数值",
...@@ -61,12 +64,7 @@ export default { ...@@ -61,12 +64,7 @@ export default {
prop: "value", prop: "value",
placeholder: "请输入参数值", placeholder: "请输入参数值",
}, },
{
label: "类型",
type: "input",
prop: "type",
placeholder: "请输入类型",
},
{ {
type: "button", type: "button",
value: "查询", value: "查询",
...@@ -81,10 +79,29 @@ export default { ...@@ -81,10 +79,29 @@ export default {
}, },
], ],
columns: [ columns: [
{
label: "类型",
minWidth: 100,
value: "type",
formatter: (row) => {
return this.$handle.formatDicList(
this.dictMap["sys_param_type"],
row.type
)
},
},
{ {
label: "参数代码", label: "参数代码",
minWidth: 120, minWidth: 120,
value: "code", value: "code",
formatter: (row) => {
const item =
this.dictMap["sys_param_type"].find(
(_) => _.value === row.type
) || {}
const list = item.children || []
return this.$handle.formatDicList(list, row.code)
},
}, },
{ {
...@@ -92,21 +109,7 @@ export default { ...@@ -92,21 +109,7 @@ export default {
minWidth: 120, minWidth: 120,
value: "value", value: "value",
}, },
{
label: "类型",
minWidth: 100,
value: "type",
},
{
label: "目标值名称",
minWidth: 100,
value: "targetName",
},
{
label: "目标值",
minWidth: 100,
value: "targetValue",
},
{ {
label: "创建时间", label: "创建时间",
minWidth: 180, minWidth: 180,
...@@ -151,12 +154,24 @@ export default { ...@@ -151,12 +154,24 @@ export default {
cacheForm: {}, cacheForm: {},
formData: [ formData: [
{ {
type: "input", type: "select",
label: "类型",
placeholder: "请选择类型",
prop: "type",
rules: [{ required: true, message: "请选择类型" }],
func: this.typeChange,
optsFormatter: () => {
return this.dictMap && this.dictMap["sys_param_type"]
},
},
{
type: "select",
label: "参数代码", label: "参数代码",
placeholder: "请输入参数代码", placeholder: "请输入参数代码",
prop: "code", prop: "code",
disabled: false, disabled: false,
rules: [{ required: true, message: "参数代码" }], rules: [{ required: true, message: "参数代码" }],
opts: [],
}, },
{ {
type: "input", type: "input",
...@@ -168,22 +183,9 @@ export default { ...@@ -168,22 +183,9 @@ export default {
{ {
type: "input", type: "input",
label: "类型", label: "默认参数值",
placeholder: "请选择类型", placeholder: "请选择默认参数值",
prop: "type", prop: "defaultValue",
rules: [{ required: true, message: "请选择类型" }],
},
{
type: "input",
label: "目标值名称",
placeholder: "请选择目标值名称",
prop: "targetName",
},
{
type: "input",
label: "目标值",
placeholder: "请选择目标值",
prop: "targetValue",
}, },
], ],
formEdit: {}, formEdit: {},
...@@ -200,6 +202,11 @@ export default { ...@@ -200,6 +202,11 @@ export default {
}, },
methods: { methods: {
typeChange(val) {
this.$refs.dialog.initFields({ code: "" })
const opt = this.dictMap["sys_param_type"].find((_) => _.value === val)
this.formData[1].opts = (opt && opt.children) || []
},
handleAdd(row) { handleAdd(row) {
this.formEdit = Object.assign({}, row) this.formEdit = Object.assign({}, row)
if (!this.groupId) { if (!this.groupId) {
...@@ -212,13 +219,17 @@ export default { ...@@ -212,13 +219,17 @@ export default {
const data = Object.assign(form, { const data = Object.assign(form, {
groupId: this.groupId, groupId: this.groupId,
}) })
setParamConfig(data).then((res) => { setParamConfig(data)
.then((res) => {
if (res.code === 1) { if (res.code === 1) {
this.$message.success("添加成功") this.$message.success("添加成功")
this.handleSearch() this.handleSearch()
this.$refs.dialog.close() this.$refs.dialog.close()
} }
}) })
.finally(() => {
this.$refs.dialog.loading = false
})
}, },
handleDel(row) { handleDel(row) {
this.$confirm(`是否删除【${row.code || ""}】?`, "提示", { this.$confirm(`是否删除【${row.code || ""}】?`, "提示", {
......
<template>
<el-row class="page-container dict">
<el-container class="page-main" :gutter="20">
<el-aside width="250px" class="left-content">
<el-col :span="24" class="left-search">
<el-input
v-model.trim="searchVal"
clearable
:placeholder="placeholder"
>
</el-input>
</el-col>
<el-col class="dict-list" ref="dict">
<el-col
v-for="(item, index) in tableList"
:key="item.id"
class="dict-item"
>
<span
@click="handClick(index, item)"
:class="{ active: index == isActive }"
style="cursor: pointer"
>
<strong>
{{ item.label }}
</strong>
- {{ item.value }}
</span>
</el-col>
</el-col>
</el-aside>
<el-main>
<el-button type="primary" @click="handleClone">引用配置</el-button>
<div style="text-align: right">
<el-input
v-model.trim="keyWord"
clearable
placeholder="关键字"
style="width: 220px; margin-right: 5px"
>
</el-input>
<el-button
type="primary"
v-if="tableCode === 'data_lab_detail'"
@click="handleAdd"
>新增(检验细项)</el-button
>
</div>
<el-table-self
style="margin-top: 10px"
ref="table"
:table-data="
tableCode === 'data_lab_detail' ? configuredFields : fields
"
:columns="columns"
:list-loading="listLoading"
/>
</el-main>
<dialog-form
width="650px"
:close-modal="false"
label-width="140px"
ref="dialog"
title="引用其他机构协作组配置"
:form-data="formData"
@handleConfirm="handleConfirm"
></dialog-form>
<el-drawer
title="配置字段"
:visible.sync="widgetVisible"
:size="500"
:wrapperClosable="false"
>
<div class="drawer__container">
<div class="drawer__content">
<div class="widget-config">
<el-form
label-suffix=":"
labelPosition="left"
labelWidth="110px"
ref="form"
:rules="rules"
size="small"
:model="configForm"
>
<el-form-item label="数据模块" prop="firstType">
<el-select
v-model="configForm.firstType"
placeholder="选择数据模块"
style="width: 100%"
@change="firstTypeChange"
clearable
filterable
>
<el-option
:label="item.label"
:value="item.value"
v-for="item in dictMap['data_module']"
:key="item.id"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="数据子模块">
<el-select
v-model="configForm.subType"
placeholder="选择数据子模块"
style="width: 100%"
clearable
filterable
>
<el-option
:label="item.label"
:value="item.value"
v-for="item in subTypeOpts"
:key="item.id"
></el-option>
</el-select>
</el-form-item>
<div style="margin-bottom: 10px; font-size: 18px">父级字段</div>
<el-form-item label="父级数据表">
<el-select
v-model="configForm.parentTableCode"
placeholder="选择父级数据表"
style="width: 100%"
@change="tableChange"
clearable
filterable
>
<el-option
:label="item.label"
:value="item.value"
v-for="item in dictMap['table']"
:key="item.id"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="父级字段">
<el-select
v-model="configForm.parentFieldCode"
placeholder="选择父级字段"
style="width: 100%"
clearable
filterable
>
<el-option
:label="item.label"
:value="item.value"
v-for="item in parentFieldOpts"
:key="item.id"
></el-option>
</el-select>
</el-form-item>
<div style="margin-bottom: 10px; font-size: 18px">
当前配置字段
</div>
<el-form-item label="字段名称">
<el-input
v-model="configForm.fieldName"
:disabled="isDisabled"
></el-input>
</el-form-item>
<el-form-item label="字段编码">
<el-input
v-model="configForm.fieldCode"
:disabled="isDisabled"
></el-input>
</el-form-item>
<div style="margin-bottom: 10px; font-size: 18px">完整性</div>
<el-form-item label="是否必填" labelWidth="130px">
<el-switch
v-model="configForm.isRequired"
:active-value="1"
:inactive-value="0"
></el-switch>
</el-form-item>
<div style="margin-bottom: 10px; font-size: 18px">有效性</div>
<el-form-item label="字典值域范围">
<el-select
v-model="configForm.dictType"
placeholder="选择字典"
style="width: 100%"
@change="dicTypeChange"
clearable
filterable
>
<el-option
:label="item.name"
:value="item.type"
v-for="item in dictList"
:key="item.id"
></el-option>
</el-select>
</el-form-item>
<div
class="el-form-item--small el-form--label-top"
style="padding-bottom: 14px"
>
<strong class="el-form-item__label" style="padding: 0"
>字典数据示例:</strong
>
<div class="el-form-item__content">
<draggable
tag="ul"
:list="dicData"
:group="{ name: 'dic' }"
ghost-class="ghost"
handle=".drag-item"
>
<li v-for="(item, index) in dicData" :key="index">
<i
class="drag-item el-icon-s-operation"
style="font-size: 16px; margin: 0 5px; cursor: move"
></i>
<el-input
style="margin-right: 5px"
size="mini"
readonly
clearable
v-model="item.label"
placeholder="label"
></el-input>
<el-input
size="mini"
clearable
readonly
v-model="item.value"
placeholder="value"
></el-input>
</li>
</draggable>
</div>
</div>
<el-form-item label="正则表达式">
<el-input v-model="configForm.regexStr" clearable></el-input>
</el-form-item>
<el-form-item label="Hutool校验">
<el-select
v-model="configForm.htType"
placeholder="选择Hutool校验"
style="width: 100%"
clearable
filterable
>
<el-option
:label="item.label"
:value="item.value"
v-for="item in dictMap['hutool_validator']"
:key="item.id"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="文本长度">
<div style="display: flex">
<el-input-number
v-model.trim="configForm.minLen"
:min="0"
clearable
controls-position="right"
size="mini"
placeholder="最小长度"
></el-input-number>
<span style="margin: 0 10px"> - </span>
<el-input-number
v-model.trim="configForm.maxLen"
clearable
:min="configForm.minLen + 1"
controls-position="right"
size="mini"
placeholder="最大长度"
></el-input-number>
</div>
</el-form-item>
<el-form-item label="数值范围">
<div style="display: flex">
<el-input-number
v-model.trim="configForm.minValue"
clearable
controls-position="right"
size="mini"
placeholder="最小值"
></el-input-number>
<span style="margin: 0 10px"> - </span>
<el-input-number
v-model.trim="configForm.maxValue"
clearable
:min="configForm.minValue + 1"
controls-position="right"
size="mini"
placeholder="最大值"
></el-input-number>
</div>
</el-form-item>
<div style="margin-bottom: 10px; font-size: 18px">一致性</div>
<el-form-item label="逻辑质控">
<el-input
v-model.trim="configForm.logicStr"
type="textarea"
clearable
placeholder="逻辑质控"
></el-input>
</el-form-item>
<div style="margin-bottom: 10px; font-size: 18px">准确性</div>
<el-form-item label="逻辑质控">
<el-input
v-model.trim="configForm.note"
type="textarea"
clearable
placeholder="逻辑质控"
></el-input>
</el-form-item>
</el-form>
</div>
</div>
<div class="footer">
<el-button @click="widgetVisible = false" size="large"
>取 消</el-button
>
<el-button
size="large"
type="primary"
:loading="loading"
@click="handleConfigConfirm"
>确 定</el-button
>
</div>
</div>
</el-drawer>
</el-container>
</el-row>
</template>
<script>
import {
setQcConfigFields,
getTableFields,
getQcConfigFields,
setQcConfigField,
getQcGroupOption,
setCloneConf,
delConf,
} from "@/api/coop-group"
import Draggable from "vuedraggable"
import { mapGetters } from "vuex"
export default {
name: "QualityControlConfig",
components: { Draggable },
props: {
groupId: String,
groupName: String,
},
data() {
return {
isDisabled: true,
subTypeOpts: [],
parentFieldOpts: [],
widgetVisible: false,
configForm: {
firstType: "",
subType: "",
},
rules: {
firstType: [
{ required: true, message: "请选择数据模块", trigger: "change" },
],
},
isActive: -1,
placeholder: "搜索数据库",
name: "",
searchVal: "",
keyWord: "",
typeId: "",
fieldList: [],
configuredFieldList: [],
tableCode: "",
loading: false,
listLoading: false,
configIndex: 0,
formData: [
{
type: "select",
label: "引用机构/协作组",
placeholder: "请选择机构/协作组",
prop: "id",
opts: [],
rules: [{ required: true, message: "请选择机构/协作组" }],
},
],
columns: [
{
label: "数据模块",
minWidth: 120,
value: "firstType",
hidden: true,
},
{
label: "数据子模块",
minWidth: 120,
value: "subType",
hidden: true,
},
{
label: "字段名称",
minWidth: 120,
value: "fieldName",
},
{
label: "字段code",
minWidth: 120,
value: "fieldCode",
},
{
label: "规则",
minWidth: 200,
value: "logicStr",
},
{
label: "操作",
width: 160,
fixed: "right",
operType: "button",
operations: [
{
func: this.handleConfig,
formatter(row) {
return {
label: "配置",
type: "text",
}
},
},
{
func: this.handleDel,
style: {
color: "#F56C6C",
},
formatter(row) {
return {
label: "删除配置",
type: "text",
}
},
},
],
},
],
dicData: [],
}
},
watch: {
groupId(groupId) {
if (groupId) {
this.getTableFields()
this.getFields()
}
},
tableCode(tableCode) {
this.columns[0].hidden = this.columns[1].hidden =
tableCode === "data_lab_detail" ? false : true
},
},
computed: {
...mapGetters({
dictList: ["dict/dictSet"],
dictMap: ["dict/dictMap"],
}),
// 数据库表过滤
tableList() {
const dictTable =
(this.dictMap["table"] &&
this.dictMap["table"].filter((_) => _.value !== "data_lab_type")) ||
[]
const list = dictTable.filter(
(_) =>
!this.searchVal ||
_.label.includes(this.searchVal) ||
_.value.includes(this.searchVal)
)
this.isActive = this.getListIdx(list, this.typeId)
return list
},
fields() {
return this.fieldList.filter(
(_) =>
!this.keyWord ||
_.fieldName.includes(this.keyWord) ||
_.fieldCode.includes(this.keyWord)
)
},
configuredFields() {
return this.configuredFieldList.filter(
(_) =>
!this.keyWord ||
_.fieldName.includes(this.keyWord) ||
_.fieldCode.includes(this.keyWord)
)
},
},
methods: {
handleDel(row) {
this.$confirm(`是否删除【${row.fieldName || ""}】配置?`, "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
delConf(row.id).then((res) => {
if (res.code === 1) {
this.$message({
type: "success",
message: "删除成功!",
})
this.getTableFields()
}
})
})
.catch(() => {})
},
handleClone() {
if (!this.groupId) {
this.$message.warning("请先选择协作组")
return
}
this.$refs.dialog.open()
},
handleConfirm({ id }) {
const { diseaseCode, groupId, orgId } = this.formData[0].opts.find(
(item) => item.groupId === id
)
const params = {
sourceDiseaseCode: diseaseCode,
sourceGroupId: groupId,
sourceOrgId: orgId,
targetGroupId: this.groupId,
}
setCloneConf(params).then((res) => {
this.$message.success("配置成功")
this.getFields()
this.$refs.dialog.close()
})
},
handleConfigConfirm() {
this.$refs.form.validate((valid) => {
if (valid) {
const data = Object.assign(
{
tableCode: this.tableCode,
tableName: this.name,
groupId: this.groupId,
groupName: this.groupName,
},
this.configForm
)
this.loading = true
setQcConfigField(data)
.then((res) => {
this.$message.success("配置成功")
this.getFields()
this.widgetVisible = false
})
.finally(() => {
this.loading = false
})
} else {
}
})
},
tableChange(tableCode) {
if (!tableCode) {
this.parentFieldOpts = []
return
}
getTableFields({ tableCode, groupId: this.groupId }).then((res) => {
this.parentFieldOpts = res.data.map((_) => {
return {
..._,
label: _.fieldName,
value: _.fieldCode,
}
})
})
},
firstTypeChange(val, notEmpty = false) {
let list = []
const current = this.dictMap["data_module"].find((_) => _.value === val)
if (current && current.children) {
list = current.children
}
if (!notEmpty) {
this.$set(this.configForm, "subType", "")
}
this.subTypeOpts = list
},
dicTypeChange(type) {
this.dicData = this.deepClone(this.dictMap[type])
},
handleAdd() {
this.handleConfig({}, -1)
},
handleConfig(row, index) {
this.configForm = Object.assign({}, row, {
maxLen: this.formatter(row.maxLen),
minLen: this.formatter(row.minLen),
maxValue: this.formatter(row.maxValue),
minValue: this.formatter(row.minValue),
})
this.dicTypeChange(row.dictType)
this.firstTypeChange(row.firstType, true)
this.isDisabled = index > -1
this.configIndex = index
this.widgetVisible = true
},
formatter(val) {
return val === "" || val === null ? undefined : val
},
getQcGroupOption() {
getQcGroupOption().then((res) => {
this.formData[0].opts = res.data.map((item) => {
return {
...item,
value: item.groupId,
label: `机构:${item.orgName} | 疾病: ${item.diseaseName} | 协作组: ${item.groupName}`,
}
})
})
},
// 点击左侧列表
handClick(index, { type, label, id, value }) {
if (!this.groupId) {
this.$message.warning("请先选择协作组")
return
}
this.name = label
this.tableCode = value
this.isActive = index
this.typeId = id
this.fieldList = []
this.getTableFields()
},
// 全部字段
getTableFields() {
getTableFields({ tableCode: this.tableCode, groupId: this.groupId }).then(
(res) => {
this.fieldList = res.data
this.getFields()
}
)
},
// 已配置字段
getFields() {
if (!this.tableCode) return
getQcConfigFields({ tableCode: this.tableCode, groupId: this.groupId })
.then((res) => {
this.configuredFieldList = res.data
this.fieldList = this.fieldList.map((field) => {
let configuredField = this.configuredFieldList.find(
(_) => _.fieldCode === field.fieldCode
)
return {
...field,
...configuredField,
}
})
})
.catch((e) => {
this.configuredFieldList = []
})
},
// 批量保存
handleSave() {
if (!this.groupId) {
this.$message.warning("请先选择协作组")
return
}
const table = {
tableCode: this.tableCode,
tableName: this.name,
groupId: this.groupId,
groupName: this.groupName,
}
const fieldList =
this.tableCode === "data_lab_detail"
? this.configuredFieldList
: this.fieldList
const list = fieldList
.filter((_) => _.firstType)
.map((_) => {
return {
..._,
...table,
}
})
if (!list.length) {
this.$message.warning("没有可保存的数据")
return
}
this.loading = true
setQcConfigFields(table, list)
.then((res) => {
this.$message.success("配置成功")
this.getFields()
})
.finally(() => {
this.loading = false
})
},
getListIdx(list = [], id) {
let listIdx = -1
for (var i = 0; i < list.length; i++) {
if (list[i].id === id) {
listIdx = i
break
}
}
return listIdx
},
},
created() {
this.getQcGroupOption()
},
}
</script>
<style lang="scss" scoped>
::v-deep .el-main {
padding: 0px 0 0 10px;
}
.drawer__container {
padding: 0 20px;
.drawer__content {
height: calc(100vh - #{"160px"});
overflow-y: auto;
::v-deep .el-input-number {
width: 100%;
}
&::-webkit-scrollbar {
width: 0px;
height: 0px;
}
&::-webkit-scrollbar-thumb {
background-color: #fff;
}
}
.footer {
margin-top: 20px;
display: flex;
button {
flex: 1;
}
}
}
</style>
...@@ -38,15 +38,6 @@ ...@@ -38,15 +38,6 @@
<el-tab-pane label="表单管理" name="second"> <el-tab-pane label="表单管理" name="second">
<GroupForm :group-id="groupId"></GroupForm> <GroupForm :group-id="groupId"></GroupForm>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="导出字段配置" name="third">
<ExportFieldConfig :group-id="groupId"></ExportFieldConfig>
</el-tab-pane>
<el-tab-pane label="质控配置" name="fourth">
<QualityControlConfig
:group-id="groupId"
:group-name="groupName"
></QualityControlConfig>
</el-tab-pane>
<el-tab-pane label="参数配置" name="fifth"> <el-tab-pane label="参数配置" name="fifth">
<ParameterConfig :group-id="groupId"></ParameterConfig> <ParameterConfig :group-id="groupId"></ParameterConfig>
</el-tab-pane> </el-tab-pane>
...@@ -65,18 +56,14 @@ ...@@ -65,18 +56,14 @@
</template> </template>
<script> <script>
import ExportFieldConfig from "./ExportFieldConfig.vue"
import GroupUser from "./GroupUser" import GroupUser from "./GroupUser"
import GroupForm from "./GroupForm" import GroupForm from "./GroupForm"
import QualityControlConfig from "./QualityControlConfig.vue"
import ParameterConfig from "./ParameterConfig.vue" import ParameterConfig from "./ParameterConfig.vue"
import { translateListToTree } from "@/utils/handleRoutes" import { translateListToTree } from "@/utils/handleRoutes"
import { getCoopGroupList, addCoopGroup } from "@/api/coop-group.js" import { getCoopGroupList, addCoopGroup } from "@/api/coop-group.js"
export default { export default {
name: "CollaGroup", name: "CollaGroup",
components: { components: {
ExportFieldConfig,
QualityControlConfig,
GroupUser, GroupUser,
GroupForm, GroupForm,
ParameterConfig, ParameterConfig,
......
<template>
<div class="container">
<direct-search
ref="form"
:label-position="'right'"
:forms="searchList"
:style="{ textAlign: 'left' }"
@handleSearch="handleFormSearch"
/>
<el-table-self
ref="table"
:table-data="tableData"
:columns="columns"
:list-loading="listLoading"
:current-page="pageIndex"
:total-count="total"
:page-sizes="pageSizes"
:page-size="pageSize"
@pageSizeChange="handleSizeChange"
@currentPageChange="handleCurrentChange"
/>
<dialog-form
width="800px"
:close-modal="false"
ref="dialog"
:title="formEdit.id ? '编辑数据库' : '添加数据库'"
:form-edit="formEdit"
:form-data="formData"
@handleConfirm="handleConfirm"
confirmText="保 存"
>
<template #otherButton="scoped">
<el-button
size="medium"
:loading="loading"
type="primary"
@click="testDb(scoped.form)"
>测试连接</el-button
>
</template>
</dialog-form>
</div>
</template>
<script>
import paginationMixin from "@/components/TabComponents/mixin"
import { getDbPage, addDb, testDb } from "@/api/database.js"
export default {
name: "Database",
data() {
return {
listLoading: false,
// 查询列表
searchList: [
{
label: "数据库名称",
type: "input",
prop: "dbName",
placeholder: "请输入数据库名称",
},
{
type: "button",
value: "查询",
icon: "el-icon-search",
},
{
type: "button",
color: "primary",
icon: "el-icon-plus",
value: "添加",
func: this.handleAdd,
},
],
columns: [
{
label: "数据库名称",
minWidth: 180,
value: "dbName",
},
{
label: "数据源名称",
minWidth: 120,
value: "name",
},
{
label: "数据源驱动",
minWidth: 80,
value: "driverClassName",
formatter: (row) => {
return this.$handle.formatDicList(
this.dictMap["db_driver"],
row.driverClassName
)
},
},
{
label: "数据源类型",
minWidth: 80,
value: "type",
formatter: (row) => {
return this.$handle.formatDicList(this.dictMap["db_type"], row.type)
},
},
{
label: "库表前缀",
minWidth: 80,
value: "prefix",
},
{
label: "内网url",
minWidth: 120,
value: "inteUrl",
},
{
label: "内网host",
minWidth: 120,
value: "inteHost",
},
{
label: "外网url",
minWidth: 120,
value: "outUrl",
},
{
label: "外网host",
minWidth: 120,
value: "outHost",
},
{
label: "端口",
minWidth: 60,
value: "port",
},
{
label: "用户名",
minWidth: 120,
value: "username",
},
{
label: "操作",
width: 120,
fixed: "right",
operType: "button",
operations: [
{
func: this.handleAdd,
formatter(row) {
return {
label: "编辑",
type: "primary",
}
},
},
],
},
],
tableData: [],
cacheForm: {},
title: "",
formData: [
{
type: "input",
label: "数据库名称",
placeholder: "请输入数据库名称",
prop: "dbName",
rules: [{ required: true, message: "请输入数据库名称" }],
spanCount: 12,
},
{
type: "input",
label: "数据源名称",
placeholder: "请输入数据源名称",
prop: "name",
rules: [{ required: true, message: "请输入数据源名称" }],
spanCount: 12,
},
{
type: "select",
label: "数据源驱动",
prop: "driverClassName",
rules: [{ required: true, message: "请输入数据源驱动" }],
optsFormatter: () => {
return this.dictMap && this.dictMap["db_driver"]
},
spanCount: 12,
},
{
type: "input",
label: "库表前缀",
placeholder: "请输入库表前缀",
prop: "prefix",
rules: [{ required: true, message: "请输入库表前缀" }],
spanCount: 12,
},
{
type: "select",
label: "数据源类型",
prop: "type",
rules: [{ required: true, message: "请输入数据源类型" }],
optsFormatter: () => {
return this.dictMap && this.dictMap["db_type"]
},
spanCount: 12,
},
{
type: "input",
label: "端口",
placeholder: "请输入端口",
prop: "port",
spanCount: 12,
rules: [{ required: true, message: "请输入端口" }],
},
{
type: "input",
label: "内网url",
placeholder: "请输入内网url",
prop: "inteUrl",
rules: [{ required: true, message: "请输入内网url" }],
spanCount: 12,
},
{
type: "input",
label: "内网host",
placeholder: "请输入内网host",
prop: "inteHost",
spanCount: 12,
},
{
type: "input",
label: "外网url",
placeholder: "请输入外网url",
prop: "outUrl",
rules: [{ required: true, message: "请输入外网url" }],
spanCount: 12,
},
{
type: "input",
label: "外网host",
placeholder: "请输入外网host",
prop: "outHost",
spanCount: 12,
},
{
type: "input",
label: "用户名",
placeholder: "请输入用户名",
prop: "username",
rules: [{ required: true, message: "请输入用户名" }],
spanCount: 12,
},
{
type: "input",
label: "密码",
placeholder: "请输入密码",
prop: "pwd",
rules: [{ required: true, message: "请输入密码" }],
spanCount: 12,
},
],
formEdit: {},
loading: false,
}
},
mixins: [paginationMixin],
methods: {
handleAdd(row = {}) {
this.formEdit = { ...row }
this.$refs.dialog.open()
},
testDb(form) {
this.loading = true
testDb(form)
.then((res) => {
this.$message.info(res.data)
})
.finally(() => {
this.loading = false
})
},
handleConfirm(form) {
const data = { ...form }
const msg = data.id ? "编辑成功" : "新增成功"
addDb(data)
.then((res) => {
this.$message.success(msg)
this.handleSearch()
this.$refs.dialog.close()
})
.finally(() => {
this.$refs.dialog.loading = false
})
},
// 查询
handleFormSearch(form) {
this.pageIndex = 1
this.handleSearch(form)
},
handleSearch(form) {
Object.assign(this.cacheForm, form)
this.listLoading = true
const params = { ...this.cacheForm }
for (let key in params) {
if (params[key] === "") {
delete params[key]
}
}
params.current = this.pageIndex
params.size = this.pageSize
getDbPage(params).then((res) => {
this.listLoading = false
if (res.code === 1) {
const d = res.data
this.tableData = d.records || []
this.total = Number(d.total)
}
})
},
},
created() {
this.handleFormSearch()
},
}
</script>
<template>
<div class="container">
<direct-search
ref="form"
:label-position="'right'"
:forms="searchList"
:style="{ textAlign: 'left' }"
@handleSearch="handleFormSearch"
/>
<el-table-self
ref="table"
:table-data="tableData"
:columns="columns"
:list-loading="listLoading"
/>
<el-drawer
:title="widgetFormSelect.id ? '编辑' : '新增'"
:visible.sync="widgetVisible"
:size="500"
:wrapperClosable="false"
>
<div class="drawer__container">
<div class="drawer__content">
<widget-config
:data="widgetFormSelect"
:propNotEdit="propNotEdit"
layout-hidden
>
<template v-slot:dbtable>
<el-collapse-item
name="4"
title="数据库属性与命名标准"
v-if="!['group', 'title'].includes(widgetFormSelect.type)"
>
<el-form-item label="数据类型">
<el-select
v-model="widgetFormSelect.fieldType"
placeholder="字段存储类型"
style="width: 100%"
clearable
>
<el-option
:label="item.label"
:value="item.value"
v-for="item in dictMap['data_type']"
:key="item.value"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="数据宽度">
<el-input
style="width: 100%"
v-model="widgetFormSelect.fieldLength"
:controls="false"
clearable
placeholder="数据宽度"
></el-input>
</el-form-item>
<el-form-item label="数据元标识">
<el-input
v-model="widgetFormSelect.hisElementIdent"
clearable
placeholder="数据元标识"
></el-input>
</el-form-item>
<el-form-item label="数据元值类型">
<el-input
v-model="widgetFormSelect.hisDataType"
clearable
placeholder="数据元值类型"
></el-input>
</el-form-item>
<el-form-item label="表达格式">
<el-input
v-model="widgetFormSelect.hisRepresentFormat"
clearable
placeholder="表达格式"
></el-input>
</el-form-item>
<el-form-item label="允许值">
<el-input
v-model="widgetFormSelect.hisAllowance"
clearable
placeholder="允许值"
></el-input>
</el-form-item>
</el-collapse-item>
</template>
</widget-config>
</div>
<div class="footer">
<el-button @click="widgetVisible = false" size="large"
>取 消</el-button
>
<el-button
size="large"
type="primary"
:loading="loading"
@click="handleConfirm(widgetFormSelect)"
>确 定</el-button
>
</div>
</div>
</el-drawer>
</div>
</template>
<script>
import WidgetConfig from "packages/WidgetConfig.vue"
import { getFieldListByCode, addField, delField } from "@/api/field.js"
// 新增所需字段
const fields = [
"id",
"fieldType",
"label",
"prop",
"fieldLength",
"hisElementIdent",
"hisDataType",
"hisRepresentFormat",
"hisAllowance",
]
// 字段关系映射
const fieldMap = {
label: "fieldName",
prop: "fieldCode",
}
export default {
name: "FieldList",
props: {
tableCode: {},
tableId: {},
dbId: {},
},
components: {
WidgetConfig,
},
data() {
return {
propNotEdit: false,
loading: false,
widgetVisible: false,
widgetFormSelect: {},
listLoading: false,
// 查询列表
searchList: [
{
label: "字段名",
type: "input",
prop: "fieldName",
placeholder: "请输入字段名",
},
{
label: "属性值",
type: "input",
prop: "fieldCode",
placeholder: "请输入属性值",
},
{
type: "button",
value: "查询",
icon: "el-icon-search",
},
{
type: "button",
color: "primary",
icon: "el-icon-plus",
hasForm: true,
value: "添加",
func: this.handleAdd,
},
],
columns: [
{
label: "字段名",
minWidth: 120,
value: "fieldName",
},
{
label: "属性值",
minWidth: 120,
value: "fieldCode",
},
{
label: "数据库存字段类型",
minWidth: 120,
value: "fieldType",
formatter: (row) => {
return this.$handle.formatDicList(
this.dictMap["data_type"],
row.fieldType
)
},
},
{
label: "数据宽度",
minWidth: 100,
value: "fieldLength",
},
{
label: "操作",
width: 200,
fixed: "right",
operType: "button",
operations: [
{
func: this.handleAdd,
formatter({ isDefault }) {
return {
disabled: isDefault === 1,
label: "编辑",
type: "primary",
}
},
},
{
func: this.handleDel,
formatter({ isDefault }) {
return {
disabled: isDefault === 1,
label: "删除",
type: "warning",
}
},
},
],
},
],
tableData: [],
cacheForm: {},
}
},
watch: {
tableCode(val) {
if (val) {
this.handleFormSearch()
} else {
this.tableData = []
}
},
},
methods: {
handleAdd({ id, jsonStr, tableCode }) {
if (!this.tableCode) {
this.$message.error("未选择数据表")
return
}
const fields = jsonStr ? JSON.parse(jsonStr) : {}
const form = id ? { id, ...fields } : { tableCode, importantField: true }
this.propNotEdit = Boolean(id)
this.widgetFormSelect = Object.assign(
{ type: "input", display: true },
form
)
console.log(this.widgetFormSelect)
this.widgetVisible = true
},
handleConfirm(form) {
if (!/^[a-zA-Z]+([a-zA-Z0-9]*([_-]?[a-zA-Z0-9]+)*)*$/.test(form.prop)) {
this.$message.error(
"只能包含大小字母、数字、下划线。必须以字母开始,下划线不可连续重复,下划线后不可紧跟着数字,不能以数字、下划线结束"
)
return
}
const data = {
jsonStr: JSON.stringify(form),
dbId: this.dbId,
tableId: this.tableId,
}
Object.keys(form).forEach((key) => {
if (fields.includes(key)) {
if (fieldMap[key]) {
data[fieldMap[key]] = form[key]
} else {
data[key] = form[key]
}
}
})
const msg = data.id ? "编辑成功" : "新增成功"
this.loading = true
addField(data)
.then((res) => {
if (res.code === 1) {
this.$message.success(msg)
this.handleSearch()
// this.widgetVisible = false
this.loading = false
}
})
.catch((e) => {
this.loading = false
})
},
handleDel(row) {
this.$confirm(`是否删除【${row.fieldName}】?`, "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
delField(row.id).then((res) => {
if (res.code === 1) {
this.$message({
type: "success",
message: "删除成功!",
})
this.handleSearch()
}
})
})
.catch(() => {})
},
// 查询
handleFormSearch(form) {
this.pageIndex = 1
this.handleSearch(form)
},
handleSearch(form) {
if (!this.tableCode) return
this.cacheForm = Object.assign(this.cacheForm, form)
this.listLoading = true
const params = Object.assign(
{
tableCode: this.tableCode,
},
this.cacheForm
)
for (let key in params) {
if (params[key] === "") {
delete params[key]
}
}
getFieldListByCode(params).then((res) => {
this.listLoading = false
this.tableData = res.data || []
})
},
},
}
</script>
<style lang="scss" scoped>
.drawer__container {
padding: 0 20px;
.drawer__content {
height: calc(100vh - #{"160px"});
overflow-y: auto;
::v-deep .el-input-number {
width: 100%;
}
&::-webkit-scrollbar {
width: 0px;
height: 0px;
}
&::-webkit-scrollbar-thumb {
background-color: #fff;
}
}
.footer {
margin-top: 20px;
display: flex;
button {
flex: 1;
}
}
}
</style>
<template> <template>
<div class="container"> <el-row class="page-container dict">
<direct-search <el-tabs v-model="activeName" @tab-click="handleTabClick">
ref="form" <el-tab-pane
:label-position="'right'" :label="item.name"
:forms="searchList" :name="'index' + index"
:style="{ textAlign: 'left' }" v-for="(item, index) in dbList"
@handleSearch="handleFormSearch" :key="item.id"
/> >{{
<el-table-self }}</el-tab-pane>
ref="table" </el-tabs>
:table-data="tableData" <el-container class="page-main" :gutter="20">
:columns="columns" <el-aside width="220px" class="left-content">
:list-loading="listLoading" <el-col :span="24" class="left-title">
:current-page="pageIndex" <span>数据库表</span>
:total-count="total" <span class="left-add" @click="handleAdd()" title="新增"
:page-sizes="pageSizes" ><i class="el-icon-circle-plus-outline"></i
:page-size="pageSize" ></span>
@pageSizeChange="handleSizeChange" </el-col>
@currentPageChange="handleCurrentChange" <el-col :span="24" class="left-search">
/> <el-input
v-model.trim="searchVal"
<el-drawer
:title="widgetFormSelect.id ? '编辑' : '新增'"
:visible.sync="widgetVisible"
:size="500"
:wrapperClosable="false"
>
<div class="drawer__container">
<div class="drawer__content">
<widget-config
:data="widgetFormSelect"
:propNotEdit="propNotEdit"
layout-hidden
>
<template v-slot:dbtable>
<el-collapse-item
name="4"
title="数据库属性与命名标准"
v-if="!['group', 'title'].includes(widgetFormSelect.type)"
>
<el-form-item label="数据库表">
<el-select
v-model="widgetFormSelect.tableCode"
placeholder="数据库表"
style="width: 100%"
clearable clearable
:placeholder="placeholder"
> >
<el-option </el-input>
:label="item.label" </el-col>
:value="item.value" <el-col
v-for="item in dictMap['table']" class="dict-list"
:key="item.value" ref="dict"
></el-option> style="height: calc(100vh - 280px)"
</el-select>
</el-form-item>
<el-form-item label="数据类型">
<el-select
v-model="widgetFormSelect.fieldType"
placeholder="字段存储类型"
style="width: 100%"
clearable
> >
<el-option <el-col
:label="item.label" v-for="(item, index) in tableData"
:value="item.value" :key="item.id"
v-for="item in dictMap['data_type']" class="dict-item"
:key="item.value"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="数据宽度">
<el-input
style="width: 100%"
v-model="widgetFormSelect.fieldLength"
:controls="false"
clearable
placeholder="数据宽度"
></el-input>
</el-form-item>
<el-form-item label="数据元标识">
<el-input
v-model="widgetFormSelect.hisElementIdent"
clearable
placeholder="数据元标识"
></el-input>
</el-form-item>
<el-form-item label="数据元值类型">
<el-input
v-model="widgetFormSelect.hisDataType"
clearable
placeholder="数据元值类型"
></el-input>
</el-form-item>
<el-form-item label="表达格式">
<el-input
v-model="widgetFormSelect.hisRepresentFormat"
clearable
placeholder="表达格式"
></el-input>
</el-form-item>
<el-form-item label="允许值">
<el-input
v-model="widgetFormSelect.hisAllowance"
clearable
placeholder="允许值"
></el-input>
</el-form-item>
</el-collapse-item>
</template>
</widget-config>
</div>
<div class="footer">
<el-button @click="widgetVisible = false" size="large"
>取 消</el-button
> >
<el-button <span
size="large" @click="handClick(index, item)"
type="primary" :class="{ active: index == isActive }"
:loading="loading" style="cursor: pointer; word-break: break-word"
@click="handleConfirm(widgetFormSelect)"
>确 定</el-button
> >
</div> {{ item.name }} <br />{{ item.code }}
</div> </span>
</el-drawer> <span class="item-del">
</div> <!-- <i class="el-icon-edit-outline" @click="handleAdd(item)"></i> -->
</span>
</el-col>
</el-col>
</el-aside>
<el-main>
<FieldList
:table-code="tableCode"
:tableId="tableId"
:dbId="dbId"
></FieldList>
</el-main>
</el-container>
<dialog-form
ref="dialog"
:width="'450px'"
:title="formEdit.id ? '编辑' : '新增'"
:form-data="formData"
:form-edit="formEdit"
@handleConfirm="handleConfirm"
/>
</el-row>
</template> </template>
<script> <script>
import WidgetConfig from "packages/WidgetConfig.vue" import { getDbList, getTableList, addDbTable } from "@/api/database"
import paginationMixin from "@/components/TabComponents/mixin" import FieldList from "./FieldList.vue"
import { getFieldPage, addField, delField } from "@/api/field.js"
// 新增所需字段
const fields = [
"id",
"fieldType",
"label",
"prop",
"tableCode",
"tableName",
"fieldLength",
"hisElementIdent",
"hisDataType",
"hisRepresentFormat",
"hisAllowance",
]
// 字段关系映射
const fieldMap = {
label: "fieldName",
prop: "fieldCode",
}
export default { export default {
name: "FieldConfig", name: "FieldConfig",
components: { components: { FieldList },
WidgetConfig,
},
mixins: [paginationMixin],
data() { data() {
return { return {
propNotEdit: false, dbId: null,
loading: false, activeName: "index0",
widgetVisible: false, dbList: [],
widgetFormSelect: {}, tableList: [],
tableCode: null,
isActive: -1,
tableId: "",
searchVal: "",
placeholder: "请输入关键字",
listLoading: false, listLoading: false,
// 查询列表 formEdit: {},
searchList: [ formData: [
{ {
label: "字段名",
type: "input", type: "input",
prop: "fieldName", label: "表名称",
placeholder: "请输入字段名", prop: "name",
}, rules: [{ required: true, message: "表名称必填" }],
{
label: "数据库存储表",
type: "select",
prop: "tableCode",
optsFormatter: () => {
return this.dictMap && this.dictMap["table"]
},
}, },
{ {
type: "button", type: "input",
value: "查询", label: "表code",
icon: "el-icon-search", rules: [{ required: true, message: "表code必填" }],
prop: "code",
slot: "prepend",
unit: "",
}, },
{ {
type: "button", type: "input",
color: "primary", label: "说明",
icon: "el-icon-plus", prop: "note",
hasForm: true,
value: "添加",
func: this.handleAdd,
}, },
], ],
columns: [
{
label: "字段名",
minWidth: 120,
value: "fieldName",
},
{
label: "属性值",
minWidth: 120,
value: "fieldCode",
},
{
label: "数据库存储表名称",
minWidth: 120,
value: "tableName",
},
{
label: "数据库存字段类型",
minWidth: 120,
value: "fieldType",
formatter: (row) => {
return this.$handle.formatDicList(
this.dictMap["data_type"],
row.fieldType
)
},
},
{
label: "数据宽度",
minWidth: 100,
value: "fieldLength",
},
{
label: "操作",
width: 200,
fixed: "right",
operType: "button",
operations: [
{
func: this.handleAdd,
formatter(row) {
return {
label: "编辑",
type: "primary",
} }
}, },
computed: {
tableData() {
const list = this.tableList.filter(
(_) => !this.searchVal || _.name.includes(this.searchVal)
)
this.isActive = this.getListIdx(list, this.tableId)
return list
}, },
{ filterTableData() {
func: this.handleDel, return this.tabData.filter(
formatter(row) { (_) => !this.cacheForm.name || _.name.includes(this.cacheForm.name)
return { )
label: "删除",
type: "warning",
}
},
}, },
],
}, },
], methods: {
tableData: [], handleAdd(row = {}) {
cacheForm: {}, if (!this.dbId) {
this.$message.error("未选择数据库")
return
} }
const db = this.dbList.find((_) => _.id === this.dbId)
this.formData[1].unit = db.prefix + "_"
this.formEdit = { ...row }
this.$refs.dialog.open()
}, },
methods: {
handleAdd({ id, jsonStr, tableCode }) {
const fields = jsonStr ? JSON.parse(jsonStr) : {}
const form = id ? { id, ...fields } : { tableCode, importantField: true }
this.propNotEdit = Boolean(id)
this.widgetFormSelect = Object.assign(
{ type: "input", display: true },
form
)
this.widgetVisible = true
},
handleConfirm(form) { handleConfirm(form) {
form.tableName = this.$handle.formatDicList( addDbTable({ ...form, dbId: this.dbId })
this.dictMap["table"],
form.tableCode
)
const data = { jsonStr: JSON.stringify(form) }
Object.keys(form).forEach((key) => {
if (fields.includes(key)) {
if (fieldMap[key]) {
data[fieldMap[key]] = form[key]
} else {
data[key] = form[key]
}
}
})
const msg = data.id ? "编辑成功" : "新增成功"
this.loading = true
addField(data)
.then((res) => { .then((res) => {
if (res.code === 1) { this.$message.success(res.msg)
this.$message.success(msg) this.getTableList()
this.handleSearch() this.$refs.dialog.close()
// this.widgetVisible = false
this.loading = false
}
}) })
.catch((e) => { .finally(() => {
this.loading = false this.$refs.dialog.loading = false
}) })
}, },
handleDel(row) { handleTabClick({ index }) {
this.$confirm(`是否删除【${row.fieldName}】?`, "提示", { this.dbId = this.dbList[index].id
confirmButtonText: "确定", this.tableCode = null
cancelButtonText: "取消", this.tableId = null
type: "warning", this.getTableList()
}) },
.then(() => { getTableList() {
delField(row.id).then((res) => { if (!this.dbId) return
if (res.code === 1) { getTableList(this.dbId).then((res) => {
this.$message({ this.tableList = res.data
type: "success",
message: "删除成功!",
})
this.handleSearch()
}
})
}) })
.catch(() => {})
}, },
// 查询 // 点击左侧列表
handleFormSearch(form) { handClick(index, { code, name, id }) {
this.pageIndex = 1 this.name = name
this.handleSearch(form) this.isActive = index
this.tableCode = code
this.tableId = id
}, },
handleSearch(form) {
this.cacheForm = Object.assign(this.cacheForm, form) getDbList() {
this.listLoading = true getDbList().then((res) => {
const params = Object.assign({}, this.cacheForm) this.dbList = res.data
for (let key in params) { if (this.dbList[0]) {
if (params[key] === "") { this.dbId = this.dbList[0].id
delete params[key] this.getTableList()
} }
})
},
getListIdx(list, id) {
let listIdx = -1
for (var i = 0; i < list.length; i++) {
if (list[i].id === id) {
listIdx = i
break
} }
params.current = this.pageIndex
params.size = this.pageSize
getFieldPage(params).then((res) => {
this.listLoading = false
if (res.code === 1) {
const d = res.data
this.tableData = d.records || []
this.total = Number(d.total)
} }
}) return listIdx
}, },
}, },
created() { mounted() {
this.handleFormSearch() this.getDbList()
}, },
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.drawer__container { .el-main {
padding: 0 20px; padding: 0 20px;
.drawer__content { }
height: calc(100vh - #{"160px"});
overflow-y: auto;
::v-deep .el-input-number { .page-main {
width: 100%; align-items: flex-start;
}
&::-webkit-scrollbar {
width: 0px;
height: 0px;
}
&::-webkit-scrollbar-thumb {
background-color: #fff;
}
}
.footer {
margin-top: 20px;
display: flex;
button {
flex: 1;
}
}
} }
</style> </style>
...@@ -18,10 +18,10 @@ ...@@ -18,10 +18,10 @@
@change="tableCodeChange" @change="tableCodeChange"
> >
<el-option <el-option
v-for="opt in dictMap['table']" v-for="opt in tableList"
:key="opt.value" :key="opt.code"
:label="opt.label" :label="opt.name"
:value="opt.value" :value="opt.code"
> >
</el-option> </el-option>
</el-select> </el-select>
...@@ -50,15 +50,19 @@ import { ...@@ -50,15 +50,19 @@ import {
getFormDetail, getFormDetail,
getHistoryInfo, getHistoryInfo,
} from "@/api/field" } from "@/api/field"
import { getTableList } from "@/api/database"
export default { export default {
name: "FormAdd", name: "FormAdd",
props: { props: {
formEdit: { formEdit: {
type: Object, type: Object,
}, },
dbId: {},
}, },
data() { data() {
return { return {
tableList: [],
disabled: false, disabled: false,
name: "", name: "",
options: {}, options: {},
...@@ -70,11 +74,17 @@ export default { ...@@ -70,11 +74,17 @@ export default {
}, },
methods: { methods: {
getTableList() {
if (!this.dbId) return
getTableList(this.dbId).then((res) => {
this.tableList = res.data
})
},
// 获取数据表字段 // 获取数据表字段
tableCodeChange(tableCode) { tableCodeChange(tableCode) {
if (!tableCode) return if (!tableCode) return
this.$refs.form.customFieldsLoading = this.disabled = true this.$refs.form.customFieldsLoading = this.disabled = true
const tableList = this.dictMap["table"] const tableList = this.tableList
this.tableName = this.tableName =
tableList.find((_) => _.value === tableCode) && tableList.find((_) => _.value === tableCode) &&
tableList.find((_) => _.value === tableCode).label tableList.find((_) => _.value === tableCode).label
...@@ -84,11 +94,14 @@ export default { ...@@ -84,11 +94,14 @@ export default {
const customOldFields = [] const customOldFields = []
const d = res.data const d = res.data
d.forEach((item) => { d.forEach((item) => {
if (!item.jsonStr) return
const field = JSON.parse(item.jsonStr) const field = JSON.parse(item.jsonStr)
if (field.id) delete field.id if (field.id) delete field.id
customOldFields.push({ customOldFields.push({
...field, ...field,
tableName: item.tableName, tableName: item.tableName,
tableCode: item.tableCode,
tableId: item.tableId,
}) })
}) })
...@@ -120,6 +133,7 @@ export default { ...@@ -120,6 +133,7 @@ export default {
id: this.formEdit.id, id: this.formEdit.id,
formJson: "", formJson: "",
name: this.name, name: this.name,
dbId: this.dbId,
} }
let fieldList = [] let fieldList = []
form["formJson"] = await this.$refs.form.getData("string") form["formJson"] = await this.$refs.form.getData("string")
...@@ -202,6 +216,7 @@ export default { ...@@ -202,6 +216,7 @@ export default {
}, },
created() { created() {
this.initForm() this.initForm()
this.getTableList()
}, },
} }
</script> </script>
......
<template> <template>
<div class="container"> <div class="container">
<form-add v-if="isAdd" @back="back" :form-edit="formEdit"></form-add> <form-add
v-if="isAdd"
@back="back"
:form-edit="formEdit"
:dbId="dbId"
></form-add>
<form-history <form-history
v-else-if="isHistory" v-else-if="isHistory"
@back="back" @back="back"
:source-id="sourceId" :source-id="sourceId"
></form-history> ></form-history>
<div v-else> <div v-else>
<el-tabs v-model="activeName" @tab-click="handleTabClick">
<el-tab-pane
:label="item.name"
:name="'index' + index"
v-for="(item, index) in dbList"
:key="item.id"
>{{
}}</el-tab-pane>
</el-tabs>
<direct-search <direct-search
ref="form" ref="form"
:forms="searchList" :forms="searchList"
...@@ -40,6 +54,7 @@ import paginationMixin from "@/components/TabComponents/mixin" ...@@ -40,6 +54,7 @@ import paginationMixin from "@/components/TabComponents/mixin"
import FormAdd from "./FormAdd" import FormAdd from "./FormAdd"
import FormHistory from "./FormHistory.vue" import FormHistory from "./FormHistory.vue"
import { getFormPage, delForm, copyForm } from "@/api/field.js" import { getFormPage, delForm, copyForm } from "@/api/field.js"
import { getDbList } from "@/api/database"
export default { export default {
components: { components: {
FormAdd, FormAdd,
...@@ -48,6 +63,9 @@ export default { ...@@ -48,6 +63,9 @@ export default {
name: "FormConfig", name: "FormConfig",
data() { data() {
return { return {
activeName: "index0",
dbList: [],
dbId: null,
listLoading: false, listLoading: false,
isAdd: false, isAdd: false,
isHistory: false, isHistory: false,
...@@ -174,6 +192,11 @@ export default { ...@@ -174,6 +192,11 @@ export default {
mixins: [paginationMixin], mixins: [paginationMixin],
methods: { methods: {
handleTabClick({ index }) {
this.dbId = this.dbList[index].id
this.handleFormSearch()
},
handleHistory({ id, version }) { handleHistory({ id, version }) {
this.sourceId = id || "" this.sourceId = id || ""
this.isHistory = true this.isHistory = true
...@@ -187,6 +210,7 @@ export default { ...@@ -187,6 +210,7 @@ export default {
const data = { const data = {
name, name,
id: this.formId, id: this.formId,
dbId: this.dbId,
} }
copyForm(data).then((res) => { copyForm(data).then((res) => {
this.$message.success("复制成功") this.$message.success("复制成功")
...@@ -233,7 +257,12 @@ export default { ...@@ -233,7 +257,12 @@ export default {
handleSearch(form) { handleSearch(form) {
this.cacheForm = Object.assign(this.cacheForm, form) this.cacheForm = Object.assign(this.cacheForm, form)
this.listLoading = true this.listLoading = true
const params = Object.assign({}, this.cacheForm) const params = Object.assign(
{
dbId: this.dbId,
},
this.cacheForm
)
for (let key in params) { for (let key in params) {
if (params[key] === "") { if (params[key] === "") {
delete params[key] delete params[key]
...@@ -250,9 +279,19 @@ export default { ...@@ -250,9 +279,19 @@ export default {
} }
}) })
}, },
getDbList() {
getDbList().then((res) => {
this.dbList = res.data
if (this.dbList[0]) {
this.dbId = this.dbList[0].id
}
this.handleFormSearch()
})
},
}, },
created() { created() {
this.handleFormSearch() this.getDbList()
}, },
} }
</script> </script>
<template>
<div class="container">
<direct-search
ref="form"
:label-position="'right'"
:forms="searchList"
:style="{ textAlign: 'left' }"
@handleSearch="handleFormSearch"
/>
<el-table-self
ref="table"
:table-data="tableData"
:columns="columns"
:list-loading="listLoading"
:current-page="pageIndex"
:total-count="total"
:page-sizes="pageSizes"
:page-size="pageSize"
:sortChange="sortChange"
@pageSizeChange="handleSizeChange"
@currentPageChange="handleCurrentChange"
/>
</div>
</template>
<script>
import { getLogPage } from "@/api/user";
import directSearch from "@/components/FormComponents/directSearch";
import elTableSelf from "@/components/TabComponents/index";
import paginationMixin from "@/components/TabComponents/mixin";
export default {
name: "Log",
mixins: [paginationMixin],
components: {
elTableSelf,
directSearch,
},
data() {
return {
formEdit: {},
title: "",
// 查询列表
searchList: [
{
label: "操作名称",
type: "input",
prop: "title",
placeholder: "请输入操作名称",
},
{
label: "请求方式",
type: "input",
prop: "method",
placeholder: "请输入请求方式",
},
{
label: "参数",
type: "input",
prop: "params",
placeholder: "请输入参数",
},
{
type: "button",
icon: "el-icon-search",
value: "查询",
},
],
tableData: [],
listLoading: false,
columns: [
{
label: "操作名称",
value: "title",
minWidth: 220,
},
{
label: "用户IP",
value: "remoteAddr",
minWidth: 180,
},
{
label: "操作人",
value: "createBy",
minWidth: 180,
},
{
label: "代理",
value: "userAgent",
minWidth: 220,
},
{
label: "请求路径",
value: "requestUri",
minWidth: 150,
},
{
label: "请求方式",
value: "method",
minWidth: 100,
},
{
label: "请求参数",
value: "params",
minWidth: 150,
},
{
label: "异常",
value: "exception",
minWidth: 150,
},
{
label: "操作时间",
value: "createTime",
minWidth: 150,
sortable: "custom",
},
],
cacheForm: {},
};
},
methods: {
sortChange({ prop, order }) {
const asc = order ? (order === "ascending" ? true : false) : "";
const column = order ? prop : "";
if (column) {
this.handleSearch({
"orders[0].asc": asc,
"orders[0].column": this.$handle.toUnderline(column),
});
} else {
delete this.cacheForm["orders[0].asc"];
delete this.cacheForm["orders[0].column"];
this.handleSearch();
}
},
// 查询
handleFormSearch(form) {
this.pageIndex = 1;
this.handleSearch(form);
},
// 数据page
handleSearch(form = {}) {
this.cacheForm = Object.assign(this.cacheForm, form);
this.listLoading = true;
const params = Object.assign({}, this.cacheForm);
for (let key in params) {
if (params[key] === "") {
delete params[key];
}
}
params.current = this.pageIndex;
params.size = this.pageSize;
getLogPage(params).then((res) => {
if (res.code === 1) {
const d = res.data;
let total = 0;
let result = [];
if (d && d.total > 0) {
result = d.records;
total = d.total;
}
this.tableData = result;
this.total = total;
this.listLoading = false;
}
});
},
},
mounted() {
this.handleFormSearch();
},
};
</script>
<style lang="scss"></style>
<template>
<div id="medicalunion-management">
<div class="top-btn">
<el-button type="primary" class="btn" @click="addMedical">添加</el-button>
</div>
<div class="bot-table">
<customs-table
ref="table"
:table-data="tableData"
:columns="columns"
:header-class="'newHeader'"
:list-loading="listLoading"
:current-page="pageIndex"
:total-count="total"
:page-sizes="pageSizes"
:page-size="pageSize"
@pageSizeChange="handleSizeChange"
@currentPageChange="handleCurrentChange"
/>
</div>
<el-dialog :visible.sync="addVisible" width="520px" :show-close="true">
<div class="title">添加医联体</div>
<el-form
:model="form"
:label-position="'right'"
label-width="110px"
label-suffix=":"
>
<el-form-item
v-for="(item, index) in formList"
:key="index"
:label="item.label"
>
<el-input
v-if="item.type == 'input'"
v-model="form[item.prop]"
autocomplete="off"
:placeholder="'请填写' + item.label"
></el-input>
<el-select
v-if="item.type == 'select'"
v-model="form[item.prop]"
:placeholder="'请选择' + item.label"
>
<el-option
v-for="e in item.selectGroup"
:key="e.value"
:label="e.label"
:value="e.value"
></el-option>
</el-select>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button type="primary" @click="addVisible = false">保存</el-button>
</span>
</el-dialog>
</div>
</template>
<script>
import CustomsTable from "@/components/CustomsTable"
import paginationMixin from "@/components/TabComponents/mixin"
export default {
components: {
CustomsTable,
},
mixins: [paginationMixin],
data() {
return {
addVisible: false,
listLoading: false,
columns: [
{
label: "医联体名称",
minWidth: 120,
value: "groupName",
},
{
label: "医联体编号",
minWidth: 120,
value: "name",
},
{
label: "",
minWidth: 120,
value: "sex",
},
{
label: "",
minWidth: 120,
value: "idCard",
},
{
label: "操作",
width: 220,
fixed: "right",
operType: "button",
operations: [
{
func: this.editMedical,
formatter(row) {
return {
label: "编辑",
type: "text",
}
},
},
{
func: this.rowOpration,
style: {
color: "#FA6400",
},
formatter(row) {
return {
label: "删除",
type: "text",
}
},
},
],
},
],
tableData: [
{
groupName: "第一个",
},
],
formList: [
{
type: "input",
label: "医联体名称",
prop: "medicalName",
},
{
type: "input",
label: "医联体编号",
prop: "medicalId",
},
{
type: "select",
label: "",
prop: "province",
selectGroup: [{ label: "北京市", value: "001" }],
},
{
type: "select",
label: "",
prop: "city",
selectGroup: [{ label: "北京市", value: "001" }],
},
],
form: {},
}
},
watch: {},
mounted() {},
methods: {
// 添加医联体
addMedical() {
this.addVisible = true
},
// 编辑医联体
editMedical(data) {
console.log(data)
this.form = {
medicalName: "黑乎乎",
medicalId: "123",
province: "001",
city: "001",
}
this.addVisible = true
},
},
}
</script>
<style lang="scss" scoped>
#medicalunion-management {
padding: 20px;
.top-btn {
.btn {
width: 80px;
height: 32px;
background: #4e68ff;
border-radius: 4px;
}
}
.bot-table {
margin-top: 20px;
}
.title {
text-align: center;
height: 26px;
font-size: 22px;
font-family: AlibabaPuHuiTiM;
color: rgba(0, 0, 0, 0.8);
line-height: 26px;
margin-bottom: 30px;
}
}
::v-deep .el-dialog__body {
padding: 0 40px;
border-top: none;
}
::v-deep .el-dialog__footer {
border-top: none;
text-align: center;
.el-button {
width: 100px;
height: 32px;
background: #4e68ff;
}
}
</style>
<template>
<div>学术动态</div>
</template>
<script>
export default {
data() {
return {}
},
methods: {},
mounted() {},
watch: {},
}
</script>
<style lang="scss" scoped></style>
<template>
<div id="medicalunion-management">
<div class="top-btn">
<el-select v-model="selectType">
<el-option
v-for="item in selectList"
:key="item.value"
:label="item.label"
:value="item.value"
>
</el-option>
</el-select>
<el-button type="primary" class="btn" @click="addMedical">添加</el-button>
</div>
<div class="bot-table">
<customs-table
ref="table"
:table-data="tableData"
:columns="columns"
:header-class="'newHeader'"
:list-loading="listLoading"
:current-page="pageIndex"
:total-count="total"
:page-sizes="pageSizes"
:page-size="pageSize"
@pageSizeChange="handleSizeChange"
@currentPageChange="handleCurrentChange"
/>
</div>
<el-dialog
:visible.sync="addVisible"
width="520px"
:show-close="true"
@closed="resetForm"
>
<div class="title">添加</div>
<el-form
ref="form"
:model="form"
:label-position="'right'"
label-width="110px"
label-suffix=":"
:rules="rules"
>
<el-form-item
v-for="(item, index) in formList"
:key="index"
:label="item.label"
:prop="item.prop"
>
<!-- 输入框 -->
<el-input
v-if="item.type == 'input'"
v-model="form[item.prop]"
autocomplete="off"
:placeholder="'请填写' + item.label"
></el-input>
<!-- 下拉选 -->
<el-select
v-else-if="item.type == 'select'"
v-model="form[item.prop]"
:placeholder="'请选择' + item.label"
>
<el-option
v-for="e in item.selectGroup"
:key="e.value"
:label="e.label"
:value="e.value"
></el-option>
</el-select>
<!-- 上传 -->
<el-upload-self
v-else-if="item.type === 'upload'"
v-model="form[item.prop]"
:btn-type="'text'"
v-bind="item"
></el-upload-self>
<!-- switch -->
<!-- switch切换 启用 -->
<el-switch
v-else-if="item.type === 'switch'"
v-model="form[item.prop]"
>
</el-switch>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm">保存</el-button>
</span>
</el-dialog>
</div>
</template>
<script>
import CustomsTable from "@/components/CustomsTable"
import paginationMixin from "@/components/TabComponents/mixin"
import ElUploadSelf from "@/components/Upload"
export default {
components: {
CustomsTable,
ElUploadSelf,
},
mixins: [paginationMixin],
data() {
return {
addVisible: false,
selectList: [
{
label: "筛查",
value: 0,
},
{
label: "生活",
value: 1,
},
{
label: "医学知识",
value: 2,
},
{
label: "其他",
value: 3,
},
],
selectType: 0,
listLoading: false,
columns: [
{
label: "标题",
minWidth: 120,
value: "title",
},
{
label: "图片",
minWidth: 120,
value: "iamge",
},
{
label: "文件",
minWidth: 120,
value: "file",
},
{
label: "上传时间",
minWidth: 120,
value: "uploadTime",
},
{
label: "最新修改时间",
minWidth: 120,
value: "editTime",
},
{
label: "上传人姓名",
minWidth: 120,
value: "uploadPerson",
},
{
label: "启用状态",
minWidth: 120,
type: "switch",
value: "isOpen",
func: this.openChage,
},
{
label: "操作",
width: 220,
fixed: "right",
operType: "button",
operations: [
{
func: this.editMedical,
formatter(row) {
return {
label: "查看",
type: "text",
}
},
},
{
func: this.editMedical,
formatter(row) {
return {
label: "编辑",
type: "text",
}
},
},
{
func: this.rowOpration,
style: {
color: "#FA6400",
},
formatter(row) {
return {
label: "删除",
type: "text",
}
},
},
],
},
],
tableData: [
{
title: "第一个",
isOpen: true,
},
],
formList: [
{
type: "select",
label: "类型",
prop: "type",
selectGroup: [
{
label: "筛查",
value: 0,
},
{
label: "生活",
value: 1,
},
{
label: "医学知识",
value: 2,
},
{
label: "其他",
value: 3,
},
],
},
{
type: "input",
label: "标题",
prop: "title",
},
{
type: "upload",
label: "图片",
prop: "img",
},
{
type: "upload",
label: "PDF",
prop: "aaa",
},
{
type: "switch",
label: "启用状态",
prop: "ssd",
},
],
rules: {
title: [{ required: true, message: "请输入标题", trigger: "blur" }],
},
form: {},
}
},
watch: {},
mounted() {},
methods: {
// 添加医联体
addMedical() {
this.addVisible = true
},
// 编辑医联体
editMedical(data) {
console.log(data)
this.form = {
medicalName: "黑乎乎",
medicalId: "123",
province: "001",
city: "001",
}
this.addVisible = true
},
// 启用状态
openChage(data, index) {
console.log(data, index)
},
resetForm() {
this.$refs["form"].resetFields()
},
submitForm() {
this.$refs["form"].validate((valid) => {
if (valid) {
alert("submit!")
this.addVisible = false
} else {
console.log("error submit!!")
return false
}
})
},
},
}
</script>
<style lang="scss" scoped>
#medicalunion-management {
padding: 20px 0;
.top-btn {
.btn {
width: 80px;
height: 32px;
background: #4e68ff;
border-radius: 4px;
margin-left: 20px;
}
}
.bot-table {
margin-top: 20px;
}
.title {
text-align: center;
height: 26px;
font-size: 22px;
font-family: AlibabaPuHuiTiM;
color: rgba(0, 0, 0, 0.8);
line-height: 26px;
margin-bottom: 30px;
}
}
::v-deep .el-dialog__body {
padding: 0 40px;
border-top: none;
}
::v-deep .el-dialog__footer {
border-top: none;
text-align: center;
.el-button {
width: 100px;
height: 32px;
background: #4e68ff;
}
}
::v-deep .el-upload {
.el-button {
transform: translateY(-4px);
}
}
</style>
<template>
<div id="medicalunion-management">
<div class="top-btn">
<el-button type="primary" class="btn" @click="addMedical">添加</el-button>
</div>
<div class="bot-table">
<customs-table
ref="table"
:table-data="tableData"
:columns="columns"
:header-class="'newHeader'"
:list-loading="listLoading"
:current-page="pageIndex"
:total-count="total"
:page-sizes="pageSizes"
:page-size="pageSize"
@pageSizeChange="handleSizeChange"
@currentPageChange="handleCurrentChange"
/>
</div>
<el-dialog :visible.sync="addVisible" width="520px" :show-close="true">
<div class="title">添加医联体</div>
<el-form
:model="form"
:label-position="'right'"
label-width="110px"
label-suffix=":"
>
<el-form-item
v-for="(item, index) in formList"
:key="index"
:label="item.label"
>
<el-input
v-if="item.type == 'input'"
v-model="form[item.prop]"
autocomplete="off"
:placeholder="'请填写' + item.label"
></el-input>
<el-select
v-if="item.type == 'select'"
v-model="form[item.prop]"
:placeholder="'请选择' + item.label"
>
<el-option
v-for="e in item.selectGroup"
:key="e.value"
:label="e.label"
:value="e.value"
></el-option>
</el-select>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button type="primary" @click="addVisible = false">保存</el-button>
</span>
</el-dialog>
</div>
</template>
<script>
import CustomsTable from "@/components/CustomsTable"
import paginationMixin from "@/components/TabComponents/mixin"
export default {
components: {
CustomsTable,
},
mixins: [paginationMixin],
data() {
return {
addVisible: false,
listLoading: false,
columns: [
{
label: "标题",
minWidth: 120,
value: "title",
},
{
label: "文件",
minWidth: 120,
value: "file",
},
{
label: "上传时间",
minWidth: 120,
value: "uploadTime",
},
{
label: "最新修改时间",
minWidth: 120,
value: "editTime",
},
{
label: "上传人姓名",
minWidth: 120,
value: "uploadPerson",
},
{
label: "启用状态",
minWidth: 120,
type: "switch",
value: "isOpen",
func: this.openChage,
},
{
label: "操作",
width: 220,
fixed: "right",
operType: "button",
operations: [
{
func: this.editMedical,
formatter(row) {
return {
label: "查看",
type: "text",
}
},
},
{
func: this.editMedical,
formatter(row) {
return {
label: "编辑",
type: "text",
}
},
},
{
func: this.rowOpration,
style: {
color: "#FA6400",
},
formatter(row) {
return {
label: "删除",
type: "text",
}
},
},
],
},
],
tableData: [
{
title: "第一个",
isOpen: true,
},
],
formList: [
{
type: "input",
label: "医联体名称",
prop: "medicalName",
},
{
type: "input",
label: "医联体编号",
prop: "medicalId",
},
{
type: "select",
label: "",
prop: "province",
selectGroup: [{ label: "北京市", value: "001" }],
},
{
type: "select",
label: "",
prop: "city",
selectGroup: [{ label: "北京市", value: "001" }],
},
],
form: {},
}
},
watch: {},
mounted() {},
methods: {
// 添加医联体
addMedical() {
this.addVisible = true
},
// 编辑医联体
editMedical(data) {
console.log(data)
this.form = {
medicalName: "黑乎乎",
medicalId: "123",
province: "001",
city: "001",
}
this.addVisible = true
},
// 启用状态
openChage(data, index) {
console.log(data, index)
},
},
}
</script>
<style lang="scss" scoped>
#medicalunion-management {
padding: 20px 0;
.top-btn {
.btn {
width: 80px;
height: 32px;
background: #4e68ff;
border-radius: 4px;
}
}
.bot-table {
margin-top: 20px;
}
.title {
text-align: center;
height: 26px;
font-size: 22px;
font-family: AlibabaPuHuiTiM;
color: rgba(0, 0, 0, 0.8);
line-height: 26px;
margin-bottom: 30px;
}
}
::v-deep .el-dialog__body {
padding: 0 40px;
border-top: none;
}
::v-deep .el-dialog__footer {
border-top: none;
text-align: center;
.el-button {
width: 100px;
height: 32px;
background: #4e68ff;
}
}
</style>
<template>
<div id="medicalunion-management">
<div class="top-btn">
<el-button type="primary" class="btn" @click="addMedical">添加</el-button>
</div>
<div class="bot-table">
<customs-table
ref="table"
:table-data="tableData"
:columns="columns"
:header-class="'newHeader'"
:list-loading="listLoading"
:current-page="pageIndex"
:total-count="total"
:page-sizes="pageSizes"
:page-size="pageSize"
@pageSizeChange="handleSizeChange"
@currentPageChange="handleCurrentChange"
/>
</div>
<el-dialog :visible.sync="addVisible" width="520px" :show-close="true">
<div class="title">添加医联体</div>
<el-form
:model="form"
:label-position="'right'"
label-width="110px"
label-suffix=":"
>
<el-form-item
v-for="(item, index) in formList"
:key="index"
:label="item.label"
>
<el-input
v-if="item.type == 'input'"
v-model="form[item.prop]"
autocomplete="off"
:placeholder="'请填写' + item.label"
></el-input>
<el-select
v-if="item.type == 'select'"
v-model="form[item.prop]"
:placeholder="'请选择' + item.label"
>
<el-option
v-for="e in item.selectGroup"
:key="e.value"
:label="e.label"
:value="e.value"
></el-option>
</el-select>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button type="primary" @click="addVisible = false">保存</el-button>
</span>
</el-dialog>
</div>
</template>
<script>
import CustomsTable from "@/components/CustomsTable"
import paginationMixin from "@/components/TabComponents/mixin"
export default {
components: {
CustomsTable,
},
mixins: [paginationMixin],
data() {
return {
addVisible: false,
listLoading: false,
columns: [
{
label: "标题",
minWidth: 120,
value: "title",
},
{
label: "文件",
minWidth: 120,
value: "file",
},
{
label: "上传时间",
minWidth: 120,
value: "uploadTime",
},
{
label: "最新修改时间",
minWidth: 120,
value: "editTime",
},
{
label: "上传人姓名",
minWidth: 120,
value: "uploadPerson",
},
{
label: "启用状态",
minWidth: 120,
type: "switch",
value: "isOpen",
func: this.openChage,
},
{
label: "操作",
width: 220,
fixed: "right",
operType: "button",
operations: [
{
func: this.editMedical,
formatter(row) {
return {
label: "查看",
type: "text",
}
},
},
{
func: this.editMedical,
formatter(row) {
return {
label: "编辑",
type: "text",
}
},
},
{
func: this.rowOpration,
style: {
color: "#FA6400",
},
formatter(row) {
return {
label: "删除",
type: "text",
}
},
},
],
},
],
tableData: [
{
title: "第一个",
isOpen: true,
},
],
formList: [
{
type: "input",
label: "医联体名称",
prop: "medicalName",
},
{
type: "input",
label: "医联体编号",
prop: "medicalId",
},
{
type: "select",
label: "",
prop: "province",
selectGroup: [{ label: "北京市", value: "001" }],
},
{
type: "select",
label: "",
prop: "city",
selectGroup: [{ label: "北京市", value: "001" }],
},
],
form: {},
}
},
watch: {},
mounted() {},
methods: {
// 添加医联体
addMedical() {
this.addVisible = true
},
// 编辑医联体
editMedical(data) {
console.log(data)
this.form = {
medicalName: "黑乎乎",
medicalId: "123",
province: "001",
city: "001",
}
this.addVisible = true
},
// 启用状态
openChage(data, index) {
console.log(data, index)
},
},
}
</script>
<style lang="scss" scoped>
#medicalunion-management {
padding: 20px 0;
.top-btn {
.btn {
width: 80px;
height: 32px;
background: #4e68ff;
border-radius: 4px;
}
}
.bot-table {
margin-top: 20px;
}
.title {
text-align: center;
height: 26px;
font-size: 22px;
font-family: AlibabaPuHuiTiM;
color: rgba(0, 0, 0, 0.8);
line-height: 26px;
margin-bottom: 30px;
}
}
::v-deep .el-dialog__body {
padding: 0 40px;
border-top: none;
}
::v-deep .el-dialog__footer {
border-top: none;
text-align: center;
.el-button {
width: 100px;
height: 32px;
background: #4e68ff;
}
}
</style>
<template>
<div id="medicalunion-management">
<div class="top-btn">
<el-select v-model="selectType">
<el-option
v-for="item in selectList"
:key="item.value"
:label="item.label"
:value="item.value"
>
</el-option>
</el-select>
<el-button type="primary" class="btn" @click="addMedical">添加</el-button>
</div>
<div class="bot-table">
<customs-table
ref="table"
:table-data="tableData"
:columns="columns"
:header-class="'newHeader'"
:list-loading="listLoading"
:current-page="pageIndex"
:total-count="total"
:page-sizes="pageSizes"
:page-size="pageSize"
@pageSizeChange="handleSizeChange"
@currentPageChange="handleCurrentChange"
/>
</div>
<el-dialog
:visible.sync="addVisible"
width="520px"
:show-close="true"
@closed="resetForm"
>
<div class="title">添加</div>
<el-form
ref="form"
:model="form"
:label-position="'right'"
label-width="110px"
label-suffix=":"
:rules="rules"
>
<el-form-item
v-for="(item, index) in formList"
:key="index"
:label="item.label"
:prop="item.prop"
>
<!-- 输入框 -->
<el-input
v-if="item.type == 'input'"
v-model="form[item.prop]"
autocomplete="off"
:placeholder="'请填写' + item.label"
></el-input>
<!-- 下拉选 -->
<el-select
v-else-if="item.type == 'select'"
v-model="form[item.prop]"
:placeholder="'请选择' + item.label"
>
<el-option
v-for="e in item.selectGroup"
:key="e.value"
:label="e.label"
:value="e.value"
></el-option>
</el-select>
<!-- 上传 -->
<el-upload-self
v-else-if="item.type === 'upload'"
v-model="form[item.prop]"
:btn-type="'text'"
v-bind="item"
></el-upload-self>
<!-- switch -->
<!-- switch切换 启用 -->
<el-switch
v-else-if="item.type === 'switch'"
v-model="form[item.prop]"
>
</el-switch>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm">保存</el-button>
</span>
</el-dialog>
</div>
</template>
<script>
import CustomsTable from "@/components/CustomsTable"
import paginationMixin from "@/components/TabComponents/mixin"
import ElUploadSelf from "@/components/Upload"
export default {
components: {
CustomsTable,
ElUploadSelf,
},
mixins: [paginationMixin],
data() {
return {
addVisible: false,
selectList: [
{
label: "筛查技术方案",
value: 0,
},
{
label: "筛查指南",
value: 1,
},
{
label: "学术成果",
value: 2,
},
{
label: "项目进展与成果",
value: 3,
},
],
selectType: 0,
listLoading: false,
columns: [
{
label: "标题",
minWidth: 120,
value: "title",
},
{
label: "文件",
minWidth: 120,
value: "file",
},
{
label: "上传时间",
minWidth: 120,
value: "uploadTime",
},
{
label: "最新修改时间",
minWidth: 120,
value: "editTime",
},
{
label: "上传人姓名",
minWidth: 120,
value: "uploadPerson",
},
{
label: "启用状态",
minWidth: 120,
type: "switch",
value: "isOpen",
func: this.openChage,
},
{
label: "操作",
width: 220,
fixed: "right",
operType: "button",
operations: [
{
func: this.editMedical,
formatter(row) {
return {
label: "查看",
type: "text",
}
},
},
{
func: this.editMedical,
formatter(row) {
return {
label: "编辑",
type: "text",
}
},
},
{
func: this.rowOpration,
style: {
color: "#FA6400",
},
formatter(row) {
return {
label: "删除",
type: "text",
}
},
},
],
},
],
tableData: [
{
title: "第一个",
isOpen: true,
},
],
formList: [
{
type: "select",
label: "类型",
prop: "type",
selectGroup: [
{
label: "筛查",
value: 0,
},
{
label: "生活",
value: 1,
},
{
label: "医学知识",
value: 2,
},
{
label: "其他",
value: 3,
},
],
},
{
type: "input",
label: "标题",
prop: "title",
},
{
type: "upload",
label: "图片",
prop: "img",
},
{
type: "upload",
label: "PDF",
prop: "aaa",
},
{
type: "switch",
label: "启用状态",
prop: "ssd",
},
],
rules: {
title: [{ required: true, message: "请输入标题", trigger: "blur" }],
},
form: {},
}
},
watch: {},
mounted() {},
methods: {
// 添加医联体
addMedical() {
this.addVisible = true
},
// 编辑医联体
editMedical(data) {
console.log(data)
this.form = {
medicalName: "黑乎乎",
medicalId: "123",
province: "001",
city: "001",
}
this.addVisible = true
},
// 启用状态
openChage(data, index) {
console.log(data, index)
},
resetForm() {
this.$refs["form"].resetFields()
},
submitForm() {
this.$refs["form"].validate((valid) => {
if (valid) {
alert("submit!")
this.addVisible = false
} else {
console.log("error submit!!")
return false
}
})
},
},
}
</script>
<style lang="scss" scoped>
#medicalunion-management {
padding: 20px 0;
.top-btn {
.btn {
width: 80px;
height: 32px;
background: #4e68ff;
border-radius: 4px;
margin-left: 20px;
}
}
.bot-table {
margin-top: 20px;
}
.title {
text-align: center;
height: 26px;
font-size: 22px;
font-family: AlibabaPuHuiTiM;
color: rgba(0, 0, 0, 0.8);
line-height: 26px;
margin-bottom: 30px;
}
}
::v-deep .el-dialog__body {
padding: 0 40px;
border-top: none;
}
::v-deep .el-dialog__footer {
border-top: none;
text-align: center;
.el-button {
width: 100px;
height: 32px;
background: #4e68ff;
}
}
::v-deep .el-upload {
.el-button {
transform: translateY(-4px);
}
}
</style>
<template>
<div id="operation-management">
<el-tabs v-model="curOperation" @tab-click="handleClick">
<el-tab-pane
v-for="(item, index) in operationList"
:key="index"
:label="item.name"
:name="item.name"
>
<component :is="item.component"></component>
</el-tab-pane>
</el-tabs>
</div>
</template>
<script>
import NewsMeeting from "@/views/systems/operation-management/components/NewsMeeting.vue"
import NoticeAnnouncement from "@/views/systems/operation-management/components/NoticeAnnouncement.vue"
import AcademicTrend from "@/views/systems/operation-management/components/AcademicTrend.vue"
import HealthPopularization from "@/views/systems/operation-management/components/HealthPopularization.vue"
import scientificResearch from "@/views/systems/operation-management/components/scientificResearch.vue"
export default {
components: {
NewsMeeting,
NoticeAnnouncement,
AcademicTrend,
HealthPopularization,
scientificResearch,
},
data() {
return {
curOperation: "新闻会议",
operationList: [
{
name: "新闻会议",
component: "NewsMeeting",
},
{
name: "通知公告",
component: "NoticeAnnouncement",
},
{
name: "学术动态",
component: "AcademicTrend",
},
{
name: "健康科普",
component: "HealthPopularization",
},
{
name: "科学研究",
component: "scientificResearch",
},
],
}
},
watch: {},
mounted() {},
methods: {
handleClick(tab, event) {
// console.log(tab, event)
},
},
}
</script>
<style lang="scss" scoped>
#operation-management {
padding: 20px;
::v-deep .el-tabs__nav-wrap::after {
background-color: #fff;
}
}
</style>
...@@ -131,7 +131,7 @@ export default { ...@@ -131,7 +131,7 @@ export default {
width: 80, width: 80,
formatter: (row) => { formatter: (row) => {
return this.$handle.formatDicList( return this.$handle.formatDicList(
this.dictMap["gender"], this.dictMap["d-sex"],
String(row.sex) String(row.sex)
) )
}, },
...@@ -249,7 +249,7 @@ export default { ...@@ -249,7 +249,7 @@ export default {
spanCount: 12, spanCount: 12,
prop: "sex", prop: "sex",
optsFormatter: () => { optsFormatter: () => {
return this.dictMap && this.dictMap["gender"] return this.dictMap && this.dictMap["d-sex"]
}, },
}, },
{ {
...@@ -273,14 +273,12 @@ export default { ...@@ -273,14 +273,12 @@ export default {
prop: "orgId", prop: "orgId",
opts: orgList, opts: orgList,
func: this.orgChange, func: this.orgChange,
rules: [{ required: true, message: "请选择机构" }],
}, },
{ {
type: "select", type: "select",
label: "科室", label: "科室",
spanCount: 12, spanCount: 12,
prop: "deptId", prop: "deptId",
rules: [{ required: true, message: "请选择科室" }],
opts: [], opts: [],
}, },
{ {
...@@ -478,7 +476,7 @@ export default { ...@@ -478,7 +476,7 @@ export default {
? { ? {
id, id,
name, name,
sex: String(sex), sex: sex ? String(sex) : "",
idCard, idCard,
phone, phone,
email, email,
......
...@@ -88,7 +88,8 @@ module.exports = { ...@@ -88,7 +88,8 @@ module.exports = {
}, },
proxy: { proxy: {
"/api": { "/api": {
target: "http://192.168.31.140:11021/", // target: "http://192.168.31.140:11021/",
target: "https://ds.cixincloud.com/geca-api/",
changeOrigin: true, changeOrigin: true,
pathRewrite: { pathRewrite: {
"^/api": "", "^/api": "",
......
...@@ -6254,6 +6254,11 @@ js-cookie@^2.2.1: ...@@ -6254,6 +6254,11 @@ js-cookie@^2.2.1:
resolved "https://registry.yarnpkg.com/js-cookie/-/js-cookie-2.2.1.tgz#69e106dc5d5806894562902aa5baec3744e9b2b8" resolved "https://registry.yarnpkg.com/js-cookie/-/js-cookie-2.2.1.tgz#69e106dc5d5806894562902aa5baec3744e9b2b8"
integrity sha512-HvdH2LzI/EAZcUwA8+0nKNtWHqS+ZmijLA30RwZA0bo7ToCckjK5MkGhjED9KoRcXO6BaGI3I9UIzSA1FKFPOQ== integrity sha512-HvdH2LzI/EAZcUwA8+0nKNtWHqS+ZmijLA30RwZA0bo7ToCckjK5MkGhjED9KoRcXO6BaGI3I9UIzSA1FKFPOQ==
js-md5@^0.7.3:
version "0.7.3"
resolved "https://registry.npmmirror.com/js-md5/-/js-md5-0.7.3.tgz#b4f2fbb0b327455f598d6727e38ec272cd09c3f2"
integrity sha512-ZC41vPSTLKGwIRjqDh8DfXoCrdQIyBgspJVPXHBGu4nZlAEvG3nf+jO9avM9RmLiGakg7vz974ms99nEV0tmTQ==
js-message@1.0.7: js-message@1.0.7:
version "1.0.7" version "1.0.7"
resolved "https://registry.yarnpkg.com/js-message/-/js-message-1.0.7.tgz#fbddd053c7a47021871bb8b2c95397cc17c20e47" resolved "https://registry.yarnpkg.com/js-message/-/js-message-1.0.7.tgz#fbddd053c7a47021871bb8b2c95397cc17c20e47"
......