参数项清单增加一键下发收集功能

删除截止时间按钮
This commit is contained in:
zyx.net
2022-07-19 11:36:06 +08:00
parent f7fc4db560
commit bf7957a776
5 changed files with 667 additions and 87 deletions
@@ -131,10 +131,10 @@
{{$t('SynchronousReportLibrary')}}
</div>
<!-- 截止时间-->
<div @click="TaskCutOffTimeLibrary" class="operator-text-title">
<a-icon type="bulb"/>
{{$t('TaskCutOffTime')}}
</div>
<!-- <div @click="TaskCutOffTimeLibrary" class="operator-text-title">-->
<!-- <a-icon type="bulb"/>-->
<!-- {{$t('TaskCutOffTime')}}-->
<!-- </div>-->
<!-- 批量删除-->
<div @click="handleDelJurisdiction" class="operator-text-title">
<a-icon type="delete"/>
@@ -154,6 +154,11 @@
<a-icon type="solution"/>
{{$t('distributionAndCollection')}}
</div>
<!-- 一键下发收集 -->
<div @click="defOneclickCollection" class="operator-text" v-if='currentPersonRole == "homo"'>
<a-icon type="solution"/>
{{$t('OneclickCollection')}}
</div>
<!-- 分配填写人-->
<div @click="assignedBy" class="operator-text" v-if='currentPersonRole == "sdt" '>
<a-icon type="copy"/>
@@ -257,12 +262,19 @@
@GetgetLoginUserType='GetgetLoginUserType'
@areaVisibleAssignedbyflag='areaVisibleAssignedbyflag' @areaVisible='areaVisibleAssignedby = false'/>
</a-modal>
<!-- 截至时间--->
<a-modal v-model="areaVisibleTaskCutOffTime" :title="$t('TaskCutOffTime')" width='600px' :footer="null">
<!-- 下发收集--->
<a-modal v-model="areaVisibleTaskCutOffTime" :title="$t('distributionAndCollection')" width='600px' :footer="null">
<task-cut-off-time v-if='areaVisibleTaskCutOffTime' :selectedRowKeysArray='selectedRowKeysArray'
@GetgetTableList='GetgetTableList'
@areaVisibleTaskCutOffTimeflag='areaVisibleTaskCutOffTimeflag'/>
</a-modal>
<!-- 一键下发收集--->
<a-modal v-model="OneclickCollection" :title="$t('OneclickCollection')" width='600px' :footer="null">
<task-time v-if='OneclickCollection' :selectedRowKeysArray='selectedRowKeysArray'
@GetgetTableList='GetgetTableList'
@areaVisibleTaskCutOffTimeAll='areaVisibleTaskCutOffTimeAll'/>
</a-modal>
<!-- 引用参数--->
<a-modal v-model="areaVisiblereferenceparameter" :title="$t('referenceparameter')" width='650px' :footer="null">
<reference-parameter v-if='areaVisiblereferenceparameter' :paramsManifest='paramsManifest'
@@ -404,6 +416,7 @@
import globalAdvancedQuery from '@/components/globalAdvancedQuery/index'
import SynchronousSubmissionLibrary from '@/components/SynchronousSubmissionLibrary/index'
import TaskCutOffTime from '@/components/TaskCutOffTime/index'
import TaskTime from '@/components/TaskCutOffTime/indexonekey'
import ReferenceParameter from '@/components/ReferenceParameter/index'
import AssignedBy from '@/components/AssignedBy/index'
import axios from 'axios'
@@ -420,6 +433,7 @@
TaskCutOffTime,
ReferenceParameter,
SynchronousSubmissionLibrary,
TaskTime,
globalAdvancedQuery
},
data() {
@@ -575,6 +589,7 @@
areaVisibleFreeze: false, // 冻结配置
areaVisibleAssignedby: false, // 分配填写人弹框
areaVisibleTaskCutOffTime: false, // 截至时间弹框
OneclickCollection:false,
areaVisiblereferenceparameter: false, // 引用参数弹框
areaVisibsynchronous: false, // 同步上报库弹框
visibleoperationFailed: false, // 数据失败的弹框
@@ -1087,62 +1102,72 @@
},
// 下发收集的权限
distributionAndCollectionJurisdiction() {
let homodistributionAndCollection = this.homodistributionAndCollection()
if (homodistributionAndCollection == 1) {
this.distributionAndCollection()
} else if (homodistributionAndCollection == 0) {
this.visibleoperationFailed = true
this.jurisdiction = 'HOMOZFSJ'
} else if (homodistributionAndCollection == 3) {
this.visibleoperationFailed = true
this.NoEngineer = 0
if(this.selectedRowKeysValue.length == 0){
this.$message.warning(this.$t('selectLeastOne'))
}else{
this.areaVisibleTaskCutOffTime = true
}
// let homodistributionAndCollection = this.homodistributionAndCollection()
// if (homodistributionAndCollection == 1) {
// this.areaVisibleTaskCutOffTime = true
// // this.distributionAndCollection()
// } else if (homodistributionAndCollection == 0) {
// this.visibleoperationFailed = true
// this.jurisdiction = 'HOMOZFSJ'
// } else if (homodistributionAndCollection == 3) {
// this.visibleoperationFailed = true
// this.NoEngineer = 0
// }
},
// 下发收集---请求接口
distributionAndCollection() {
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: _array.join(',')
}
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'))
_this.areaVisible = false
this.textLoading = false
_this.GetgetTableList()
} else {
this.textLoading = false
_this.$message.warning(this.$t('operationFailed'))
}
})
.catch((error) => {
this.textLoading = false
})
// 一键下发收集
defOneclickCollection() {
this.OneclickCollection = true
},
// // 下发收集---请求接口
// distributionAndCollection() {
//
// 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: _array.join(',')
// }
// 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'))
// _this.areaVisible = false
// this.textLoading = false
// _this.GetgetTableList()
// } else {
// this.textLoading = false
// _this.$message.warning(this.$t('operationFailed'))
// }
// })
// .catch((error) => {
// this.textLoading = false
// })
// },
// 同步上报库 权限
handleSynchronousReportLibraryJurisdiction() {
let homoJurisdictionSynchronousLibrary = this.homoJurisdictionSynchronousLibrary()
@@ -1412,20 +1437,26 @@
this.areaVisibleAssignedby = val
},
// 截止时间
TaskCutOffTimeLibrary() {
let dreTaskCutOffTimeLibrary = this.dreTaskCutOffTimeLibrary()
if (dreTaskCutOffTimeLibrary == 1) {
this.areaVisibleTaskCutOffTime = true
} else if (dreTaskCutOffTimeLibrary == 0) {
this.visibleoperationFailed = true
this.jurisdiction = 'HOMOJZSJ'
}
},
// TaskCutOffTimeLibrary() {
// let dreTaskCutOffTimeLibrary = this.dreTaskCutOffTimeLibrary()
// if (dreTaskCutOffTimeLibrary == 1) {
// this.areaVisibleTaskCutOffTime = true
// } else if (dreTaskCutOffTimeLibrary == 0) {
// this.visibleoperationFailed = true
// this.jurisdiction = 'HOMOJZSJ'
// }
// },
// 截至时间确定弹框关闭
areaVisibleTaskCutOffTimeflag(val) {
console.log(val)
this.areaVisibleTaskCutOffTime = val
this.$refs.CollectionTabel.getTableList()
},
areaVisibleTaskCutOffTimeAll(val){
console.log(val)
this.OneclickCollection = val
this.$refs.CollectionTabel.getTableList()
},
//引用参数
referenceparameter() {
let dreJurisdictionreferenceParameter = this.dreJurisdictionreferenceParameter()