Commit 41c9b298 authored by 刘予佳's avatar 刘予佳

审核标签接口变更 表单显隐

parent d050f880
...@@ -13,7 +13,7 @@ export function getSysCheckNote(params = {}) { ...@@ -13,7 +13,7 @@ export function getSysCheckNote(params = {}) {
}); });
} }
//新增意见标签 //保存意见标签
export function postSysCheckNote(data = {}) { export function postSysCheckNote(data = {}) {
return request({ return request({
url: "/disease-data/sysCheckNote", url: "/disease-data/sysCheckNote",
...@@ -22,18 +22,18 @@ export function postSysCheckNote(data = {}) { ...@@ -22,18 +22,18 @@ export function postSysCheckNote(data = {}) {
}); });
} }
//修改意见标签 // //修改意见标签
export function putSysCheckNote(data = {}) { // export function putSysCheckNote(data = {}) {
return request({ // return request({
url: "/disease-data/sysCheckNote", // url: "/disease-data/sysCheckNote",
method: "put", // method: "put",
data // data
}); // });
} // }
//删除意见标签 // //删除意见标签
export function delSysCheckNote(id) { // export function delSysCheckNote(id) {
return request({ // return request({
url: `/disease-data/sysCheckNote/${id}`, // url: `/disease-data/sysCheckNote/${id}`,
method: "delete", // method: "delete",
}); // });
} // }
\ No newline at end of file \ No newline at end of file
...@@ -5,18 +5,13 @@ ...@@ -5,18 +5,13 @@
:style="item.styles" :style="item.styles"
:class="{ isDefects: defectsSet.includes(item.prop) }" :class="{ isDefects: defectsSet.includes(item.prop) }"
> >
<el-col <el-col :lg="item.width" :style="{ height: item.type === 'upload' ? '116px' : '53px' }">
:lg="item.width"
:style="{ height: item.type === 'upload' ? '116px' : '53px' }"
>
<div <div
v-if=" v-if="
showIndex || (configForms && configForms.showIndex) || item.showIndex showIndex || (configForms && configForms.showIndex) || item.showIndex
" "
:class="['formIndex', item.labelSuffix == '5' ? 'computeIndex' : '']" :class="['formIndex', item.labelSuffix == '5' ? 'computeIndex' : '']"
> >{{ item.labelSuffix || columnIndex + 1 }}</div>
{{ item.labelSuffix || columnIndex + 1 }}
</div>
<!-- <el-form-item <!-- <el-form-item
:label=" :label="
!hiddenLabel && item.label !hiddenLabel && item.label
...@@ -50,11 +45,7 @@ ...@@ -50,11 +45,7 @@
></el-upload-self> ></el-upload-self>
<!-- 表单改文本 --> <!-- 表单改文本 -->
<template v-else-if="getVwForm.detail"> <template v-else-if="getVwForm.detail">
<form-item-text <form-item-text :item="item" :form="form" :union-list="unionList"></form-item-text>
:item="item"
:form="form"
:union-list="unionList"
></form-item-text>
</template> </template>
<!-- 可输入 --> <!-- 可输入 -->
<template v-else> <template v-else>
...@@ -62,10 +53,10 @@ ...@@ -62,10 +53,10 @@
<el-input <el-input
v-if="item.type === 'input'" v-if="item.type === 'input'"
v-model="form[item.prop]" v-model="form[item.prop]"
:class="item.prop == 'other_sickness' ? 'needlong' : ''" :class="item.prop == 'other_sickness' ? 'needlong' : item.readonly ? 'read-input' :''"
:readonly="item.readonly" :readonly="item.readonly"
:disabled="item.disabled" :disabled="item.disabled"
:placeholder=" :placeholder="item.disabled || item.readonly ? '':
item.placeholder || item.placeholder ||
` ${item.label ? '请输入' + item.label : ''}` ` ${item.label ? '请输入' + item.label : ''}`
" "
...@@ -85,14 +76,17 @@ ...@@ -85,14 +76,17 @@
slot="append" slot="append"
class="toothBit" class="toothBit"
@click="openToothBit" @click="openToothBit"
>{{ item.append || "牙位" }}</el-button >{{ item.append || "牙位" }}</el-button>
> <template v-else-if="item.append" slot="append">
<template v-else-if="item.append" slot="append">{{ {{
item.append item.append
}}</template> }}
<template v-if="item.prepend" slot="prepend">{{ </template>
<template v-if="item.prepend" slot="prepend">
{{
item.prepend item.prepend
}}</template> }}
</template>
</el-input> </el-input>
<!-- 密码框 --> <!-- 密码框 -->
...@@ -115,12 +109,16 @@ ...@@ -115,12 +109,16 @@
" "
@blur="handleBlur" @blur="handleBlur"
> >
<template v-if="item.append" slot="append">{{ <template v-if="item.append" slot="append">
{{
item.append item.append
}}</template> }}
<template v-if="item.prepend" slot="prepend">{{ </template>
<template v-if="item.prepend" slot="prepend">
{{
item.prepend item.prepend
}}</template> }}
</template>
</el-input> </el-input>
<!-- 文本域 --> <!-- 文本域 -->
...@@ -166,13 +164,12 @@ ...@@ -166,13 +164,12 @@
v-if="item.append" v-if="item.append"
class="el-input-group__append" class="el-input-group__append"
style="line-height: 28px" style="line-height: 28px"
>{{ item.append }}</span >{{ item.append }}</span>
>
</div> </div>
<!-- 单选框 --> <!-- 单选框 -->
<el-radio-group <el-radio-group
v-if="item.type === 'radio'" v-if="item.type === 'radio' && !item.disabled"
v-model="form[item.prop]" v-model="form[item.prop]"
:disabled="item.disabled" :disabled="item.disabled"
@change="handleChange" @change="handleChange"
...@@ -181,9 +178,22 @@ ...@@ -181,9 +178,22 @@
v-for="(opt, optIndex) in item.dicData" v-for="(opt, optIndex) in item.dicData"
:key="optIndex" :key="optIndex"
:label="opt.value" :label="opt.value"
>{{ opt.label }}</el-radio >{{ opt.label }}</el-radio>
>
</el-radio-group> </el-radio-group>
<!-- 单选框只读 -->
<div
v-for="(opt, optIndex) in item.dicData"
:key="optIndex"
v-else-if="item.type === 'radio' && item.disabled "
>
<el-radio
v-model="form[item.prop]"
:class="item.class ? item.class : item.disabled ? 'read-radio':''"
:label="opt.value"
v-show="opt.value == form[item.prop]"
@change="item.func ? item.func($event) : {}"
>{{ opt.label}}</el-radio>
</div>
<!-- 多选框 --> <!-- 多选框 -->
<template v-if="item.type === 'checkbox'"> <template v-if="item.type === 'checkbox'">
...@@ -196,8 +206,7 @@ ...@@ -196,8 +206,7 @@
v-for="(opt, optIndex) in item.dicData" v-for="(opt, optIndex) in item.dicData"
:key="optIndex" :key="optIndex"
:label="opt.value" :label="opt.value"
>{{ opt.label }}</el-checkbox >{{ opt.label }}</el-checkbox>
>
</el-checkbox-group> </el-checkbox-group>
</template> </template>
...@@ -259,6 +268,7 @@ ...@@ -259,6 +268,7 @@
:value-format="item.valueFormat" :value-format="item.valueFormat"
:format="item.format" :format="item.format"
:disabled="item.disabled" :disabled="item.disabled"
:class="item.disabled ? 'read-time' : ''"
style="width: 100%" style="width: 100%"
clearable clearable
@change="handleChange" @change="handleChange"
...@@ -275,11 +285,16 @@ ...@@ -275,11 +285,16 @@
:value-format="item.valueFormat" :value-format="item.valueFormat"
:format="item.format" :format="item.format"
:disabled="item.disabled" :disabled="item.disabled"
:class="item.disabled ? 'read-time' : ''"
clearable clearable
@change="handleChange" @change="handleChange"
></el-time-picker> ></el-time-picker>
<!-- 日期 --> <!-- 日期 -->
<div v-else-if="item.type === 'date'" class="flex"> <div
v-else-if="item.type === 'date'"
class="flex"
:class="item.disabled ? 'read-time' : ''"
>
<el-date-picker <el-date-picker
v-model="form[item.prop]" v-model="form[item.prop]"
:placeholder="item.placeholder ? item.placeholder : '请选择'" :placeholder="item.placeholder ? item.placeholder : '请选择'"
...@@ -292,8 +307,7 @@ ...@@ -292,8 +307,7 @@
<span <span
v-if="item.prop == 'birthday'" v-if="item.prop == 'birthday'"
style="margin-left: 12px" style="margin-left: 12px"
>{{ age + (age ? "岁" : "") }}</span >{{ age + (age ? "岁" : "") }}</span>
>
</div> </div>
<!-- 年 --> <!-- 年 -->
<el-date-picker <el-date-picker
...@@ -355,9 +369,10 @@ ...@@ -355,9 +369,10 @@
v-else-if="item.type === 'datetime'" v-else-if="item.type === 'datetime'"
v-model="form[item.prop]" v-model="form[item.prop]"
type="datetime" type="datetime"
:placeholder="item.placeholder ? item.placeholder : '请选择'" :placeholder="item.placeholder ? item.placeholder : item.disabled ? '':'请选择'"
clearable clearable
:disabled="item.disabled" :disabled="item.disabled"
:class="item.disabled ? 'read-time' : ''"
:picker-options="pickerOptions" :picker-options="pickerOptions"
:value-format="item.valueFormat" :value-format="item.valueFormat"
:format="item.format" :format="item.format"
...@@ -385,8 +400,7 @@ ...@@ -385,8 +400,7 @@
<span <span
v-if="item.importantField && !getVwForm.detail" v-if="item.importantField && !getVwForm.detail"
class="important_field" class="important_field"
>{{ item.importantFieldDesc || "*" }}</span >{{ item.importantFieldDesc || "*" }}</span>
>
</div> </div>
</el-form-item> </el-form-item>
</el-col> </el-col>
...@@ -720,10 +734,29 @@ export default { ...@@ -720,10 +734,29 @@ export default {
Object.keys(dyMap).forEach((key) => { Object.keys(dyMap).forEach((key) => {
// !获取显隐目标 // !获取显隐目标
let targetItem = columns.find((_) => _.prop === key) let targetItem = columns.find((_) => _.prop === key)
if (!targetItem) { if (!targetItem) {
// !没有在表单子组件中找到,查找大表单id // !没有在表单子组件中找到,查找大表单id
targetItem = group.find((_) => _.prop === key) targetItem = group.find((_) => _.prop === key)
} }
//没有找到再细化查找
if (!targetItem) {
group.forEach((_) =>{
if(_.column){
_.column.find((item)=> {
if(item.prop === key){
targetItem = item
return
}
else{
if(item.children && item.children.column){
targetItem = item.children.column.find((e)=> e.prop=== key)
}
}
})
}
})
}
if (!targetItem) return if (!targetItem) return
let display = false let display = false
......
...@@ -23,7 +23,10 @@ ...@@ -23,7 +23,10 @@
<!-- :http-request="handleUpload" --> <!-- :http-request="handleUpload" -->
<template v-if="drag"> <template v-if="drag">
<i class="el-icon-upload"></i> <i class="el-icon-upload"></i>
<div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div> <div class="el-upload__text">
将文件拖到此处,或
<em>点击上传</em>
</div>
</template> </template>
<template v-else-if="listType === 'picture-card'"> <template v-else-if="listType === 'picture-card'">
<i class="el-icon-plus"></i> <i class="el-icon-plus"></i>
...@@ -37,13 +40,7 @@ ...@@ -37,13 +40,7 @@
<div slot="tip" class="el-upload__tip">{{ tip }}</div> <div slot="tip" class="el-upload__tip">{{ tip }}</div>
</el-upload> </el-upload>
<el-image <el-image ref="image" style="display: none" :src="imgUrl" :preview-src-list="previewList"></el-image>
ref="image"
style="display: none"
:src="imgUrl"
:preview-src-list="previewList"
>
</el-image>
</el-row> </el-row>
</template> </template>
......
This diff is collapsed.
...@@ -30,7 +30,6 @@ export default { ...@@ -30,7 +30,6 @@ export default {
}, },
watch:{ watch:{
model(val){ model(val){
console.log('val',val)
switch(val){ switch(val){
case 'view': case 'view':
this.disabled = true this.disabled = true
......
...@@ -140,65 +140,7 @@ export default { ...@@ -140,65 +140,7 @@ export default {
}, },
], ],
tableData: [ tableData: [
// { ],
// "patientId": "1598222607734341634",
// "name": "小飞", //姓名
// "idCard": "340822199510260215", //身份证
// "phone": "18311112222", //手机号
// "sex": 1, //性别
// "birthday": "2022-12-31 00:00:00", //生日
// "age": 18, //年龄
// "id": "", //id
// "unionName": "合肥高新附院", //医联体名称
// "screeningTime": "2022-12-01 00:00:00", //筛查时间
// "riskRank": "", //风险等级
// "followTime": "", //随访时间
// "followContents": "", //随访内容
// "nextFollowTime": "", //计划随访时间
// "followBatch": 0, //随访进度
// "unionId": "2", //联盟id
// "riskScore": "", //风险分数
// "screeningAdvise": "", //筛查建议
// "formRecordId": "", //表单记录id
// "linkPhone": "0556-5556666", //联系方式
// "isContinueFollow": 1, //是否继续随访
// "checkStatus": "", //审核状态
// "riskRank":"medium"
// },
// {
// name:'11',
// },
// {
// name:'11',
// },
// {
// name:'11',
// },
// {
// name:'11',
// },
// {
// name:'11',
// },
// {
// name:'11',
// },
// {
// name:'11',
// },
// {
// name:'11',
// },
// {
// name:'11',
// },
// {
// name:'11',
// },
// {
// name:'11',
// },
],//调试
formList: [ formList: [
{ {
xs: 24, xs: 24,
...@@ -324,7 +266,7 @@ export default { ...@@ -324,7 +266,7 @@ export default {
}, },
rowOpration(data, i,label) { rowOpration(data, i,label) {
console.log('跳转',data, i,label) console.log('跳转',data, i,label)
this.$router.push({path:"/followupentry",query:{formEdit:JSON.stringify(data)}}) this.$router.push({path:"/followupentry",query:{patientId:data.patientId,formEdit:JSON.stringify(data)}})
}, },
onSearch(form) { onSearch(form) {
sessionStorage.setItem('followResearch-form',JSON.stringify(form)) sessionStorage.setItem('followResearch-form',JSON.stringify(form))
......
...@@ -201,7 +201,7 @@ export default { ...@@ -201,7 +201,7 @@ export default {
created() { created() {
// 字典formType 1 筛查表单 // 字典formType 1 筛查表单
this.getCurrentFormByType(this.formType) this.getCurrentFormByType(this.formType)
console.log('大表单',this.disabled,this.tabDisabled) console.log('大表单',this.disabled,this.tabDisabled,this.patientId)
}, },
methods: { methods: {
handleConfirm(data, done, cb) { handleConfirm(data, done, cb) {
...@@ -392,7 +392,10 @@ export default { ...@@ -392,7 +392,10 @@ export default {
// border-width: 0px 0px 0px 1px; // border-width: 0px 0px 0px 1px;
// } // }
.el-form-item { .el-form-item {
height: 100%;
padding: 0px;
.el-form-item__label { .el-form-item__label {
height: 100%;
text-align: left; text-align: left;
background: #fafafa; background: #fafafa;
font-size: 14px; font-size: 14px;
...@@ -403,10 +406,39 @@ export default { ...@@ -403,10 +406,39 @@ export default {
padding: 18px 10px; padding: 18px 10px;
margin-right: 20px; margin-right: 20px;
text-align: center; text-align: center;
display: flex;
align-items: center;
justify-content: center;
} }
} }
.el-form-item { }
padding: 0px; }
//只读表单
::v-deep {
.read-input,
.read-time {
.el-input__inner {
border: none;
padding: 0px 30px 0px 15px;
cursor: text;
}
.el-input.is-disabled .el-input__icon,
.el-input__prefix {
display: none;
}
.el-input__icon {
}
}
.read-radio {
cursor: text;
.is-checked {
display: none;
}
.el-radio__input.is-checked + .el-radio__label {
color: #606266;
}
.el-radio__label {
padding-left: 15px;
} }
} }
} }
......
...@@ -170,6 +170,7 @@ export default { ...@@ -170,6 +170,7 @@ export default {
this.$refs.form.clearAge() this.$refs.form.clearAge()
}, },
initData() { initData() {
console.log('初始化',this.formData)
this.formData.formRecordId = null this.formData.formRecordId = null
this.formCacheList = [] this.formCacheList = []
this.getPatientDetail() this.getPatientDetail()
...@@ -332,7 +333,7 @@ export default { ...@@ -332,7 +333,7 @@ export default {
if (form["YZZKJC"] && typeof form["YZZKJC"] === "string") { if (form["YZZKJC"] && typeof form["YZZKJC"] === "string") {
form["YZZKJC"] = JSON.parse(form["YZZKJC"]) form["YZZKJC"] = JSON.parse(form["YZZKJC"])
} }
console.log(form) console.log('form形成',form,this.formData)
if (!cache) { if (!cache) {
this.formData.formEdit = form this.formData.formEdit = form
} }
...@@ -357,6 +358,7 @@ export default { ...@@ -357,6 +358,7 @@ export default {
this.formData.formEdit = form this.formData.formEdit = form
}, },
getRecordList(formRecordId) { getRecordList(formRecordId) {
console.log('获取表单id',formRecordId)
if (!this.patientId) return if (!this.patientId) return
getRecordList({ getRecordList({
patientId: this.patientId, patientId: this.patientId,
...@@ -388,7 +390,7 @@ export default { ...@@ -388,7 +390,7 @@ export default {
handler(v) { handler(v) {
if (v) { if (v) {
this.$set(this.formData, "formEdit", { ...v }) this.$set(this.formData, "formEdit", { ...v })
console.log(this.formData.formEdit) console.log('form-tab',this.formData.formEdit)
} }
}, },
deep: true, deep: true,
......
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