|
@@ -10,21 +10,21 @@
|
|
|
</div> -->
|
|
|
<div class="province-box">
|
|
|
<!-- <span>{{$t(`areaManages.selector.provinceName`)}}:</span> -->
|
|
|
- <el-select v-model="provinceOptions.provinceValue" :placeholder="$t(`areaManages.selector.provinceDefault`)" @change="areaSelctChange(provinceOptions.provinceValue, 'province')">
|
|
|
+ <el-select v-model="provinceOptions.provinceValue" :placeholder="$t(`areaManages.selector.provinceDefault`)" @change="areaSelctChange(provinceOptions.provinceValue, 'province')" size="small">
|
|
|
<el-option v-for="item in provinceOptions.optionInfo" :key="item.code" :label="item.name" :value="item.name">
|
|
|
</el-option>
|
|
|
</el-select>
|
|
|
</div>
|
|
|
<div class="city-box">
|
|
|
<!-- <span>{{$t(`areaManages.selector.cityName`)}}:</span> -->
|
|
|
- <el-select v-model="cityOptions.cityValue" :placeholder="$t(`areaManages.selector.cityDefault`)" @change="areaSelctChange(cityOptions.cityValue, 'city')">
|
|
|
+ <el-select v-model="cityOptions.cityValue" :placeholder="$t(`areaManages.selector.cityDefault`)" @change="areaSelctChange(cityOptions.cityValue, 'city')" size="small">
|
|
|
<el-option v-for="item in cityOptions.cityInfo" :key="item.code" :label="item.name" :value="item.name">
|
|
|
</el-option>
|
|
|
</el-select>
|
|
|
</div>
|
|
|
<div class="dist-box">
|
|
|
<!-- <span>{{$t(`areaManages.selector.areaName`)}}:</span> -->
|
|
|
- <el-select v-model="distOptions.distValue" filterable allow-create default-first-option :placeholder="$t(`areaManages.selector.areaDefault`)" @change="areaSelctChange(distOptions.distValue, 'dist')">
|
|
|
+ <el-select v-model="distOptions.distValue" filterable allow-create default-first-option :placeholder="$t(`areaManages.selector.areaDefault`)" @change="areaSelctChange(distOptions.distValue, 'dist')" size="small">
|
|
|
<el-option v-for="item in distOptions.distInfo" :key="item.code" :label="item.name" :value="item.name">
|
|
|
</el-option>
|
|
|
</el-select>
|
|
@@ -34,6 +34,15 @@
|
|
|
<use xlink:href="#icon-quxiao"></use>
|
|
|
</svg>
|
|
|
</div>
|
|
|
+ <div class="searchSchoolbox">
|
|
|
+ <el-input v-model="searchValues" placeholder="搜索 学校名称/学校简码" class="input-with-select" size="small" clearable>
|
|
|
+ <template #prepend>
|
|
|
+ <svg class="addrelevancy-icon" aria-hidden="true">
|
|
|
+ <use xlink:href="#icon-sousuo3-copy"></use>
|
|
|
+ </svg>
|
|
|
+ </template>
|
|
|
+ </el-input>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
<div class="boxselect">
|
|
|
<div class="batchDelete" v-show="PowerShow && deleteSchoolArr.length !==0">
|
|
@@ -55,7 +64,7 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="school-list">
|
|
|
- <el-table :data="tableData" :ref="tablesInfo" id="tablescroll" style="width: 100%" height="75vh" v-loading="loading" element-loading-text="加载中..." empty-text="暂无数据" @selection-change="selectChange">
|
|
|
+ <el-table :data="tableData" :ref="tablesInfo" id="tablescroll" style="width: 100%" height="72vh" v-loading="loading" element-loading-text="加载中..." empty-text="暂无数据" @selection-change="selectChange">
|
|
|
<el-table-column type="selection" width="55" v-if="PowerShow" />
|
|
|
<el-table-column prop="index" :label="$t(`schoolManages.tables.serialnum`)" type="index" sortable align="center" />
|
|
|
<el-table-column :label="$t(`schoolManages.tables.badge`)" width="150" align="center">
|
|
@@ -413,6 +422,8 @@ export default {
|
|
|
])
|
|
|
let loadingSchoolUpdate = ref(false)
|
|
|
let deleteSchoolArr = ref([])
|
|
|
+ //搜索学校关键字
|
|
|
+ let searchValues = ref()
|
|
|
provinceOptions.value.optionInfo = optionsData
|
|
|
console.log(store.state.point)
|
|
|
onMounted(() => {
|
|
@@ -844,11 +855,34 @@ export default {
|
|
|
}
|
|
|
timer.value = setTimeout(fn, wait)
|
|
|
}
|
|
|
+ function personnelSearch () {
|
|
|
+ loading.value = true
|
|
|
+ let values = searchValues.value
|
|
|
+ let cnLang = new RegExp("[\u4E00-\u9FA5]+");
|
|
|
+ let letter = new RegExp("[A-Za-z]+");
|
|
|
+ let numbers = new RegExp("[0-9]+");
|
|
|
+ let data = cnLang.test(values) || numbers.test(values) ? { name: values } : letter.test(values) ? { scId: values } : ''
|
|
|
+ console.log(data, '搜索传值')
|
|
|
+ proxy.$api.getSchooldata(data).then((res) => {
|
|
|
+ console.log(res, '查询的返回')
|
|
|
+ res.state === 200 ? tableData.value = res.schoolAssists : ''
|
|
|
+ }).catch((err) => {
|
|
|
+ ElMessage.error('查询学校API异常,请重试')
|
|
|
+ })
|
|
|
+ setTimeout(function () { loading.value = false }, 500);
|
|
|
+ }
|
|
|
watch(scrollHeight, (newdata) => {
|
|
|
if (scrollHeight.value < 0) {
|
|
|
debounce(datascroll, 500)
|
|
|
}
|
|
|
})
|
|
|
+ watch(searchValues, (newdata) => {
|
|
|
+ if (newdata.trim().length !== 0) {
|
|
|
+ debounce(personnelSearch, 500)
|
|
|
+ } else {
|
|
|
+ tableData.value = originalData.value
|
|
|
+ }
|
|
|
+ })
|
|
|
getAllschool()
|
|
|
getAllassists()
|
|
|
return {
|
|
@@ -905,7 +939,8 @@ export default {
|
|
|
tableNexttoken,
|
|
|
tablesInfo,
|
|
|
debounce,
|
|
|
- tablesccnt
|
|
|
+ tablesccnt,
|
|
|
+ searchValues
|
|
|
}
|
|
|
},
|
|
|
}
|
|
@@ -1222,6 +1257,17 @@ export default {
|
|
|
color: #ecf0f1;
|
|
|
margin: 0 auto;
|
|
|
}
|
|
|
+.searchSchoolbox {
|
|
|
+ width: 53%;
|
|
|
+}
|
|
|
+.addrelevancy-icon {
|
|
|
+ width: 1.2em;
|
|
|
+ height: 1.2em;
|
|
|
+ vertical-align: -0.2em;
|
|
|
+ fill: currentColor;
|
|
|
+ overflow: hidden;
|
|
|
+ margin-right: 5px;
|
|
|
+}
|
|
|
</style>
|
|
|
<style>
|
|
|
.schoolboxea .el-cascader {
|