Explorar o código

修改员工分页功能

mork hai 6 días
pai
achega
76173de186
Modificáronse 3 ficheiros con 22 adicións e 12 borrados
  1. 16 7
      src/components/Map.vue
  2. 1 1
      src/main.js
  3. 5 4
      src/views/IndexView.vue

+ 16 - 7
src/components/Map.vue

@@ -272,9 +272,18 @@ export default {
       });
     },
     //关闭编辑弹窗
-    handleEditClose() {
-      let guid = sessionStorage.getItem('guid');
-      this.handleMoreClick(guid,this.tableSearchText,this.page);
+    handleEditClose(flag) {
+      const that = this;
+      // console.log("关闭编辑弹窗",flag);
+      that.contentItem = {};
+      that.isContentShow = false;
+      that.isContentView = false;
+      if(flag){
+        let guid = sessionStorage.getItem('guid');
+        // console.log("关闭编辑弹窗",guid);
+        that.handleMoreClick(guid,this.tableSearchText,this.page);
+        that.$parent.getDmsDataList();
+      }
     },
     handleClose() {
       this.tableShow = false;
@@ -548,8 +557,8 @@ export default {
             moreBtn.addEventListener('click', () => {
               // that.tableShow = false;
               this.tableSearchText = "";
-              that.handleMoreClick(fet.properties.GUID,"",0);
               sessionStorage.setItem('guid', fet.properties.GUID);
+              that.handleMoreClick(fet.properties.GUID,"",0);
             });
           }
         }, 0);
@@ -575,8 +584,8 @@ export default {
         pageSize: that.pageSize,
         page: that.page,
       };
-      console.log("guid:", guid);
-      console.log("text:", text); 
+      // console.log("guid:", guid);
+      // console.log("text:", text); 
       let arr = [...(requestParams.search ? JSON.parse(requestParams.search) : [])];
       if(guid){
         arr.push({
@@ -627,7 +636,7 @@ export default {
         }else{
           that.tableData = [];
           that.contentItem=[];
-          this.$message({ message: '无员工数据', type: 'info' })
+          // this.$message({ message: '无员工数据', type: 'info' })
         }
       });
     },

+ 1 - 1
src/main.js

@@ -20,7 +20,7 @@ for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
 
 // 添加自定义方法,得到用户类型【1:游客;2:普通用户;3:管理员】
 const getUserType = () => {
-  console.log("=====userInfo==="+JSON.stringify(store.state.userInfo));
+  // console.log("=====userInfo==="+JSON.stringify(store.state.userInfo));
   if (store.state.userInfo && store.state.userInfo.id != null) {
     // 得到用户id
     let userId = store.state.userInfo.id;

+ 5 - 4
src/views/IndexView.vue

@@ -66,7 +66,7 @@ export default {
       searchText: '',
       timeout:  null,
       selectType:'0',
-      dataList:[]
+      ygDataList:[]
     };
   },
   mounted() {
@@ -106,9 +106,9 @@ export default {
             return newItem;
           })
           // console.log("data:", data);
-          that.dataList = data;
+          that.ygDataList = data;
         }else{
-          this.$message({ message: '无员工数据', type: 'info' })
+          // that.$message({ message: '无员工数据', type: 'info' })
         }
       });
     },
@@ -147,7 +147,7 @@ export default {
     queryTableData(text,cb){
       const that = this;
       let results = [];
-      that.dataList.filter(item => {
+      that.ygDataList.filter(item => {
         if(item.c_xm.includes(text)){
           item.value = item.c_xm;
           results.push(item);
@@ -230,6 +230,7 @@ export default {
             }
           }
         }else{
+          // console.log('[ setItem(guid) ] >');
           sessionStorage.setItem('guid', "");
           that.$refs.childRef.setTableShow(that.searchText)
         }