Prechádzať zdrojové kódy

记忆选择的每页数量,默认改成进行中的状态

seyason 3 rokov pred
rodič
commit
7c28b41dcf

+ 9 - 5
fhKeeper/formulahousekeeper/timesheet/src/views/project/list.vue

@@ -153,7 +153,7 @@
                     {{scope.row.progress==null?"-":scope.row.progress}}%
                 </template>
             </el-table-column>
-            <el-table-column label="操作" width="350" align="left">
+            <el-table-column label="操作" width="350" align="left" fixed="right">
                 <template slot-scope="scope">
                     <el-button v-if="permissions.projectManagement || user.id==scope.row.creatorId" size="mini"  @click="subProject(scope.row)">子项目</el-button>
                     <el-button size="mini" v-if="permissions.projectManagement || user.id==scope.row.inchargerId || user.id==scope.row.creatorId" type="primary" @click="handleAdd(scope.$index, scope.row)">编辑</el-button>
@@ -186,7 +186,7 @@
                 @size-change="handleSizeChange"
                 @current-change="handleCurrentChange"
                 :page-sizes="[20 , 50 , 80 , 100]"
-                :page-size="20"
+                :page-size="size"
                 layout="total, sizes, prev, pager, next"
                 :total="total"
                 style="float:right;"
@@ -691,6 +691,7 @@ a {
                     children: 'children',
                     label: 'label'
                 },
+
                 filterName:null,
                 chooseParticipVisible: false,
                 projectBaseCostData:[],
@@ -698,7 +699,7 @@ a {
                 showBaseConfig:false,
                 customerList:[],
                 roleArray:["普通员工","超级管理员", "系统管理员", "公司高层","财务管理员", "项目管理员"],
-                status:null,
+                status:"1",
                 statusTxt:["-","进行中","已完成","已撤销"],
                 importanceList:[{id:1,label:'正常'},{id:2,label:'紧急'},{id:3,label:'重要'},{id:4,label:'重要且紧急'}],
                 searchField:'1',
@@ -714,7 +715,7 @@ a {
                 listLoading: false,
                 total: 0,
                 page: 1,
-                size: 20,
+                size: localStorage.getItem("projectPageSize")==null?20:parseInt(localStorage.getItem("projectPageSize")),
                 list: [],
                 subProjectVisible: false,
                 subProjectList: [],//子项目列表
@@ -1933,6 +1934,7 @@ a {
 
             handleSizeChange(val) {
                 this.size = val;
+                localStorage.projectPageSize = this.size;
                 this.getList();
             },
 
@@ -1965,7 +1967,9 @@ a {
                         }
                         this.list = list;
                         this.total = res.data.total;
-                        console.log("列表",res.data);
+                        this.$nextTick(()=>{
+                            this.$refs.projectlistOfWudulist.doLayout();
+                        })
                     } else {
                         this.$message({
                         message: res.msg,