From eef1ef0be935d4a3d8fc691b2666f41796b2d4a5 Mon Sep 17 00:00:00 2001 From: gaoshp <291585735@qq.com> Date: 星期一, 04 十一月 2024 19:57:08 +0800 Subject: [PATCH] 增加列表显示 --- src/views/master/person/main/personPerson.vue | 43 +++++++++++++++++++++++++------------------ 1 files changed, 25 insertions(+), 18 deletions(-) diff --git a/src/views/master/person/main/personPerson.vue b/src/views/master/person/main/personPerson.vue index 181f165..7b84259 100644 --- a/src/views/master/person/main/personPerson.vue +++ b/src/views/master/person/main/personPerson.vue @@ -2,17 +2,17 @@ * @Author: lzhe lzhe@example.com * @Date: 2024-03-26 10:28:33 * @LastEditors: lzhe lzhe@example.com - * @LastEditTime: 2024-10-09 13:56:01 + * @LastEditTime: 2024-11-04 11:02:26 * @FilePath: /belleson-frontend/Users/mache/Documents/demo/cps-web/src/views/master/person/main/personPerson.vue * @Description: 杩欐槸榛樿璁剧疆,璇疯缃甡customMade`, 鎵撳紑koroFileHeader鏌ョ湅閰嶇疆 杩涜璁剧疆: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE --> <template> <div class="person-person"> <div class="person-person-left"> - <div class="person-left-title"> + <!-- <div class="person-left-title"> <div :class="{ 'person-left-active': leftActive }" @click="changeTab(1)">閮ㄩ棬</div> <div :class="{ 'person-left-active': !leftActive }" @click="changeTab(2)">宀椾綅</div> - </div> + </div> --> <div class="person-left-search"> <el-input v-model="input" placeholder="璇疯緭鍏ュ唴瀹�" size="small"></el-input> </div> @@ -29,7 +29,10 @@ <div class="right-top"> <div class="right-title"><span v-if="leftActive">閮ㄩ棬锛氬崈鏂囩鎶�</span></div> <div> - <el-select v-model="searchData.status" placeholder="鐘舵��" class="searchStatus"> + <el-select v-model="searchData.postId" clearable placeholder="宀椾綅" class="searchStatus" @change="searchDataChange"> + <el-option v-for="item in postList" :key="item.id" :label="item.postName" :value="item.id" size="small" /> + </el-select> + <el-select v-model="searchData.status" placeholder="鐘舵��" class="searchStatus" @change="searchDataChange"> <el-option v-for="item in statusList" :key="item.dictKey" :label="item.dictValue" :value="item.dictKey" size="small" /> </el-select> @@ -166,6 +169,7 @@ name: "personPerson", data() { return { + postList: [], authorization: {}, uploadUrl: "/api/smis/employee/import-employee", exportUrl: "/api/smis/employee/export-template", @@ -211,6 +215,7 @@ mounted() { this.getStatus(); this.getOrganizationList(); //閮ㄩ棬 + this.getPost(); //宀椾綅 }, components: { saveDialog, importTable,...ElementPlusIconsVue @@ -255,23 +260,24 @@ this.searchPerson(); }, selectbtn(index) { - this.titleList.forEach(item => { - item.active = false; - }) - this.titleList[index].active = true; - if (this.leftActive) { //閮ㄩ棬 - this.searchData.organizationCode = this.titleList[index].code; - this.searchData.postId = ""; - } else { //宀椾綅 - this.searchData.organizationCode = ""; - this.searchData.postId = this.titleList[index].id; - } + // this.titleList.forEach(item => { + // item.active = false; + // }) + // this.titleList[index].active = true; + // if (this.leftActive) { //閮ㄩ棬 + // this.searchData.organizationCode = this.titleList[index].code; + // this.searchData.postId = ""; + // } else { //宀椾綅 + // this.searchData.organizationCode = ""; + // this.searchData.postId = this.titleList[index].id; + // } this.searchPerson(); }, getOrganizationList() { //閮ㄩ棬 this.$HTTP.get(`/api/smis/organization/tree?groupType=group_organization&groupCategory=1`).then(res => { if (res.code == 200) { this.titleList = res.data; + console.log(this.titleList,111); this.titleList[0].active = true; this.searchData.organizationCode = res.data[0].code; this.searchPerson(); @@ -285,13 +291,14 @@ } this.$HTTP.get(`/api/blade-system/post/page?` + this.$TOOL.qsStringify(obj)).then(res => { if (res.code == 200) { - this.titleList = res.data.records; - this.titleList[0].active = true; - this.searchData.postId = res.data.records[0].id; + this.postList = res.data.records; this.searchPerson(); } }) }, + searchDataChange() { + this.searchPerson(); + }, delData(type) { this.$HTTP.post(`/api/smis/employee/remove?ids=${this.selectId}&type=${type}`).then(res => { if (res.code == 200) { -- Gitblit v1.9.3