修改项目库的查询条件
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div>
|
||||
<div class="box-title-text">
|
||||
<div class="box-title-text" v-if="!isInput">
|
||||
<a-input class="box-input" :value="value" @input="indexclick($event)"
|
||||
:disabled="true"
|
||||
:placeholder="$t('PleaseSelect')+query.db_field_txt"/>
|
||||
@@ -8,6 +8,12 @@
|
||||
{{this.$t('PersonnelSelection')}}
|
||||
</a-button>
|
||||
</div>
|
||||
<div class="box-title-text" v-if="isInput">
|
||||
<a-input class="box-input" :value="value"
|
||||
readonly
|
||||
@click.native="standardClick"
|
||||
:placeholder="$t('PleaseSelect')+query.db_field_txt"/>
|
||||
</div>
|
||||
<a-drawer
|
||||
:title="$t('PersonnelSelection')"
|
||||
:maskClosable="false"
|
||||
@@ -47,7 +53,7 @@
|
||||
|
||||
export default {
|
||||
name: 'index',
|
||||
props: ['query', 'value', 'personneQuery','isSingleChoice'],
|
||||
props: ['query', 'value', 'personneQuery', 'isSingleChoice', 'isInput'],
|
||||
data() {
|
||||
return {
|
||||
loading: true,
|
||||
@@ -96,11 +102,11 @@
|
||||
},
|
||||
handleSubmit() {
|
||||
if (this.userIds && this.userIds.length > 0) {
|
||||
if (this.isSingleChoice){
|
||||
if (this.userIds.length > 1){
|
||||
this.$message.warning(this.$t('onlyOnePersonCanBeSelected'))
|
||||
}
|
||||
}
|
||||
if (this.isSingleChoice) {
|
||||
if (this.userIds.length > 1) {
|
||||
this.$message.warning(this.$t('onlyOnePersonCanBeSelected'))
|
||||
}
|
||||
}
|
||||
let userIds = JSON.parse(JSON.stringify(this.userIds))
|
||||
let userName = JSON.parse(JSON.stringify(this.userName))
|
||||
this.$emit('input', userName.join(','))
|
||||
|
||||
@@ -39,8 +39,12 @@
|
||||
<div class="title-text" :title="$t('StudioEngineer')">
|
||||
<span>{{$t('StudioEngineer')}}</span>
|
||||
</div>
|
||||
<a-input class="box-input" :placeholder="$t('PleaseEnter')+$t('StudioEngineer')"
|
||||
v-model="queryParam.studioEngineerName"></a-input>
|
||||
<PersonnelSelection class="box-input"
|
||||
:query="{db_field_name:'studioEngineer',db_field_txt:$t('StudioEngineer')}"
|
||||
:isInput="true"
|
||||
:personneQuery="queryParam"
|
||||
@change="PersonnelSelectionChange"
|
||||
v-model="queryParam.studioEngineerName"/>
|
||||
</div>
|
||||
</a-col>
|
||||
<a-col :md="6" :sm="8">
|
||||
@@ -48,8 +52,12 @@
|
||||
<div class="title-text" :title="$t('certifiedEngineer')">
|
||||
<span>{{$t('certifiedEngineer')}}</span>
|
||||
</div>
|
||||
<a-input class="box-input" :placeholder="$t('PleaseEnter')+$t('certifiedEngineer')"
|
||||
v-model="queryParam.certificationEngineerName"></a-input>
|
||||
<PersonnelSelection :query="{db_field_name:'certificationEngineer',db_field_txt:$t('certifiedEngineer')}"
|
||||
:isInput="true"
|
||||
class="box-input"
|
||||
:personneQuery="queryParam"
|
||||
@change="PersonnelSelectionChange"
|
||||
v-model="queryParam.certificationEngineerName"/>
|
||||
</div>
|
||||
</a-col>
|
||||
<a-col :md="6" :sm="8">
|
||||
@@ -137,11 +145,13 @@
|
||||
<script>
|
||||
import { getAction, postAction, downloadFile, deleteAction } from '@/api/manage'
|
||||
import addModel from '../components/addModel'
|
||||
import PersonnelSelection from '@/components/PersonnelSelection/index'
|
||||
|
||||
export default {
|
||||
name: 'index',
|
||||
components: {
|
||||
addModel
|
||||
addModel,
|
||||
PersonnelSelection
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@@ -300,6 +310,10 @@
|
||||
this.pageNo = 1
|
||||
this.getList()
|
||||
},
|
||||
PersonnelSelectionChange(value, id) {
|
||||
this.queryParam[value] = id
|
||||
this.queryParam = { ...this.queryParam }
|
||||
},
|
||||
getList() {
|
||||
let query = {
|
||||
pageNo: this.pageNo,
|
||||
|
||||
Reference in New Issue
Block a user