[update] binaji

This commit is contained in:
zhaomeijing
2022-05-27 16:06:29 +08:00
parent 02f9ddd4e3
commit 5a74bad2de
4 changed files with 164 additions and 123 deletions
@@ -11,9 +11,11 @@
>
<a-row :gutter='24'>
<a-col :span='9'>
<span class="Required">*</span>
<a-form-model-item :label="$t('title')" prop='templatetitle' :rules='rules'>
<a-input style='width: 420px'
v-model='templatetitle' />
:placeholder="$t('PleaseEnter')+$t('title')"
v-model='form.templatetitle' />
</a-form-model-item>
</a-col>
<a-col :span='9'>
@@ -37,6 +39,7 @@
<a-col :span='9'>
<a-form-model-item ref='paramsTemplateName' :label="$t('parameterTemplate')" prop='paramsTemplateName'>
<a-input
:placeholder="$t('PleaseEnter')+$t('parameterTemplate')"
v-model='form.paramsTemplateName' />
</a-form-model-item>
</a-col>
@@ -62,6 +65,17 @@
v-has="'area:delete'">{{ $t('delete') }}</a>
</span>
</a-table>
<div class="page" style='display: flex;justify-content: flex-end;'>
<a-pagination
:show-total="total => $t('total')+` ${total} `+$t('strip')"
show-quick-jumper
show-size-changer
:page-size.sync="pageSize"
:total="total"
@change="pageOnChange"
@showSizeChange="SizeChange"
/>
</div>
<div class='drawer-bootom-button'>
<a-button style='margin-right: .8rem' @click='handleCancel'>{{ $t('cancel') }}</a-button>
<a-button @click='handleSubmit' type='primary' :loading='confirmLoading'>{{ $t('submit') }}</a-button>
@@ -108,16 +122,18 @@ export default {
},
form: {},
rules: {
// templatetitle: [
// { required: true, message: this.$t('enterTitle'), trigger: 'blur' }
// ]
templatetitle: [
{ required: true, message: this.$t('enterTitle'), trigger: 'blur' }
]
},
areaTable: [],
flag: false, //表单提交标识
spinLoading: false,
confirmLoading: false,
templatetitle: '',
selectedRowKeys: []
selectedRowKeys: [],
pageNo: 1,
pageSize: 10
}
},
props: {
@@ -151,14 +167,25 @@ export default {
this.loadData()
},
methods: {
pageOnChange(page, pageSize) {
this.pageNo = page
this.loadData()
},
SizeChange(page, pageSize) {
this.pageNo = 1
this.pageSize = pageSize
this.loadData()
},
loadData() {
this.loading = true
let params = {
pageNo: this.pageNo,
pageSize: this.pageSize,
...this.form
}
getAction(`params/manifest/getParamsTemplateList`, params).then(res => {
getAction(`params/manifest/getParamsTemplatePage`, params).then(res => {
if (res.success) {
this.areaTable = [...res.result]
this.areaTable = [...res.result.records]
this.total = res.result.total
}
}).finally(() => {
@@ -331,6 +358,10 @@ export default {
display: flex;
justify-content: center;
}
.Required {
color: red;
margin-left: 20px;
}
</style>
<style lang='less'>
.area-module {