认证工程师分配填写人

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
+1
View File
@@ -1367,4 +1367,5 @@ module.exports = {
Referenceparametercolumn:'Reference Parameter Column',
Updateparametercolumn:'Update The Parameter Column',
columnfirst:'Reference the parameter column first',
columnforced:'Confirm a forced retraction?',
}
+1
View File
@@ -1468,4 +1468,5 @@ module.exports = {
Referenceparametercolumn:'引用参数列',
Updateparametercolumn:'更新参数列',
columnfirst:'请先引用参数列',
columnforced:'确认强制撤回?',
}
@@ -0,0 +1,261 @@
<template>
<div class='diolag-area'>
<a-spin :spinning='spinLoading' @keyup.enter.native="searchQuery">
<a-form-model
class='tag-module'
ref='ruleForm'
:model='form'
:rules='rules'
:label-col='labelCol'
:wrapper-col='wrapperCol'
>
<a-row :gutter='24' style='margin-left: -66px'>
<a-col :span='9'>
<a-form-model-item ref='paramsTemplateName' :label="$t('name')" prop='paramsTemplateName'>
<a-input
v-model='form.realname' />
</a-form-model-item>
</a-col>
<a-col :span='9'>
<a-form-model-item ref='paramsTemplateName' :label="$t('FNumber')" prop='paramsTemplateName'>
<a-input
v-model='form.username' />
</a-form-model-item>
</a-col>
<a-col :span='6' style='margin-top: 5px;'>
<a-button class='box-button' type='primary' @click='searchQuery'>{{ $t('query') }}</a-button>
<a-button class='box-button' style='margin-left: 8px' @click='searchReset'>{{ $t('reset') }}</a-button>
</a-col>
</a-row>
</a-form-model>
</a-spin>
<a-table
class='table-area'
ref='table'
size='middle'
rowKey='id'
:columns='columns'
:dataSource='areaTable'
:pagination='false'
:loading='loading'
:scroll='{x: 600}'
:rowSelection='{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}'
@change='handleTableChange'>
</a-table>
<div class="page">
<a-pagination
:show-total="total => $t('total')+` ${total} `+$t('strip')"
show-quick-jumper
show-size-changer
:page-size.sync="pageSize"
:total="total"
:current="pageNo"
@change="pageOnChange"
@showSizeChange="SizeChange"
/>
</div>
<div class='drawer-bootom-button'>
<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),
title: this.$t('add'),
total: 0,
selectedRowKeysDate: {},
loading: false,
editId: '',
columns: [
{
title: this.$t('name'),
dataIndex: 'realname',
key: 'showArea',
align: 'center',
ellipsis: true
},
{
title: this.$t('FNumber'),
align: 'center',
dataIndex: 'username',
ellipsis: true
}
],
newVisible: false,
labelCol: {
xs: { span: 24 },
sm: { span: 7 }
},
wrapperCol: {
xs: { span: 24 },
sm: { span: 14 }
},
form: {},
rules: {},
areaTable: [],
flag: false, //表单提交标识
spinLoading: false,
confirmLoading: false,
selectedRowKeys: [],
pageNo: 1,
pageSize: 10
}
},
props: {
selectedRowKeysArray: {
type: String,
default: '',
require: true
}
},
mounted() {
this.loadData()
},
methods: {
pageOnChange(page, pageSize) {
this.pageNo = page
this.loadData()
},
SizeChange(page, pageSize) {
this.pageNo = 1
this.pageSize = pageSize
this.loadData()
},
loadData() {
this.loading = true
let params = {
pageNo: this.pageNo,
pageSize: this.pageSize,
...this.form
}
if(this.form.username !== undefined) {
params.username = `*${this.form.username}*`
}
if(this.form.realname !== undefined) {
params.realname = `*${this.form.realname}*`
}
getAction(`params/collectManifest/drePage`, 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.$emit('areaVisible', false)
},
onSelectChange(selectedRowKeys, selectedRowKeysDate) {
this.selectedRowKeysDate = selectedRowKeysDate
this.selectedRowKeys = selectedRowKeys
},
handleTableChange(val) {
},
//新增
handleSubmit() {
let _this = this
if (this.selectedRowKeys.length == 0) {
this.$message.warning(this.$t('pleaseSelectData'))
} else if (this.selectedRowKeys.length > 1) {
this.$message.warning(this.$t('OnlyOneSelected'))
} else {
let param = {ids: this.selectedRowKeysArray, paramsManifestId:this.$route.query.id ,projectId: this.$route.query.projectId, dre:this.selectedRowKeysDate[0].username }
this.confirmLoading = true
axios({
url: '/jero-boot/params/collectManifest/certifiedEngineerUpdateDreBatch',
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.confirmLoading = false
this.$emit('GetgetLoginUserType')
this.$emit('GetgetTableList')
this.$emit('areaVisibleAssignedbyflag', false)
}else{
this.confirmLoading = false
_this.$message.warning(_this.$t('operationFailed'))
}
})
.catch( (error) =>{
this.confirmLoading = false
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;
}
::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>
@@ -55,7 +55,7 @@
</span>
<span slot="operationzr" slot-scope="record">
<span v-if='currentPersonRole === "homo"'>
<!-- 认证工程师 -->
<!-- 责任领域 -->
<span
v-if='record.state == "待发起收集" || record.state == "工程接口人退回" || record.state == "To be collected" || record.state == "Rejected by eng. interface"'>
<span :title='record.dataValue'
@@ -34,6 +34,7 @@
:placeholder="$t('pleaseEnter')"
v-model="record.remarks"/>
</span>
<!-- 历史记录-->
<template slot="Operation" slot-scope="text, record">
<a-button class="action-dict" @click="UpdateLog(record)">{{$t('historicalrecord')}}</a-button>
</template>
@@ -183,6 +184,11 @@
<span v-html="text"></span>
</a-tooltip>
</span>
<span slot="detailText" slot-scope="text,record">
<span class="text" :title="text">
{{text && text.length > 10?text.slice(0,9)+'...':text}}
</span>
</span>
</a-table>
<div class="page" v-if="dataSourcehistory.length > 0">
<a-pagination
@@ -338,6 +344,14 @@
ellipsis: true,
scopedSlots: { customRender: 'content' }
},
{
title: this.$t('remarks'),
dataIndex: 'remarks',
align: 'center',
ellipsis: true,
width: 180,
scopedSlots: { customRender: 'detailText' }
},
{
title: this.$t('OperationTime'),
dataIndex: 'createTime',
@@ -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
@@ -252,7 +252,7 @@
this.loadData()
},
handleCancel() {
this.$emit('areaVisible', false)
this.$emit('drawerhandleCancel', false)
},
onSelectChange(selectedRowKeys, selectedRowKeysDate) {
this.selectedRowKeysDate = selectedRowKeysDate