소스 검색

宅基地调查

wulanhaote
yujk 3 년 전
부모
커밋
cfab51d759
7개의 변경된 파일1773개의 추가작업 그리고 393개의 파일을 삭제
  1. +2
    -2
      src/App.vue
  2. +122
    -0
      src/components/circleProccess.vue
  3. +7
    -6
      src/utils/request.js
  4. +9
    -9
      src/views/homesteadLogin.vue
  5. +989
    -276
      src/views/homesteadSurvey/add.vue
  6. +72
    -23
      src/views/homesteadSurvey/index.vue
  7. +572
    -77
      src/views/homesteadSurvey/list.vue

+ 2
- 2
src/App.vue 파일 보기

@@ -47,10 +47,10 @@
</template>

<script>
import navFooter from "@/components/common/nav_footer";
/*import navFooter from "@/components/common/nav_footer";*/
export default {
name: "App",
components: { navFooter },
/*components: { navFooter },*/
data: () => {
return {
// direction: "",


+ 122
- 0
src/components/circleProccess.vue 파일 보기

@@ -0,0 +1,122 @@
<template>
<div class="time-graph">
<canvas :id="id" :width="120" :height="120"></canvas>
</div>
</template>

<script>

export default {
name: "circleProccess",
props:{
ids:{
type:Number
},
counts:{
type:Number,
default:0,
}
},
data() {
return {
context:null,
center_x:null,
center_y:null,
rad:null,
speed:0,
context:null,
id:this.ids,

};
},
watch: {
},
mounted() {
let cc = this.counts
if(this.counts>0&&this.counts<99){
cc+=1
}
let time_canvas = document.getElementById(this.ids);
time_canvas.width = document.documentElement.clientWidth/6;
time_canvas.height = document.documentElement.clientWidth/6;
this.drawMain(time_canvas, cc, "#85d824", "#eef7e4");
},
methods: {
drawMain(drawing_elem, percent, forecolor, bgcolor){
this.context = drawing_elem.getContext("2d");
this.center_x = drawing_elem.width / 2;
this.center_y = drawing_elem.height / 2;
this.rad = 3.1415926 * 2 / 100;
this.speed = 0;
if (this.speed <= percent) {
this.run(drawing_elem, percent, forecolor, bgcolor,this.speed,percent)
}
},
run(drawing_elem, percent, forecolor, bgcolor){
while(this.speed <= percent){
window.requestAnimationFrame(this.run);
this.context.clearRect(0, 0, drawing_elem.width, drawing_elem.height);
this.backgroundCircle(bgcolor);
this.text(this.speed,forecolor);
this.foregroundCircle(this.speed,forecolor);
this.speed += 1;
}
},
backgroundCircle(bgcolor) {
this.context.save();
this.context.translate(0, 0)
this.context.setLineDash([5, 5])
this.context.lineWidth = 5; //设置线宽
this.context.textAlign = 'center'
this.context.textBaseline = 'middle'
this.context.font = '18px arial'
this.context.strokeStyle = bgcolor;
this.context.beginPath();
var radius = this.center_x - this.context.lineWidth;
// context.lineCap = "round";
this.context.arc(this.center_x, this.center_y, radius, 0, 3.1415926 * 2, false);
this.context.stroke();
this.context.closePath();
this.context.restore();

},
foregroundCircle(n,forecolor) {
this.context.save();
this.context.strokeStyle = forecolor;
this.context.lineWidth = 5;
this.context.setLineDash([5, 5])
// context.lineCap = "round";
var radius = this.center_x - this.context.lineWidth;
this.context.beginPath();
this.context.arc(this.center_x, this.center_y, radius, -3.1415926 / 2, -3.1415926 / 2 + n * this.rad, false); //用于绘制圆弧context.arc(x坐标,y坐标,半径,起始角度,终止角度,顺时针/逆时针)
this.context.stroke();
this.context.closePath();
this.context.restore();
},
text(n,forecolor) {
this.context.save(); //save和restore可以保证样式属性只运用于该段canvas元素
this.context.fillStyle = forecolor;
var font_size = document.documentElement.clientWidth/35;
this.context.font = font_size + "px arial";
var text_width = this.context.measureText(n.toFixed(0) + "%").width;
this.context.fillText(n.toFixed(0) + "%", this.center_x - text_width / 2, this.center_y + font_size / 2.5);
this.context.restore();
}
}
}
</script>
<style scoped lang="scss">
::v-deep .time-graph {
padding-top: 20px;
display: flex;
display: -webkit-flex;
justify-content: center;
align-items: center;
}

::v-deep #time-graph-canvas {
width: 60px;
height: 60px;
}
</style>


+ 7
- 6
src/utils/request.js 파일 보기

@@ -69,14 +69,15 @@ service.interceptors.response.use(res => {
})
.then(() => {
store.dispatch('LogOut').then(() => {
console.log(window.location.href);
if(window.location.href.indexOf('lawEnforcement') != -1){
location.href = '/lawEnforcement/login';
} else if ('/authenticRight/index'.indexOf(to.path) !== -1) {
location.href = '/authenticRight/login';
} else if ('/homestead/index'.indexOf(to.path) !== -1) {
location.href = '/homestead/login';
window.location.href = '/lawEnforcement/login';
} else if (window.location.href.indexOf('authenticRight') != -1) {
window.location.href = '/authenticRight/login';
} else if (window.location.href.indexOf('homesteadSurvey')!= -1) {
window.location.href = '/homesteadLogin';
} else {
location.href = '/index';
window.location.href = '/index';
}
})
})


+ 9
- 9
src/views/homesteadLogin.vue 파일 보기

@@ -3,11 +3,11 @@
<div style="width:100%;max-width:500px;margin:0 auto;">
<div class="title">
<img width="150" height="150" style="display: block;margin-right: 10px;margin: 20px auto;" src="../assets/images/housesteadSurvey/logo.png" alt="">
<p style="text-align:center;font-size:40px;">农村宅基地测量</p>
<p style="text-align:center;font-size:40px;">农村宅基地调查</p>
</div>
<van-form>
<div style="width: 462px;
height: 110px;
<div style="width: 90%;
max-widht:462px;
border-radius: 45px;
box-shadow: 2px 10px 10px 0px rgba(125,125,125,0.16);padding: 10px 30px; margin:40px 20px; ">
<van-field
@@ -19,8 +19,8 @@
:rules="[{ required: true, message:'' }]"
/>
</div>
<div style="width: 462px;
height: 110px;
<div style="width: 90%;
max-widht:462px;
border-radius: 45px;
box-shadow: 2px 10px 10px 0px rgba(125,125,125,0.16);padding: 10px 30px; margin:40px 20px; ">
<van-field
@@ -33,8 +33,8 @@
:rules="[{ required: true, message:'' }]"
/>
</div>
<div style="width: 462px;
height: 110px;
<div style="width: 90%;
max-widht:462px;
border-radius: 45px;
box-shadow: 2px 10px 10px 0px rgba(125,125,125,0.16);padding: 10px 30px; margin:40px 20px; " class="codeDiv">
<van-field
@@ -45,7 +45,7 @@
placeholder="图形验证码"
>
<template #label>
<img style="width: 100px" :src="codeUrl" @click="getCode" />
<img style="width: 90px" :src="codeUrl" @click="getCode" />
</template>
</van-field>
</div>
@@ -340,6 +340,6 @@ export default {
</script>
<style scoped lang="scss">
/deep/ .codeDiv .van-field .van-cell__title{
width: 3.2em!important;
width: 3.0em!important;
}
</style>

+ 989
- 276
src/views/homesteadSurvey/add.vue
파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
파일 보기


+ 72
- 23
src/views/homesteadSurvey/index.vue 파일 보기

@@ -33,7 +33,7 @@
@click="active=1"
/>
</van-badge>
<p>全部任务</p>
<p id="basetext">全部任务</p>
</van-col>
<van-col span="8">
<van-badge :content="done">
@@ -64,56 +64,64 @@
</div>

<div v-if="active==1" style="height:calc( 100vh - 350px);overflow-y:auto;">
<van-cell v-for="(item,index) in totalList" :key="index" :title="item.deptName" size="small" @click.native="setCookies(item)" :to="{name:'homesteadList'}"style="border-radius: 16px;
<van-pull-refresh v-model="isLoadingtask" @refresh="onRefreshtask">
<van-cell v-for="(item,index) in totalList" :key="item.id" :title="item.deptName" size="small" @click.native="setCookies(item)" :to="{name:'homesteadList'}"style="border-radius: 16px;
box-shadow: 0px 3px 5px 0px rgba(0,0,0,0.16); width:calc( 100% - 40px);margin:20px">
<template #default>
<CircleProccess :ids="index" :counts="item.reportZjdzdNumber!=0?(item.confirmZjdzdNumber/item.reportZjdzdNumber)*100:0"></CircleProccess>
</template>
<template #label>
开始时间:{{item.planBeginTime}} 结束时间:{{item.planEndTime}}
开始时间:{{item.planBeginTime}}<br/> 结束时间:{{item.planEndTime}}
</template>
<template #icon>
<van-icon name="clock" color="#22b7f2" style="margin-top:10px;margin-right:10px;"/>
</template>
</van-cell>
</van-pull-refresh>
</div>
<div v-if="active==2" style="height:calc( 100vh - 350px);overflow-y:auto;">
<van-cell v-for=" (item,index) in doneList" :key="index" :title="item.deptName" size="small" :to="{name:'homesteadList',params:{item:item}}" style="border-radius: 16px;
<van-pull-refresh v-model="isLoadingtask" @refresh="onRefreshtask">
<van-cell v-for=" (item,index) in doneList" :key="item.id" :title="item.deptName" size="small" :to="{name:'homesteadList',params:{item:item}}" style="border-radius: 16px;
box-shadow: 0px 3px 5px 0px rgba(0,0,0,0.16); width:calc( 100% - 40px);margin:20px">
<template #default>
<CircleProccess :ids="index" :counts="item.reportZjdzdNumber!=0?(item.confirmZjdzdNumber/item.reportZjdzdNumber)*100:0"></CircleProccess>
</template>
<template #label>
开始时间:{{item.planBeginTime}}
开始时间:{{item.planBeginTime}}<br/> 结束时间:{{item.planEndTime}}
</template>
<template #icon>
<van-icon name="clock" color="#22b7f2" style="margin-top:10px;margin-right:10px;"/>
</template>
</van-cell>
</van-pull-refresh>
</div>
<div v-if="active==3" style="height:calc( 100vh - 350px);overflow-y:auto;">
<van-cell v-for=" (item,index) in todoList" :key="index" :title="item.deptName" size="small" :to="{name:'homesteadList',params:{item:item}}" style="border-radius: 16px;
<van-pull-refresh v-model="isLoadingtask" @refresh="onRefreshtask">
<van-cell v-for=" (item,index) in todoList" :key="item.id" :title="item.deptName" size="small" :to="{name:'homesteadList',params:{item:item}}" style="border-radius: 16px;
box-shadow: 0px 3px 5px 0px rgba(0,0,0,0.16); width:calc( 100% - 40px);margin:20px">
<template #default>
</template>
<CircleProccess :ids="index" :counts="item.reportZjdzdNumber!=0?(item.confirmZjdzdNumber/item.reportZjdzdNumber)*100:0"></CircleProccess>
</template>
<template #label>
开始时间:{{item.planBeginTime}}
开始时间:{{item.planBeginTime}}<br/> 结束时间:{{item.planEndTime}}
</template>
<template #icon>
<van-icon name="clock" color="#22b7f2" style="margin-top:10px;margin-right:10px;"/>
</template>
</van-cell>
</van-pull-refresh>
</div>

</div>
</template>

<script>
import {addTask, complete, delTask, exportTask, getTask, listTask, publish, updateTask} from "@/api/homesteadSurvey/index";
import {getInfo} from "../../api/login";
// import circleProccess from "@/components/circleProccess.vue";
import CircleProccess from "@/components/circleProccess.vue";
export default {
name: "homesteadIndex",
components: {
// circleProccess
CircleProccess
},
data() {
return {
@@ -133,23 +141,15 @@
todoList:[],
// 查询参数
queryParams: {
// 分页
pageNum: 1,
pageSize: 10,
// 查询排序
orderByColumn: "id",
isAsc: "desc",
deptId: null,
deptName: null,
title: null,
createUserId: null,
updateUserId: null,
taskStatus: null,
taskPublishStatus:"PUBLISHED",

},
nickName:"",
text:0,
isLoadingtask:false,
countqb:0,
countyhc:0,
countwhc:0,
};
},
mounted(){
@@ -170,6 +170,55 @@
this.getList();
},
methods: {
onRefreshtask(){
this.isLoadingtask = false;
let _this = this
if(this.active==1){
let params = {
"taskStatus": "FINISHED",
"taskPublishStatus":"PUBLISHED",
"pageNum": this.countyhc+1,
"pageSize":10,
}
listTask(params).then((response) => {
if(response.rows.length>0&&this.doneList.length<response.total){
response.rows.map(res => {
this.doneList.unshift(res)
})
this.countyhc++
}
});
}else if(this.active==2){
let params = {
"taskStatus": "UNFINISHED",
"taskPublishStatus":"PUBLISHED",
"pageNum": this.countwhc+1,
"pageSize":10,
}
listTask(params).then((response) => {
if(response.rows.lenght>0&&this.todoList.length<response.total){
response.rows.map(res => {
this.todoList.unshift(res)
})
this.countwhc++
}
});
}else{
let params = {
"taskPublishStatus":"PUBLISHED",
"pageNum": this.countqb+1,
"pageSize":10,
}
listTask(params).then((response) => {
if(response.rows.length>0&&this.totalList.length<response.total){
response.rows.map(res => {
this.totalList.unshift(res)
})
this.countqb++
}
});
}
},
setCookies(item){
this.$cookies.set("item",JSON.stringify(item));
},


+ 572
- 77
src/views/homesteadSurvey/list.vue
파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
파일 보기


불러오는 중...
취소
저장