浏览代码

2022.7.1 暂停项目

ggooalice 2 年之前
父节点
当前提交
1e1bf17032

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

@@ -26,6 +26,7 @@
                         <el-option label="进行中" value=1 ></el-option>
                         <el-option label="已完成" value=2 ></el-option>
                         <el-option label="已撤销" value=3 ></el-option>
+                        <el-option label="已暂停" value=4 ></el-option>
                     </el-select>
                 </el-form-item>
                 <!-- 主项目筛选 -->
@@ -207,7 +208,8 @@
                     <el-dropdown class="customdropdown" split-button size="mini" @click="finishPro(scope.row)" v-if="(permissions.projectManagement || user.id==scope.row.creatorId || user.id==scope.row.inchargerId) && scope.row.status == 1" placement="bottom-start">
                         完成
                         <el-dropdown-menu slot="dropdown" class="customdropdown_menu">
-                            <el-button size="mini"  @click="cancelPro(scope.row)" class="customdropdown_menu_btn">撤销</el-button>
+                            <el-button size="mini"  @click="cancelPro(scope.row)" class="customdropdown_menu_btn">撤销</el-button><br>
+                            <el-button size="mini"  @click="suspendPro(scope.row)" class="customdropdown_menu_btn">暂停</el-button>
                         </el-dropdown-menu>
                     </el-dropdown>
                     <el-button v-if="(permissions.projectManagement || user.id==scope.row.inchargerId || user.id==scope.row.creatorId) && scope.row.status >= 2" size="mini"  @click="restartPro(scope.row)">重启</el-button>
@@ -809,7 +811,7 @@ a {
                 customerList:[],
                 roleArray:["普通员工","超级管理员", "系统管理员", "公司高层","财务管理员", "项目管理员"],
                 status:"1",
-                statusTxt:["-","进行中","已完成","已撤销"],
+                statusTxt:["-","进行中","已完成","已撤销","已暂停"],
                 importanceList:[{id:1,label:'正常'},{id:2,label:'紧急'},{id:3,label:'重要'},{id:4,label:'重要且紧急'}],
                 searchField:'1',
                 keyword:null,
@@ -1266,6 +1268,30 @@ a {
                         });
                     });
             },
+            // 暂停项目
+            suspendPro(row) {
+                this.http.post('/project/suspend',{id: row.id},
+                    res => {
+                        if (res.code == "ok") {
+                            this.$message({
+                                message: '暂停成功',
+                                type: "success"
+                            });
+                            row.status = 4;
+                        } else {
+                            this.$message({
+                                message: res.msg,
+                                type: "error"
+                            });
+                        }
+                    },
+                    error => {
+                        this.$message({
+                            message: error,
+                            type: "error"
+                        });
+                    });
+            },
             //完成项目
             finishPro(row) {
                 this.http.post('/project/finish',{id: row.id},

+ 8 - 5
fhKeeper/formulahousekeeper/timesheet/src/views/quanx/quanx.vue

@@ -15,6 +15,7 @@
               <el-form-item style="float: right">
                   <el-link type="primary" :underline="false" @click="handleAdd('添加角色', '立即添加')">添加角色</el-link>
                   <el-link type="primary" :underline="false" @click="modify()" style="margin-left: 20px;">修改默认角色</el-link>
+                  <el-link type="primary" :underline="false" @click="exportAuthority()" style="margin-left:20px">导出权限</el-link>
               </el-form-item>
           </el-form>
       </el-col>
@@ -33,7 +34,7 @@
                     <el-button type="primary" size="small" @click="shisha(scope.row.id), roleName = scope.row.rolename" v-if="scope.row.rolename !='超级管理员' || (scope.row.rolename =='超级管理员' && user.roleName == '超级管理员')">分配权限</el-button>
                     
                     <el-button type="danger" size="small" @click="deteHand(scope.row)" v-if="scope.row.rolename != '超级管理员'">删除</el-button>
-                    <el-button size="small" @click="exportAuthority(scope.row)" v-if="scope.row.rolename != '超级管理员'" style="margin-left:30px">导出权限</el-button>
+                    
                 </div>
             </template>
         </el-table-column>
@@ -153,6 +154,7 @@ export default {
         auseList: [],
         defaultRole: false,
         roleId: '',
+        cgRoleParamer: null,
         roleName: '',
         rules: {
           rolename: [{
@@ -267,6 +269,8 @@ export default {
               console.log(res.data, '数据来源')
               this.tableData = res.data
               this.auseList = res.data
+              let item = this.tableData.filter(item => item.rolename == '超级管理员')
+              this.cgRoleParamer = item[0].id
             } else {
                 this.$message({
                     message: res.msg,
@@ -460,10 +464,9 @@ export default {
               });
           });
       },
-      exportAuthority(row){ // 导出权限
-      console.log(row);
-        this.http.post('permission/exportData',{
-          role: row.id,
+      exportAuthority(){ // 导出权限
+        this.http.post('/permission/exportData',{
+          role: this.cgRoleParamer,
           companyId: this.user.companyId
         },res => {
           if(res.code == 'ok'){

+ 1 - 2
fhKeeper/formulahousekeeper/timesheet/src/views/workReport/daily.vue

@@ -326,7 +326,7 @@
                         @change="selectProject(domain, index)"
                         :disabled="workForm.domains.length==0?true:(workForm.domains[index].state>=2?false:true)">
                             <!-- <el-option v-for="item in projectList" :disabled="item.status>=2" :key="item.id" :label="item.projectName" :value="item.id"></el-option> -->
-                            <el-option v-for="item in fillProjectList" :disabled="item.status>=2" :key="item.id" :label="item.projectName + '\u3000' + item.projectCode" :value="item.id">
+                            <el-option v-for="item in fillProjectList" :disabled="item.status!=1 && item.status!=4" :key="item.id" :label="item.projectName + '\u3000' + item.projectCode" :value="item.id">
                                 <span style="float: left; color: #8492a6; font-size: 13px;">{{ item.projectCode }}</span>
                                 <span style="float: right;margin-left: 20px">{{ item.projectName }}</span>
                             </el-option>
@@ -3601,7 +3601,6 @@
                             }
                         }
                         this.fillProjectList = res.data;
-
                     } else {
                         this.$message({
                             message: res.msg,