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

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