[update] 同步上报库
This commit is contained in:
@@ -0,0 +1,165 @@
|
|||||||
|
<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>是否同步选中行数据至上报库?</div>
|
||||||
|
<div>同步后的参数项将不可修改,仅能重新下发收集,已更新参数</div>
|
||||||
|
</a-col>
|
||||||
|
</a-row>
|
||||||
|
</a-form-model>
|
||||||
|
</a-spin>
|
||||||
|
<div class='drawer-bootom-button' style='margin-top: 20px'>
|
||||||
|
<a-button style='margin-right: .8rem' @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('areaVisible', 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 }
|
||||||
|
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) =>{
|
||||||
|
if (res.data.success) {
|
||||||
|
_this.$message.success(res.data.result)
|
||||||
|
this.$emit('areaVisibsynchronous', false)
|
||||||
|
}else{
|
||||||
|
_this.$message.warning(res.data.result)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.catch( (error) =>{
|
||||||
|
console.log(error);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</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;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
<style lang='less'>
|
||||||
|
.area-module {
|
||||||
|
.ant-modal-wrap {
|
||||||
|
.ant-modal {
|
||||||
|
.ant-modal-content {
|
||||||
|
.ant-modal-footer {
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.page{
|
||||||
|
display: flex;
|
||||||
|
justify-content: flex-end;
|
||||||
|
margin-bottom: 20px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -96,7 +96,7 @@
|
|||||||
{{$t('referenceparameter')}}
|
{{$t('referenceparameter')}}
|
||||||
</div>
|
</div>
|
||||||
<!-- 截止时间-->
|
<!-- 截止时间-->
|
||||||
<div @click="TaskCutOffTime" class="operator-text-title">
|
<div @click="TaskCutOffTimeLibrary" class="operator-text-title">
|
||||||
<a-icon type="bulb"/>
|
<a-icon type="bulb"/>
|
||||||
{{$t('TaskCutOffTime')}}
|
{{$t('TaskCutOffTime')}}
|
||||||
</div>
|
</div>
|
||||||
@@ -187,6 +187,11 @@
|
|||||||
<reference-parameter v-if='areaVisiblereferenceparameter' :paramsManifest='paramsManifest'
|
<reference-parameter v-if='areaVisiblereferenceparameter' :paramsManifest='paramsManifest'
|
||||||
:selectedRowKeysArray='selectedRowKeysArray'/>
|
:selectedRowKeysArray='selectedRowKeysArray'/>
|
||||||
</a-modal>
|
</a-modal>
|
||||||
|
<!-- 同步上报库--->
|
||||||
|
<a-modal v-model="areaVisibsynchronous" :title="$t('SynchronousReportLibrary')" width='650px' :footer="null">
|
||||||
|
<synchronous-submission-library v-if='areaVisibsynchronous' :paramsManifest='paramsManifest'
|
||||||
|
:selectedRowKeysArray='selectedRowKeysArray'/>
|
||||||
|
</a-modal>
|
||||||
</a-card>
|
</a-card>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -194,6 +199,7 @@
|
|||||||
import TableCollection from '@/components/tableCollection/index'
|
import TableCollection from '@/components/tableCollection/index'
|
||||||
import { getAction,postAction } from '../../../api/manage'
|
import { getAction,postAction } from '../../../api/manage'
|
||||||
import ParameterLibraryAdd from '@/components/ParameterLibraryAdd/index'
|
import ParameterLibraryAdd from '@/components/ParameterLibraryAdd/index'
|
||||||
|
import SynchronousSubmissionLibrary from '@/components/SynchronousSubmissionLibrary/index'
|
||||||
import TaskCutOffTime from '@/components/TaskCutOffTime/index'
|
import TaskCutOffTime from '@/components/TaskCutOffTime/index'
|
||||||
import ReferenceParameter from '@/components/ReferenceParameter/index'
|
import ReferenceParameter from '@/components/ReferenceParameter/index'
|
||||||
import AssignedBy from '@/components/AssignedBy/index'
|
import AssignedBy from '@/components/AssignedBy/index'
|
||||||
@@ -208,7 +214,8 @@ export default {
|
|||||||
ParameterLibraryAdd,
|
ParameterLibraryAdd,
|
||||||
AssignedBy,
|
AssignedBy,
|
||||||
TaskCutOffTime,
|
TaskCutOffTime,
|
||||||
ReferenceParameter
|
ReferenceParameter,
|
||||||
|
SynchronousSubmissionLibrary
|
||||||
},
|
},
|
||||||
data(){
|
data(){
|
||||||
return{
|
return{
|
||||||
@@ -294,6 +301,7 @@ export default {
|
|||||||
areaVisibleAssignedby: false, // 分配填写人弹框
|
areaVisibleAssignedby: false, // 分配填写人弹框
|
||||||
areaVisibleTaskCutOffTime: false, // 截至时间弹框
|
areaVisibleTaskCutOffTime: false, // 截至时间弹框
|
||||||
areaVisiblereferenceparameter: false, // 引用参数弹框
|
areaVisiblereferenceparameter: false, // 引用参数弹框
|
||||||
|
areaVisibsynchronous: false, // 同步上报库弹框
|
||||||
wrapperCol: {
|
wrapperCol: {
|
||||||
xs: { span: 24 },
|
xs: { span: 24 },
|
||||||
sm: { span: 14 }
|
sm: { span: 14 }
|
||||||
@@ -403,7 +411,9 @@ export default {
|
|||||||
}else if(this.sdt) {
|
}else if(this.sdt) {
|
||||||
flag = 0
|
flag = 0
|
||||||
this.$message.warning(this.$t('operatethisbutton'))
|
this.$message.warning(this.$t('operatethisbutton'))
|
||||||
} else {
|
} else {
|
||||||
|
flag = 0
|
||||||
|
console.log('ppp')
|
||||||
this.$message.warning(this.$t('operatethisbutton'))
|
this.$message.warning(this.$t('operatethisbutton'))
|
||||||
}
|
}
|
||||||
return flag
|
return flag
|
||||||
@@ -434,6 +444,32 @@ export default {
|
|||||||
}
|
}
|
||||||
return flag
|
return flag
|
||||||
},
|
},
|
||||||
|
// 填写人 截至时间 权限
|
||||||
|
// 仅仅状态为 可以截至时间
|
||||||
|
dreTaskCutOffTimeLibrary() {
|
||||||
|
// 定义开关 0为没有权限 1为有权限
|
||||||
|
let flag = 1
|
||||||
|
if(this.dre) {
|
||||||
|
if(this.selectedRowKeysValue.length == 0) {
|
||||||
|
flag = 0
|
||||||
|
this.$message.warning(this.$t('selectLeastOne'))
|
||||||
|
} else {
|
||||||
|
this.selectedRowKeysValue.forEach((item, index) => {
|
||||||
|
if(item.state !== '') {
|
||||||
|
flag = 0
|
||||||
|
}
|
||||||
|
})
|
||||||
|
if(flag === 1) {
|
||||||
|
flag = 1
|
||||||
|
} else {
|
||||||
|
this.$message.warning(this.$t('operatethisbutton'))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}else {
|
||||||
|
this.$message.warning(this.$t('operatethisbutton'))
|
||||||
|
}
|
||||||
|
return flag
|
||||||
|
},
|
||||||
// 认证工程师 强制撤回 权限
|
// 认证工程师 强制撤回 权限
|
||||||
// 仅仅状态为 待工程接口人处理 填写人退回 可以强制撤回
|
// 仅仅状态为 待工程接口人处理 填写人退回 可以强制撤回
|
||||||
homoJurisdictionCompulsoryWithdrawal() {
|
homoJurisdictionCompulsoryWithdrawal() {
|
||||||
@@ -493,6 +529,7 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
flag = 0
|
||||||
this.$message.success(this.$t('operatethisbutton'))
|
this.$message.success(this.$t('operatethisbutton'))
|
||||||
}
|
}
|
||||||
return flag
|
return flag
|
||||||
@@ -528,7 +565,7 @@ export default {
|
|||||||
dreJurisdictionSubmit() {
|
dreJurisdictionSubmit() {
|
||||||
// 定义开关 0为没有权限 1为有权限
|
// 定义开关 0为没有权限 1为有权限
|
||||||
let flag = 1
|
let flag = 1
|
||||||
if(this.sdt) {
|
if(this.dre) {
|
||||||
if (this.selectedRowKeysValue.length == 0) {
|
if (this.selectedRowKeysValue.length == 0) {
|
||||||
flag = 0
|
flag = 0
|
||||||
this.$message.warning(this.$t('selectLeastOne'))
|
this.$message.warning(this.$t('selectLeastOne'))
|
||||||
@@ -554,7 +591,7 @@ export default {
|
|||||||
dreJurisdictionreferenceParameter() {
|
dreJurisdictionreferenceParameter() {
|
||||||
// 定义开关 0为没有权限 1为有权限
|
// 定义开关 0为没有权限 1为有权限
|
||||||
let flag = 1
|
let flag = 1
|
||||||
if(this.sdt) {
|
if(this.dre) {
|
||||||
if (this.selectedRowKeysValue.length == 0) {
|
if (this.selectedRowKeysValue.length == 0) {
|
||||||
flag = 0
|
flag = 0
|
||||||
this.$message.warning(this.$t('selectLeastOne'))
|
this.$message.warning(this.$t('selectLeastOne'))
|
||||||
@@ -721,6 +758,7 @@ export default {
|
|||||||
console.log(error);
|
console.log(error);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
// 同步上报库 权限
|
||||||
handleSynchronousReportLibraryJurisdiction() {
|
handleSynchronousReportLibraryJurisdiction() {
|
||||||
let homoJurisdictionSynchronousLibrary = this.homoJurisdictionSynchronousLibrary()
|
let homoJurisdictionSynchronousLibrary = this.homoJurisdictionSynchronousLibrary()
|
||||||
if(homoJurisdictionSynchronousLibrary) {
|
if(homoJurisdictionSynchronousLibrary) {
|
||||||
@@ -729,7 +767,7 @@ export default {
|
|||||||
},
|
},
|
||||||
// 同步上报库
|
// 同步上报库
|
||||||
handleSynchronousReportLibrary() {
|
handleSynchronousReportLibrary() {
|
||||||
console.log('同步上报库')
|
this.areaVisibsynchronous = true
|
||||||
},
|
},
|
||||||
// 添加
|
// 添加
|
||||||
handleAdd() {
|
handleAdd() {
|
||||||
@@ -743,10 +781,7 @@ export default {
|
|||||||
// 提交
|
// 提交
|
||||||
handleSubmit() {
|
handleSubmit() {
|
||||||
// 先判断提交权限
|
// 先判断提交权限
|
||||||
if(this.homo || this.sdt) {
|
if(this.dre) {
|
||||||
// 认证工程师 工程接口人 任意状态 都无此权限
|
|
||||||
this.$message.warning(this.$t('operatethisbutton'))
|
|
||||||
} else {
|
|
||||||
// 填写人 权限
|
// 填写人 权限
|
||||||
let dreJurisdictionSubmit = this.dreJurisdictionSubmit()
|
let dreJurisdictionSubmit = this.dreJurisdictionSubmit()
|
||||||
if(dreJurisdictionSubmit) {
|
if(dreJurisdictionSubmit) {
|
||||||
@@ -777,6 +812,9 @@ export default {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
// 认证工程师 工程接口人 任意状态 都无此权限
|
||||||
|
this.$message.warning(this.$t('operatethisbutton'))
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
returnDataJurisdiction() {
|
returnDataJurisdiction() {
|
||||||
@@ -870,15 +908,19 @@ export default {
|
|||||||
},
|
},
|
||||||
// 分配填写人
|
// 分配填写人
|
||||||
assignedBy() {
|
assignedBy() {
|
||||||
if(this.homo) {
|
if(this.sdt) {
|
||||||
// 认证工程师 任意状态 都无此权限
|
|
||||||
this.$message.warning(this.$t('operatethisbutton'))
|
|
||||||
} else {
|
|
||||||
// 工程接口人
|
// 工程接口人
|
||||||
let sdtJurisdictionAssigned = this.sdtJurisdictionAssigned()
|
let sdtJurisdictionAssigned = this.sdtJurisdictionAssigned()
|
||||||
if(sdtJurisdictionAssigned) {
|
if(sdtJurisdictionAssigned) {
|
||||||
this.areaVisibleAssignedby = true
|
this.areaVisibleAssignedby = true
|
||||||
}
|
}
|
||||||
|
return
|
||||||
|
} else if(this.homo) {
|
||||||
|
// 认证工程师 任意状态 都无此权限
|
||||||
|
this.$message.warning(this.$t('operatethisbutton'))
|
||||||
|
}else if(this.dre) {
|
||||||
|
// 填写人 任意状态 都无此权限
|
||||||
|
this.$message.warning(this.$t('operatethisbutton'))
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 分配填写人确定后弹框关闭
|
// 分配填写人确定后弹框关闭
|
||||||
@@ -886,12 +928,15 @@ export default {
|
|||||||
this.areaVisibleAssignedby = val
|
this.areaVisibleAssignedby = val
|
||||||
},
|
},
|
||||||
// 截止时间
|
// 截止时间
|
||||||
TaskCutOffTime() {
|
TaskCutOffTimeLibrary() {
|
||||||
if(this.homo || this.sdt) {
|
if(this.homo || this.sdt) {
|
||||||
// 认证工程师 任意状态 都无此权限
|
// 认证工程师 任意状态 都无此权限
|
||||||
this.$message.warning(this.$t('operatethisbutton'))
|
this.$message.warning(this.$t('operatethisbutton'))
|
||||||
} else {
|
} else {
|
||||||
this.areaVisibleTaskCutOffTime = true
|
let dreTaskCutOffTimeLibrary = this.dreTaskCutOffTimeLibrary()
|
||||||
|
if(dreTaskCutOffTimeLibrary) {
|
||||||
|
this.areaVisibleTaskCutOffTime = true
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 截至时间确定弹框关闭
|
// 截至时间确定弹框关闭
|
||||||
|
|||||||
Reference in New Issue
Block a user