|
|
|
@ -16,13 +16,14 @@ |
|
|
|
<el-select v-else-if="type === 'select'" class="flex1" :multiple="item.multiple" |
|
|
|
:class="getFillTypeStyle() + (orangeBg ? ' orange-bg' : '')" v-model="inputValue" |
|
|
|
:disabled="getDisabled()" :placeholder="getPlaceholder()" @remove-tag="onRemoveTag" |
|
|
|
@visible-change="onSelectBlur" @change="onInputChange"> |
|
|
|
@visible-change="onSelectBlur" @change="onInputChange" filterable> |
|
|
|
<el-option v-for="op in item.options" :key="op.value" :label="op.label" :value="op.value"> |
|
|
|
</el-option> |
|
|
|
</el-select> |
|
|
|
<el-checkbox v-else-if="type === 'checkbox'" class="flex1" :multiple="item.multiple" |
|
|
|
:class="getFillTypeStyle() + (orangeBg ? ' orange-bg' : '')" v-model="inputValue" |
|
|
|
:disabled="getDisabled()" :placeholder="getPlaceholder()" @change="onItemCheckboxChange"> |
|
|
|
{{ item.checkboxLabel }} |
|
|
|
</el-checkbox> |
|
|
|
<el-radio-group v-else-if="type === 'radio'" v-model="inputValue" |
|
|
|
:class="getFillTypeStyle() + (orangeBg ? ' orange-bg' : '')" :disabled="getDisabled()" |
|
|
|
@ -34,16 +35,15 @@ |
|
|
|
</el-radio-group> |
|
|
|
<div v-else-if="type === 'checkboxList'" class="flex1 checkbox-list-container" |
|
|
|
:class="getFillTypeStyle() + (orangeBg ? ' orange-bg' : '')"> |
|
|
|
<el-checkbox-group v-model="inputValue" @change="onInputChange"> |
|
|
|
<el-checkbox-group v-model="checkboxListValue.checkboxValues" @change="onCheckboxListChange"> |
|
|
|
<div v-for="option in item.options" :key="option.value" class="checkbox-item"> |
|
|
|
<el-checkbox :label="option.value" :disabled="getDisabled()"> |
|
|
|
{{ option.label }} |
|
|
|
</el-checkbox> |
|
|
|
<div v-if="option.otherCode && inputValue.includes(option.value)"> |
|
|
|
<el-input v-model="otherValues[option.otherCode]" |
|
|
|
:placeholder="option.otherPlaceholder || '请输入'" |
|
|
|
:class="{ 'error-border': isOtherInputError(option.otherCode) }" @blur="onBlur" |
|
|
|
@input="onOtherInputChange(option.otherCode, $event)" /> |
|
|
|
<div v-if="isShowCheckboxListOther(option)"> |
|
|
|
<el-input v-model="checkboxListValue.otherValues[option.otherCode]" |
|
|
|
:class="{ 'error-border': isOtherInputError(option.otherCode) }" |
|
|
|
:placeholder="option.otherPlaceholder || '请输入'" @blur="onCheckboxListOtherBlur($event, option.otherCode)"/> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</el-checkbox-group> |
|
|
|
@ -109,6 +109,22 @@ |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div v-else-if="type === 'fqyq'" :class="getFillTypeStyle()"> |
|
|
|
<el-radio-group v-model="fqyqValue.mainRadio" :disabled="getDisabled()" @input="onFqyqRadioChange($event,'mainRadio')"> |
|
|
|
<div class="item-center mb-10"> |
|
|
|
<el-radio label="是">是</el-radio> |
|
|
|
<div class="item-center" v-if="fqyqValue.mainRadio === '是'"> |
|
|
|
<el-input class="fqyq-input" maxlength="100" v-model="fqyqValue.inputValue" :disabled="getDisabled()" placeholder="请输入" @blur="onFqyqInputBlur" ></el-input> |
|
|
|
<div class="fs-14 mr-10">是否在规定时间完成</div> |
|
|
|
<el-radio-group v-model="fqyqValue.subRadio" :disabled="getDisabled()" @input="onFqyqRadioChange($event,'subRadio')"> |
|
|
|
<el-radio label="是"></el-radio> |
|
|
|
<el-radio label="否"></el-radio> |
|
|
|
</el-radio-group> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<el-radio label="否">否</el-radio> |
|
|
|
</el-radio-group> |
|
|
|
</div> |
|
|
|
|
|
|
|
</div> |
|
|
|
<div class="handle-row" v-if="isShowHandle()"> |
|
|
|
@ -181,6 +197,8 @@ import moment from "moment"; |
|
|
|
import { deepClone } from "@/utils/index"; |
|
|
|
import { getuuid } from "@/utils/index.js"; |
|
|
|
import { getToken } from "@/utils/auth" |
|
|
|
import { isValueEmpty } from '@/utils/index.js'; |
|
|
|
|
|
|
|
export default { |
|
|
|
inject: ['templateData', 'templateFillType', "getZdxgjl", "getFhyjjl", "updateZdxgjl", "replaceFhyjjl", "updateFhyjjl", "getFieldCheckObj", "updateFieldCheckObj"], |
|
|
|
components: { |
|
|
|
@ -240,24 +258,24 @@ export default { |
|
|
|
let initialValue = this.value; |
|
|
|
let initialOtherValues = {}, checkboxTagList = []; |
|
|
|
|
|
|
|
// 如果是checkboxList类型且value是对象格式 |
|
|
|
if (this.type === 'checkboxList' && this.value && typeof this.value === 'object') { |
|
|
|
initialValue = this.value.checkboxValues || []; |
|
|
|
initialOtherValues = this.value.otherValues || {}; |
|
|
|
} else if (this.type === 'checkboxList' && !Array.isArray(this.value)) { |
|
|
|
initialValue = []; |
|
|
|
if(this.type === 'checkboxList' && !this.value) { |
|
|
|
initialValue = { |
|
|
|
checkboxValues: [], |
|
|
|
otherValues: {} |
|
|
|
}; |
|
|
|
|
|
|
|
} else if (this.type === 'checkboxTag' && Array.isArray(this.value)) { |
|
|
|
// checkboxTag类型,value是数组格式 |
|
|
|
checkboxTagList = this.value.map(tag => ({ |
|
|
|
checked: tag.checked, |
|
|
|
tagValue: tag.tagValue || '' |
|
|
|
})); |
|
|
|
} |
|
|
|
} else if (this.type === 'fqyq' && !this.value) { |
|
|
|
initialValue = {mainRadio: '', subRadio: '',inputValue:""}; |
|
|
|
} |
|
|
|
return { |
|
|
|
inputValue: initialValue, |
|
|
|
oldValue: initialValue, // 记录上一次的值 |
|
|
|
otherValues: initialOtherValues, // 存储checkboxList中otherCode对应的输入值 |
|
|
|
oldOtherValues: { ...initialOtherValues }, // 记录上一次的otherValues |
|
|
|
showModal: false, // 控制模态框显示 |
|
|
|
modificationRecords: [], // 存储修改记录 |
|
|
|
modalTimer: null, // 用于延迟隐藏模态框 |
|
|
|
@ -269,6 +287,10 @@ export default { |
|
|
|
checkboxValue: this.getChecked(),//是否选中 |
|
|
|
checkboxTagList: checkboxTagList, // checkboxTag类型的列表数据 |
|
|
|
oldCheckboxTagList: JSON.parse(JSON.stringify(checkboxTagList)), // 记录上一次的checkboxTagList |
|
|
|
fqyqValue: initialValue, // fqyq类型的值 |
|
|
|
oldFqyqValue: {...initialValue}, // 记录上一次的fqyq值 |
|
|
|
checkboxListValue: initialValue, // checkboxList类型的值 |
|
|
|
oldCheckboxListValue: JSON.parse(JSON.stringify(initialValue)), // 记录上一次的checkboxList值 |
|
|
|
uuid: getuuid(), // 唯一标识符,用于EventBus事件匹配 |
|
|
|
regentType: ['sj', 'gsp', 'mix', 'xj', 'xb', 'gyzj', 'mjy', 'yq', 'jcb', 'qxbd'], //试剂/仪器/供试品等类型 |
|
|
|
selectRegentInfo: {},//选择的试剂/仪器/供试品等信息 |
|
|
|
@ -280,22 +302,32 @@ export default { |
|
|
|
pendingUploadFile: null, // 用于存储待上传的文件 |
|
|
|
pendingRemoveFile: null, // 用于存储待删除的文件 |
|
|
|
currentTagIndex:-1,//当前选中的checkboxTag索引 |
|
|
|
currentHandleType:'',//当前操作的类型 |
|
|
|
currentOtherCode:'',//当前操作的otherCode |
|
|
|
} |
|
|
|
}, |
|
|
|
watch: { |
|
|
|
value(newVal) { |
|
|
|
console.log(newVal, "newVal") |
|
|
|
if (this.type === 'checkboxList' && newVal && typeof newVal === 'object') { |
|
|
|
this.inputValue = newVal.checkboxValues || []; |
|
|
|
this.otherValues = newVal.otherValues || {}; |
|
|
|
this.checkboxListValue = { |
|
|
|
checkboxValues: newVal.checkboxValues || [], |
|
|
|
otherValues: newVal.otherValues || {} |
|
|
|
}; |
|
|
|
} else if (this.type === 'checkboxTag' && Array.isArray(newVal)) { |
|
|
|
// checkboxTag类型,value是数组格式 |
|
|
|
this.checkboxTagList = newVal.map(tag => ({ |
|
|
|
checked: tag.checked, |
|
|
|
tagValue: tag.tagValue || '' |
|
|
|
})); |
|
|
|
} else { |
|
|
|
this.inputValue = this.type === 'checkboxList' && !Array.isArray(newVal) ? [] : newVal; |
|
|
|
} else if (this.type === 'fqyq' && newVal && typeof newVal === 'object') { |
|
|
|
// fqyq类型 |
|
|
|
this.fqyqValue = { |
|
|
|
mainRadio: newVal.mainRadio || '', |
|
|
|
inputValue: newVal.inputValue || '', |
|
|
|
subRadio: newVal.subRadio || '' |
|
|
|
}; |
|
|
|
} else { |
|
|
|
this.inputValue = newVal; |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
@ -331,7 +363,7 @@ export default { |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
getFlexClass() { |
|
|
|
const noFlexArr = ["radio", "checkboxTag"] |
|
|
|
const noFlexArr = ["radio", "checkboxTag","fqyq"] |
|
|
|
return noFlexArr.includes(this.type) ? '' : 'flex1' |
|
|
|
}, |
|
|
|
getDecimalDigits() { |
|
|
|
@ -650,13 +682,14 @@ export default { |
|
|
|
}, |
|
|
|
getFillTypeStyle(type) { |
|
|
|
const { fillType } = this.item; |
|
|
|
const filterType = ["attachment","checkboxTag","fqyq"] |
|
|
|
const typeObj = { |
|
|
|
actFill: "orange-border",//实际填写的边框颜色 |
|
|
|
green: "green-border", |
|
|
|
preFill: "blue-border",//预填写的边框颜色 |
|
|
|
} |
|
|
|
// 如果有错误状态,返回红色边框样式,覆盖原有的边框颜色 |
|
|
|
if (this.error && this.type !== "attachment" && this.type !== "checkboxTag") { |
|
|
|
if (this.error && !filterType.includes(this.type)) { |
|
|
|
return "error-border"; |
|
|
|
} |
|
|
|
return typeObj[fillType] || "" |
|
|
|
@ -771,49 +804,17 @@ export default { |
|
|
|
// 统一处理输入变化 |
|
|
|
onInputChange(val) { |
|
|
|
let value = val !== undefined ? val : this.inputValue; |
|
|
|
// 如果是checkboxList类型,需要同时发送checkboxValues和otherValues |
|
|
|
if (this.type === 'checkboxList') { |
|
|
|
// 检查是否有被取消选中的checkbox |
|
|
|
if (this.oldValue && Array.isArray(this.oldValue)) { |
|
|
|
const uncheckedValues = this.oldValue.filter(oldVal => !this.inputValue.includes(oldVal)); |
|
|
|
|
|
|
|
// 清除被取消选中的checkbox对应的otherValues |
|
|
|
if (uncheckedValues.length > 0) { |
|
|
|
this.item.options.forEach(option => { |
|
|
|
if (uncheckedValues.includes(option.value) && option.otherCode) { |
|
|
|
this.$delete(this.otherValues, option.otherCode); |
|
|
|
} |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
value = { |
|
|
|
checkboxValues: this.inputValue, |
|
|
|
otherValues: this.otherValues |
|
|
|
}; |
|
|
|
if (val) { |
|
|
|
|
|
|
|
this.onCommonHandleSaveRecord(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
this.$emit('input', value); |
|
|
|
this.$emit('change', value); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 根据输入值判断是否显示错误状态 |
|
|
|
const isEmpty = this.isValueEmpty(value); |
|
|
|
const isEmpty = isValueEmpty(value); |
|
|
|
if (this.error && !isEmpty) { |
|
|
|
this.$emit('update:error', false); |
|
|
|
} else if (!this.error && isEmpty) { |
|
|
|
this.$emit('update:error', true); |
|
|
|
} |
|
|
|
}, |
|
|
|
// 处理checkboxList中otherCode对应的输入框变化 |
|
|
|
onOtherInputChange(code, value) { |
|
|
|
this.otherValues[code] = value; |
|
|
|
this.onInputChange(); |
|
|
|
}, |
|
|
|
// checkboxTag的checkbox变化处理 |
|
|
|
onCheckboxTagChange(tagIndex, e) { |
|
|
|
this.currentTagIndex = tagIndex; |
|
|
|
@ -821,6 +822,20 @@ export default { |
|
|
|
this.emitCheckboxTagValue(); |
|
|
|
this.onCommonHandleSaveRecord(); |
|
|
|
}, |
|
|
|
// 检查是否显示显示checkboxList的其他输入框 |
|
|
|
isShowCheckboxListOther(option) { |
|
|
|
const {checkboxValues } = this.checkboxListValue |
|
|
|
if (!checkboxValues) { |
|
|
|
return false; |
|
|
|
} |
|
|
|
return option.otherCode && checkboxValues.includes(option.value); |
|
|
|
}, |
|
|
|
// checkboxList的checkbox变化处理 |
|
|
|
onCheckboxListChange(val) { |
|
|
|
this.currentHandleType = 'checkboxListValue'; |
|
|
|
this.checkboxListValue.checkboxValues = val; |
|
|
|
this.onCommonHandleSaveRecord(); |
|
|
|
}, |
|
|
|
|
|
|
|
// tag输入框失去焦点 |
|
|
|
onTagBlur(tagIndex) { |
|
|
|
@ -842,10 +857,32 @@ export default { |
|
|
|
this.$emit('input', [...this.checkboxTagList]); |
|
|
|
this.$emit('change', [...this.checkboxTagList]); |
|
|
|
}, |
|
|
|
|
|
|
|
// fqyq 主radio变化处理 |
|
|
|
onFqyqRadioChange(val, radioType) { |
|
|
|
this.fqyqValue[radioType] = val; |
|
|
|
this.currentHandleType = radioType; |
|
|
|
this.onCommonHandleSaveRecord(); |
|
|
|
}, |
|
|
|
|
|
|
|
// fqyq 输入框失去焦点 |
|
|
|
onFqyqInputBlur(e) { |
|
|
|
this.fqyqValue.inputValue = e.target.value; |
|
|
|
this.currentHandleType = 'inputValue'; |
|
|
|
this.onCommonHandleSaveRecord(this.fqyqValue.inputValue); |
|
|
|
}, |
|
|
|
|
|
|
|
// 统一处理失去焦点事件 |
|
|
|
onBlur(e) { |
|
|
|
this.onCommonHandleSaveRecord(e.target.value); |
|
|
|
}, |
|
|
|
// checkboxList的其他输入框失去焦点处理 |
|
|
|
onCheckboxListOtherBlur(e, otherCode) { |
|
|
|
this.currentHandleType = "checkboxListOther"; |
|
|
|
this.currentOtherCode = otherCode; |
|
|
|
this.checkboxListValue.otherValues[otherCode] = e.target.value; |
|
|
|
this.onCommonHandleSaveRecord(e.target.value); |
|
|
|
}, |
|
|
|
// 点击question图标 |
|
|
|
onClickQuestion() { |
|
|
|
const { templateFillType } = this; |
|
|
|
@ -874,8 +911,27 @@ export default { |
|
|
|
this.visible = true; |
|
|
|
} |
|
|
|
}, |
|
|
|
getCheckboxListInfo(){ |
|
|
|
const { otherValues,checkboxValues } = this.checkboxListValue; |
|
|
|
const { otherValues: oldOtherValues,checkboxValues: oldCheckboxValues } = this.oldCheckboxListValue; |
|
|
|
const o = { |
|
|
|
"checkboxListValue":{oldValue:oldCheckboxValues,newValue:checkboxValues,des:""}, |
|
|
|
"checkboxListOther":{oldValue:oldOtherValues[this.currentOtherCode],newValue:otherValues[this.currentOtherCode],des:""}, |
|
|
|
} |
|
|
|
return o[this.currentHandleType]; |
|
|
|
}, |
|
|
|
getFqyqInfo(){ |
|
|
|
const { mainRadio,inputValue,subRadio } = this.fqyqValue; |
|
|
|
const { mainRadio: oldMainRadio,inputValue: oldInputValue,subRadio: oldSubRadio } = this.oldFqyqValue; |
|
|
|
const o ={ |
|
|
|
"mainRadio":{oldValue:oldMainRadio,newValue:mainRadio,des:""}, |
|
|
|
"inputValue":{oldValue:oldInputValue,newValue:inputValue,des:""}, |
|
|
|
"subRadio":{oldValue:oldSubRadio,newValue:subRadio,des:"是否在规定时间完成:"} |
|
|
|
} |
|
|
|
return o[this.currentHandleType]; |
|
|
|
}, |
|
|
|
async onCommonHandleSaveRecord(val) { |
|
|
|
const isEmpty = this.isValueEmpty(this.inputValue); |
|
|
|
const isEmpty = isValueEmpty(this.inputValue); |
|
|
|
if (this.error && !isEmpty) { |
|
|
|
this.$emit('update:error', false); |
|
|
|
} else if (!this.error && isEmpty) { |
|
|
|
@ -920,21 +976,27 @@ export default { |
|
|
|
|
|
|
|
// 值发生了变化,需要弹出密码输入框 |
|
|
|
let isSame = true, isOldValueEmpty = true; |
|
|
|
const { currentHandleType } = this; |
|
|
|
// 如果是checkboxList类型,需要同时比较otherValues |
|
|
|
if (this.type === 'checkboxList' && this.otherValues) { |
|
|
|
isSame = this.isEqual(this.oldOtherValues, this.otherValues); |
|
|
|
isOldValueEmpty = this.isValueEmpty(this.oldOtherValues); |
|
|
|
if (this.type === 'checkboxList') { |
|
|
|
const current = this.getCheckboxListInfo(); |
|
|
|
isSame = this.isEqual(current.oldValue,current.newValue); |
|
|
|
isOldValueEmpty = isValueEmpty(current.oldValue); |
|
|
|
} else if (this.type === "checkboxTag") { |
|
|
|
// checkboxTag类型,只比较当前tagIndex的数据 |
|
|
|
const currentTag = this.checkboxTagList[this.currentTagIndex]; |
|
|
|
const oldTag = this.oldCheckboxTagList[this.currentTagIndex] || {}; |
|
|
|
isSame = this.isEqual(oldTag.checked, currentTag.checked); |
|
|
|
isOldValueEmpty = this.isValueEmpty(oldTag.checked); |
|
|
|
|
|
|
|
}else{ |
|
|
|
isOldValueEmpty = isValueEmpty(oldTag.checked); |
|
|
|
} else if (this.type === "fqyq") { |
|
|
|
const current = this.getFqyqInfo(); |
|
|
|
isSame = this.isEqual(current.oldValue,current.newValue); |
|
|
|
isOldValueEmpty = isValueEmpty(current.oldValue); |
|
|
|
} else { |
|
|
|
isSame = this.isEqual(this.oldValue, this.inputValue) |
|
|
|
isOldValueEmpty = this.isValueEmpty(this.oldValue); |
|
|
|
isOldValueEmpty = isValueEmpty(this.oldValue); |
|
|
|
} |
|
|
|
console.log(isSame,isOldValueEmpty,this.fqyqValue,this.oldFqyqValue,"isSame") |
|
|
|
if (isSame) { |
|
|
|
return; |
|
|
|
} |
|
|
|
@ -952,8 +1014,8 @@ export default { |
|
|
|
let oldValue = this.oldValue; |
|
|
|
if (this.type === 'checkboxList') { |
|
|
|
oldValue = { |
|
|
|
checkboxValues: oldValue.checkboxValues || oldValue, |
|
|
|
otherValues: this.oldOtherValues |
|
|
|
checkboxValues: this.oldCheckboxListValue.checkboxValues, |
|
|
|
otherValues: this.oldCheckboxListValue.otherValues |
|
|
|
}; |
|
|
|
} else if (this.type === "checkboxTag") { |
|
|
|
// checkboxTag类型,只回退当前tagIndex的数据 |
|
|
|
@ -966,6 +1028,10 @@ export default { |
|
|
|
this.checkboxTagList = JSON.parse(JSON.stringify(this.oldCheckboxTagList)); |
|
|
|
oldValue = [...this.checkboxTagList]; |
|
|
|
} |
|
|
|
} else if (this.type === "fqyq") { |
|
|
|
// 如果没有指定字段,回退整个对象 |
|
|
|
this.fqyqValue = JSON.parse(JSON.stringify(this.oldFqyqValue)); |
|
|
|
oldValue = { ...this.fqyqValue }; |
|
|
|
} |
|
|
|
this.inputValue = this.oldValue; |
|
|
|
this.$emit('input', oldValue); // 触发 v-model 更新 |
|
|
|
@ -993,8 +1059,17 @@ export default { |
|
|
|
const currentTag = this.checkboxTagList[this.currentTagIndex] || {}; |
|
|
|
recordOldVlaue = `${oldTag.tagValue || ''}:${oldTag.checked ? '勾选' : '未勾选'}`; |
|
|
|
recordValue = `${currentTag.tagValue || ''}:${currentTag.checked ? '勾选' : '未勾选'}`; |
|
|
|
isModify = oldTag.checked !== undefined |
|
|
|
|
|
|
|
isModify = oldTag.checked !== undefined; |
|
|
|
} else if (this.type === "fqyq") { |
|
|
|
const current = this.getFqyqInfo(); |
|
|
|
recordOldVlaue = `${current.des+current.oldValue}`; |
|
|
|
recordValue = `${current.des+current.newValue}`; |
|
|
|
isModify = !!this.oldFqyqValue.mainRadio |
|
|
|
}else if(this.type === "checkboxList"){ |
|
|
|
const current = this.getCheckboxListInfo(); |
|
|
|
recordOldVlaue = `${current.oldValue || ''}`; |
|
|
|
recordValue = `${current.newValue || ''}`; |
|
|
|
isModify = !!current.oldValue; |
|
|
|
} |
|
|
|
const record = { |
|
|
|
...baseInfo, |
|
|
|
@ -1015,8 +1090,7 @@ export default { |
|
|
|
|
|
|
|
// 更新oldValue和oldOtherValues |
|
|
|
if (this.type === 'checkboxList') { |
|
|
|
this.oldValue = [...this.inputValue]; |
|
|
|
this.oldOtherValues = { ...this.otherValues }; |
|
|
|
this.oldCheckboxListValue = JSON.parse(JSON.stringify(this.checkboxListValue)); |
|
|
|
} else if (this.type === "checkboxTag") { |
|
|
|
// checkboxTag类型,只更新当前tagIndex的数据 |
|
|
|
if (this.currentTagIndex >= 0 && this.currentTagIndex < this.checkboxTagList.length) { |
|
|
|
@ -1025,15 +1099,20 @@ export default { |
|
|
|
// 如果没有指定tagIndex,更新整个数组 |
|
|
|
this.oldCheckboxTagList = JSON.parse(JSON.stringify(this.checkboxTagList)); |
|
|
|
} |
|
|
|
} else if (this.type === "fqyq") { |
|
|
|
// 如果没有指定字段,更新整个对象 |
|
|
|
this.oldFqyqValue = JSON.parse(JSON.stringify(this.fqyqValue)); |
|
|
|
} |
|
|
|
let value = this.inputValue; |
|
|
|
if (this.type === 'checkboxList') { |
|
|
|
value = { |
|
|
|
checkboxValues: this.inputValue, |
|
|
|
otherValues: this.otherValues |
|
|
|
checkboxValues: this.checkboxListValue.checkboxValues, |
|
|
|
otherValues: this.checkboxListValue.otherValues |
|
|
|
}; |
|
|
|
} else if (this.type === "checkboxTag") { |
|
|
|
value = [...this.checkboxTagList]; |
|
|
|
} else if (this.type === "fqyq") { |
|
|
|
value = { ...this.fqyqValue }; |
|
|
|
} |
|
|
|
if (this.type === "button") { |
|
|
|
this.$emit('clickButton', this.item, this.inputValue, data); |
|
|
|
@ -1107,6 +1186,9 @@ export default { |
|
|
|
if (Array.isArray(value) && value.length === 0) { |
|
|
|
return true; |
|
|
|
} |
|
|
|
if (Object.keys(value).length === 0) { |
|
|
|
return true; |
|
|
|
} |
|
|
|
return false; |
|
|
|
}, |
|
|
|
// 判断checkboxList中特定otherCode输入框是否有错误 |
|
|
|
@ -1115,7 +1197,7 @@ export default { |
|
|
|
return false; |
|
|
|
} |
|
|
|
// 检查该otherCode对应的输入框是否为空 |
|
|
|
return this.isValueEmpty(this.otherValues[otherCode]); |
|
|
|
return isValueEmpty(this.otherValues[otherCode]); |
|
|
|
}, |
|
|
|
handleClickable(item, event) { |
|
|
|
if (this.templateFillType !== 'actFill') { |
|
|
|
@ -1168,7 +1250,7 @@ export default { |
|
|
|
if (this.getDisabled()) { |
|
|
|
return "" |
|
|
|
} |
|
|
|
if (this.regentType.includes(type) || type === "clickable") { |
|
|
|
if (this.regentType.includes(type) || type === "clickable" || type === "fqyq") { |
|
|
|
return this.$t("template.common.pleaseSelect") |
|
|
|
} |
|
|
|
let prex = "template.common.pleaseFillIn" |
|
|
|
@ -1677,6 +1759,9 @@ export default { |
|
|
|
border-color: #f9c588; |
|
|
|
} |
|
|
|
} |
|
|
|
.el-radio__inner { |
|
|
|
border-color: #f9c588; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
@ -1731,4 +1816,17 @@ export default { |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
.fqyq-input{ |
|
|
|
width: 500px; |
|
|
|
margin-right:10px; |
|
|
|
} |
|
|
|
.mb-10{ |
|
|
|
margin-bottom: 10px; |
|
|
|
} |
|
|
|
.fs-14{ |
|
|
|
font-size: 14px; |
|
|
|
} |
|
|
|
.mr-10{ |
|
|
|
margin-right: 10px; |
|
|
|
} |
|
|
|
</style> |