Переглянути джерело

宅基地调查优化

rongxin_prod
Xyq123* 1 рік тому
джерело
коміт
3e12af2c24
3 змінених файлів з 69 додано та 29 видалено
  1. +3
    -9
      src/views/homesteadSurvey/add4.vue
  2. +65
    -19
      src/views/homesteadSurvey/index.vue
  3. +1
    -1
      src/views/homesteadSurvey/list.vue

+ 3
- 9
src/views/homesteadSurvey/add4.vue Переглянути файл

@@ -81,11 +81,11 @@
</div> </div>
</div> </div>
<template #right> <template #right>
<van-row>
<van-col>
<van-row style="height: 100%">
<van-col style="height: 100%">
<van-button square type="info" class="delete-button" style="position: relative;" @click="showUploadList(item.id)"><van-icon style="bottom: -3px;" name="photo-o" size=".4rem" color="#FFFFFF"/>附件</van-button> <van-button square type="info" class="delete-button" style="position: relative;" @click="showUploadList(item.id)"><van-icon style="bottom: -3px;" name="photo-o" size=".4rem" color="#FFFFFF"/>附件</van-button>
</van-col> </van-col>
<van-col>
<van-col style="height: 100%">
<van-button v-show="permission == 'true'" square type="danger" class="delete-button" @click="deletefsss(item)"><img width="10px" src="../../assets/images/sunVillage_info/list_icon_7.png" alt="">删除</van-button> <van-button v-show="permission == 'true'" square type="danger" class="delete-button" @click="deletefsss(item)"><img width="10px" src="../../assets/images/sunVillage_info/list_icon_7.png" alt="">删除</van-button>
</van-col> </van-col>
</van-row> </van-row>
@@ -621,12 +621,6 @@ export default {
>>> .delete-button { >>> .delete-button {
height: 100%; height: 100%;
} }
>>> .van-row{
height: 100%;
}
>>> .van-col{
height: 100%;
}
>>> .van-swipe-cell__wrapper{ >>> .van-swipe-cell__wrapper{
margin-right:-3px; margin-right:-3px;
} }


+ 65
- 19
src/views/homesteadSurvey/index.vue Переглянути файл

@@ -80,17 +80,17 @@
<van-cell v-for="(item,index) in totalList" :key="item.id" size="small" @click.native="setCookies(item)" style="border-radius: 16px; <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;"> box-shadow: 0px 3px 5px 0px rgba(0,0,0,0.16); width:95%;margin:0px auto 20px;height: 110px;">
<template #title> <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>
<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>
<template #default> <template #default>
<van-circle <van-circle
:current-rate="item.zjdwcsl"
rate="item.zjdsl"
v-model="item.zjdslz"
:rate="chooseNum(item)"
:stroke-width="100" :stroke-width="100"
:speed="100" :speed="100"
size="70%" size="70%"
layer-color="#ebedf0" layer-color="#ebedf0"
:text="item.zjdwcsl!=0?(item.zjdwcsl == item.zjdsl?100+'%':(((item.zjdwcsl/item.zjdsl)*100).toFixed(2))+'%'):0+'%'"
:text="item.zjdwcsl!=0?(item.zjdwcsl == item.zjdsl?100+'%':( Math.round(((item.zjdwcsl/item.zjdsl)*100)))+'%'):0+'%'"
/> />
</template> </template>
<template #label> <template #label>
@@ -117,13 +117,13 @@
<template #default> <template #default>


<van-circle <van-circle
:current-rate="item.zjdwcsl"
rate="item.zjdsl"
v-model="item.zjdslz"
:rate="chooseNum(item)"
:stroke-width="100" :stroke-width="100"
:speed="100" :speed="100"
size="70%" size="70%"
layer-color="#ebedf0" layer-color="#ebedf0"
:text="item.zjdwcsl!=0?(item.zjdwcsl == item.zjdsl?100+'%':(((item.zjdwcsl/item.zjdsl)*100).toFixed(2))+'%'):0+'%'"
:text="item.zjdwcsl!=0?(item.zjdwcsl == item.zjdsl?100+'%':( Math.round(((item.zjdwcsl/item.zjdsl)*100)))+'%'):0+'%'"
/> />
</template> </template>
<template #label> <template #label>
@@ -148,13 +148,13 @@
</template> </template>
<template #default> <template #default>
<van-circle <van-circle
:current-rate="item.zjdwcsl"
rate="item.zjdsl"
v-model="item.zjdslz"
:rate="chooseNum(item)"
:stroke-width="100" :stroke-width="100"
:speed="100" :speed="100"
size="70%" size="70%"
layer-color="#ebedf0" layer-color="#ebedf0"
:text="item.zjdwcsl!=0?(item.zjdwcsl == item.zjdsl?100+'%':(((item.zjdwcsl/item.zjdsl)*100).toFixed(2))+'%'):0+'%'"
:text="item.zjdwcsl!=0?(item.zjdwcsl == item.zjdsl?100+'%':( Math.round(((item.zjdwcsl/item.zjdsl)*100)))+'%'):0+'%'"
/> />
</template> </template>
<template #label> <template #label>
@@ -192,6 +192,7 @@
loading: false, loading: false,
finished: false, finished: false,
checked:true, checked:true,
zjdsl:100,
height:200, height:200,
phone:null, phone:null,
activeKey:0, activeKey:0,
@@ -283,6 +284,14 @@
this.$router.push({name:'homesteadList'}) 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){ chooseColor(item){
let a = ((item.zjdwcsl/item.zjdsl)*100).toFixed() let a = ((item.zjdwcsl/item.zjdsl)*100).toFixed()
if(a === "NaN" || a < 50){ if(a === "NaN" || a < 50){
@@ -321,8 +330,13 @@
} }
listTask(params).then((response) => { listTask(params).then((response) => {
if(response.rows.length>0&&this.totalList.length<response.total){ if(response.rows.length>0&&this.totalList.length<response.total){
response.rows.map(res => {
this.totalList.push(res)
this.totalList = response.rows.map(function(item) {
if(item.zjdwcsl === 0){
item.zjdslz = 0;
}else{
item.zjdslz = 100;
}
return item;
}) })
this.countyhc++ this.countyhc++
this.loading = false; this.loading = false;
@@ -344,8 +358,13 @@
} }
listTask(params).then((response) => { listTask(params).then((response) => {
if(response.rows.lenght>0&&this.doneList.length<response.total){ if(response.rows.lenght>0&&this.doneList.length<response.total){
response.rows.map(res => {
this.doneList.push(res)
this.doneList = response.rows.map(function(item){
if(item.zjdwcsl === 0){
item.zjdslz = 0;
}else{
item.zjdslz = 100;
}
return item;
}) })
this.countwhc++ this.countwhc++
this.loading = false; this.loading = false;
@@ -367,8 +386,13 @@
} }
listTask(params).then((response) => { listTask(params).then((response) => {
if(response.rows.length>0&&this.todoList.length<response.total){ if(response.rows.length>0&&this.todoList.length<response.total){
response.rows.map(res => {
this.todoList.push(res)
this.todoList = response.rows.map(function(item){
if(item.zjdwcsl === 0){
item.zjdslz = 0;
}else{
item.zjdslz = 100;
}
return item;
}) })
this.countqb++ this.countqb++
this.loading = false; this.loading = false;
@@ -473,7 +497,15 @@
this.done = response.wcs; this.done = response.wcs;
this.todo = response.dcs; this.todo = response.dcs;
this.total = response.tableDataInfo.total; this.total = response.tableDataInfo.total;
this.totalList = response.tableDataInfo.rows;
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) { }else if(this.active==2) {
this.$set(this.queryParams, "rwwczt", "FINISHED"); this.$set(this.queryParams, "rwwczt", "FINISHED");
@@ -483,7 +515,14 @@
this.total = response.wcs; this.total = response.wcs;
this.todo = response.dcs; this.todo = response.dcs;
this.done = response.tableDataInfo.total; this.done = response.tableDataInfo.total;
this.doneList = response.tableDataInfo.rows;
this.doneList = response.tableDataInfo.rows.map(function(item){
if(item.zjdwcsl === 0){
item.zjdslz = 0;
}else{
item.zjdslz = 100;
}
return item;
})
}); });
}else{ }else{
this.$set(this.queryParams, "rwwczt", "UNFINISHED"); this.$set(this.queryParams, "rwwczt", "UNFINISHED");
@@ -493,7 +532,14 @@
this.total = response.wcs; this.total = response.wcs;
this.done = response.dcs; this.done = response.dcs;
this.todo = response.tableDataInfo.total; this.todo = response.tableDataInfo.total;
this.todoList = response.tableDataInfo.rows;
this.todoList = response.tableDataInfo.rows.map(function(item){
if(item.zjdwcsl === 0){
item.zjdslz = 0;
}else{
item.zjdslz = 100;
}
return item;
})
}); });
} }




+ 1
- 1
src/views/homesteadSurvey/list.vue Переглянути файл

@@ -104,7 +104,7 @@
<van-button square type="info" class="delete-button" @click="showUploadList(item.id)"><van-icon name="photo-o" size=".4rem" style="bottom: -3px;" color="#000000" @click="showUploadList(item.id)"/> 附件</van-button> <van-button square type="info" class="delete-button" @click="showUploadList(item.id)"><van-icon name="photo-o" size=".4rem" style="bottom: -3px;" color="#000000" @click="showUploadList(item.id)"/> 附件</van-button>
</van-col> </van-col>
<van-col> <van-col>
<van-button square type="danger" class="delete-button" @click="showUploadList(item.id)"><img width="10px" src="../../assets/images/sunVillage_info/list_icon_7.png" alt=""> 删除</van-button>
<van-button square type="danger" class="delete-button" @click="deleteZjd(item.id)"><img width="10px" src="../../assets/images/sunVillage_info/list_icon_7.png" alt=""> 删除</van-button>
</van-col> </van-col>
</van-row> </van-row>
</template> </template>


Завантаження…
Відмінити
Зберегти