Browse Source

feat:[模板管理][update]

lkf
luojie 3 months ago
parent
commit
f4f9e89ef2
1 changed files with 10 additions and 11 deletions
  1. +10
    -11
      src/components/Template/HandleFormItem.vue

+ 10
- 11
src/components/Template/HandleFormItem.vue View File

@ -41,7 +41,7 @@
</div> </div>
<img v-if="getIsShowCopyIcon()" @click="onCopy" src="@/assets/images/copy-icon.svg" class="handle-icon" <img v-if="getIsShowCopyIcon()" @click="onCopy" src="@/assets/images/copy-icon.svg" class="handle-icon"
alt="" /> alt="" />
<img v-if="getIsShowRecordIcon()" @mouseenter="(e) => onMouseEnter('modifyRecord', e)"
<img v-if="getIsShowRecordIcon()" @mouseenter="(e) => onMouseEnter('fieldChanged', e)"
@mouseleave="onMouseLeave" src="@/assets/images/record-icon.svg" class="handle-icon" alt="" /> @mouseleave="onMouseLeave" src="@/assets/images/record-icon.svg" class="handle-icon" alt="" />
</div> </div>
@ -53,7 +53,7 @@
<div class="records-list"> <div class="records-list">
<div v-for="(record, index) in modificationRecords" :key="index" class="record-item"> <div v-for="(record, index) in modificationRecords" :key="index" class="record-item">
<!-- 字段修改记录 --> <!-- 字段修改记录 -->
<div class="record-row" v-if="currentRecordType === 'modifyRecord'">
<div class="record-row" v-if="currentRecordType === 'fieldChanged'">
<div> <div>
<span>{{ index + 1 }}.</span> <span>{{ index + 1 }}.</span>
<span> {{ record.userName }} </span> <span> {{ record.userName }} </span>
@ -216,11 +216,11 @@ export default {
this.updateFhyjjl(record);//qc this.updateFhyjjl(record);//qc
} }
const params = { const params = {
type: "reply", type: "reply",
newRecord: record, newRecord: record,
list: deepClone(this.fhyjjl),
resourceList: deepClone(this.fhyjjl),
} }
// //
EventBus.$emit('onModifyRecord', params); EventBus.$emit('onModifyRecord', params);
@ -249,13 +249,13 @@ export default {
}, },
// //
onCheckboxChange(val) { onCheckboxChange(val) {
console.log(JSON.stringify({...this.fieldCheckObj,[this.fieldKey]:{checked:val}}),"kkk")
// //
EventBus.$emit('onModifyRecord', { EventBus.$emit('onModifyRecord', {
type: "checkbox", type: "checkbox",
key: this.fieldKey,
checked: val,
fieldCheckObj:JSON.stringify({...this.fieldCheckObj,[this.fieldKey]:{checked:val}}),//
}); });
console.log(val,"fff")
this.updateFieldCheckObj({[this.fieldKey]:{checked:val}}); this.updateFieldCheckObj({[this.fieldKey]:{checked:val}});
// this.$emit('input', val); // this.$emit('input', val);
// this.$emit('change', val); // this.$emit('change', val);
@ -288,7 +288,6 @@ export default {
onClickQuestion() { onClickQuestion() {
if(this.templateFillType == 'actFill' || this.templateFillType){ if(this.templateFillType == 'actFill' || this.templateFillType){
const field = this.fieldCheckObj[this.fieldKey]; const field = this.fieldCheckObj[this.fieldKey];
console.log(field,this.fieldCheckObj,"click")
if(field && field.checked){ if(field && field.checked){
this.$message({ this.$message({
message: '该字段已勾选复核框,请先取消勾选后再进行提交疑问', message: '该字段已勾选复核框,请先取消勾选后再进行提交疑问',
@ -329,10 +328,10 @@ export default {
title: this.oldValue ? "修改记录" : "填写", title: this.oldValue ? "修改记录" : "填写",
} }
const params = { const params = {
type: "modifyRecord",
type: "fieldChanged",
newRecord: record, newRecord: record,
password: passwordResult, password: passwordResult,
list: deepClone(this.zdxgjl),
resourceList: deepClone(this.zdxgjl),
} }
this.$emit("onModifyRecord", params,) this.$emit("onModifyRecord", params,)
this.updateZdxgjl(record); this.updateZdxgjl(record);
@ -476,7 +475,7 @@ export default {
this.currentRecordType = type; this.currentRecordType = type;
clearTimeout(this.modalTimer); clearTimeout(this.modalTimer);
let record = []; let record = [];
if (type === "modifyRecord") {
if (type === "fieldChanged") {
record = this.getModifyRecords(); record = this.getModifyRecords();
} else if (type === "replyRecord") { } else if (type === "replyRecord") {
record = this.getReplyRecords(); record = this.getReplyRecords();

Loading…
Cancel
Save