Bladeren bron

Merge branch 'master' of http://47.100.37.243:10080/wutt/manHourHousekeeper into master

seyason 3 jaren geleden
bovenliggende
commit
603406bea3

+ 10 - 11
fhKeeper/formulahousekeeper/timesheet/config/index.js

@@ -2,18 +2,17 @@ var path = require('path')
 
 //  var ip = '127.0.0.1'
 // var ip = '192.168.2.20'
-var ip = '192.168.2.6'
-// var ip = '47.100.37.243' 
+// var ip = '192.168.2.12'// var ip = '47.100.37.243' 
 
-// var os = require('os'), ip = '', ifaces = os.networkInterfaces() // 获取本机ip
-// for (var i in ifaces) {
-//     for (var j in ifaces[i]) {
-//         var val = ifaces[i][j]
-//         if (val.family === 'IPv4' && val.address !== '127.0.0.1') {
-//             ip = val.address
-//         }
-//     }
-// }
+var os = require('os'), ip = '', ifaces = os.networkInterfaces() // 获取本机ip
+for (var i in ifaces) {
+    for (var j in ifaces[i]) {
+        var val = ifaces[i][j]
+        if (val.family === 'IPv4' && val.address !== '127.0.0.1') {
+            ip = val.address
+        }
+    }
+}
 
 module.exports = {
   build: {

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

@@ -7,8 +7,9 @@
                     
                 </el-form-item>
                 <el-form-item >
-                    <div>
-                    <el-input style="float:left;" v-model="keyword" class="input-with-select" placeholder="请输入项目名称关键字" clearable="true">
+                    <!-- <div style="display: flex;align-items: center;height: 40px;"> -->
+                    <div style="display: flex;align-items: center;height: 40px;">
+                    <el-input v-model="keyword" class="input-with-select" placeholder="请输入项目名称关键字" clearable="true" size="small">
                         <el-select v-model="searchField" style="width:120px;"  slot="prepend" placeholder="请选择">
                             <el-option label="项目名称" value=1 ></el-option>
                             <el-option label="项目编号" value=2></el-option>
@@ -20,7 +21,7 @@
 
                 <el-form-item >
                     <span style="margin-left:5px;margin-right:5px;color:#606266;">状态</span>
-                    <el-select v-model="status" style="width:110px;"  placeholder="请选择" @change="searchList">
+                    <el-select v-model="status" style="width:110px;"  placeholder="请选择" @change="searchList" size="small">
                         <el-option label="全部" value=0 ></el-option>
                         <el-option label="进行中" value=1 ></el-option>
                         <el-option label="已完成" value=2 ></el-option>
@@ -30,7 +31,7 @@
                 <!-- 分类筛选 -->
                 <el-form-item >
                     <span style="margin-left:5px;margin-right:5px;color:#606266;">分类</span>
-                    <el-select v-model="statusClf" style="width:110px;"  placeholder="请选择" clearable @change="searchClfList">
+                    <el-select v-model="statusClf" style="width:110px;"  placeholder="请选择" clearable @change="searchClfList" size="small">
                         <el-option v-for="item in baseClfList" :key="item.id" :label="item.name" :value="item.id" ></el-option>
                     </el-select>
                 </el-form-item>

+ 51 - 16
fhKeeper/formulahousekeeper/timesheet/src/views/project/projectInside.vue

@@ -27,30 +27,33 @@
                 <el-container style="padding: 0px;">
                     <el-aside :style="'overflow:auto;padding-left:10px;padding-right:5px;height:'+tableHeight+'px;width:'+groupWidth+'px;'">
                         <el-input v-model="groupSearch" size="small" placeholder="搜索分组" @input="startSearchGroup" style="margin-top:10px"/>
-                        <p ><span class="heavyTxt">任务分组</span> <i class="el-icon-plus pull-right" style="color:#666;margin-right:10px;" @click="createGroup"></i></p>
+                        <p ><span class="heavyTxt">任务分组</span> <i class="el-icon-plus pull-right" style="color:#666;margin-right:10px;" @click="createGroup" v-if="projectCreatorId == user.id || projectInchargerId == user.id"></i></p>
                         <el-menu :default-active="defaultGroupId" ref="defaultMenu"  class="el-menu-vertical-demo" @select="groupChange" style="border-right:none;">
                             <el-menu-item :index="item.id" v-for="item in groupList" :key="item.id"  class="group_style">
                                 <div slot="title">
                                 <span >{{item.name}}</span>
-                                <el-dropdown trigger="click" style="float:right;margin-right:-10px;">
+                                <!-- <el-button size="mini" @click="test(item)">test</el-button> -->
+                                <el-dropdown trigger="click" style="float:right;margin-right:-10px;" :disabled="user.id != item.inchargerId && user.id != projectCreatorId && user.id != projectInchargerId">
                                     <i class="iconfont firerock-iconcaidan" ></i>
                                     <el-dropdown-menu slot="dropdown">
-                                        <el-dropdown-item @click.native="copyGroup(item)">
+                                        <el-dropdown-item @click.native="copyGroup(item)" v-if="projectCreatorId == user.id || projectInchargerId == user.id">
                                             <i class="el-icon-document-copy"></i>
                                             复制分组</el-dropdown-item>
-                                        <el-dropdown-item divided @click.native="renameGroup(item)">
+                                        <el-dropdown-item divided @click.native="renameGroup(item)" v-if="projectCreatorId == user.id || projectInchargerId == user.id">
                                             <i class="el-icon-edit"></i>
                                             修改组名</el-dropdown-item>
-                                        <el-dropdown-item divided @click.native="addToTemplate(item)">
+                                        <el-dropdown-item divided @click.native="addToTemplate(item)" v-if="projectCreatorId == user.id || projectInchargerId == user.id">
                                             <i class="el-icon-plus"></i>
                                             设为模板</el-dropdown-item>
-                                        <el-dropdown-item divided @click.native="editIncharger(item)">
+                                        <el-dropdown-item divided @click.native="editIncharger(item)" 
+                                        v-if="projectCreatorId == user.id || projectInchargerId == user.id">
                                             <i class="el-icon-user"></i>
                                             设负责人</el-dropdown-item>
-                                        <el-dropdown-item divided @click.native="setupParticipants(item)">
+                                        <el-dropdown-item divided @click.native="setupParticipants(item)" 
+                                        v-if="projectCreatorId == user.id || projectInchargerId == user.id || item.inchargerId == user.id">
                                             <i class="iconfont firerock-iconusers"></i>
                                             设参与人</el-dropdown-item>
-                                        <el-dropdown-item divided @click.native="deleteGroup(item)">
+                                        <el-dropdown-item divided @click.native="deleteGroup(item)" v-if="projectCreatorId == user.id || projectInchargerId == user.id">
                                             <i class="el-icon-delete"></i>
                                             删除分组</el-dropdown-item>
                                             <!-- 设置参与人 0000 -->
@@ -458,7 +461,7 @@
                     highlight-current-row
                     v-loading="listLoading"
                     style="width: 100%;margin-top:10px;"
-                    @row-click="relationTaskClick">
+                    @row-click.stop.native="relationTaskClick">
                         <el-table-column prop="taskStatus" label="完成" width="50" >
                             <template slot-scope="scope">
                                 <el-checkbox :disabled="scope.row.taskStatus==2" :checked="scope.row.taskStatus==1?true:false" size="large" class="cb" @change="relationFinishTask(scope.row)" @click.stop.native=""></el-checkbox>
@@ -466,14 +469,14 @@
                         </el-table-column>
                         <el-table-column prop="taskName" label="标题" >
                             <template slot-scope="scope">
-                                <el-tooltip class="item" effect="dark" :content="scope.row.taskName" placement="top">
+                                <el-tooltip class="item" effect="dark" :content="scope.row.taskName" placement="top" style="cursor:pointer;color:#409eff;">
                                     <span style="overflow: hidden;text-overflow:ellipsis;white-space: nowrap;" > {{scope.row.taskName}}</span>
                                 </el-tooltip>
                             </template>
                         </el-table-column>
                         <el-table-column label="操作" width="130" align="left">
                             <template slot-scope="scope">
-                                <el-button @click="deleteRelationItem(scope.row.id)" size="mini">解除关联</el-button>
+                                <el-button @click.stop.native="deleteRelationItem(scope.row.id)" size="mini">解除关联</el-button>
                             </template>
                         </el-table-column>
                     </el-table>
@@ -568,7 +571,7 @@
             <el-dialog v-if="isRelationTab" :visible.sync="isRelationTab" title="添加关联任务" width="800px" append-to-body>
                 <el-form ref="relationItemForm" label-width="100px">
                     <el-form-item label="选择任务" prop="taskType">
-                        <el-select v-model="relationvalue" multiple>
+                        <el-select v-model="relationvalue" multiple style="width:80%">
                             <el-option
                             v-for="item in relationdata"
                             :key="item.id"
@@ -1030,7 +1033,10 @@ import delete$ from 'dingtalk-jsapi/api/biz/cspace/delete';
                 },
                 chosenMembCount: 0,
                 ididid:null,
-                alreadyPartArray: []
+                alreadyPartArray: [],
+
+                projectCreatorId: null,
+                projectInchargerId: null
             };
             
         },
@@ -1040,6 +1046,12 @@ import delete$ from 'dingtalk-jsapi/api/biz/cspace/delete';
             }
         },
         methods: {
+
+            test(item){
+                // let pro = this.$route
+                console.log('test',this.projectList);
+                
+            },
             setParticipants(){
                 let chosenList = this.$refs.chooseMembTree2.getCheckedNodes();
                 let chose2 = chosenList.filter(item=>item.isUser == 1)
@@ -1051,12 +1063,22 @@ import delete$ from 'dingtalk-jsapi/api/biz/cspace/delete';
                     idsJson: JSON.stringify(chose3)
                 },res => {
                     if(res.code == 'ok'){
-
+                        this.participantsDialog = false
+                        this.$message({
+                            message: '设置成功',
+                            type: 'success'
+                        })
                     }else {
-
+                        this.$message({
+                            message: res.msg,
+                            type: 'error'
+                        })
                     }
                 },error => {
-
+                    this.$message({
+                        message: error,
+                        type: 'error'
+                    })
                 })
             },
             // 设置项目参与人
@@ -1301,6 +1323,7 @@ import delete$ from 'dingtalk-jsapi/api/biz/cspace/delete';
                 }
             },
             addRelation(){  //关联任务卡片
+                this.relationvalue = []
                 this.isRelationTab = true
                 this.getrelation()
                 
@@ -1317,6 +1340,7 @@ import delete$ from 'dingtalk-jsapi/api/biz/cspace/delete';
                             message: '添加成功',
                             type: 'success'
                         })
+                        this.getRelationTaskList()
                         this.$forceUpdate()
                     }else {
                         this.$message({
@@ -2475,6 +2499,7 @@ import delete$ from 'dingtalk-jsapi/api/biz/cspace/delete';
                     if (res.code == "ok") {
                         this.allGroupData = res.data;
                         this.groupList = res.data;
+                        console.log(this.groupList,'grouplist');
                         if (this.groupList.length > 0) {
                             this.defaultGroupId = this.groupList[0].id;
                             this.selectedGroup = this.groupList[0];
@@ -2550,6 +2575,8 @@ import delete$ from 'dingtalk-jsapi/api/biz/cspace/delete';
                 res => {
                     if (res.code == "ok") {
                         this.projectList = res.data;
+                        console.log('getprojectlist',res.data);
+
                     } else {
                         this.$message({
                         message: res.msg,
@@ -2806,6 +2833,7 @@ import delete$ from 'dingtalk-jsapi/api/biz/cspace/delete';
                 res => {
                     if (res.code == "ok") {
                         this.currentProject = res.data;
+                        this.getjurisdictionIds(this.currentProject)
                         this.joinMembList = this.currentProject.participationList;
                     } else {
                     }
@@ -2818,6 +2846,10 @@ import delete$ from 'dingtalk-jsapi/api/biz/cspace/delete';
                     }
                 );
             },
+            getjurisdictionIds(pro){
+                this.projectCreatorId = pro.creatorId
+                this.projectInchargerId = pro.inchargerId
+            }
         },
         created() {
             let height = window.innerHeight;
@@ -2835,10 +2867,13 @@ import delete$ from 'dingtalk-jsapi/api/biz/cspace/delete';
             this.curProjectId = parseInt(this.$route.params.id);
             this.activeName = this.$route.path.split("/")[1];
             this.getDetail();
+
             this.getUsers();
             this.getMyProjectList();
+            
             this.getInsideData();
             this.getGroupTemplate();
+            
         }
     };
 </script>

+ 8 - 0
fhKeeper/formulahousekeeper/timesheet/src/views/project/project_gantt.vue

@@ -204,6 +204,14 @@ export default {
                               //     list[index].time123 = list[index].duration
                               //   }
                               //   console.log("list",list);
+                                for(var i in res.data) {
+                                  if(res.data[i].id.indexOf('出差') != '-1') {
+                                    res.data[i].color = '#E6A23C'
+                                  }
+                                  if(res.data[i].id.indexOf('请假') != '-1') {
+                                    res.data[i].color = '#F56C6C'
+                                  }
+                                }
                                 this.tasks = {data:res.data};
                                 this.isDataLoaded = true;
                                 // console.log("getlist",this.tasks);

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

@@ -29,7 +29,7 @@
         <el-table-column prop="date" label="操作">
             <template slot-scope="scope">
                 <div>
-                    <el-button size="small" @click="handleAdd('编辑角色', '立即修改', scope.row)" v-if="scope.row.rolename != '超级管理员'">编辑角色</el-button>
+                    <el-button size="small" @click="handleAdd('编辑角色', '立即修改', scope.row)" :style="scope.row.rolename != '超级管理员' ? '' : 'visibility:hidden;'">编辑角色</el-button>
                     <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>
                 </div>
@@ -286,6 +286,10 @@ export default {
         return data.label.indexOf(value) !== -1;
       },
         handleAdd(tex, tel, id) {
+          if(id.rolename == '超级管理员'){
+            this.$message('超级管理员为固定的默认角色无法编辑');
+            return
+          }
           this.titles = tex
           this.addTil = tel
           this.addDialogVisible = true

+ 3 - 1
fhKeeper/formulahousekeeper/timesheet_h5/src/views/login/index.vue

@@ -10,7 +10,7 @@
             <div class="form_btn" style="margin: 16px;">
                 <van-button round block type="info" native-type="submit"> 登录 </van-button>
             </div>
-            <div class="form_jump" v-on:click="jumpTo" v-if="!isCorpWX">企业注册</div>
+            <div class="form_jump" v-on:click="jumpTo" v-if="!isCorpWX && !isDingding">企业注册</div>
         </van-form>
     </header>
 </template>
@@ -21,6 +21,7 @@
     export default {
         data() {
             return {
+                isDingding: false,
                 isCorpWX:false,
                 isWX:false,
                 defaultHeight: '0',  //默认屏幕高度
@@ -225,6 +226,7 @@
                     var that = this;
                     if (url.indexOf(key) > 0) {
                         var corpId = url.substring(url.indexOf(key)+key.length,url.indexOf('#'));
+                        this.isDingding = true
                         dd.ready(function() {
                             dd.runtime.permission.requestAuthCode({
                                 corpId: corpId, // 企业id

+ 1 - 1
fhKeeper/formulahousekeeper/timesheet_h5/vue.config.js

@@ -4,7 +4,7 @@ const path = require('path');
 const themePath = path.resolve(__dirname,'src/assets/style/theme.less');
 
 // var ip = '127.0.0.1'
-// var ip = '192.168.2.27'
+// var ip = '192.168.2.18'
 // var ip = '47.100.37.243'
 var os = require('os'), ip = '', ifaces = os.networkInterfaces() // 获取本机ip
 for (var i in ifaces) {