|
|
|
@ -53,7 +53,8 @@ |
|
|
|
</el-date-picker> |
|
|
|
<el-button v-else-if="type === 'button'" :class="getFillTypeStyle() + (orangeBg ? ' orange-bg' : '')" |
|
|
|
:disabled="getDisabled()" type="primary" @click="handleClickButton(item)"> |
|
|
|
{{ item.buttonName }} |
|
|
|
{{ $t(item.buttonName) }} |
|
|
|
<input type="hidden" v-model="inputValue" > |
|
|
|
</el-button> |
|
|
|
|
|
|
|
<div class="clickable" |
|
|
|
@ -525,7 +526,8 @@ export default { |
|
|
|
}, |
|
|
|
// 点击按钮 |
|
|
|
handleClickButton(item) { |
|
|
|
this.$emit('clickButton', item); |
|
|
|
this.inputValue = `button-${new Date().getTime()}`; |
|
|
|
this.onCommonHandleSaveRecord(this.inputValue); |
|
|
|
}, |
|
|
|
onDateChange(val, format) { |
|
|
|
this.inputValue = moment(val).format(format); |
|
|
|
@ -837,6 +839,7 @@ export default { |
|
|
|
this.$emit("change", this.inputValue); |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
// 值发生了变化,需要弹出密码输入框 |
|
|
|
const isSame = this.isEqual(this.oldValue, this.inputValue); |
|
|
|
let isOtherValuesSame = true; |
|
|
|
@ -866,7 +869,6 @@ export default { |
|
|
|
otherValues: this.oldOtherValues |
|
|
|
}; |
|
|
|
} |
|
|
|
console.log(this.oldValue, oldValue,"ooo") |
|
|
|
this.inputValue = this.oldValue; |
|
|
|
this.$emit('input', oldValue); // 触发 v-model 更新 |
|
|
|
// this.$emit("blur", this.oldValue); |
|
|
|
@ -877,9 +879,13 @@ export default { |
|
|
|
}, |
|
|
|
|
|
|
|
//处理更新记录 |
|
|
|
handleUpdateRecord(data) { |
|
|
|
handleUpdateRecord(data,recordData) { |
|
|
|
const baseInfo = this.getCommonRecordInfo(); |
|
|
|
if (!this.oldValue && !this.inputValue) return; |
|
|
|
if(recordData){ |
|
|
|
this.oldValue = recordData.oldValue; |
|
|
|
this.inputValue = recordData.inputValue; |
|
|
|
} |
|
|
|
const record = { |
|
|
|
...baseInfo, |
|
|
|
oldValue: this.oldValue, |
|
|
|
@ -909,6 +915,9 @@ export default { |
|
|
|
otherValues: this.otherValues |
|
|
|
}; |
|
|
|
} |
|
|
|
if(this.type === "button"){ |
|
|
|
this.$emit('clickButton', this.item,this.inputValue,data); |
|
|
|
} |
|
|
|
//用户输入密码并点击确定,保存修改 |
|
|
|
this.oldValue = value; // 更新旧值 |
|
|
|
this.$emit("blur", value); |
|
|
|
@ -923,6 +932,7 @@ export default { |
|
|
|
} |
|
|
|
this.$nextTick(() => { |
|
|
|
EventBus.$emit('onModifyRecord', params,) |
|
|
|
console.log(params,"onModifyRecord") |
|
|
|
if (this.regentType.includes(this.item.type)) { |
|
|
|
this.$emit("onRegentSubmit", this.selectRegentInfo, this.inputValue); |
|
|
|
} |
|
|
|
@ -1011,7 +1021,7 @@ export default { |
|
|
|
isShowHandle() { |
|
|
|
const { fillType } = this.item; |
|
|
|
//只有当模板状态不是预填时,才显示操作按钮 |
|
|
|
return this.templateFillType !== "preFill" && fillType === "actFill" |
|
|
|
return this.templateFillType !== "preFill" && fillType === "actFill"&&this.type!=="button" |
|
|
|
}, |
|
|
|
//判断是否禁用 |
|
|
|
getDisabled() { |
|
|
|
|