Commit 69f54d3a authored by “yiyousong”'s avatar “yiyousong”

fix: 修复

parent eb91ce09
......@@ -234,7 +234,7 @@ export default {
let { code, msg } = res.data;
if (code === 1) {
_this.$message.success(msg);
this.selectedRowKeys = [];
_this.selectedRowKeys = [];
_this.getCategoryList();
}
},
......
......@@ -181,15 +181,23 @@
</a-button>
</a-dropdown>
</div>
<div class="in">
<a-space>
<a-select v-model="searchType" style="width: 120px">
<a-select-option :value="1">
按姓名
</a-select-option>
<a-select-option :value="2">
按工号
</a-select-option>
</a-select>
<a-input-search
placeholder="请输入姓名或者工号搜索"
placeholder="请输入关键字搜索"
v-model="searchVal"
enter-button="搜索"
allowClear
@search="onSearch"
/>
</div>
</a-space>
</div>
<div class="table-content">
<!-- 表格 -->
......@@ -408,6 +416,7 @@ export default {
WorkmanData: [], // 工作人员列表
deptSearch: "", //部门搜索
windowSearch: "", // 窗口搜索
searchType: 1, // 搜索类型
searchVal: "",
visibleAll: false,
page: 1,
......@@ -458,9 +467,9 @@ export default {
async getWorkmanData(search = {}) {
this.loading = true;
let obj = {};
if (/^[\u4e00-\u9fa5]+$/.test(this.searchVal)) {
if (this.searchType == 1) {
obj.name = `%${this.searchVal}%`;
} else if (/^[a-zA-z0-9]+$/.test(this.searchVal)) {
} else if (this.searchType == 2) {
obj.number = `%${this.searchVal}%`;
}
let res = await getWorkmanList({
......
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