Browse Source

feat:[模板管理][代码合并]

master
luojie 1 day ago
parent
commit
cff01c0108
3 changed files with 8 additions and 6 deletions
  1. +4
    -3
      src/components/Template/HandleFormItem.vue
  2. +1
    -0
      src/components/Template/Step.vue
  3. +3
    -3
      src/views/business/comps/template/mixins/templateMixin.js

+ 4
- 3
src/components/Template/HandleFormItem.vue View File

@ -17,7 +17,7 @@
@input="onInputChange" @change="onInputChange" />
<el-select v-else-if="type === 'select'" class="flex1" :multiple="item.multiple"
:class="getFillTypeStyle() + (orangeBg ? ' orange-bg' : '')" v-model="inputValue" :disabled="getDisabled()"
:placeholder="getPlaceholder()" @change="onCommonHandleSaveRecord">
:placeholder="getPlaceholder()" @change="onInputChange">
<el-option v-for="op in item.options" :key="op.value" :label="op.label" :value="op.value">
</el-option>
</el-select>
@ -190,19 +190,21 @@ export default {
//
this.oldValue = this.inputValue; //
this.$emit("blur", val);
this.$emit('input', this.inputValue);
this.$emit("change", val);
//
await this.saveModificationRecord();
} catch {
//
this.inputValue = this.oldValue;
this.$emit('input', this.oldValue); // v-model
this.$emit('input', this.inputValue); // v-model
this.$emit("blur", this.oldValue);
this.$emit("change", this.oldValue);
}
} else {
// blurchange
this.$emit("blur", val)
// this.$emit('input', val);
this.$emit("change", val)
}
},
@ -339,7 +341,6 @@ export default {
// ID (id + key)
getFieldId() {
// 使idid
const templateId = 'template_123'; // id
const fieldKey = this.item.key || this.item.prop || this.item.label || 'default_key';

+ 1
- 0
src/components/Template/Step.vue View File

@ -364,6 +364,7 @@ export default {
.step-type-select{
width: 200px;
margin-right: 10px;
max-width: 200px;
}
.delete-btn {
color: #f56c6c;

+ 3
- 3
src/views/business/comps/template/mixins/templateMixin.js View File

@ -18,7 +18,7 @@ export default {
if (v.bdnr) {
this.formData = { ...n, ...JSON.parse(v.bdnr) };
}
console.log(v,"formData from templateData")
this.setTemplateData(n);
}
}
@ -31,8 +31,8 @@ export default {
}
},
mounted() {
this.setTemplateStatus("actFill");
// this.setTemplateStatus(this.fillType);
// this.setTemplateStatus("actFill");
this.setTemplateStatus(this.fillType);
},
unmounted() {
this.setTemplateStatus("");

Loading…
Cancel
Save