Преглед изворни кода

宅基地调查优化

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>
<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-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-col>
</van-row>
@@ -621,12 +621,6 @@ export default {
>>> .delete-button {
height: 100%;
}
>>> .van-row{
height: 100%;
}
>>> .van-col{
height: 100%;
}
>>> .van-swipe-cell__wrapper{
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;
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>
<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
:current-rate="item.zjdwcsl"
rate="item.zjdsl"
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+'%':(((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 #label>
@@ -117,13 +117,13 @@
<template #default>

<van-circle
:current-rate="item.zjdwcsl"
rate="item.zjdsl"
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+'%':(((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 #label>
@@ -148,13 +148,13 @@
</template>
<template #default>
<van-circle
:current-rate="item.zjdwcsl"
rate="item.zjdsl"
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+'%':(((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 #label>
@@ -192,6 +192,7 @@
loading: false,
finished: false,
checked:true,
zjdsl:100,
height:200,
phone:null,
activeKey:0,
@@ -283,6 +284,14 @@
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){
@@ -321,8 +330,13 @@
}
listTask(params).then((response) => {
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.loading = false;
@@ -344,8 +358,13 @@
}
listTask(params).then((response) => {
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.loading = false;
@@ -367,8 +386,13 @@
}
listTask(params).then((response) => {
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.loading = false;
@@ -473,7 +497,15 @@
this.done = response.wcs;
this.todo = response.dcs;
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) {
this.$set(this.queryParams, "rwwczt", "FINISHED");
@@ -483,7 +515,14 @@
this.total = response.wcs;
this.todo = response.dcs;
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{
this.$set(this.queryParams, "rwwczt", "UNFINISHED");
@@ -493,7 +532,14 @@
this.total = response.wcs;
this.done = response.dcs;
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-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-row>
</template>


Loading…
Откажи
Сачувај