Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
B
BI管理后台
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
刘春
BI管理后台
Commits
c4a92d7d
Commit
c4a92d7d
authored
Jul 03, 2025
by
刘春
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://60.216.109.204:8082/liuchun/bi-web
parents
7c8db0ac
8784ce1d
Changes
12
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
533 additions
and
51 deletions
+533
-51
dictionary.ts
src/api/common/dictionary.ts
+8
-0
index.ts
src/api/system/file/index.ts
+6
-5
index.vue
src/components/CommonUpload/index.vue
+1
-1
pro-form-content.vue
src/components/ProForm/components/pro-form-content.vue
+1
-1
pro-form-item.vue
src/components/ProForm/components/pro-form-item.vue
+1
-0
components.d.ts
src/types/components.d.ts
+1
-0
AddDoctor.vue
src/views/doctor/components/AddDoctor.vue
+27
-4
AddReport.vue
src/views/report/components/AddReport.vue
+78
-14
AddReportDetail.vue
src/views/report/components/AddReportDetail.vue
+145
-0
AddSys.vue
src/views/report/components/AddSys.vue
+3
-1
index.vue
src/views/report/index.vue
+220
-25
index.vue
src/views/theme/index.vue
+42
-0
No files found.
src/api/common/dictionary.ts
View file @
c4a92d7d
...
...
@@ -22,3 +22,11 @@ export const getDictDetailDataRequest = (data: DictionaryDetailParams) =>
export
const
getDictsDataByCodeArrary
=
(
data
:
string
[])
=>
request
<
DictCodeDataItem
[]
>
(
'
/portal/public/api/web/getDict
'
,
'
post
'
,
data
);
/**
* 根据类型获取字典项
* @param data
* @returns
*/
export
const
getClassify
=
(
data
)
=>
request
<
string
>
(
'
/bi-manager/dict/getClassify
'
,
'
post
'
,
data
);
\ No newline at end of file
src/api/system/file/index.ts
View file @
c4a92d7d
...
...
@@ -17,14 +17,15 @@ export async function uploadFile(
const
formData
=
new
FormData
();
formData
.
append
(
'
file
'
,
file
,
fileName
);
const
res
=
await
request
<
ApiResult
<
FileRecord
>>
(
'
/
f
ile/upload
'
,
'
/
bi-manager/uploadF
ile/upload
'
,
'
POST
'
,
config
formData
);
if
(
res
.
data
.
code
===
0
&&
res
.
data
.
data
)
{
return
res
.
data
.
data
;
console
.
log
(
"
🚀 ~ res:
"
,
res
)
if
(
res
.
code
===
200
&&
res
.
data
)
{
return
res
.
data
;
}
return
Promise
.
reject
(
new
Error
(
res
.
data
.
message
));
return
Promise
.
reject
(
new
Error
(
res
.
message
));
}
/**
...
...
src/components/CommonUpload/index.vue
View file @
c4a92d7d
...
...
@@ -167,7 +167,7 @@
.
then
((
res
)
=>
{
item
.
progress
=
100
;
item
.
status
=
'
done
'
;
item
.
url
=
res
.
u
rl
;
item
.
url
=
res
.
imgU
rl
;
})
.
catch
((
e
)
=>
{
item
.
status
=
'
exception
'
;
...
...
src/components/ProForm/components/pro-form-content.vue
View file @
c4a92d7d
...
...
@@ -26,7 +26,7 @@
<ElRow
v-else
v-bind=
"rowProps || {}"
>
<
template
v-for=
"item in items"
>
<ElCol
v-if=
"isShowItem(item, model, formItems || items, searchExpand)"
v-if=
"isShowItem(item, model, formItems || items, searchExpand)
&& !item.isHide
"
:key=
"item.key ?? item.prop"
v-bind=
"
{
...(grid === true ? { span: 12 } : grid),
...
...
src/components/ProForm/components/pro-form-item.vue
View file @
c4a92d7d
...
...
@@ -1135,6 +1135,7 @@
<ImageUpload
v-else-if=
"item.type === 'imageUpload'"
v-bind=
"item.props || {}"
:limit=
"item?.limit || 9"
ref=
"imageUploadRef"
:modelValue=
"model[item.prop]"
@
update:modelValue=
"updateValue"
...
...
src/types/components.d.ts
View file @
c4a92d7d
...
...
@@ -11,6 +11,7 @@ declare module 'vue' {
AddExpert
:
typeof
import
(
'
./../components/TaskAllocation/AddExpert.vue
'
)[
'
default
'
]
AddMenu
:
typeof
import
(
'
./../views/web/components/AddMenu.vue
'
)[
'
default
'
]
AddReport
:
typeof
import
(
'
./../views/report/components/AddReport.vue
'
)[
'
default
'
]
AddReportDetail
:
typeof
import
(
'
./../views/report/components/AddReportDetail.vue
'
)[
'
default
'
]
AddRole
:
typeof
import
(
'
./../views/role/components/AddRole.vue
'
)[
'
default
'
]
AddSys
:
typeof
import
(
'
./../views/report/components/AddSys.vue
'
)[
'
default
'
]
AddTheme
:
typeof
import
(
'
./../views/theme/components/AddTheme.vue
'
)[
'
default
'
]
...
...
src/views/doctor/components/AddDoctor.vue
View file @
c4a92d7d
<
template
>
<ele-modal
v-if=
"modalVisible"
v-model=
"modalVisible"
:title=
"modalTitle"
width=
"600px"
position=
"center"
:close-on-click-modal=
"false"
@
close=
"handleClose"
>
<ele-loading
:loading=
"pageLoading"
>
<ele-card>
...
...
@@ -19,7 +22,7 @@
</ele-card>
</ele-loading>
<template
#footer
>
<el-button
type=
"primary"
plain
@
click=
"handleC
ancel
"
>
取消
</el-button>
<el-button
type=
"primary"
plain
@
click=
"handleC
lose
"
>
取消
</el-button>
<el-button
type=
"primary"
@
click=
"onSubmit"
>
确定
</el-button>
</
template
>
</ele-modal>
...
...
@@ -50,13 +53,26 @@
const
open
=
(
type
:
'
add
'
|
'
edit
'
=
'
add
'
,
info
?:
addUserDto
)
=>
{
useType
.
value
=
type
;
modalVisible
.
value
=
true
;
const
passwordItem
=
items
.
value
.
find
(
(
item
)
=>
item
.
prop
===
'
userPassword
'
);
if
(
type
===
'
edit
'
)
{
curInfo
.
value
=
info
;
Object
.
assign
(
form
,
info
);
if
(
'
jurisdictionCode
'
in
info
!
)
{
form
.
jurisdictionCode
=
(
info
.
jurisdictionCode
as
string
)
!
.
split
(
'
,
'
);
if
(
info
.
jurisdictionCode
)
{
form
.
jurisdictionCode
=
info
.
jurisdictionCode
.
split
(
'
,
'
);
}
console
.
log
(
info
,
form
,
'
表单数据
'
);
// if ('jurisdictionCode' in info!) {
// form.jurisdictionCode = (info.jurisdictionCode as string)!.split(',');
// }
passwordItem
.
isHide
=
true
;
}
else
{
passwordItem
.
isHide
=
false
;
}
};
defineExpose
({
...
...
@@ -112,10 +128,17 @@
{
label
:
'
科室编码
'
,
prop
:
'
deptCode
'
,
type
:
'
input
'
,
required
:
true
},
{
label
:
'
用户密码
'
,
<<<<<<<
HEAD
vIf
:
useType
.
value
===
'
add
'
,
prop
:
'
userPassword
'
,
type
:
'
input
'
,
required
:
true
=======
prop
:
'
userPassword
'
,
type
:
'
input
'
,
required
:
true
,
isHide
:
false
>>>>>>>
8784
ce1dfad9c9c2e8d810ac337eda4130deb7f9
},
{
label
:
'
微信id
'
,
prop
:
'
wxId
'
,
type
:
'
input
'
,
required
:
false
},
{
...
...
src/views/report/components/AddReport.vue
View file @
c4a92d7d
...
...
@@ -4,6 +4,8 @@
:title=
"modalTitle"
width=
"600px"
position=
"center"
:close-on-click-modal=
"false"
@
close=
"handleClose"
>
<ele-loading
:loading=
"pageLoading"
>
<ele-card>
...
...
@@ -19,7 +21,7 @@
</ele-card>
</ele-loading>
<template
#footer
>
<el-button
type=
"primary"
plain
@
click=
"handleC
ancel
"
>
取消
</el-button>
<el-button
type=
"primary"
plain
@
click=
"handleC
lose
"
>
取消
</el-button>
<el-button
type=
"primary"
@
click=
"onSubmit"
>
确定
</el-button>
</
template
>
</ele-modal>
...
...
@@ -36,6 +38,8 @@
import
{
EleMessage
}
from
'
ele-admin-plus
'
;
// apis
import
reportApi
from
'
@/api/reportApi
'
;
import
sysApi
from
'
@/api/sysApi
'
;
import
{
getClassify
}
from
'
@/api/common/dictionary
'
;
const
props
=
defineProps
<
{
curSelectSys
:
any
;
...
...
@@ -48,17 +52,24 @@
return
useType
.
value
===
'
add
'
?
'
添加报表
'
:
'
编辑报表
'
;
});
onMounted
(()
=>
{
getClassifyList
();
// 获取报表分类
});
// 打开
const
curInfo
=
ref
<
addReportDto
>
();
const
open
=
(
type
:
'
add
'
|
'
edit
'
=
'
add
'
,
info
?:
addReportDto
)
=>
{
useType
.
value
=
type
;
modalVisible
.
value
=
true
;
getSysList
();
// 获取系统列表
if
(
type
===
'
edit
'
)
{
curInfo
.
value
=
info
;
Object
.
assign
(
form
,
info
);
}
console
.
log
(
props
.
curSelectSys
);
form
.
reportCategory
=
info
.
dictDataValue
.
split
(
'
,
'
);
}
else
{
form
.
sysId
=
[
props
.
curSelectSys
.
sysId
];
}
};
defineExpose
({
open
:
open
as
(
type
:
'
add
'
|
'
edit
'
,
info
?:
addReportDto
)
=>
void
...
...
@@ -69,17 +80,70 @@
reportStyleUrl
:
''
,
reportName
:
''
,
reportCategory
:
[],
sysId
:
[],
reportType
:
1
reportType
:
1
,
sysId
:
[]
// 系统id
});
const
sysList
=
ref
([]);
// 系统列表
/** 获取系统列表 */
const
getSysList
=
async
()
=>
{
let
params
=
{
pageNum
:
1
,
pageSize
:
99999
};
const
[
error
,
ret
]
=
await
tryit
(
sysApi
.
getSysList
)(
params
);
if
(
error
)
{
console
.
error
(
error
);
return
;
}
if
(
ret
.
code
===
200
)
{
sysList
.
value
=
ret
.
data
.
list
.
map
((
item
)
=>
{
return
{
label
:
item
.
sysName
,
value
:
item
.
sysId
};
});
}
};
const
classifyList
=
ref
([]);
// 报表类型
// 获取报表分类
const
getClassifyList
=
async
()
=>
{
let
params
=
{
typeId
:
'
MEDICAL_ROLE
'
};
const
[
error
,
ret
]
=
await
tryit
(
getClassify
)(
params
);
if
(
error
)
{
console
.
error
(
error
);
return
;
}
if
(
ret
.
code
===
200
)
{
classifyList
.
value
=
ret
.
data
.
map
((
item
)
=>
{
return
{
label
:
item
.
dataLabel
,
value
:
item
.
dataValue
};
});
}
};
/** 表单项 */
const
items
=
computed
<
Array
<
ProFormItemProps
>>
(()
=>
[
{
label
:
'
所属系统
'
,
prop
:
'
sysId
'
,
type
:
'
multipleSelect
'
,
options
:
sysList
.
value
,
required
:
true
},
{
label
:
'
报表名称
'
,
prop
:
'
reportName
'
,
type
:
'
input
'
,
required
:
true
},
{
label
:
'
报表样式图片地址
'
,
prop
:
'
reportStyleUrl
'
,
type
:
'
input
'
,
label
:
'
报表分类
'
,
prop
:
'
reportCategory
'
,
type
:
'
multipleSelect
'
,
multiple
:
true
,
options
:
classifyList
.
value
,
required
:
true
},
{
...
...
@@ -99,12 +163,12 @@
required
:
true
},
{
label
:
'
报表
分类
'
,
prop
:
'
reportCategory
'
,
type
:
'
selec
t
'
,
multiple
:
true
,
options
:
[]
,
required
:
fals
e
label
:
'
报表
样式图片地址
'
,
prop
:
'
reportStyleUrl
'
,
// type: 'inpu
t',
type
:
'
imageUpload
'
,
limit
:
1
,
required
:
tru
e
}
]);
...
...
src/views/report/components/AddReportDetail.vue
0 → 100644
View file @
c4a92d7d
<
template
>
<ele-modal
v-model=
"modalVisible"
:title=
"modalTitle"
width=
"600px"
position=
"center"
:close-on-click-modal=
"false"
@
close=
"handleClose"
>
<ele-loading
:loading=
"pageLoading"
>
<ele-card>
<pro-form
ref=
"ProFormRef"
label-width=
"auto"
:model=
"form"
:items=
"items"
:footer=
"false"
:grid=
"
{ span: 24 }"
@updateValue="setFieldValue"
/>
</ele-card>
</ele-loading>
<template
#footer
>
<el-button
type=
"primary"
plain
@
click=
"handleClose"
>
取消
</el-button>
<el-button
type=
"primary"
@
click=
"onSubmit"
>
确定
</el-button>
</
template
>
</ele-modal>
</template>
<
script
lang=
"ts"
setup
>
// tools
import
{
useFormData
}
from
'
@/utils/use-form-data
'
;
import
{
tryit
}
from
'
radash
'
;
// types
import
type
{
addReportDetailDto
}
from
'
@/types/BiReport
'
;
import
type
{
ProFormItemProps
}
from
'
@/components/ProForm/types
'
;
import
type
{
FormInstance
}
from
'
element-plus
'
;
import
{
EleMessage
}
from
'
ele-admin-plus
'
;
// apis
import
reportApi
from
'
@/api/reportApi
'
;
const
props
=
defineProps
<
{
curSelectReport
:
any
;
}
>
();
const
useType
=
ref
<
'
add
'
|
'
edit
'
>
(
'
add
'
);
const
modalVisible
=
ref
(
false
);
const
modalTitle
=
computed
(()
=>
{
return
useType
.
value
===
'
add
'
?
'
添加详情
'
:
'
编辑详情
'
;
});
// 打开
const
curInfo
=
ref
<
addReportDetailDto
>
();
const
open
=
(
type
:
'
add
'
|
'
edit
'
=
'
add
'
,
info
?:
addReportDetailDto
)
=>
{
useType
.
value
=
type
;
modalVisible
.
value
=
true
;
if
(
type
===
'
edit
'
)
{
curInfo
.
value
=
info
;
Object
.
assign
(
form
,
info
);
}
else
{
form
.
reportId
=
props
.
curSelectReport
.
reportId
;
}
};
defineExpose
({
open
:
open
as
(
type
:
'
add
'
|
'
edit
'
,
info
?:
addReportDetailDto
)
=>
void
});
/** 表单数据 */
const
[
form
,
resetFields
,
,
setFieldValue
]
=
useFormData
<
addReportDetailDto
>
({
calculationFormula
:
''
,
// 计算公式
fieldName
:
''
,
// 字段名称
remark
:
''
,
// 备注信息
reportId
:
''
// 绑定报表id
// detailId: '' //
});
/** 表单项 */
const
items
=
computed
<
Array
<
ProFormItemProps
>>
(()
=>
[
{
label
:
'
字段名
'
,
prop
:
'
fieldName
'
,
type
:
'
input
'
,
required
:
true
},
{
label
:
'
公式
'
,
prop
:
'
calculationFormula
'
,
type
:
'
input
'
,
required
:
true
},
{
label
:
'
备注
'
,
prop
:
'
remark
'
,
type
:
'
textarea
'
}
]);
/** 提交 */
const
ProFormRef
=
ref
<
FormInstance
>
();
const
pageLoading
=
ref
(
false
);
const
emits
=
defineEmits
([
'
reload
'
]);
const
onSubmit
=
()
=>
{
ProFormRef
.
value
?.
validate
(
async
(
valid
)
=>
{
if
(
!
valid
)
{
EleMessage
.
warning
(
'
请填写必填项
'
);
return
;
}
ElMessageBox
.
confirm
(
`确定要
${
useType
.
value
===
'
add
'
?
'
保存
'
:
'
修改
'
}
?`
,
'
提示
'
,
{
type
:
'
warning
'
}
).
then
(
async
()
=>
{
pageLoading
.
value
=
true
;
const
apiObj
=
{
add
:
reportApi
.
addReportDetail
,
edit
:
reportApi
.
editReportDetail
};
const
[,
ret
]
=
await
tryit
(
apiObj
[
useType
.
value
!
])(
form
);
if
(
ret
?.
code
===
200
)
{
EleMessage
.
success
(
useType
.
value
===
'
add
'
?
'
添加成功
'
:
'
修改成功
'
);
emits
(
'
reload
'
);
handleClose
();
}
pageLoading
.
value
=
false
;
});
});
};
// 关闭
const
handleClose
=
()
=>
{
modalVisible
.
value
=
false
;
resetFields
();
};
// 点击取消
const
handleCancel
=
()
=>
{
modalVisible
.
value
=
false
;
};
</
script
>
src/views/report/components/AddSys.vue
View file @
c4a92d7d
...
...
@@ -4,6 +4,8 @@
:title=
"modalTitle"
width=
"600px"
position=
"center"
:close-on-click-modal=
"false"
@
close=
"handleClose"
>
<ele-loading
:loading=
"pageLoading"
>
<ele-card>
...
...
@@ -19,7 +21,7 @@
</ele-card>
</ele-loading>
<template
#footer
>
<el-button
type=
"primary"
plain
@
click=
"handleC
ancel
"
>
取消
</el-button>
<el-button
type=
"primary"
plain
@
click=
"handleC
lose
"
>
取消
</el-button>
<el-button
type=
"primary"
@
click=
"onSubmit"
>
确定
</el-button>
</
template
>
</ele-modal>
...
...
src/views/report/index.vue
View file @
c4a92d7d
This diff is collapsed.
Click to expand it.
src/views/theme/index.vue
View file @
c4a92d7d
...
...
@@ -16,6 +16,16 @@
</el-button>
</div>
</
template
>
<!-- 操作列 -->
<
template
#action
="{
row
}"
>
<el-button
type=
"text"
@
click=
"handleEdit(row)"
>
编辑
</el-button>
<el-button
type=
"text"
style=
"color: #ff1616"
@
click=
"handleDelete(row)"
>
删除
</el-button
>
</
template
>
</vxe-grid>
</div>
<div
class=
"wrapper-right"
>
...
...
@@ -108,6 +118,13 @@
{
field
:
'
roleNames
'
,
title
:
'
关联角色
'
},
{
field
:
'
action
'
,
title
:
'
操作
'
,
fixed
:
'
right
'
,
width
:
100
,
slots
:
{
default
:
'
action
'
}
}
],
toolbarConfig
:
{
...
...
@@ -208,6 +225,31 @@
}
};
// 编辑主题
const
handleEdit
=
async
(
row
)
=>
{
AddThemeRef
.
value
.
open
(
'
edit
'
,
row
);
// 传递菜单信息
}
// 删除主题
const
handleDelete
=
async
(
row
)
=>
{
ElMessageBox
.
confirm
(
`确定要删除此主题吗?`
,
'
提示
'
,
{
type
:
'
warning
'
}).
then
(
async
(
res
)
=>
{
let
params
=
{
themeId
:
row
.
themeId
};
const
[
err
,
ret
]
=
await
tryit
(
themeApi
.
delTheme
)(
params
);
if
(
err
)
{
console
.
error
(
err
);
return
;
}
if
(
ret
?.
code
===
200
)
{
EleMessage
.
success
(
'
删除成功
'
);
fetchTheme
();
// 重新获取菜单列表
}
});
};
// 移动端保存配置
const
handleSaveByMobile
=
async
()
=>
{
console
.
log
(
mobileTreeRef
.
value
.
getCheckedKeys
(
true
));
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment