Ver Fonte

Merge branch 'master' of http://47.100.37.243:10080/wutt/lsappBms

wutt há 5 anos atrás
pai
commit
fcf130f37f

+ 0 - 2
lss_vue/index.html

@@ -6,8 +6,6 @@
         <title>数据中心</title>
         <link rel="shortcut icon" type="image/x-icon" href="./cloud.ico" />
         <link rel="stylesheet" type="text/css" href="./static/custom-picker.css" /> 
-        <!-- 引入mui -->
-        <!-- <script src="/static/mui.min.js"></script> -->
         <style>
             .toolbar {
                 background: #fff!important;

+ 7 - 1
lss_vue/src/port.js

@@ -26,6 +26,8 @@ export default {
         addNo: '/goods/goodsNoAdd',                              // 资产编号添加
         delNo: '/goods/delNo',                                  // 删除资产编号
         distribute: '/goods/distribute',                        // 修改资产编号
+        unit: '/unit/list',                                     // 单位列表 
+        project: '/project/list',                               // 项目列表
 
         handle: '/goods/handle',                                // 处置资产
 
@@ -50,12 +52,16 @@ export default {
         ideaAoU: '/idea/addOrUpdate',                           // 建议新增修改
         draft: '/idea/getDraft',                                // 获取草稿
 
+        ideaListByUid: '/idea/getDeptIdeaLists',                // TA的建议
+
         addressList: '/user/list',                              // 通讯录
-        scoreDetailByUid: '/score/getDetailByTimeAndUid',            // 个人分数详情
+        scoreDetailByUid: '/score/getDetailByTimeAndUid',       // 个人分数详情
         ideaScore: '/idea/ideaListByTime',                      // TA的建议
         addOrUpdate: '/score/addOrUpdate',                      // 分数新增修改
         leaderScore: '/ideacomment/addOrUpdate',                // 添加/修改回复建议
         delScore: '/ideacomment/del',                           // 删除回复建议
+        fiveList: '/personscore/fiveList',                      // 五项打分
+        fiveAddOrUpdate: '/personscore/addOrUpdate',               // 打个人分
 
         insList: '/institution/list',                           // 管理制度列表
         insDetail: '/institution/detail',                       // 管理制度详情

+ 0 - 1
lss_vue/src/views/404.vue

@@ -5,7 +5,6 @@
         </div>
         <p class="page-container"><b>Error</b>  页面加载失败!!!</p>
         <div class="page-button">
-            <!-- <el-button type="primary" @click="back" icon="el-icon-s-promotion" style="color:#93ADFA">点击重新加载</el-button> -->
             <a @click="back" style="color:#93ADFA">点击重新加载</a>
         </div>
     </div>

+ 4 - 0
lss_vue/src/views/assets/assetsDetail.vue

@@ -127,6 +127,7 @@
                     </div>
                 </div>
                 <div class="detailBox">
+                    <mt-cell title="产品序列" :value="detail.goodsSequence"></mt-cell>
                     <mt-cell title="资产分类" :value="detail.tagName"></mt-cell>
                     <mt-cell title="数量" :value="detail.goodsNosVO!=null?detail.goodsNosVO.length:0"></mt-cell>
                     <mt-cell title="单位" :value="detail.unit"></mt-cell>
@@ -138,6 +139,9 @@
                     <mt-cell title="采购日期" :value="detail.purchaseDate"></mt-cell>
                 </div>
                 <div class="detailBox">
+                    <mt-cell title="设备厂家" :value="detail.deviceFactory"></mt-cell>
+                    <mt-cell title="设备联系人" :value="detail.deviceContact"></mt-cell>
+                    <mt-cell title="联系人电话" :value="detail.deviceContactPhone"></mt-cell>
                     <mt-cell title="供应商" :value="detail.factory"></mt-cell>
                     <mt-cell title="采购价格" :value="detail.price"></mt-cell>
                     <mt-cell title="质保期限" :value="detail.warrantyPeriod==null?'': detail.warrantyPeriod + '年'"></mt-cell>

+ 125 - 2
lss_vue/src/views/assets/assetsEdit.vue

@@ -12,7 +12,7 @@
                     <ul class="address_first">
                         <li v-for="(item,index) in labels" :id="'btn'+item.id" v-bind:class="{'active':item.id==tagId}" v-on:click="chooseTag(item.id)">
                             {{item.name}}
-                            <img v-if="index > 7" v-on:click="delTag(item.id)" src="../../assets/image/del.png">
+                            <img v-if="index > 3" v-on:click="delTag(item.id)" src="../../assets/image/del.png">
                         </li>
                         <li v-on:click="addNewTag()" class="add">+</li>
                     </ul>
@@ -21,6 +21,7 @@
             <div class="detailBox">
                 <mt-field label="物品名称" placeholder="请输入物品名称" v-model="assetsForm.name"></mt-field>
                 <mt-field label="型号" placeholder="请输入物品型号" v-model="assetsForm.modelNumber"></mt-field>
+                <mt-field label="产品序列" placeholder="请输入产品序列" v-model="assetsForm.goodsSequence"></mt-field>
                 <mt-field label="数量" placeholder="请输入数量" type="number" v-model="assetsForm.number"></mt-field>
                 <mt-field label="单位" placeholder="请输入单位" v-model="assetsForm.unit"></mt-field>
                 <div class="upload">
@@ -44,6 +45,9 @@
                 <mt-field label="采购日期" placeholder="请选择采购日期" type="date" v-model="assetsForm.purchaseDate"></mt-field>
             </div>
             <div class="detailBox">
+                <mt-field label="设备厂家" placeholder="请输入设备厂家" v-model="assetsForm.deviceFactory"></mt-field>
+                <mt-field label="设备联系人" placeholder="请输入设备联系人" v-model="assetsForm.deviceContact"></mt-field>
+                <mt-field label="联系人电话" placeholder="请输入设备联系人电话" v-model="assetsForm.deviceContactPhone"></mt-field>
                 <mt-field label="供应商" placeholder="请输入供应商" v-model="assetsForm.factory"></mt-field>
                 <mt-field label="采购价格" placeholder="请输入采购价格" type="number" v-model="assetsForm.price"></mt-field>
                 <mt-field label="质保期限" placeholder="请输入质保期限(单位:年)" type="number" v-model="assetsForm.warrantyPeriod"></mt-field>
@@ -51,7 +55,7 @@
                 <mt-field label="下次维护日期" placeholder="请选择下次维护日期" type="date" v-model="assetsForm.nextIndate"></mt-field>
             </div>
             <div class="detailBox">
-                <mt-field label="备注" placeholder="请输入备注" type="textarea" rows="5" v-model="assetsForm.content"></mt-field>
+                <mt-field label="备注" placeholder="请输入备注" type="textarea" class="content" rows="5" v-model="assetsForm.content"></mt-field>
             </div>
             <div class="btn">
                 <mt-button class="allBtn" size="large" type="primary" v-on:click.native="submit()">确定</mt-button>
@@ -87,11 +91,21 @@
                     price: '',
                     warrantyPeriod: '',
                     content: '',
+
+                    goodsSequence: '',
+                    deviceFactory: '',
+                    deviceContact: '',
+                    deviceContactPhone: '',
                 },
                 labels: [],
                 tagId: 0,
                 limit: 1,
                 canClick: true,
+                
+                unit: [],
+                project: [],
+                projectNo: [],
+                projectName: [],
 			}
 		},
 		methods: {
@@ -123,6 +137,11 @@
                             price: res.data.price,
                             warrantyPeriod: res.data.warrantyPeriod,
                             content: res.data.content,
+
+                            goodsSequence: res.data.goodsSequence,
+                            deviceFactory: res.data.deviceFactory,
+                            deviceContact: res.data.deviceContact,
+                            deviceContactPhone: res.data.deviceContactPhone,
                         }
                         this.tagId = res.data.tagId
                         this.getLabels();
@@ -161,6 +180,59 @@
                 })
             },
 
+            getUnit() {
+                this.http.post(this.port.assets.unit, {} , 
+                res => {
+                    if (res.code == "ok") {
+                        var list = res.data;
+                        for(var i in list) {
+                            list[i].name = list[i].unit;
+                        }
+                        this.unit = list;
+                    } else {
+                        this.$toast({
+                            message: res.msg,
+                            duration: 2000
+                        });
+                    }
+                }, error => {
+                    this.$toast({
+                        message: error,
+                        duration: 2000
+                    });
+                })
+            },
+
+            getProject() {
+                this.http.post(this.port.assets.project, {} , 
+                res => {
+                    if (res.code == "ok") {
+                        this.project = res.data;
+                        var list = res.data;
+                        for(var i in list) {
+                            this.projectNo.push({
+                                id: list[i].id,
+                                name: list[i].projectNo
+                            });
+                            this.projectName.push({
+                                id: list[i].id,
+                                name: list[i].projectName
+                            })
+                        }
+                    } else {
+                        this.$toast({
+                            message: res.msg,
+                            duration: 2000
+                        });
+                    }
+                }, error => {
+                    this.$toast({
+                        message: error,
+                        duration: 2000
+                    });
+                })
+            },
+
             addNewTag() {
                 MessageBox({
                     $type:'prompt',
@@ -223,6 +295,44 @@
                 this.assetsForm.tagId = id;
             },
 
+            chooseUnit() {
+                var _this = this;
+                var dataShippingSpace = this.unit;
+                var pickerDiv = document.getElementById("unit");
+                var pickerView = new PickerView({
+                    bindElem: pickerDiv, 
+                    data: dataShippingSpace, 
+                    title: "单位", 
+                    leftText: "取消", 
+                    rightText: "确定", 
+                    rightFn: function(selectArr) {
+                        _this.assetsForm.unit = selectArr[0].name;
+                    }
+                });
+            },
+
+            chooseProject(i) {
+                var _this = this;
+                var dataShippingSpace = i==0?this.projectNo:this.projectName;
+                var pickerDiv = i==0?document.getElementById("projectNo"):document.getElementById("projectName");
+                var pickerView = new PickerView({
+                    bindElem: pickerDiv, 
+                    data: dataShippingSpace, 
+                    title: i==0?"项目编号":"项目名称", 
+                    leftText: "取消", 
+                    rightText: "确定", 
+                    rightFn: function(selectArr) {
+                        var list = _this.project;
+                        for(var j in list) {
+                            if(list[j].id == selectArr[0].id) {
+                                _this.assetsForm.projectNo = list[j].projectNo;
+                                _this.assetsForm.projectName = list[j].projectName;
+                            }
+                        }
+                    }
+                });
+            },
+
             delTag(id) {
                 MessageBox.confirm('', { 
                     message: '是否删除该分类?', 
@@ -630,4 +740,17 @@
     .mint-cell-wrapper {
         background-image: none;
     }
+    
+    .content .mint-cell-wrapper {
+        position: relative;
+    }
+
+    .content .mint-cell-title {
+        position: absolute;
+        top: 0;
+    }
+
+    .content .mint-cell-value {
+        margin-left: 105px;
+    }
 </style>

+ 37 - 2
lss_vue/src/views/assets/assetsHandle.vue

@@ -10,7 +10,7 @@
                 <mt-field label="资产编号" placeholder="请输入物品名称" v-model="detail.modelNo" disabled></mt-field>
                 <mt-field id="state" label="资产状态" placeholder="请选择资产状态" disableClear disabled v-on:click.native="chooseType()" v-model="state"></mt-field>
                 <mt-field v-if="assetsForm.state == 1" id="userId" label="对应人员" placeholder="请选择对应人员" disableClear disabled v-on:click.native="choosePeo()" v-model="userName"></mt-field>
-                <!-- <mt-field v-if="assetsForm.state == 1" label="备注" placeholder="请输入备注(150字以内)" type="textarea" rows="5" v-model="content"></mt-field> -->
+                <mt-field v-if="assetsForm.state == 1" id="content" label="备注" class="content" placeholder="请输入备注(150字以内)" :disabled="detail.state == 1 ? true:false" type="textarea" rows="5" v-model="content"></mt-field>
             </div>
             <div class="btn">
                 <mt-button class="allBtn" size="large" type="primary" v-on:click.native="submit()">确定</mt-button>
@@ -65,7 +65,12 @@
                         } else if(res.data.state == 3) {
                             this.state = "报废"
                         }
-                        this.userName = res.data.username==null?'':res.data.username;
+                        if(res.data.userId == -1) {
+                            this.userName = "其他";
+                        } else {
+                            this.userName = res.data.username==null?'':res.data.username;
+                        }
+                        this.content = res.data.note==null?'':res.data.note;
                     } else {
                         this.$toast({
                             message: res.msg,
@@ -82,6 +87,7 @@
             },
 
             getUserList() {
+                this.users = [];
                 this.http.post(this.port.user.list, {} , 
                 res => {
                     if (res.code == "ok") {
@@ -96,6 +102,10 @@
                                 }
                             // }
                         }
+                        this.users.push({
+                            id: -1,
+                            name: '其他',
+                        })
                     } else {
                         this.$toast({
                             message: res.msg,
@@ -189,9 +199,21 @@
                         });
                         this.canClick = true;
                         return false;
+                    } else if(this.assetsForm.state == 1 && this.content.length > 150) {
+                        this.$toast({
+                            message: '备注内容请控制在150字以内',
+                            duration: 2000
+                        });
+                        this.canClick = true;
+                        return false;
                     } else {
                         this.$indicator.open();
                         var _this = this;
+                        if(this.assetsForm.state == 1){
+                            this.assetsForm.note = this.content;
+                        } else {
+                            this.assetsForm.note = "";
+                        }
                         this.http.post( this.port.assets.handle, this.assetsForm,
                         res => {
                             this.$indicator.close();
@@ -406,4 +428,17 @@
     input:disabled {
         background: #fff;
     }
+    
+    .content .mint-cell-wrapper {
+        position: relative;
+    }
+
+    .content .mint-cell-title {
+        position: absolute;
+        top: 0;
+    }
+
+    .content .mint-cell-value {
+        margin-left: 105px;
+    }
 </style>

+ 126 - 6
lss_vue/src/views/assets/assetsRegister.vue

@@ -12,7 +12,7 @@
                     <ul class="address_first">
                         <li v-for="(item,index) in labels" :id="'btn'+item.id" v-bind:class="{'active':index==0}" v-on:click="chooseTag(item.id)">
                             {{item.name}}
-                            <img v-if="index > 7" v-on:click="delTag(item.id)" src="../../assets/image/del.png">
+                            <img v-if="index > 3" v-on:click="delTag(item.id)" src="../../assets/image/del.png">
                         </li>
                         <li v-on:click="addNewTag()" class="add">+</li>
                     </ul>
@@ -21,8 +21,9 @@
             <div class="detailBox">
                 <mt-field label="物品名称" placeholder="请输入物品名称" v-model="assetsForm.name"></mt-field>
                 <mt-field label="型号" placeholder="请输入物品型号" v-model="assetsForm.modelNumber"></mt-field>
+                <mt-field label="产品序列" placeholder="请输入产品序列" v-model="assetsForm.goodsSequence"></mt-field>
                 <mt-field label="数量" placeholder="请输入数量" type="number" v-model="assetsForm.number"></mt-field>
-                <mt-field label="单位" placeholder="请输入单位" v-model="assetsForm.unit"></mt-field>
+                <mt-field label="单位" placeholder="请选择单位" id="unit" disableClear disabled v-on:click.native="chooseUnit()" v-model="assetsForm.unit"></mt-field>
                 <div class="upload">
                     <div class="left">物品图片</div>
                     <div class="right upload_add" v-on:click="choosePic()">
@@ -39,11 +40,14 @@
                 <mt-field label="地址" placeholder="请输入地址" v-model="assetsForm.address"></mt-field>
             </div>
             <div class="detailBox">
-                <mt-field label="项目编号" placeholder="请输入项目编号" v-model="assetsForm.projectNo"></mt-field>
-                <mt-field label="项目名称" placeholder="请输入项目名称" v-model="assetsForm.projectName"></mt-field>
+                <mt-field label="项目编号" placeholder="请选择项目编号" id='projectNo' disableClear disabled v-on:click.native="chooseProject(0)" v-model="assetsForm.projectNo"></mt-field>
+                <mt-field label="项目名称" placeholder="请选择项目名称" id='projectName' disableClear disabled v-on:click.native="chooseProject(1)" v-model="assetsForm.projectName"></mt-field>
                 <mt-field label="采购日期" placeholder="请选择采购日期" type="date" v-model="assetsForm.purchaseDate"></mt-field>
             </div>
             <div class="detailBox">
+                <mt-field label="设备厂家" placeholder="请输入设备厂家" v-model="assetsForm.deviceFactory"></mt-field>
+                <mt-field label="设备联系人" placeholder="请输入设备联系人" v-model="assetsForm.deviceContact"></mt-field>
+                <mt-field label="联系人电话" placeholder="请输入设备联系人电话" v-model="assetsForm.deviceContactPhone"></mt-field>
                 <mt-field label="供应商" placeholder="请输入供应商" v-model="assetsForm.factory"></mt-field>
                 <mt-field label="采购价格" placeholder="请输入采购价格" type="number" v-model="assetsForm.price"></mt-field>
                 <mt-field label="质保期限" placeholder="请输入质保期限(单位:年)" type="number" v-model="assetsForm.warrantyPeriod"></mt-field>
@@ -51,7 +55,7 @@
                 <mt-field label="下次维护日期" placeholder="请选择下次维护日期" type="date" v-model="assetsForm.nextIndate"></mt-field>
             </div>
             <div class="detailBox">
-                <mt-field label="备注" placeholder="请输入备注(100字以内)" type="textarea" rows="5" v-model="assetsForm.content"></mt-field>
+                <mt-field label="备注" placeholder="请输入备注(100字以内)" class="content" type="textarea" rows="5" v-model="assetsForm.content"></mt-field>
             </div>
             <div class="btn">
                 <mt-button class="allBtn" size="large" type="primary" v-on:click.native="submit()">确定</mt-button>
@@ -106,12 +110,22 @@
                     price: '',
                     warrantyPeriod: '',
                     content: '',
+
+                    goodsSequence: '',
+                    deviceFactory: '',
+                    deviceContact: '',
+                    deviceContactPhone: '',
                 },
                 popupVisible: false,
                 labels: [],
                 tagId: 0,
                 limit: 1,
                 canClick: true,
+
+                unit: [],
+                project: [],
+                projectNo: [],
+                projectName: [],
 			}
 		},
 		methods: {
@@ -136,6 +150,59 @@
                     });
                 })
             },
+            
+            getUnit() {
+                this.http.post(this.port.assets.unit, {} , 
+                res => {
+                    if (res.code == "ok") {
+                        var list = res.data;
+                        for(var i in list) {
+                            list[i].name = list[i].unit;
+                        }
+                        this.unit = list;
+                    } else {
+                        this.$toast({
+                            message: res.msg,
+                            duration: 2000
+                        });
+                    }
+                }, error => {
+                    this.$toast({
+                        message: error,
+                        duration: 2000
+                    });
+                })
+            },
+
+            getProject() {
+                this.http.post(this.port.assets.project, {} , 
+                res => {
+                    if (res.code == "ok") {
+                        this.project = res.data;
+                        var list = res.data;
+                        for(var i in list) {
+                            this.projectNo.push({
+                                id: list[i].id,
+                                name: list[i].projectNo
+                            });
+                            this.projectName.push({
+                                id: list[i].id,
+                                name: list[i].projectName
+                            })
+                        }
+                    } else {
+                        this.$toast({
+                            message: res.msg,
+                            duration: 2000
+                        });
+                    }
+                }, error => {
+                    this.$toast({
+                        message: error,
+                        duration: 2000
+                    });
+                })
+            },
 
             addNewTag() {
                 MessageBox({
@@ -195,6 +262,44 @@
                 this.assetsForm.tagId = id;
             },
 
+            chooseUnit() {
+                var _this = this;
+                var dataShippingSpace = this.unit;
+                var pickerDiv = document.getElementById("unit");
+                var pickerView = new PickerView({
+                    bindElem: pickerDiv, 
+                    data: dataShippingSpace, 
+                    title: "单位", 
+                    leftText: "取消", 
+                    rightText: "确定", 
+                    rightFn: function(selectArr) {
+                        _this.assetsForm.unit = selectArr[0].name;
+                    }
+                });
+            },
+
+            chooseProject(i) {
+                var _this = this;
+                var dataShippingSpace = i==0?this.projectNo:this.projectName;
+                var pickerDiv = i==0?document.getElementById("projectNo"):document.getElementById("projectName");
+                var pickerView = new PickerView({
+                    bindElem: pickerDiv, 
+                    data: dataShippingSpace, 
+                    title: i==0?"项目编号":"项目名称", 
+                    leftText: "取消", 
+                    rightText: "确定", 
+                    rightFn: function(selectArr) {
+                        var list = _this.project;
+                        for(var j in list) {
+                            if(list[j].id == selectArr[0].id) {
+                                _this.assetsForm.projectNo = list[j].projectNo;
+                                _this.assetsForm.projectName = list[j].projectName;
+                            }
+                        }
+                    }
+                });
+            },
+
             delTag(id) {
                 MessageBox.confirm('', { 
                     message: '是否删除该分类?', 
@@ -426,9 +531,11 @@
             jumpBack() {
                 this.$router.push("/assets");
                 // this.$router.go(-1);
-            }
+            },
         },
         created() {
+            this.getUnit();
+            this.getProject();
             this.getLabels();
         },
 		mounted() {
@@ -611,4 +718,17 @@
     .mint-cell-wrapper {
         background-image: none;
     }
+
+    .content .mint-cell-wrapper {
+        position: relative;
+    }
+
+    .content .mint-cell-title {
+        position: absolute;
+        top: 0;
+    }
+
+    .content .mint-cell-value {
+        margin-left: 105px;
+    }
 </style>

+ 1 - 1
lss_vue/src/views/my/my.vue

@@ -18,7 +18,7 @@
             <mt-cell title="我的消息" is-link v-on:click.native="jumpTo(1)"><mt-badge v-if="newNum!=0" size="small" type="error">{{newNum}}</mt-badge><img slot="icon" src="../../assets/image/my_message.png" width="24" height="24"></mt-cell>
             <mt-cell title="我的资产" is-link v-on:click.native="jumpTo(2)"><img slot="icon" src="../../assets/image/my_assets.png" width="24" height="24"></mt-cell>
             <mt-cell v-if="user.roles!= null && user.roles[0].rolename != '部门领导'" title="我的评分" is-link v-on:click.native="jumpTo(3)"><img slot="icon" src="../../assets/image/my_score.png" width="24" height="24"></mt-cell>
-            <!-- <mt-cell v-if="user.roles!= null && user.roles[0].rolename == '部门领导'" title="TA的建议" is-link v-on:click.native="jumpTo(7)"><img slot="icon" src="../../assets/image/my_score.png" width="24" height="24"></mt-cell> -->
+            <mt-cell v-if="user.roles!= null && user.roles[0].rolename == '部门领导'" title="TA的建议" is-link v-on:click.native="jumpTo(7)"><img slot="icon" src="../../assets/image/my_sug.png" width="24" height="24"></mt-cell>
             <mt-cell v-if="user.roles!= null && user.roles[0].rolename != '部门领导'" title="我的建议" is-link v-on:click.native="jumpTo(4)"><img slot="icon" src="../../assets/image/my_sug.png" width="24" height="24"></mt-cell>
         </div>
         <div class="mybox">

+ 198 - 10
lss_vue/src/views/my/myGrade.vue

@@ -9,15 +9,19 @@
         <div class="detail_body">
             <div class="detailBox one_recordBox">
                 <div class="record_head">
-                    <div v-on:click="canEdit&&power.indexOf('scoring')>-1?openPop(1):''">个人分:
+                    <div v-on:click="canEdit&&power.indexOf('scoring')>-1?openPop(1):''">
+                        个人分:
                         <img v-if="canEdit && power.indexOf('scoring')>-1" class="rotate" src="../../assets/image/pull_down_blue.png">
                         <span>{{detail.personalScore==null?'0分':detail.personalScore + '分'}}</span>
                     </div>
-                    <div>建议分:<span>{{detail.ideaScoreSum==null?'0分':parseFloat(detail.ideaScoreSum) + '分'}}</span></div>
+                    <div v-on:click="toNext()">
+                        建议分:
+                        <img v-if="canEdit && power.indexOf('scoring')>-1" class="rotate" src="../../assets/image/pull_down_blue.png">
+                        <span>{{detail.ideaScoreSum==null?'0分':parseFloat(detail.ideaScoreSum) + '分'}}</span></div>
                 </div>
-                <div class="record_body">
+                <!-- <div class="record_body">
                     <div v-on:click="toNext()">TA的建议 <span class="toDetail"><img class="rotate" src="../../assets/image/pull_down_blue.png"></span></div>
-                </div>
+                </div> -->
             </div>
             <div class="detailBox one_recordBox">
                 <div class="totalScore">总得分:<span>{{(detail.personalScore==null?0:detail.personalScore) + (detail.ideaScoreSum==null?0:detail.ideaScoreSum) + '分'}}</span></div>
@@ -28,6 +32,7 @@
                     </div>
                 </div>
             </div>
+            <p style="color: #777;font-size:0.12rem;margin:0;padding:0 0.1rem">“德、能、勤、绩、廉” 5项90分 , “建议得分” 分值10分</p>
         </div>
 
         <mt-popup v-model="score" position="middle" popup-transition="popup-fade">
@@ -52,6 +57,7 @@
             </div>
         </mt-popup>
 
+        <!-- TA的建议 -->
         <mt-popup v-model="popupVisible" position="right" class="allocation" id="allocation">
             <mt-header class="detail_head uName" fixed title="TA的建议">
                 <router-link to="" slot="left">
@@ -101,6 +107,33 @@
                 </div>
             </div>
         </mt-popup>
+
+        <!-- 个人分 -->
+        <mt-popup v-model="scoreVisible" position="right" class="allocation" id="allocation">
+            <mt-header class="detail_head uName" fixed title="个人分">
+                <router-link to="" slot="left">
+                    <mt-button icon="back" v-on:click="toPrev()">{{name}}</mt-button>
+                </router-link>
+            </mt-header>
+            <div class="detail_body">
+                <div class="detailBox one_recordBox" v-for="(item,index) in fiveList">
+                    <div>
+                        <div class="one_suggest_title">
+                            {{item.name}}
+                        </div>
+                        <div class="one_suggest_body" style="color:#666;margin-bottom: 0.1rem">
+                            {{item.content}}
+                        </div>
+                        <div style="height:0.3rem;" class='score'>
+                            <mt-field label="" :placeholder="'请输入分数(0-'+ item.score +')'" type="number" style="padding:0;min-height: 0.3rem;height:0.3rem;"
+                            :attr="{ oninput: 'if(value>'+ item.score +' || value == 0)value=0;if(value.indexOf(0) > -1){value=parseInt(value)}' }" :id="'a' + (index+1)"></mt-field>
+                        </div>
+                    </div>
+                </div>
+                <mt-button class="allBtn" size="large" type="primary" v-on:click.native="subScore()">确定</mt-button>
+                <mt-button class="allBtn" size="large" v-on:click.native="toPrev()">取消</mt-button>
+            </div>
+        </mt-popup>
     </div>
 </template>
 
@@ -128,8 +161,12 @@
                 chooseSugNum: 0,
 
                 ideaList: [],
-                
+
+                scoreVisible: false,
+                fiveList: [],
+
                 canEdit: true,
+                canClick: true,
 			}
 		},
 		methods: {
@@ -274,6 +311,7 @@
             },
 
             toPrev() {
+                this.scoreVisible = false;
                 this.popupVisible = false;
                 this.getDetail();
             },
@@ -308,7 +346,15 @@
             openPop(type) {
                 if(type == 1) {
                     this.personalScore = this.detail.personalScore==null?0:this.detail.personalScore;
-                    this.score = true;
+                    // this.score = true;
+                    if(this.detail.personScore.id != undefined) {
+                        $("#a1 input").val(this.detail.personScore.virtue);
+                        $("#a2 input").val(this.detail.personScore.can);
+                        $("#a3 input").val(this.detail.personScore.diligence);
+                        $("#a4 input").val(this.detail.personScore.performance);
+                        $("#a5 input").val(this.detail.personScore.lian);
+                    }
+                    this.scoreVisible = true;
                 } else if(type == 2) {
                     this.reason = this.detail.reason==null?'':this.detail.reason;
                     this.reasonPop = true;
@@ -410,10 +456,22 @@
                         });
                     })
                 } else {
-                    var reg = /^\-?([0-9]|10)(\.\d)?$/;
+                    var reg = /^([0-9]|10)(\.\d)?$/;
+                    var scoreNum = 0;
+                    for(var i in this.ideaList) {
+                        if(this.ideaList[this.chooseSugNum].uid == this.ideaList[i].uid && this.ideaList[this.chooseSugNum].id != this.ideaList[i].id) {
+                            scoreNum += this.ideaList[i].score;
+                        }
+                    }
                     if(!reg.test(this.sugScore)) {
                         this.$toast({
-                            message: '分数区间为-10 ~ 10',
+                            message: '分数区间为0 ~ 10',
+                            duration: 2000
+                        });
+                        return false;
+                    } else if((parseFloat(scoreNum) + parseFloat(this.sugScore)) > 10){
+                        this.$toast({
+                            message: '建议分总分不能超过10分',
                             duration: 2000
                         });
                         return false;
@@ -531,13 +589,134 @@
                 document.getElementById('allocation').onclick = function () {
                     $(".one_suggest_reply .showMoreBtn .btn_list").addClass("hide").slideUp();
                 }
+            },
+
+            // 消息列表
+            getFive() {
+                this.$indicator.open();
+                this.http.post(this.port.my.fiveList, {} , 
+                res => {
+                    this.$indicator.close();
+                    if (res.code == "ok") {
+                        this.fiveList = res.data;
+                    } else {
+                        this.$toast({
+                            message: res.msg,
+                            duration: 2000
+                        });
+                    }
+                }, error => {
+                    this.$indicator.close();
+                    this.$toast({
+                        message: error,
+                        duration: 2000
+                    });
+                })
+            },
+
+            subScore() {
+                if(this.canClick) {
+                    this.canClick = false;
+                    if($("#a1 input").val() == "") {
+                        this.$toast({
+                            message: '请填写 “德” 得分',
+                            duration: 2000
+                        });
+                        this.canClick = true;
+                        return false;
+                    }
+                    if($("#a2 input").val() == "") {
+                        this.$toast({
+                            message: '请填写 “能” 得分',
+                            duration: 2000
+                        });
+                        this.canClick = true;
+                        return false;
+                    }
+                    if($("#a3 input").val() == "") {
+                        this.$toast({
+                            message: '请填写 “勤” 得分',
+                            duration: 2000
+                        });
+                        this.canClick = true;
+                        return false;
+                    }
+                    if($("#a4 input").val() == "") {
+                        this.$toast({
+                            message: '请填写 “绩” 得分',
+                            duration: 2000
+                        });
+                        this.canClick = true;
+                        return false;
+                    }
+                    if($("#a5 input").val() == "") {
+                        this.$toast({
+                            message: '请填写 “廉” 得分',
+                            duration: 2000
+                        });
+                        this.canClick = true;
+                        return false;
+                    }
+                    var from = {
+                        uid: this.id,
+                        virtue: $("#a1 input").val(),
+                        can: $("#a2 input").val(),
+                        diligence: $("#a3 input").val(),
+                        performance: $("#a4 input").val(),
+                        lian: $("#a5 input").val(),
+                        scoreId: this.detail.scoreId,
+                        timeStr: this.chooseTime,
+                        total: parseInt($("#a1 input").val()) 
+                            + parseInt($("#a2 input").val()) 
+                            + parseInt($("#a3 input").val()) 
+                            + parseInt($("#a4 input").val()) 
+                            + parseInt($("#a5 input").val()) 
+                            + this.detail.ideaScoreSum
+                    }
+                    if(this.detail.personScore.id != undefined) {
+                        from.id = this.detail.personScore.id;
+                    }
+                    this.$indicator.open();
+                    this.http.post(this.port.my.fiveAddOrUpdate, from , 
+                    res => {
+                        this.$indicator.close();
+                        this.canClick = true;
+                        if (res.code == "ok") {
+                            this.$toast({
+                                    message: '打分成功',
+                                    duration: 2000
+                                });
+                                this.scoreVisible = false;
+                                this.getDetail();
+                        } else {
+                            this.$toast({
+                                message: res.msg,
+                                duration: 2000
+                            });
+                        }
+                    }, error => {
+                        this.$indicator.close();
+                        this.canClick = true;
+                        this.$toast({
+                            message: error,
+                            duration: 2000
+                        });
+                    })
+                } else {
+                    this.$toast({
+                        message: '请勿重复提交',
+                        duration: 2000
+                    });
+                }
             }
+
         },
         created() {
             this.getDate();
         },
 		mounted() {
             this.globalClick();
+            this.getFive();
 		}
 	}
 
@@ -577,9 +756,9 @@
     }
 
     .record_head {
-        padding: 0 0 0.1rem 0;
+        /* padding: 0 0 0.1rem 0; */
         line-height: 0.25rem;
-        border-bottom: 1px solid #ccc;
+        /* border-bottom: 1px solid #ccc; */
     }
 
     .record_head > div {
@@ -841,6 +1020,11 @@
     .hide {
         display: none;
     }
+
+    .allBtn {
+        width: 80%;
+        margin: 0.18rem auto;
+    }
 </style>
 <style>
      .uName .is-left .mint-button-text {
@@ -874,4 +1058,8 @@
         border-radius: 5px;
         padding: 0.08rem;
     }
+
+    .score .mint-cell-wrapper {
+        padding: 0;
+    }
 </style>

+ 114 - 167
lss_vue/src/views/my/mySuggestByLeader.vue

@@ -7,17 +7,20 @@
             <mt-button class="timePicker" slot="right" id="dateTime" v-on:click="timePicker()"><span class="dateTime">{{chooseTime}}</span> <img src="../../assets/image/pull_down.png"></mt-button>
         </mt-header>
         <div class="detail_body">
-            <div class="noList" v-if="list.length==0">
+            <div class="noList" v-if="ideaList.length==0">
                 <img src="../../assets/image/noList.png">
             </div> 
             <ul v-else class="recordBox">
-                <li v-for="(item,index) in list" class="one_recordBox detailBox">
+                <li v-for="(item,index) in ideaList" class="one_recordBox detailBox">
                     <div>
                         <div class="one_suggest_title">
-                            {{item.indate}}
+                            {{item.name}}
                             <span v-if="item.ideaComment != null" class="areaday">已打分</span>
                             <span v-if="power.indexOf('scoring')>-1 && item.isEvaluated == 0" class="edit" v-on:click="openSugPop(index)">打分</span>
                         </div>
+                        <div style="color: #aaa;text-align:left;font-size:0.13rem;margin-bottom:0.12rem;">
+                            {{item.indate}}
+                        </div>
                         <div class="one_suggest_body">
                             {{item.content}}
                         </div>
@@ -54,7 +57,7 @@
                 <mt-field label="" class="input" placeholder="请输入得分原因" type="textarea" rows="4" v-model="sugContent"></mt-field>
                 <div class="btns">
                     <mt-button class="btn" size="small" v-on:click.native="submit(3)">确定</mt-button>
-                    <mt-button class="btn" size="small" v-on:click.native="closePop(3)">取消</mt-button>
+                    <mt-button class="btn" size="small" v-on:click.native="closePop()">取消</mt-button>
                 </div>
             </div>
         </mt-popup>
@@ -62,12 +65,13 @@
 </template>
 
 <script>
+    import { MessageBox } from 'mint-ui';
 	export default {
 		data() {
 			return {
                 user: JSON.parse(sessionStorage.getItem("user")),
                 power: sessionStorage.getItem("power"),
-                list: [],
+                ideaList: [],
                 pageNum: 1,
                 pages: 1,
                 haveMore: false,
@@ -97,7 +101,7 @@
                     rightText: "确定", 
                     rightFn: function(selectArr) {
                         _this.chooseTime = selectArr[0].name;
-                        _this.getDetail();
+                        _this.getList();
                         if(_this.chooseTime == _this.date[0].name) {
                             _this.canEdit = true
                         } else {
@@ -110,14 +114,16 @@
             // 消息列表
             getList() {
                 this.$indicator.open();
-                this.http.post(this.port.my.ideaList, {
+                this.http.post(this.port.my.ideaListByUid, {
                     'uid': this.user.id,
-                    'pageNum': 1,
+                    'time': this.chooseTime,
+                    // 'pageNum': 1,
                 } , 
                 res => {
                     this.$indicator.close();
                     if (res.code == "ok") {
-                        this.list = res.data.list;
+                        // this.ideaList = res.data.list;
+                        this.ideaList = res.data;
                         this.pages = res.data.pages==0?1:res.data.pages;
                     } else {
                         this.$toast({
@@ -139,17 +145,18 @@
                     this.haveMore = true;
                 } else if(this.pageNum < this.pages) {
                     this.$indicator.open();
-                    this.http.post(this.port.my.ideaList, {
+                    this.http.post(this.port.my.ideaListByUid, {
                         'uid': this.user.id,
+                        'time': this.chooseTime,
                         'pageNum': ++this.pageNum
                     } , 
                     res => {
                         this.$indicator.close();
                         if (res.code == "ok") {
                             this.pages = res.data.pages==0?1:res.data.pages;
-                            if(res.data.list.length != 0) {
-                                for(var i in res.data.list) {
-                                    this.list.push(res.data.list[i]);
+                            if(res.data.ideaList.length != 0) {
+                                for(var i in res.data.ideaList) {
+                                    this.ideaList.push(res.data.list[i]);
                                 }
                             }
                         } else {
@@ -210,85 +217,56 @@
             },
 
             submit(type) {
-                if(type == 1) {
-                    var reg = /^([1]?\d{1,2})$/;
-                    if(!reg.test(this.personalScore)) {
+                var reg = /^([0-9]|10)(\.\d)?$/;
+                var scoreNum = 0;
+                for(var i in this.ideaList) {
+                    if(this.ideaList[this.chooseSugNum].uid == this.ideaList[i].uid && this.ideaList[this.chooseSugNum].id != this.ideaList[i].id) {
+                        scoreNum += this.ideaList[i].score;
+                    }
+                }
+                if(!reg.test(this.sugScore)) {
+                    this.$toast({
+                        message: '分数区间为0 ~ 10',
+                        duration: 2000
+                    });
+                    return false;
+                } else if((parseFloat(scoreNum) + parseFloat(this.sugScore)) > 10){
                         this.$toast({
-                            message: '请输入0-100内的整数',
+                            message: '当前人员建议分总分不能超过10分',
                             duration: 2000
                         });
                         return false;
-                    } else {
-                        var from = {};
-                        if(this.detail.scoreId != null) {
-                            from = {
-                                "scoreId": this.detail.scoreId,
-                                "personalScore": this.personalScore,
-                                "ideaScore": this.detail.ideaScoreSum == null?0:this.detail.ideaScoreSum,
-                                "total": parseInt(this.personalScore) + (this.detail.ideaScoreSum == null?0:parseFloat(this.detail.ideaScoreSum)),
-                            }
-                        } else {
-                            from = {
-                                "uid": this.id,
-                                "personalScore": this.personalScore,
-                                "ideaScore": this.detail.ideaScoreSum == null?0:this.detail.ideaScoreSum,
-                                "scoringYearMonth": this.chooseTime,
-                                "raterId": this.user.id,
-                                "total": parseInt(this.personalScore) + (this.detail.ideaScoreSum == null?0:parseFloat(this.detail.ideaScoreSum)),
-                            }
-                        }
-                        this.$indicator.open();
-                        this.http.post(this.port.my.addOrUpdate, from , 
-                        res => {
-                            this.$indicator.close();
-                            if (res.code == "ok") {
-                                this.$toast({
-                                    message: "打分成功",
-                                    duration: 2000
-                                });
-                                this.getDetail();
-                                this.score = false;
-                            } else {
-                                this.$toast({
-                                    message: res.msg,
-                                    duration: 2000
-                                });
-                            }
-                        }, error => {
-                            this.$indicator.close();
-                            this.score = false;
-                            this.$toast({
-                                message: error,
-                                duration: 2000
-                            });
-                        })
-                    }
-                } else if(type == 2) {
+                } else {
                     var from = {};
-                    if(this.detail.scoreId != null) {
+                    if(this.ideaList[this.chooseSugNum].ideaComment != null) {
                         from = {
-                            "scoreId": this.detail.scoreId,
-                            "reason": this.reason,
+                            "ideaId": this.ideaList[this.chooseSugNum].id,
+                            "score": this.sugScore,
+                            "content": this.sugContent,
+                            "responderId": this.user.id,
+                            "scoreId": this.ideaList[this.chooseSugNum].scoreId,
+                            "id": this.ideaList[this.chooseSugNum].ideaComment.id,
                         }
                     } else {
                         from = {
-                            "uid": this.id,
-                            "reason": this.reason,
-                            "scoringYearMonth": this.chooseTime,
-                            "raterId": this.user.id
+                            "ideaId": this.ideaList[this.chooseSugNum].id,
+                            "score": this.sugScore,
+                            "content": this.sugContent,
+                            "responderId": this.user.id,
+                            "scoreId": this.ideaList[this.chooseSugNum].scoreId,
                         }
                     }
                     this.$indicator.open();
-                    this.http.post(this.port.my.addOrUpdate, from , 
+                    this.http.post(this.port.my.leaderScore, from , 
                     res => {
                         this.$indicator.close();
                         if (res.code == "ok") {
                             this.$toast({
-                                message: "提交成功",
+                                message: "打分成功",
                                 duration: 2000
                             });
-                            this.getDetail();
-                            this.reasonPop = false;
+                            this.sugScorePop = false;
+                            this.getList();
                         } else {
                             this.$toast({
                                 message: res.msg,
@@ -297,107 +275,17 @@
                         }
                     }, error => {
                         this.$indicator.close();
-                        this.reasonPop = false;
+                        this.sugScorePop = false;
                         this.$toast({
                             message: error,
                             duration: 2000
                         });
                     })
-                } else {
-                    var reg = /^\-?([0-9]|10)(\.\d)?$/;
-                    if(!reg.test(this.sugScore)) {
-                        this.$toast({
-                            message: '分数区间为-10 ~ 10',
-                            duration: 2000
-                        });
-                        return false;
-                    } else {
-                        var from = {};
-                        if(this.ideaList[this.chooseSugNum].ideaComment != null) {
-                            from = {
-                                "ideaId": this.ideaList[this.chooseSugNum].id,
-                                "score": this.sugScore,
-                                "content": this.sugContent,
-                                "responderId": this.user.id,
-                                "scoreId": this.ideaList[this.chooseSugNum].scoreId,
-                                "id": this.ideaList[this.chooseSugNum].ideaComment.id,
-                            }
-                        } else {
-                            from = {
-                                "ideaId": this.ideaList[this.chooseSugNum].id,
-                                "score": this.sugScore,
-                                "content": this.sugContent,
-                                "responderId": this.user.id,
-                                "scoreId": this.ideaList[this.chooseSugNum].scoreId,
-                            }
-                        }
-                        this.$indicator.open();
-                        this.http.post(this.port.my.leaderScore, from , 
-                        res => {
-                            this.$indicator.close();
-                            if (res.code == "ok") {
-                                this.$toast({
-                                    message: "打分成功",
-                                    duration: 2000
-                                });
-                                this.sugScorePop = false;
-                                this.toNext();
-                            } else {
-                                this.$toast({
-                                    message: res.msg,
-                                    duration: 2000
-                                });
-                            }
-                        }, error => {
-                            this.$indicator.close();
-                            this.sugScorePop = false;
-                            this.$toast({
-                                message: error,
-                                duration: 2000
-                            });
-                        })
-                    }
                 }
             },
 
             closePop() {
-                if(this.content != "" && this.content != null && this.chooseI == -1) {
-                    var from = {};
-                    if(this.chooseI == -1) {
-                        from = {
-                            "content": this.content,
-                            "scoringYearMonth": this.chooseTime,
-                            "uid": this.user.id,
-                            "isDraft": 1,
-                        }
-                    }
-                    this.$indicator.open();
-                    this.http.post(this.port.my.ideaAoU, from , 
-                    res => {
-                        this.$indicator.close();
-                        if (res.code == "ok") {
-                            this.$toast({
-                                message: "当前未提交内容已存为草稿",
-                                duration: 2000
-                            });
-                            this.popupVisible = false;
-                        } else {
-                            this.$toast({
-                                message: res.msg,
-                                duration: 2000
-                            });
-                        }
-                    }, error => {
-                        this.$indicator.close();
-                        this.popupVisible = false;
-                        this.$toast({
-                            message: error,
-                            duration: 2000
-                        });
-                    })
-                } else {
-                    this.popupVisible = false;
-                }
+                this.sugScorePop = false;
             },
 
             openSugPop(i) {
@@ -433,7 +321,7 @@
                                     message: "删除成功",
                                     duration: 2000
                                 });
-                                this.toNext();
+                                this.getList();
                             } else {
                                 this.$toast({
                                     message: res.msg,
@@ -669,6 +557,65 @@
         font-size: 0.13rem;
         vertical-align: middle;
     }
+
+    
+    .showMoreBtn {
+        display: inline-block;
+        float: right;
+        position: relative;
+    }
+
+    .showMoreBtn img {
+        width: 0.23rem;
+    }
+
+    .btn_list {
+        position: absolute;
+        right: -0.04rem;
+        top: 0.30rem;
+        border:#aaa;
+        background: #fcfcfc;
+        box-shadow: 5px 5px 10px #ccc;
+        z-index: 105;
+    }
+
+    .btn_list:before {
+        display: inline-block;
+        width: 0;
+        height: 0;
+        border: solid transparent;
+        border-width: 10px;
+        border-bottom-color: #fcfcfc;
+        content: "";
+        position: absolute;
+        top: -20px;
+        right: 0.06rem;
+    }
+
+    .btn_list > div {
+        width: 0.6rem;
+        font-size: 0.13rem;
+        padding: 0.1rem 0.15rem;
+        border-bottom: 1px solid #efefef;
+        text-align: center;
+    }
+
+    .btn_list > div img {
+        width: 0.14rem;
+        height: 0.14rem;
+        vertical-align: middle;
+        margin-right: 0.05rem;
+    }
+
+    .btn_list > div span {
+        height: 0.15rem;
+        line-height: 0.15rem;
+        vertical-align: middle;
+    }
+
+    .hide {
+        display: none;
+    }
 </style>
 <style>
     .mint-popup-div input {

BIN
lss_vue_wx/src/assets/image/404.png


BIN
lss_vue_wx/src/assets/image/my_project.png


+ 28 - 10
lss_vue_wx/src/routes.js

@@ -13,7 +13,7 @@ import assetsHandle from './views/assets/assetsHandle.vue'
 import assetsOperation from './views/assets/assetsOperation.vue'
 import assetsMaintain from './views/assets/assetsMaintain.vue'
 
-// 任务
+// 工单
 import task from './views/task/task.vue'
 import taskDetail from './views/task/taskDetail.vue'
 import taskRegister from './views/task/taskRegister.vue'
@@ -67,22 +67,22 @@ let routes = [
             { path: '/assetsOperation/:id', component:(resolve)=>require(['./views/assets/assetsOperation.vue'] , resolve), name: '操作记录', meta: {keepAlive: true, parentPath:'/tab_assets'} },
         ]
     },
-    // 任务
+    // 工单
     {
         path: '/',
         component: Home,
         name: '',
         leaf: true,//只有一个节点
         children: [
-            // { path: '/task', component: task, name: '任务', meta: {keepAlive: true, parentPath:'/tab_task'} },
-            // { path: '/task/:id', component: taskDetail, name: '任务详情', meta: {keepAlive: true, parentPath:'/tab_task'} },
-            // { path: '/taskRegister', component: taskRegister, name: '新增任务', meta: {keepAlive: true, parentPath:'/tab_task'} },
-            // { path: '/taskEdit/:id', component: taskEdit, name: '修改任务', meta: {keepAlive: true, parentPath:'/tab_task'} },
+            // { path: '/task', component: task, name: '工单', meta: {keepAlive: true, parentPath:'/tab_task'} },
+            // { path: '/task/:id', component: taskDetail, name: '工单详情', meta: {keepAlive: true, parentPath:'/tab_task'} },
+            // { path: '/taskRegister', component: taskRegister, name: '新增工单', meta: {keepAlive: true, parentPath:'/tab_task'} },
+            // { path: '/taskEdit/:id', component: taskEdit, name: '修改工单', meta: {keepAlive: true, parentPath:'/tab_task'} },
 
-            { path: '/task', component:(resolve)=>require(['./views/task/task.vue'] , resolve), name: '任务', meta: {keepAlive: true, parentPath:'/tab_task'} },
-            { path: '/task/:id', component:(resolve)=>require(['./views/task/taskDetail.vue'] , resolve), name: '任务详情', meta: {keepAlive: true, parentPath:'/tab_task'} },
-            { path: '/taskRegister', component:(resolve)=>require(['./views/task/taskRegister.vue'] , resolve), name: '新增任务', meta: {keepAlive: true, parentPath:'/tab_task'} },
-            { path: '/taskEdit/:id', component:(resolve)=>require(['./views/task/taskEdit.vue'] , resolve), name: '修改任务', meta: {keepAlive: true, parentPath:'/tab_task'} },
+            { path: '/task', component:(resolve)=>require(['./views/task/task.vue'] , resolve), name: '工单', meta: {keepAlive: true, parentPath:'/tab_task'} },
+            { path: '/task/:id', component:(resolve)=>require(['./views/task/taskDetail.vue'] , resolve), name: '工单详情', meta: {keepAlive: true, parentPath:'/tab_task'} },
+            { path: '/taskRegister', component:(resolve)=>require(['./views/task/taskRegister.vue'] , resolve), name: '新增工单', meta: {keepAlive: true, parentPath:'/tab_task'} },
+            { path: '/taskEdit/:id', component:(resolve)=>require(['./views/task/taskEdit.vue'] , resolve), name: '修改工单', meta: {keepAlive: true, parentPath:'/tab_task'} },
         ]
     },
     // 我的
@@ -115,6 +115,24 @@ let routes = [
             { path: '/myInstitution/:id', component:(resolve)=>require(['./views/my/myInsDetail.vue'] , resolve), name: '管理制度详情', meta: {keepAlive: true, parentPath:'/tab_my'} },
         ]
     },
+    // 项目
+    {
+        path: '/',
+        component: Home,
+        name: '',
+        leaf: true,//只有一个节点
+        children: [
+            // { path: '/task', component: task, name: '工单', meta: {keepAlive: true, parentPath:'/tab_task'} },
+            // { path: '/task/:id', component: taskDetail, name: '工单详情', meta: {keepAlive: true, parentPath:'/tab_task'} },
+            // { path: '/taskRegister', component: taskRegister, name: '新增工单', meta: {keepAlive: true, parentPath:'/tab_task'} },
+            // { path: '/taskEdit/:id', component: taskEdit, name: '修改工单', meta: {keepAlive: true, parentPath:'/tab_task'} },
+
+            { path: '/project', component:(resolve)=>require(['./views/project/project.vue'] , resolve), name: '项目', meta: {keepAlive: true, parentPath:'/tab_my'} },
+            { path: '/project/:id', component:(resolve)=>require(['./views/project/projectDetail.vue'] , resolve), name: '项目详情', meta: {keepAlive: true, parentPath:'/tab_my'} },
+            { path: '/projectRegister', component:(resolve)=>require(['./views/project/projectRegister.vue'] , resolve), name: '新增项目', meta: {keepAlive: true, parentPath:'/tab_my'} },
+            { path: '/projectEdit/:id', component:(resolve)=>require(['./views/project/projectEdit.vue'] , resolve), name: '修改项目', meta: {keepAlive: true, parentPath:'/tab_my'} },
+        ]
+    },
     {
         path: '/404',
         component: NotFound,

+ 5 - 4
lss_vue_wx/src/views/404.vue

@@ -3,9 +3,9 @@
         <div class="page-img">
             <img src="../assets/image/404.png" />
         </div>
-        <p class="page-container"><b>Error</b>  非常抱歉你访问的页面不存在!!!</p>
+        <p class="page-container"><b>Error</b>  页面加载失败!!!</p>
         <div class="page-button">
-            <el-button type="primary" round @click="back" icon="el-icon-s-promotion">返回首页</el-button>
+            <a @click="back" style="color:#93ADFA">点击重新加载</a>
         </div>
     </div>
 </template>
@@ -19,7 +19,8 @@
 		},
 		methods: {
             back() {
-                this.$router.push('/map');
+                // this.$router.go(-1);
+                window.history.back()
             }
         },
         created() {
@@ -36,7 +37,7 @@
         padding: 100px 0 0 0 ;
 
         img {
-            width: 600px;
+            width: 2rem;
         }
     }
 

+ 1 - 1
lss_vue_wx/src/views/Home.vue

@@ -10,7 +10,7 @@
             <mt-tab-item id="tab2" @click.native="changeTab(2)">
                 <img v-if="selected == 'tab2'" slot="icon" src="../assets/image/tab_task_choose.png">
                 <img v-else slot="icon" src="../assets/image/tab_task.png">
-                任务
+                工单
             </mt-tab-item>
             <mt-tab-item id="tab3" @click.native="changeTab(3)">
                 <img v-if="selected == 'tab3'" slot="icon" src="../assets/image/tab_my_choose.png">

+ 6 - 2
lss_vue_wx/src/views/my/my.vue

@@ -17,8 +17,9 @@
         <div class="mybox">
             <mt-cell title="我的消息" is-link v-on:click.native="jumpTo(1)"><mt-badge v-if="newNum!=0" size="small" type="error">{{newNum}}</mt-badge><img slot="icon" src="../../assets/image/my_message.png" width="24" height="24"></mt-cell>
             <mt-cell title="我的资产" is-link v-on:click.native="jumpTo(2)"><img slot="icon" src="../../assets/image/my_assets.png" width="24" height="24"></mt-cell>
-            <mt-cell v-if="user.roles[0].rolename != '部门领导'" title="我的评分" is-link v-on:click.native="jumpTo(3)"><img slot="icon" src="../../assets/image/my_score.png" width="24" height="24"></mt-cell>
-            <mt-cell v-if="user.roles[0].rolename != '部门领导'" title="我的建议" is-link v-on:click.native="jumpTo(4)"><img slot="icon" src="../../assets/image/my_sug.png" width="24" height="24"></mt-cell>
+            <!-- <mt-cell title="我的项目" is-link v-on:click.native="jumpTo(7)"><img slot="icon" src="../../assets/image/my_project.png" width="24" height="24"></mt-cell> -->
+            <!-- <mt-cell v-if="user.roles[0].rolename != '部门领导'" title="我的评分" is-link v-on:click.native="jumpTo(3)"><img slot="icon" src="../../assets/image/my_score.png" width="24" height="24"></mt-cell> -->
+            <!-- <mt-cell v-if="user.roles[0].rolename != '部门领导'" title="我的建议" is-link v-on:click.native="jumpTo(4)"><img slot="icon" src="../../assets/image/my_sug.png" width="24" height="24"></mt-cell> -->
         </div>
         <div class="mybox">
             <mt-cell title="通讯录" is-link v-on:click.native="jumpTo(5)"><img slot="icon" src="../../assets/image/my_com.png" width="24" height="24"></mt-cell>
@@ -63,6 +64,9 @@
                     case 6:
                         this.$router.push("/myInstitution");
                         break;
+                    case 7:
+                        this.$router.push("/project");
+                        break;
                     default:
                         return false
                         break;

+ 2 - 2
lss_vue_wx/src/views/my/myAddress.vue

@@ -24,11 +24,11 @@
                                 <div>{{peo.name}} <span v-if="peo.roleName=='部门领导'" style="color: #5FA1F0;margin-left:0.05rem;font-size:0.12rem;">({{peo.roleName}})</span></div>
                                 <div>{{peo.phone}}</div>
                             </div>
-                            <div v-if="peo.roleName!='部门领导' && item.departmentGuid == user.deptId && user.roles[0].rolename == '部门领导' && power.indexOf('scoring')>-1" 
+                            <!-- <div v-if="peo.roleName!='部门领导' && item.departmentGuid == user.deptId && user.roles[0].rolename == '部门领导' && power.indexOf('scoring')>-1" 
                                 class="one_peo_score" v-on:click="toScore(peo.id,peo.name)">
                                 {{peo.totalScore==null?"打分":peo.totalScore + "分"}}
                                 <span class="toScore"><img class="rotate" src="../../assets/image/pull_down_blue.png"></span>
-                            </div>
+                            </div> -->
                         </li>
                     </ul>
                 </li>

+ 651 - 0
lss_vue_wx/src/views/project/project.vue

@@ -0,0 +1,651 @@
+<template>
+	<div id="allocation" class="detail">
+        <div class="head taskHead">
+            <mt-header class="detail_head" fixed title="项目列表">
+                <router-link to="" slot="left">
+                    <mt-button icon="back" v-on:click.native='jumpBack()'></mt-button>
+                </router-link>
+            </mt-header>
+        </div>
+        <div class="head taskHead headInput">
+            <div class="searchbox">
+                <img src="../../assets/image/search.png" class="searchbox_img">
+                <input v-on:keypress="searchKeyword" type="text" v-model="keyWord" class="searchbox_text" placeholder="搜索"/>
+            </div>
+            <div class="filter">
+                <img src="../../assets/image/add_black.png" v-on:click="register()">
+                <img v-if="!isBlue"  src="../../assets/image/filter.png" v-on:click="showFilter()">
+                <img v-else src="../../assets/image/filter_blue.png" v-on:click="showFilter()">
+            </div>
+        </div>
+        <section class="_sorting-address">
+            <div class="filter_title">项目分类</div>
+            <ul class="filter_body task_type">
+                <li v-bind:class="{'active':type == -1}"  id="btn-1" v-on:click='chooseType(-1)'>全部</li>
+                <li id="btn0" v-on:click="chooseType(0)">普通</li>
+                <li id="btn1" v-on:click="chooseType(1)">紧急</li>
+                <li id="btn2" v-on:click="chooseType(2)">暂缓</li>
+            </ul>
+            <div class="filter_title">项目状态</div>
+            <ul class="filter_body task_status">
+                <li v-bind:class="{'active':status == -1}" v-on:click='chooseStatus(-1)'>全部</li>
+                <li v-on:click='chooseStatus(0)'>审核中</li>
+                <li v-on:click='chooseStatus(1)'>未通过</li>
+                <li v-on:click='chooseStatus(2)'>已通过</li>
+                <li v-on:click='chooseStatus(3)'>已完成</li>
+                <li v-on:click='chooseStatus(4)'>已过期</li>
+            </ul>
+            <div class="filter_title">项目日期</div>
+            <div class="filter_body task_date">
+                <mt-field label="" placeholder="开始日期" type="date" v-model="form.start"></mt-field> 
+                <div class="text">至</div>
+                <mt-field label="" placeholder="结束日期" type="date" v-model="form.end"></mt-field>
+            </div>
+            <div class="filter_foot">
+                <mt-button type="default" class="clearFilter" v-on:click.native='clearFilter'>清空</mt-button>
+                <mt-button type="default" class="saveFilter" v-on:click.native='getList'>确认</mt-button>
+            </div>
+        </section>
+        <div class="body">
+            <div class="noList" v-if="taskList.length==0">
+                <img src="../../assets/image/noList.png">
+            </div> 
+            <ul v-else v-infinite-scroll="loadMore" infinite-scroll-disabled="loading" infinite-scroll-distance="10">
+                <li v-for="item in taskList" v-on:click="jumpTo(item.id)">
+                    <div class="text item_name">
+                        <span class="item_type item_span">({{item.tagName}})</span>
+                        {{item.name}} 
+                        <span v-if="item.state==0" class="item_status item_span">待派发</span>
+                        <span v-if="item.state==1" class="item_status item_span">已派发</span>
+                        <span v-if="item.state==2" class="item_status item_span">已接收</span>
+                        <span v-if="item.state==3" class="item_status item_span">待审核</span>
+                        <span v-if="item.state==4" class="item_status item_span">未通过</span>
+                        <span v-if="item.state==5" class="item_status item_span">已完成</span>
+                        <span v-if="item.state==6" class="item_status item_span">已延期</span>
+                        <span v-if="item.state==7" class="item_status item_span">已失效</span>
+                    </div>
+                    <div class="text item_int">{{item.code}}</div>
+                    <div class="text item_content">
+                        {{item.content}}
+                    </div>
+                    <div class="text item_users">
+                        <div class="userInfo">
+                            <img src="../../assets/image/userHead.jpg">
+                            <span>{{item.publisherName}}&nbsp;&nbsp;{{item.indate}}</span>
+                        </div>
+                        <div class="allUsers">
+                            <a v-if="item.recipientId!=null">
+                                <img v-if="item.recipientHedaPic==null" src="../../assets/image/userHead.jpg">
+                                <img v-else :src="item.recipientHedaPic">
+                            </a>
+                            <a v-for="(head,num) in item.participantsVOS" v-if="head.userId != item.recipientId">
+                                <img v-if="head.headPic==null" src="../../assets/image/userHead.jpg">
+                                <img v-else :src="head.headPic">
+                            </a>
+                        </div>
+                    </div>
+                </li>
+                <div class="order" v-if="haveMore">
+                    <span class="line"></span>
+                    <span class="txt">没有更多了</span>
+                    <span class="line"></span>
+                </div>
+            </ul>
+        </div>
+    </div>
+</template>
+
+<script>
+    import util from '../../common/js/util'
+    
+	export default {
+		data() {
+			return {
+                keyWord: "",
+                user: JSON.parse(sessionStorage.getItem("user")),
+                power: sessionStorage.getItem("power"),
+                selected: sessionStorage.taskTab==''?"tab1":sessionStorage.taskTab,
+                isBlue: false,
+                type: -1,
+                status: -1,
+                start: '',
+                end: '',
+                form: {
+                    type: -1,
+                    status: -1,
+                    start: '',
+                    end: '',
+                },
+
+                taskList: [],
+                labels: [],
+                pageNum: 1,
+                pages: 1,
+
+                popupVisible: false,
+                loading: false,
+                haveMore: false,
+			}
+        },
+		methods: {
+            // 项目列表
+            getList() {
+                this.$indicator.open();
+                $("._sorting-address").removeClass("fixed-top");
+                $('._navbar').attr('style','position: fixed;top:0;');
+                this.isBlue = false;
+                sessionStorage.taskTab = this.selected;
+                this.http.post(this.port.task.list, {
+                    'keyName': this.keyWord,
+                    'pageNum': 1,
+                    'uid': this.user.id,
+                    'tagId': this.form.type==-1?"":this.form.type,
+                    'state': this.form.status==-1?"":this.form.status,
+                    'startTime': this.form.start,
+                    'endTime': this.form.end,
+                    'type': this.selected=='tab1'?0:1
+                } , 
+                res => {
+                    this.$indicator.close();
+                    if (res.code == "ok") {
+                        this.taskList = res.data.list;
+                        this.pages = res.data.pages==0?1:res.data.pages;
+                    } else {
+                        this.$toast({
+                            message: res.msg,
+                            duration: 2000
+                        });
+                    }
+                }, error => {
+                    this.$indicator.close();
+                    this.$toast({
+                        message: error,
+                        duration: 2000
+                    });
+                })
+            },
+
+            loadMore() {
+                if(this.pageNum == this.pages) {
+                    this.haveMore = true;
+                } else if(this.pageNum < this.pages) {
+                    this.$indicator.open();
+                    this.http.post(this.port.task.list, {
+                        'keyName': this.keyWord,
+                        'pageNum': ++this.pageNum,
+                        'uid': this.user.id,
+                        'tagId': this.form.type==-1?"":this.form.type,
+                        'state': this.form.status==-1?"":this.form.status,
+                        'startTime': this.form.start,
+                        'endTime': this.form.end,
+                        'type': this.selected=='tab1'?0:1
+                    } , 
+                    res => {
+                        this.$indicator.close();
+                        if (res.code == "ok") {
+                            this.pages = res.data.pages==0?1:res.data.pages;
+                            if(res.data.list.length != 0) {
+                                for(var i in res.data.list) {
+                                    this.taskList.push(res.data.list[i]);
+                                }
+                            }
+                        } else {
+                            this.$toast({
+                                message: res.msg,
+                                duration: 2000
+                            });
+                        }
+                    }, error => {
+                        this.$indicator.close();
+                        this.$toast({
+                            message: error,
+                            duration: 2000
+                        });
+                    })
+                }
+            },
+
+            // 标签列表
+			getLabels() {
+                this.http.post(this.port.task.label, {} , 
+                res => {
+                    if (res.code == "ok") {
+                        this.getList();
+                        var array = [{"id":-1 , "name": "全部"}];
+                        for(var i in res.data) {
+                            array.push(res.data[i]);
+                        }
+                        this.labels = array;
+                    } else {
+                        this.$toast({
+                            message: res.msg,
+                            duration: 2000
+                        });
+                    }
+                }, error => {
+                    this.$toast({
+                        message: error,
+                        duration: 2000
+                    });
+                })
+            },
+
+            // 关键词搜索
+            searchKeyword(event) {
+                if (event.keyCode == 13) {
+                    event.preventDefault();
+                    this.getList();
+                }
+            },
+
+            // 标签筛选
+            showFilter() {
+                $("._sorting-medical").removeClass("fixed-top");
+                if($("._sorting-address").hasClass("fixed-top")){
+                    $("._sorting-address").removeClass("fixed-top");
+                    $('._navbar').attr('style','position: fixed;top:0;');
+                }else{
+                    $("._sorting-address").addClass("fixed-top");
+                    $('._navbar').attr('style','position: fixed;top:0;');
+                }
+                this.isBlue = !this.isBlue;
+            },
+
+            // 标签选择
+            chooseType(type) {
+                this.type = type;
+                // this.form.type = id;
+                $(".task_type li:nth-child("+ (type+2) +")").addClass("active").siblings().removeClass("active")
+            },
+
+            // 清空标签
+            clearFilter() {
+                this.type = -1;
+                this.status = -1;
+                this.start = '';
+                this.end = '';
+                this.form = {
+                    type: -1,
+                    status: -1,
+                    start: '',
+                    end: '',
+                };
+                $(".task_type li:nth-child(1)").addClass("active").siblings().removeClass("active")
+                $(".task_status li:nth-child(1)").addClass("active").siblings().removeClass("active")
+                this.getList();
+            },
+
+            chooseStatus(status) {
+                this.status = status;
+                this.form.status = status;
+                $(".task_status li:nth-child("+ (status+2) +")").addClass("active").siblings().removeClass("active")
+            },
+
+            jumpTo(id) {
+                this.$router.push("/project/" + id);
+            },
+
+            // 跳转
+            jumpBack() {
+                this.$router.go(-1);
+            },
+            
+            register() {
+                this.$router.push("/projectRegister");
+            },
+
+            globalClick(callback) {
+                var _this = this;
+                document.getElementById('allocation').onclick = function () {
+                    _this.popupVisible = false;
+                }
+            }
+        },
+        created() {
+            this.getLabels();
+        },
+		mounted() {
+            this.globalClick();
+		}
+	}
+
+</script>
+
+<style scoped>
+    .detail {
+        background: #EFEFEF;
+    }
+
+    .detail_head {
+        background: #fff;
+        color: #333;
+        height: 0.4rem;
+    }
+
+    .detail_body {
+        margin-top: 0.4rem;
+    }
+
+    .detailBox {
+        background: #fff;
+        margin-bottom: 0.11rem;
+    }
+
+    /* 新项目头部 START */
+    .head {
+        position: fixed;
+        width: 100%;
+        box-sizing:border-box;
+        padding: 0.07rem 0.1rem 0 0.1rem;
+        background: #ffffff;
+        z-index: 105;
+    }
+
+    .headInput {
+        margin-top: 0.4rem;
+        border-bottom: 1px solid #dfdfdf;
+        z-index: 9999999;
+    }
+
+    .taskHead .tab_head {
+        width: 50%;
+        display: inline-flex;
+    }
+
+    .filter {
+        width: 20%;
+        float: right;
+        display: inline-block;
+        text-align: right;
+        padding: 0.05rem 0;
+    }
+
+    .filter img {
+        width: 0.18rem;
+        margin-right: 0.08rem;
+    }
+
+    .filter_foot {
+        margin-top: 0.2rem;
+    }
+
+    .filter_foot > .mint-button--normal {
+        width: 50%;
+        float: left;
+        border: none;
+        box-shadow: none;
+        border-radius: 0;
+        font-size: 0.13rem;
+    }
+
+    .clearFilter {
+        background: #fff;
+    }
+
+    .saveFilter {
+        background: #36DE95;
+        color: #fff;
+    }
+
+    .searchbox {
+        display: inline-block;
+        width: 80%;
+        position: relative;
+        margin-bottom: 0.05rem;
+    }
+
+    .searchbox img.searchbox_img {
+        width:0.18rem;
+        height: 0.18rem;
+        position: absolute;
+        left: 0.04rem;
+        top: 0.05rem;
+    }
+
+    .searchbox input.searchbox_text {
+        font-size: 0.14rem;
+        height: 0.28rem;
+        border-style:none;
+        border: 1px solid #eee/*#2680EB*/;
+        background: #eee;
+        border-radius: 50px;
+        box-sizing:border-box;
+        width: 100%;
+        padding: 0 0.45rem 0 0.33rem;
+    }
+
+    input.searchbox_text:focus{
+        outline: none;
+    }
+
+    .searchbox button.searchbox_button {
+        border: 0;
+        background-color: transparent;
+        outline: none;
+        height: 0.28rem;
+        font-size: 0.13rem;
+        background: #2680EB;
+        color: #fff;
+        border-radius: 50px;
+        padding: 0 0.12rem;
+        position: absolute;
+        right: -0.01rem;
+        top: 0;
+    }
+    /* 新项目头部 END */
+    /* 筛选栏 START */
+    ._sorting-address {
+        position:fixed;
+        top: -55%;
+        width: 100%;
+        height: 55%;
+        z-index: 1;
+        -webkit-transition-duration: 0.4s;
+        /* background: #fff; */
+        background: #efefef;
+        overflow: auto;
+    }
+
+    ._sorting-address .filter_title {
+        color: #999;
+        font-size: 0.13rem;
+        padding: 0.08rem 0.12rem;
+    }
+
+    ._sorting-address > ul {
+        margin: 0;
+        padding: 0;
+        overflow: auto;
+        width: 100%;
+        background: #fff;
+        box-sizing:border-box;
+        width: 100%;
+        -webkit-transition-duration: 0.4s;
+    }
+
+    ._sorting-address > ul > li {
+        display: inline-block;
+        width: 25%;
+        float: left;
+        padding: 0.08rem;
+        text-align: center;
+        box-sizing:border-box;
+        border: 1px solid #eee;
+    }
+
+    ._sorting-address > ul > li.active {
+        color: #2680EB;
+        border: 1px solid #2680EB;
+    }
+
+    .fixed-top{
+        /* top: 0.44rem; */
+        top: 0.8rem;
+    }
+
+    .fixed-top::after{
+        content: "";
+        width: 100%;
+        /* height: 100%; */
+        display: block;
+        /* background:rgba(0,0,0,0.2); */
+        background: #efefef;
+    }
+
+    .task_date {
+        background: #fff;
+    }
+
+    .task_date .mint-field {
+        display: inline-block;
+        width: 46%;
+        vertical-align: middle;
+    }
+
+    .task_date .text {
+        display: inline-block;
+        width: 5%;
+        line-height: 48px;
+        height: 48px;
+        vertical-align: middle;
+    }
+    /* 筛选栏 END */
+
+    /* 列表页 START */
+    .body {
+        -webkit-box-flex: 1;
+        -webkit-flex: 1;
+        -ms-flex: 1;
+        flex: 1;
+        width: 100%;
+        padding: 0.88rem 0 0 0;
+        height: 100%;
+        overflow-y: auto;
+        background: #EFEFEF;
+    }
+
+    .body > ul {
+        margin-top: 0;
+    }
+    
+    .body > ul li {
+        padding: 0.08rem 0.15rem;
+        background: #fff;
+        margin-bottom: 0.08rem;
+        border-bottom: 1px solid #ddd;
+    }
+
+    .body > ul li .item_span {
+        color: #2680eb;
+    }
+
+    .body > ul li .item_status {
+        float: right;
+    }
+
+    .body > ul li .text {
+        line-height: 0.23rem;
+        margin: 0.05rem  0 0 0;
+    }
+    
+    .body > ul li .item_content {
+        word-wrap:break-word;
+        color: #333;
+    }
+
+    .body > ul li .item_int {
+        color: #B5B5B5;
+        font-size: 0.12rem;
+        line-height: 0.13rem;
+    }
+
+    .body > ul li .item_users img {
+        width: 0.18rem;
+        border-radius: 50%;
+        vertical-align: middle;
+    }
+
+    .body > ul li .item_users span {
+        vertical-align: middle;
+        margin-right: 0.12rem;
+        color: #999;
+    }
+
+    .body > ul li .userInfo {
+        width: 80%;
+        display: inline-block;
+    }
+
+    .body > ul li .userInfo span {
+        font-size: 0.12rem;
+        vertical-align: middle;
+        margin-left: 0.05rem;
+    }
+
+    .body > ul li .allUsers {
+        float: right;
+        width: 20%;
+        overflow: hidden;
+        text-overflow: ellipsis;
+        white-space: nowrap;
+        color: #999;
+    }
+
+    .body > ul li .allUsers a:not(:first-child) {
+        margin-left: -0.07rem;
+    }
+
+    .noList {
+        text-align: center;
+        padding: 1.5rem 0;
+    }
+
+    .noList img {
+        width: 1.2rem;
+        height: 1.2rem;
+    }
+
+    .order {
+        height: 0.6rem;
+        line-height: 0.6rem;
+        text-align: center;
+    }
+
+    .order .line {
+        display: inline-block;
+        width: 1.2rem;
+        border-top: 1px solid #ccc ;
+        vertical-align: middle;
+    }
+
+    .order .txt {
+        color: #ccc;
+        font-size: 0.13rem;
+        vertical-align: middle;
+    }
+    /* 列表页 END */
+</style>
+<style>
+    .tab_head .mint-tab-item-label {
+        font-size: 0.13rem;
+        color: #999;
+    }
+
+    .taskHead .tab_head .mint-tab-item {
+        padding: 0.08rem 0;
+    }
+
+    .taskHead .tab_head .mint-tab-item.is-selected {
+        border: none;
+    }
+
+    .taskHead .tab_head .mint-tab-item.is-selected .mint-tab-item-label {
+        color: #333;
+        font-size: 0.16rem;
+        font-weight: 700;
+    }
+
+    .task_date .mint-field input {
+        text-align: center;
+    }
+</style>

Diff do ficheiro suprimidas por serem muito extensas
+ 1178 - 0
lss_vue_wx/src/views/project/projectDetail.vue


+ 601 - 0
lss_vue_wx/src/views/project/projectEdit.vue

@@ -0,0 +1,601 @@
+<template>
+	<div class="detail">
+        <mt-header class="detail_head" fixed title="编辑项目">
+            <router-link to="" slot="left">
+                <mt-button icon="back" v-on:click.native='jumpBack()'></mt-button>
+            </router-link>
+        </mt-header>
+        <div class="detail_body">
+            <div class="detailBox">
+                <mt-field label="项目名称" placeholder="请输入项目名称" v-model="taskForm.name"></mt-field>
+                <mt-field label="项目编码" placeholder="请输入项目编码" v-model="taskForm.code"></mt-field>
+                <mt-field label="计划时间" placeholder="请选择计划时间" type="date" v-model="taskForm.planTime"></mt-field>
+                <mt-field label="工作量" placeholder="请输入工作量" type="number" v-model="taskForm.workLoad">天</mt-field>
+                <mt-field label="接收人" id="recUser" placeholder="请选择接收人" v-on:click.native="chooseRec()" disableClear disabled v-model="taskForm.recipientName"></mt-field>
+                <mt-field label="参与人" id="parUser" placeholder="请选择参与人" v-on:click.native="choosePar()" disableClear disabled v-model="taskForm.participantsNames"></mt-field>
+                <mt-field label="项目内容" placeholder="请输入项目内容" type="textarea" rows="4" v-model="taskForm.content" class="taskContent"></mt-field>
+            </div>
+            <div class="detailBox">
+                <mt-field label="付款方" placeholder="请输入付款方" v-model="taskForm.payer"></mt-field>
+                <mt-field label="收款方" placeholder="请输入收款方" v-model="taskForm.payee"></mt-field>
+                <mt-field label="费用" placeholder="请输入费用" type="number" v-model="taskForm.fee">元</mt-field>
+            </div>
+            <div class="detailBox">
+                <div class="left_tag">所属分类</div>
+                <div class="right">
+                    <ul class="address_first">
+                        <li v-for="(item,index) in labels" :id="'btn'+item.id" v-bind:class="{'active':item.id==taskForm.tagId}" v-on:click="chooseTag(item.id)">
+                            {{item.name}}
+                            <img v-if="index > 4" v-on:click="delTag(item.id)" src="../../assets/image/del.png">
+                        </li>
+                        <li v-on:click="addNewTag()" class="add">+</li>
+                    </ul>
+                </div>
+            </div>
+            <div class="btn">
+                <mt-button class="allBtn" size="large" type="primary" v-on:click.native="submit()">确定</mt-button>
+                <mt-button class="allBtn" size="large" v-on:click.native="jumpBack()">取消</mt-button>
+            </div>
+        </div>
+        <mt-popup v-model="popupVisible" position="right" class="allocation">
+            <mt-header class="detail_head" fixed title="选择参与人">
+                <router-link to="" slot="left">
+                    <mt-button icon="back" v-on:click="toPrev()"></mt-button>
+                </router-link>
+            </mt-header>
+            <div class="detailBox">
+                <mt-checklist title="checkbox list" v-model="ids" :options="uselist" @change="checkon"></mt-checklist>
+            </div>
+        </mt-popup>
+    </div>
+</template>
+
+<script>
+    import { MessageBox } from 'mint-ui';
+	export default {
+		data() {
+			return {
+                id: this.$route.params.id,
+                user: JSON.parse(sessionStorage.getItem("user")),
+                detail: '',
+                taskForm: {
+                    id: this.$route.params.id,
+                    publishId: JSON.parse(sessionStorage.getItem("user")).id,
+                    name: '',
+                    code: '',
+                    planTime: '',
+                    workLoad: '',
+                    recipientName: '',
+                    recipientId: '',
+                    participantsNames: '',
+                    participantsIds: '',
+                    content: '',
+                    payer: '',
+                    payee: '',
+                    fee: '',
+                    tagId: 0,
+                },
+                labels: [],
+                
+                users: [],
+                uselist: [],
+                popupVisible: false,
+                ids: [],
+
+                canClick: true,
+			}
+		},
+		methods: {
+            getDetail() {
+                this.$indicator.open();
+                this.http.post(this.port.task.detail, {
+                    'id': this.id
+                } , 
+                res => {
+                    this.$indicator.close();
+                    if (res.code == "ok") {
+                        this.detail = res.data;
+                        var participantsIds = '',
+                            participantsNames = '';
+                        for(var i in res.data.participantsVOS) {
+                            participantsIds += res.data.participantsVOS[i].userId + ',';
+                            participantsNames += res.data.participantsVOS[i].userName + ',';
+                            this.ids.push(res.data.participantsVOS[i].userId)
+                        }
+                        participantsIds = participantsIds.substring(0,participantsIds.length-1);
+                        participantsNames = participantsNames.substring(0,participantsNames.length-1)
+
+                        this.taskForm = {
+                            id: this.$route.params.id,
+                            publishId: JSON.parse(sessionStorage.getItem("user")).id,
+                            name: res.data.name,
+                            code: res.data.code,
+                            planTime: res.data.planTime,
+                            workLoad: res.data.workLoad,
+                            recipientName: res.data.recipientName,
+                            recipientId: res.data.recipientId,
+                            participantsNames: participantsNames,
+                            participantsIds: participantsIds,
+                            content: res.data.content,
+                            payer: res.data.payer,
+                            payee: res.data.payee,
+                            fee: res.data.fee,
+                            tagId: res.data.tagId,
+                        }
+                        this.getLabels();
+                    } else {
+                        this.$toast({
+                            message: res.msg,
+                            duration: 2000
+                        });
+                    }
+                }, error => {
+                    this.$indicator.close();
+                    this.$toast({
+                        message: error,
+                        duration: 2000
+                    });
+                })
+            },
+
+            // 标签列表
+			getLabels() {
+                this.http.post(this.port.task.label, {} , 
+                res => {
+                    if (res.code == "ok") {
+                        this.labels = res.data;
+                    } else {
+                        this.$toast({
+                            message: res.msg,
+                            duration: 2000
+                        });
+                    }
+                }, error => {
+                    this.$toast({
+                        message: error,
+                        duration: 2000
+                    });
+                })
+            },
+
+            addNewTag() {
+                MessageBox({
+                    $type:'prompt',
+                    title:'',
+                    message:'请输入项目类型名称',
+                    closeOnClickModal:false,
+                    showCancelButton:true,
+                    inputValidator:function(v){
+                        if (v === null) {
+                           return true;
+                        }
+                        if (v != ""){
+                            return true
+                        } else {
+                            return false
+                        }
+                    },
+                    inputErrorMessage:'请输入项目类型名称',
+                    showInput:true
+                }).then(({ value, action }) => {
+                    if(value == null) {
+                        this.$toast({
+                            message: '创建失败',
+                            duration: 2000
+                        });
+                        return false;
+                    } else {
+                        this.$indicator.open();
+                        this.http.post(this.port.task.addLabel, {
+                            'name': value,
+                        } , 
+                        res => {
+                            this.$indicator.close();
+                            if (res.code == "ok") {
+                                this.getLabels();
+                            } else {
+                                this.$toast({
+                                    message: res.msg,
+                                    duration: 2000
+                                });
+                            }
+                        }, error => {
+                            this.$indicator.close();
+                            this.$toast({
+                                message: error,
+                                duration: 2000
+                            });
+                        })
+                    }
+                }).catch(() => {
+                });
+            },
+
+            chooseTag(id) {
+                $("#btn"+id).addClass("active").siblings().removeClass("active");
+                this.taskForm.tagId = id;
+            },
+
+            delTag(id) {
+                MessageBox.confirm('', { 
+                    message: '是否删除该分类?', 
+                        title: '', 
+                        confirmButtonText: '确定', 
+                        cancelButtonText: '取消' 
+                 }).then(action => { 
+                    if (action == 'confirm') {     //确认的回调
+                        this.http.post(this.port.task.delLabel, {
+                            'id': id
+                        } , 
+                        res => {
+                            if (res.code == "ok") {
+                                this.$toast({
+                                    message: "删除成功",
+                                    duration: 2000
+                                });
+                                this.getLabels();
+                            } else {
+                                this.$toast({
+                                    message: res.msg,
+                                    duration: 2000
+                                });
+                            }
+                        }, error => {
+                            this.$toast({
+                                message: error,
+                                duration: 2000
+                            });
+                        })
+                    }
+                 }).catch(err => { 
+                 });
+            },
+
+            // 人员列表
+            getUserList() {
+                this.http.post(this.port.user.list, {} , 
+                res => {
+                    if (res.code == "ok") {
+                        for(var i in res.data) {
+                            // if(res.data[i].departmentGuid == this.user.deptId) {
+                                var list = res.data[i].userVOS;
+                                for(var j in list) {
+                                    if(list[j].id != this.user.id) {
+                                        this.users.push({
+                                            id: list[j].id,
+                                            name: list[j].name,
+                                        })
+                                    }
+                                }
+                            // }
+                        }
+                    } else {
+                        this.$toast({
+                            message: res.msg,
+                            duration: 2000
+                        });
+                    }
+                }, error => {
+                    this.$toast({
+                        message: error,
+                        duration: 2000
+                    });
+                })
+            },
+
+            chooseRec() {
+                var _this = this;
+                var dataShippingSpace = this.users;
+                var pickerDiv = document.getElementById("recUser");
+                var pickerView = new PickerView({
+                    bindElem: pickerDiv, 
+                    data: dataShippingSpace, 
+                    title: "负责人", 
+                    leftText: "取消", 
+                    rightText: "确定", 
+                    rightFn: function(selectArr) {
+                        _this.taskForm.recipientId = selectArr[0].id;
+                        _this.taskForm.recipientName = selectArr[0].name;
+                    }
+                });
+            },
+
+            choosePar() {
+                this.uselist = [];
+                for(var i in this.users) {
+                    this.uselist.push({
+                        label: this.users[i].name,
+                        value: this.users[i].id,
+                    })
+                }
+                this.popupVisible = true;
+            },
+
+            checkon() {
+                this.taskForm.participantsIds = "";
+                this.taskForm.participantsNames = "";
+                for(var i in this.ids) {
+                    for(var j in this.uselist) {
+                        if(this.ids[i] == this.uselist[j].value) {
+                            this.taskForm.participantsIds += this.uselist[j].value + ',';
+                            this.taskForm.participantsNames += this.uselist[j].label + ',';
+                            break;
+                        }
+                    }
+                }
+                this.taskForm.participantsIds = this.taskForm.participantsIds.substring(0,this.taskForm.participantsIds.length-1);
+                this.taskForm.participantsNames = this.taskForm.participantsNames.substring(0,this.taskForm.participantsNames.length-1)
+            },
+
+            toPrev() {
+                this.popupVisible = false;
+            },
+
+            // 创建
+            submit() {
+                if(this.canClick) {
+                    this.canClick = false;
+                    if(this.taskForm.name == null || this.taskForm.name == "") {
+                        this.$toast({
+                            message: '请输入项目名称',
+                            duration: 2000
+                        });
+                        this.canClick = true;
+                        return false;
+                    } else if(this.taskForm.code == null || this.taskForm.code == "") {
+                        this.$toast({
+                            message: '请输入项目编码',
+                            duration: 2000
+                        });
+                        this.canClick = true;
+                        return false;
+                    } else if(this.taskForm.planTime == null || this.taskForm.planTime == "") {
+                        this.$toast({
+                            message: '请选择计划时间',
+                            duration: 2000
+                        });
+                        this.canClick = true;
+                        return false;
+                    } else if(this.taskForm.workLoad == null || this.taskForm.workLoad == "") {
+                        this.$toast({
+                            message: '请输入工作量',
+                            duration: 2000
+                        });
+                        this.canClick = true;
+                        return false;
+                    } else if(this.taskForm.content == null || this.taskForm.content == "") {
+                        this.$toast({
+                            message: '请输入工作内容',
+                            duration: 2000
+                        });
+                        this.canClick = true;
+                        return false;
+                    } else {
+                        this.$indicator.open();
+                        var _this = this , 
+                            form = {
+                                id: this.taskForm.id,
+                                publishId: this.user.id,
+                                name: this.taskForm.name,
+                                code: this.taskForm.code,
+                                planTime: this.taskForm.planTime,
+                                workLoad: this.taskForm.workLoad,
+                                content: this.taskForm.content,
+                                tagId: this.taskForm.tagId
+                            };
+                        if(this.taskForm.recipientId != '') {
+                            form.recipientId = this.taskForm.recipientId
+                        }
+                        if(this.taskForm.participantsIds != '') {
+                            form.participantsIdes = this.taskForm.participantsIds
+                        }
+                        if(this.taskForm.payer != '') {
+                            form.payer = this.taskForm.payer
+                        }
+                        if(this.taskForm.payee != '') {
+                            form.payee = this.taskForm.payee
+                        }
+                        if(this.taskForm.fee != '') {
+                            form.fee = this.taskForm.fee
+                        }
+                        this.http.post( this.port.task.add, form,
+                        res => {
+                            this.$indicator.close();
+                            if (res.code == "ok") {
+                                this.$toast({
+                                    message: '修改成功',
+                                    duration: 2000
+                                });
+                                setTimeout(function(){
+                                    _this.$router.go(-1);
+                                }, 1000);
+                            } else {
+                                this.canClick = true;
+                                this.$toast({
+                                    message: res.msg,
+                                    duration: 2000
+                                });
+                            }
+                        },
+                        error => {
+                            this.canClick = true;
+                            this.$indicator.close();
+                            this.$toast({
+                                message: error,
+                                duration: 2000
+                            });
+                        });
+                    }
+                } else {
+                    this.$toast({
+                        message: '请勿重复提交',
+                        duration: 2000
+                    });
+                }
+            },
+
+            jumpBack() {
+                this.$router.go(-1);
+            }
+        },
+        created() {
+            this.getUserList();
+            this.getDetail();
+        },
+		mounted() {
+            
+		}
+	}
+
+</script>
+
+<style scoped>
+    .detail_head {
+        background: #fff;
+        color: #333;
+        height: 0.4rem;
+    }
+
+    .detail_body {
+        margin-top: 0.4rem;
+        padding-bottom: 0.15rem;
+    }
+
+    .detail {
+        background: #EFEFEF;
+    }
+
+    .detailBox {
+        background: #fff;
+        margin-bottom: 0.11rem;
+    }
+
+    .left{
+        float:left;
+        /* margin: 0.15rem; */
+        padding: 0.15rem 0 0.1rem 0;
+    }
+
+    .left_tag {
+        padding: 0.15rem 0.15rem 0.1rem 0.15rem;
+    }
+
+    .right div{
+        line-height: 0.21rem;
+        white-space: nowrap;
+        overflow: hidden;
+        text-overflow: ellipsis;
+    }
+
+    .btn {
+        width: 80%;
+        margin: 0.2rem auto 0;
+    }
+
+    .allocation {
+        width: 100%;
+        height: 100%;
+    }
+
+    .allocation .detailBox {
+        margin-top: 0.12rem;
+    }
+
+    .address_first .current{
+        background:#eee;
+        color: #6f83ff;
+        border-left: 2px solid #6f83ff;
+    }
+
+    .right > ul {
+        margin: 0;
+        padding: 0;
+        overflow: auto;
+        -webkit-transition-duration: 0.4s;
+        box-sizing:border-box;
+        padding: 0.08rem 0.1rem;
+    }
+
+    .right > ul > li {
+        display: inline-block;
+        height: 0.2rem;
+        line-height: 0.22rem;
+        font-size: 0.14rem;
+        color: #ccc;
+        padding: 0.02rem 0.12rem;
+        margin: 0.06rem 0.07rem;
+        border: 1px solid #ccc;
+        border-radius: 50px;
+        min-width: 0.3rem;
+        text-align: center;
+        position: relative;
+    }
+
+    .right > ul > li img {
+        position: absolute;
+        top: -0.05rem;
+        right: -0.08rem;
+        width: 0.18rem;
+        height: 0.18rem;
+    }
+
+    .right > ul > li.add {
+        border: 1px solid #777;
+        color: #777;
+    }
+    
+    .right > ul > li.active {
+        border: 1px solid #2680EB;
+        color: #2680EB;
+    }
+
+    .right div img.pic {
+        width: 0.8rem;
+        height: 0.8rem;
+        margin: 0.15rem 0 0 0.3rem ;
+    }
+
+    .textColor {
+        margin-top: 0.4rem;
+        color: #8e8e8e;
+        padding: 0.12rem;
+        font-size: 0.12rem;
+    }
+
+    .example {
+        color: #8e8e8e;
+        padding: 0.02rem 0.12rem;
+        font-size: 0.12rem;
+    }
+
+    .allBtn {
+        width: 80%;
+        margin: 0.18rem auto;
+    }
+</style>
+<style>
+    .detail_head .mint-header-title {
+        font-weight: 600;
+        font-size: 0.15rem;
+    }
+
+    .detail_head .mint-button-text {
+        color: #26a2ff;
+    }
+
+    .detailBox .mint-cell {
+        padding: 0 0 0 0.02rem;
+    }
+    
+    .mint-popup.allocation  {
+        background: #efefef;
+    }
+
+    .mint-msgbox {
+        width: 70%;
+    }
+
+    .mint-cell-wrapper {
+        background-image: none;
+    }
+</style>

+ 569 - 0
lss_vue_wx/src/views/project/projectRegister.vue

@@ -0,0 +1,569 @@
+<template>
+	<div class="detail">
+        <mt-header class="detail_head" fixed title="新增项目">
+            <router-link to="" slot="left">
+                <mt-button icon="back" v-on:click.native='jumpBack()'></mt-button>
+            </router-link>
+        </mt-header>
+        <div class="detail_body">
+            <div class="detailBox">
+                <mt-field label="项目名称" placeholder="请输入项目名称" v-model="taskForm.name"></mt-field>
+                <mt-field label="项目编码" placeholder="请输入项目编码" v-model="taskForm.code"></mt-field>
+                <mt-field label="计划时间" placeholder="请选择计划时间" type="date" v-model="taskForm.planTime"></mt-field>
+                <mt-field label="工作量" placeholder="请输入工作量" type="number" v-model="taskForm.workLoad">天</mt-field>
+                <mt-field label="接收人" id="recUser" placeholder="请选择接收人" v-on:click.native="chooseRec()" disableClear disabled v-model="taskForm.recipientName"></mt-field>
+                <mt-field label="参与人" id="parUser" placeholder="请选择参与人" v-on:click.native="choosePar()" disableClear disabled v-model="taskForm.participantsNames"></mt-field>
+                <mt-field label="项目内容" placeholder="请输入项目内容" type="textarea" rows="4" v-model="taskForm.content" class="taskContent"></mt-field>
+            </div>
+            <div class="detailBox">
+                <mt-field label="付款方" placeholder="请输入付款方" v-model="taskForm.payer"></mt-field>
+                <mt-field label="收款方" placeholder="请输入收款方" v-model="taskForm.payee"></mt-field>
+                <mt-field label="费用" placeholder="请输入费用" type="number" v-model="taskForm.fee">元</mt-field>
+            </div>
+            <div class="detailBox">
+                <div class="left_tag">所属分类</div>
+                <div class="right">
+                    <ul class="address_first">
+                        <li v-for="(item,index) in labels" :id="'btn'+item.id" v-bind:class="{'active':index==0}" v-on:click="chooseTag(item.id)">
+                            {{item.name}}
+                            <img v-if="index > 4" v-on:click="delTag(item.id)" src="../../assets/image/del.png">
+                        </li>
+                        <li v-on:click="addNewTag()" class="add">+</li>
+                    </ul>
+                </div>
+            </div>
+            <div class="btn">
+                <mt-button class="allBtn" size="large" type="primary" v-on:click.native="submit()">确定</mt-button>
+                <mt-button class="allBtn" size="large" v-on:click.native="jumpBack()">取消</mt-button>
+            </div>
+        </div>
+        <mt-popup v-model="popupVisible" position="right" class="allocation">
+            <mt-header class="detail_head" fixed title="选择参与人">
+                <router-link to="" slot="left">
+                    <mt-button icon="back" v-on:click="toPrev()"></mt-button>
+                </router-link>
+            </mt-header>
+            <div class="detailBox">
+                <mt-checklist title="checkbox list" v-model="ids" :options="uselist" @change="checkon"></mt-checklist>
+            </div>
+        </mt-popup>
+    </div>
+</template>
+
+<script>
+    import { MessageBox } from 'mint-ui';
+	export default {
+		data() {
+			return {
+                user: JSON.parse(sessionStorage.getItem("user")),
+                taskForm: {
+                    publishId: JSON.parse(sessionStorage.getItem("user")).id,
+                    name: '',
+                    code: '',
+                    planTime: '',
+                    workLoad: '',
+                    recipientName: '',
+                    recipientId: '',
+                    participantsNames: '',
+                    participantsIds: '',
+                    content: '',
+                    payer: '',
+                    payee: '',
+                    fee: '',
+                    tagId: 0,
+                },
+                labels: [],
+                
+                users: [],
+                uselist: [],
+                popupVisible: false,
+                ids: [],
+
+                canClick: true,
+			}
+		},
+		methods: {
+            // 标签列表
+			getLabels() {
+                this.http.post(this.port.task.label, {} , 
+                res => {
+                    if (res.code == "ok") {
+                        this.taskForm.tagId = res.data[0].id;
+                        this.labels = res.data;
+                    } else {
+                        this.$toast({
+                            message: res.msg,
+                            duration: 2000
+                        });
+                    }
+                }, error => {
+                    this.$toast({
+                        message: error,
+                        duration: 2000
+                    });
+                })
+            },
+
+            addNewTag() {
+                MessageBox({
+                    $type:'prompt',
+                    title:'',
+                    message:'请输入项目类型名称',
+                    closeOnClickModal:false,
+                    showCancelButton:true,
+                    inputValidator:function(v){
+                        if (v === null) {
+                           return true;
+                        }
+                        if (v != ""){
+                            return true
+                        } else {
+                            return false
+                        }
+                    },
+                    inputErrorMessage:'请输入项目类型名称',
+                    showInput:true
+                }).then(({ value, action }) => {
+                    if(value == null) {
+                        this.$toast({
+                            message: '创建失败',
+                            duration: 2000
+                        });
+                        return false;
+                    } else {
+                        this.$indicator.open();
+                        this.http.post(this.port.task.addLabel, {
+                            'name': value,
+                        } , 
+                        res => {
+                            this.$indicator.close();
+                            if (res.code == "ok") {
+                                this.getLabels();
+                            } else {
+                                this.$toast({
+                                    message: res.msg,
+                                    duration: 2000
+                                });
+                            }
+                        }, error => {
+                            this.$indicator.close();
+                            this.$toast({
+                                message: error,
+                                duration: 2000
+                            });
+                        })
+                    }
+                }).catch(() => {
+                });
+            },
+
+            chooseTag(id) {
+                $("#btn"+id).addClass("active").siblings().removeClass("active");
+                this.taskForm.tagId = id;
+            },
+
+            delTag(id) {
+                MessageBox.confirm('', { 
+                    message: '是否删除该分类?', 
+                        title: '', 
+                        confirmButtonText: '确定', 
+                        cancelButtonText: '取消' 
+                 }).then(action => { 
+                    if (action == 'confirm') {     //确认的回调
+                        this.http.post(this.port.task.delLabel, {
+                            'id': id
+                        } , 
+                        res => {
+                            if (res.code == "ok") {
+                                this.$toast({
+                                    message: "删除成功",
+                                    duration: 2000
+                                });
+                                this.getLabels();
+                            } else {
+                                this.$toast({
+                                    message: res.msg,
+                                    duration: 2000
+                                });
+                            }
+                        }, error => {
+                            this.$toast({
+                                message: error,
+                                duration: 2000
+                            });
+                        })
+                    }
+                 }).catch(err => { 
+                 });
+            },
+
+            // 人员列表
+            getUserList() {
+                this.http.post(this.port.user.list, {} , 
+                res => {
+                    if (res.code == "ok") {
+                        for(var i in res.data) {
+                            // if(res.data[i].departmentGuid == this.user.deptId) {
+                                var list = res.data[i].userVOS;
+                                for(var j in list) {
+                                    if(list[j].id != this.user.id) {
+                                        this.users.push({
+                                            id: list[j].id,
+                                            name: list[j].name,
+                                        })
+                                    }
+                                }
+                            // }
+                        }
+                    } else {
+                        this.$toast({
+                            message: res.msg,
+                            duration: 2000
+                        });
+                    }
+                }, error => {
+                    this.$toast({
+                        message: error,
+                        duration: 2000
+                    });
+                })
+            },
+
+            chooseRec() {
+                var _this = this;
+                var dataShippingSpace = this.users;
+                var pickerDiv = document.getElementById("recUser");
+                var pickerView = new PickerView({
+                    bindElem: pickerDiv, 
+                    data: dataShippingSpace, 
+                    title: "负责人", 
+                    leftText: "取消", 
+                    rightText: "确定", 
+                    rightFn: function(selectArr) {
+                        _this.taskForm.recipientId = selectArr[0].id;
+                        _this.taskForm.recipientName = selectArr[0].name;
+                    }
+                });
+            },
+
+            choosePar() {
+                this.uselist = [];
+                for(var i in this.users) {
+                    this.uselist.push({
+                        label: this.users[i].name,
+                        value: this.users[i].id,
+                    })
+                }
+                this.popupVisible = true;
+            },
+
+            checkon() {
+                this.taskForm.participantsIds = "";
+                this.taskForm.participantsNames = "";
+                for(var i in this.ids) {
+                    for(var j in this.uselist) {
+                        if(this.ids[i] == this.uselist[j].value) {
+                            this.taskForm.participantsIds += this.uselist[j].value + ',';
+                            this.taskForm.participantsNames += this.uselist[j].label + ',';
+                            break;
+                        }
+                    }
+                }
+                this.taskForm.participantsIds = this.taskForm.participantsIds.substring(0,this.taskForm.participantsIds.length-1);
+                this.taskForm.participantsNames = this.taskForm.participantsNames.substring(0,this.taskForm.participantsNames.length-1)
+            },
+
+            toPrev() {
+                this.popupVisible = false;
+            },
+
+            // 创建
+            submit() {
+                if(this.canClick) {
+                    this.canClick = false;
+                    if(this.taskForm.name == null || this.taskForm.name == "") {
+                        this.$toast({
+                            message: '请输入项目名称',
+                            duration: 2000
+                        });
+                        this.canClick = true;
+                        return false;
+                    } else if(this.taskForm.code == null || this.taskForm.code == "") {
+                        this.$toast({
+                            message: '请输入项目编码',
+                            duration: 2000
+                        });
+                        this.canClick = true;
+                        return false;
+                    } else if(this.taskForm.planTime == null || this.taskForm.planTime == "") {
+                        this.$toast({
+                            message: '请选择计划时间',
+                            duration: 2000
+                        });
+                        this.canClick = true;
+                        return false;
+                    } else if(this.taskForm.workLoad == null || this.taskForm.workLoad == "") {
+                        this.$toast({
+                            message: '请输入工作量',
+                            duration: 2000
+                        });
+                        this.canClick = true;
+                        return false;
+                    } else if(this.taskForm.content == null || this.taskForm.content == "") {
+                        this.$toast({
+                            message: '请输入工作内容',
+                            duration: 2000
+                        });
+                        this.canClick = true;
+                        return false;
+                    } else {
+                        this.$indicator.open();
+                        var _this = this , 
+                            form = {
+                                publishId: this.user.id,
+                                name: this.taskForm.name,
+                                code: this.taskForm.code,
+                                planTime: this.taskForm.planTime,
+                                workLoad: this.taskForm.workLoad,
+                                content: this.taskForm.content,
+                                tagId: this.taskForm.tagId
+                            };
+                        if(this.taskForm.recipientId != '') {
+                            form.recipientId = this.taskForm.recipientId
+                        }
+                        if(this.taskForm.participantsIds != '') {
+                            form.participantsIdes = this.taskForm.participantsIds
+                        }
+                        if(this.taskForm.payer != '') {
+                            form.payer = this.taskForm.payer
+                        }
+                        if(this.taskForm.payee != '') {
+                            form.payee = this.taskForm.payee
+                        }
+                        if(this.taskForm.fee != '') {
+                            form.fee = this.taskForm.fee
+                        }
+                        this.http.post( this.port.task.add, form,
+                        res => {
+                            this.$indicator.close();
+                            if (res.code == "ok") {
+                                this.$toast({
+                                    message: '创建成功',
+                                    duration: 2000
+                                });
+                                setTimeout(function(){
+                                    // _this.$router.push({ path: '/task' });
+                                    _this.$router.go(-1);
+                                }, 1000);
+                            } else {
+                                this.canClick = true;
+                                this.$toast({
+                                    message: res.msg,
+                                    duration: 2000
+                                });
+                            }
+                        },
+                        error => {
+                            this.canClick = true;
+                            this.$indicator.close();
+                            this.$toast({
+                                message: error,
+                                duration: 2000
+                            });
+                        });
+                    }
+                } else {
+                    this.$toast({
+                        message: '请勿重复提交',
+                        duration: 2000
+                    });
+                }
+            },
+
+            jumpBack() {
+                // this.$router.push("/task");
+                this.$router.go(-1);
+            }
+        },
+        created() {
+            this.getUserList();
+            this.getLabels();
+        },
+		mounted() {
+            
+		}
+	}
+
+</script>
+
+<style scoped>
+    .detail_head {
+        background: #fff;
+        color: #333;
+        height: 0.4rem;
+    }
+
+    .detail_body {
+        margin-top: 0.4rem;
+        padding-bottom: 0.15rem;
+    }
+
+    .detail {
+        background: #EFEFEF;
+    }
+
+    .detailBox {
+        background: #fff;
+        margin-bottom: 0.11rem;
+    }
+
+    .left{
+        float:left;
+        /* margin: 0.15rem; */
+        padding: 0.15rem 0 0.1rem 0;
+    }
+
+    .left_tag {
+        padding: 0.15rem 0.15rem 0.1rem 0.15rem;
+    }
+
+    .right div{
+        line-height: 0.21rem;
+        white-space: nowrap;
+        overflow: hidden;
+        text-overflow: ellipsis;
+    }
+
+    .btn {
+        width: 80%;
+        margin: 0.2rem auto 0;
+    }
+
+    .allocation {
+        width: 100%;
+        height: 100%;
+    }
+
+    .allocation .detailBox {
+        margin-top: 0.12rem;
+    }
+
+    .address_first .current{
+        background:#eee;
+        color: #6f83ff;
+        border-left: 2px solid #6f83ff;
+    }
+
+    .right > ul {
+        margin: 0;
+        padding: 0;
+        overflow: auto;
+        -webkit-transition-duration: 0.4s;
+        box-sizing:border-box;
+        padding: 0.08rem 0.1rem;
+    }
+
+    .right > ul > li {
+        display: inline-block;
+        height: 0.2rem;
+        line-height: 0.22rem;
+        font-size: 0.14rem;
+        color: #ccc;
+        padding: 0.02rem 0.12rem;
+        margin: 0.06rem 0.07rem;
+        border: 1px solid #ccc;
+        border-radius: 50px;
+        min-width: 0.3rem;
+        text-align: center;
+        position: relative;
+    }
+
+    .right > ul > li img {
+        position: absolute;
+        top: -0.05rem;
+        right: -0.08rem;
+        width: 0.18rem;
+        height: 0.18rem;
+    }
+
+    .right > ul > li.add {
+        border: 1px solid #777;
+        color: #777;
+    }
+    
+    .right > ul > li.active {
+        border: 1px solid #2680EB;
+        color: #2680EB;
+    }
+
+    .right div img.pic {
+        width: 0.8rem;
+        height: 0.8rem;
+        margin: 0.15rem 0 0 0.3rem ;
+    }
+
+    .textColor {
+        margin-top: 0.4rem;
+        color: #8e8e8e;
+        padding: 0.12rem;
+        font-size: 0.12rem;
+    }
+
+    .example {
+        color: #8e8e8e;
+        padding: 0.02rem 0.12rem;
+        font-size: 0.12rem;
+    }
+
+    .allBtn {
+        width: 80%;
+        margin: 0.18rem auto;
+    }
+</style>
+<style>
+    body {
+        background: #efefef;
+    }
+
+    .mint-cell-value input {
+        background: #fff;
+    }
+
+    .detail_head .mint-header-title {
+        font-weight: 600;
+        font-size: 0.15rem;
+    }
+
+    .detail_head .mint-button-text {
+        color: #26a2ff;
+    }
+
+    .detailBox .mint-cell {
+        padding: 0 0 0 0.02rem;
+    }
+    
+    .mint-popup.allocation  {
+        background: #efefef;
+    }
+
+    .mint-msgbox {
+        width: 70%;
+    }
+
+    .mint-cell-wrapper {
+        background-image: none;
+    }
+
+    .taskContent .mint-cell-wrapper {
+        position: relative;
+    }
+
+    .taskContent .mint-cell-title {
+        position: absolute;
+        top: 0;
+    }
+
+    .taskContent .mint-cell-value {
+        margin-left: 105px;
+    }
+</style>

+ 12 - 12
lss_vue_wx/src/views/task/task.vue

@@ -2,7 +2,7 @@
 	<div id="allocation">
         <div class="head taskHead">
             <mt-navbar v-model="selected" class="tab_head" v-on:click.native='getList'>
-                <mt-tab-item id="tab1" :style="user.roles[0].roleDescribe == '部门领导'?'':'text-align:left;'">我的任务</mt-tab-item>
+                <mt-tab-item id="tab1" :style="user.roles[0].roleDescribe == '部门领导'?'':'text-align:left;'">我的工单</mt-tab-item>
                 <mt-tab-item id="tab2" v-if="user.roles[0].roleDescribe == '部门领导'">我发布的</mt-tab-item>
             </mt-navbar>
             <div class="filter">
@@ -18,11 +18,11 @@
             </div>
         </div>
         <section class="_sorting-address">
-            <div class="filter_title">任务分类</div>
+            <div class="filter_title">工单分类</div>
             <ul class="filter_body task_type">
                 <li v-for="(item,index) in labels" :id="'btn'+item.id" v-bind:class="{'active':index==0}" v-on:click="chooseType(index,item.id)">{{item.name}}</li>
             </ul>
-            <div class="filter_title">任务状态</div>
+            <div class="filter_title">工单状态</div>
             <ul class="filter_body task_status">
                 <li v-bind:class="{'active':status == -1}" v-on:click='chooseStatus(-1)'>全部</li>
                 <li v-on:click='chooseStatus(0)'>待派发</li>
@@ -34,7 +34,7 @@
                 <li v-on:click='chooseStatus(6)'>已延期</li>
                 <li v-on:click='chooseStatus(7)'>已失效</li>
             </ul>
-            <div class="filter_title">任务日期</div>
+            <div class="filter_title">工单日期</div>
             <div class="filter_body task_date">
                 <mt-field label="" placeholder="开始日期" type="date" v-model="form.start"></mt-field> 
                 <div class="text">至</div>
@@ -46,11 +46,11 @@
             </div>
         </section>
         <div class="body">
-            <div class="noList" v-if="list.length==0">
+            <div class="noList" v-if="taskList.length==0">
                 <img src="../../assets/image/noList.png">
             </div> 
             <ul v-else v-infinite-scroll="loadMore" infinite-scroll-disabled="loading" infinite-scroll-distance="10">
-                <li v-for="item in list" v-on:click="jumpTo(item.id)">
+                <li v-for="item in taskList" v-on:click="jumpTo(item.id)">
                     <div class="text item_name">
                         <span class="item_type item_span">({{item.tagName}})</span>
                         {{item.name}} 
@@ -116,7 +116,7 @@
                     end: '',
                 },
 
-                list: [],
+                taskList: [],
                 labels: [],
                 pageNum: 1,
                 pages: 1,
@@ -127,7 +127,7 @@
 			}
         },
 		methods: {
-            // 任务列表
+            // 工单列表
             getList() {
                 this.$indicator.open();
                 $("._sorting-address").removeClass("fixed-top");
@@ -147,7 +147,7 @@
                 res => {
                     this.$indicator.close();
                     if (res.code == "ok") {
-                        this.list = res.data.list;
+                        this.taskList = res.data.list;
                         this.pages = res.data.pages==0?1:res.data.pages;
                     } else {
                         this.$toast({
@@ -185,7 +185,7 @@
                             this.pages = res.data.pages==0?1:res.data.pages;
                             if(res.data.list.length != 0) {
                                 for(var i in res.data.list) {
-                                    this.list.push(res.data.list[i]);
+                                    this.taskList.push(res.data.list[i]);
                                 }
                             }
                         } else {
@@ -306,7 +306,7 @@
 </script>
 
 <style scoped>
-    /* 新任务头部 START */
+    /* 新工单头部 START */
     .head {
         position: fixed;
         width: 100%;
@@ -407,7 +407,7 @@
         right: -0.01rem;
         top: 0;
     }
-    /* 新任务头部 END */
+    /* 新工单头部 END */
     /* 筛选栏 START */
     ._sorting-address {
         position:fixed;

+ 19 - 17
lss_vue_wx/src/views/task/taskDetail.vue

@@ -1,15 +1,17 @@
 <template>
 	<div class="detail">
-        <mt-header class="detail_head" fixed title="任务详情">
+        <mt-header class="detail_head" fixed title="工单详情">
             <router-link to="" slot="left">
                 <mt-button icon="back" v-on:click.native='jumpBack()'></mt-button>
             </router-link>
-            <mt-button slot="right" icon="more" v-if="detail.state != 5 && detail.state != 7 && detail.publishId == user.id" v-on:click.native="showList()"></mt-button>
+            <mt-button slot="right" icon="more" v-if="(detail.state != 5 && detail.state != 7 && detail.publishId == user.id)" v-on:click.native="showList()"></mt-button>
+            <!-- <mt-button slot="right" icon="more" v-if="(detail.state != 5 && detail.state != 7 && detail.publishId == user.id) || (detail.state == 2 && detail.recipientId == user.id)" v-on:click.native="showList()"></mt-button> -->
         </mt-header>
         <div class="btn_list" v-show="popupVisible">
-            <div v-on:click="show(1)">延期</div>
-            <div v-on:click="edit()">修改</div>
-            <div v-on:click="del()">删除</div>
+            <!-- <div v-if="detail.recipientId == user.id" v-on:click="show(1)">延期</div> -->
+            <div v-if="detail.publishId == user.id" v-on:click="show(1)">延期</div>
+            <div v-if="detail.publishId == user.id" v-on:click="edit()">修改</div>
+            <div v-if="detail.publishId == user.id" v-on:click="del()">删除</div>
         </div>
         <div class="detail_body" id="allocation">
             <div class="detailBox taskInfo">
@@ -26,7 +28,7 @@
                     <span v-if="detail.state==7" class="type state">已失效</span>
                 </div>
                 <div class="department">
-                    <div class="one_dep">任务编码:{{detail.code}}</div>
+                    <div class="one_dep">工单编码:{{detail.code}}</div>
                     <div class="one_dep">计划时间:{{detail.planTime}}</div>
                     <div class="one_dep">工作量:{{detail.workLoad}}天</div>
                     <div class="one_dep">费用:{{detail.fee==null?0:detail.fee}}元</div>
@@ -54,12 +56,12 @@
             </div>
             <div class="detailBox" id="fixTop">
                 <mt-navbar v-model="selected" class="task_tab_head" v-on:click.native="changeTab">
-                    <mt-tab-item id="tab1">任务动态</mt-tab-item>
+                    <mt-tab-item id="tab1">工单动态</mt-tab-item>
                     <mt-tab-item id="tab2">审核结果</mt-tab-item>
-                    <mt-tab-item id="tab3">任务资料</mt-tab-item>
+                    <mt-tab-item id="tab3">工单资料</mt-tab-item>
                 </mt-navbar>
                 <mt-tab-container v-model="selected">
-                    <!-- 任务动态 -->
+                    <!-- 工单动态 -->
                     <mt-tab-container-item id="tab1">
                         <div class="noList" v-if="dynaList.length==0">
                             <img src="../../assets/image/noList.png">
@@ -115,7 +117,7 @@
                             </div>
                         </ul>
                     </mt-tab-container-item>
-                    <!-- 任务资料 -->
+                    <!-- 工单资料 -->
                     <mt-tab-container-item id="tab3">
                         <div v-if="detail.state == 5" class="upload" v-on:click="choosePic()">上传资料</div>
                         <input @change="fileChange($event)" type="file" id="upload_file" style="display: none"/>
@@ -143,7 +145,7 @@
 
         <mt-popup v-model="delayTimePop" position="middle" popup-transition="popup-fade">
             <div class="mint-popup-div">
-                <h4>延期任务</h4>
+                <h4>延期工单</h4>
                 <mt-field label="" class="input" placeholder="请选择延期时间" type="date" v-model="delayTime"></mt-field>
                 <div class="btns">
                     <mt-button class="btn" size="small" v-on:click.native="submit(1)">确定</mt-button>
@@ -408,10 +410,10 @@
                 this.$router.push("/taskEdit/" + this.id );
             },
 
-            // 删除任务
+            // 删除工单
             del() {
                 MessageBox.confirm('', { 
-                    message: '是否删除该任务?', 
+                    message: '是否删除该工单?', 
                         title: '', 
                         confirmButtonText: '确定', 
                         cancelButtonText: '取消' 
@@ -449,7 +451,7 @@
                 this.$router.go(-1);
             },
 
-            // 接收任务
+            // 接收工单
             receive() {
                 this.http.post(this.port.task.accept, {
                     'id': this.id,
@@ -488,7 +490,7 @@
                 }
             },
 
-            // 任务动态
+            // 工单动态
             getDynaList() {
                 this.$indicator.open();
                 this.http.post(this.port.task.dynaList, {
@@ -805,7 +807,7 @@
         margin-bottom: 0.11rem;
     }
 
-    /* 任务详情 START */
+    /* 工单详情 START */
 
     .taskInfo {
         padding: 0.08rem 0.15rem;
@@ -903,7 +905,7 @@
         padding-right: 40%;
     }
 
-    /* 任务详情 END */
+    /* 工单详情 END */
 
     /* 底部列表 START */
 

+ 8 - 8
lss_vue_wx/src/views/task/taskEdit.vue

@@ -1,19 +1,19 @@
 <template>
 	<div class="detail">
-        <mt-header class="detail_head" fixed title="编辑任务">
+        <mt-header class="detail_head" fixed title="编辑工单">
             <router-link to="" slot="left">
                 <mt-button icon="back" v-on:click.native='jumpBack()'></mt-button>
             </router-link>
         </mt-header>
         <div class="detail_body">
             <div class="detailBox">
-                <mt-field label="任务名称" placeholder="请输入任务名称" v-model="taskForm.name"></mt-field>
-                <mt-field label="任务编码" placeholder="请输入任务编码" v-model="taskForm.code"></mt-field>
+                <mt-field label="工单名称" placeholder="请输入工单名称" v-model="taskForm.name"></mt-field>
+                <mt-field label="工单编码" placeholder="请输入工单编码" v-model="taskForm.code"></mt-field>
                 <mt-field label="计划时间" placeholder="请选择计划时间" type="date" v-model="taskForm.planTime"></mt-field>
                 <mt-field label="工作量" placeholder="请输入工作量" type="number" v-model="taskForm.workLoad">天</mt-field>
                 <mt-field label="接收人" id="recUser" placeholder="请选择接收人" v-on:click.native="chooseRec()" disableClear disabled v-model="taskForm.recipientName"></mt-field>
                 <mt-field label="参与人" id="parUser" placeholder="请选择参与人" v-on:click.native="choosePar()" disableClear disabled v-model="taskForm.participantsNames"></mt-field>
-                <mt-field label="任务内容" placeholder="请输入任务内容" type="textarea" rows="4" v-model="taskForm.content" class="taskContent"></mt-field>
+                <mt-field label="工单内容" placeholder="请输入工单内容" type="textarea" rows="4" v-model="taskForm.content" class="taskContent"></mt-field>
             </div>
             <div class="detailBox">
                 <mt-field label="付款方" placeholder="请输入付款方" v-model="taskForm.payer"></mt-field>
@@ -162,7 +162,7 @@
                 MessageBox({
                     $type:'prompt',
                     title:'',
-                    message:'请输入任务类型名称',
+                    message:'请输入工单类型名称',
                     closeOnClickModal:false,
                     showCancelButton:true,
                     inputValidator:function(v){
@@ -175,7 +175,7 @@
                             return false
                         }
                     },
-                    inputErrorMessage:'请输入任务类型名称',
+                    inputErrorMessage:'请输入工单类型名称',
                     showInput:true
                 }).then(({ value, action }) => {
                     if(value == null) {
@@ -337,14 +337,14 @@
                     this.canClick = false;
                     if(this.taskForm.name == null || this.taskForm.name == "") {
                         this.$toast({
-                            message: '请输入任务名称',
+                            message: '请输入工单名称',
                             duration: 2000
                         });
                         this.canClick = true;
                         return false;
                     } else if(this.taskForm.code == null || this.taskForm.code == "") {
                         this.$toast({
-                            message: '请输入任务编码',
+                            message: '请输入工单编码',
                             duration: 2000
                         });
                         this.canClick = true;

+ 8 - 8
lss_vue_wx/src/views/task/taskRegister.vue

@@ -1,19 +1,19 @@
 <template>
 	<div class="detail">
-        <mt-header class="detail_head" fixed title="新增任务">
+        <mt-header class="detail_head" fixed title="新增工单">
             <router-link to="" slot="left">
                 <mt-button icon="back" v-on:click.native='jumpBack()'></mt-button>
             </router-link>
         </mt-header>
         <div class="detail_body">
             <div class="detailBox">
-                <mt-field label="任务名称" placeholder="请输入任务名称" v-model="taskForm.name"></mt-field>
-                <mt-field label="任务编码" placeholder="请输入任务编码" v-model="taskForm.code"></mt-field>
+                <mt-field label="工单名称" placeholder="请输入工单名称" v-model="taskForm.name"></mt-field>
+                <mt-field label="工单编码" placeholder="请输入工单编码" v-model="taskForm.code"></mt-field>
                 <mt-field label="计划时间" placeholder="请选择计划时间" type="date" v-model="taskForm.planTime"></mt-field>
                 <mt-field label="工作量" placeholder="请输入工作量" type="number" v-model="taskForm.workLoad">天</mt-field>
                 <mt-field label="接收人" id="recUser" placeholder="请选择接收人" v-on:click.native="chooseRec()" disableClear disabled v-model="taskForm.recipientName"></mt-field>
                 <mt-field label="参与人" id="parUser" placeholder="请选择参与人" v-on:click.native="choosePar()" disableClear disabled v-model="taskForm.participantsNames"></mt-field>
-                <mt-field label="任务内容" placeholder="请输入任务内容" type="textarea" rows="4" v-model="taskForm.content" class="taskContent"></mt-field>
+                <mt-field label="工单内容" placeholder="请输入工单内容" type="textarea" rows="4" v-model="taskForm.content" class="taskContent"></mt-field>
             </div>
             <div class="detailBox">
                 <mt-field label="付款方" placeholder="请输入付款方" v-model="taskForm.payer"></mt-field>
@@ -108,7 +108,7 @@
                 MessageBox({
                     $type:'prompt',
                     title:'',
-                    message:'请输入任务类型名称',
+                    message:'请输入工单类型名称',
                     closeOnClickModal:false,
                     showCancelButton:true,
                     inputValidator:function(v){
@@ -121,7 +121,7 @@
                             return false
                         }
                     },
-                    inputErrorMessage:'请输入任务类型名称',
+                    inputErrorMessage:'请输入工单类型名称',
                     showInput:true
                 }).then(({ value, action }) => {
                     if(value == null) {
@@ -283,14 +283,14 @@
                     this.canClick = false;
                     if(this.taskForm.name == null || this.taskForm.name == "") {
                         this.$toast({
-                            message: '请输入任务名称',
+                            message: '请输入工单名称',
                             duration: 2000
                         });
                         this.canClick = true;
                         return false;
                     } else if(this.taskForm.code == null || this.taskForm.code == "") {
                         this.$toast({
-                            message: '请输入任务编码',
+                            message: '请输入工单编码',
                             duration: 2000
                         });
                         this.canClick = true;