Procházet zdrojové kódy

2022.7.5 待办任务筛选,自定义列表相关项目数量

ggooalice před 2 roky
rodič
revize
7e3d15c987

+ 4 - 1
fhKeeper/formulahousekeeper/timesheet/src/views/centerManage/centerManage.vue

@@ -21,7 +21,10 @@
                     {{scope.$index + 1}}
                 </template>
             </el-table-column>
-            <el-table-column prop="name" label="名称" min-width="120" show-overflow-tooltip></el-table-column>
+            <el-table-column prop="name" label="名称" width="160" show-overflow-tooltip></el-table-column>
+            <el-table-column prop="projectNum" label="相关项目数量" width="160">
+                <template slot-scope="scope">{{scope.row.projectNum + '个'}}</template>
+            </el-table-column>
             <el-table-column prop="projects" label="相关项目" min-width="180" show-overflow-tooltip></el-table-column>
             <el-table-column label="操作" width="170">
                 <template slot-scope="scope" >

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

@@ -262,7 +262,7 @@
                     <el-input v-model="addForm.name" :disabled="!permissions.projectManagement && addForm.creatorId != user.id" placeholder="请输入项目名称" clearable></el-input>
                 </el-form-item>
                 <el-form-item label="项目描述" prop="projectDesc">
-                    <el-input v-model="addForm.projectDesc" :disabled="!permissions.projectManagement && addForm.creatorId != user.id" placeholder="请输入项目描述" clearable maxlength="50" show-word-limit></el-input>
+                    <el-input v-model="addForm.projectDesc" :disabled="!permissions.projectManagement && addForm.creatorId != user.id" placeholder="请输入项目描述" clearable maxlength="200" show-word-limit></el-input>
                 </el-form-item>
                 <el-form-item label="项目类型" prop="isPublic">
                     <el-select v-model="addForm.isPublic" style="width:32%;" @change="selectPublic" :disabled="!permissions.projectManagement && addForm.creatorId != user.id">

+ 23 - 2
fhKeeper/formulahousekeeper/timesheet/src/views/task/list.vue

@@ -21,11 +21,29 @@
                 <!-- <el-form-item style="float:right;">
                     <el-link type="primary" :underline="false" @click="handleAdd(-1,null)">新增任务</el-link>
                 </el-form-item> -->
+
+                <div style="margin-left: 40px;display: inline-block">
+                <el-form-item label="类型">
+                </el-form-item>
+                </div>
+                <el-form-item >
+                    <div style="margin-left: 8px">
+                    <!-- <el-input style="float:left;" v-model="keyword" class="input-with-select" placeholder="请输入项目名称关键字" clearable="true"> -->
+                        <el-select v-model="typeField" style="width:120px;"  slot="prepend" placeholder="请选择">
+                            <el-option label="任务" value="0" @click.native="hiddens()"></el-option>
+                            <el-option label="里程碑" value="1" @click.native="hiddens()"></el-option>
+                            <el-option label="风险" value="2" @click.native="hiddens()"></el-option>
+                        </el-select>
+                        <!-- <el-button slot="append" @click="searchList" icon="el-icon-search"></el-button> -->
+                    <!-- </el-input> -->
+                    </div>
+                </el-form-item>
             </el-form>
         </el-col>
         <div style="display: flex;width: 100%;">
             <div class="classification">
                 <div>
+                    <p :class="idx == 0 ? 'on' : ''" @click="switchs(0)" v-if="permissions.projectView || permissions.projectManagement">全部任务</p>
                     <p :class="idx == 1 ? 'on' : ''" @click="switchs(1)">我执行的</p>
                     <p :class="idx == 2 ? 'on' : ''" @click="switchs(2)">我创建的</p>
                 </div>
@@ -163,7 +181,7 @@
 
 
         <!-- 新增子项目弹出框 -->
-        <el-dialog title="新增/修改子项目" v-if="addSubProject" :visible.sync="addSubProject" :close-on-click-modal="false" customClass="customWidth" width="500px">
+        <!-- <el-dialog title="新增/修改子项目" v-if="addSubProject" :visible.sync="addSubProject" :close-on-click-modal="false" customClass="customWidth" width="500px">
             <el-form ref="form2" :model="addForm" :rules="rules" label-width="100px">
                 <el-form-item label="项目名称" prop="name">
                     <el-input v-model="addForm.name" placeholder="请输入项目名称" clearable></el-input>
@@ -173,7 +191,7 @@
                 <el-button @click.native="addSubProject = false">取消</el-button>
                 <el-button type="primary" @click="submitInsertSubProject" :loading="addLoading">提交456</el-button>
             </div>
-        </el-dialog>
+        </el-dialog> -->
 
         <!-- 任务详情信息弹出框 -->
         <el-dialog :class="addForm.id==null?'':'jm'" :title="title" v-if="addFormVisible" :visible.sync="addFormVisible" 
@@ -633,9 +651,11 @@ import { error } from 'dingtalk-jsapi';
         },
         data() {
             return {
+                typeField: '0',
                 searchField: '0',
                 keyword:null,
                 user: JSON.parse(sessionStorage.getItem("user")),
+                permissions: JSON.parse(sessionStorage.getItem("permissions")),
                 userDetailVisible: false,
                 userDetail:{},
                 date: new Date(),
@@ -926,6 +946,7 @@ import { error } from 'dingtalk-jsapi';
                     viewId: this.idx,
                     pageIndex: this.page,
                     pageSize: this.size,
+                    type: this.typeField
                 },
                 res => {
                     this.listLoading = false;

+ 9 - 29
fhKeeper/formulahousekeeper/timesheet/src/views/workReport/daily.vue

@@ -1536,7 +1536,6 @@
             },
 
             filterNode(value, data) {
-                // console.log(value, data, '搜索')
                 if (!value) return true;
                 return data.label.indexOf(value) !== -1;
             },
@@ -1589,7 +1588,6 @@
             addUpload(data) {
                 // var zhi = data.fileName.split('.')[0]
                 // var sss = zhi + '.xlsx'
-                // console.log(sss, data)
                 // return
                 var filePath = '/upload/' + data.serverName;
                 const a = document.createElement('a'); // 创建a标签
@@ -1815,7 +1813,6 @@
                 },
                 res => {
                     if (res.code == "ok") {
-                        // console.log("维度",res.data);
                         this.yonghuUser = res.data
                     } 
                 },
@@ -1953,7 +1950,6 @@
                     }
                     
                 }
-                // console.log('domain',quanbu);
             },
             iptChang() {
                 var sl = this.workForm.domains
@@ -2062,7 +2058,6 @@
     },
 
     handleClick(t,e){
-    //   console.log("tabname",t.name);
       if (t.name == "first") {
         this.showMonthWorkTime()
       }else{
@@ -2071,7 +2066,6 @@
     },
     //导出员工每日填报工时数
     exportMembWorkHours() {   
-    //   console.log("exportMembWorkHours",this.WorktimeDatepickValue);
       this.http.post(
         "/report/exportUserDailyWorkTime",
         {
@@ -2082,7 +2076,6 @@
         (res) => {
           if (res.code == "ok") {
             let url = res.data;
-            // console.log(res);
             this.downloadByA("人员每日工时统计.xls", url);
           }
         },
@@ -2106,9 +2099,7 @@
         (res) => {
           if (res.code == "ok") {
             let url = res.data;
-            // console.log(res.data);
             this.downloadByA("人员每日工时统计.xls", url);
-            // console.log(url);
           }
         },
         (error) => {
@@ -2121,7 +2112,6 @@
     },
 
     downloadByA(name, url) {
-    //   console.log(name,url);
       const a = document.createElement("a"); // 创建a标签
       a.setAttribute("download", name); // download属性
       a.setAttribute("href", url); // href链接
@@ -2612,7 +2602,7 @@
                 if(!domain.projectId){
                     return;
                 }
-                console.log('projectId===',domain.projectId);
+                // console.log('projectId===',domain.projectId);
                 domain.projectName = this.fillProjectList.filter(p=>p.id == domain.projectId)[0].projectName;
                 this.http.post('/sub-project/list',{
                     projectId: domain.projectId
@@ -2750,7 +2740,7 @@
             },
 
             getGroupStages(domain, index) {
-                console.log(domain);
+                // console.log(domain);
                 if(!domain.groupId){
                     domain.projectAuditorId = ''
                     domain.stages = []
@@ -3068,9 +3058,6 @@
                     this.unFillList = this.getUserMembListFromDeptList(list, 0);
                     this.fillList = this.getUserMembListFromDeptList(list, 1)
                 } 
-                // console.log(this.depData.isUser)
-                // console.log(this.depData.membCount)
-                // console.log(this.depData)
             },
             theValues(id, item) {
                 for(var i in item) {
@@ -3139,7 +3126,7 @@
                         //设置员工到部门下面
                         this.setUserToDept(list);
                         this.data = list;
-                        console.log('data',this.data);
+                        // console.log('data',this.data);
                         this.expandDate = [this.data[1].id]
                         this.allData = list;
                         
@@ -3451,8 +3438,9 @@
                     this.listLoading = false;
                     if (res.code == "ok") {
                         this.reportList = res.data;
-                        document.querySelector("#day"+this.choseDay).scrollIntoView(true);
-                        // this.dealWith()
+                        if(document.querySelector("#day"+this.choseDay)){
+                            document.querySelector("#day"+this.choseDay).scrollIntoView(true);
+                        }
                     } else {
                         this.$message({
                             message: res.msg,
@@ -3483,20 +3471,15 @@
             //     }
             // },
             // getDealWith(item, tx, wtx, arr) {
-            //     // console.log(item,12345)
             //     for(var i in item) {
             //         if(item[i].children) {
             //             this.getDealWith(item[i].children, tx, wtx, arr)
             //         } else {
-            //             console.log(arr.indexOf(item[i].id))
-            //             console.log(arr)
-            //             console.log(item[i].id)
             //             if(arr.indexOf(item[i].id) != '-1') {
             //                 tx = +tx + 1
             //             }
             //         }
             //     }
-            //     console.log(tx, '看看值')
             // },
             //导出员工工时统计
             exportUserTime() {
@@ -3936,7 +3919,7 @@
                 }
                 
                 this.zhoRqi = [stat, end]
-                console.log('date',currentDate,this.zhoRqi);
+                // console.log('date',currentDate,this.zhoRqi);
                 this.zhoRqis()
                 // this.jiazai()
             },
@@ -4028,8 +4011,7 @@
                 }
                 this.zhoRqi[1] = this.dateChange(1, this.zhoRqi[1])
                 
-                // console.log(this.zhoRqi[1]);
-                // console.log(this.zhoRqi[1])
+
                 var obj = {}
                 obj.zhoDataTime = this.zhoRqi[1]
                 obj.he = 0
@@ -4251,8 +4233,6 @@
             zhoAdd() {
                 var zhi = this.zhoData
                 var ll = 0
-                // console.log(this.reportTimeType.type)
-                // console.log(this.reportTimeType.multiWorktime)
                 if(this.reportTimeType.type == 2) {
                     for(var i in zhi) {
                         this.dateAr = []
@@ -4962,7 +4942,7 @@
                                         type: "error"
                                     });
                                 } else if (this.workForm.domains[i].taskGroups.length > 0 && !this.workForm.domains[i].groupId) {
-                                    console.log(this.workForm.domains[i]);
+                                    // console.log(this.workForm.domains[i]);
                                     this.$message({
                                         message: "请选择["+this.workForm.domains[i].projectName+"]项目的任务分组",
                                         type: "error"