|
|
@ -22,24 +22,20 @@ |
|
|
</el-select> |
|
|
</el-select> |
|
|
<el-checkbox v-else-if="type === 'checkbox'" class="flex1" :multiple="item.multiple" |
|
|
<el-checkbox v-else-if="type === 'checkbox'" class="flex1" :multiple="item.multiple" |
|
|
:class="getFillTypeStyle() + (orangeBg ? ' orange-bg' : '')" v-model="inputValue" |
|
|
:class="getFillTypeStyle() + (orangeBg ? ' orange-bg' : '')" v-model="inputValue" |
|
|
:disabled="getDisabled()" :placeholder="getPlaceholder()" |
|
|
|
|
|
@change="onItemCheckboxChange"> |
|
|
|
|
|
|
|
|
:disabled="getDisabled()" :placeholder="getPlaceholder()" @change="onItemCheckboxChange"> |
|
|
</el-checkbox> |
|
|
</el-checkbox> |
|
|
<el-date-picker v-else-if="type === 'dateTime'" type="datetime" class="flex1" |
|
|
<el-date-picker v-else-if="type === 'dateTime'" type="datetime" class="flex1" |
|
|
:class="getFillTypeStyle() + (orangeBg ? ' orange-bg' : '')" v-model="inputValue" |
|
|
:class="getFillTypeStyle() + (orangeBg ? ' orange-bg' : '')" v-model="inputValue" |
|
|
:disabled="getDisabled()" format="yyyy/MM/dd HH:mm:ss" |
|
|
|
|
|
:placeholder="getPlaceholder()" @change="(val)=>onDateChange(val,'yyyy/MM/DD HH:mm:ss')"> |
|
|
|
|
|
|
|
|
:disabled="getDisabled()" format="yyyy/MM/dd HH:mm:ss" :placeholder="getPlaceholder()" |
|
|
|
|
|
@change="(val) => onDateChange(val, 'yyyy/MM/DD HH:mm:ss')"> |
|
|
</el-date-picker> |
|
|
</el-date-picker> |
|
|
<el-date-picker v-else-if="type === 'datePicker'" class="flex1" |
|
|
|
|
|
|
|
|
<el-date-picker v-else-if="type === 'datePicker'" class="flex1" |
|
|
:class="getFillTypeStyle() + (orangeBg ? ' orange-bg' : '')" v-model="inputValue" |
|
|
:class="getFillTypeStyle() + (orangeBg ? ' orange-bg' : '')" v-model="inputValue" |
|
|
:disabled="getDisabled()" format="yyyy/MM/dd" |
|
|
|
|
|
:placeholder="getPlaceholder()" @change="(val)=>onDateChange(val,'yyyy/MM/DD')"> |
|
|
|
|
|
|
|
|
:disabled="getDisabled()" format="yyyy/MM/dd" :placeholder="getPlaceholder()" |
|
|
|
|
|
@change="(val) => onDateChange(val, 'yyyy/MM/DD')"> |
|
|
</el-date-picker> |
|
|
</el-date-picker> |
|
|
<el-button v-else-if="type === 'button'" |
|
|
|
|
|
:class="getFillTypeStyle() + (orangeBg ? ' orange-bg' : '')" |
|
|
|
|
|
:disabled="getDisabled()" |
|
|
|
|
|
type="primary" |
|
|
|
|
|
@click="handleClickButton(item)"> |
|
|
|
|
|
|
|
|
<el-button v-else-if="type === 'button'" :class="getFillTypeStyle() + (orangeBg ? ' orange-bg' : '')" |
|
|
|
|
|
:disabled="getDisabled()" type="primary" @click="handleClickButton(item)"> |
|
|
{{ item.buttonName }} |
|
|
{{ item.buttonName }} |
|
|
</el-button> |
|
|
</el-button> |
|
|
|
|
|
|
|
|
@ -49,10 +45,17 @@ |
|
|
<span v-if="inputValue">{{ inputValue }}</span> |
|
|
<span v-if="inputValue">{{ inputValue }}</span> |
|
|
<span v-else class="default-placeholder-text">{{ getPlaceholder() }}</span> |
|
|
<span v-else class="default-placeholder-text">{{ getPlaceholder() }}</span> |
|
|
</div> |
|
|
</div> |
|
|
|
|
|
<div class="clickable" |
|
|
|
|
|
:class="getFillTypeStyle() + (getDisabled() ? ' disabled' : '') + (orangeBg ? ' orange-bg' : '')" |
|
|
|
|
|
v-else-if="regentType.includes(item.type)" |
|
|
|
|
|
@click="onCommonHandleRegent(item, item.type)"> |
|
|
|
|
|
<span v-if="inputValue">{{ inputValue }}</span> |
|
|
|
|
|
<span v-else class="default-placeholder-text">{{ getPlaceholder() }}</span> |
|
|
|
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
<div class="handle-row" v-if="isShowHandle()"> |
|
|
<div class="handle-row" v-if="isShowHandle()"> |
|
|
<el-checkbox v-model="checkboxValue" v-if="getIsShowCheckboxIcon()" :disabled="getCheckboxDisabled()" class="mr-5" |
|
|
|
|
|
@change="onCheckboxChange"></el-checkbox> |
|
|
|
|
|
|
|
|
<el-checkbox v-model="checkboxValue" v-if="getIsShowCheckboxIcon()" :disabled="getCheckboxDisabled()" |
|
|
|
|
|
class="mr-5" @change="onCheckboxChange"></el-checkbox> |
|
|
<div class="handle-icon" v-if="getIsShowQuestionIcon()" @click="onClickQuestion" |
|
|
<div class="handle-icon" v-if="getIsShowQuestionIcon()" @click="onClickQuestion" |
|
|
@mouseenter="(e) => onMouseEnter('replyRecord', e)" @mouseleave="onMouseLeave"> |
|
|
@mouseenter="(e) => onMouseEnter('replyRecord', e)" @mouseleave="onMouseLeave"> |
|
|
<Question :class="getQuestionColor()" /> |
|
|
<Question :class="getQuestionColor()" /> |
|
|
@ -76,9 +79,9 @@ |
|
|
<span>{{ index + 1 }}.</span> |
|
|
<span>{{ index + 1 }}.</span> |
|
|
<span> {{ getUserName(record) }} </span> |
|
|
<span> {{ getUserName(record) }} </span> |
|
|
<span>{{ record.time }} </span> |
|
|
<span>{{ record.time }} </span> |
|
|
<span>{{ modificationRecords.length-1==index?"提交":"修改" }}</span> |
|
|
|
|
|
|
|
|
<span>{{ modificationRecords.length - 1 == index ? "提交" : "修改" }}</span> |
|
|
</div> |
|
|
</div> |
|
|
<div v-if = "modificationRecords.length-1!==index"> |
|
|
|
|
|
|
|
|
<div v-if="modificationRecords.length - 1 !== index"> |
|
|
<div>原值:{{ record.oldValue }}</div> |
|
|
<div>原值:{{ record.oldValue }}</div> |
|
|
<div>修改值:{{ record.value }}</div> |
|
|
<div>修改值:{{ record.value }}</div> |
|
|
<div v-if="record.reason">备注:{{ record.reason }}</div> |
|
|
<div v-if="record.reason">备注:{{ record.reason }}</div> |
|
|
@ -100,8 +103,8 @@ |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
<el-dialog :close-on-click-modal = "false" append-to-body :title="templateFillType == 'actFill' ? '回复意见' : '复核意见'" :visible.sync="visible" |
|
|
|
|
|
width="30%"> |
|
|
|
|
|
|
|
|
<el-dialog :close-on-click-modal="false" append-to-body :title="templateFillType == 'actFill' ? '回复意见' : '复核意见'" |
|
|
|
|
|
:visible.sync="visible" width="30%"> |
|
|
<el-input v-model="replyContent" type="textarea" show-word-limit resize="none" rows="8" placeholder="输入内容" |
|
|
<el-input v-model="replyContent" type="textarea" show-word-limit resize="none" rows="8" placeholder="输入内容" |
|
|
maxlength="500" /> |
|
|
maxlength="500" /> |
|
|
<span slot="footer" class="dialog-footer"> |
|
|
<span slot="footer" class="dialog-footer"> |
|
|
@ -120,7 +123,7 @@ import moment from "moment"; |
|
|
import { deepClone } from "@/utils/index"; |
|
|
import { deepClone } from "@/utils/index"; |
|
|
import { getuuid } from "@/utils/index.js"; |
|
|
import { getuuid } from "@/utils/index.js"; |
|
|
export default { |
|
|
export default { |
|
|
inject: ['templateFillType', "getZdxgjl", "getFhyjjl", "updateZdxgjl", "replaceFhyjjl", "updateFhyjjl", "getFieldCheckObj", "updateFieldCheckObj"], |
|
|
|
|
|
|
|
|
inject: ['templateData', 'templateFillType', "getZdxgjl", "getFhyjjl", "updateZdxgjl", "replaceFhyjjl", "updateFhyjjl", "getFieldCheckObj", "updateFieldCheckObj"], |
|
|
components: { |
|
|
components: { |
|
|
Question, |
|
|
Question, |
|
|
DecimalInput, |
|
|
DecimalInput, |
|
|
@ -143,7 +146,7 @@ export default { |
|
|
}, |
|
|
}, |
|
|
// v-model 值 |
|
|
// v-model 值 |
|
|
value: { |
|
|
value: { |
|
|
type: [String, Number, Array,Boolean], |
|
|
|
|
|
|
|
|
type: [String, Number, Array, Boolean], |
|
|
default: '' |
|
|
default: '' |
|
|
}, |
|
|
}, |
|
|
// 错误状态 |
|
|
// 错误状态 |
|
|
@ -168,7 +171,11 @@ export default { |
|
|
isFieldsRecord: { |
|
|
isFieldsRecord: { |
|
|
type: Boolean, |
|
|
type: Boolean, |
|
|
default: true, |
|
|
default: true, |
|
|
} |
|
|
|
|
|
|
|
|
}, |
|
|
|
|
|
sourceFrom: { |
|
|
|
|
|
type: String, |
|
|
|
|
|
default: "" |
|
|
|
|
|
}, |
|
|
}, |
|
|
}, |
|
|
data() { |
|
|
data() { |
|
|
return { |
|
|
return { |
|
|
@ -184,6 +191,8 @@ export default { |
|
|
visible: false,//是否显示弹窗 |
|
|
visible: false,//是否显示弹窗 |
|
|
checkboxValue: this.getChecked(),//是否选中 |
|
|
checkboxValue: this.getChecked(),//是否选中 |
|
|
uuid: getuuid(), // 唯一标识符,用于EventBus事件匹配 |
|
|
uuid: getuuid(), // 唯一标识符,用于EventBus事件匹配 |
|
|
|
|
|
regentType:['sj','gsp','mix','xj','xb','gyzj','mjy','yq'], //试剂/仪器/供试品等类型 |
|
|
|
|
|
selectRegentInfo:{},//选择的试剂/仪器/供试品等信息 |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
watch: { |
|
|
watch: { |
|
|
@ -205,25 +214,67 @@ export default { |
|
|
EventBus.$on('onExternalFieldUpdate', this.handleExternalFieldUpdate); |
|
|
EventBus.$on('onExternalFieldUpdate', this.handleExternalFieldUpdate); |
|
|
EventBus.$on('onEditSignCancel', this.handleEditSignCancel); |
|
|
EventBus.$on('onEditSignCancel', this.handleEditSignCancel); |
|
|
EventBus.$on('onEditSignCallback', this.handleEditSignCallback); |
|
|
EventBus.$on('onEditSignCallback', this.handleEditSignCallback); |
|
|
|
|
|
//试剂 |
|
|
|
|
|
EventBus.$on("onReagentSubmit", this.onReagentSubmit) |
|
|
|
|
|
//仪器 |
|
|
|
|
|
EventBus.$on("onInstrumentSubmit", this.onInstrumentSubmit) |
|
|
|
|
|
//供试品/试剂/给药制剂等 |
|
|
|
|
|
EventBus.$on("onMixReagentSubmit", this.onMixReagentSubmit) |
|
|
}, |
|
|
}, |
|
|
unmounted() { |
|
|
unmounted() { |
|
|
EventBus.$off('onExternalFieldUpdate', this.handleExternalFieldUpdate); |
|
|
EventBus.$off('onExternalFieldUpdate', this.handleExternalFieldUpdate); |
|
|
EventBus.$off('onEditSignCancel', this.handleEditSignCancel); |
|
|
EventBus.$off('onEditSignCancel', this.handleEditSignCancel); |
|
|
EventBus.$off('onEditSignCallback', this.handleEditSignCallback); |
|
|
EventBus.$off('onEditSignCallback', this.handleEditSignCallback); |
|
|
|
|
|
EventBus.$off("onReagentSubmit", this.onReagentSubmit) |
|
|
|
|
|
EventBus.$off("onInstrumentSubmit", this.onInstrumentSubmit) |
|
|
|
|
|
EventBus.$off("onMixReagentSubmit", this.onMixReagentSubmit) |
|
|
}, |
|
|
}, |
|
|
methods: { |
|
|
methods: { |
|
|
|
|
|
//试剂弹窗提交 |
|
|
|
|
|
onMixReagentSubmit(data){ |
|
|
|
|
|
if(data.uuid !== this.uuid) return; |
|
|
|
|
|
this.inputValue = data.selectedId; |
|
|
|
|
|
this.selectRegentInfo = data; |
|
|
|
|
|
this.onCommonHandleSaveRecord(); |
|
|
|
|
|
// this.inputValue = this.item.label; |
|
|
|
|
|
}, |
|
|
|
|
|
//统一处理试剂/供试品等弹窗 |
|
|
|
|
|
onCommonHandleRegent(item, type) { |
|
|
|
|
|
let params = { |
|
|
|
|
|
studyFormId:this.templateData.id, |
|
|
|
|
|
uuid:this.uuid, |
|
|
|
|
|
sourceFrom:this.sourceFrom, |
|
|
|
|
|
} |
|
|
|
|
|
if (type !== "yq") { |
|
|
|
|
|
const sjType = { |
|
|
|
|
|
sj: "1",//试剂 |
|
|
|
|
|
gsp: "7",//供试品 |
|
|
|
|
|
mix: "1",//试剂/供试品/试剂 |
|
|
|
|
|
gyzj: "3",//给药制剂 |
|
|
|
|
|
mjy: "5",//麻精药 |
|
|
|
|
|
xj: "9",//细菌 |
|
|
|
|
|
xb: "11",//细胞 |
|
|
|
|
|
} |
|
|
|
|
|
params = { |
|
|
|
|
|
...params, |
|
|
|
|
|
type: sjType[type] |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
EventBus.$emit("showSelectMixReagentDialog", params) |
|
|
|
|
|
// this.$emit('regent', item,type); |
|
|
|
|
|
}, |
|
|
// 点击按钮 |
|
|
// 点击按钮 |
|
|
handleClickButton(item){ |
|
|
|
|
|
|
|
|
handleClickButton(item) { |
|
|
this.$emit('clickButton', item); |
|
|
this.$emit('clickButton', item); |
|
|
}, |
|
|
}, |
|
|
onDateChange(val,format){ |
|
|
|
|
|
|
|
|
onDateChange(val, format) { |
|
|
this.inputValue = moment(val).format(format); |
|
|
this.inputValue = moment(val).format(format); |
|
|
console.log(this.inputValue,"inputValue") |
|
|
|
|
|
|
|
|
console.log(this.inputValue, "inputValue") |
|
|
this.onCommonHandleSaveRecord(this.inputValue); |
|
|
this.onCommonHandleSaveRecord(this.inputValue); |
|
|
}, |
|
|
}, |
|
|
getUserName(record){ |
|
|
|
|
|
|
|
|
getUserName(record) { |
|
|
const locale = this.$i18n.locale; |
|
|
const locale = this.$i18n.locale; |
|
|
if(locale === 'zh_CN'){ |
|
|
|
|
|
|
|
|
if (locale === 'zh_CN') { |
|
|
return record.userNameCn; |
|
|
return record.userNameCn; |
|
|
} |
|
|
} |
|
|
return record.userNameEn; |
|
|
return record.userNameEn; |
|
|
@ -336,13 +387,13 @@ export default { |
|
|
// 复选框变化处理 |
|
|
// 复选框变化处理 |
|
|
onCheckboxChange(val) { |
|
|
onCheckboxChange(val) { |
|
|
//有提出意见就不能勾选 |
|
|
//有提出意见就不能勾选 |
|
|
if (this.templateFillType == 'qc' && this.getQuestionColor()=== "orange") { |
|
|
|
|
|
|
|
|
if (this.templateFillType == 'qc' && this.getQuestionColor() === "orange") { |
|
|
this.checkboxValue = false; |
|
|
this.checkboxValue = false; |
|
|
this.$message({ |
|
|
this.$message({ |
|
|
message: '该表单还有质疑项未处理,无法勾选', |
|
|
message: '该表单还有质疑项未处理,无法勾选', |
|
|
type: 'error' |
|
|
type: 'error' |
|
|
}); |
|
|
}); |
|
|
return ; |
|
|
|
|
|
|
|
|
return; |
|
|
} |
|
|
} |
|
|
this.checkboxValue = val; |
|
|
this.checkboxValue = val; |
|
|
// 触发修改记录事件 |
|
|
// 触发修改记录事件 |
|
|
@ -357,8 +408,8 @@ export default { |
|
|
onRemoveTag(e) { |
|
|
onRemoveTag(e) { |
|
|
this.onCommonHandleSaveRecord(this.inputValue); |
|
|
this.onCommonHandleSaveRecord(this.inputValue); |
|
|
}, |
|
|
}, |
|
|
onItemCheckboxChange(){ |
|
|
|
|
|
this.onCommonHandleSaveRecord(this.inputValue); |
|
|
|
|
|
|
|
|
onItemCheckboxChange() { |
|
|
|
|
|
this.onCommonHandleSaveRecord(this.inputValue); |
|
|
}, |
|
|
}, |
|
|
// 下拉框失去焦点处理 |
|
|
// 下拉框失去焦点处理 |
|
|
onSelectBlur(visible) { |
|
|
onSelectBlur(visible) { |
|
|
@ -419,7 +470,7 @@ export default { |
|
|
} else if (!this.error && isEmpty) { |
|
|
} else if (!this.error && isEmpty) { |
|
|
this.$emit('update:error', true); |
|
|
this.$emit('update:error', true); |
|
|
} |
|
|
} |
|
|
if(!this.isFieldsRecord){//是否需要记录修改记录 |
|
|
|
|
|
|
|
|
if (!this.isFieldsRecord) {//是否需要记录修改记录 |
|
|
this.$emit("blur", this.inputValue); |
|
|
this.$emit("blur", this.inputValue); |
|
|
this.$emit('input', this.inputValue); |
|
|
this.$emit('input', this.inputValue); |
|
|
this.$emit("change", this.inputValue); |
|
|
this.$emit("change", this.inputValue); |
|
|
@ -427,13 +478,13 @@ export default { |
|
|
} |
|
|
} |
|
|
// 值发生了变化,需要弹出密码输入框 |
|
|
// 值发生了变化,需要弹出密码输入框 |
|
|
const isSame = this.isEqual(this.oldValue, this.inputValue); |
|
|
const isSame = this.isEqual(this.oldValue, this.inputValue); |
|
|
if(isSame){ |
|
|
|
|
|
|
|
|
if (isSame) { |
|
|
return; |
|
|
return; |
|
|
} |
|
|
} |
|
|
if (!this.isValueEmpty(this.oldValue) && !isSame && this.templateFillType === "actFill") { |
|
|
if (!this.isValueEmpty(this.oldValue) && !isSame && this.templateFillType === "actFill") { |
|
|
// 通过EventBus触发电子签名弹窗 |
|
|
// 通过EventBus触发电子签名弹窗 |
|
|
EventBus.$emit('showEditSignDialog', { uuid: this.uuid }); |
|
|
EventBus.$emit('showEditSignDialog', { uuid: this.uuid }); |
|
|
}else{//如果是第一次填写,不需要密码验证 |
|
|
|
|
|
|
|
|
} else {//如果是第一次填写,不需要密码验证 |
|
|
this.handleUpdateRecord() |
|
|
this.handleUpdateRecord() |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
@ -444,8 +495,8 @@ export default { |
|
|
this.inputValue = this.oldValue; |
|
|
this.inputValue = this.oldValue; |
|
|
this.$emit('input', this.inputValue); // 触发 v-model 更新 |
|
|
this.$emit('input', this.inputValue); // 触发 v-model 更新 |
|
|
// this.$emit("blur", this.oldValue); |
|
|
// this.$emit("blur", this.oldValue); |
|
|
this.$emit("change", this.oldValue,"cancel"); |
|
|
|
|
|
if(this.item.type === "clickable"){ |
|
|
|
|
|
|
|
|
this.$emit("change", this.oldValue, "cancel"); |
|
|
|
|
|
if (this.item.type === "clickable") { |
|
|
this.$emit("resetRecord"); |
|
|
this.$emit("resetRecord"); |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
@ -453,7 +504,7 @@ export default { |
|
|
//处理更新记录 |
|
|
//处理更新记录 |
|
|
handleUpdateRecord(data) { |
|
|
handleUpdateRecord(data) { |
|
|
const baseInfo = this.getCommonRecordInfo(); |
|
|
const baseInfo = this.getCommonRecordInfo(); |
|
|
if(!this.oldValue && !this.inputValue) return; |
|
|
|
|
|
|
|
|
if (!this.oldValue && !this.inputValue) return; |
|
|
const record = { |
|
|
const record = { |
|
|
...baseInfo, |
|
|
...baseInfo, |
|
|
oldValue: this.oldValue, |
|
|
oldValue: this.oldValue, |
|
|
@ -464,7 +515,7 @@ export default { |
|
|
if (data) { |
|
|
if (data) { |
|
|
record.reason = data.remark |
|
|
record.reason = data.remark |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const params = { |
|
|
const params = { |
|
|
type: "fieldChanged", |
|
|
type: "fieldChanged", |
|
|
newRecord: [record], |
|
|
newRecord: [record], |
|
|
@ -474,15 +525,19 @@ export default { |
|
|
this.oldValue = this.inputValue; // 更新旧值 |
|
|
this.oldValue = this.inputValue; // 更新旧值 |
|
|
this.$emit("blur", this.inputValue); |
|
|
this.$emit("blur", this.inputValue); |
|
|
this.$emit('input', this.inputValue); |
|
|
this.$emit('input', this.inputValue); |
|
|
this.$emit("change", this.inputValue,data?"save":""); |
|
|
|
|
|
if(this.item.type === "clickable"){//clickable的丢给父级去处理 |
|
|
|
|
|
|
|
|
this.$emit("change", this.inputValue, data ? "save" : ""); |
|
|
|
|
|
if (this.item.type === "clickable") {//clickable的丢给父级去处理 |
|
|
return; |
|
|
return; |
|
|
} |
|
|
} |
|
|
if(this.templateFillType === "actFill"){//只有实际填报的时候才记录修改记录 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (this.templateFillType === "actFill") {//只有实际填报的时候才记录修改记录 |
|
|
this.updateZdxgjl(record); |
|
|
this.updateZdxgjl(record); |
|
|
} |
|
|
} |
|
|
setTimeout(() => { |
|
|
setTimeout(() => { |
|
|
EventBus.$emit('onModifyRecord', params,) |
|
|
EventBus.$emit('onModifyRecord', params,) |
|
|
|
|
|
if(this.regentType.includes(this.item.type)){ |
|
|
|
|
|
this.$emit("onRegentSubmit", this.selectRegentInfo); |
|
|
|
|
|
} |
|
|
}, 10); |
|
|
}, 10); |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
@ -502,20 +557,20 @@ export default { |
|
|
const { nickName, name } = this.$store.getters; |
|
|
const { nickName, name } = this.$store.getters; |
|
|
//locale:zh-CN 中文 en-US 英文 |
|
|
//locale:zh-CN 中文 en-US 英文 |
|
|
const { label, parentLabel } = this.item; |
|
|
const { label, parentLabel } = this.item; |
|
|
let fieldLabelCn = this.$i18n.t(label,"zh_CN"),fieldLabelEn = this.$i18n.t(label,"en_US"); |
|
|
|
|
|
|
|
|
let fieldLabelCn = this.$i18n.t(label, "zh_CN"), fieldLabelEn = this.$i18n.t(label, "en_US"); |
|
|
if (label === "template.common.other") { |
|
|
if (label === "template.common.other") { |
|
|
fieldLabelCn = this.$i18n.t(parentLabel,"zh_CN")+this.$i18n.t("template.common.otherInfo","zh_CN"); |
|
|
|
|
|
fieldLabelEn = this.$i18n.t(parentLabel,"en_US")+this.$i18n.t("template.common.otherInfo","en_US"); |
|
|
|
|
|
|
|
|
fieldLabelCn = this.$i18n.t(parentLabel, "zh_CN") + this.$i18n.t("template.common.otherInfo", "zh_CN"); |
|
|
|
|
|
fieldLabelEn = this.$i18n.t(parentLabel, "en_US") + this.$i18n.t("template.common.otherInfo", "en_US"); |
|
|
} else if (!label && parentLabel == "template.common.remark") { |
|
|
} else if (!label && parentLabel == "template.common.remark") { |
|
|
fieldLabelCn = this.$i18n.t(parentLabel,"zh_CN")+this.$i18n.t("template.common.unit","zh_CN"); |
|
|
|
|
|
fieldLabelEn = this.$i18n.t(parentLabel,"en_US")+this.$i18n.t("template.common.unit","en_US"); |
|
|
|
|
|
|
|
|
fieldLabelCn = this.$i18n.t(parentLabel, "zh_CN") + this.$i18n.t("template.common.unit", "zh_CN"); |
|
|
|
|
|
fieldLabelEn = this.$i18n.t(parentLabel, "en_US") + this.$i18n.t("template.common.unit", "en_US"); |
|
|
} |
|
|
} |
|
|
const commonInfo = { |
|
|
const commonInfo = { |
|
|
userNameCn: nickName, |
|
|
userNameCn: nickName, |
|
|
userNameEn: name, |
|
|
userNameEn: name, |
|
|
key: this.fieldKey, |
|
|
key: this.fieldKey, |
|
|
fieldCn: `${this.$i18n.t(this.fieldItemLabel,"zh_CN")}`+(fieldLabelCn?("-"+fieldLabelCn):""), |
|
|
|
|
|
fieldEn: `${this.$i18n.t(this.fieldItemLabel,"en_US")}`+(fieldLabelEn?("-"+fieldLabelEn):""), |
|
|
|
|
|
|
|
|
fieldCn: `${this.$i18n.t(this.fieldItemLabel, "zh_CN")}` + (fieldLabelCn ? ("-" + fieldLabelCn) : ""), |
|
|
|
|
|
fieldEn: `${this.$i18n.t(this.fieldItemLabel, "en_US")}` + (fieldLabelEn ? ("-" + fieldLabelEn) : ""), |
|
|
} |
|
|
} |
|
|
return commonInfo; |
|
|
return commonInfo; |
|
|
}, |
|
|
}, |
|
|
@ -540,13 +595,13 @@ export default { |
|
|
this.$emit("clickable", item) |
|
|
this.$emit("clickable", item) |
|
|
}, |
|
|
}, |
|
|
//判断是否禁用复选框 |
|
|
//判断是否禁用复选框 |
|
|
getCheckboxDisabled(){ |
|
|
|
|
|
|
|
|
getCheckboxDisabled() { |
|
|
//只有qc能操作checkbox,其他都只能看。 |
|
|
//只有qc能操作checkbox,其他都只能看。 |
|
|
return this.templateFillType !== 'qc' |
|
|
return this.templateFillType !== 'qc' |
|
|
}, |
|
|
}, |
|
|
//判断是否显示复选框图标 |
|
|
//判断是否显示复选框图标 |
|
|
getIsShowCheckboxIcon() { |
|
|
getIsShowCheckboxIcon() { |
|
|
if(this.templateFillType === 'qc'){ |
|
|
|
|
|
|
|
|
if (this.templateFillType === 'qc') { |
|
|
return true; |
|
|
return true; |
|
|
} |
|
|
} |
|
|
return this.getChecked(); |
|
|
return this.getChecked(); |
|
|
@ -584,7 +639,7 @@ export default { |
|
|
if (this.getDisabled()) { |
|
|
if (this.getDisabled()) { |
|
|
return "" |
|
|
return "" |
|
|
} |
|
|
} |
|
|
if (type === "clickable") { |
|
|
|
|
|
|
|
|
if (this.regentType.includes(type) || type === "clickable") { |
|
|
return this.$t("template.common.pleaseSelect") |
|
|
return this.$t("template.common.pleaseSelect") |
|
|
} |
|
|
} |
|
|
let prex = "template.common.pleaseFillIn" |
|
|
let prex = "template.common.pleaseFillIn" |
|
|
@ -777,44 +832,53 @@ export default { |
|
|
border-color: #f9c588 !important; |
|
|
border-color: #f9c588 !important; |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
.el-checkbox__inner{ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.el-checkbox__inner { |
|
|
border-color: #f9c588 !important; |
|
|
border-color: #f9c588 !important; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
.el-button--primary{ |
|
|
|
|
|
&.orange-border{ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.el-button--primary { |
|
|
|
|
|
&.orange-border { |
|
|
background-color: #f79b31 !important; |
|
|
background-color: #f79b31 !important; |
|
|
border-color: #f79b31 !important; |
|
|
border-color: #f79b31 !important; |
|
|
|
|
|
|
|
|
&:hover { |
|
|
&:hover { |
|
|
background-color: #f79b31 !important; |
|
|
background-color: #f79b31 !important; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
&:disabled { |
|
|
&:disabled { |
|
|
background-color: rgba(#f79b31,.8) !important; |
|
|
|
|
|
border-color: rgba(#f79b31,.8) !important; |
|
|
|
|
|
|
|
|
background-color: rgba(#f79b31, .8) !important; |
|
|
|
|
|
border-color: rgba(#f79b31, .8) !important; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
&:active { |
|
|
&:active { |
|
|
background-color: rgba(#f79b31,.8) !important; |
|
|
|
|
|
border-color: rgba(#f79b31,.8) !important; |
|
|
|
|
|
|
|
|
background-color: rgba(#f79b31, .8) !important; |
|
|
|
|
|
border-color: rgba(#f79b31, .8) !important; |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
&.blue-border { |
|
|
&.blue-border { |
|
|
background-color: #4ea2ff !important; |
|
|
background-color: #4ea2ff !important; |
|
|
border-color: #4ea2ff !important; |
|
|
border-color: #4ea2ff !important; |
|
|
|
|
|
|
|
|
&:hover { |
|
|
&:hover { |
|
|
background-color: #4ea2ff !important; |
|
|
background-color: #4ea2ff !important; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
&:disabled { |
|
|
&:disabled { |
|
|
background-color: rgba(#4ea2ff,.8) !important; |
|
|
|
|
|
border-color: rgba(#4ea2ff,.8) !important; |
|
|
|
|
|
|
|
|
background-color: rgba(#4ea2ff, .8) !important; |
|
|
|
|
|
border-color: rgba(#4ea2ff, .8) !important; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
&:active { |
|
|
&:active { |
|
|
background-color: rgba(#4ea2ff,.8) !important; |
|
|
|
|
|
border-color: rgba(#4ea2ff,.8) !important; |
|
|
|
|
|
|
|
|
background-color: rgba(#4ea2ff, .8) !important; |
|
|
|
|
|
border-color: rgba(#4ea2ff, .8) !important; |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
.green-border { |
|
|
.green-border { |
|
|
@ -871,16 +935,16 @@ export default { |
|
|
.clickable, |
|
|
.clickable, |
|
|
.el-date-editor { |
|
|
.el-date-editor { |
|
|
border-color: #ff5d5d; |
|
|
border-color: #ff5d5d; |
|
|
box-shadow: 0 0 6px #ffc3c3!important; |
|
|
|
|
|
|
|
|
box-shadow: 0 0 6px #ffc3c3 !important; |
|
|
|
|
|
|
|
|
&:focus { |
|
|
&:focus { |
|
|
border-color: #ff5d5d; |
|
|
border-color: #ff5d5d; |
|
|
box-shadow: 0 0 6px #ffc3c3!important; |
|
|
|
|
|
|
|
|
box-shadow: 0 0 6px #ffc3c3 !important; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
&:hover { |
|
|
&:hover { |
|
|
border-color: #ff5d5d; |
|
|
border-color: #ff5d5d; |
|
|
box-shadow: 0 0 6px #ffc3c3!important; |
|
|
|
|
|
|
|
|
box-shadow: 0 0 6px #ffc3c3 !important; |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@ -888,21 +952,21 @@ export default { |
|
|
.el-select .el-input__inner, |
|
|
.el-select .el-input__inner, |
|
|
.el-date-editor .el-input__inner .el-checkbox__inner { |
|
|
.el-date-editor .el-input__inner .el-checkbox__inner { |
|
|
border-color: #ff5d5d; |
|
|
border-color: #ff5d5d; |
|
|
box-shadow: 0 0 6px #ffc3c3!important; |
|
|
|
|
|
|
|
|
box-shadow: 0 0 6px #ffc3c3 !important; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
// 处理 DecimalInput 组件的错误边框样式 |
|
|
// 处理 DecimalInput 组件的错误边框样式 |
|
|
:deep(.el-input-number) { |
|
|
:deep(.el-input-number) { |
|
|
.el-input__inner { |
|
|
.el-input__inner { |
|
|
border-color: #ff5d5d; |
|
|
border-color: #ff5d5d; |
|
|
box-shadow: 0 0 6px #ffc3c3!important; |
|
|
|
|
|
|
|
|
box-shadow: 0 0 6px #ffc3c3 !important; |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
// 为点击式表单项添加错误边框样式 |
|
|
// 为点击式表单项添加错误边框样式 |
|
|
.clickable { |
|
|
.clickable { |
|
|
border-color: #ff5d5d; |
|
|
border-color: #ff5d5d; |
|
|
box-shadow: 0 0 6px #ffc3c3!important; |
|
|
|
|
|
|
|
|
box-shadow: 0 0 6px #ffc3c3 !important; |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@ -976,7 +1040,7 @@ export default { |
|
|
cursor: pointer; |
|
|
cursor: pointer; |
|
|
width: auto; |
|
|
width: auto; |
|
|
// margin-left: 10px; |
|
|
// margin-left: 10px; |
|
|
min-height: 28px; |
|
|
|
|
|
|
|
|
min-height: 28px; |
|
|
line-height: 28px; |
|
|
line-height: 28px; |
|
|
word-break: break-all; |
|
|
word-break: break-all; |
|
|
border-radius: 4px; |
|
|
border-radius: 4px; |
|
|
@ -997,7 +1061,7 @@ export default { |
|
|
|
|
|
|
|
|
&.error-border { |
|
|
&.error-border { |
|
|
border-color: #ff5d5d !important; |
|
|
border-color: #ff5d5d !important; |
|
|
box-shadow: 0 0 6px #ffc3c3!important; |
|
|
|
|
|
|
|
|
box-shadow: 0 0 6px #ffc3c3 !important; |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|