Files
laws_weilai/jero-web/src/views/projectManagement/components/ParameterItemCollectionList.vue
T
2022-06-27 11:43:51 +08:00

1343 lines
47 KiB
Java

<template>
<a-card :bordered="false">
<div class="table-page-search-wrapper doc-detail">
<div class="Virtual-detail-header" style="top: 0">
<div class="Virtual-detail-title">
<span>
{{ $t('ParameteItemCollectionList') }}
</span>
</div>
</div>
<!-- 认证参数收集-参数项收集清单-10控件-->
<div class='Virtual-detail-content' style='margin-top: 15px'>
<a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row :gutter="24" style='margin-left: -90px;'>
<a-col :md="6" :sm="8">
<div class="box-title-text">
<div class="title-text" :title="$t('NiONumber')">
<span>{{$t('NiONumber')}}</span>
</div>
<a-input class="box-input" :placeholder="$t('PleaseEnter')+$t('NiONumber')"
v-model="formInline.nioNumber"></a-input>
</div>
</a-col>
<a-col :md="6" :sm="8">
<div class="box-title-text">
<div class="title-text" :title="$t('ParameterName')">
<span>{{$t('ParameterName')}}</span>
</div>
<a-input class="box-input" :placeholder="$t('PleaseEnter')+$t('ParameterName')"
v-model="formInline.paramsName"></a-input>
</div>
</a-col>
<a-col :md="6" :sm="8">
<div class="box-title-text">
<div class="title-text" :title="$t('certificationCategory')">
<span>{{$t('certificationCategory')}}</span>
</div>
<j-dict-select-tag class="box-input" v-model="formInline.certCategory"
:placeholder="$t('PleaseSelect')+$t('certificationCategory')"
:type="'select'"
:triggerChange="false" :dictCode="'cert_category'"/>
</div>
</a-col>
<a-col :md="6" :sm="8">
<div class="box-title-text">
<div class="title-text" :title="$t('areaOfResponsibility')">
<span>{{$t('areaOfResponsibility')}}</span>
</div>
<j-dict-select-tag class="box-input" v-model="formInline.dutyTerritory"
:placeholder="$t('PleaseSelect')+$t('areaOfResponsibility')"
:type="'select'"
:triggerChange="false" :dictCode="'duty_territory'"/>
</div>
</a-col>
<a-col :md="6" :sm="8">
<div class="box-title-text">
<div class="title-text" :title="$t('completedBy')">
<span>{{$t('completedBy')}}</span>
</div>
<a-input class="box-input" :placeholder="$t('PleaseEnter')+$t('completedBy')"
v-model="formInline.dre"></a-input>
</div>
</a-col>
<span style="float: right;overflow: hidden;margin-right: 11px" class="table-page-search-submitButtons">
<a-col :md="6" :sm="24">
<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>
</span>
</a-row>
</a-form>
</div>
</div>
<div class="table-operator">
<!-- // 认证工程师 homo-->
<!-- // 工程接口人 sdt-->
<!-- // 填写人 dre-->
<!-- // R&H Studio studio-->
<!-- // R&H Manager manager-->
<!-- // 系统管理员 admin-->
<!-- // 游客 guest-->
<a-popconfirm overlayClassName='popconfirm' placement="bottomRight" v-if='currentPersonRole == "homo"'>
<template slot="title" id="popconfirm">
<!-- 添加-->
<div @click="handleAdd" class="operator-text-title">
<a-icon type="plus"/>
{{$t('addTo')}}
</div>
<!-- 下发收集 -->
<div @click="distributionAndCollectionJurisdiction" class="operator-text-title">
<a-icon type="solution"/>
{{$t('distributionAndCollection')}}
</div>
<!-- 冻结配置-->
<div @click="freezeConfiguration" class="operator-text-title">
<a-icon type="solution"/>
{{$t('FreezeConfiguration')}}
</div>
<!-- 同步上报库 -->
<div @click="handleSynchronousReportLibraryJurisdiction" class="operator-text-title">
<a-icon type="setting"/>
{{$t('SynchronousReportLibrary')}}
</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"/>
{{$t('BatchDelete')}}
</div>
</template>
<div class="operator-text" style="position: relative">
<span style="position: absolute;left: -13px;top: -4px">...</span>{{ $t('more') }}
</div>
</a-popconfirm>
<!-- 分配填写人-->
<div @click="assignedBy" class="operator-text" v-if='currentPersonRole == "sdt" '>
<a-icon type="copy"/>
{{$t('Assignedby')}}
</div>
<!-- 引用参数-->
<div @click="referenceparameter" class="operator-text" v-if='currentPersonRole == "dre" '>
<a-icon type="plus"/>
{{$t('referenceparameter')}}
</div>
<!-- 提交-->
<div @click="handleSubmit" class="operator-text" v-if='currentPersonRole == "dre"'>
<a-icon type="check-circle"/>
{{$t('submit')}}
</div>
<!-- 退回-->
<div @click="returnDataJurisdiction" class="operator-text" v-if='currentPersonRole == "sdt" || currentPersonRole == "homo" || currentPersonRole == "dre"'>
<a-icon type="delete"/>
{{$t('sendBack')}}
</div>
<!-- 强制撤回-->
<div @click="compulsoryWithdrawaljurisdiction" class="operator-text" v-if='currentPersonRole == "homo" || currentPersonRole == "sdt" ||currentPersonRole == "dre"'>
<a-icon type="delete"/>
{{$t('CompulsoryWithdrawal')}}
</div>
<!-- 角色切换 -->
<div class="operator-text"
@click="roleSwitchingClick">
<a-icon type="select"/>
{{ $t('roleSwitching') }}
</div>
</div>
<div style="width: 100%">
<!-- 表格-10控件-->
<table-collection ref="CollectionTabel" :url='url' :paramsManifest='paramsManifest' @rowValue='rowValue'
:formInline='formInline' :currentPersonRole='currentPersonRole' @value='value' @listReset='listReset' @LoginUserType='LoginUserType'/>
</div>
<!-- 添加--->
<a-modal v-model="areaVisible" :title="$t('ParameterLibrary')" width='750px' :footer="null">
<parameter-library-add v-if='areaVisible' :paramsManifest='paramsManifest' @areaVisible='areaVisible = false' @GetgetTableList='GetgetTableList'/>
</a-modal>
<!-- 冻结配置--->
<a-modal v-model="areaVisibleFreeze" :title="$t('FreezeConfiguration')" width='500px' :footer="null">
<a-form-model
class='tag-module'
ref='ruleForm'
:model='Dateline'
:rules='rules'
:label-col='labelCol'
:wrapper-col='wrapperCol'
>
<a-row :gutter='24'>
<a-col :span='24'>
<a-form-model-item ref='region' :label="$t('FreezeConfiguration')" prop='region'>
<a-select :placeholder="$t('PleaseSelect')+$t('FreezeConfiguration')" v-model="Dateline.paramsConfig" allowClear mode="multiple">
<a-select-option v-for="(item, key) in FreezeList" :key="key" :value="item.value">
<span style="display: inline-block;width: 100%" :title=" item.label ">
{{ item.label }}
</span>
</a-select-option>
</a-select>
</a-form-model-item>
</a-col>
</a-row>
</a-form-model>
<div style='padding-left: 60px;color: red'>
{{$t('Attentionfreeze')}}
</div>
<div class="imports-footer">
<div class="imports-footer-wrap">
<a-button class="imports-btn imports-sub" type="primary" @click="handleSubmitFreeze">{{$t('preservation')}}
</a-button>
<a-button class="imports-btn" type="primary" @click="cancleImportsFreeze">{{$t('cancel')}}</a-button>
</div>
</div>
</a-modal>
<!-- 分配填写人--->
<a-modal v-model="areaVisibleAssignedby" :title="$t('Assignedby')" width='950px' :footer="null">
<assigned-by v-if='areaVisibleAssignedby' :selectedRowKeysArray='selectedRowKeysArray' @GetgetTableList='GetgetTableList'
@GetgetLoginUserType='GetgetLoginUserType'
@areaVisibleAssignedbyflag='areaVisibleAssignedbyflag' @areaVisible='areaVisibleAssignedby = false'/>
</a-modal>
<!-- 截至时间--->
<a-modal v-model="areaVisibleTaskCutOffTime" :title="$t('TaskCutOffTime')" width='600px' :footer="null">
<task-cut-off-time v-if='areaVisibleTaskCutOffTime' :selectedRowKeysArray='selectedRowKeysArray'
@GetgetTableList='GetgetTableList'
@areaVisibleTaskCutOffTimeflag='areaVisibleTaskCutOffTimeflag'/>
</a-modal>
<!-- 引用参数--->
<a-modal v-model="areaVisiblereferenceparameter" :title="$t('referenceparameter')" width='650px' :footer="null">
<reference-parameter v-if='areaVisiblereferenceparameter' :paramsManifest='paramsManifest' @GetgetTableList='GetgetTableList'
@areaVisibleAssignedbyflag='areaVisiblereferenceparameter = false'
:selectedRowKeysArray='selectedRowKeysArray'/>
</a-modal>
<!-- 同步上报库--->
<a-modal v-model="areaVisibsynchronous" :title="$t('SynchronousReportLibrary')" width='650px' :footer="null">
<synchronous-submission-library v-if='areaVisibsynchronous' :paramsManifest='paramsManifest' @GetgetTableList='GetgetTableList'
:selectedRowKeysArray='selectedRowKeysArray' @areaVisibsynchronous='areaVisibsynchronous = false'/>
</a-modal>
<!-- 切换角色-->
<a-modal
:title="$t('roleSwitching')"
:width="500"
:visible="visibleRoleSwitching"
:confirm-loading="confirmLoadingRoleSwitching"
:maskClosable="false"
@ok="handleOkRoleSwitching"
@cancel="handleCancelRoleSwitching"
>
<a-form-model :model="formInlineRoleSwitching" class="formAdd" :rules="rulesRoleSwitching"
ref="ruleFormRoleSwitching">
<a-row :gutter="24">
<a-col :span="24">
<div class="box-title-text-index">
<div class="title-text-Comment">
<span class="Required">*</span>
<span class="title-text-text" :title="$t('roleSwitching')">{{$t('roleSwitching')}}</span>
</div>
<a-form-model-item class="itemModelComment itemitem" :prop="'roleSwitchingCode'">
<a-select allowClear :placeholder="$t('pleaseSelect')+$t('roleSwitching')"
v-model="formInlineRoleSwitching.roleSwitchingCode">
<a-select-option v-for="(item, key) in RoleType" :key="key" :value="item.value">
<span style="display: inline-block;width: 100%" :title=" item.label " >
{{ item.label }}
</span>
</a-select-option>
</a-select>
</a-form-model-item>
</div>
</a-col>
</a-row>
</a-form-model>
</a-modal>
<!-- 错误数据提示-->
<a-modal
:title="$t('operationFailed')"
:width="700"
v-model="visibleoperationFailed"
:maskClosable="false"
:footer="null"
>
<a-row :gutter="24">
<a-col :span="24">
<!-- 没有工程接口人,导致下发收集失败提示-->
<span v-if='NoEngineer === 0'>
{{$t('NiOnumberis')}}
</span>
<span style='font-size: 16px;margin-bottom: 20px;' v-for='(item,key) in NotSelectedNoEngineerValue' v-if='NoEngineer === 0'>
<span style='color: red'>{{ item.nioNumber }}、</span>
</span>
<span v-if='NoEngineer === 0'>
{{$t('Filledperson')}}
</span>
<!-- 状态不符合,导致不能操作按钮,没有权限-->
<div style='font-size: 18px;margin-bottom: 20px;display: flex;justify-content: center' class="box-title-text-index" v-for='(item,key) in NotSelectedRowKeysValue' v-if='NoEngineer === 1'>
<div>{{$t('NiOnumberis')}}{{ item.nioNumber }},{{$t('Statusis')}}<span style='color: red'>{{ item.state }}</span>,{{$t('NoOperationPermissionForthisbutton')}}。</div>
</div>
<!-- 认证工程师-提示-->
<div style='font-size: 16px;color: red;display: flex;justify-content: center' v-if='NoEngineer === 1'>
{{ currentPersonRole =='homo'? $t('certifiedEngineer'): (currentPersonRole =='sdt'? $t('engineeringInterfacePerson'): $t('completedBy')) }}{{$t('Datastatusis')}}
<!-- 下发收集时-->
<span v-if='jurisdiction === "HOMOZFSJ"'>
'{{$t('CollectionInitiated')}}'、'{{$t('ReturnedPerson')}}'{{$t('or')}}'{{$t('alteration')}}'
</span>
<!-- 同步上报库-->
<span v-if='jurisdiction === "HOMOTBSBK"'>
'{{$t('Submitted')}}'{{$t('or')}}'{{$t('alteration')}}'
</span>
<!-- 截止时间-->
<span v-if='jurisdiction === "HOMOJZSJ"'>
'{{$t('CollectionInitiated')}}'
</span>
<!-- 分配填写人 -->
<span v-if='jurisdiction === "SDTFPTXR"'>
'{{$t('handledInterface')}}'{{$t('or')}}'{{$t('Filledreturn')}}'
</span>
<!-- 引用参数-->
<span v-if='jurisdiction === "DREYYCS"'>
'{{$t('completed')}}'{{$t('or')}}'{{$t('ReturnedEngineer')}}'
</span>
<!-- 退回-->
<span v-if='jurisdiction === "homoTH"'>
{{$t('Submitted')}}
</span>
<span v-if='jurisdiction === "sdtTH"'>
'{{$t('handledInterface')}}'{{$t('or')}}'{{$t('Filledreturn')}}'
</span>
<span v-if='jurisdiction === "dreTH"'>
'{{$t('completed')}}'{{$t('or')}}'{{$t('ReturnedEngineer')}}'
</span>
<!-- 强制撤回-->
<span v-if='jurisdiction === "homoQZTH"'>
'{{$t('handledInterface')}}'{{$t('or')}}'{{$t('Filledreturn')}}'
</span>
<span v-if='jurisdiction === "sdtQZTH"'>
{{$t('completed')}}
</span>
<span v-if='jurisdiction === "dreQZTH"'>
{{$t('Submitted')}}
</span>
{{$t('timeoperation')}}
</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>
</a-card>
</template>
<script>
import TableCollection from '@/components/tableCollection/index'
import { getAction,postAction } from '../../../api/manage'
import ParameterLibraryAdd from '@/components/ParameterLibraryAdd/index'
import SynchronousSubmissionLibrary from '@/components/SynchronousSubmissionLibrary/index'
import TaskCutOffTime from '@/components/TaskCutOffTime/index'
import ReferenceParameter from '@/components/ReferenceParameter/index'
import AssignedBy from '@/components/AssignedBy/index'
import axios from 'axios'
import { ACCESS_TOKEN } from '@/store/mutation-types'
import Vue from 'vue'
export default {
name: 'ParameterItemCollectionList',
components:{
TableCollection,
ParameterLibraryAdd,
AssignedBy,
TaskCutOffTime,
ReferenceParameter,
SynchronousSubmissionLibrary
},
data(){
return{
// 认证工程师 homo
// 工程接口人 sdt
// 填写人 dre
// R&H Studio studio
// R&H Manager manager
// 系统管理员 admin
// 游客 guest
columns:[
{
title: this.$t('title'),
align: 'center',
dataIndex: 'title',
scopedSlots: { customRender: 'paramsManifestClick' }
},
{
title: this.$t('status'),
align: 'center',
dataIndex: 'state',
},
{
title: this.$t('parameterTemplateName'),
align: 'center',
dataIndex: 'paramsTemplateName',
},
{
title: this.$t('collectionCompletionTime'),
align: 'center',
dataIndex: 'finishTime',
},
{
title: this.$t('Version'),
align: 'center',
dataIndex: 'version',
},
{
title: this.$t('creator'),
align: 'center',
dataIndex: 'createBy',
},
{
title: this.$t('createTime'),
align: 'center',
dataIndex: 'createTime',
},
{
title: this.$t('operation'),
align: 'center',
fixed: 'right',
width: 200,
scopedSlots: { customRender: 'operation' }
}
],
selectedRowKeys: [],
formInline: {},
url: {
tableHeader: 'params/collectManifest/getHeader',
tableList: 'params/collectManifest/list',
add: 'params/collectManifest/submit',
getLoginUserType: 'params/collectManifest/getLoginUserType', // 获取当前登陆人
getquerySdtList: 'params/collectManifest/querySdtList', // 获取工程接口人的列表
updateSdt: 'params/collectManifest/updateSdt', // 提交工程接口人
deleteBatch: 'params/collectManifest/deleteBatch',
},
loading: false,
dataSource: [],
areaVisible: false, // 弹框的控制
configureareaVisible: false, // 配置的彈框
pageNo: 1,
pageSize: 10,
total: 0,
selectedRowKeysArray: '',
templatetitle: '',
templatetitleId: '',
rowId: '',
version: 0,
itemId: '',
selectedRowKeysValue: [], // table列表所选得数据
token:Vue.ls.get(ACCESS_TOKEN),
Dateline: {},
areaVisibleFreeze: false, // 冻结配置
areaVisibleAssignedby: false, // 分配填写人弹框
areaVisibleTaskCutOffTime: false, // 截至时间弹框
areaVisiblereferenceparameter: false, // 引用参数弹框
areaVisibsynchronous: false, // 同步上报库弹框
visibleoperationFailed: false, // 数据失败的弹框
currentPersonRole: '', // 当前人角色
jurisdiction: '',
wrapperCol: {
xs: { span: 24 },
sm: { span: 14 }
},
labelCol: {
xs: { span: 24 },
sm: { span: 7 }
},
rules: {},
FreezeList: [], // 冻结字段
visibleRoleSwitching: false, // 角色切换
confirmLoadingRoleSwitching: false,
formInlineRoleSwitching: {},
rulesRoleSwitching: {
roleSwitchingCode: [
{
required: true,
message: this.$t('roleSwitching') + this.$t('cannotEmpty'),
trigger: 'change'
}
]
},
RoleType: [ ],// 控件类型
NotSelectedRowKeysValue: [],
NoEngineer: 1, // 下发收集的权限,0为没有接口人 1为由接口人 默认有
NotSelectedNoEngineerValue: [],
paramsManifest: {}
}
},
props: {
// paramsManifest: {
// type: Object,
// default: {},
// require: true
// }
},
mounted() {
document.title = this.$t('ParameteItemCollectionList')
this.GetgetLoginUserType()
this.paramsManifest = JSON.parse(localStorage.getItem('paramsManifest'))
},
methods:{
handleCancelRoleSwitching() {
this.visibleRoleSwitching = false
},
handleOkRoleSwitching() {
this.visibleRoleSwitching = false
this.currentPersonRole = this.formInlineRoleSwitching.roleSwitchingCode
this.selectedRowKeysValue = []
},
roleSwitchingClick() {
this.visibleRoleSwitching = true
},
GetgetLoginUserType() {
this.$refs.CollectionTabel.getLoginUserType()
},
GetgetTableList() {
this.$refs.CollectionTabel.getTableList()
},
// 错误数据的弹框
cancleoperationFailed() {
this.selectedRowKeysValue = []
this.visibleoperationFailed = false
this.GetgetTableList()
},
// 一下为认证工程师
// 认证工程师 下发收集 权限
// 仅仅状态为 待发起收集 工程接口人退回 变更 可以下发收集
homodistributionAndCollection() {
this.NoEngineer = 1
this.NotSelectedRowKeysValue = []
this.NotSelectedNoEngineerValue = []
// 定义开关 0为没有权限 1为有权限
let flag = 1
if(this.selectedRowKeysValue.length == 0) {
flag = 2
this.$message.warning(this.$t('selectLeastOne'))
} else {
this.selectedRowKeysValue.forEach((item, index) => {
// 状态不符合,不能下发收集
if(item.state !== '待发起收集' && item.state !== '工程接口人退回' && item.state !== '变更' && item.state !== 'Wait Collect' && item.state !== 'Sdt Back' && item.state !== 'Change') {
this.NotSelectedRowKeysValue.push(item)
flag = 0
}
// 状态符合,但是没有工程接口人 不能下发收集
if((item.sdt.dataValue === null || item.sdt.dataValue ==='undefined') && (flag == 1 || flag == 3)) {
this.NotSelectedNoEngineerValue.push(item)
flag = 3
}
})
}
return flag
},
// 认证工程师的权限
// 认证工程师 退回 权限
// 仅仅状态为 已提交 可以退回
homoJurisdictionReturn() {
// 认证工程师 已提交
if(this.currentPersonRole =='homo') {
this.NotSelectedRowKeysValue = []
// 定义开关 0为没有权限 1为有权限
let flag = 1
if(this.selectedRowKeysValue.length == 0) {
flag = 2
this.$message.warning(this.$t('selectLeastOne'))
} else {
this.selectedRowKeysValue.forEach((item, index) => {
if(item.state !== '已提交'&& item.state !== 'Submit') {
this.NotSelectedRowKeysValue.push(item)
this.jurisdiction = 'homoTH'
flag = 0
}
})
}
return flag
//工程接口人 待工程接口人处理 填写人退回
}else if(this.currentPersonRole =='sdt') {
this.NotSelectedRowKeysValue = []
// 定义开关 0为没有权限 1为有权限
let flag = 1
if(this.selectedRowKeysValue.length == 0) {
flag = 2
this.$message.warning(this.$t('selectLeastOne'))
} else {
this.selectedRowKeysValue.forEach((item, index) => {
if(item.state !== '待工程接口人处理' && item.state !== '填写人退回' && item.state !== 'Wait Sdt' && item.state !== 'Dre Back') {
this.NotSelectedRowKeysValue.push(item)
this.jurisdiction = 'sdtTH'
flag = 0
}
})
}
return flag
//填写人 待填写 认证工程师退回
}else if(this.currentPersonRole =='dre') {
this.NotSelectedRowKeysValue = []
// 定义开关 0为没有权限 1为有权限
let flag = 1
if(this.selectedRowKeysValue.length == 0) {
flag = 2
this.$message.warning(this.$t('selectLeastOne'))
} else {
this.selectedRowKeysValue.forEach((item, index) => {
if(item.state !== '待填写' && item.state !== '认证工程师退回' && item.state !== 'Wait Fill' && item.state !== 'Cert Back') {
this.NotSelectedRowKeysValue.push(item)
this.jurisdiction = 'dreTH'
flag = 0
}
})
}
return flag
}
},
// 认证工程师 批量删除 权限
// 仅仅状态为 待发起收集 工程接口人退回 变更 可以批量删除
homoJurisdictionBatchdelete() {
this.NotSelectedRowKeysValue = []
// 定义开关 0为没有权限 1为有权限
let flag = 1
if(this.selectedRowKeysValue.length == 0) {
flag = 2
this.$message.warning(this.$t('selectLeastOne'))
} else {
this.selectedRowKeysValue.forEach((item, index) => {
if(item.state !== '待发起收集' && item.state !== '工程接口人退回' && item.state !== '变更' && item.state !== 'Wait Collect' && item.state !== 'Sdt Back' && item.state !== 'Change') {
this.NotSelectedRowKeysValue.push(item)
flag = 0
}
})
}
return flag
},
// 认证工程师 同步上报库 权限
// 仅仅状态为 已提交 变更 可以同步上报库
homoJurisdictionSynchronousLibrary() {
// 定义开关 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) => {
if(item.state !== '已提交' && item.state !== '变更'&& item.state !== 'Submit' && item.state !== 'Change') {
this.NotSelectedRowKeysValue.push(item)
flag = 0
}
})
}
return flag
},
// 填写人 截至时间 权限
// 仅仅状态为 可以截至时间
dreTaskCutOffTimeLibrary() {
// 定义开关 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) => {
if(item.state !== '待发起收集'&& item.state !== 'Wait Collect') {
this.NotSelectedRowKeysValue.push(item)
flag = 0
}
})
}
return flag
},
// 认证工程师 强制撤回 权限
// 仅仅状态为 待工程接口人处理 填写人退回 可以强制撤回
homoJurisdictionCompulsoryWithdrawal() {
// 认证工程师 已提交
if(this.currentPersonRole =='homo') {
this.NotSelectedRowKeysValue = []
// 定义开关 0为没有权限 1为有权限
let flag = 1
if(this.selectedRowKeysValue.length == 0) {
flag = 2
this.$message.warning(this.$t('selectLeastOne'))
} else {
this.selectedRowKeysValue.forEach((item, index) => {
if(item.state !== '待工程接口人处理' && item.state !== '填写人退回'&&item.state !== 'Wait Sdt' && item.state !== 'Dre Back') {
this.NotSelectedRowKeysValue.push(item)
this.jurisdiction = 'homoQZTH'
flag = 0
}
})
}
return flag
// 工程接口人 强制撤回 权限
// 仅仅状态为 待填写 可以强制撤回
}else if(this.currentPersonRole =='sdt') {
this.NotSelectedRowKeysValue = []
// 定义开关 0为没有权限 1为有权限
let flag = 1
if(this.selectedRowKeysValue.length == 0) {
flag = 2
this.$message.warning(this.$t('selectLeastOne'))
} else {
this.selectedRowKeysValue.forEach((item, index) => {
if(item.state !== '待填写'&&item.state !== 'Wait Fill') {
this.NotSelectedRowKeysValue.push(item)
this.jurisdiction = 'sdtQZTH'
flag = 0
}
})
}
return flag
//填写人 已提交
}else if(this.currentPersonRole =='dre') {
this.NotSelectedRowKeysValue = []
// 定义开关 0为没有权限 1为有权限
let flag = 1
if(this.selectedRowKeysValue.length == 0) {
flag = 2
this.$message.warning(this.$t('selectLeastOne'))
} else {
this.selectedRowKeysValue.forEach((item, index) => {
if(item.state !== '已提交'&&item.state !== 'Submit') {
this.NotSelectedRowKeysValue.push(item)
this.jurisdiction = 'dreQZTH'
flag = 0
}
})
}
return flag
}
},
// 工程接口人 分配填写人 权限
// 仅仅状态为 待工程接口人处理 填写人退回 可以分配填写人
sdtJurisdictionAssigned() {
// 定义开关 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) => {
if(item.state !== '待工程接口人处理' && item.state !== '填写人退回'&&item.state !== 'Wait Sdt' && item.state !== 'Dre Back') {
this.NotSelectedRowKeysValue.push(item)
flag = 0
}
})
}
return flag
},
// 填写人 提交 权限
// 仅仅状态为 待填写 认证工程师退回 可以提交
dreJurisdictionSubmit() {
// 定义开关 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) => {
if(item.state !== '待填写' && item.state !== '认证工程师退回'&&item.state !== 'Wait Fill' && item.state !== 'Cert Back') {
this.NotSelectedRowKeysValue.push(item)
flag = 0
}
})
}
return flag
},
// 填写人 引用参数 权限
// 仅仅状态为 待填写 认证工程师退回 可以引用参数
dreJurisdictionreferenceParameter() {
this.NotSelectedRowKeysValue = []
let flag = 1
if(this.selectedRowKeysValue.length == 0) {
flag = 2
this.$message.warning(this.$t('selectLeastOne'))
} else {
this.selectedRowKeysValue.forEach((item, index) => {
if(item.state !== '待填写' && item.state !== '认证工程师退回'&&item.state !== 'Wait Fill' && item.state !== 'Cert Back') {
this.NotSelectedRowKeysValue.push(item)
flag = 0
}
})
}
return flag
},
LoginUserType(val) {
this.RoleType = []
if(this.currentPersonRole == '') {
this.currentPersonRole = val.length >= 1 ? val[0].value : ''
}
this.RoleType = val
this.formInlineRoleSwitching.roleSwitchingCode = this.currentPersonRole
this.formInlineRoleSwitching = {...this.formInlineRoleSwitching}
},
// 表格所选中得行内容
rowValue(val) {
this.selectedRowKeysValue = val
},
// 表格所选中得id
value(val) {
this.selectedRowKeys = val,
this.selectedRowKeysArray = val.join(',')
},
// 冻结配置
freezeConfiguration() {
// 认证工程师 任意状态 都有此权限
this.areaVisibleFreeze = true
this.Dateline = {}
// 获取冻结配置数据
this.getFreeze()
},
// 冻结配置提交
handleSubmitFreeze() {
let _this = this
let paramsConfig = this.Dateline.paramsConfig === undefined ? '' : this.Dateline.paramsConfig.join(',')
let param = {paramsManifestId: this.paramsManifest.id, paramsConfigIds: paramsConfig }
axios({
url: '/jero-boot/params/collectManifest/lockConfigColumn',
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.areaVisibleFreeze = false
this.$refs.CollectionTabel.getTableList()
}else{
_this.$message.warning(res.data.result)
}
})
.catch( (error) =>{
});
},
// 冻结配置取消
cancleImportsFreeze() {
this.areaVisibleFreeze = false
},
getFreeze() {
let _this = this
let param = {paramsManifestId: this.paramsManifest.id, configFlag: 1}
axios({
url: '/jero-boot/params/collectManifest/getConfigLableList',
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.FreezeList = res.data.result
}else{
_this.$message.warning(res.data.message)
}
})
.catch( (error) =>{
});
},
// 下发收集的权限
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
}
},
// 下发收集---请求接口
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(',')}
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.GetgetTableList()
}else{
_this.$message.warning(this.$t('operationFailed'))
}
})
.catch( (error) =>{
});
},
// 同步上报库 权限
handleSynchronousReportLibraryJurisdiction() {
let homoJurisdictionSynchronousLibrary = this.homoJurisdictionSynchronousLibrary()
if(homoJurisdictionSynchronousLibrary == 1) {
this.handleSynchronousReportLibrary()
} else if(homoJurisdictionSynchronousLibrary == 0) {
this.visibleoperationFailed = true
this.jurisdiction = 'HOMOTBSBK'
}
},
// 同步上报库
handleSynchronousReportLibrary() {
this.areaVisibsynchronous = true
},
// 添加
handleAdd() {
// 认证工程师 任意状态 都有此权限
this.areaVisible = true
},
// 提交
handleSubmit() {
// 填写人 权限
let dreJurisdictionSubmit = this.dreJurisdictionSubmit()
if(dreJurisdictionSubmit == 1) {
this.ishandleSubmit()
} else if(dreJurisdictionSubmit == 0) {
this.visibleoperationFailed = true
this.jurisdiction = 'DREYYCS'
}
},
// 提交数据
ishandleSubmit() {
let _this = this
let postDate = []
this.selectedRowKeysValue.forEach((item, index) => {
let postDateobj = {}
Object.keys(item).forEach((itemIn, index) => {
if(itemIn !== 'sdt') {
if(item[itemIn] instanceof Object && !(item[itemIn] instanceof Array)) {
postDateobj[itemIn] = item[itemIn]
item[itemIn].list.forEach((item,index) => {
if(item.type == 'pull_more'){
item.dataValue = item.dataValue.join(',')
}
if(item.type == 'text'){
item.dataValue = item.dataValue.toString()
}
})
}
}
})
postDateobj.id = item.id
postDate.push(postDateobj)
})
let configDataList = { configDataList: postDate }
if(this.selectedRowKeys.length == 0) {
this.$message.warning(this.$t('selectLeastOne'))
}else {
let _configDataListNo = []
this.$confirm({
content: _this.$t('Areyousureparameteritems'),
onOk() {
postAction(_this.url.add, configDataList).then((res) => {
if (res.success) {
_this.$message.success(_this.$t('OperationSuccessful'))
_this.GetgetTableList()
} else {
_this.$message.warning(_this.$t('operationFailed'))
}
})
}
})
}
},
returnDataJurisdiction() {
// 退回的状态权限
let homoJurisdictionReturn = this.homoJurisdictionReturn()
if (homoJurisdictionReturn == 1) {
this.returnData()
} else if(homoJurisdictionReturn == 0) {
this.visibleoperationFailed = true
}
},
// 退回
returnData() {
// todo 退回没有选择数据
let _array = []
this.selectedRowKeysValue.forEach((item, index) => {
_array.push(item.id)
})
let _this = this
let param = {ids: _array.join(',')}
axios({
url: '/jero-boot/params/collectManifest/back',
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.GetgetTableList()
_this.selectedRowKeysValue=[]
}else{
_this.$message.warning(_this.$t('operationFailed'))
}
})
.catch( (error) =>{
});
},
// 强制撤回权限
compulsoryWithdrawaljurisdiction() {
let homoJurisdictionCompulsoryWithdrawal = this.homoJurisdictionCompulsoryWithdrawal()
if(homoJurisdictionCompulsoryWithdrawal === 1) {
this.compulsoryWithdrawal()
} else if(homoJurisdictionCompulsoryWithdrawal === 0) {
this.visibleoperationFailed = true
}
},
// 强制撤回
compulsoryWithdrawal() {
let _array = []
this.selectedRowKeysValue.forEach((item, index) => {
_array.push(item.id)
})
let _this = this
let param = {ids: _array.join(',')}
axios({
url: '/jero-boot/params/collectManifest/withdraw',
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.GetgetTableList()
_this.selectedRowKeysValue=[]
}else{
_this.$message.warning(_this.$t('operationFailed'))
}
})
.catch( (error) =>{
});
},
// 分配填写人
assignedBy() {
// 工程接口人
let sdtJurisdictionAssigned = this.sdtJurisdictionAssigned()
if(sdtJurisdictionAssigned == 1) {
this.areaVisibleAssignedby = true
} else if(sdtJurisdictionAssigned == 0) {
this.visibleoperationFailed = true
this.jurisdiction = 'SDTFPTXR'
}
},
// 分配填写人确定后弹框关闭
areaVisibleAssignedbyflag(val) {
this.areaVisibleAssignedby = val
},
// 截止时间
TaskCutOffTimeLibrary() {
let dreTaskCutOffTimeLibrary = this.dreTaskCutOffTimeLibrary()
if(dreTaskCutOffTimeLibrary == 1) {
this.areaVisibleTaskCutOffTime = true
}else if(dreTaskCutOffTimeLibrary == 0) {
this.visibleoperationFailed = true
this.jurisdiction = 'HOMOJZSJ'
}
},
// 截至时间确定弹框关闭
areaVisibleTaskCutOffTimeflag(val) {
this.areaVisibleTaskCutOffTime = val
this.$refs.CollectionTabel.getTableList()
},
//引用参数
referenceparameter() {
let dreJurisdictionreferenceParameter = this.dreJurisdictionreferenceParameter()
if(dreJurisdictionreferenceParameter == 1) {
this.areaVisiblereferenceparameter = true
} else if(dreJurisdictionreferenceParameter == 0) {
this.visibleoperationFailed = true
this.jurisdiction = 'DREYYCS'
}
},
listReset() {
this.formInline = {}
},
handleModule() {
},
handleCody() {
},
searchQuery() {
this.pageNo = 1
this.$refs.CollectionTabel.getTableList()
},
searchReset() {
this.$refs.CollectionTabel.getTableListReset()
},
// 批量删除 -- 与下发收集一致
handleDelJurisdiction() {
let homoJurisdictionBatchdelete = this.homoJurisdictionBatchdelete()
if (homoJurisdictionBatchdelete == 1) {
this.handleDel()
} else if(homoJurisdictionBatchdelete == 0) {
this.visibleoperationFailed = true
this.jurisdiction = 'HOMOZFSJ'
}
},
handleDel() {
let param = {
ids: this.selectedRowKeysArray
}
if (this.selectedRowKeys.length > 0) {
let _this = this
this.$confirm({
content: _this.$t('ConfirmBatchDeletion'),
onOk() {
axios({
url: '/jero-boot/params/collectManifest/deleteBatch',
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.selectedRowKeys = []
_this.$refs.CollectionTabel.getData()
_this.$refs.CollectionTabel.getTableList()
} else {
_this.$message.warning(_this.$t('operationFailed'))
}
})
.catch((error) => {
})
}
})
} else {
this.$message.warning(this.$t('selectLeastOne'))
}
},
pageOnChange() {
},
SizeChange() {
}
}
}
</script>
<style lang="less" scoped>
@import '~@assets/less/common.less';
.doc-detail {
background: #fff;
height: 100%;
.Virtual-detail-header {
width: 100%;
height: 68px;
line-height: 68px;
padding: 0 32px 0 32px;
box-sizing: border-box;
display: flex;
justify-content: space-between;
border-bottom: 2px #eff1f3 solid;
background: #fff;
.Virtual-detail-title {
display: inline-block;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
font-size: 20px;
font-weight: 400;
color: #040B29;
line-height: 68px;
}
.doc-detail-right {
width: 800px;
line-height: 68px;
display: flex;
}
}
.Virtual-detail-content {
margin-top: 68px;
padding: 0 38px 0 38px;
box-sizing: border-box;
font-size: 16px;
.box-title-text-add {
line-height: 1.4;
}
.title-text-add {
display: inline-block;
font-weight: 500;
margin-right: 16px;
height: 42px;
line-height: 42px;
}
}
}
.header-text {
font-size: 16px;
font-weight: 400;
height: 60px;
color: #000F16;
line-height: 40px;
}
.box-title-text {
line-height: 1.4;
display: flex;
align-items: center;
margin-bottom: 10px;
}
.title-text {
width: 20%;
min-width: 110px;
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;
}
.box-button {
height: 38px;
}
.text-operation {
margin-right: 8px;
}
.page {
text-align: right;
margin-top: 20px;
}
.operator-text-left {
font-size: 14px;
margin-right: 20px;
background: #eff1f3;
padding: 8px 8px;
cursor: pointer;
border-radius: 4px;
}
.operator-text-title {
cursor: pointer;
margin-right: 22px;
font-size: 14px;
font-weight: 400;
color: #040B29;
margin-bottom: 22px;
}
.box-title-text-index {
line-height: 1.4;
display: flex;
}
.title-text-Comment {
width: 74px;
text-align: right;
display: inline-block;
font-weight: 500;
font-size: 14px;
margin-right: 16px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
height: 42px;
line-height: 36px;
}
.box-input .ant-select-selection {
height: 38px !important;
}
.itemitem{
width: 250px;
}
.box-input .ant-select-selection__rendered {
line-height: 38px;
}
.Required{
color: red;
}
</style>