修改法规清单的流程状态弹框、批量设置、编辑

This commit is contained in:
范强强
2023-03-22 14:30:11 +08:00
parent a84efecf9f
commit 019d3e8e98
3 changed files with 297 additions and 172 deletions
@@ -15,7 +15,7 @@
<div class="title-text">
<span class="title-text-text" :title="$t('certificationType')">{{$t('certificationType')}}</span>
</div>
<a-form-model-item class="itemModel">
<a-form-model-item class="itemModel-multi">
<j-multi-select-tag class="box-input" v-model="formInline.attestationType"
:placeholder="$t('PleaseSelect')+$t('certificationType')"
:type="'select'"
@@ -33,7 +33,7 @@
<div class="title-text">
<span class="title-text-text" :title="$t('certificationLevel')">{{$t('certificationLevel')}}</span>
</div>
<a-form-model-item class="itemModel">
<a-form-model-item class="itemModel-multi">
<j-multi-select-tag class="box-input" v-model="formInline.attestationRank"
:placeholder="$t('PleaseSelect')+$t('certificationLevel')"
:type="'select'"
@@ -47,7 +47,7 @@
</div>
</a-col>
</a-row>
<a-row :gutter="24">
<a-row :gutter="24" v-if="this.code == '0'">
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
@@ -55,25 +55,33 @@
</div>
<a-form-model-item class="itemModel-multi">
<j-multi-select-tag class="box-input" v-model="formInline.dutyTerritory"
@change="dutyTerritoryChange"
:placeholder="$t('PleaseSelect')+$t('areaOfResponsibility')"
:type="'select'"
:triggerChange="false" :dictCode="'duty_territory'"/>
</a-form-model-item>
</div>
</a-col>
<a-col :span="12">
<a-col :span="12" v-if="this.code == '0'">
<div class="box-title-text">
<div class="title-text">
<span class="title-text-text"
:title="$t('engineeringInterfacePerson')">{{$t('engineeringInterfacePerson')}}</span>
:title="$t('regulatoryEngineer')">{{$t('regulatoryEngineer')}}</span>
</div>
<a-form-model-item class="itemModel" prop="designDutyId">
<PersonnelSelection :query="{db_field_name:'engineeringInterfacePerson',db_field_txt:$t('engineeringInterfacePerson')}"
:isSingleChoice="true"
:personneQuery="formInline"
v-if="visible"
@change="PersonnelSelectionChange"
v-model="formInline.engineeringInterfacePersonName"/>
<a-form-model-item class="itemModel" prop="regulationOwnerId">
<a-select :placeholder="$t('PleaseSelect')+$t('regulatoryEngineer')"
class="box-input"
:getPopupContainer="triggerNode=> triggerNode.parentNode"
allowClear
v-model="formInline.regulationOwnerId">
<a-select-option v-for="(item, key) in regulatoryEngineerList"
:key="key"
:value="item.value">
<span style="display: inline-block;width: 100%" :title=" item.name">
{{ item.name }}
</span>
</a-select-option>
</a-select>
<!-- <j-dict-select-tag class="box-input" v-model="formInline.designDuty"-->
<!-- :disabled="formInline.roleCode == 0 ? false : true"-->
<!-- @input="handleInput('designDuty')"-->
@@ -85,19 +93,20 @@
</a-col>
</a-row>
<a-row :gutter="24">
<a-col :span="12" v-if="this.code != '1'">
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
<span class="title-text-text"
:title="$t('regulatoryEngineer')">{{$t('regulatoryEngineer')}}</span>
:title="$t('engineeringInterfacePerson')">{{$t('engineeringInterfacePerson')}}</span>
</div>
<a-form-model-item class="itemModel" prop="designDutyId">
<PersonnelSelection :query="{db_field_name:'regulatoryEngineer',db_field_txt:$t('regulatoryEngineer')}"
:isSingleChoice="true"
:personneQuery="formInline"
v-if="visible"
@change="PersonnelSelectionChange"
v-model="formInline.regulatoryEngineerName"/>
<PersonnelSelection
:query="{db_field_name:'engineeringInterfacePerson',db_field_txt:$t('engineeringInterfacePerson')}"
:isSingleChoice="true"
:personneQuery="formInline"
v-if="visible"
@change="PersonnelSelectionChange"
v-model="formInline.engineeringInterfacePersonName"/>
<!-- <j-dict-select-tag class="box-input" v-model="formInline.designDuty"-->
<!-- :disabled="formInline.roleCode == 0 ? false : true"-->
<!-- @input="handleInput('designDuty')"-->
@@ -118,13 +127,13 @@
<span class="title-text-text"
:title="$t('personLiable')">{{$t('personLiable')}}</span>
</div>
<a-form-model-item class="itemModel" prop="designDutyId">
<PersonnelSelection :query="{db_field_name:'dutyPerson',db_field_txt:$t('personLiable')}"
<a-form-model-item class="itemModel-multi" prop="designDutyIdName">
<PersonnelSelection :query="{db_field_name:'designDutyId',db_field_txt:$t('personLiable')}"
:isSingleChoice="true"
:personneQuery="formInline"
v-if="visible"
@change="PersonnelSelectionChange"
v-model="formInline.dutyPersonName"/>
v-model="formInline.designDutyIdName"/>
<!-- <j-dict-select-tag class="box-input" v-model="formInline.designDuty"-->
<!-- :disabled="formInline.roleCode == 0 ? false : true"-->
<!-- @input="handleInput('designDuty')"-->
@@ -140,13 +149,13 @@
<span class="title-text-text"
:title="$t('cutoffTime')">{{$t('cutoffTime')}}</span>
</div>
<a-form-model-item class="itemModel" :prop="'verifyDueDate'">
<a-form-model-item class="itemModel" :prop="'designDueDate'">
<a-date-picker class="box-input"
:placeholder="$t('PleaseSelect')+$t('cutoffTime')"
@change="dateChange({db_field_name:'verifyDueDate'})"
@change="dateChange({db_field_name:'designDueDate'})"
format="YYYY-MM-DD"
:getCalendarContainer="(trigger) => trigger.parentNode"
v-model="formInline.verifyDueDate"
v-model="formInline.designDueDate"
style="width: 100%"/>
</a-form-model-item>
</div>
@@ -189,7 +198,7 @@
<span class="title-text-text"
:title="$t('typeOfDeliverables')">{{$t('typeOfDeliverables')}}</span>
</div>
<a-form-model-item class="itemModel" prop="typeOfDeliverables">
<a-form-model-item class="itemModel-multi" prop="typeOfDeliverables">
<a-tree-select
tree-node-filter-prop="title"
v-model="formInline.designDeliverableType"
@@ -220,13 +229,13 @@
<span class="title-text-text"
:title="$t('personLiable')">{{$t('personLiable')}}</span>
</div>
<a-form-model-item class="itemModel" prop="verifyDutyId">
<PersonnelSelection :query="{db_field_name:'dutyPerson',db_field_txt:$t('personLiable')}"
<a-form-model-item class="itemModel-multi" prop="verifyDutyIdName">
<PersonnelSelection :query="{db_field_name:'verifyDutyId',db_field_txt:$t('personLiable')}"
:isSingleChoice="true"
:personneQuery="formInline"
v-if="visible"
@change="PersonnelSelectionChange"
v-model="formInline.dutyPersonName"/>
v-model="formInline.verifyDutyIdName"/>
<!-- <j-dict-select-tag class="box-input" v-model="formInline.verifyDuty"-->
<!-- :disabled="formInline.roleCode == 0 ? false : true"-->
<!-- @input="handleInput('verifyDuty')"-->
@@ -291,7 +300,7 @@
<span class="title-text-text"
:title="$t('typeOfDeliverables')">{{$t('typeOfDeliverables')}}</span>
</div>
<a-form-model-item class="itemModel" prop="verifyDeliverableType">
<a-form-model-item class="itemModel-multi" prop="verifyDeliverableType">
<a-tree-select
tree-node-filter-prop="title"
v-model="formInline.verifyDeliverableType"
@@ -337,21 +346,37 @@
formInline: {},
rules: {},
ids: [],
code:'',
code: '',
regulatoryEngineerList: []
}
},
mounted() {
},
methods: {
dutyTerritoryChange(event) {
this.formInline.regulationOwnerId = undefined
this.formInline = {...this.formInline}
this.queryPersonByProject(event)
},
queryPersonByProject(row) {
let query = {
projectId: this.$route.query.id,
dutyTerritory: row.dutyTerritory || row
}
getAction('/project/projectRelatedPersonnel/queryPersonByProjectId', query).then((res) => {
if (res.success) {
this.regulatoryEngineerList = res.result.lawEngineerList //法规工程师
}
})
},
PersonnelSelectionChange(value, id) {
this.formInline[value] = id
this.formInline = { ...this.formInline }
},
edit(data,code) {
edit(data, code) {
this.visible = true
this.getDeliverableTree()
this.code = code
console.log(this.code)
this.$nextTick(() => {
this.ids = data || []
this.formInline = {}
@@ -375,9 +400,15 @@
},
handleOkOne() {
let ids = JSON.parse(JSON.stringify(this.ids))
let formInline = JSON.parse(JSON.stringify(this.formInline))
Object.keys(formInline).forEach(res => {
if (formInline[res] && formInline[res] instanceof Array) {
formInline[res] = formInline[res].join(',')
}
})
let query = {
ids: ids.join(','),
...this.formInline
...formInline
}
this.confirmLoading = true
postAction(this.url.setBatch, query).then((res) => {
@@ -398,9 +429,15 @@
content: _this.$t('batchmodify'),
onOk() {
let ids = JSON.parse(JSON.stringify(_this.ids))
let formInline = JSON.parse(JSON.stringify(_this.formInline))
Object.keys(formInline).forEach(res => {
if (formInline[res] && formInline[res] instanceof Array) {
formInline[res] = formInline[res].join(',')
}
})
let query = {
ids: ids.join(','),
..._this.formInline
...formInline
}
_this.confirmLoading = true
postAction(_this.url.setBatch, query).then((res) => {
@@ -252,19 +252,26 @@
<span class="title-text-text" :title="$t('engineeringInterfacePerson')">{{$t('engineeringInterfacePerson')}}</span>
</div>
<a-form-model-item class="itemModel" :prop="'engineeringInterfacePerson'">
<a-select :placeholder="$t('PleaseSelect')+$t('engineeringInterfacePerson')"
class="box-input"
allowClear
:getPopupContainer="triggerNode=> triggerNode.parentNode"
v-model="formInline.engineeringInterfacePerson">
<a-select-option v-for="(item, key) in engineeringInterfacePersonList"
:key="key"
:value="item.value">
<span style="display: inline-block;width: 100%" :title=" item.name ">
{{ item.name }}
</span>
</a-select-option>
</a-select>
<PersonnelSelection
:query="{db_field_name:'engineeringInterfacePerson',db_field_txt:$t('engineeringInterfacePerson')}"
:isSingleChoice="true"
:personneQuery="formInline"
v-if="visible"
@change="PersonnelSelectionChange"
v-model="formInline.engineeringInterfacePersonName"/>
<!-- <a-select :placeholder="$t('PleaseSelect')+$t('engineeringInterfacePerson')"-->
<!-- class="box-input"-->
<!-- allowClear-->
<!-- :getPopupContainer="triggerNode=> triggerNode.parentNode"-->
<!-- v-model="formInline.engineeringInterfacePerson">-->
<!-- <a-select-option v-for="(item, key) in engineeringInterfacePersonList"-->
<!-- :key="key"-->
<!-- :value="item.value">-->
<!-- <span style="display: inline-block;width: 100%" :title=" item.name ">-->
<!-- {{ item.name }}-->
<!-- </span>-->
<!-- </a-select-option>-->
<!-- </a-select>-->
</a-form-model-item>
</div>
</a-col>
@@ -315,19 +322,25 @@
:title="$t('personLiable')">{{$t('personLiable')}}</span>
</div>
<a-form-model-item class="itemModel" prop="designDutyId">
<a-select :placeholder="$t('PleaseSelect')+$t('personLiable')"
:getPopupContainer="triggerNode=> triggerNode.parentNode"
class="box-input"
allowClear
v-model="formInline.designDutyId">
<a-select-option v-for="(item, key) in designDutyList"
:key="key"
:value="item.value">
<span style="display: inline-block;width: 100%" :title=" item.name ">
{{ item.name }}
</span>
</a-select-option>
</a-select>
<PersonnelSelection :query="{db_field_name:'designDutyId',db_field_txt:$t('personLiable')}"
:isSingleChoice="true"
:personneQuery="formInline"
v-if="visible"
@change="PersonnelSelectionChange"
v-model="formInline.designDutyIdName"/>
<!-- <a-select :placeholder="$t('PleaseSelect')+$t('personLiable')"-->
<!-- :getPopupContainer="triggerNode=> triggerNode.parentNode"-->
<!-- class="box-input"-->
<!-- allowClear-->
<!-- v-model="formInline.designDutyId">-->
<!-- <a-select-option v-for="(item, key) in designDutyList"-->
<!-- :key="key"-->
<!-- :value="item.value">-->
<!-- <span style="display: inline-block;width: 100%" :title=" item.name ">-->
<!-- {{ item.name }}-->
<!-- </span>-->
<!-- </a-select-option>-->
<!-- </a-select>-->
<!-- <j-dict-select-tag class="box-input" v-model="formInline.designDuty"-->
<!-- :disabled="formInline.roleCode == 0 ? false : true"-->
<!-- @input="handleInput('designDuty')"-->
@@ -644,25 +657,12 @@
:title="$t('personLiable')">{{$t('personLiable')}}</span>
</div>
<a-form-model-item class="itemModel" prop="verifyDutyId">
<a-select :placeholder="$t('PleaseSelect')+$t('personLiable')"
class="box-input"
allowClear
:getPopupContainer="triggerNode=> triggerNode.parentNode"
v-model="formInline.verifyDutyId">
<a-select-option v-for="(item, key) in verifyDutyList"
:key="key"
:value="item.value">
<span style="display: inline-block;width: 100%" :title=" item.name ">
{{ item.name }}
</span>
</a-select-option>
</a-select>
<!-- <j-dict-select-tag class="box-input" v-model="formInline.verifyDuty"-->
<!-- :disabled="formInline.roleCode == 0 ? false : true"-->
<!-- @input="handleInput('verifyDuty')"-->
<!-- :placeholder="$t('PleaseSelect')+$t('personLiable')"-->
<!-- :type="'select'"-->
<!-- :triggerChange="false" :dictCode="'ze2_ren4_ren2'"/>-->
<PersonnelSelection :query="{db_field_name:'verifyDutyId',db_field_txt:$t('personLiable')}"
:isSingleChoice="true"
:personneQuery="formInline"
v-if="visible"
@change="PersonnelSelectionChange"
v-model="formInline.verifyDutyIdName"/>
</a-form-model-item>
</div>
</a-col>
@@ -214,7 +214,7 @@
<!-- {{ $t('customize') }}-->
<!-- </div>-->
<div @click="handleExport" v-has="'projectLawsInventory:exportData'"
v-if="this.roleSwitchingCode == '1' || this.roleSwitchingCode == '2' || this.roleSwitchingCode == '30' || this.roleSwitchingCode == '31'"
v-if="this.roleSwitchingCode != '0'"
class="operator-text">
<a-icon type="export" :rotate="-90"/>
{{ $t('export') }}
@@ -320,6 +320,22 @@
</span>
<span v-else>--</span>
</span>
<span slot="designFlowStatusName" slot-scope="text,result">
<span v-if="result.designFlowStatus == 'List to be released' ||
result.designFlowStatus == 'List to be checked'">
{{text}}
</span>
<a v-else @click="designFlowStatusClick(result,$t('designComplianceReview'))"
:title="text">{{text}}</a>
</span>
<span slot="verifyFlowStatusName" slot-scope="text,result">
<span v-if="result.verifyFlowStatus == 'List to be released' ||
result.verifyFlowStatus == 'List to be checked'">
{{text}}
</span>
<a v-else @click="designFlowStatusClick(result,$t('verificationComplianceReview'))"
:title="text">{{text}}</a>
</span>
</a-table>
<div class="buttom-box" v-if="dataSource && dataSource.length > 0">
{{ $t('total') + ' ' + this.dataSource.length + ' ' + $t('strip') }}
@@ -446,11 +462,13 @@
<listOfRegulationsView ref="listOfRegulationsViewRef"/>
<batchSettingPersonnel :url="url" ref="batchSettingPersonnelRef" @batchSettingPersonnelForm="addModelList"/>
<viewFileModel ref="viewFileModelRef"/>
<designCompliance ref="designComplianceRef"/>
</a-card>
</template>
<script>
import ImportFile from '@/components/ImportFile/index'
import designCompliance from '../../toDoCenter/projectRegulationTasks/components/designCompliance'
import listAddModel from './listAddModel'
import listEditModel from './listEditModel'
import batSetting from './batSetting'
@@ -485,7 +503,8 @@
resultReportedUpload,
batchSettingPersonnel,
listOfRegulationsView,
viewFileModel
viewFileModel,
designCompliance
},
mixins: [ResizeColumnProvide, ResizeHeader],
data() {
@@ -557,14 +576,6 @@
dataIndex: 'regulationOwnerName',
width: 180
},
// {
// title: this.$t('certifiedEngineer'),
// align: 'left',
// ellipsis: true,
// sorter: true,
// dataIndex: 'homologationEngineerName',
// width: 180
// },
{
title: this.$t('engineeringInterfacePerson'),
align: 'left',
@@ -602,7 +613,8 @@
dataIndex: 'designFlowStatusName',
align: 'left',
ellipsis: true,
width: 140
width: 140,
scopedSlots: { customRender: 'designFlowStatusName' }
},
{
title: this.$t('deliverableTemplate'),
@@ -612,13 +624,6 @@
ellipsis: true,
scopedSlots: { customRender: 'designDeliverableTemplate' }
}
// {
// title: this.$t('descriptionDeliverables'),
// dataIndex: 'designRemark',
// align: 'left',
// width: 220,
// ellipsis: true
// }
]
},
{
@@ -643,7 +648,8 @@
dataIndex: 'verifyFlowStatusName',
align: 'left',
ellipsis: true,
width: 180
width: 180,
scopedSlots: { customRender: 'verifyFlowStatusName' }
},
{
title: this.$t('deliverableTemplate'),
@@ -653,13 +659,6 @@
ellipsis: true,
scopedSlots: { customRender: 'verifyDeliverableTemplateName' }
}
// {
// title: this.$t('descriptionDeliverables'),
// dataIndex: 'verifyRemark',
// align: 'left',
// width: 220,
// ellipsis: true
// }
]
},
{
@@ -1148,19 +1147,73 @@
},
methods: {
...mapGetters(['userInfo']),
//收起/展开
handleToggleSearch() {
this.toggleSearchStatus = !this.toggleSearchStatus
},
//流程状态点击事件
designFlowStatusClick(row, name) {
let query = {}
if (name == this.$t('designComplianceReview')) {
query = {
actiProcInstId: row.actiProcInstId,
projectTaskInventoryId: row.id,
projectLibraryId: row.projectLibraryId,
TaskKey: row.taskDefinitionKey,
isDisplay: false,
flowType: 2,
Sponsor: 'regulationOwnerName',
personLiable: 'designDutyName',
typeOfDeliverables: 'designDeliverableTypeName',
deliverableTemplate: 'designDeliverableTemplate',
DueDate: 'designDueDate',
remarks: 'designRemark',
projectName: row.projectName,
targetMarket: row.targetMarket,
projectNameId: row.projectNameId,
primaryKeyId: row.primaryKeyId
}
}else{
query = {
actiProcInstId: row.actiProcInstId,
projectTaskInventoryId: row.id,
projectLibraryId: row.projectLibraryId,
TaskKey: row.taskDefinitionKey,
flowType: 4,
isDisplay: false,
Sponsor: 'regulationOwnerName',
personLiable: 'verifyDutyName',
typeOfDeliverables: 'verifyDeliverableTypeName',
deliverableTemplate: 'verifyDeliverableTemplate',
DueDate: 'verifyDueDate',
remarks: 'verifyRemark',
projectName: row.projectName,
targetMarket: row.targetMarket,
projectNameId: row.projectNameId,
primaryKeyId: row.primaryKeyId,
}
}
this.$refs.designComplianceRef.getList(JSON.parse(JSON.stringify(query)), name)
},
//查看列表页面
viewClick(row) {
row.roleCodeIndex = this.roleSwitchingCode
this.$refs.listOfRegulationsViewRef.editModel(JSON.parse(JSON.stringify(row)))
},
//模板下载
handleModule() {
downloadFile(this.url.exportTemplate, this.$t('listOfRegulations') + this.$t('importTemplate') + '.xls', {})
},
//时间禁用
disabledDate(current) {
return current && current < moment().subtract(1, 'day')
},
//获取切换角色的数据
getRoleByUserId(callback) {
getAction('/project/projectLawsInventoryEO/getRoleByUserId', { projectLibraryId: this.$route.query.id }).then((res) => {
if (res.success) {
@@ -1171,6 +1224,9 @@
callback && callback()
})
},
//通过登录人查出当前是什么角色
//判断角色是否存在;存在即可展示;如不存在显示roleSwitchingList数据中的第一个
getAndUserId() {
let query = {
projectLibraryId: this.$route.query.id,
@@ -1198,6 +1254,8 @@
}
})
},
//生成合规报告
ExportReportClick() {
let selectedRowKeys = JSON.parse(JSON.stringify(this.selectedRowKeys))
if (selectedRowKeys && selectedRowKeys.length == 0) {
@@ -1209,6 +1267,8 @@
downloadFile(this.url.ExportReportUrl, this.$t('listOfRegulations') + this.$t('compliancereport') + '-' + serialNumber + '.docx', { id: selectedRowKeys.join(',') })
}
},
//导出
handleExport() {
let roleCodeIndex = this.roleSwitchingCode
let selectedRowKeys = JSON.parse(JSON.stringify(this.selectedRowKeys))
@@ -1249,6 +1309,7 @@
transferClick() {
this.$refs.transferListRef.transferModel()
},
//批量设置
batSettingClick() {
let code = this.roleSwitchingCode
if (this.selectedRowKeys && this.selectedRowKeys.length > 0) {
@@ -1257,6 +1318,8 @@
this.$message.warning(this.$t('selectLeastOne'))
}
},
//批量设置人员
batchSettingPersonnelClick() {
if (this.selectedRowKeys && this.selectedRowKeys.length > 0) {
let selectedRowKeys = JSON.parse(JSON.stringify(this.selectedRowKeys))
@@ -1298,11 +1361,11 @@
this.$message.warning(this.$t('selectLeastOne'))
}
},
// 撤回
withdrawnClick() {
if (this.selectedRowKeys && this.selectedRowKeys.length > 0) {
let selectedRowKeys = JSON.parse(JSON.stringify(this.selectedRowKeys))
let isTrue
let contentList = []
let detailedWarningList = []
let idList = []
@@ -1313,6 +1376,7 @@
}
}
}
//判断当前流程状态是否为清单待校核的数据
for (let i = 0; i < contentList.length; i++) {
if (contentList[i].verifyFlowStatus == 'List to be checked' ||
contentList[i].designFlowStatus == 'List to be checked') {
@@ -1353,6 +1417,8 @@
this.$message.warning(this.$t('selectLeastOne'))
}
},
//每一次不满足条件的提示语
promptInformation(detailedWarningList) {
let that = this
this.$warning({
@@ -1363,49 +1429,90 @@
)
})
},
//催办
questionClick() {
if (this.selectedRowKeys && this.selectedRowKeys.length > 0) {
let selectedRowKeys = JSON.parse(JSON.stringify(this.selectedRowKeys))
let isTrue
let content = []
let idList = []
let detailedWarningList = []
for (let i = 0; i < this.dataSource.length; i++) {
for (let j = 0; j < selectedRowKeys.length; j++) {
if (this.dataSource[i].id == selectedRowKeys[j]) {
if (this.dataSource[i].taskAffirmStatus == 'List to confirm' ||
this.dataSource[i].inventoryAffirmStatus == 'List to confirm') {
isTrue = true
} else {
isTrue = false
this.$message.warning(this.$t('OnlyOrTaskconfirmationOut'))
return
}
content.push(this.dataSource[i])
}
}
}
if (isTrue) {
let _this = this
this.$confirm({
content: _this.$t('ConfirmQuestion'),
onOk() {
let query = {
ids: selectedRowKeys.join(','),
projectLibraryId: _this.$route.query.id
}
postAction('project/projectLawsInventoryEO/expediting', query).then((res) => {
if (res.success) {
_this.$message.success(_this.$t('OperationSuccessful'))
_this.selectedRowKeys = []
_this.getList()
} else {
_this.$message.warning(_this.$t('operationFailed'))
}
})
for (let i = 0; i < content.length > 0; i++) {
if (this.roleSwitchingCode == '0') {
//为studio角色时在通过判断流程状态是否为清单待校核
if (content[i].verifyFlowStatus == 'List to be checked' ||
content[i].designFlowStatus == 'List to be checked') {
idList.push(content[i].id)
} else {
detailedWarningList.push(
< div > { content[i].serialNumber + this.$t('pleaseSelectTheDataverificationVerified') } < /div>
)
}
})
} else if (this.roleSwitchingCode == '1') {
if (content[i].verifyFlowStatus == 'Task to be confirmed' ||
content[i].designFlowStatus == 'Task to be confirmed') {
idList.push(content[i].id)
} else {
detailedWarningList.push(
< div > { content[i].serialNumber + this.$t('pleaseSelectTheDataverificationVerified') } < /div>
)
}
} else if (this.roleSwitchingCode == '30') {
if (content[i].verifyFlowStatus == 'List to be checked' ||
content[i].designFlowStatus == 'List to be checked') {
idList.push(content[i].id)
} else {
detailedWarningList.push(
< div > { content[i].serialNumber + this.$t('pleaseSelectTheDataverificationVerified') } < /div>
)
}
}
}
if (idList && idList.length > 0) {
this.questionAction(idList, detailedWarningList)
} else {
this.promptInformation(detailedWarningList)
}
} else {
this.$message.warning(this.$t('selectLeastOne'))
}
},
//催办的接口
questionAction(selectedRowKeys, detailedWarningList) {
let _this = this
this.$confirm({
content: _this.$t('ConfirmQuestion'),
onOk() {
let query = {
ids: selectedRowKeys.join(','),
projectLibraryId: _this.$route.query.id
}
postAction('project/projectLawsInventoryEO/expediting', query).then((res) => {
if (res.success) {
_this.$message.success(_this.$t('OperationSuccessful'))
_this.selectedRowKeys = []
_this.getList()
if (detailedWarningList && detailedWarningList.length > 0) {
_this.promptInformation(detailedWarningList)
}
} else {
_this.$message.warning(_this.$t('operationFailed'))
}
})
}
})
},
//定版
fixedPlateClick() {
if (this.dataSource && this.dataSource.length > 0) {
let isTrue
@@ -1423,6 +1530,8 @@
}
}
},
//流程重置
alterationClick() {
if (this.selectedRowKeys.length > 0) {
let _this = this
@@ -1431,19 +1540,7 @@
for (let i = 0; i < this.dataSource.length; i++) {
for (let j = 0; j < selectedRowKeys.length; j++) {
if (this.dataSource[i].id == selectedRowKeys[j]) {
// if (this.dataSource[i].taskAffirmStatus == 'Accepted' ||
// (this.dataSource[i].inventoryAffirmStatus == 'Accepted' && this.dataSource[i].taskAffirmStatus == 'Accepted') ||
// (this.dataSource[i].inventoryAffirmStatus == 'Rejected' && this.dataSource[i].taskAffirmStatus == 'Accepted') ||
// (this.dataSource[i].inventoryAffirmStatus == 'Accepted' && this.dataSource[i].taskAffirmStatus == 'Rejected') ||
// (this.dataSource[i].inventoryAffirmStatus == 'Rejected' && this.dataSource[i].taskAffirmStatus == 'Rejected') ||
// (this.dataSource[i].inventoryAffirmStatus == 'Accepted' && this.dataSource[i].taskAffirmStatus == 'Not started') ||
// (this.dataSource[i].inventoryAffirmStatus == 'Rejected' && this.dataSource[i].taskAffirmStatus == 'Not started')) {
isTrue = true
// } else {
// isTrue = false
// this.$message.warning(this.$t('theTaskConfirmationStatusCannot'))
// return
// }
}
}
}
@@ -1454,6 +1551,8 @@
this.$message.warning(this.$t('selectLeastOne'))
}
},
//流程重置接口
changeInterface() {
let _this = this
this.$confirm({
@@ -1476,9 +1575,12 @@
}
})
},
//添加
handleAdd() {
this.$refs.addModelRef.addModel()
},
//切换角色的确认事件
handleOkRoleSwitching() {
this.$refs.ruleFormRoleSwitching.validate(valid => {
if (valid) {
@@ -1506,9 +1608,12 @@
}
})
},
//切换角色的取消事件
handleCancelRoleSwitching() {
this.visibleRoleSwitching = false
},
//打开切换角色的弹窗;并判断当前的角色在角色列表中是否存在;如不存在选择角色列表中的第一个
roleSwitchingClick() {
this.visibleRoleSwitching = true
this.$nextTick(() => {
@@ -1523,6 +1628,7 @@
this.formInlineRoleSwitching = { ...this.formInlineRoleSwitching }
})
},
//批量删除
handleDel() {
if (this.selectedRowKeys && this.selectedRowKeys.length > 0) {
let _this = this
@@ -1566,10 +1672,12 @@
this.$message.warning(this.$t('selectLeastOne'))
}
},
//编辑
edit(item) {
item.roleCodeIndex = this.roleSwitchingCode
this.$refs.editModelRef.editModel(JSON.parse(JSON.stringify(item)))
},
//删除
deleteLib(val) {
let _this = this
this.$confirm({
@@ -1586,14 +1694,17 @@
}
})
},
//选择数据
onSelectChange(value, rows) {
this.selectedRowKeys = value
this.selectedRowKeysList = rows
},
//搜索
searchQuery() {
this.selectedRowKeys = []
this.getList()
},
//重置
searchReset() {
this.queryParam = {}
this.selectedRowKeys = []
@@ -1601,6 +1712,7 @@
this.$refs.globalAdvancedQueryRef.emitCallback()
// this.getList()
},
addModelList() {
this.selectedRowKeys = []
this.getList()
@@ -2193,31 +2305,6 @@
this.formInline[item.db_field_name] = this.formInline[item.db_field_name] ? moment(this.formInline[item.db_field_name]).format('YYYY-MM-DD') : ''
},
pdfPreview(fileQuery) {
let fileName = fileQuery.fileName
let index1 = fileName.lastIndexOf('.')
let index2 = fileName.length
let fileSuffix = fileName.substring(index1, index2)
if (fileSuffix == '.pdf') {
window.open('/pdf/web/viewer.html?file=' + encodeURIComponent('/jero-boot/sys/common/pdf/viewFile?id=' + fileQuery.id + '&userName=' + this.userInfo().username))
} else if (fileSuffix == '.docx' || fileSuffix == '.doc') {
let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + fileQuery.id + fileSuffix)
window.open(url, '_blank')
} else if (fileSuffix == '.xlsx' || fileSuffix == '.xls') {
let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadFileUrl + '/' + fileQuery.id + fileSuffix)
window.open(url, '_blank')
} else if (fileSuffix == '.png' || fileSuffix == '.jpeg' || fileSuffix == '.gif' || fileSuffix == '.jpg') {
let url = window._CONFIG['onlinePreviewDomainURL'] + '?url=' + Base64.encode(this.downLoadImgUrl + '/' + fileQuery.id + fileSuffix)
window.open(url, '_blank')
} else {
downloadFile('/sys/common/downLoadFile', fileQuery.fileName, { id: fileQuery.id })
}
},
download(item) {
downloadFile('/sys/common/downLoadFile', item.fileName, { id: item.id, userName: this.userInfo().username })
},
clickButtonToUpload(item, num) {
if (num == 1) {
this.isResultReported = true
@@ -2261,6 +2348,7 @@
}).then((res) => {
if (res.success) {
_this.$message.success(_this.$t('OperationSuccessful'))
this.selectedRowKeys = []
_this.getList()
} else {
_this.$message.warning(_this.$t('operationFailed'))