Browse Source

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

master
luojie 2 days 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" /> @input="onInputChange" @change="onInputChange" />
<el-select v-else-if="type === 'select'" class="flex1" :multiple="item.multiple" <el-select v-else-if="type === 'select'" class="flex1" :multiple="item.multiple"
:class="getFillTypeStyle() + (orangeBg ? ' orange-bg' : '')" v-model="inputValue" :disabled="getDisabled()" :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 v-for="op in item.options" :key="op.value" :label="op.label" :value="op.value">
</el-option> </el-option>
</el-select> </el-select>
@ -190,19 +190,21 @@ export default {
// //
this.oldValue = this.inputValue; // this.oldValue = this.inputValue; //
this.$emit("blur", val); this.$emit("blur", val);
this.$emit('input', this.inputValue);
this.$emit("change", val); this.$emit("change", val);
// //
await this.saveModificationRecord(); await this.saveModificationRecord();
} catch { } catch {
// //
this.inputValue = this.oldValue; 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("blur", this.oldValue);
this.$emit("change", this.oldValue); this.$emit("change", this.oldValue);
} }
} else { } else {
// blurchange // blurchange
this.$emit("blur", val) this.$emit("blur", val)
// this.$emit('input', val);
this.$emit("change", val) this.$emit("change", val)
} }
}, },
@ -339,7 +341,6 @@ export default {
// ID (id + key) // ID (id + key)
getFieldId() { getFieldId() {
// 使idid
const templateId = 'template_123'; // id const templateId = 'template_123'; // id
const fieldKey = this.item.key || this.item.prop || this.item.label || 'default_key'; 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{ .step-type-select{
width: 200px; width: 200px;
margin-right: 10px; margin-right: 10px;
max-width: 200px;
} }
.delete-btn { .delete-btn {
color: #f56c6c; color: #f56c6c;

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

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

Loading…
Cancel
Save