Files
laws_weilai/jero-web/src/components/SynchronousSubmissionLibrary/index.vue
T

171 lines
4.0 KiB
Java

<template>
<div class='diolag-area'>
<a-spin :spinning='spinLoading'>
<a-form-model
class='tag-module'
ref='ruleForm'
:model='formInline'
:rules='rules'
:label-col='labelCol'
:wrapper-col='wrapperCol'
>
<a-row :gutter='24'>
<a-col :span='20'>
<div>{{ $t('Synchronizedatabase') }}</div>
<div>{{ $t('Aftersynchronization') }}</div>
</a-col>
</a-row>
</a-form-model>
</a-spin>
<div class='drawer-bootom-button' style='margin-top: 20px'>
<a-button style='margin-right: 8px' @click='handleCancel'>{{ $t('cancel') }}</a-button>
<a-button @click='handleSubmit' type='primary' :loading='confirmLoading'>{{ $t('submit') }}</a-button>
</div>
</div>
</template>
<script>
import { putAction, postAction, getAction, deleteAction } from '@/api/manage'
import axios from 'axios'
import Vue from 'vue'
import { ACCESS_TOKEN } from '@/store/mutation-types'
export default {
name: 'diolagArea',
components: {},
data() {
return {
token:Vue.ls.get(ACCESS_TOKEN),
selectedRowKeysDate: {},
loading: false,
editId: '',
newVisible: false,
labelCol: {
xs: { span: 24 },
sm: { span: 7 }
},
wrapperCol: {
xs: { span: 24 },
sm: { span: 14 }
},
formInline: {},
rules: {},
areaTable: [],
flag: false, //表单提交标识
spinLoading: false,
confirmLoading: false,
selectedRowKeys: [],
fromDate: [],
fromDateTo: [],
}
},
props: {
paramsManifest: {
type: Object,
default: {},
require: true
},
selectedRowKeysArray: {
type: String,
default: '',
require: true
}
},
mounted() {},
methods: {
searchQuery() {
this.loadData()
},
searchReset() {
this.form = {}
this.loadData()
},
handleCancel() {
this.$emit('areaVisibsynchronous', false)
},
onSelectChange(selectedRowKeys, selectedRowKeysDate) {
this.selectedRowKeysDate = selectedRowKeysDate
this.selectedRowKeys = selectedRowKeys
},
handleTableChange(val) {
},
// 引用参数确定
handleSubmit() {
let _this = this
let param = {ids: this.selectedRowKeysArray, paramsManifestId: this.paramsManifest.id }
this.confirmLoading = true
axios({
url: '/jero-boot/params/collectManifest/syncReport',
method: 'post',
data: param,
transformRequest: [function (data) {
let ret = ''
for (let it in data) {
ret += encodeURIComponent(it) + '=' + encodeURIComponent(data[it]) + '&'
}
return ret
}],
headers: {
'Content-Type': 'application/x-www-form-urlencoded',
'X-Access-Token':_this.token
}
})
.then( (res) =>{
console.log(res,'res')
if (res.data.success) {
_this.$message.success(_this.$t('OperationSuccessful'))
this.$emit('areaVisibsynchronous', false)
this.$emit('GetgetTableList')
this.confirmLoading = false
}else{
_this.$message.warning(_this.$t('operationFailed'))
this.confirmLoading = false
}
})
.catch( (error) =>{
console.log(error);
this.confirmLoading = false
});
}
}
}
</script>
<style lang='less' scoped>
@import '~@assets/less/common.less';
.diolag-area {
.table-area {
margin: 20px 0;
.action-edit {
margin-right: 10px;
}
}
.table-del {
color: red;
}
}
.drawer-bootom-button{
display: flex;
justify-content: center;
}
::v-deep .page{
display: flex;
justify-content: flex-end;
margin-bottom: 20px;
}
</style>
<style lang='less'>
.area-module {
.ant-modal-wrap {
.ant-modal {
.ant-modal-content {
.ant-modal-footer {
text-align: center;
}
}
}
}
}
</style>