| @@ -69,36 +69,41 @@ | |||
| <van-checkbox v-model="checked" @change="checkChange">仅我</van-checkbox> | |||
| </div> | |||
| </div> | |||
| <div v-if="active==1" style="height:calc( 100vh - 350px);margin-top: 14%;overflow-y:auto;"> | |||
| <van-list | |||
| v-model:loading="loading" | |||
| :finished="finished" | |||
| finished-text="没有更多了" | |||
| :immediate-check="false" | |||
| @load="onRefreshtask" | |||
| > | |||
| <van-cell v-for="(item,index) in totalList" :key="item.id" size="small" @click.native="setCookies(item)" style="border-radius: 16px; | |||
| <div style="margin-top: 50px;"> | |||
| <van-sticky style="margin-top: 20px;"> | |||
| <van-search v-model="rwmcValue" placeholder="请输入任务名称" @search="onSearch" ></van-search> | |||
| </van-sticky> | |||
| </div> | |||
| <div v-if="active==1" style="height:calc( 100vh - 350px);margin-top: 5%;overflow-y:auto;"> | |||
| <van-list | |||
| v-model:loading="loading" | |||
| :finished="finished" | |||
| finished-text="没有更多了" | |||
| :immediate-check="false" | |||
| @load="onRefreshtask" | |||
| > | |||
| <van-cell v-for="(item,index) in totalList" :key="item.id" size="small" @click.native="setCookies(item)" style="border-radius: 16px; | |||
| box-shadow: 0px 3px 5px 0px rgba(0,0,0,0.16); width:95%;margin:0px auto 20px;height: 110px;"> | |||
| <template #title> | |||
| <div>{{item.rwmc}} <span :style="{'color':chooseColor(item),'background':chooseColor2(item),'display':'inline-block','padding':'4px 2px','line-height':'1','border-radius':'5px'}">{{item.zjdwcsl}}/{{item.zjdsl}}</span></div> | |||
| </template> | |||
| <template #default> | |||
| <van-circle | |||
| v-model="item.zjdslz" | |||
| :rate="chooseNum(item)" | |||
| :stroke-width="100" | |||
| :speed="100" | |||
| size="70%" | |||
| layer-color="#ebedf0" | |||
| :text="item.zjdwcsl!=0?(item.zjdwcsl == item.zjdsl?100+'%':( Math.round(((item.zjdwcsl/item.zjdsl)*100)))+'%'):0+'%'" | |||
| /> | |||
| </template> | |||
| <template #label> | |||
| <p style="display: flex;align-items: center;margin-top: 5px;"><van-icon name="clock" color="#22b7f2" style="margin-right:5px;"/>{{item.jhkssj}}~{{item.jhjssj}}</p> | |||
| <p style="display: flex;align-items: center;margin-top: 5px;"><van-icon name="manager" color="#22b7f2" style="margin-right:5px;"/>{{item.rwzxr}}</p> | |||
| </template> | |||
| </van-cell> | |||
| </van-list> | |||
| <template #title> | |||
| <div>{{item.rwmc}} <span :style="{'color':chooseColor(item),'background':chooseColor2(item),'display':'inline-block','padding':'4px 2px','line-height':'1','border-radius':'5px'}">{{item.zjdwcsl}}/{{item.zjdsl}}</span></div> | |||
| </template> | |||
| <template #default> | |||
| <van-circle | |||
| v-model="item.zjdslz" | |||
| :rate="chooseNum(item)" | |||
| :stroke-width="100" | |||
| :speed="100" | |||
| size="70%" | |||
| layer-color="#ebedf0" | |||
| :text="item.zjdwcsl!=0?(item.zjdwcsl == item.zjdsl?100+'%':( Math.round(((item.zjdwcsl/item.zjdsl)*100)))+'%'):0+'%'" | |||
| /> | |||
| </template> | |||
| <template #label> | |||
| <p style="display: flex;align-items: center;margin-top: 5px;"><van-icon name="clock" color="#22b7f2" style="margin-right:5px;"/>{{item.jhkssj}}~{{item.jhjssj}}</p> | |||
| <p style="display: flex;align-items: center;margin-top: 5px;"><van-icon name="manager" color="#22b7f2" style="margin-right:5px;"/>{{item.rwzxr}}</p> | |||
| </template> | |||
| </van-cell> | |||
| </van-list> | |||
| </div> | |||
| <div v-if="active==2" style="height:calc( 100vh - 350px);margin-top: 14%;overflow-y:auto;"> | |||
| @@ -109,28 +114,28 @@ | |||
| :immediate-check="false" | |||
| @load="onRefreshtask" | |||
| > | |||
| <van-cell v-for="(item,index) in doneList" :key="item.id" size="small" @click.native="setCookies(item)" style="border-radius: 16px; | |||
| <van-cell v-for="(item,index) in doneList" :key="item.id" size="small" @click.native="setCookies(item)" style="border-radius: 16px; | |||
| box-shadow: 0px 3px 5px 0px rgba(0,0,0,0.16); width:95%;margin:0px auto 20px;height: 110px;"> | |||
| <template #title> | |||
| <div>{{item.rwmc}} <span :style="{'color':chooseColor(item),'background':chooseColor2(item),'display':'inline-block','padding':'4px 2px','line-height':'1','border-radius':'5px'}">{{item.zjdwcsl}}/{{item.zjdsl}}</span></div> | |||
| </template> | |||
| <template #default> | |||
| <template #title> | |||
| <div>{{item.rwmc}} <span :style="{'color':chooseColor(item),'background':chooseColor2(item),'display':'inline-block','padding':'4px 2px','line-height':'1','border-radius':'5px'}">{{item.zjdwcsl}}/{{item.zjdsl}}</span></div> | |||
| </template> | |||
| <template #default> | |||
| <van-circle | |||
| v-model="item.zjdslz" | |||
| :rate="chooseNum(item)" | |||
| :stroke-width="100" | |||
| :speed="100" | |||
| size="70%" | |||
| layer-color="#ebedf0" | |||
| :text="item.zjdwcsl!=0?(item.zjdwcsl == item.zjdsl?100+'%':( Math.round(((item.zjdwcsl/item.zjdsl)*100)))+'%'):0+'%'" | |||
| /> | |||
| </template> | |||
| <template #label> | |||
| <p style="display: flex;align-items: center;margin-top: 5px;"><van-icon name="clock" color="#22b7f2" style="margin-right:5px;"/>{{item.jhkssj}}~{{item.jhjssj}}</p> | |||
| <p style="display: flex;align-items: center;margin-top: 5px;"><van-icon name="manager" color="#22b7f2" style="margin-right:5px;"/>{{item.rwzxr}}</p> | |||
| </template> | |||
| </van-cell> | |||
| <van-circle | |||
| v-model="item.zjdslz" | |||
| :rate="chooseNum(item)" | |||
| :stroke-width="100" | |||
| :speed="100" | |||
| size="70%" | |||
| layer-color="#ebedf0" | |||
| :text="item.zjdwcsl!=0?(item.zjdwcsl == item.zjdsl?100+'%':( Math.round(((item.zjdwcsl/item.zjdsl)*100)))+'%'):0+'%'" | |||
| /> | |||
| </template> | |||
| <template #label> | |||
| <p style="display: flex;align-items: center;margin-top: 5px;"><van-icon name="clock" color="#22b7f2" style="margin-right:5px;"/>{{item.jhkssj}}~{{item.jhjssj}}</p> | |||
| <p style="display: flex;align-items: center;margin-top: 5px;"><van-icon name="manager" color="#22b7f2" style="margin-right:5px;"/>{{item.rwzxr}}</p> | |||
| </template> | |||
| </van-cell> | |||
| </van-list> | |||
| </div> | |||
| <div v-if="active==3" style="height:calc( 100vh - 350px);margin-top: 14%;overflow-y:auto;"> | |||
| @@ -141,27 +146,27 @@ | |||
| :immediate-check="false" | |||
| @load="onRefreshtask" | |||
| > | |||
| <van-cell v-for="(item,index) in todoList" :key="item.id" size="small" @click.native="setCookies(item)" style="border-radius: 16px; | |||
| <van-cell v-for="(item,index) in todoList" :key="item.id" size="small" @click.native="setCookies(item)" style="border-radius: 16px; | |||
| box-shadow: 0px 3px 5px 0px rgba(0,0,0,0.16); width:95%;margin:0px auto 20px;height: 110px;"> | |||
| <template #title> | |||
| <div>{{item.rwmc}} <span :style="{'color':chooseColor(item),'background':chooseColor2(item),'display':'inline-block','padding':'4px 2px','line-height':'1','border-radius':'5px'}">{{item.zjdwcsl}}/{{item.zjdsl}}</span></div> | |||
| </template> | |||
| <template #default> | |||
| <van-circle | |||
| v-model="item.zjdslz" | |||
| :rate="chooseNum(item)" | |||
| :stroke-width="100" | |||
| :speed="100" | |||
| size="70%" | |||
| layer-color="#ebedf0" | |||
| :text="item.zjdwcsl!=0?(item.zjdwcsl == item.zjdsl?100+'%':( Math.round(((item.zjdwcsl/item.zjdsl)*100)))+'%'):0+'%'" | |||
| /> | |||
| </template> | |||
| <template #label> | |||
| <p style="display: flex;align-items: center;margin-top: 5px;"><van-icon name="clock" color="#22b7f2" style="margin-right:5px;"/>{{item.jhkssj}}~{{item.jhjssj}}</p> | |||
| <p style="display: flex;align-items: center;margin-top: 5px;"><van-icon name="manager" color="#22b7f2" style="margin-right:5px;"/>{{item.rwzxr}}</p> | |||
| </template> | |||
| </van-cell> | |||
| <template #title> | |||
| <div>{{item.rwmc}} <span :style="{'color':chooseColor(item),'background':chooseColor2(item),'display':'inline-block','padding':'4px 2px','line-height':'1','border-radius':'5px'}">{{item.zjdwcsl}}/{{item.zjdsl}}</span></div> | |||
| </template> | |||
| <template #default> | |||
| <van-circle | |||
| v-model="item.zjdslz" | |||
| :rate="chooseNum(item)" | |||
| :stroke-width="100" | |||
| :speed="100" | |||
| size="70%" | |||
| layer-color="#ebedf0" | |||
| :text="item.zjdwcsl!=0?(item.zjdwcsl == item.zjdsl?100+'%':( Math.round(((item.zjdwcsl/item.zjdsl)*100)))+'%'):0+'%'" | |||
| /> | |||
| </template> | |||
| <template #label> | |||
| <p style="display: flex;align-items: center;margin-top: 5px;"><van-icon name="clock" color="#22b7f2" style="margin-right:5px;"/>{{item.jhkssj}}~{{item.jhjssj}}</p> | |||
| <p style="display: flex;align-items: center;margin-top: 5px;"><van-icon name="manager" color="#22b7f2" style="margin-right:5px;"/>{{item.rwzxr}}</p> | |||
| </template> | |||
| </van-cell> | |||
| </van-list> | |||
| </div> | |||
| @@ -177,379 +182,391 @@ | |||
| import {Dialog} from "vant"; | |||
| import {sysConfig} from "../../api/homesteadSurvey"; | |||
| import axios from "axios"; | |||
| export default { | |||
| name: "homesteadIndex", | |||
| components: { | |||
| CircleProccess | |||
| }, | |||
| data() { | |||
| return { | |||
| currentRate1:0, | |||
| currentRate2:0, | |||
| currentRate3:0, | |||
| active: 1, | |||
| show: false, | |||
| loading: false, | |||
| finished: false, | |||
| checked:true, | |||
| zjdsl:100, | |||
| height:200, | |||
| phone:null, | |||
| activeKey:0, | |||
| currentRate: 0, | |||
| deptName:"全部乡镇", | |||
| showDropList:false, | |||
| total:0, | |||
| totalList:[], | |||
| xzList:[], | |||
| done:0, | |||
| doneList:[], | |||
| todo:0, | |||
| todoList:[], | |||
| gradientColor:{ | |||
| }, | |||
| // 查询参数 | |||
| queryParams: { | |||
| rwwczt: null, | |||
| rwfbzt:"PUBLISHED", | |||
| rwzxr:null | |||
| }, | |||
| nickName:"", | |||
| text:0, | |||
| isLoadingtask:false, | |||
| countqb:1, | |||
| countyhc:1, | |||
| countwhc:1, | |||
| export default { | |||
| name: "homesteadIndex", | |||
| components: { | |||
| CircleProccess | |||
| }, | |||
| data() { | |||
| return { | |||
| currentRate1:0, | |||
| currentRate2:0, | |||
| currentRate3:0, | |||
| active: 1, | |||
| show: false, | |||
| loading: false, | |||
| finished: false, | |||
| checked:true, | |||
| rwmcValue:"", | |||
| zjdsl:100, | |||
| height:200, | |||
| phone:null, | |||
| activeKey:0, | |||
| currentRate: 0, | |||
| deptName:"全部乡镇", | |||
| showDropList:false, | |||
| total:0, | |||
| totalList:[], | |||
| xzList:[], | |||
| done:0, | |||
| doneList:[], | |||
| todo:0, | |||
| todoList:[], | |||
| gradientColor:{ | |||
| //当前用户级别 | |||
| businessLevel:1, | |||
| // 字典列表json | |||
| dictTypeList:null, | |||
| }; | |||
| }, | |||
| created(){ | |||
| if(this.checked){ | |||
| setTimeout(() => { | |||
| let userId = this.$store.state.user.userId; | |||
| console.info(userId); | |||
| this.nickName = this.$store.state.user.nickName; | |||
| this.$set(this.queryParams, "rwzxr", userId); | |||
| this.$set(this.queryParams, "params", {deptId:100}); | |||
| this.getList(); | |||
| },1000) | |||
| }else{ | |||
| }, | |||
| // 查询参数 | |||
| queryParams: { | |||
| rwwczt: null, | |||
| rwfbzt:"PUBLISHED", | |||
| rwzxr:null | |||
| }, | |||
| nickName:"", | |||
| text:0, | |||
| isLoadingtask:false, | |||
| countqb:1, | |||
| countyhc:1, | |||
| countwhc:1, | |||
| this.$set(this.queryParams, "rwzxr", null); | |||
| //当前用户级别 | |||
| businessLevel:1, | |||
| // 字典列表json | |||
| dictTypeList:null, | |||
| }; | |||
| }, | |||
| created(){ | |||
| if(this.checked){ | |||
| setTimeout(() => { | |||
| let userId = this.$store.state.user.userId; | |||
| console.info(userId); | |||
| this.nickName = this.$store.state.user.nickName; | |||
| this.$set(this.queryParams, "rwzxr", userId); | |||
| this.$set(this.queryParams, "params", {deptId:100}); | |||
| this.getList(); | |||
| } | |||
| getTownInfo(100).then(response => { | |||
| this.xzList = response.data | |||
| let qbxz = {deptId:100,deptName:"全部乡镇"} | |||
| this.xzList.unshift(qbxz); | |||
| }) | |||
| },1000) | |||
| }else{ | |||
| axios.get('../static/dictyType.json').then(res => { | |||
| this.dictTypeList = res.data | |||
| }) | |||
| this.$set(this.queryParams, "rwzxr", null); | |||
| this.getList(); | |||
| } | |||
| getTownInfo(100).then(response => { | |||
| this.xzList = response.data | |||
| let qbxz = {deptId:100,deptName:"全部乡镇"} | |||
| this.xzList.unshift(qbxz); | |||
| }) | |||
| }, | |||
| mounted(){ | |||
| axios.get('../static/dictyType.json').then(res => { | |||
| this.dictTypeList = res.data | |||
| }) | |||
| // 监听屏幕方向 | |||
| let self = this; | |||
| window.addEventListener( | |||
| "onorientationchange" in window ? "orientationchange" : "resize", | |||
| function() { | |||
| if (window.orientation === 90 || window.orientation === -90) { | |||
| // 横屏 | |||
| } | |||
| }, | |||
| false | |||
| ); | |||
| if(this.$cookies.get("url")==null||this.$cookies.get("url")==""){ | |||
| this.getBaseUrl() | |||
| } | |||
| }, | |||
| methods: { | |||
| getBaseUrl(){ | |||
| let params={ | |||
| configKey: "system.attachment.url"} | |||
| sysConfig(params).then(response => { | |||
| this.$cookies.set("url",response.rows[0].configValue) | |||
| }) | |||
| }, | |||
| qiehuan(deptId){ | |||
| changeDept(deptId).then(response => { | |||
| this.$router.push({name:'homesteadList'}) | |||
| }); | |||
| }, | |||
| chooseNum(item){ | |||
| let a = ((item.zjdwcsl/item.zjdsl)*100); | |||
| if(a === "NaN"){ | |||
| return a = 0 | |||
| }else{ | |||
| return a = Math.round(a); | |||
| }, | |||
| mounted(){ | |||
| // 监听屏幕方向 | |||
| let self = this; | |||
| window.addEventListener( | |||
| "onorientationchange" in window ? "orientationchange" : "resize", | |||
| function() { | |||
| if (window.orientation === 90 || window.orientation === -90) { | |||
| // 横屏 | |||
| } | |||
| }, | |||
| chooseColor(item){ | |||
| let a = ((item.zjdwcsl/item.zjdsl)*100).toFixed() | |||
| if(a === "NaN" || a < 50){ | |||
| return '#FA5353' | |||
| }else if(a < 100){ | |||
| return '#22B7F2' | |||
| }else{ | |||
| return '#85d824' | |||
| } | |||
| return '#FA5353' | |||
| }, | |||
| chooseColor2(item){ | |||
| let a = ((item.zjdwcsl/item.zjdsl)*100).toFixed() | |||
| if(a === "NaN" || a < 50){ | |||
| return 'rgba(250,83,83,0.22)' | |||
| }else if(a < 100){ | |||
| return 'rgba(34,183,242,0.22)' | |||
| }else{ | |||
| return 'rgba(122,201,67,0.22)' | |||
| } | |||
| false | |||
| ); | |||
| if(this.$cookies.get("url")==null||this.$cookies.get("url")==""){ | |||
| this.getBaseUrl() | |||
| } | |||
| }, | |||
| methods: { | |||
| onSearch(){ | |||
| // this.finished = false; | |||
| // this.loading = false; | |||
| // this.totalList = [] | |||
| // this.doneList = []; | |||
| // this.todoList = []; | |||
| this.$set(this.queryParams, "rwmc", this.rwmcValue); | |||
| this.checkBadge(); | |||
| }, | |||
| getBaseUrl(){ | |||
| let params={ | |||
| configKey: "system.attachment.url"} | |||
| sysConfig(params).then(response => { | |||
| this.$cookies.set("url",response.rows[0].configValue) | |||
| }) | |||
| }, | |||
| qiehuan(deptId){ | |||
| changeDept(deptId).then(response => { | |||
| this.$router.push({name:'homesteadList'}) | |||
| }); | |||
| }, | |||
| chooseNum(item){ | |||
| let a = ((item.zjdwcsl/item.zjdsl)*100); | |||
| if(a === "NaN"){ | |||
| return a = 0 | |||
| }else{ | |||
| return a = Math.round(a); | |||
| } | |||
| }, | |||
| chooseColor(item){ | |||
| let a = ((item.zjdwcsl/item.zjdsl)*100).toFixed() | |||
| if(a === "NaN" || a < 50){ | |||
| return '#FA5353' | |||
| }, | |||
| onRefreshtask(){ | |||
| this.isLoadingtask = false; | |||
| let _this = this | |||
| if(this.active==1 && this.loading ){ | |||
| let params = { | |||
| "rwfbzt":"PUBLISHED", | |||
| "params":this.queryParams.params, | |||
| "parentId":this.queryParams.parentId, | |||
| "pageNum": this.countyhc+1, | |||
| "pageSize":4, | |||
| } | |||
| if(this.queryParams.rwzxr != null){ | |||
| params.rwzxr = this.queryParams.rwzxr; | |||
| } | |||
| listTask(params).then((response) => { | |||
| if(response.rows.length>0&&this.totalList.length<response.total){ | |||
| response.rows.map(function(item) { | |||
| if(item.zjdwcsl === 0){ | |||
| item.zjdslz = 0; | |||
| }else{ | |||
| item.zjdslz = 100; | |||
| } | |||
| _this.totalList.push(item) | |||
| }) | |||
| this.countyhc++ | |||
| this.loading = false; | |||
| }else{ | |||
| this.finished = true; | |||
| } | |||
| }); | |||
| }else if(this.active==2 && this.loading){ | |||
| let params = { | |||
| "rwwczt": "PUBLISHED", | |||
| "rwfbzt":"PUBLISHED", | |||
| "params":this.queryParams.params, | |||
| "parentId":this.queryParams.parentId, | |||
| "pageNum": this.countwhc+1, | |||
| "pageSize":4, | |||
| } | |||
| if(this.queryParams.rwzxr != null){ | |||
| params.rwzxr = this.queryParams.rwzxr; | |||
| } | |||
| listTask(params).then((response) => { | |||
| if(response.rows.lenght>0&&this.doneList.length<response.total){ | |||
| response.rows.map(function(item){ | |||
| if(item.zjdwcsl === 0){ | |||
| item.zjdslz = 0; | |||
| }else{ | |||
| item.zjdslz = 100; | |||
| } | |||
| _this.doneList.push(item) | |||
| }) | |||
| this.countwhc++ | |||
| this.loading = false; | |||
| }else{ | |||
| this.finished = true; | |||
| } | |||
| }); | |||
| }else if(this.active==3 && this.loading){ | |||
| let params = { | |||
| "rwwczt": "UNFINISHED", | |||
| "rwfbzt":"PUBLISHED", | |||
| "params":this.queryParams.params, | |||
| "parentId":this.queryParams.parentId, | |||
| "pageNum": this.countqb+1, | |||
| "pageSize":4, | |||
| } | |||
| if(this.queryParams.rwzxr != null){ | |||
| params.rwzxr = this.queryParams.rwzxr; | |||
| } | |||
| listTask(params).then((response) => { | |||
| if(response.rows.length>0&&this.todoList.length<response.total){ | |||
| response.rows.map(function(item){ | |||
| if(item.zjdwcsl === 0){ | |||
| item.zjdslz = 0; | |||
| }else{ | |||
| item.zjdslz = 100; | |||
| } | |||
| _this.todoList.push(item); | |||
| }) | |||
| this.countqb++ | |||
| this.loading = false; | |||
| }else{ | |||
| this.finished = true | |||
| } | |||
| }); | |||
| }else if(a < 100){ | |||
| return '#22B7F2' | |||
| }else{ | |||
| return '#85d824' | |||
| } | |||
| return '#FA5353' | |||
| }, | |||
| chooseColor2(item){ | |||
| let a = ((item.zjdwcsl/item.zjdsl)*100).toFixed() | |||
| if(a === "NaN" || a < 50){ | |||
| return 'rgba(250,83,83,0.22)' | |||
| }else if(a < 100){ | |||
| return 'rgba(34,183,242,0.22)' | |||
| }else{ | |||
| return 'rgba(122,201,67,0.22)' | |||
| } | |||
| return '#FA5353' | |||
| }, | |||
| onRefreshtask(){ | |||
| this.isLoadingtask = false; | |||
| let _this = this | |||
| if(this.active==1 && this.loading ){ | |||
| let params = { | |||
| "rwfbzt":"PUBLISHED", | |||
| "params":this.queryParams.params, | |||
| "rwmc":this.rwmcValue, | |||
| "parentId":this.queryParams.parentId, | |||
| "pageNum": this.countyhc+1, | |||
| "pageSize":4, | |||
| } | |||
| }, | |||
| checkChange(e){ | |||
| if(e){ | |||
| let userId = this.$store.state.user.userId; | |||
| this.$set(this.queryParams, "rwzxr", userId); | |||
| this.getList(); | |||
| }else{ | |||
| this.$set(this.queryParams, "rwzxr", null); | |||
| this.getList(); | |||
| if(this.queryParams.rwzxr != null){ | |||
| params.rwzxr = this.queryParams.rwzxr; | |||
| } | |||
| }, | |||
| setCookies(item){ | |||
| /* if(this.$cookies.get("upload")==null||this.$cookies.get("upload")==0){ | |||
| Dialog.confirm({ | |||
| title: '提示', | |||
| message: '当前未选择批量上传,可能会由于网络原因上传图片缓慢,是否继续?', | |||
| }) | |||
| .then(() => { | |||
| // on confirm | |||
| this.$router.push({name:'homesteadList'}) | |||
| this.$cookies.set("item",JSON.stringify(item)); | |||
| listTask(params).then((response) => { | |||
| if(response.rows.length>0&&this.totalList.length<response.total){ | |||
| response.rows.map(function(item) { | |||
| if(item.zjdwcsl === 0){ | |||
| item.zjdslz = 0; | |||
| }else{ | |||
| item.zjdslz = 100; | |||
| } | |||
| _this.totalList.push(item) | |||
| }) | |||
| .catch(() => { | |||
| // on cancel | |||
| }); | |||
| }else{ | |||
| this.$router.push({name:'homesteadList'}) | |||
| this.$cookies.set("item",JSON.stringify(item)); | |||
| }*/ | |||
| let userId = this.$store.state.user.userId; | |||
| // let businessLevel = this.$store.getters.businessLevel; | |||
| let status = false; | |||
| if(item.rwzxrIds != null && item.rwzxrIds !== ""){ | |||
| let ids = item.rwzxrIds.split(","); | |||
| ids.forEach(function(id){ | |||
| if(userId === parseInt(id)){ | |||
| status = true; | |||
| } | |||
| }); | |||
| } | |||
| if(status){ | |||
| localStorage.setItem("surveyItem",JSON.stringify(item)); | |||
| this.qiehuan(item.deptId); | |||
| }else{ | |||
| this.$dialog.alert({ | |||
| message: "没有该任务的调查权限!", | |||
| }); | |||
| } | |||
| }, | |||
| queryAllxz(){ | |||
| if (this.showDropList) { | |||
| this.showDropList = false; // div显示会阻挡下边的选择框和输入框,showDropList控制下拉框是否显示 | |||
| } else { | |||
| this.showDropList = true; | |||
| this.countyhc++ | |||
| this.loading = false; | |||
| }else{ | |||
| this.finished = true; | |||
| } | |||
| }); | |||
| }else if(this.active==2 && this.loading){ | |||
| let params = { | |||
| "rwwczt": "PUBLISHED", | |||
| "rwfbzt":"PUBLISHED", | |||
| "rwmc":this.rwmcValue, | |||
| "params":this.queryParams.params, | |||
| "parentId":this.queryParams.parentId, | |||
| "pageNum": this.countwhc+1, | |||
| "pageSize":4, | |||
| } | |||
| }, | |||
| xzChange(val){ | |||
| this.deptName = val.deptName; | |||
| this.showDropList = false; | |||
| this.$set(this.queryParams, "deptId", null); | |||
| if(val.deptId != 100){ | |||
| this.$set(this.queryParams, "parentId", val.deptId); | |||
| this.$set(this.queryParams, "params", {deptId:null}); | |||
| }else{ | |||
| this.$set(this.queryParams, "parentId", null); | |||
| this.$set(this.queryParams, "params", {deptId:val.deptId}); | |||
| if(this.queryParams.rwzxr != null){ | |||
| params.rwzxr = this.queryParams.rwzxr; | |||
| } | |||
| this.getList(); | |||
| }, | |||
| checkBadge(){ | |||
| this.finished = false; | |||
| this.loading = false; | |||
| this.totalList = [] | |||
| this.doneList = []; | |||
| this.todoList = []; | |||
| this.getList(); | |||
| }, | |||
| getList() { | |||
| this.totalList = [] | |||
| this.doneList = []; | |||
| this.todoList = []; | |||
| this.countqb = 1; | |||
| this.countyhc = 1; | |||
| this.countwhc = 1; | |||
| this.finished = false; | |||
| this.loading = false; | |||
| if(this.active==1) { | |||
| this.$set(this.queryParams, "rwfbzt", "PUBLISHED"); | |||
| this.$set(this.queryParams, "rwwczt", null); | |||
| this.$set(this.queryParams, "pageNum", this.countyhc); | |||
| this.$set(this.queryParams, "pageSize", 4); | |||
| mobileList(this.queryParams).then(response => { | |||
| this.done = response.wcs; | |||
| this.todo = response.dcs; | |||
| this.total = response.tableDataInfo.total; | |||
| this.totalList = response.tableDataInfo.rows.map(function(item){ | |||
| if(item.zjdwcsl === 0){ | |||
| item.zjdslz = 0; | |||
| }else{ | |||
| item.zjdslz = 100; | |||
| } | |||
| return item; | |||
| }); | |||
| }); | |||
| }else if(this.active==2) { | |||
| this.$set(this.queryParams, "rwwczt", "FINISHED"); | |||
| this.$set(this.queryParams, "rwfbzt", "PUBLISHED"); | |||
| this.$set(this.queryParams, "pageNum", this.countwhc); | |||
| mobileList(this.queryParams).then(response => { | |||
| this.total = response.wcs; | |||
| this.todo = response.dcs; | |||
| this.done = response.tableDataInfo.total; | |||
| this.doneList = response.tableDataInfo.rows.map(function(item){ | |||
| listTask(params).then((response) => { | |||
| if(response.rows.lenght>0&&this.doneList.length<response.total){ | |||
| response.rows.map(function(item){ | |||
| if(item.zjdwcsl === 0){ | |||
| item.zjdslz = 0; | |||
| }else{ | |||
| item.zjdslz = 100; | |||
| } | |||
| return item; | |||
| _this.doneList.push(item) | |||
| }) | |||
| }); | |||
| }else{ | |||
| this.$set(this.queryParams, "rwwczt", "UNFINISHED"); | |||
| this.$set(this.queryParams, "rwfbzt", "PUBLISHED"); | |||
| this.$set(this.queryParams, "pageNum", this.countqb); | |||
| mobileList(this.queryParams).then(response => { | |||
| this.total = response.wcs; | |||
| this.done = response.dcs; | |||
| this.todo = response.tableDataInfo.total; | |||
| this.todoList = response.tableDataInfo.rows.map(function(item){ | |||
| this.countwhc++ | |||
| this.loading = false; | |||
| }else{ | |||
| this.finished = true; | |||
| } | |||
| }); | |||
| }else if(this.active==3 && this.loading){ | |||
| let params = { | |||
| "rwwczt": "UNFINISHED", | |||
| "rwfbzt":"PUBLISHED", | |||
| "rwmc":this.rwmcValue, | |||
| "params":this.queryParams.params, | |||
| "parentId":this.queryParams.parentId, | |||
| "pageNum": this.countqb+1, | |||
| "pageSize":4, | |||
| } | |||
| if(this.queryParams.rwzxr != null){ | |||
| params.rwzxr = this.queryParams.rwzxr; | |||
| } | |||
| listTask(params).then((response) => { | |||
| if(response.rows.length>0&&this.todoList.length<response.total){ | |||
| response.rows.map(function(item){ | |||
| if(item.zjdwcsl === 0){ | |||
| item.zjdslz = 0; | |||
| }else{ | |||
| item.zjdslz = 100; | |||
| } | |||
| return item; | |||
| _this.todoList.push(item); | |||
| }) | |||
| this.countqb++ | |||
| this.loading = false; | |||
| }else{ | |||
| this.finished = true | |||
| } | |||
| }); | |||
| } | |||
| }, | |||
| checkChange(e){ | |||
| if(e){ | |||
| let userId = this.$store.state.user.userId; | |||
| this.$set(this.queryParams, "rwzxr", userId); | |||
| this.getList(); | |||
| }else{ | |||
| this.$set(this.queryParams, "rwzxr", null); | |||
| this.getList(); | |||
| } | |||
| }, | |||
| setCookies(item){ | |||
| /* if(this.$cookies.get("upload")==null||this.$cookies.get("upload")==0){ | |||
| Dialog.confirm({ | |||
| title: '提示', | |||
| message: '当前未选择批量上传,可能会由于网络原因上传图片缓慢,是否继续?', | |||
| }) | |||
| .then(() => { | |||
| // on confirm | |||
| this.$router.push({name:'homesteadList'}) | |||
| this.$cookies.set("item",JSON.stringify(item)); | |||
| }) | |||
| .catch(() => { | |||
| // on cancel | |||
| }); | |||
| }else{ | |||
| this.$router.push({name:'homesteadList'}) | |||
| this.$cookies.set("item",JSON.stringify(item)); | |||
| }*/ | |||
| let userId = this.$store.state.user.userId; | |||
| // let businessLevel = this.$store.getters.businessLevel; | |||
| let status = false; | |||
| if(item.rwzxrIds != null && item.rwzxrIds !== ""){ | |||
| let ids = item.rwzxrIds.split(","); | |||
| ids.forEach(function(id){ | |||
| if(userId === parseInt(id)){ | |||
| status = true; | |||
| } | |||
| }); | |||
| } | |||
| if(status){ | |||
| localStorage.setItem("surveyItem",JSON.stringify(item)); | |||
| this.qiehuan(item.deptId); | |||
| }else{ | |||
| this.$dialog.alert({ | |||
| message: "没有该任务的调查权限!", | |||
| }); | |||
| } | |||
| }, | |||
| queryAllxz(){ | |||
| if (this.showDropList) { | |||
| this.showDropList = false; // div显示会阻挡下边的选择框和输入框,showDropList控制下拉框是否显示 | |||
| } else { | |||
| this.showDropList = true; | |||
| } | |||
| }, | |||
| xzChange(val){ | |||
| this.deptName = val.deptName; | |||
| this.showDropList = false; | |||
| this.$set(this.queryParams, "deptId", null); | |||
| if(val.deptId != 100){ | |||
| this.$set(this.queryParams, "parentId", val.deptId); | |||
| this.$set(this.queryParams, "params", {deptId:null}); | |||
| }else{ | |||
| this.$set(this.queryParams, "parentId", null); | |||
| this.$set(this.queryParams, "params", {deptId:val.deptId}); | |||
| } | |||
| this.getList(); | |||
| }, | |||
| checkBadge(){ | |||
| // this.finished = false; | |||
| // this.loading = false; | |||
| // this.totalList = [] | |||
| // this.doneList = []; | |||
| // this.todoList = []; | |||
| this.getList(); | |||
| }, | |||
| getList() { | |||
| this.totalList = [] | |||
| this.doneList = []; | |||
| this.todoList = []; | |||
| this.countqb = 1; | |||
| this.countyhc = 1; | |||
| this.countwhc = 1; | |||
| this.finished = false; | |||
| this.loading = false; | |||
| if(this.active==1) { | |||
| this.$set(this.queryParams, "rwfbzt", "PUBLISHED"); | |||
| this.$set(this.queryParams, "rwwczt", null); | |||
| this.$set(this.queryParams, "pageNum", this.countyhc); | |||
| this.$set(this.queryParams, "pageSize", 4); | |||
| mobileList(this.queryParams).then(response => { | |||
| this.done = response.wcs; | |||
| this.todo = response.dcs; | |||
| this.total = response.tableDataInfo.total; | |||
| this.totalList = response.tableDataInfo.rows.map(function(item){ | |||
| if(item.zjdwcsl === 0){ | |||
| item.zjdslz = 0; | |||
| }else{ | |||
| item.zjdslz = 100; | |||
| } | |||
| return item; | |||
| }); | |||
| } | |||
| }); | |||
| }else if(this.active==2) { | |||
| this.$set(this.queryParams, "rwwczt", "FINISHED"); | |||
| this.$set(this.queryParams, "rwfbzt", "PUBLISHED"); | |||
| this.$set(this.queryParams, "pageNum", this.countwhc); | |||
| mobileList(this.queryParams).then(response => { | |||
| this.total = response.wcs; | |||
| this.todo = response.dcs; | |||
| this.done = response.tableDataInfo.total; | |||
| this.doneList = response.tableDataInfo.rows.map(function(item){ | |||
| if(item.zjdwcsl === 0){ | |||
| item.zjdslz = 0; | |||
| }else{ | |||
| item.zjdslz = 100; | |||
| } | |||
| return item; | |||
| }) | |||
| }); | |||
| }else{ | |||
| this.$set(this.queryParams, "rwwczt", "UNFINISHED"); | |||
| this.$set(this.queryParams, "rwfbzt", "PUBLISHED"); | |||
| this.$set(this.queryParams, "pageNum", this.countqb); | |||
| mobileList(this.queryParams).then(response => { | |||
| this.total = response.wcs; | |||
| this.done = response.dcs; | |||
| this.todo = response.tableDataInfo.total; | |||
| this.todoList = response.tableDataInfo.rows.map(function(item){ | |||
| if(item.zjdwcsl === 0){ | |||
| item.zjdslz = 0; | |||
| }else{ | |||
| item.zjdslz = 100; | |||
| } | |||
| return item; | |||
| }) | |||
| }); | |||
| } | |||
| }, | |||
| gotoLink(){ | |||
| this.$router.push('/homesteadSurvey/settle') | |||
| }, | |||
| }, | |||
| } | |||
| gotoLink(){ | |||
| this.$router.push('/homesteadSurvey/settle') | |||
| }, | |||
| }, | |||
| } | |||
| </script> | |||
| <style scoped> | |||