|
|
@ -109,7 +109,6 @@ |
|
|
<el-button type="primary" @click="onReplyConfirm">确 定</el-button> |
|
|
<el-button type="primary" @click="onReplyConfirm">确 定</el-button> |
|
|
</span> |
|
|
</span> |
|
|
</el-dialog> |
|
|
</el-dialog> |
|
|
<EditSign @cancel="resetRecord" ref="editSignRef" @callback="onEditSignSave" /> |
|
|
|
|
|
</div> |
|
|
</div> |
|
|
</template> |
|
|
</template> |
|
|
|
|
|
|
|
|
@ -119,13 +118,12 @@ import DecimalInput from "./DecimalInput.vue"; |
|
|
import { EventBus } from "@/utils/eventBus"; |
|
|
import { EventBus } from "@/utils/eventBus"; |
|
|
import moment from "moment"; |
|
|
import moment from "moment"; |
|
|
import { deepClone } from "@/utils/index"; |
|
|
import { deepClone } from "@/utils/index"; |
|
|
import EditSign from "@/views/business/comps/template/dialog/EditSign.vue"; |
|
|
|
|
|
|
|
|
import { getuuid } from "@/utils/index.js"; |
|
|
export default { |
|
|
export default { |
|
|
inject: ['templateFillType', "getZdxgjl", "getFhyjjl", "updateZdxgjl", "replaceFhyjjl", "updateFhyjjl", "getFieldCheckObj", "updateFieldCheckObj"], |
|
|
inject: ['templateFillType', "getZdxgjl", "getFhyjjl", "updateZdxgjl", "replaceFhyjjl", "updateFhyjjl", "getFieldCheckObj", "updateFieldCheckObj"], |
|
|
components: { |
|
|
components: { |
|
|
Question, |
|
|
Question, |
|
|
DecimalInput, |
|
|
DecimalInput, |
|
|
EditSign, |
|
|
|
|
|
}, |
|
|
}, |
|
|
props: { |
|
|
props: { |
|
|
type: {//form类型 input/select等 |
|
|
type: {//form类型 input/select等 |
|
|
@ -185,6 +183,7 @@ export default { |
|
|
replyContent: '', // 回复内容 |
|
|
replyContent: '', // 回复内容 |
|
|
visible: false,//是否显示弹窗 |
|
|
visible: false,//是否显示弹窗 |
|
|
checkboxValue: this.getChecked(),//是否选中 |
|
|
checkboxValue: this.getChecked(),//是否选中 |
|
|
|
|
|
uuid: getuuid(), // 唯一标识符,用于EventBus事件匹配 |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
watch: { |
|
|
watch: { |
|
|
@ -203,6 +202,14 @@ export default { |
|
|
|
|
|
|
|
|
}, |
|
|
}, |
|
|
mounted() { |
|
|
mounted() { |
|
|
|
|
|
EventBus.$on('onExternalFieldUpdate', this.handleExternalFieldUpdate); |
|
|
|
|
|
EventBus.$on('onEditSignCancel', this.handleEditSignCancel); |
|
|
|
|
|
EventBus.$on('onEditSignCallback', this.handleEditSignCallback); |
|
|
|
|
|
}, |
|
|
|
|
|
unmounted() { |
|
|
|
|
|
EventBus.$off('onExternalFieldUpdate', this.handleExternalFieldUpdate); |
|
|
|
|
|
EventBus.$off('onEditSignCancel', this.handleEditSignCancel); |
|
|
|
|
|
EventBus.$off('onEditSignCallback', this.handleEditSignCallback); |
|
|
}, |
|
|
}, |
|
|
methods: { |
|
|
methods: { |
|
|
// 点击按钮 |
|
|
// 点击按钮 |
|
|
@ -221,6 +228,18 @@ export default { |
|
|
} |
|
|
} |
|
|
return record.userNameEn; |
|
|
return record.userNameEn; |
|
|
}, |
|
|
}, |
|
|
|
|
|
// 处理电子签名取消事件 |
|
|
|
|
|
handleEditSignCancel(data) { |
|
|
|
|
|
if (data.uuid === this.uuid) { |
|
|
|
|
|
this.resetRecord(); |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
|
|
|
// 处理电子签名确认回调事件 |
|
|
|
|
|
handleEditSignCallback(data) { |
|
|
|
|
|
if (data.uuid === this.uuid) { |
|
|
|
|
|
this.onEditSignSave(data.data); |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
onEditSignSave(data) { |
|
|
onEditSignSave(data) { |
|
|
this.handleUpdateRecord(data) |
|
|
this.handleUpdateRecord(data) |
|
|
}, |
|
|
}, |
|
|
@ -412,9 +431,8 @@ export default { |
|
|
return; |
|
|
return; |
|
|
} |
|
|
} |
|
|
if (this.oldValue && !isSame && this.templateFillType === "actFill") { |
|
|
if (this.oldValue && !isSame && this.templateFillType === "actFill") { |
|
|
|
|
|
|
|
|
this.$refs.editSignRef.show() |
|
|
|
|
|
// this.handleUpdateRecord(); |
|
|
|
|
|
|
|
|
// 通过EventBus触发电子签名弹窗 |
|
|
|
|
|
EventBus.$emit('showEditSignDialog', { uuid: this.uuid }); |
|
|
}else{//如果是第一次填写,不需要密码验证 |
|
|
}else{//如果是第一次填写,不需要密码验证 |
|
|
this.handleUpdateRecord() |
|
|
this.handleUpdateRecord() |
|
|
} |
|
|
} |
|
|
@ -457,9 +475,6 @@ export default { |
|
|
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":""); |
|
|
this.$emit("change", this.inputValue,data?"save":""); |
|
|
if(!this.isFieldsRecord){//是否需要记录修改记录 |
|
|
|
|
|
return; |
|
|
|
|
|
} |
|
|
|
|
|
if(this.templateFillType === "actFill"){//只有实际填报的时候才记录修改记录 |
|
|
if(this.templateFillType === "actFill"){//只有实际填报的时候才记录修改记录 |
|
|
this.updateZdxgjl(record); |
|
|
this.updateZdxgjl(record); |
|
|
} |
|
|
} |
|
|
@ -483,7 +498,6 @@ export default { |
|
|
getCommonRecordInfo() { |
|
|
getCommonRecordInfo() { |
|
|
const { nickName, name } = this.$store.getters; |
|
|
const { nickName, name } = this.$store.getters; |
|
|
//locale:zh-CN 中文 en-US 英文 |
|
|
//locale:zh-CN 中文 en-US 英文 |
|
|
const lang = this.$i18n.locale === "zh_CN" ? "cn" : "en"; |
|
|
|
|
|
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") { |
|
|
|