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