87 lines
1.9 KiB
HTML
87 lines
1.9 KiB
HTML
|
|
<template id="tpl-form-design">
|
|
<div class="tpl-form-design-container">
|
|
<form-item-list-generator
|
|
:form-item-list="form"
|
|
:workflow="workflow"
|
|
ref="formItemListGenerator"/>
|
|
</div>
|
|
</template>
|
|
|
|
{% include 'component/tpl/formItemListGenerator.html' %}
|
|
|
|
<script type="module">
|
|
Vue.component("tpl-form-design", {
|
|
template: "#tpl-form-design",
|
|
props: {
|
|
form: {
|
|
type: Array,
|
|
default: () => {
|
|
return []
|
|
}
|
|
},
|
|
workflow: {
|
|
type: Object,
|
|
default: () => {
|
|
return {}
|
|
}
|
|
}
|
|
},
|
|
data: () => ({
|
|
}),
|
|
computed: {
|
|
versionList () {
|
|
const list = this.articleAssignmentListWithAnswer.map(item => {
|
|
return { text: item.version, value: item.version }
|
|
})
|
|
return list;
|
|
},
|
|
formItemList () {
|
|
let list = []
|
|
if (this.articleAssignmentListWithAnswer[this.selectedVersionIndex]) {
|
|
list = this.articleAssignmentListWithAnswer[this.selectedVersionIndex].formItemList;
|
|
}
|
|
return list;
|
|
}
|
|
},
|
|
watch: {
|
|
|
|
},
|
|
async created() {
|
|
},
|
|
mounted() {},
|
|
methods: {
|
|
async doUiAction(uiActionId, uiActionData) {
|
|
switch (uiActionId) {
|
|
case 'dataValidate':
|
|
await this.dataValidate();
|
|
break;
|
|
default:
|
|
console.error("[doUiAction] uiActionId not find", {uiActionId});
|
|
break;
|
|
}
|
|
},
|
|
async dataValidate(){
|
|
await this.$refs.formItemListGenerator.dataValidate()
|
|
}
|
|
}
|
|
})
|
|
</script>
|
|
|
|
<style scoped>
|
|
.tpl-form-design-container {
|
|
width: 100%;
|
|
height: 650px;
|
|
max-height: 700px;
|
|
overflow-y: auto;
|
|
}
|
|
@media (max-width: 500px) {
|
|
.tpl-form-design-container {
|
|
width: 100%;
|
|
height: auto;
|
|
max-height: none;
|
|
overflow-y: hidden;
|
|
}
|
|
}
|
|
</style>
|