فهرست منبع

溧水app、小程序代码

sunyadv 5 سال پیش
والد
کامیت
5c868b0438

+ 1 - 1
lss_vue/src/routes.js

@@ -43,7 +43,7 @@ let routes = [
         leaf: true,//只有一个节点
         children: [
             { path: '/assets', component: assets, name: '资产', meta: {keepAlive: true, parentPath:'/tab_assets'} },
-            { path: '/assets/:id', component: assetsDetail, name: '资产详情', meta: {keepAlive: true, parentPath:'/tab_assets'} },
+            { path: '/detail/:id', component: assetsDetail, name: '资产详情', meta: {keepAlive: true, parentPath:'/tab_assets'} },
             { path: '/assetsRegister', component: assetsRegister, name: '登记资产', meta: {keepAlive: true, parentPath:'/tab_assets'} },
             { path: '/assetsEdit/:id/', component: assetsEdit, name: '资产编辑', meta: {keepAlive: true, parentPath:'/tab_assets'} },
             { path: '/assetsNumber/:id/:divisionCode/:suffixCode', component: assetsNumber, name: '资产编号', meta: {keepAlive: true, parentPath:'/tab_assets'} },

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

@@ -191,7 +191,7 @@
             chooseTag(id,type) {
                 $("#"+id).addClass("active").siblings("a").removeClass("active");
                 $("#btn"+id).addClass("active").siblings().removeClass("active");
-                location.href = "#" + id
+                location.href = "#" + id;
                 $("._sorting-medical").removeClass("fixed-top");
                 $(".searchkey_btn img").removeClass("rotate")
                 $(".searchkey_btn img").addClass("rotate1")
@@ -205,7 +205,7 @@
             },
 
             jumpTo(id) {
-                this.$router.push("/assets/" + id);
+                this.$router.push("/detail/" + id);
             },
             
             register() {

+ 49 - 6
lss_vue/src/views/assets/assetsDetail.vue

@@ -1,8 +1,8 @@
 <template>
 	<div class="detail">
         <mt-header class="detail_head" fixed title="资产详情">
-            <router-link to="" slot="left">
-                <mt-button icon="back" v-on:click="jumpBack()"></mt-button>
+            <router-link to="/assets" slot="left">
+                <mt-button icon="back"></mt-button>
             </router-link>
             <mt-button slot="right" v-if="power.indexOf('assets_operation')>-1" v-on:click.native="jumpTo(3)">操作记录</mt-button>
         </mt-header>
@@ -42,7 +42,50 @@
                 </div>
                 <div class="assDel assDel_List">
                     <div class="one_assDel" v-for="item in delList" v-if="state == -1 || item.state == state">
-                        <mt-cell-swipe :right="edit" :class="item.username==null?'noName':''">
+                        <mt-cell-swipe v-if="power.indexOf('handle_assets') == -1 && power.indexOf('update_assets') == -1" :right="[]" :class="item.username==null?'noName':''">
+                            <div class="one_assDel_head">
+                                <span class="canJump"><span style="color:#DC143C;font-weight:600">{{item.isMaintain == 1?"[待维护] ":""}}</span>{{item.modelNo}}</span>
+                                <span v-if="item.state == 0">未用</span>
+                                <span v-if="item.state == 1">在用</span>
+                                <span v-if="item.state == 3">报废</span>
+                            </div>
+                            <div class="one_assDel_body">
+                                <span>{{item.username}} {{item.phone}}</span>
+                            </div>
+                        </mt-cell-swipe>
+
+                        <mt-cell-swipe v-if="power.indexOf('handle_assets') > -1 && power.indexOf('update_assets') == -1" :right="[
+                            { content: '处置', style: { background: 'rgba(38,162,255,0.9)', color: '#fff' }, handler: () => handle(item.id) },
+                            { content: '删除', style: { background: 'rgba(220,0,0,0.7)', color: '#fff', }, handler: () => deleteNos(item.id)}
+                            ]" :class="item.username==null?'noName':''">
+                            <div class="one_assDel_head">
+                                <span class="canJump"><span style="color:#DC143C;font-weight:600">{{item.isMaintain == 1?"[待维护] ":""}}</span>{{item.modelNo}}</span>
+                                <span v-if="item.state == 0">未用</span>
+                                <span v-if="item.state == 1">在用</span>
+                                <span v-if="item.state == 3">报废</span>
+                            </div>
+                            <div class="one_assDel_body">
+                                <span>{{item.username}} {{item.phone}}</span>
+                            </div>
+                        </mt-cell-swipe>
+
+                        <mt-cell-swipe v-if="power.indexOf('handle_assets') == -1 && power.indexOf('update_assets') > -1" :right="[
+                            { content: '处置', style: { background: 'rgba(38,162,255,0.9)', color: '#fff' }, handler: () => handle(item.id) },
+                            ]" :class="item.username==null?'noName':''">
+                            <div class="one_assDel_head">
+                                <span class="canJump"><span style="color:#DC143C;font-weight:600">{{item.isMaintain == 1?"[待维护] ":""}}</span>{{item.modelNo}}</span>
+                                <span v-if="item.state == 0">未用</span>
+                                <span v-if="item.state == 1">在用</span>
+                                <span v-if="item.state == 3">报废</span>
+                            </div>
+                            <div class="one_assDel_body">
+                                <span>{{item.username}} {{item.phone}}</span>
+                            </div>
+                        </mt-cell-swipe>
+
+                        <mt-cell-swipe v-if="power.indexOf('handle_assets') > -1 && power.indexOf('update_assets') > -1" :right="[
+                            { content: '删除', style: { background: 'rgba(220,0,0,0.7)', color: '#fff', }, handler: () => deleteNos(item.id)}
+                            ]" :class="item.username==null?'noName':''">
                             <div class="one_assDel_head">
                                 <span class="canJump"><span style="color:#DC143C;font-weight:600">{{item.isMaintain == 1?"[待维护] ":""}}</span>{{item.modelNo}}</span>
                                 <span v-if="item.state == 0">未用</span>
@@ -253,7 +296,7 @@
 
             // 跳转
             jumpBack() {
-                this.$router.go(-1);
+                this.$router.push("/assets");
             },
 
             jumpTo(type) {
@@ -277,13 +320,13 @@
                 this.edit.push({
                     content: '处置',
                     style: { background: 'rgba(38,162,255,0.9)', color: '#fff' },
-                    handler: () => handle(item.id)
+                    handler: () => this.handle(item.id)
                 })
             }
             if(this.power.indexOf('update_assets') > -1) {
                 this.edit.push({ content: '删除',
                     style: { background: 'rgba(220,0,0,0.7)', color: '#fff', },
-                    handler: () => deleteNos(item.id)
+                    handler: () => this.deleteNos(item.id)
                 })
             }
             this.getDetail();

+ 20 - 5
lss_vue/src/views/assets/assetsEdit.vue

@@ -32,7 +32,7 @@
                 <mt-field label="下次维护日期" placeholder="请选择下次维护日期" type="date" v-model="assetsForm.nextIndate"></mt-field>
             </div>
             <div class="detailBox">
-                <div class="left">所属分类</div>
+                <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==tagId}" v-on:click="chooseTag(item.id)">
@@ -384,7 +384,13 @@
 
     .left{
         float:left;
-        margin: 0.15rem;
+        /* margin: 0.15rem; */
+        padding: 0.15rem 0 0.1rem 0;
+    }
+
+    .left_tag {
+        margin: 0;
+        padding: 0.15rem 0.15rem 0.1rem 0.15rem;
     }
 
     .upload .left {
@@ -426,15 +432,24 @@
     .right > ul > li {
         display: inline-block;
         height: 0.2rem;
-        line-height: 0.2rem;
+        line-height: 0.22rem;
         font-size: 0.14rem;
         color: #ccc;
-        padding: 0 0.12rem;
-        margin: 0.06rem 0.03rem;
+        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 {

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

@@ -1,8 +1,8 @@
 <template>
 	<div class="detail">
         <mt-header class="detail_head" fixed title="资产登记">
-            <router-link to="" slot="left">
-                <mt-button icon="back" v-on:click="jumpBack()"></mt-button>
+            <router-link to="/assets" slot="left">
+                <mt-button icon="back"></mt-button>
             </router-link>
         </mt-header>
         <div class="detail_body">
@@ -32,7 +32,7 @@
                 <mt-field label="下次维护日期" placeholder="请选择下次维护日期" type="date" v-model="assetsForm.nextIndate"></mt-field>
             </div>
             <div class="detailBox">
-                <div class="left">所属分类</div>
+                <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)">
@@ -355,7 +355,8 @@
             },
 
             jumpBack() {
-                this.$router.go(-1);
+                this.$router.push("/assets");
+                // this.$router.go(-1);
             }
         },
         created() {
@@ -390,13 +391,17 @@
     }
 
     .left{
-        /* float:left; */
+        float:left;
         /* margin: 0.15rem; */
+        padding: 0.15rem 0 0.1rem 0;
+    }
+
+    .left_tag {
         padding: 0.15rem 0.15rem 0.1rem 0.15rem;
     }
 
     .upload .left {
-        /* margin: 0.1rem 0.11rem; */
+        margin: 0.1rem 0.11rem;
     }
 
     .right div{

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

@@ -21,7 +21,7 @@
             <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 v-if="power.indexOf('address_book_operation')>-1" title="通讯录" is-link v-on:click.native="jumpTo(5)"><img slot="icon" src="../../assets/image/my_com.png" width="24" height="24"></mt-cell>
+            <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>
             <mt-cell title="管理制度" is-link v-on:click.native="jumpTo(6)"><img slot="icon" src="../../assets/image/my_sys.png" width="24" height="24"></mt-cell>
         </div>
     </div>

+ 64 - 36
lss_vue/src/views/my/myGrade.vue

@@ -63,8 +63,8 @@
                     <div>
                         <div class="one_suggest_title">
                             {{item.indate}}
-                            <span v-if="item.ideaComment != null" class="areaday">已打分</span>
-                            <span v-if="power.indexOf('scoring')>-1" v-else class="edit" v-on:click="openSugPop(index)">打分</span>
+                            <span v-if="item.isEvaluated == 1" class="areaday">已打分</span>
+                            <span v-if="power.indexOf('scoring')>-1 && item.isEvaluated == 0" class="edit" v-on:click="openSugPop(index)">打分</span>
                         </div>
                         <div class="one_suggest_body">
                             {{item.content}}
@@ -144,6 +144,30 @@
                     this.$indicator.close();
                     if (res.code == "ok") {
                         this.detail = res.data;
+                        if(res.data.scoreId == null) {
+                            var from = {
+                                "uid": this.id,
+                                "scoringYearMonth": this.chooseTime,
+                                "raterId": this.user.id
+                            }
+                            this.http.post(this.port.my.addOrUpdate, from , 
+                            res => {
+                                if (res.code == "ok") {
+                                    this.getDetail();
+                                } else {
+                                    this.$toast({
+                                        message: res.msg,
+                                        duration: 2000
+                                    });
+                                }
+                            }, error => {
+                                this.popupVisible = false;
+                                this.$toast({
+                                    message: error,
+                                    duration: 2000
+                                });
+                            })
+                        }
                         this.personalScore = (res.data.personalScore==null?0:res.data.personalScore);
                         this.reason = (res.data.reason==null?'':res.data.reason);
                     } else {
@@ -194,7 +218,8 @@
                 this.$indicator.open();
                 this.http.post(this.port.my.ideaScore, {
                     'uid': this.id,
-                    'time': this.chooseTime
+                    'time': this.chooseTime,
+                    'scoreId': this.detail.scoreId
                 } , 
                 res => {
                     this.$indicator.close();
@@ -216,36 +241,39 @@
             },
 
             toPrev() {
-                var from = {};
-                if(this.detail.scoreId != null) {
-                    from = {
-                        "scoreId": this.detail.scoreId,
-                        "total": this.personalScore + (this.detail.ideaScoreSum == null?0:parseFloat(this.detail.ideaScoreSum)),
-                    }
-                } else {
-                    from = {
-                        "uid": this.id,
-                        "total": this.personalScore + (this.detail.ideaScoreSum == null?0:parseFloat(this.detail.ideaScoreSum)),
-                    }
-                }
-                this.http.post(this.port.my.addOrUpdate, from , 
-                res => {
-                    if (res.code == "ok") {
-                        this.popupVisible = false;
-                        this.getDetail();
-                    } else {
-                        this.$toast({
-                            message: res.msg,
-                            duration: 2000
-                        });
-                    }
-                }, error => {
-                    this.popupVisible = false;
-                    this.$toast({
-                        message: error,
-                        duration: 2000
-                    });
-                })
+                // var from = {};
+                // if(this.detail.scoreId != null) {
+                //     from = {
+                //         "scoreId": this.detail.scoreId,
+                //         "total": parseInt(this.personalScore) + (this.detail.ideaScoreSum == null?0:parseFloat(this.detail.ideaScoreSum)),
+                //     }
+                // } else {
+                //     from = {
+                //         "uid": this.id,
+                //         "total": parseInt(this.personalScore) + (this.detail.ideaScoreSum == null?0:parseFloat(this.detail.ideaScoreSum)),
+                //     }
+                // }
+                // this.http.post(this.port.my.addOrUpdate, from , 
+                // res => {
+                //     if (res.code == "ok") {
+                //         this.popupVisible = false;
+                //         this.getDetail();
+                //     } else {
+                //         this.$toast({
+                //             message: res.msg,
+                //             duration: 2000
+                //         });
+                //     }
+                // }, error => {
+                //     this.popupVisible = false;
+                //     this.$toast({
+                //         message: error,
+                //         duration: 2000
+                //     });
+                // })
+
+                this.popupVisible = false;
+                this.getDetail();
             },
 
             getDate() {
@@ -301,7 +329,7 @@
                                 "scoreId": this.detail.scoreId,
                                 "personalScore": this.personalScore,
                                 "ideaScore": this.detail.ideaScoreSum == null?0:this.detail.ideaScoreSum,
-                                "total": this.personalScore + (this.detail.ideaScoreSum == null?0:parseFloat(this.detail.ideaScoreSum)),
+                                "total": parseInt(this.personalScore) + (this.detail.ideaScoreSum == null?0:parseFloat(this.detail.ideaScoreSum)),
                             }
                         } else {
                             from = {
@@ -310,7 +338,7 @@
                                 "ideaScore": this.detail.ideaScoreSum == null?0:this.detail.ideaScoreSum,
                                 "scoringYearMonth": this.chooseTime,
                                 "raterId": this.user.id,
-                                "total": this.personalScore + (this.detail.ideaScoreSum == null?0:parseFloat(this.detail.ideaScoreSum)),
+                                "total": parseInt(this.personalScore) + (this.detail.ideaScoreSum == null?0:parseFloat(this.detail.ideaScoreSum)),
                             }
                         }
                         this.$indicator.open();
@@ -751,7 +779,7 @@
 
     .allocation .detail_body {
         overflow: auto;
-        height: 100%;
+        height: 88%;
     }
 
     .showMoreBtn {

+ 2 - 2
lss_vue/src/views/my/mySuggest.vue

@@ -16,7 +16,7 @@
                         <div class="one_suggest_title">
                             {{item.indate}}
                             <span v-if="item.ideaComment != null" class="areaday">已打分</span>
-                            <span v-if="power.indexOf('make_recommendations')>-1" v-else class="edit" v-on:click="openPop(index)">修改</span>
+                            <span v-if="power.indexOf('make_recommendations')>-1 && item.ideaComment == null" class="edit" v-on:click="openPop(index)">修改</span>
                         </div>
                         <div class="one_suggest_body">
                             {{item.content}}
@@ -229,7 +229,7 @@
             },
 
             closePop() {
-                if(this.content != "" && this.content != null) {
+                if(this.content != "" && this.content != null && this.chooseI == -1) {
                     var from = {};
                     if(this.chooseI == -1) {
                         from = {

+ 1 - 0
lss_wx

@@ -0,0 +1 @@
+Subproject commit 445924e69cb3b07503db7cdd4841e2bbf24abaa8