认证工程师分配填写人

This commit is contained in:
zyx.net
2022-12-12 13:30:01 +08:00
parent 9dd34bd320
commit e4cc5c5f51
7 changed files with 376 additions and 37 deletions
@@ -177,6 +177,11 @@
<a-icon type="solution"/>
{{$t('Adjustareasofresponsibility')}}
</div>
<!-- 认证工程师分配填写人-->
<div @click="assignedByHomo" class="operator-text-title" v-if='currentPersonRole == "homo" '>
<a-icon type="copy"/>
{{$t('Assignedby')}}
</div>
</template>
<!-- @click='morepop'-->
<div class="operator-text" style="position: relative " v-if='currentPersonRole == "homo" || currentPersonRole == "sdt"'>
@@ -309,6 +314,13 @@
@GetgetLoginUserType='GetgetLoginUserType'
@areaVisibleAssignedbyflag='areaVisibleAssignedbyflag' @areaVisible='areaVisibleAssignedby = false'/>
</a-modal>
<!-- 认证分配填写人--->
<a-modal v-model="areaVisibleAssignedbyhomo" :title="$t('Assignedby')" width='950px' :footer="null">
<assigned-by-homo v-if='areaVisibleAssignedbyhomo' :selectedRowKeysArray='selectedRowKeysArray'
@GetgetTableList='GetgetTableList'
@GetgetLoginUserType='GetgetLoginUserType'
@areaVisibleAssignedbyflag='areaVisibleAssignedbyflag' @areaVisible='areaVisibleAssignedbyhomo = false'/>
</a-modal>
<!-- 下发收集--->
<!-- <a-modal v-model="areaVisibleTaskCutOffTime" :title="$t('distributionAndCollection')" width='400px' :footer="null">-->
<task-cut-off-time ref='areaVisibleTaskCutOffTime' :selectedRowKeysArray='selectedRowKeysArray'
@@ -443,6 +455,10 @@
<span v-else-if='jurisdiction === "SDTFPTXR"' class="text-wraning">
'{{$t('handledInterface')}}'{{$t('or')}}'{{$t('Filledreturn')}}'
</span>
<!-- 分配填写人 -->
<span v-else-if='jurisdiction === "SDTFPTXRHOMO"' class="text-wraning">
'{{$t('completed')}}'
</span>
<!-- 引用参数-->
<span v-else-if='jurisdiction === "DREYYCS"' class="text-wraning">
'{{$t('completed')}}'{{$t('or')}}'{{$t('ReturnedEngineer')}}'
@@ -494,6 +510,7 @@
import AdjustareaSofrespon from '@/components/AdjustareaSofrespon/index'
import ReferenceParameter from '@/components/ReferenceParameter/index'
import AssignedBy from '@/components/AssignedBy/index'
import AssignedByHomo from '@/components/AssignedByHomo/index'
import ImportFileOnlyList from '@/components/ImportFileOnlyListtag/index'
import axios from 'axios'
import { ACCESS_TOKEN } from '@/store/mutation-types'
@@ -507,6 +524,7 @@
ParameterLibraryAdd,
parameterColumn,
AssignedBy,
AssignedByHomo,
AdjustareaSofrespon,
ImportFileOnlyList,
TaskCutOffTime,
@@ -688,6 +706,7 @@
Dateline: {},
areaVisibleFreeze: false, // 冻结配置
areaVisibleAssignedby: false, // 分配填写人弹框
areaVisibleAssignedbyhomo: false, // 认证分配填写人弹框
areaVisibleTaskCutOffTime: false, // 截至时间弹框
OneclickCollection:false,
parametercolumn:false,
@@ -1148,6 +1167,27 @@
}
return flag
},
// 认证工程师 分配填写人 权限
// 仅仅状态为 待填写 可以分配填写人
sdtJurisdictionAssignedhomo() {
// 定义开关 0为没有权限 1为有权限
this.NotSelectedRowKeysValue = []
let flag = 1
if (this.selectedRowKeysValue.length == 0) {
flag = 2
this.$message.warning(this.$t('selectLeastOne'))
} else {
this.selectedRowKeysValue.forEach((item, index) => {
console.log(item.state)
if (item.state !== '待填写' && item.state !== 'To be filled') {
this.NotSelectedRowKeysValue.push(item)
flag = 0
}
})
}
console.log(flag)
return flag
},
// 填写人 提交 权限
// 仅仅状态为 待填写 认证工程师退回 可以提交
dreJurisdictionSubmit() {
@@ -1340,7 +1380,6 @@
},
// 引用参数列
Referenceparametercolumn() {
console.log(1111)
this.parametercolumn = true
},
Updateparametercolumn() {
@@ -1348,16 +1387,20 @@
console.log(data)
let referencesCol = []
let postDate = []
let colunmnFlag = ''
data.forEach((item,index) => {
if(!item.dutyTerritory){
this.$message.warning(this.$t('columnfirst'))
return
if(!item.referencesCol){
this.colunmnFlag = true
}
referencesCol.push({
referencesCol: item.referencesCol,
id: item.id
})
})
if(this.colunmnFlag){
this.$message.warning(this.$t('columnfirst'))
return
}
for (let i = 0; i < referencesCol.length; i++) {
let postDateobj = {}
let itemIn = Object.keys(referencesCol[i])
@@ -1665,48 +1708,55 @@
})
let _this = this
let param = { ids: _array.join(',') }
this.textLoading = true
let url = ''
if(this.currentPersonRole == 'homo'){
url = '/jero-boot/params/collectManifest/mandatoryWithdraw'
}else{
url = '/jero-boot/params/collectManifest/withdraw'
}
axios({
url: url,
method: 'post',
data: param,
transformRequest: [function(data) {
let ret = ''
for (let it in data) {
ret += encodeURIComponent(it) + '=' + encodeURIComponent(data[it]) + '&'
this.$confirm({
title: this.$t('columnforced'),
content: '',
onOk:
async () => {
this.textLoading = true
axios({
url: url,
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.textLoading = false
_this.$message.success(_this.$t('OperationSuccessful'))
_this.GetgetTableList()
_this.selectedRowKeysValue = []
} else {
this.textLoading = false
_this.$message.warning(_this.$t('operationFailed'))
}
})
.catch((error) => {
this.textLoading = false
})
}
return ret
}],
headers: {
'Content-Type': 'application/x-www-form-urlencoded',
'X-Access-Token': _this.token
}
})
.then((res) => {
if (res.data.success) {
this.textLoading = false
_this.$message.success(_this.$t('OperationSuccessful'))
_this.GetgetTableList()
_this.selectedRowKeysValue = []
} else {
this.textLoading = false
_this.$message.warning(_this.$t('operationFailed'))
}
})
.catch((error) => {
this.textLoading = false
})
},
// 分配填写人
assignedBy() {
// 工程接口人
let sdtJurisdictionAssigned = this.sdtJurisdictionAssigned()
let sdtJurisdictionAssigned = this.sdtJurisdictionAssigned()
// 工程接口人
if (sdtJurisdictionAssigned == 1) {
this.areaVisibleAssignedby = true
} else if (sdtJurisdictionAssigned == 0) {
@@ -1714,6 +1764,18 @@
this.jurisdiction = 'SDTFPTXR'
}
},
// 认证分配填写人
assignedByHomo() {
let sdtJurisdictionAssigned = this.sdtJurisdictionAssignedhomo()
// 工程接口人
if (sdtJurisdictionAssigned == 1) {
this.areaVisibleAssignedbyhomo = true
} else if (sdtJurisdictionAssigned == 0) {
this.visibleoperationFailed = true
this.jurisdiction = 'SDTFPTXRHOMO'
}
},
// 分配填写人确定后弹框关闭
areaVisibleAssignedbyflag(val) {
this.areaVisibleAssignedby = val