397 lines
11 KiB
Java
397 lines
11 KiB
Java
<template>
|
|
<a-modal
|
|
:title="listTitle"
|
|
:width="500"
|
|
:visible="visible"
|
|
:confirm-loading="confirmLoading"
|
|
:maskClosable="false"
|
|
@ok="handleSubmit"
|
|
@cancel="handleCancel"
|
|
>
|
|
<div class='diolag-area'>
|
|
<a-spin :spinning='spinLoading'>
|
|
<a-form-model
|
|
class='formAdd'
|
|
ref='ruleForm'
|
|
:model='form'
|
|
:rules='rules'
|
|
:label-col='labelCol'
|
|
:wrapper-col='wrapperCol'
|
|
>
|
|
<a-row :gutter='24'>
|
|
<a-col :span="12">
|
|
<div class="box-title-text" style='margin-top: -33px'>
|
|
<div class="title-text">
|
|
<span class="Required">*</span>
|
|
<span class="title-text-text" :title="$t('cutoffTime')">
|
|
{{$t('cutoffTime')}}</span>
|
|
</div>
|
|
<a-form-model-item class="itemModel" prop="legalTaskConfirmation" >
|
|
<a-date-picker class="box-input"
|
|
:placeholder="$t('PleaseSelect')+$t('cutoffTime')"
|
|
@change="onChange" @ok="onOk"
|
|
format="YYYY-MM-DD"
|
|
:getCalendarContainer="(trigger) => trigger.parentNode"
|
|
v-model="form.legalTaskConfirmation"
|
|
:disabled="false"/>
|
|
</a-form-model-item>
|
|
</div>
|
|
<!-- <a-col :span='24'>-->
|
|
<!-- <span style='display: flex;justify-content: center;margin-bottom: 20px;'> <span style='margin-top: 6px;margin-right: 7px'>{{$t('cutoffTime')}}</span>-->
|
|
<!-- <a-date-picker :placeholder="$t('PleaseSelect')+$t('cutoffTime')" @change="onChange" @ok="onOk" />-->
|
|
<!-- </span>-->
|
|
<!-- </a-col>-->
|
|
</a-col>
|
|
</a-row>
|
|
</a-form-model>
|
|
</a-spin>
|
|
<!-- <div class='drawer-bootom-button'>-->
|
|
<!-- <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>-->
|
|
<!-- 错误数据提示-->
|
|
<a-modal
|
|
:title="$t('operationFailed')"
|
|
:width="860"
|
|
v-model="visibleoperationFailed"
|
|
:maskClosable="false"
|
|
:footer="null"
|
|
@cancel='cancleoperationFailed'
|
|
:body-style="bodystyle"
|
|
>
|
|
<a-row :gutter="24">
|
|
<a-col :span="24">
|
|
<div style='font-size: 18px;margin-bottom: 20px;display: flex;justify-content: center'
|
|
class="box-title-text-index" v-for='(item,key) in NotSelectedRowKeysValue'>
|
|
<span v-html='item'></span>
|
|
<!-- <div>{{$t('NiOnumberis')}}{{ item.nioNumber }},{{$t('Statusis')}}-->
|
|
<!-- <span style='color: red'>{{ item.state }}</span>,{{$t('NoOperationPermissionForthisbutton')}}。-->
|
|
<!-- </div>-->
|
|
</div>
|
|
</a-col>
|
|
</a-row>
|
|
<div class="imports-footer">
|
|
<div class="imports-footer-wrap">
|
|
<a-button class="imports-btn" type="primary" @click="cancleoperationFailed">{{$t('cancel')}}</a-button>
|
|
</div>
|
|
</div>
|
|
</a-modal>
|
|
<JLoading :loading="textLoading">{{this.$t('pleaseWaitWhileRunning')}}</JLoading>
|
|
</div>
|
|
</a-modal>
|
|
</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'
|
|
import moment from 'moment'
|
|
import eventBUs from '../../common/event'
|
|
export default {
|
|
name: 'diolagArea',
|
|
components: {},
|
|
data() {
|
|
return {
|
|
token:Vue.ls.get(ACCESS_TOKEN),
|
|
title: this.$t('add'),
|
|
listTitle:this.$t('OneclickCollection'),
|
|
total: 0,
|
|
selectedRowKeysDate: {},
|
|
loading: false,
|
|
editId: '',
|
|
visibleoperationFailed:false,
|
|
newVisible: false,
|
|
visible:false,
|
|
textLoading:false,
|
|
NotSelectedRowKeysValue:[],
|
|
labelCol: {
|
|
xs: { span: 24 },
|
|
sm: { span: 7 }
|
|
},
|
|
wrapperCol: {
|
|
xs: { span: 24 },
|
|
sm: { span: 14 }
|
|
},
|
|
form: {},
|
|
rules: {
|
|
legalTaskConfirmation:[
|
|
{ required: true, message: this.$t('PleaseSelect')+this.$t('cutoffTime'), trigger: 'change' }
|
|
]
|
|
},
|
|
areaTable: [],
|
|
flag: false, //表单提交标识
|
|
spinLoading: false,
|
|
confirmLoading: false,
|
|
selectedRowKeys: [],
|
|
pageNo: 1,
|
|
pageSize: 10,
|
|
pickerDate: '',
|
|
bodystyle:{}
|
|
}
|
|
},
|
|
props: {
|
|
selectedRowKeysArray: {
|
|
type: String,
|
|
default: '',
|
|
require: true
|
|
}
|
|
},
|
|
mounted() {
|
|
this.loadData()
|
|
this.bodystyle = {
|
|
height: '480px',
|
|
overflow: 'hidden',
|
|
overflowY: 'scroll',
|
|
}
|
|
},
|
|
methods: {
|
|
searchData(){
|
|
this.visible = true
|
|
},
|
|
loadData() {
|
|
this.loading = true
|
|
let params = {
|
|
pageNo: this.pageNo,
|
|
pageSize: this.pageSize,
|
|
...this.form
|
|
}
|
|
getAction(`sys/user/page`, params).then(res => {
|
|
if (res.success) {
|
|
this.areaTable = [...res.result.records]
|
|
this.total = res.result.total
|
|
}
|
|
}).finally(() => {
|
|
this.loading = false
|
|
})
|
|
},
|
|
searchQuery() {
|
|
this.loadData()
|
|
},
|
|
searchReset() {
|
|
this.form = {}
|
|
this.loadData()
|
|
},
|
|
handleCancel() {
|
|
this.visible = false
|
|
this.$emit('areaVisibleTaskCutOffTimeflag', false)
|
|
},
|
|
handleTableChange(val) {
|
|
},
|
|
//保存
|
|
handleSubmit() {
|
|
// let _this = this
|
|
// let param = {ids: this.selectedRowKeysArray, deadline: `${this.pickerDate}`, }
|
|
// this.confirmLoading = true
|
|
// postAction('/params/collectManifest/updateDeadlineBatch', param).then((res) => {
|
|
// if (res.success) {
|
|
// this.$emit('areaVisibleTaskCutOffTimeflag', false)
|
|
// this.$message.success(_this.$t('OperationSuccessful'))
|
|
// this.confirmLoading = false
|
|
// } else {
|
|
// this.$message.warning(_this.$t('operationFailed'))
|
|
// this.confirmLoading = false
|
|
// }
|
|
// })
|
|
this.$refs.ruleForm.validate(valid => {
|
|
if(valid){
|
|
let long = localStorage.getItem('language')
|
|
let cut = ''
|
|
if (long && long == 'zh-cn') {
|
|
this.cut = 'cn'
|
|
} else if (long && long == 'en-us') {
|
|
this.cut = 'en'
|
|
}
|
|
// let _array = []
|
|
// this.selectedRowKeysValue.forEach((item, index) => {
|
|
// _array.push(item.id)
|
|
// })
|
|
let _this = this
|
|
let param = {
|
|
paramsManifestId: this.$route.query.id,
|
|
projectId: this.$route.query.projectId,
|
|
ids: this.selectedRowKeysArray,
|
|
cut: this.cut,
|
|
deadline: `${this.pickerDate}`
|
|
|
|
}
|
|
this.textLoading = true
|
|
axios({
|
|
url: '/jero-boot/params/collectManifest/issueCollection',
|
|
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) => {
|
|
if (res.data.success) {
|
|
// _this.$message.success(this.$t('OperationSuccessful'))
|
|
if(res.data.result.length == 0){
|
|
this.visibleoperationFailed = false
|
|
this.textLoading = false
|
|
this.visible = false
|
|
_this.$message.success(this.$t('OperationSuccessful'))
|
|
this.$emit('areaVisibleTaskCutOffTimeflag', false)
|
|
this.$emit('GetgetTableList')
|
|
|
|
}else{
|
|
this.NotSelectedRowKeysValue = res.data.result
|
|
this.visibleoperationFailed = true
|
|
this.textLoading = false
|
|
this.visible = false
|
|
}
|
|
|
|
// this.$emit('areaVisibleTaskCutOffTimeflag', false)
|
|
// this.$emit('GetgetTableList')
|
|
} else {
|
|
_this.$message.warning(this.$t('operationFailed'))
|
|
}
|
|
})
|
|
.catch((error) => {
|
|
this.textLoading = false
|
|
})
|
|
}
|
|
})
|
|
},
|
|
// 错误数据的弹框
|
|
cancleoperationFailed() {
|
|
this.visibleoperationFailed = false
|
|
this.$emit('areaVisibleTaskCutOffTimeflag', false)
|
|
this.$emit('GetgetTableList')
|
|
// this.GetgetTableList()
|
|
},
|
|
onChange(val) {
|
|
this.pickerDate = moment(val).format('YYYY-MM-DD HH:mm:ss')
|
|
},
|
|
onOk(val) {
|
|
this.pickerDate = moment(val).format('YYYY-MM-DD HH:mm:ss')
|
|
},
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style lang='less' scoped>
|
|
@import '~@assets/less/common.less';
|
|
.box-title-text-index {
|
|
line-height: 1.4;
|
|
display: flex;
|
|
}
|
|
.diolag-area {
|
|
.table-area {
|
|
margin: 20px 0;
|
|
|
|
.action-edit {
|
|
margin-right: 10px;
|
|
}
|
|
}
|
|
|
|
.table-del {
|
|
color: red;
|
|
}
|
|
}
|
|
.drawer-bootom-button{
|
|
display: flex;
|
|
justify-content: center;
|
|
}
|
|
</style>
|
|
<style scoped>
|
|
/deep/.ant-modal-body{
|
|
height: 100% !important;
|
|
}
|
|
/deep/.ant-form-item-control{
|
|
width: 323%;
|
|
margin-top: 29px;
|
|
}
|
|
.box-title-text {
|
|
line-height: 1.4;
|
|
display: flex;
|
|
align-items: center;
|
|
/*margin-bottom: 10px;*/
|
|
}
|
|
|
|
.title-text {
|
|
width: 100%;
|
|
color: #000F16;
|
|
display: inline-block;
|
|
font-weight: 500;
|
|
font-size: 14px;
|
|
margin-right: 16px;
|
|
margin-top: 3px;
|
|
text-align: right;
|
|
white-space: nowrap;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
}
|
|
|
|
.box-input {
|
|
display: inline-block;
|
|
width: 70%;
|
|
height: 38px;
|
|
margin-top: 2px;
|
|
}
|
|
|
|
.itemModel {
|
|
width: 100%;
|
|
display: inline-block;
|
|
margin-top: 2px;
|
|
}
|
|
|
|
.Required {
|
|
color: red;
|
|
margin-right: 4px;
|
|
}
|
|
|
|
.title-text-text {
|
|
margin-top: 11px;
|
|
display: inline-block;
|
|
}
|
|
|
|
.header-text {
|
|
font-size: 16px;
|
|
font-weight: bold;
|
|
margin-left: 15px;
|
|
/*border-bottom: 1px #d9d9d9 dashed;*/
|
|
height: 30px;
|
|
margin-bottom: 30px;
|
|
}
|
|
|
|
.formAdd {
|
|
/*margin-bottom: 40px;*/
|
|
}
|
|
|
|
.button-text {
|
|
height: 38px;
|
|
width: calc(100% - 120px);
|
|
line-height: 38px;
|
|
background: #fff;
|
|
border: 1px #00B3BE solid;
|
|
color: #00B3BE;
|
|
}
|
|
::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> |