Explorar el Código

TASK 44066 在资产管理模块下增加“三清台账”功能

rongxin_dev
yangfuda hace 1 semana
padre
commit
09e70dc7b0
Se han modificado 7 ficheros con 1891 adiciones y 0 borrados
  1. +98
    -0
      src/api/sunVillage_info/three.js
  2. BIN
      src/assets/images/sunVillage_info/index_block_29.png
  3. +36
    -0
      src/router/index.js
  4. +484
    -0
      src/views/sunVillage_info/three.vue
  5. +417
    -0
      src/views/sunVillage_info/threeAdd.vue
  6. +392
    -0
      src/views/sunVillage_info/threeDetail.vue
  7. +464
    -0
      src/views/sunVillage_info/threeEdit.vue

+ 98
- 0
src/api/sunVillage_info/three.js Ver fichero

@@ -0,0 +1,98 @@
import request from '@/utils/request'

// 查询三清台账列表
export function listThree(query) {
return request({
url: '/asset/three/list',
method: 'get',
params: query
})
}

// 统计查询三清台账列表
export function statisticThree(query) {
return request({
url: '/asset/three/statistic',
method: 'get',
params: query
})
}

// 导出三清台账
export function exportThree(query) {
return request({
url: '/asset/three/export',
method: 'get',
params: query
})
}

// 查询三清台账详细
export function getThree(id) {
return request({
url: '/asset/three/get/' + id,
method: 'get',
params: arguments[1] || {}
})
}

// 新增三清台账
export function addThree(data) {
return request({
url: '/asset/three/add',
method: 'post',
data: data
})
}

// 修改三清台账
export function updateThree(data) {
return request({
url: '/asset/three/edit',
method: 'post',
data: data
})
}

// 删除三清台账
export function delThree(id) {
return request({
url: '/asset/three/remove/' + id,
method: 'get'
})
}

// 清空空间字段
export function clearThreeGeom(id) {
return request({
url: '/asset/three/clear/' + id,
method: 'get',
})
}
//上传全局方法附件
export function commonAttach(data) {
return request({
url: '/common/attach',
method: 'post',
header: { "Content-Type": 'application/x-www-form-urlencoded' },
data: data
})
}
//查询已上传附件
export const attachmentList = (data) => {
return request({
url: '/system/attachment/query',
method: 'get',
params: data
})
}
//删除已上传附件
export function systemAttachment(ids) {
if (ids != undefined) {
return request({
url: '/system/attachment/remove/' + ids,
method: 'get'
})
}
}


BIN
src/assets/images/sunVillage_info/index_block_29.png Ver fichero

Antes Después
Anchura: 65  |  Altura: 58  |  Tamaño: 3.6 KiB

+ 36
- 0
src/router/index.js Ver fichero

@@ -4552,6 +4552,42 @@ export const constantRoutes = [
},
component: (resolve) => require(['@/views/sunVillage_info/resourceDetail'], resolve)
},
{ ////阳光村务(新)-- 三清台账管理
path: '/sunVillage_info/three',
name: 'sunVillageInfoListThree',
meta: {
title: '三清台账管理',
hidden: true,
},
component: (resolve) => require(['@/views/sunVillage_info/three'], resolve)
},
{ ////阳光村务(新)-- 新增三清台账
path: '/sunVillage_info/threeAdd',
name: 'sunVillageInfoListThreeAdd',
meta: {
title: '新增三清台账',
hidden: true,
},
component: (resolve) => require(['@/views/sunVillage_info/threeAdd'], resolve)
},
{ ////阳光村务(新)-- 修改三清台账
path: '/sunVillage_info/threeEdit',
name: 'sunVillageInfoListThreeEdit',
meta: {
title: '修改三清台账',
hidden: true,
},
component: (resolve) => require(['@/views/sunVillage_info/threeEdit'], resolve)
},
{ ////阳光村务(新)-- 三清台账详情
path: '/sunVillage_info/threeDetail',
name: 'sunVillageInfoListThreeDetail',
meta: {
title: '三清台账详情',
hidden: true,
},
component: (resolve) => require(['@/views/sunVillage_info/threeDetail'], resolve)
},
{ ////阳光村务(新)-- 修改资源
path: '/sunVillage_info/detailed_liabilities',
name: 'sunVillageInfoDetailedLiabilities',


+ 484
- 0
src/views/sunVillage_info/three.vue Ver fichero

@@ -0,0 +1,484 @@
<template>
<div class="home_wrapper">
<div class="header_main">
三清台账管理
<div class="return_btn" @click="onClickLeft"></div>
<div class="add_btn" @click="goAdd"></div>
</div>
<div class="search_info">
<div class="search_block">
<i class="icon"></i>
<input type="text" class="ipt" v-model="queryParams.zcmc" placeholder="请输入资产名称搜索">
<div @click="getSearchList">搜索</div>
</div>
<div class="total">共{{listLength}}个资产</div>
</div>
<div class="list_main">
<van-list
v-model="loading"
:finished="finished"
finished-text="没有更多了"
@load="getList"
>
<!--1-->
<van-swipe-cell right-width="200" class="item" v-for="(item,index) in applicationList" :key="index">
<div class="item_box" @click="$router.push({name:'sunVillageInfoListThreeDetail',query:{id:item.id}})">
<div class="head_block">
<i class="icon"></i>
<div class="title">{{item.zcmc}}</div>
<div class="describe">{{item.threeAssetType}}</div>
</div>
<div class="order_block">
<div class="order">{{item.zcdm}}</div>
<div class="describe">{{item.threeDetailType}}</div>
</div>
</div>
<template #right>
<div @click="handleDelete(item,index)" style="background-color: #ee0a24;height: 100%">删除</div>
<router-link :to="{name:'sunVillageInfoListThreeEdit',query:{id:item.id}}" style="background-color: #07c160">修改</router-link>
<div @click="openLoader(item.id,0)" style="background-color: rgb(98,173,102,0.2);color: #62AD66;">附件</div>
<div @click="openMap(item.id, item.theGeom,index)" style="background-color: #62AD66;color: #ffffff;">地图</div>
</template>
</van-swipe-cell>

</van-list>
</div>
<!-- <div class="bottom_tips">-->
<!-- <span class="xs">已经到底啦</span>-->
<!-- </div>-->

<van-popup v-model="showMap" lock-scroll position="top" :style="{ height: '80%' }" >
<div style="padding: 0;text-align: center">
<MapGisLine ref="clickLoading" :message="theGeom" v-on:formSubmit="MapTag" :resourceId="resourceId" :resourceList="resourceList"></MapGisLine>
<!-- <div>地图信息:绿色地块表示该地块,蓝色表示本账套已标记的其他地块</div>-->
<div style="margin-top: 1.5vh">
<van-button type="info" size="small" @click="saveGeom">保存</van-button>
<van-button type="danger" size="small" @click="clearLayer">清除图层</van-button>
<van-button plain type="info" size="small" @click="showMap = false">取消</van-button>
</div>
</div>
</van-popup>

<van-popup v-model="show" lock-scroll closeable position="top" :style="{ height: '30%' }" >
<div style="padding: 0 13% 0 5%;">
<van-divider>附件</van-divider>
<van-uploader v-model="fileList" :after-read="afterRead" @delete="deleteFile1" multiple />
</div>
</van-popup>
</div>
</template>
<script>
import {
listThree,
commonAttach,
attachmentList,
systemAttachment,
delThree,
updateThree,
getThree,
clearThreeGeom
} from "@/api/sunVillage_info/three";
import request from '@/utils/request'
import MapGisLine from "@/components/Map/MapGisLine";
export default {
name: "certificateList",
components: { MapGisLine,},
data() {
return {
theGeom:'',
applicationList:[],
applicationListSecond:[],
assetStatusOptions:[],
auditStatus:[],
loading: false,
finished: false,
show: false,
showMap: false,
fileList:[],
listLength:'0',
searchInput:'',
queryParams:{
pageNum:1,
pageSize:10,
orderByColumn:'createTime',
isAsc:'desc',
translate_dict:1,
zcmc:''
},
uploadFiles1:[],
projectId:'',
projectIndex:'',
showBtn:true,
listMap: 0,
resourceId: null, // 资产ID,记录当前资产的ID
resourceList: [] // 资产列表,存储本账套下所有的资产信息
};
},
created() {
},
methods: {
saveGeom(){
var that = this;
updateThree({id: this.resourceId, theGeom: this.theGeom}).then((response) => {
if (response.code == 200){
this.$notify({ type: 'success', message: '修改成功' });
setTimeout(function(){
that.showMap = false;
getThree(that.resourceId).then(response => {
that.applicationList[that.listMap].theGeom = response.data.theGeom;
});
},500)
}
});
},
clearLayer() {
this.$dialog.confirm({
message: '是否清除图层?',
}).then(() => {
// on confirm
clearThreeGeom(this.resourceId).then(res => {
if (res.code === 200) {
this.$notify({ type: 'success', message: '清除成功' });
this.showMap = false;
this.applicationList[this.listMap].theGeom = null;
}
});
}).catch(() => {
// on cancel
});
},
openMap(id, theGeom,index){
listThree().then(response => {
this.showMap = true;
this.resourceId = id;
this.theGeom = theGeom;
this.listMap = index;
this.resourceList = response.rows;
this.mapClickLoading();
});
},
//每个查看修改,新增 方法下引用下面方法
mapClickLoading(){
setTimeout(() => {
this.$refs.clickLoading.drawingPaceCountryLine();
}, 1000);
},
/** 查找地图中定位点 */
MapTag: function (data) {
// this.applicationList[this.listMap].theGeom = data;
this.theGeom = data;
},
guidProduct(){
return 'xxxxxxxxxxxx4xxxyxxxxxxxxxxxxxxx'.replace(/[xy]/g, function (c) {
var r = Math.random() * 16 | 0,
v = c == 'x' ? r : (r & 0x3 | 0x8);
return v.toString(16);
});
},
getList(){
this.loading = true;
listThree(this.queryParams).then(response => {
this.listLength = response.total;
response.rows.forEach(item => {
this.applicationList.push(item);
});
if(this.applicationList.length >= response.total){
this.finished = true;
return;
}else{
this.loading = false;
this.queryParams.pageNum += 1 ;
}
});
},
afterRead(file) {
// 此时可以自行将文件上传至服务器
console.log(file)
this.uploadFiles1.push(file.file);
let params1 = new FormData();
params1.append("tableId", this.projectId);
params1.append("tableName", "t_asset_three");
params1.append("bizPath", "asset");
params1.append("fileType", this.projectIndex);
params1.append("file", file.file);
commonAttach(params1).then((r1) => {
this.$notify({ type: 'success', message: '上传成功' });
})
},
openLoader(id,index){
this.show = true;
this.projectId = id;
this.projectIndex = index;
this.fileList = [];
let oData1= {
tableId: id,
tableName: "t_asset_three",
bizPath: "asset",
fileType: '',
}
attachmentList(oData1).then(res => {
res.rows.map(r => {
let baseUrl = location.protocol+"//"+location.host+request.defaults.baseURL
this.fileList.push({"url":baseUrl + r.fileUrl,"file":new File([],r.fileName,{}),"id":r.id})
})
})
},
/** 删除按钮操作 */
handleDelete(row,index) {
const ids = row.id || this.ids;
this.$dialog.alert(
{
message:'是否确认删除资产?',
title:"警告",
showCancelButton:true,
confirmButtonText: "确定",
cancelButtonText: "取消",
}
)
.then(function () {
return delThree(ids);
})
.then(() => {
this.applicationList.splice(index, 1);
this.$notify({ type: 'success', message: '删除成功' });
});
},
getSearchList(){
this.queryParams.pageNum = 1;
this.finished = false;
this.applicationList = [];
this.getList();
},
deleteFile1(file){
console.log(file)
systemAttachment(file.id).then(res => {
this.$notify({ type: 'success', message: '删除成功' });
})
},
goAdd(){
this.$router.push('/sunVillage_info/threeAdd')
},
},
}
</script>
<style scoped lang="scss">
.home_wrapper{
background: #e9e9e9;
min-height: 100vh;
width: 100vw;
.header_main {
height: 116px;
background: url('../../assets/images/sunVillage_info/list_head.png') no-repeat;
background-size: 100% 100%;
position: fixed;
top: 0;
left: 0;
width: 100%;
font-size: 36px;
line-height: 116px;
text-align: center;
color: #fff;
position: relative;

.return_btn {
width: 24px;
height: 43.2px;
background: url('../../assets/images/sunVillage_info/list_icon_5.png') center center no-repeat;
background-size: 20px 36px;
position: absolute;
left: 38px;
top: 36px;
}

.add_btn {
width: 56.4px;
height: 40.8px;
background: url('../../assets/images/sunVillage_info/list_icon_9.png') center center no-repeat;
background-size: 47px 34px;
position: absolute;
right: 38px;
top: 36px;
}
}
.search_info{
padding:20px 23px;
display: flex;
.search_block{
height: 59px;
width: 535px;
border-radius: 59px;
background: #fff;
display: flex;
border:2px solid #3494ff;
padding-right: 35px;
align-items: center;
.icon{
width: 30px;
height: 30px;
background: url('../../assets/images/sunVillage_info/fixedAssets_icon_1.png') no-repeat;
background-size: 100% 100%;
display: block;
margin:0 8px 0 26px;
}
.ipt{
flex: 1;
font-size: 26px;
background: none;
border:0 none;
line-height: 59px;
}
}
.total{
flex: 1;
display: flex;
align-items: center;
justify-content: center;
font-size: 26px;
color: #858585;
}
}
.list_main{
padding:0 22px;
.item{
/*height: 198px;*/
border-radius: 30px;
background: #fff;
box-shadow: 4px 6px 5px rgba(63, 68, 75, 0.1);
margin-bottom: 20px;
.item_box{
padding:25px 32px;
}
.head_block{
height: 56px;
display: flex;
align-items: center;
width: 100%;
.icon{
width: 34px;
height: 30px;
background: url('../../assets/images/sunVillage_info/fixedAssets_icon_2.png') no-repeat;
background-size: 100% 100%;
display: block;
margin-right: 12px;
}
.title{
flex:1;
font-size: 32px;
color: #252525;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
padding-right: 20px;

}
.describe{
height: 34px;
padding: 0 15px;
font-size: 24px;
color: #3494ff;
background: #e6f2ff;
border-radius: 8px;
}
}
.order_block{
height: 50px;
display: flex;
align-items: center;
width: 100%;
.order{
flex: 1;
font-size: 26px;
color: #252525;
}
.describe{
font-size: 26px;
color: #3494ff;
}
}
.function_block{
height: 46px;
display: flex;
align-items: center;
.time{
display: flex;
flex: 1;
align-items: center;
font-size: 24px;
color: #858585;
.icon{
width: 25px;
height: 25px;
background: url('../../assets/images/sunVillage_info/fixedAssets_icon_3.png') no-repeat;
background-size: 100% 100%;
display: block;
margin-right: 8px;
}
}
.state{
/*flex: 1;*/
display: flex;
justify-content: center;
align-items: center;
&.sell{
color: #f69600;
}
&.scrap{
color: #858585;
}
&.normal{
color: #68c000;
}
}
.value{
flex:1;
display: flex;
align-items: center;
justify-content:flex-end;
font-size: 24px;
color: #858585;
.amount{
color: #eb1616;
}
}
}

}
}
.bottom_tips{
font-size: 24px;
color: #a7a6a6;
text-align: center;
margin-top: 32px;
background: url('../../assets/images/sunVillage_info/list_icon_8.png') center center no-repeat;
background-size: 260px 2px;
.xs{
padding:0 8px;
background: #e9e9e9;
}
}
/deep/ .van-swipe-cell__right{
display: flex;
align-items: center;
width: 200PX;
margin-left: 5PX;
a,div{
margin: 0;
display: flex;
align-items: center;
justify-content: center;
color: #ffffff;
font-size: 14PX;
height: 100%;
flex: 1;
}
}

}







</style>

+ 417
- 0
src/views/sunVillage_info/threeAdd.vue Ver fichero

@@ -0,0 +1,417 @@
<template>
<div class="home_wrapper">
<div class="header_main">
资产新增
<div class="return_btn" @click="onClickLeft"></div>
</div>
<van-form @submit="onSubmit">
<div class="list_main">
<div class="titBox">
<img src="../../assets/images/sunVillage_info/add_icon_1.png" style="width:22PX;height:22PX;margin-right: 10px;"/>
<p class="tit">基本信息</p>
</div>
<van-field required :rules="[{ required: true }]" v-model="form.zcdm" label="资产编码" placeholder="资产编码" input-align="right" :border="false" :maxlength="20"/>
<van-field required :rules="[{ required: true }]" v-model="form.zcmc" label="资产名称" placeholder="资产名称" input-align="right" :border="false" :maxlength="100"/>

<van-field
readonly
clickable
label="三清类型"
placeholder="请选择"
v-model="threeAssetType"
@click="showThreeAssetType = true"
input-align="right"
right-icon="arrow-down"
label-width="auto"
required
:border="false"
:rules="[{ required: true }]"
/>
<van-popup v-model="showThreeAssetType" position="bottom">
<van-picker
show-toolbar
:columns="threeAssetTypeOptions"
@confirm="onConfirmThreeAssetType"
@cancel="showThreeAssetType = false"
/>
</van-popup>

<van-field
readonly
clickable
label="资产类型"
placeholder="请选择"
v-model="threeDetailType"
@click="showThreeDetailType = true"
input-align="right"
right-icon="arrow-down"
label-width="auto"
required
:border="false"
:rules="[{ required: true }]"
/>
<van-popup v-model="showThreeDetailType" position="bottom">
<van-picker
show-toolbar
:columns="farmingResourceTypeOptions"
@confirm="onConfirmThreeDetailType"
@cancel="showThreeDetailType = false"
/>
</van-popup>
<van-field v-model="form.ydmj" label="用地面积(亩)" placeholder="用地面积(亩)" required :rules="[{ required: true }]" type="number" input-align="right" :border="false" :maxlength="15"/>
<van-field v-model="form.jzmj" label="建筑面积(㎡)" placeholder="建筑面积(㎡)" input-align="right" type="number" :border="false" :maxlength="15"/>
<van-field v-model="form.szz" label="所在组" placeholder="所在组" input-align="right" :border="false" :maxlength="100"/>
<van-field
readonly
clickable
label="权属性质"
placeholder="请选择"
v-model="natureOwnership"
@click="showNatureOwnership = true"
input-align="right"
right-icon="arrow-down"
label-width="auto"
:border="false"
/>
<van-popup v-model="showNatureOwnership" position="bottom">
<van-picker
show-toolbar
:columns="natureOwnershipOptions"
@confirm="onConfirmNatureOwnership"
@cancel="showNatureOwnership = false"
/>
</van-popup>
<van-field
readonly
clickable
label="权属是否存在争议"
placeholder="请选择"
v-model="qssfczzy"
@click="showQssfczzy = true"
input-align="right"
right-icon="arrow-down"
label-width="auto"
:border="false"
/>
<van-popup v-model="showQssfczzy" position="bottom">
<van-picker
show-toolbar
:columns="sysYesNoOptions"
@confirm="onConfirmQssfczzy"
@cancel="showQssfczzy = false"
/>
</van-popup>
<van-field v-model="form.qszt" label="权属主体" placeholder="权属主体" input-align="right" :border="false" :maxlength="100"/>
<van-field
readonly
clickable
label="是否委托代管"
placeholder="请选择"
v-model="sfwtdg"
@click="showSfwtdg = true"
input-align="right"
right-icon="arrow-down"
label-width="auto"
:border="false"
/>
<van-popup v-model="showSfwtdg" position="bottom">
<van-picker
show-toolbar
:columns="sysYesNoOptions"
@confirm="onConfirmSfwtdg"
@cancel="showSfwtdg = false"
/>
</van-popup>
<van-field v-model="form.lxdh" label="联系电话" placeholder="联系电话" input-align="right" :border="false" :maxlength="100"/>
<van-field v-model="form.phfs23" label="23年盘活方式" placeholder="23年盘活方式" input-align="right" :border="false" :maxlength="150"/>
<van-field v-model="form.xy23" label="23年效益(万元)" placeholder="23年效益(万元)" input-align="right" type="number" :border="false" :maxlength="15"/>
<van-field v-model="form.phfs24" label="24年盘活方式" placeholder="24年盘活方式" input-align="right" :border="false" :maxlength="150"/>
<van-field v-model="form.xy24" label="24年效益(万元)" placeholder="24年效益(万元)" input-align="right" type="number" :border="false" :maxlength="15"/>
<van-field v-model="form.phqk" label="盘活情况" placeholder="盘活情况" input-align="right" :border="false" :maxlength="50"/>
<van-field v-model="form.xzyy" label="资产闲置原因" placeholder="资产闲置原因" input-align="right" :border="false" :maxlength="100"/>
<van-field
readonly
clickable
label="是否能正常使用"
placeholder="请选择"
v-model="sfnzcsy"
@click="showSfnzcsy = true"
input-align="right"
right-icon="arrow-down"
label-width="auto"
:border="false"
/>
<van-popup v-model="showSfnzcsy" position="bottom">
<van-picker
show-toolbar
:columns="sysYesNoOptions"
@confirm="onConfirmSfnzcsy"
@cancel="showSfnzcsy = false"
/>
</van-popup>
<van-field v-model="form.wshsy" label="完善后使用" placeholder="完善后使用" input-align="right" :border="false" :maxlength="100"/>
<van-field v-model="form.bnsy" label="不能使用" placeholder="不能使用" input-align="right" :border="false" :maxlength="100"/>
<van-field v-model="form.phcs" label="盘活措施" placeholder="盘活措施" input-align="right" :border="false" :maxlength="200"/>
<van-field v-model="form.phsx" label="盘活时限" placeholder="盘活时限" input-align="right" :border="false" :maxlength="100"/>
<van-field v-model="form.zctjnd" label="资产统计年度" placeholder="资产统计年度" input-align="right" :border="false" :maxlength="100"/>
<van-field v-model="form.bz" label="备注" placeholder="备注" input-align="right" :border="false" :maxlength="500"/>

</div>
<div style="margin: 16px auto;width: 50%;">
<van-button round block type="primary" native-type="submit">
保存
</van-button>
</div>
</van-form>
</div>
</template>
<script>
import { addThree } from "@/api/sunVillage_info/three";
export default {
name: "certificateList",
data() {
return {
// 资产分类字典
threeAssetTypeOptions: [],
farmingResourceTypeOptions: [],
showStartTime:false,
showEndTime:false,
showThreeAssetType:false,
threeAssetType:'集体资源资产',
showThreeDetailType:false,
threeDetailType:'草坡',
form:{
id: null,
bookId: null,
deptId: null,
zcdm: null,
zcmc: null,
threeAssetType: "1",
threeDetailType: "01",
ydmj: null,
jzmj: null,
szz: null,
natureOwnership: "1",
qssfczzy: "Y",
qszt: null,
sfwtdg: "Y",
lxdh: null,
phfs23: null,
xy23: null,
phfs24: null,
xy24: null,
phqk: null,
xzyy: null,
sfnzcsy: "Y",
wshsy: null,
bnsy: null,
phcs: null,
phsx: null,
zctjnd: null,
bz: null,
theGeom: null,
createBy: null,
createTime: null,
updateBy: null,
updateTime: null
},
natureOwnershipOptions:[],
showNatureOwnership:false,
natureOwnership:'公有',
sysYesNoOptions:[],
showQssfczzy:false,
qssfczzy:'是',
showSfwtdg:false,
sfwtdg:'是',
showSfnzcsy:false,
sfnzcsy:'是',
showBuildTime:false,
auditStatus:[],
loading: false,
finished: false,
listLength:'0',
searchInput:'',
queryParams:{
pageNum:1,
pageSize:10,
orderByColumn:'createTime',
isAsc:'desc',
name:'',
},
buildTime:new Date()
};
},
created() {
this.houseGetDicts("nature_ownership").then((response) => {
for(var i = 0 ; i < response.data.length ; i++){
this.natureOwnershipOptions.push({text:response.data[i].dictLabel,value:response.data[i].dictValue});
}
});
this.houseGetDicts("sys_yes_no").then((response) => {
for(var i = 0 ; i < response.data.length ; i++){
this.sysYesNoOptions.push({text:response.data[i].dictLabel,value:response.data[i].dictValue});
}
});
this.houseGetDicts("three_asset_type").then((response) => {
for(var i = 0 ; i < response.data.length ; i++){
this.threeAssetTypeOptions.push({text:response.data[i].dictLabel,value:response.data[i].dictValue});
}
});
this.houseGetDicts("three_jtzyzc_type").then((response) => {
for(var i = 0 ; i < response.data.length ; i++){
this.farmingResourceTypeOptions.push({text:response.data[i].dictLabel,value:response.data[i].dictValue});
}
});
},
methods: {
onConfirmThreeAssetType(data){
this.threeAssetType = data.text;
this.form.threeAssetType = data.value;
this.showThreeAssetType = false;
this.threeDetailType = '';
this.form.threeDetailType = '';
this.farmingResourceTypeOptions = []
if (data.value == '1'){//集体资源资产
this.houseGetDicts("three_jtzyzc_type").then((response) => {
for(var i = 0 ; i < response.data.length ; i++){
this.farmingResourceTypeOptions.push({text:response.data[i].dictLabel,value:response.data[i].dictValue});
}
});
}
if (data.value == '2'){//农业设施设备
this.houseGetDicts("three_nysssb_type").then((response) => {
for(var i = 0 ; i < response.data.length ; i++){
this.farmingResourceTypeOptions.push({text:response.data[i].dictLabel,value:response.data[i].dictValue});
}
});
}
if (data.value == '3'){//农户资产
this.houseGetDicts("three_nh_type").then((response) => {
for(var i = 0 ; i < response.data.length ; i++){
this.farmingResourceTypeOptions.push({text:response.data[i].dictLabel,value:response.data[i].dictValue});
}
});
}

},
onConfirmThreeDetailType(data){
this.threeDetailType = data.text;
this.form.threeDetailType = data.value;
this.showThreeDetailType = false;
},
onConfirmQssfczzy(data){
this.qssfczzy = data.text;
this.form.qssfczzy = data.value;
this.showQssfczzy = false;
},
onConfirmNatureOwnership(data){
this.natureOwnership = data.text;
this.form.natureOwnership = data.value;
this.showNatureOwnership = false;
},
onConfirmSfwtdg(data){
this.sfwtdg = data.text;
this.form.sfwtdg = data.value;
this.showSfwtdg = false;
},
onConfirmSfnzcsy(data){
this.sfnzcsy = data.text;
this.form.sfnzcsy = data.value;
this.showSfnzcsy = false;
},

onSubmit(){
addThree(this.form).then(response => {
if (response.code == 200){
this.$notify({ type: 'success', message: '新增成功' });
setTimeout(function(){
history.back(-1);
},2000)
}
});
}
},
}
</script>
<style scoped lang="scss">
/deep/ .van-button--primary{
background: url("../../assets/images/sunVillage_info/btn_bg.png") no-repeat;
background-size: 100% 100%;
border: none;
}
.home_wrapper{
background: #e9e9e9;
min-height: 100vh;
width: 100vw;
.header_main {
height: 116px;
background: url('../../assets/images/sunVillage_info/list_head.png') no-repeat;
background-size: 100% 100%;
position: fixed;
top: 0;
left: 0;
width: 100%;
font-size: 36px;
line-height: 116px;
text-align: center;
color: #fff;
position: relative;

.return_btn {
width: 24px;
height: 43.2px;
background: url('../../assets/images/sunVillage_info/list_icon_5.png') center center no-repeat;
background-size: 20px 36px;
position: absolute;
left: 38px;
top: 36px;
}

.add_btn {
width: 56.4px;
height: 40.8px;
background: url('../../assets/images/sunVillage_info/list_icon_9.png') center center no-repeat;
background-size: 47px 34px;
position: absolute;
right: 38px;
top: 36px;
}
}
.list_main{
padding:25px;
background: #ffffff;
width: 94%;
margin: 25px auto 0;
border-radius: 15PX;
box-shadow: 4px 6px 5px rgba(63, 68, 75, 0.1);
}
.titBox{
display: flex;
align-items: center;
}
.tit{
font-size: 36px;
font-weight: bold;
}
/deep/ .van-cell{
padding-left: 0!important;
padding-right: 0!important;
padding-bottom: 0!important;
}
/deep/ .van-field__label{
padding-left: 10PX;
width: 8.2em;
}
/deep/ .van-cell--required::before{
left: 0;
}

}







</style>

+ 392
- 0
src/views/sunVillage_info/threeDetail.vue Ver fichero

@@ -0,0 +1,392 @@
<template>
<div class="home_wrapper">
<div class="header_main">
资产详情
<div class="return_btn" @click="onClickLeft"></div>
</div>
<van-form @submit="onSubmit">
<div class="list_main">
<div class="titBox">
<img src="../../assets/images/sunVillage_info/add_icon_1.png" style="width:22PX;height:22PX;margin-right: 10px;"/>
<p class="tit">基本信息</p>
</div>
<van-field required :rules="[{ required: true }]" v-model="form.zcdm" label="资产编码" placeholder="资产编码" input-align="right" :border="false" />
<van-field required :rules="[{ required: true }]" v-model="form.zcmc" label="资产名称" placeholder="资产名称" input-align="right" :border="false" />
<van-field
readonly
label="三清类型"
placeholder="请选择"
v-model="threeAssetType"
input-align="right"
right-icon="arrow-down"
label-width="auto"
:border="false"
/>
<van-field
readonly
label="资产类型"
placeholder="请选择"
v-model="threeDetailType"
input-align="right"
right-icon="arrow-down"
label-width="auto"
:border="false"
/>
<van-field v-model="form.ydmj" label="用地面积(亩)" placeholder="用地面积(亩)" required :rules="[{ required: true }]" input-align="right"v :border="false" />
<van-field v-model="form.jzmj" label="建筑面积(㎡)" placeholder="建筑面积(㎡)" input-align="right" type="number" :border="false" />
<van-field v-model="form.szz" label="所在组" placeholder="所在组" input-align="right" :border="false" />
<van-field
readonly
label="权属性质"
placeholder="请选择"
v-model="natureOwnership"
input-align="right"
right-icon="arrow-down"
label-width="auto"
:border="false"
/>
<van-field
readonlyx
label="权属是否存在争议"
placeholder="请选择"
v-model="qssfczzy"
input-align="right"
right-icon="arrow-down"
label-width="auto"
:border="false"
/>
<van-field v-model="form.qszt" label="权属主体" placeholder="权属主体" input-align="right" :border="false" />
<van-field
readonly
label="是否委托代管"
placeholder="请选择"
v-model="sfwtdg"
input-align="right"
right-icon="arrow-down"
label-width="auto"
:border="false"
/>
<van-field v-model="form.lxdh" label="联系电话" placeholder="联系电话" input-align="right" :border="false" />
<van-field v-model="form.phfs23" label="23年盘活方式" placeholder="23年盘活方式" input-align="right" :border="false" />
<van-field v-model="form.xy23" label="23年效益(万元)" placeholder="23年效益(万元)" input-align="right" type="number" :border="false" />
<van-field v-model="form.phfs24" label="24年盘活方式" placeholder="24年盘活方式" input-align="right" :border="false" />
<van-field v-model="form.xy24" label="24年效益(万元)" placeholder="24年效益(万元)" input-align="right" type="number" :border="false" />
<van-field v-model="form.phqk" label="盘活情况" placeholder="盘活情况" input-align="right" :border="false" />
<van-field v-model="form.xzyy" label="资产闲置原因" placeholder="资产闲置原因" input-align="right" :border="false" />
<van-field
readonly
label="是否能正常使用"
placeholder="请选择"
v-model="sfnzcsy"
input-align="right"
right-icon="arrow-down"
label-width="auto"
:border="false"
/>
<van-field v-model="form.wshsy" label="完善后使用" placeholder="完善后使用" input-align="right" :border="false" />
<van-field v-model="form.bnsy" label="不能使用" placeholder="不能使用" input-align="right" :border="false" />
<van-field v-model="form.phcs" label="盘活措施" placeholder="盘活措施" input-align="right" :border="false" />
<van-field v-model="form.phsx" label="盘活时限" placeholder="盘活时限" input-align="right" :border="false" />
<van-field v-model="form.zctjnd" label="资产统计年度" placeholder="资产统计年度" input-align="right" :border="false" />
<van-field v-model="form.bz" label="备注" placeholder="备注" input-align="right" :border="false" />
</div>
</van-form>
</div>
</template>
<script>
import { updateThree,getThree } from "@/api/sunVillage_info/three";
export default {
name: "certificateList",
data() {
return {
// 资产分类字典
threeAssetTypeOptions: [],
farmingResourceTypeOptions: [],
threeJtzyzcTypeOptions: [],
threeNysssbTypeOptions: [],
threeNhTypeOptions: [],
natureOwnershipOptions:[],
sysYesNoOptions:[],
threeAssetTypeSelect: [],
threeJtzyzcTypeSelect: [],
threeNysssbTypeSelect: [],
threeNhTypeSelect: [],
natureOwnershipSelect:[],
sysYesNoSelect:[],
showStartTime:false,
showEndTime:false,
showThreeAssetType:false,
threeAssetType:'',
showThreeDetailType:false,
threeDetailType:'',
form:{
id: null,
bookId: null,
deptId: null,
zcdm: null,
zcmc: null,
threeAssetType: null,
threeDetailType: null,
ydmj: null,
jzmj: null,
szz: null,
natureOwnership: null,
qssfczzy: null,
qszt: null,
sfwtdg: null,
lxdh: null,
phfs23: null,
xy23: null,
phfs24: null,
xy24: null,
phqk: null,
xzyy: null,
sfnzcsy: null,
wshsy: null,
bnsy: null,
phcs: null,
phsx: null,
zctjnd: null,
bz: null,
theGeom: null,
createBy: null,
createTime: null,
updateBy: null,
updateTime: null
},
showNatureOwnership:false,
natureOwnership:'',
showQssfczzy:false,
qssfczzy:'',
showSfwtdg:false,
sfwtdg:'',
showSfnzcsy:false,
sfnzcsy:'',
showBuildTime:false,
auditStatus:[],
loading: false,
finished: false,
listLength:'0',
searchInput:'',
queryParams:{
pageNum:1,
pageSize:10,
orderByColumn:'createTime',
isAsc:'desc',
name:'',
},
buildTime:new Date()
};
},
created() {
this.houseGetDicts("nature_ownership").then((response) => {
this.natureOwnershipSelect = response.data;
for(var i = 0 ; i < response.data.length ; i++){
this.natureOwnershipOptions.push({text:response.data[i].dictLabel,value:response.data[i].dictValue});
}
});
this.houseGetDicts("sys_yes_no").then((response) => {
this.sysYesNoSelect = response.data;
for(var i = 0 ; i < response.data.length ; i++){
this.sysYesNoOptions.push({text:response.data[i].dictLabel,value:response.data[i].dictValue});
}
});
this.houseGetDicts("three_asset_type").then((response) => {
this.threeAssetTypeSelect = response.data;
for(var i = 0 ; i < response.data.length ; i++){
this.threeAssetTypeOptions.push({text:response.data[i].dictLabel,value:response.data[i].dictValue});
}
});
this.houseGetDicts("three_jtzyzc_type").then((response) => {
this.threeJtzyzcTypeSelect = response.data;
for(var i = 0 ; i < response.data.length ; i++){
this.threeJtzyzcTypeOptions.push({text:response.data[i].dictLabel,value:response.data[i].dictValue});
}
});
this.houseGetDicts("three_nysssb_type").then((response) => {
this.threeNysssbTypeSelect = response.data;
for(var i = 0 ; i < response.data.length ; i++){
this.threeNysssbTypeOptions.push({text:response.data[i].dictLabel,value:response.data[i].dictValue});
}
});
this.houseGetDicts("three_nh_type").then((response) => {
this.threeNhTypeSelect = response.data;
for(var i = 0 ; i < response.data.length ; i++){
this.threeNhTypeOptions.push({text:response.data[i].dictLabel,value:response.data[i].dictValue});
}
});
this.getDetail();
},
methods: {
getDetail(){
getThree(this.$route.query.id).then(response => {
this.form = response.data;
this.threeAssetType = this.selectDictLabel(this.threeAssetTypeSelect, response.data.threeAssetType);
this.natureOwnership = this.selectDictLabel(this.natureOwnershipSelect, response.data.natureOwnership);
this.qssfczzy = this.selectDictLabel(this.sysYesNoSelect, response.data.qssfczzy);
this.sfwtdg = this.selectDictLabel(this.sysYesNoSelect, response.data.sfwtdg);
this.sfnzcsy = this.selectDictLabel(this.sysYesNoSelect, response.data.sfnzcsy);
if (response.data.threeAssetType == '1'){//集体资源资产
this.threeDetailType = this.selectDictLabel(this.threeJtzyzcTypeSelect, response.data.threeDetailType);
this.farmingResourceTypeOptions = this.threeJtzyzcTypeOptions;
}
if (response.data.threeAssetType == '2'){//农业设施设备
this.threeDetailType = this.selectDictLabel(this.threeNysssbTypeSelect, response.data.threeDetailType);
this.farmingResourceTypeOptions = this.threeNysssbTypeOptions;
}
if (response.data.threeAssetType == '3'){//农户资产
this.threeDetailType = this.selectDictLabel(this.threeNhTypeSelect, response.data.threeDetailType);
this.farmingResourceTypeOptions = this.threeNhTypeOptions;
}
});
},
onConfirmThreeAssetType(data){
this.threeAssetType = data.text;
this.form.threeAssetType = data.value;
this.showThreeAssetType = false;
this.threeDetailType = '';
this.form.threeDetailType = '';
this.farmingResourceTypeOptions = []
if (data.value == '1'){//集体资源资产
this.houseGetDicts("three_jtzyzc_type").then((response) => {
for(var i = 0 ; i < response.data.length ; i++){
this.farmingResourceTypeOptions.push({text:response.data[i].dictLabel,value:response.data[i].dictValue});
}
});
}
if (data.value == '2'){//农业设施设备
this.houseGetDicts("three_nysssb_type").then((response) => {
for(var i = 0 ; i < response.data.length ; i++){
this.farmingResourceTypeOptions.push({text:response.data[i].dictLabel,value:response.data[i].dictValue});
}
});
}
if (data.value == '3'){//农户资产
this.houseGetDicts("three_nh_type").then((response) => {
for(var i = 0 ; i < response.data.length ; i++){
this.farmingResourceTypeOptions.push({text:response.data[i].dictLabel,value:response.data[i].dictValue});
}
});
}

},
onConfirmThreeDetailType(data){
this.threeDetailType = data.text;
this.form.threeDetailType = data.value;
this.showThreeDetailType = false;
},
onConfirmQssfczzy(data){
this.qssfczzy = data.text;
this.form.qssfczzy = data.value;
this.showQssfczzy = false;
},
onConfirmNatureOwnership(data){
this.natureOwnership = data.text;
this.form.natureOwnership = data.value;
this.showNatureOwnership = false;
},
onConfirmSfwtdg(data){
this.sfwtdg = data.text;
this.form.sfwtdg = data.value;
this.showSfwtdg = false;
},
onConfirmSfnzcsy(data){
this.sfnzcsy = data.text;
this.form.sfnzcsy = data.value;
this.showSfnzcsy = false;
},
onSubmit(){
updateThree(this.form).then(response => {
if (response.code == 200){
this.$notify({ type: 'success', message: '修改成功' });
setTimeout(function(){
history.back(-1);
},2000)
}
});
}
},
}
</script>
<style scoped lang="scss">
/deep/ .van-button--primary{
background: url("../../assets/images/sunVillage_info/btn_bg.png") no-repeat;
background-size: 100% 100%;
border: none;
}
.home_wrapper{
background: #e9e9e9;
min-height: 100vh;
width: 100vw;
.header_main {
height: 116px;
background: url('../../assets/images/sunVillage_info/list_head.png') no-repeat;
background-size: 100% 100%;
position: fixed;
top: 0;
left: 0;
width: 100%;
font-size: 36px;
line-height: 116px;
text-align: center;
color: #fff;
position: relative;

.return_btn {
width: 24px;
height: 43.2px;
background: url('../../assets/images/sunVillage_info/list_icon_5.png') center center no-repeat;
background-size: 20px 36px;
position: absolute;
left: 38px;
top: 36px;
}

.add_btn {
width: 56.4px;
height: 40.8px;
background: url('../../assets/images/sunVillage_info/list_icon_9.png') center center no-repeat;
background-size: 47px 34px;
position: absolute;
right: 38px;
top: 36px;
}
}
.list_main{
padding:25px;
background: #ffffff;
width: 94%;
margin: 25px auto 0;
border-radius: 15PX;
box-shadow: 4px 6px 5px rgba(63, 68, 75, 0.1);
}
.titBox{
display: flex;
align-items: center;
}
.tit{
font-size: 36px;
font-weight: bold;
}
/deep/ .van-cell{
padding-left: 0!important;
padding-right: 0!important;
padding-bottom: 0!important;
}
/deep/ .van-field__label{
padding-left: 10PX;
width: 8.2em;
}
/deep/ .van-cell--required::before{
left: 0;
}

}







</style>

+ 464
- 0
src/views/sunVillage_info/threeEdit.vue Ver fichero

@@ -0,0 +1,464 @@
<template>
<div class="home_wrapper">
<div class="header_main">
资产修改
<div class="return_btn" @click="onClickLeft"></div>
</div>
<van-form @submit="onSubmit">
<div class="list_main">
<div class="titBox">
<img src="../../assets/images/sunVillage_info/add_icon_1.png" style="width:22PX;height:22PX;margin-right: 10px;"/>
<p class="tit">基本信息</p>
</div>
<van-field required :rules="[{ required: true }]" v-model="form.zcdm" label="资产编码" placeholder="资产编码" input-align="right" :border="false" :maxlength="20"/>
<van-field required :rules="[{ required: true }]" v-model="form.zcmc" label="资产名称" placeholder="资产名称" input-align="right" :border="false" :maxlength="100"/>

<van-field
readonly
clickable
label="三清类型"
placeholder="请选择"
v-model="threeAssetType"
@click="showThreeAssetType = true"
input-align="right"
right-icon="arrow-down"
label-width="auto"
required
:border="false"
:rules="[{ required: true }]"
/>
<van-popup v-model="showThreeAssetType" position="bottom">
<van-picker
show-toolbar
:columns="threeAssetTypeOptions"
@confirm="onConfirmThreeAssetType"
@cancel="showThreeAssetType = false"
/>
</van-popup>

<van-field
readonly
clickable
label="资产类型"
placeholder="请选择"
v-model="threeDetailType"
@click="showThreeDetailType = true"
input-align="right"
right-icon="arrow-down"
label-width="auto"
required
:border="false"
:rules="[{ required: true }]"
/>
<van-popup v-model="showThreeDetailType" position="bottom">
<van-picker
show-toolbar
:columns="farmingResourceTypeOptions"
@confirm="onConfirmThreeDetailType"
@cancel="showThreeDetailType = false"
/>
</van-popup>
<van-field v-model="form.ydmj" label="用地面积(亩)" placeholder="用地面积(亩)" required :rules="[{ required: true }]" type="number" input-align="right" :border="false" :maxlength="15"/>
<van-field v-model="form.jzmj" label="建筑面积(㎡)" placeholder="建筑面积(㎡)" input-align="right" type="number" :border="false" :maxlength="15"/>
<van-field v-model="form.szz" label="所在组" placeholder="所在组" input-align="right" :border="false" :maxlength="100"/>
<van-field
readonly
clickable
label="权属性质"
placeholder="请选择"
v-model="natureOwnership"
@click="showNatureOwnership = true"
input-align="right"
right-icon="arrow-down"
label-width="auto"
:border="false"
/>
<van-popup v-model="showNatureOwnership" position="bottom">
<van-picker
show-toolbar
:columns="natureOwnershipOptions"
@confirm="onConfirmNatureOwnership"
@cancel="showNatureOwnership = false"
/>
</van-popup>
<van-field
readonly
clickable
label="权属是否存在争议"
placeholder="请选择"
v-model="qssfczzy"
@click="showQssfczzy = true"
input-align="right"
right-icon="arrow-down"
label-width="auto"
:border="false"
/>
<van-popup v-model="showQssfczzy" position="bottom">
<van-picker
show-toolbar
:columns="sysYesNoOptions"
@confirm="onConfirmQssfczzy"
@cancel="showQssfczzy = false"
/>
</van-popup>
<van-field v-model="form.qszt" label="权属主体" placeholder="权属主体" input-align="right" :border="false" :maxlength="100"/>
<van-field
readonly
clickable
label="是否委托代管"
placeholder="请选择"
v-model="sfwtdg"
@click="showSfwtdg = true"
input-align="right"
right-icon="arrow-down"
label-width="auto"
:border="false"
/>
<van-popup v-model="showSfwtdg" position="bottom">
<van-picker
show-toolbar
:columns="sysYesNoOptions"
@confirm="onConfirmSfwtdg"
@cancel="showSfwtdg = false"
/>
</van-popup>
<van-field v-model="form.lxdh" label="联系电话" placeholder="联系电话" input-align="right" :border="false" :maxlength="100"/>
<van-field v-model="form.phfs23" label="23年盘活方式" placeholder="23年盘活方式" input-align="right" :border="false" :maxlength="150"/>
<van-field v-model="form.xy23" label="23年效益(万元)" placeholder="23年效益(万元)" input-align="right" type="number" :border="false" :maxlength="15"/>
<van-field v-model="form.phfs24" label="24年盘活方式" placeholder="24年盘活方式" input-align="right" :border="false" :maxlength="150"/>
<van-field v-model="form.xy24" label="24年效益(万元)" placeholder="24年效益(万元)" input-align="right" type="number" :border="false" :maxlength="15"/>
<van-field v-model="form.phqk" label="盘活情况" placeholder="盘活情况" input-align="right" :border="false" :maxlength="50"/>
<van-field v-model="form.xzyy" label="资产闲置原因" placeholder="资产闲置原因" input-align="right" :border="false" :maxlength="100"/>
<van-field
readonly
clickable
label="是否能正常使用"
placeholder="请选择"
v-model="sfnzcsy"
@click="showSfnzcsy = true"
input-align="right"
right-icon="arrow-down"
label-width="auto"
:border="false"
/>
<van-popup v-model="showSfnzcsy" position="bottom">
<van-picker
show-toolbar
:columns="sysYesNoOptions"
@confirm="onConfirmSfnzcsy"
@cancel="showSfnzcsy = false"
/>
</van-popup>
<van-field v-model="form.wshsy" label="完善后使用" placeholder="完善后使用" input-align="right" :border="false" :maxlength="100"/>
<van-field v-model="form.bnsy" label="不能使用" placeholder="不能使用" input-align="right" :border="false" :maxlength="100"/>
<van-field v-model="form.phcs" label="盘活措施" placeholder="盘活措施" input-align="right" :border="false" :maxlength="200"/>
<van-field v-model="form.phsx" label="盘活时限" placeholder="盘活时限" input-align="right" :border="false" :maxlength="100"/>
<van-field v-model="form.zctjnd" label="资产统计年度" placeholder="资产统计年度" input-align="right" :border="false" :maxlength="100"/>
<van-field v-model="form.bz" label="备注" placeholder="备注" input-align="right" :border="false" :maxlength="500"/>

</div>
<div style="margin: 16px auto;width: 50%;">
<van-button round block type="primary" native-type="submit">
保存
</van-button>
</div>
</van-form>
</div>
</template>
<script>
import { updateThree,getThree } from "@/api/sunVillage_info/three";
export default {
name: "certificateList",
data() {
return {
// 资产分类字典
threeAssetTypeOptions: [],
farmingResourceTypeOptions: [],
threeJtzyzcTypeOptions: [],
threeNysssbTypeOptions: [],
threeNhTypeOptions: [],
natureOwnershipOptions:[],
sysYesNoOptions:[],
threeAssetTypeSelect: [],
threeJtzyzcTypeSelect: [],
threeNysssbTypeSelect: [],
threeNhTypeSelect: [],
natureOwnershipSelect:[],
sysYesNoSelect:[],
showStartTime:false,
showEndTime:false,
showThreeAssetType:false,
threeAssetType:'',
showThreeDetailType:false,
threeDetailType:'',
form:{
id: null,
bookId: null,
deptId: null,
zcdm: null,
zcmc: null,
threeAssetType: null,
threeDetailType: null,
ydmj: null,
jzmj: null,
szz: null,
natureOwnership: null,
qssfczzy: null,
qszt: null,
sfwtdg: null,
lxdh: null,
phfs23: null,
xy23: null,
phfs24: null,
xy24: null,
phqk: null,
xzyy: null,
sfnzcsy: null,
wshsy: null,
bnsy: null,
phcs: null,
phsx: null,
zctjnd: null,
bz: null,
theGeom: null,
createBy: null,
createTime: null,
updateBy: null,
updateTime: null
},
showNatureOwnership:false,
natureOwnership:'',
showQssfczzy:false,
qssfczzy:'',
showSfwtdg:false,
sfwtdg:'',
showSfnzcsy:false,
sfnzcsy:'',
showBuildTime:false,
auditStatus:[],
loading: false,
finished: false,
listLength:'0',
searchInput:'',
queryParams:{
pageNum:1,
pageSize:10,
orderByColumn:'createTime',
isAsc:'desc',
name:'',
},
buildTime:new Date()
};
},
created() {
this.houseGetDicts("nature_ownership").then((response) => {
this.natureOwnershipSelect = response.data;
for(var i = 0 ; i < response.data.length ; i++){
this.natureOwnershipOptions.push({text:response.data[i].dictLabel,value:response.data[i].dictValue});
}
});
this.houseGetDicts("sys_yes_no").then((response) => {
this.sysYesNoSelect = response.data;
for(var i = 0 ; i < response.data.length ; i++){
this.sysYesNoOptions.push({text:response.data[i].dictLabel,value:response.data[i].dictValue});
}
});
this.houseGetDicts("three_asset_type").then((response) => {
this.threeAssetTypeSelect = response.data;
for(var i = 0 ; i < response.data.length ; i++){
this.threeAssetTypeOptions.push({text:response.data[i].dictLabel,value:response.data[i].dictValue});
}
});
this.houseGetDicts("three_jtzyzc_type").then((response) => {
this.threeJtzyzcTypeSelect = response.data;
for(var i = 0 ; i < response.data.length ; i++){
this.threeJtzyzcTypeOptions.push({text:response.data[i].dictLabel,value:response.data[i].dictValue});
}
});
this.houseGetDicts("three_nysssb_type").then((response) => {
this.threeNysssbTypeSelect = response.data;
for(var i = 0 ; i < response.data.length ; i++){
this.threeNysssbTypeOptions.push({text:response.data[i].dictLabel,value:response.data[i].dictValue});
}
});
this.houseGetDicts("three_nh_type").then((response) => {
this.threeNhTypeSelect = response.data;
for(var i = 0 ; i < response.data.length ; i++){
this.threeNhTypeOptions.push({text:response.data[i].dictLabel,value:response.data[i].dictValue});
}
});
this.getDetail();
},
methods: {
getDetail(){
getThree(this.$route.query.id).then(response => {
this.form = response.data;
this.threeAssetType = this.selectDictLabel(this.threeAssetTypeSelect, response.data.threeAssetType);
this.natureOwnership = this.selectDictLabel(this.natureOwnershipSelect, response.data.natureOwnership);
this.qssfczzy = this.selectDictLabel(this.sysYesNoSelect, response.data.qssfczzy);
this.sfwtdg = this.selectDictLabel(this.sysYesNoSelect, response.data.sfwtdg);
this.sfnzcsy = this.selectDictLabel(this.sysYesNoSelect, response.data.sfnzcsy);
if (response.data.threeAssetType == '1'){//集体资源资产
this.threeDetailType = this.selectDictLabel(this.threeJtzyzcTypeSelect, response.data.threeDetailType);
this.farmingResourceTypeOptions = this.threeJtzyzcTypeOptions;
}
if (response.data.threeAssetType == '2'){//农业设施设备
this.threeDetailType = this.selectDictLabel(this.threeNysssbTypeSelect, response.data.threeDetailType);
this.farmingResourceTypeOptions = this.threeNysssbTypeOptions;
}
if (response.data.threeAssetType == '3'){//农户资产
this.threeDetailType = this.selectDictLabel(this.threeNhTypeSelect, response.data.threeDetailType);
this.farmingResourceTypeOptions = this.threeNhTypeOptions;
}
});
},
onConfirmThreeAssetType(data){
this.threeAssetType = data.text;
this.form.threeAssetType = data.value;
this.showThreeAssetType = false;
this.threeDetailType = '';
this.form.threeDetailType = '';
this.farmingResourceTypeOptions = []
if (data.value == '1'){//集体资源资产
this.houseGetDicts("three_jtzyzc_type").then((response) => {
for(var i = 0 ; i < response.data.length ; i++){
this.farmingResourceTypeOptions.push({text:response.data[i].dictLabel,value:response.data[i].dictValue});
}
});
}
if (data.value == '2'){//农业设施设备
this.houseGetDicts("three_nysssb_type").then((response) => {
for(var i = 0 ; i < response.data.length ; i++){
this.farmingResourceTypeOptions.push({text:response.data[i].dictLabel,value:response.data[i].dictValue});
}
});
}
if (data.value == '3'){//农户资产
this.houseGetDicts("three_nh_type").then((response) => {
for(var i = 0 ; i < response.data.length ; i++){
this.farmingResourceTypeOptions.push({text:response.data[i].dictLabel,value:response.data[i].dictValue});
}
});
}

},
onConfirmThreeDetailType(data){
this.threeDetailType = data.text;
this.form.threeDetailType = data.value;
this.showThreeDetailType = false;
},
onConfirmQssfczzy(data){
this.qssfczzy = data.text;
this.form.qssfczzy = data.value;
this.showQssfczzy = false;
},
onConfirmNatureOwnership(data){
this.natureOwnership = data.text;
this.form.natureOwnership = data.value;
this.showNatureOwnership = false;
},
onConfirmSfwtdg(data){
this.sfwtdg = data.text;
this.form.sfwtdg = data.value;
this.showSfwtdg = false;
},
onConfirmSfnzcsy(data){
this.sfnzcsy = data.text;
this.form.sfnzcsy = data.value;
this.showSfnzcsy = false;
},
onSubmit(){
updateThree(this.form).then(response => {
if (response.code == 200){
this.$notify({ type: 'success', message: '修改成功' });
setTimeout(function(){
history.back(-1);
},2000)
}
});
}
},
}
</script>
<style scoped lang="scss">
/deep/ .van-button--primary{
background: url("../../assets/images/sunVillage_info/btn_bg.png") no-repeat;
background-size: 100% 100%;
border: none;
}
.home_wrapper{
background: #e9e9e9;
min-height: 100vh;
width: 100vw;
.header_main {
height: 116px;
background: url('../../assets/images/sunVillage_info/list_head.png') no-repeat;
background-size: 100% 100%;
position: fixed;
top: 0;
left: 0;
width: 100%;
font-size: 36px;
line-height: 116px;
text-align: center;
color: #fff;
position: relative;

.return_btn {
width: 24px;
height: 43.2px;
background: url('../../assets/images/sunVillage_info/list_icon_5.png') center center no-repeat;
background-size: 20px 36px;
position: absolute;
left: 38px;
top: 36px;
}

.add_btn {
width: 56.4px;
height: 40.8px;
background: url('../../assets/images/sunVillage_info/list_icon_9.png') center center no-repeat;
background-size: 47px 34px;
position: absolute;
right: 38px;
top: 36px;
}
}
.list_main{
padding:25px;
background: #ffffff;
width: 94%;
margin: 25px auto 0;
border-radius: 15PX;
box-shadow: 4px 6px 5px rgba(63, 68, 75, 0.1);
}
.titBox{
display: flex;
align-items: center;
}
.tit{
font-size: 36px;
font-weight: bold;
}
/deep/ .van-cell{
padding-left: 0!important;
padding-right: 0!important;
padding-bottom: 0!important;
}
/deep/ .van-field__label{
padding-left: 10PX;
width: 8.2em;
}
/deep/ .van-cell--required::before{
left: 0;
}

}







</style>

Cargando…
Cancelar
Guardar