Merge remote-tracking branch 'origin/dev_third_stage' into dev_third_stage

This commit is contained in:
lixuetao
2022-06-30 09:57:15 +08:00
@@ -45,9 +45,19 @@
:title="$t('ParentName')">{{$t('ParentName')}}</span> :title="$t('ParentName')">{{$t('ParentName')}}</span>
</div> </div>
<a-form-model-item class="itemModel"> <a-form-model-item class="itemModel">
<a-input class="box-input" <a-select :placeholder="$t('PleaseSelect')+$t('ParentName')"
v-model="formInline.ParentName" class="box-input"
:placeholder="$t('PleaseEnter')+$t('ParentName')"/> :getPopupContainer="triggerNode=> triggerNode.parentNode"
allowClear
v-model="formInline.parentId">
<a-select-option v-for="(item, key) in ParentList"
:key="item.id"
:value="item.id">
<span style="display: inline-block;width: 100%" :title="item.title ">
{{ item.title }}
</span>
</a-select-option>
</a-select>
</a-form-model-item> </a-form-model-item>
</div> </div>
</a-col> </a-col>
@@ -68,6 +78,7 @@
confirmLoading: false, confirmLoading: false,
formInline: {}, formInline: {},
rules: {}, rules: {},
ParentList: [],
title: '', title: '',
url: { url: {
add: '/report/lawsMonthlyReportTitleTemplateEO/add', add: '/report/lawsMonthlyReportTitleTemplateEO/add',
@@ -79,9 +90,19 @@
}, },
methods: { methods: {
getParent() {
getAction('/report/lawsMonthlyReportTitleTemplateEO/oneMenu', {}).then((res) => {
if (res.success) {
this.ParentList = res.result
} else {
this.ParentList = []
}
})
},
add() { add() {
this.title = this.$t('newlyAdded') this.title = this.$t('newlyAdded')
this.visible = true this.visible = true
this.getParent()
this.$nextTick(() => { this.$nextTick(() => {
this.formInline = {} this.formInline = {}
this.$refs.ruleForm.clearValidate() this.$refs.ruleForm.clearValidate()
@@ -90,6 +111,7 @@
edit(row) { edit(row) {
this.title = this.$t('edit') this.title = this.$t('edit')
this.visible = true this.visible = true
this.getParent()
this.$nextTick(() => { this.$nextTick(() => {
this.formInline = row this.formInline = row
this.$refs.ruleForm.clearValidate() this.$refs.ruleForm.clearValidate()