修改禅道bug

This commit is contained in:
qq787203167
2022-07-05 11:59:01 +08:00
parent f124001c09
commit 770e88c0a3
2 changed files with 343 additions and 13 deletions
@@ -8,6 +8,71 @@
@ok="visible = false"
@cancel="visible = false"
>
<a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row :gutter="24">
<a-col :md="12" :sm="8">
<div class="box-title-text-search">
<div class="title-text-search" :title="$t('areaOfResponsibility')">
<span>{{$t('areaOfResponsibility')}}</span>
</div>
<j-dict-select-tag class="box-input-search" v-model="queryParam.dutyTerritory"
:placeholder="$t('PleaseSelect')+$t('areaOfResponsibility')"
:type="'select'"
:triggerChange="false" :dictCode="'duty_territory'"/>
</div>
</a-col>
<a-col :md="12" :sm="8">
<div class="box-title-text-search">
<div class="title-text-search" :title="$t('engineeringInterfacePerson')">
<span>{{$t('engineeringInterfacePerson')}}</span>
</div>
<PersonnelSelection class="box-input-search"
:query="{db_field_name:'engineeringInterfacePerson',db_field_txt:$t('engineeringInterfacePerson')}"
:isInput="true"
:personneQuery="queryParam"
@change="PersonnelSelectionChange"
v-model="queryParam.engineeringInterfacePersonName"/>
</div>
</a-col>
<a-col :md="12" :sm="8">
<div class="box-title-text-search">
<div class="title-text-search" :title="$t('regulatoryEngineer')">
<span>{{$t('regulatoryEngineer')}}</span>
</div>
<PersonnelSelection class="box-input-search"
:query="{db_field_name:'lawEngineer',db_field_txt:$t('regulatoryEngineer')}"
:isInput="true"
:personneQuery="queryParam"
@change="PersonnelSelectionChange"
v-model="queryParam.lawEngineerName"/>
</div>
</a-col>
<a-col :md="12" :sm="8">
<div class="box-title-text-search">
<div class="title-text-search" :title="$t('certifiedEngineer')">
<span>{{$t('certifiedEngineer')}}</span>
</div>
<a-select class="box-input-search"
v-model="queryParam.certificationEngineer"
:placeholder="$t('PleaseSelect')+$t('certifiedEngineer')">
<a-select-option v-for="(item, key) in dictOptionsValue"
:key="item.certificationEngineer"
:value="item.certificationEngineer">
<span class="itemOption" :title=" item.certificationEngineerName ">
{{ item.certificationEngineerName }}
</span>
</a-select-option>
</a-select>
</div>
</a-col>
<span style="float: right;overflow: hidden;margin-right: 11px;margin-bottom: 20px"
class="table-page-search-submitButtons">
<a-button class="box-button-search" type="primary" @click="searchQuery">{{$t('query')}}</a-button>
<a-button class="box-button-search" style="margin-left: 8px"
@click="searchReset">{{$t('reset')}}</a-button>
</span>
</a-row>
</a-form>
<div class="table-operator">
<div @click="handleModule" v-has="'projectRelatedPersonnel:exportTemplate'" class="operator-text">
<a-icon type="download"/>
@@ -23,12 +88,21 @@
<ImportFile :url="url" :projectId="$route.query.id" :isTrue="true" :accept="'.xls'"
@getList="getPersonnelList"/>
</div>
<div class="operator-text"
@click="batSettingClick"
v-has="'projectRelatedPersonnel:setting'"
v-if="this.$route.query.studioEngineer == this.userInfo().id">
<a-icon type="setting"/>
{{$t('batSetting')}}
</div>
</div>
<!-- rowKey="id"
:row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"-->
<a-table
class="table"
:columns="columns"
rowKey="id"
:row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
:pagination="false"
:scroll="{x:800,y: 400}"
:data-source="dataSource"
@@ -84,10 +158,10 @@
<a-col :span="24">
<div class="box-title-text">
<div class="title-text">
<!-- <span class="Required">*</span>-->
<!-- <span class="Required">*</span>-->
<span class="title-text-text" :title="$t('regulatoryEngineer')">{{$t('regulatoryEngineer')}}</span>
</div>
<!-- :prop="'lawEngineerName'"-->
<!-- :prop="'lawEngineerName'"-->
<a-form-model-item class="itemModel">
<PersonnelSelection
:query="{db_field_name:'lawEngineer',db_field_txt:$t('regulatoryEngineer')}"
@@ -104,10 +178,10 @@
<a-col :span="24">
<div class="box-title-text">
<div class="title-text">
<!-- <span class="Required">*</span>-->
<!-- <span class="Required">*</span>-->
<span class="title-text-text" :title="$t('engineeringInterfacePerson')">{{$t('engineeringInterfacePerson')}}</span>
</div>
<!-- :prop="'engineeringInterfacePersonName'"-->
<!-- :prop="'engineeringInterfacePersonName'"-->
<a-form-model-item class="itemModel">
<PersonnelSelection
:query="{db_field_name:'engineeringInterfacePerson',db_field_txt:$t('engineeringInterfacePerson')}"
@@ -124,10 +198,10 @@
<a-col :span="24">
<div class="box-title-text">
<div class="title-text">
<!-- <span class="Required">*</span>-->
<!-- <span class="Required">*</span>-->
<span class="title-text-text" :title="$t('certifiedEngineer')">{{$t('certifiedEngineer')}}</span>
</div>
<!-- :prop="'certificationEngineer'"-->
<!-- :prop="'certificationEngineer'"-->
<a-form-model-item class="itemModel">
<a-select allowClear
v-model="formInline.certificationEngineer"
@@ -162,12 +236,14 @@
</a-form-model>
</a-spin>
</a-modal>
<personBatting ref="personBattingRef" @personBattingTable="personBattingTable"/>
</div>
</template>
<script>
import PersonnelSelection from '@/components/PersonnelSelection/index'
import personBatting from './personBatting'
import { getAction, postAction, downloadFile, putAction } from '@/api/manage'
import ImportFile from '@/components/ImportFile/index'
import { mapGetters } from 'vuex'
@@ -176,11 +252,13 @@
name: 'listOfRelevantPersonnel',
components: {
PersonnelSelection,
ImportFile
ImportFile,
personBatting
},
data() {
return {
visible: false,
queryParam: {},
columnsAll: [
{
title: this.$t('areaOfResponsibility'),
@@ -321,12 +399,25 @@
}
})
},
deleteData(name){
personBattingTable() {
this.selectedRowKeys = []
this.getList()
},
batSettingClick() {
if (this.selectedRowKeys && this.selectedRowKeys.length > 0) {
let selectedRowKeys = JSON.parse(JSON.stringify(this.selectedRowKeys))
this.$refs.personBattingRef.getData(selectedRowKeys.join(','))
} else {
this.$message.warning(this.$t('selectLeastOne'))
}
},
deleteData(name) {
this.formInline[name] = ''
this.formInline = {...this.formInline}
this.formInline = { ...this.formInline }
},
getData() {
this.visible = true
this.queryParam = {}
this.getList()
this.queryCertificationEngineer()
},
@@ -336,7 +427,7 @@
editOk() {
this.$refs.ruleForm.validate(valid => {
if (valid) {
if (!this.formInline.certificationEngineer){
if (!this.formInline.certificationEngineer) {
this.formInline.certificationEngineer = ''
}
this.confirmLoading = true
@@ -362,8 +453,13 @@
})
},
PersonnelSelectionChange(value, id) {
this.formInline[value] = id
this.formInline = { ...this.formInline }
if (this.editVisible) {
this.formInline[value] = id
this.formInline = { ...this.formInline }
} else {
this.queryParam[value] = id
this.queryParam = { ...this.queryParam }
}
},
// pageOnChange(page, pageSize) {
// this.pageNo = page
@@ -377,9 +473,17 @@
onSelectChange(value) {
this.selectedRowKeys = value
},
searchQuery() {
this.getList()
},
searchReset() {
this.queryParam = {}
this.getList()
},
getList() {
let query = {
projectId: this.$route.query.id
projectId: this.$route.query.id,
...this.queryParam
}
this.loading = true
postAction(this.url.page, query).then((res) => {
@@ -409,7 +513,20 @@
}
}
</script>
<style>
.box-input-search .ant-select-selection--single {
height: 38px;
}
.box-input-search .ant-select-selection--multiple {
height: 38px;
}
.box-input-search .ant-select-selection__rendered {
line-height: 38px;
height: 38px;
}
</style>
<style scoped>
@import '~@assets/less/common.less';
@@ -472,4 +589,37 @@
text-overflow: ellipsis;
-o-text-overflow: ellipsis;
}
.box-title-text-search {
line-height: 1.4;
display: flex;
align-items: center;
margin-bottom: 10px;
}
.title-text-search {
width: 90px;
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-search {
display: inline-block;
width: calc(100% - 100px);
height: 38px;
margin-top: 2px;
}
.box-button-search {
height: 38px;
/*margin-top: 2px;*/
}
</style>
@@ -0,0 +1,180 @@
<template>
<a-modal
:title="$t('batSetting')"
:width="600"
:visible="visible"
:maskClosable="false"
:confirm-loading="confirmLoading"
@ok="editOk"
@cancel="visible = false"
>
<a-spin :spinning="confirmLoading">
<a-form-model :model="formInline" class="formAdd" :rules="rules" ref="ruleForm">
<a-row :gutter="24">
<a-col :span="24">
<div class="box-title-text">
<div class="title-text">
<span class="title-text-text" :title="$t('regulatoryEngineer')">{{$t('regulatoryEngineer')}}</span>
</div>
<a-form-model-item class="itemModel">
<PersonnelSelection
:query="{db_field_name:'lawEngineer',db_field_txt:$t('regulatoryEngineer')}"
:personneQuery="formInline"
@change="PersonnelSelectionChange"
v-model="formInline.lawEngineerName"/>
</a-form-model-item>
</div>
</a-col>
</a-row>
<a-row :gutter="24">
<a-col :span="24">
<div class="box-title-text">
<div class="title-text">
<span class="title-text-text" :title="$t('engineeringInterfacePerson')">{{$t('engineeringInterfacePerson')}}</span>
</div>
<a-form-model-item class="itemModel">
<PersonnelSelection
:query="{db_field_name:'engineeringInterfacePerson',db_field_txt:$t('engineeringInterfacePerson')}"
:personneQuery="formInline"
@change="PersonnelSelectionChange"
v-model="formInline.engineeringInterfacePersonName"/>
</a-form-model-item>
</div>
</a-col>
</a-row>
<a-row :gutter="24">
<a-col :span="24">
<div class="box-title-text">
<div class="title-text">
<span class="title-text-text" :title="$t('certifiedEngineer')">{{$t('certifiedEngineer')}}</span>
</div>
<a-form-model-item class="itemModel">
<a-select allowClear
class="box-input"
v-model="formInline.certificationEngineer"
:placeholder="$t('certifiedEngineer')+$t('areaOfResponsibility')">
<a-select-option v-for="(item, key) in dictOptionsValue"
:key="item.certificationEngineer"
:value="item.certificationEngineer">
<span class="itemOption" :title=" item.certificationEngineerName ">
{{ item.certificationEngineerName }}
</span>
</a-select-option>
</a-select>
</a-form-model-item>
</div>
</a-col>
</a-row>
</a-form-model>
</a-spin>
</a-modal>
</template>
<script>
import PersonnelSelection from '@/components/PersonnelSelection/index'
import { getAction, postAction, downloadFile, putAction } from '@/api/manage'
export default {
name: 'personBatting',
components: {
PersonnelSelection
},
data() {
return {
confirmLoading: false,
formInline: {},
visible: false,
rules: {},
ids: '',
dictOptionsValue: [],
url: {
queryCertificationEngineer: '/project/projectRelatedPersonnel/queryCertificationEngineer'
}
}
},
mounted() {
},
methods: {
getData(ids) {
this.visible = true
this.ids = ids
this.formInline = {}
this.queryCertificationEngineer()
},
queryCertificationEngineer() {
getAction(this.url.queryCertificationEngineer, { projectId: this.$route.query.id }).then((res) => {
if (res.success) {
this.dictOptionsValue = res.result
} else {
this.dictOptionsValue = []
}
})
},
PersonnelSelectionChange(value, id) {
this.formInline[value] = id
this.formInline = { ...this.formInline }
},
editOk() {
let query = {
...this.formInline,
ids: this.ids
}
this.confirmLoading = true
postAction('/project/projectRelatedPersonnel/setBatch', query).then((res) => {
if (res.success) {
this.$message.success(this.$t('OperationSuccessful'))
this.visible = false
this.confirmLoading = false
this.$emit('personBattingTable')
} else {
this.$message.warning(this.$t('operationFailed'))
this.confirmLoading = false
}
})
}
}
}
</script>
<style scoped>
.box-title-text {
line-height: 1.4;
display: flex;
/*align-items: center;*/
}
.title-text {
width: 114px;
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: 48px;
}
.box-input {
display: inline-block;
height: 38px;
width: 100%;
}
.itemModel {
width: calc(100% - 130px);
display: inline-block;
margin-top: 2px;
}
.Required {
color: red;
margin-right: 4px;
}
.title-text-text {
margin-top: 9px;
}
</style>