对接法规月报

This commit is contained in:
qq787203167
2022-06-30 09:37:02 +08:00
parent 42067060b4
commit 83f9c20264
3 changed files with 51 additions and 10 deletions
@@ -293,5 +293,7 @@
height: 38px;
/*margin-top: 2px;*/
}
.text-operation {
margin-right: 8px;
}
</style>
@@ -24,7 +24,7 @@
size="middle"
:loading="loading"
:pagination="false"
:scroll="{x: '100%'}"
:scroll="{x: '100%',y:500}"
:data-source="dataSource"
:columns="columns"
>
@@ -104,8 +104,8 @@
mounted() {
},
methods: {
edit() {
edit(row) {
this.$refs.fillTableAddRef.edit(JSON.parse(JSON.stringify(row)))
},
getData() {
this.visible = true
@@ -130,7 +130,7 @@
pageSize: this.pageSize
}
this.loading = true
getAction('/report/lawsMonthlyReportTitleTemplateEO/list', query).then((res) => {
getAction('/report/lawsMonthlyReportTitleTemplateEO/page', query).then((res) => {
if (res.success) {
if (res.result.current > 1 && res.result.records.length == 0) {
this.pageNo = res.result.current - 1
@@ -151,8 +151,21 @@
moveDownClick() {
},
deleteLib() {
deleteLib(val) {
let _this = this
this.$confirm({
content: _this.$t('ConfirmDelete'),
onOk() {
getAction('/report/lawsMonthlyReportTitleTemplateEO/deleteBatch', { ids: val.id }).then((res) => {
if (res.success) {
_this.$message.success(_this.$t('OperationSuccessful'))
_this.getList()
} else {
_this.$message.warning(res.message)
}
})
}
})
},
newlyAddedClick() {
this.$refs.fillTableAddRef.add()
@@ -171,4 +184,7 @@
text-align: right;
margin-bottom: 16px;
}
.text-operation {
margin-right: 8px;
}
</style>
@@ -58,6 +58,8 @@
</template>
<script>
import { getAction, postAction } from '@/api/manage'
export default {
name: 'fillTableAdd',
data() {
@@ -66,7 +68,11 @@
confirmLoading: false,
formInline: {},
rules: {},
title: ''
title: '',
url: {
add: '/report/lawsMonthlyReportTitleTemplateEO/add',
edit: '/report/lawsMonthlyReportTitleTemplateEO/edit'
}
}
},
mounted() {
@@ -92,7 +98,24 @@
handleOk() {
this.$refs.ruleForm.validate(valid => {
if (valid) {
this.confirmLoading = true
let url = ''
if (this.formInline.id) {
url = this.url.edit
} else {
url = this.url.add
}
postAction(url, this.formInline).then((res) => {
if (res.success) {
this.$message.success(this.$t('OperationSuccessful'))
this.visible = false
this.confirmLoading = false
this.$emit('fillTableAddForm')
} else {
this.confirmLoading = false
this.$message.warning(this.$t('operationFailed'))
}
})
}
})
},
@@ -163,7 +186,7 @@
}
.title-text {
width:100px;
width: 100px;
text-align: right;
display: inline-block;
font-weight: 500;