Commit 17529c48 authored by jingnan's avatar jingnan 👀

人员查询接口修改

parent bd9f6a44
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
<el-option <el-option
v-for="citem in UserData" v-for="citem in UserData"
:key="citem.id" :key="citem.id"
:label="citem.name" :label="citem.name+'('+citem.userAccount+')'"
:value="basicData.subTypeName==='ScrapNoticeDoc'?`${citem.name}(${citem.userAccount})`:citem.id" :value="basicData.subTypeName==='ScrapNoticeDoc'?`${citem.name}(${citem.userAccount})`:citem.id"
/> />
</el-select> </el-select>
...@@ -27,7 +27,8 @@ ...@@ -27,7 +27,8 @@
</template> </template>
<script> <script>
import { getUsersByAccount, getFuzzyMatchUser } from '@/api/user' import { getFuzzyMatchUser } from '@/api/user'
import { post } from '@/utils/http'
import config from './config' import config from './config'
export default { export default {
name: 'GeneralUserSelect', name: 'GeneralUserSelect',
...@@ -157,14 +158,63 @@ export default { ...@@ -157,14 +158,63 @@ export default {
}) })
} else { } else {
// 针对非审计页面查人 // 针对非审计页面查人
const params = { userAccount: query, containInnerUser: this.item.containInnerUse || false } // const params = { userAccount: query, containInnerUser: this.item.containInnerUse || false }
// if (this.item.secret) {
// params.secretCode = this.$store.state.user.userInfo.secretCode
// }
const params = {
'pageFrom': 1,
'pageSize': 200,
'openProps': [],
'sortItem': [
{
'fieldName': 'modifyTime',
'sortOrder': 'desc'
}
],
'searchItems': {
'operator': 'AND',
'children': [
{
'items': [
{
'fieldName': 'userAccount',
'operator': 'LIKE',
'value': query
},
{
'fieldName': 'name',
'operator': 'LIKE',
'value': query
}
],
'operator': 'OR'
},
{
'items': [
{
'fieldName': 'enableFlag',
'operator': 'EQ',
'value': true
}
],
'operator': 'AND'
}
]
}
}
if (this.item.secret) { if (this.item.secret) {
params.secretCode = this.$store.state.user.userInfo.secretCode // params.secretCode = this.$store.state.user.userInfo.secretCode
params.searchItems.items.push({
'fieldName': 'secretCode',
'operator': 'EQ',
'value': this.$store.state.user.userInfo.secretCode
},)
} }
this.loading = true this.loading = true
getUsersByAccount(params) post('/DxUserInfo/search', params)
.then(res => { .then(res => {
this.UserData = res.items ? res.items : [] this.UserData = res.items && res.items.content ? res.items.content : []
}) })
.finally(() => { .finally(() => {
this.loading = false this.loading = false
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment