|
|
@@ -4,9 +4,9 @@
|
|
|
<el-form style="display: flex;justify-content: space-between;align-items: center;" :inline="true"
|
|
|
:model="formInline" class="demo-form-inline">
|
|
|
<el-form-item>
|
|
|
- <el-select filterable @change="GetGroupNameList" v-model="diid" placeholder="团组名称"
|
|
|
+ <el-select filterable remote :filter-method="advancedFilter" @change="PostShareGroupInfo" v-model="diid" placeholder="团组名称"
|
|
|
style="width: 250px;">
|
|
|
- <el-option :style="item.hasProcess?'color: #409EFF;':''" v-for="(item, index) in AuditStatus"
|
|
|
+ <el-option :style="item.hasProcess?'color: #409EFF;':''" v-for="(item, index) in AuditStatusArr"
|
|
|
:key="index" :label="item.groupName" :value="item.id"></el-option>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
@@ -642,9 +642,49 @@ export default {
|
|
|
progressloading:false,
|
|
|
jobName:'',
|
|
|
visaclickid:'',
|
|
|
+
|
|
|
+ AuditStatusArr:[],
|
|
|
+ searchMode: 'character', // 'character': 字符匹配, 'fuzzy': 模糊匹配
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
+ advancedFilter(query) {
|
|
|
+ if (!query || query.trim() === '') {
|
|
|
+ this.AuditStatusArr = [...this.AuditStatus];
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ const trimmedQuery = query.trim();
|
|
|
+
|
|
|
+ if (this.searchMode === 'character') {
|
|
|
+ // 字符匹配模式:每个字都必须包含
|
|
|
+ this.characterMatchFilter(trimmedQuery);
|
|
|
+ } else {
|
|
|
+ // 模糊匹配模式(默认的filterable行为)
|
|
|
+ this.fuzzyMatchFilter(trimmedQuery);
|
|
|
+ }
|
|
|
+ },
|
|
|
+ /*** 严格的字符匹配 - 每个查询字符都必须出现*/
|
|
|
+ characterMatchFilter(query) {
|
|
|
+ const queryChars = query.split('').filter(char => char.trim() !== '');
|
|
|
+
|
|
|
+ this.AuditStatusArr = this.AuditStatus.filter(item => {
|
|
|
+ const groupName = item.groupName || '';
|
|
|
+ return queryChars.every(char => groupName.includes(char));
|
|
|
+ });
|
|
|
+ },
|
|
|
+ /*** 模糊匹配 - 包含整个查询字符串即可*/
|
|
|
+ fuzzyMatchFilter(query) {
|
|
|
+ const lowerQuery = query.toLowerCase();
|
|
|
+ this.AuditStatusArr = this.AuditStatus.filter(item => {
|
|
|
+ const groupName = (item.groupName || '').toLowerCase();
|
|
|
+ return groupName.includes(lowerQuery);
|
|
|
+ });
|
|
|
+ },
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
handleChange(val) {
|
|
|
console.log(val);
|
|
|
},
|
|
|
@@ -664,7 +704,6 @@ export default {
|
|
|
},
|
|
|
//获取团组id
|
|
|
GetGroupNameList(){
|
|
|
- this.progressloading=true;
|
|
|
this.AuditStatus=[];
|
|
|
var url = "/api/Groups/GroupProcessGroupNames"
|
|
|
var that = this
|
|
|
@@ -677,19 +716,20 @@ export default {
|
|
|
}).then(function (res) {
|
|
|
if(res.data.code==200){
|
|
|
that.AuditStatus=res.data.data;
|
|
|
+ that.AuditStatusArr=that.AuditStatus;
|
|
|
if (that.diid==='') {
|
|
|
that.diid=res.data.data[0].id;
|
|
|
|
|
|
}
|
|
|
that.PostShareGroupInfo();
|
|
|
}else{
|
|
|
- that.progressloading=false;
|
|
|
that.$message.error(res.data.msg);
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
//获取团组详情
|
|
|
PostShareGroupInfo(){
|
|
|
+ this.progressloading=true;
|
|
|
var url = "/api/Business/PostShareGroupInfo"
|
|
|
var that = this
|
|
|
this.$axios({
|
|
|
@@ -703,7 +743,6 @@ export default {
|
|
|
id: that.diid
|
|
|
}
|
|
|
}).then(function (res) {
|
|
|
- console.log(res)
|
|
|
if(res.data.code==200){
|
|
|
that.formInline.name = res.data.data.teamName;
|
|
|
that.formInline.clientName = res.data.data.clientName;
|