Commit cae50c59 authored by 刘予佳's avatar 刘予佳

Merge remote-tracking branch 'remotes/origin/dev' into dev_lyj

# Conflicts:
#	src/utils/index.js
parents a58b404d 11ce260f
......@@ -24,6 +24,15 @@ export function medicalunionList(params = {}) {
params,
})
}
// 添加标准获取医联体
export function getMedicalunionList(params = {}) {
return request({
url: "/cloud-upms/sys/union/select",
method: "get",
params,
})
}
export function deleteUnion(id) {
return request({
url: `/cloud-upms/sys/union/${id}`,
......
......@@ -50,7 +50,11 @@
></el-upload-self>
<!-- 表单改文本 -->
<template v-else-if="getVwForm.detail">
<form-item-text :item="item" :form="form"></form-item-text>
<form-item-text
:item="item"
:form="form"
:unionList="unionList"
></form-item-text>
</template>
<!-- 可输入 -->
<template v-else>
......@@ -218,8 +222,8 @@
<el-option
v-for="(opt, optIndex) in unionList"
:key="optIndex"
:label="opt.label"
:value="opt.value"
:label="opt.unionName"
:value="opt.unionNo"
></el-option>
</template>
<template v-else>
......@@ -400,7 +404,7 @@
/**
* @description 自定义单组件
*/
import { getMedicalunionList } from "@/api/medicalunion-management"
import ElUploadSelf from "@/components/Upload"
import FormItemText from "./FormItemText"
import DialogToothBit from "./DialogToothBit"
......@@ -483,13 +487,24 @@ export default {
this.numberReset()
this.checkboxReset()
if (this.item.prop == "union_id") {
this.unionList = [{ label: "嗡嗡嗡", value: 1 }]
this.getMedicalunionList()
}
},
mounted() {
this.showFormItem()
},
methods: {
// 获取医联体列表
getMedicalunionList() {
getMedicalunionList().then((res) => {
console.log(res)
if (res.code == 1) {
this.unionList = res.data
} else {
this.unionList = []
}
})
},
scrollToView() {
if (this.$refs["JY_LCYY"]) {
this.$refs["JY_LCYY"].$el.scrollIntoView({ behavior: "smooth" })
......
......@@ -24,6 +24,9 @@
>
{{ screeningAdvise[form[item.prop]] }}
</span>
<span v-else-if="item.prop == 'union_id'">
{{ unionName }}
</span>
<span v-else style="margin: 0 5px">{{
String(form[item.prop]) | getItemText(item.dicData, item.type)
}}</span>
......@@ -43,6 +46,7 @@ export default {
props: {
item: Object,
form: Object | Array,
unionList: Array,
},
data() {
return {
......@@ -51,6 +55,7 @@ export default {
medium: "中危",
high: "高危",
},
unionName: "",
screeningAdvise: {
1: "可定期随访",
2: "推荐胶囊内镜或胃镜检查",
......@@ -70,6 +75,16 @@ export default {
return val
},
},
watch: {
unionList(v) {
if (v.length > 0 && this.form[this.item.prop]) {
console.log()
this.unionName = v.filter(
(e) => e.unionNo == this.form[this.item.prop]
)[0].unionName
}
},
},
}
</script>
<style scoped>
......
......@@ -154,7 +154,7 @@ export default {
}
return vwForm
},
formId: "",
// formId: "",
}
},
data() {
......@@ -193,7 +193,7 @@ export default {
for (let i = 0; i < domArr.length; i++) {
domArr[i].style.height = "54px"
domArr[i].innerHTML = ""
if (domArr.length / i == 2) {
if ((domArr.length - 1) / i == 2) {
domArr[i].innerHTML = "6"
}
if (i == domArr.length - 1) {
......@@ -461,6 +461,10 @@ export default {
}
}
.form-footer {
// position: absolute;
// left: 50%;
// transform: translateX(-50%);
// bottom: -50px;
margin-top: 20px;
margin-bottom: 20px;
text-align: center;
......
let formJson = {
column: [],
labelPosition: "right",
labelSuffix: "",
labelWidth: 180,
gutter: 0,
menuBtn: true,
submitBtn: true,
submitText: "下一步",
emptyBtn: false,
emptyText: "清空",
nextTabBtn: true,
nextTabText: "下一页",
menuPosition: "center",
prevBtn: true,
group: [
{
label: "实验室检查",
prop: "1669789802778_28648",
arrow: true,
collapse: true,
display: true,
labelWidth: 8,
column: [
{
type: "input",
display: true,
importantField: false,
styles: {},
prop: "G_17",
label: "胃泌素17",
fieldType: "varchar",
fieldLength: "255",
tableName: "实验室检查",
tableCode: "gas_exam",
tableId: "1597466741234040833",
notFilter: false,
cType: "",
subfield: false,
autoRequired: 0,
personalRequired: 0,
required: true,
rules: [{ required: true, message: "胃泌素17必须填写" }],
},
{
type: "input",
display: true,
importantField: false,
styles: {},
prop: "PG_I",
label: "胃蛋白酶原I(PG I)",
fieldType: "varchar",
fieldLength: "255",
tableName: "实验室检查",
tableCode: "gas_exam",
tableId: "1597466741234040833",
notFilter: false,
cType: "",
subfield: false,
rules: [{ required: true, message: "胃蛋白酶原I(PG I)必须填写" }],
required: true,
},
{
type: "input",
display: true,
importantField: false,
styles: {},
prop: "PG_II",
label: "胃蛋白酶原II(PG II)",
fieldType: "varchar",
fieldLength: "255",
tableName: "实验室检查",
tableCode: "gas_exam",
tableId: "1597466741234040833",
notFilter: false,
cType: "",
subfield: false,
rules: [{ required: true, message: "胃蛋白酶原II(PG II)必须填写" }],
required: true,
},
{
type: "radio",
display: true,
importantField: false,
styles: {},
prop: "IgG",
label: "Hp抗体(IgG)检测",
fieldType: "varchar",
fieldLength: "255",
tableName: "实验室检查",
tableCode: "gas_exam",
tableId: "1597466741234040833",
notFilter: false,
cType: "",
subfield: false,
dicData: [
{
label: "阳性",
value: "2",
id: "1598150992287858689",
parentId: "",
},
{
label: "阴性",
value: "1",
id: "1598150963816923138",
parentId: "",
},
],
dynamicshSet: [],
dicType: "hp_antibody",
props: { label: "label", value: "value" },
disabled: false,
required: true,
rules: [{ required: true, message: "请选择Hp抗体(IgG)检测" }],
},
{
type: "upload",
display: true,
importantField: false,
styles: {},
prop: "patient_avatar",
label: "血检报告单",
fieldType: "varchar",
fieldLength: "10",
showFileList: true,
multiple: true,
bucketName: "pacs",
limit: 5,
dicType: "",
tableName: "附件",
tableCode: "gas_attachment",
tableId: "1595978031963398145",
notFilter: false,
cType: "",
subfield: false,
autoRequired: 0,
personalRequired: 0,
listType: "picture-card",
required: true,
rules: [{ required: true, message: "血检报告单必须填写" }],
lg: 24,
width: 24,
xs: 24,
sm: 24,
span: 24,
md: 24,
},
{
type: "upload",
display: true,
importantField: true,
styles: {},
autoRequired: 0,
personalRequired: 0,
prop: "exam_img",
label: "实验室报告",
required: true,
rules: [{ required: true, message: "实验室报告必须填写" }],
showFileList: true,
multiple: true,
bucketName: "exam",
limit: 5,
dicType: "",
listType: "picture-card",
fieldType: "varchar",
fieldLength: "255",
tableName: "附件",
tableCode: "gas_attachment",
tableId: "1595978031963398145",
notFilter: false,
cType: "",
subfield: false,
},
],
},
],
}
This diff is collapsed.
<template>
<el-row class="el-upload-self">
<el-upload
ref="upload"
:multiple="multiple"
class="avatar-uploader"
ref="upload"
:action="action"
:headers="headers"
:list-type="listType"
......@@ -20,6 +20,7 @@
:drag="drag"
:disabled="disabled"
>
<!-- :http-request="handleUpload" -->
<template v-if="drag">
<i class="el-icon-upload"></i>
<div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
......@@ -37,10 +38,10 @@
</el-upload>
<el-image
ref="image"
style="display: none"
:src="imgUrl"
:preview-src-list="previewList"
ref="image"
>
</el-image>
</el-row>
......@@ -50,7 +51,7 @@
import { getAccessToken } from "@/utils/accessToken"
import { delFile } from "@/api/file"
export default {
name: "el-upload-self",
name: "ElUploadSelf",
props: {
accept: { type: String, default: "image/*" },
disabled: {
......@@ -97,20 +98,6 @@ export default {
fileList: [],
}
},
watch: {
value: {
handler(newValue, oldValue) {
if (newValue === oldValue) return
this.fileList = newValue.map((_) => {
return {
name: _.file_name,
url: `https://ds.cixincloud.com/geca-api/disease-data/file/info/${_.bucketName}/${_.uuidName}`,
}
})
},
immediate: true,
},
},
computed: {
headers() {
return {
......@@ -118,7 +105,10 @@ export default {
}
},
action() {
return this.httpPrefix + `/cloud-upms/file/upload`
return (
this.httpPrefix +
`/disease-data/file/upload?formId=${this.uploadQuery.formId}&patientId=${this.uploadQuery.patientId}&prefix=${this.uploadQuery.prefix}`
)
},
// 预览list
previewList() {
......@@ -126,12 +116,40 @@ export default {
return this.value.map((_) => {
return (
_.url ||
`https://ds.cixincloud.com/geca-api/disease-data/file/info/${_.bucketName}/${_.uuidName}`
`https://ds.cixincloud.com/geca-api/disease-data/file/info/${_.bucket_name}/${_.prefix}-${_.uuid_name}`
)
})
},
},
watch: {
value: {
handler(newValue, oldValue) {
console.log(this.value)
if (newValue === oldValue) return
this.fileList = newValue.map((_) => {
return {
name: _.file_name,
url: `https://ds.cixincloud.com/geca-api/disease-data/file/info/${_.bucket_name}/${_.prefix}-${_.uuid_name}`,
}
})
},
immediate: true,
},
},
methods: {
// 自定义上传方法
// handleUpload(param) {
// let formData = new FormData()
// fd.append("file", param.file) //传文件
// fd.append("formld", this.formld) //传formld
// // ajax.axiosPost(
// // url, //接口地址
// // fd, //formdata对象参数
// // (res) => {
// // console.log(res)
// // }
// // )
// },
// 上传前回调
beforeUpload(file) {
return new Promise((resolve, reject) => {
......@@ -153,7 +171,7 @@ export default {
handleSuccess(res, file, fileList) {
const { data } = res
if (data) {
this.value.push({ ...data, url: file.url })
this.value.push({ ...data })
} else {
this.$message.warning(res.msg)
this.$refs.upload.clearFiles()
......@@ -162,23 +180,27 @@ export default {
// 移除提醒
beforeRemove(file, fileList) {
return this.$confirm(`确定移除 ${file.file_name || file.name}?`)
// console.log(file, fileList)
return this.$confirm(
`确定移除 ${file.file_name || file.name || "该照片"}?`
)
},
// 移除
handleRemove({ url }, fileList) {
const i = this.value.findIndex((_) => url.endsWith(_.uuid_name))
if (i > -1) this.value.splice(i, 1) // 静态移除
handleRemove({ uuid_name }, fileList) {
const i = this.value.findIndex((_) => uuid_name == _.uuidName)
if (i > -1) this.value.splice(i, 1)
console.log("删了", this.value)
},
// 查看
// 查看/下载
handlePreview(file) {
const name = file.fileName || file.name
this.title = name
let responseUrl
if (file.response) {
const _ = file.response.data
responseUrl = `https://ds.cixincloud.com/geca-api/disease-data/file/info/${_.bucketName}/${_.uuidName}`
responseUrl = `https://ds.cixincloud.com/geca-api/disease-data/file/info/${_.bucket_name}/${_.prefix}-${_.uuid_name}`
}
try {
if (name.match(/\.(png|jpg|jpeg)/)) {
......
......@@ -290,5 +290,8 @@ export function resetRouter() {
routes: constantRoutes,
}).matcher
}
const originalPush = VueRouter.prototype.push
VueRouter.prototype.push = function push(location) {
return originalPush.call(this, location).catch((err) => err)
}
export default router
const state = {
fontSize: localStorage.getItem("fontSize") || 1,
selectedIndex: sessionStorage.getItem("selectedIndex") || "",
refreshFlag: 0,
}
const getters = {
fontSize: (state) => state.fontSize,
selectedIndex: (state) => state.selectedIndex,
refreshFlag: (state) => state.refreshFlag,
}
const mutations = {
setFontSize(state, fontSize) {
......@@ -18,6 +20,9 @@ const mutations = {
state.selectedIndex = ""
sessionStorage.removeItem("selectedIndex")
},
setRefreshFlag(state, refreshFlag) {
state.refreshFlag = refreshFlag
},
}
const actions = {}
export default {
......
......@@ -350,12 +350,12 @@ export default {
},
],
rigBarList: [
// {
// src1: require("@/assets/img/Home/kefu.png"),
// src2: require("@/assets/img/Home/kefuwhite.png"),
// content: "",
// name: "客服",
// },
{
src1: require("@/assets/img/Home/kefu.png"),
src2: require("@/assets/img/Home/kefuwhite.png"),
content: "021-31161236",
name: "客服",
},
{
src1: require("@/assets/img/Home/youxiang.png"),
src2: require("@/assets/img/Home/youxiangwhite.png"),
......
......@@ -109,7 +109,9 @@ export default {
},
getPatientPage() {
this.listLoading = true
let data = { patientFrom: this.selectedIndex }
let data = {
patientFrom: this.selectedIndex == "0" ? null : this.selectedIndex,
}
getPatientPage(data).then((res) => {
this.listLoading = false
if (res.code === 1) {
......
......@@ -311,7 +311,6 @@ export default {
this.pageSize = Number(sessionStorage.getItem('followResearch-pageSize')) || 1
this.pageIndex = Number(sessionStorage.getItem('followResearch-pageIndex')) || 10
this.getCurrentFormByType(2)
// this.handleSearch() //调试注释
},
methods: {
changeModified() {
......@@ -400,6 +399,7 @@ export default {
.then((res) => {
if (res.code === 1) {
this.formId = res.data[0].id
this.handleSearch() //调试注释
}
})
},
......
......@@ -29,6 +29,7 @@
form-type="1"
:patient-id="patientId"
:disabled="disabled"
:operation="'edit'"
></ConfigForms>
</div>
</div>
......@@ -56,7 +57,7 @@ export default {
{
label: "医联体",
minWidth: 120,
value: "groupName",
value: "unionId",
},
{
label: "姓名",
......@@ -144,6 +145,7 @@ export default {
mounted() {},
methods: {
handleAdd({ patientId, name }, index, disabled = false) {
sessionStorage.removeItem("index1Data")
this.disabled = disabled
this.patientId = patientId || null
this.name = name
......
......@@ -28,7 +28,7 @@
:key="form.id"
:label="form.label"
:name="'index' + index"
disabled
:disabled="tabDisabled"
>
<!-- disabled -->
<transition mode="out-in" name="fade-transform">
......@@ -41,6 +41,9 @@
:newform-record-id="newformRecordId"
:form="form"
:disabled="disabled"
:operation="operation"
:isDraft="isDraft"
:active-name="activeName"
contrast
:form-initial="formInitial"
:survival-flag="survivalFlag"
......@@ -56,10 +59,7 @@
</el-tabs>
</div>
<el-empty v-else description="暂无数据"></el-empty>
<public-dialog
ref="showDialog"
:showClose="dialogType == 'draft' ? true : false"
>
<public-dialog ref="showDialog" :show-close="true">
<!-- 保存草稿 -->
<template v-if="dialogType == 'draft'" slot="content">
<div class="title center">已保存至草稿箱!</div>
......@@ -113,9 +113,12 @@ export default {
mixins: [mixin],
props: {
disabled: Boolean,
tabDisabled: { type: Boolean, default: true },
formType: String,
patientId: String,
formClass: String,
operation: String,
isDraft: String,
},
data() {
return {
......@@ -155,20 +158,23 @@ export default {
if (val == "index1") {
// 第二步问卷调查
this.$nextTick(() => {
let { birthday } = JSON.parse(sessionStorage.getItem("index1Data"))
let date = new Date(String(birthday).replace(/-/g, "/"))
let d = new Date()
let age =
d.getFullYear() -
date.getFullYear() -
(d.getMonth() < date.getMonth() ||
(d.getMonth() == date.getMonth() && d.getDate() < date.getDate())
? 1
: 0)
//!
this.formInitial = {
birthday,
age,
let index1Data = sessionStorage.getItem("index1Data")
if (index1Data) {
let { birthday } = JSON.parse(index1Data)
let date = new Date(String(birthday).replace(/-/g, "/"))
let d = new Date()
let age =
d.getFullYear() -
date.getFullYear() -
(d.getMonth() < date.getMonth() ||
(d.getMonth() == date.getMonth() && d.getDate() < date.getDate())
? 1
: 0)
//!
this.formInitial = {
birthday,
age,
}
}
})
} else {
......@@ -218,7 +224,7 @@ export default {
},
temporaryConfirm(data, done, cb) {
this.addPatient(data, done, cb, () => {
console.log("倒了")
console.log("临时保存")
this.$refs.showDialog.dialogVisible = true
this.loading = false
})
......@@ -258,10 +264,26 @@ export default {
}
// 清空红字:不符合筛查条件
this.$refs.showDialog.dialogVisible = false
//判断路径
if (this.$route.path != "/screening/add") {
this.$router.push("/screening/add")
}
},
// 去查看跳转
viewJump() {
// this.$router.push('/')
alert("跳转")
console.log(this.patientId)
if (this.$route.path == "/screening/index") {
this.$store.commit("table/setRefreshFlag", 1)
} else {
this.$router.push({
path: "/screening/index",
query: {
patientId: this.patientId || this.patientStandbyId,
},
})
}
this.$refs.showDialog.dialogVisible = false
// alert("跳转")
},
},
provide() {
......
......@@ -45,6 +45,12 @@
<div
ref="my-form"
class="my-form"
:style="{
height:
$route.path == '/screening/index'
? 'calc(100vh - 310px)'
: 'calc(100vh - 270px)',
}"
:class="externalScroll ? 'no-scroll' : ''"
>
<!-- <read-form
......@@ -84,6 +90,7 @@ export default {
name: "FormTab",
components: { CustomForm, TagsScrollBar, ReadForm },
props: {
activeName: String,
externalScroll: Boolean, //外部滚动
disabled: Boolean,
contrast: Boolean, //同屏对照
......@@ -95,6 +102,11 @@ export default {
survivalFlag: Boolean, //存活的显示
formEdit: {},
formInitial: {},
operation: String, // !默认新增,传入为edit为编辑需要传formRecordId
isDraft: {
type: String,
default: "",
},
},
provide() {
return {
......@@ -174,52 +186,53 @@ export default {
},
// 临时保存确定
temporaryConfirm(data, done) {
this.$emit(
"temporaryConfirm",
{
data,
formId: this.form.formId, // 每个大表单的id
patientId: this.patientId || this.patientStandbyId,
// formRecordId: this.formData.formRecordId || this.newformRecordId, // 是否为编辑的表单id
statusMap: {
patient_from: this.$store.getters["table/selectedIndex"],
is_draft: 1, //是否为草稿
check_status: 1, // 审核状态
},
let params = {
data,
formId: this.form.formId, // 每个大表单的id
patientId: this.patientId || this.patientStandbyId,
// formRecordId: this.formData.formRecordId || this.newformRecordId, // 是否为编辑的表单id
statusMap: {
patient_from: this.$store.getters["table/selectedIndex"],
is_draft: 1, //是否为草稿
check_status: 1, // 审核状态
},
done,
(res) => {
// 多次填写的表单新增时,获取最新数据
if (this.form.fillType === 1 && !this.formData.formRecordId) {
this.getRecordList(res.data.formRecordId)
}
this.formatData(res, this.form.fillType !== 1)
}
if (this.operation && this.operation == "edit") {
params.formRecordId = this.formData.formRecordId || this.newformRecordId // 是否为编辑的表单id
}
this.$emit("temporaryConfirm", params, done, (res) => {
// 多次填写的表单新增时,获取最新数据
if (this.form.fillType === 1 && !this.formData.formRecordId) {
this.getRecordList(res.data.formRecordId)
}
)
this.formatData(res, this.form.fillType !== 1)
})
},
handleConfirm(data, done) {
this.$emit(
"handleConfirm",
{
data,
formId: this.form.formId, // 每个大表单的id
patientId: this.patientId || this.patientStandbyId,
// formRecordId: this.formData.formRecordId || this.newformRecordId, // 是否为编辑的表单id
statusMap: {
patient_from: this.$store.getters["table/selectedIndex"],
is_draft: 0, //是否为草稿
check_status: 1, // 审核状态
},
let params = {
data,
formId: this.form.formId, // 每个大表单的id
patientId: this.patientId || this.patientStandbyId,
// formRecordId: this.formData.formRecordId || this.newformRecordId, // 是否为编辑的表单id
statusMap: {
patient_from: this.$store.getters["table/selectedIndex"],
is_draft: this.activeName == "index5" ? 0 : 1, //是否为草稿
check_status: 1, // 审核状态
},
done,
(res) => {
// 多次填写的表单新增时,获取最新数据
if (this.form.fillType === 1 && !this.formData.formRecordId) {
this.getRecordList(res.data.formRecordId)
}
this.formatData(res, this.form.fillType !== 1)
}
if (this.operation && this.operation == "edit") {
params.formRecordId = this.formData.formRecordId || this.newformRecordId // 是否为编辑的表单id
}
if (this.isDraft) {
params.statusMap.is_draft = this.isDraft
}
this.$emit("handleConfirm", params, done, (res) => {
// 多次填写的表单新增时,获取最新数据
if (this.form.fillType === 1 && !this.formData.formRecordId) {
this.getRecordList(res.data.formRecordId)
}
)
this.formatData(res, this.form.fillType !== 1)
})
},
onPrev(done) {
this.$emit("onPrev", done)
......@@ -438,10 +451,10 @@ export default {
}
}
.my-form {
height: calc(100vh - #{"270px"});
// height: calc(100vh - #{"310px"});
overflow-y: auto;
padding-top: 20px;
position: relative;
// position: relative;
&::-webkit-scrollbar-thumb {
background-color: #fff;
}
......
......@@ -25,14 +25,15 @@
<div v-if="isDetail">
<div>
<el-button icon="el-icon-back" @click="isDetail = false"
>返 回</el-button
>
<el-button icon="el-icon-back" @click="backInfoce">返 回</el-button>
</div>
<ConfigForms
form-type="1"
:patient-id="patientId"
:disabled="disabled"
:tabDisabled="tabDisabled"
:isDraft="'0'"
:operation="'edit'"
></ConfigForms>
</div>
</div>
......@@ -54,6 +55,7 @@ export default {
disabled: false,
tableData: [],
cacheForm: {},
tabDisabled: true,
searchList: [
{
type: "date",
......@@ -246,11 +248,22 @@ export default {
}
},
methods: {
backInfoce() {
this.$router.push({ query: {} })
this.isDetail = false
},
handleView(row) {
this.handleAdd(row, null, true)
this.handleAdd(row, null, true, false)
},
handleAdd({ patientId, name }, index, disabled = false) {
handleAdd(
{ patientId, name },
index,
disabled = false,
tabDisabled = true
) {
sessionStorage.removeItem("index1Data")
this.disabled = disabled
this.tabDisabled = tabDisabled
this.patientId = patientId || null
this.name = name
this.isDetail = true
......@@ -298,15 +311,40 @@ export default {
computed: {
...mapGetters({
selectedIndex: "table/selectedIndex",
refreshFlag: "table/refreshFlag",
}),
},
created() {
this.handleFormSearch()
// if (this.$route.path == "/screening/index") {
// this.tabDisabled = false
// }
if (this.$route.query.patientId) {
let patientId = this.$route.query.patientId
// this.$nextTick(() => {
this.disabled = true
this.tabDisabled = false
this.patientId = patientId || null
this.isDetail = true
// })
}
},
watch: {
selectedIndex(v) {
this.handleFormSearch(this.searchForm)
},
refreshFlag(v) {
if (v) {
this.$store.commit("table/setRefreshFlag", 0)
this.isDetail = false
this.$nextTick(() => {
this.handleView({
patientId: this.patientId,
name: "",
})
})
}
},
},
}
</script>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment