庞东旭 5 дней назад
Родитель
Сommit
22d6ecba06
12 измененных файлов: 652 добавлений и 221 удалений
  1. +8
    -0
      src/api/system/config.js
  2. Двоичные данные
      src/assets/images/app/mark.png
  3. +24
    -6
      src/router/index.js
  4. +7
    -4
      src/views/app/index.vue
  5. +255
    -183
      src/views/app/map.vue
  6. +0
    -0
      src/views/app/project/attribute_edit.vue
  7. +1
    -1
      src/views/app/project/detail.vue
  8. +1
    -1
      src/views/app/project/list.vue
  9. +15
    -15
      src/views/app/project/operate_edit.vue
  10. +167
    -0
      src/views/app/user/info.vue
  11. +147
    -0
      src/views/app/user/passWord.vue
  12. +27
    -11
      src/views/app/user/user.vue

+ 8
- 0
src/api/system/config.js Просмотреть файл

@@ -59,6 +59,14 @@ export function refreshCache() {
})
}

// 附件地址前缀
export function getSystemAttachmentUrl() {
return request({
url: '/open/typz/configKey/system.attachment.url',
method: 'get'
})
}

// 根据参数键名查询参数值
// export function getConfigKey(configKey) {
// return request({


Двоичные данные
src/assets/images/app/mark.png Просмотреть файл

До После
Ширина: 48  |  Высота: 48  |  Размер: 482 B

+ 24
- 6
src/router/index.js Просмотреть файл

@@ -111,9 +111,27 @@ export const constantRoutes = [
name: 'appUser',
hidden: true,
meta: {
title: '首页',
title: '用户',
},
component: (resolve) => require(['@/views/app/user/user'], resolve)
},
{ //用户页
path: '/app/user/info',
name: 'appUserInfo',
hidden: true,
meta: {
title: '用户信息',
},
component: (resolve) => require(['@/views/app/user/info'], resolve)
},
{ //用户页
path: '/app/user/passWord',
name: 'appUserPassWord',
hidden: true,
meta: {
title: '修改密码',
},
component: (resolve) => require(['@/views/app/user'], resolve)
component: (resolve) => require(['@/views/app/user/passWord'], resolve)
},
{ //列表
path: '/app/list',
@@ -122,7 +140,7 @@ export const constantRoutes = [
meta: {
title: '列表',
},
component: (resolve) => require(['@/views/app/list'], resolve)
component: (resolve) => require(['@/views/app/project/list'], resolve)
},
{ //属性修改
path: '/app/attribute_edit',
@@ -131,7 +149,7 @@ export const constantRoutes = [
meta: {
title: '修改',
},
component: (resolve) => require(['@/views/app/attribute_edit'], resolve)
component: (resolve) => require(['@/views/app/project/attribute_edit'], resolve)
},
{ //经营修改
path: '/app/operate_edit',
@@ -140,7 +158,7 @@ export const constantRoutes = [
meta: {
title: '修改',
},
component: (resolve) => require(['@/views/app/operate_edit'], resolve)
component: (resolve) => require(['@/views/app/project/operate_edit'], resolve)
},
{ //地图
path: '/app/map',
@@ -158,7 +176,7 @@ export const constantRoutes = [
meta: {
title: '详情',
},
component: (resolve) => require(['@/views/app/detail'], resolve)
component: (resolve) => require(['@/views/app/project/detail'], resolve)
},
]



+ 7
- 4
src/views/app/index.vue Просмотреть файл

@@ -5,8 +5,8 @@
<div class="left">
<div class="avatar"><img src="../../assets/images/app/user_header.png" alt=""></div>
<div class="info">
<p>张晋升</p>
<p>常家围子村委会</p>
<p>{{$store.getters.user.user.nickName}}</p>
<p>{{$store.getters.user.user.dept.deptName}}</p>
</div>
</div>
<van-icon name="setting" size="25" @click="$router.push({ path: '/app/user' })" />
@@ -38,12 +38,15 @@
name: "appIndex",
data() {
return {
menuList:[]
menuList:[],
user:{},
avatar:''
};
},
created() {
this.getMenuApp();
console.log(this.$store.getters)
},
mounted() {
},
methods: {
getMenuApp(){


+ 255
- 183
src/views/app/map.vue Просмотреть файл

@@ -14,7 +14,7 @@
<van-button type="primary" round >搜索</van-button>
</div>

<div class="location">
<div class="location" :id="locationMap">
<img src="../../assets/images/app/location.png" alt="">
</div>

@@ -32,145 +32,56 @@



<!-- <van-popup v-model="open" position="bottom" round >-->
<!-- <div class="landPopup">-->
<!-- <p class="landPopup_title">属性数据 <img src="../../assets/images/app/edit.png" width="25" alt=""></p>-->
<!-- <van-form ref="landForm">-->
<!-- <van-field v-model="form.dkbm" label="地块代码:" placeholder="<自动生成>" :border="false" input-align="right" label-width="auto" maxlength="19" :disabled="true" >-->
<!-- &lt;!&ndash; <template #button v-if="!isDisabled">-->
<!-- <van-button size="mini" type="primary" native-type="button" @click="generateCode">生成代码</van-button>-->
<!-- </template> &ndash;&gt;-->
<!-- </van-field>-->
<!-- <van-field v-model="form.dkmc" label="地块名称:" placeholder="请输入地块名称" required :rules="[{ required: true }]" :border="false" input-align="right" maxlength="50" />-->
<!-- <van-field v-model="syqxzText" label="所有权性质:"-->
<!-- placeholder="请选择所有权性质"-->
<!-- required-->
<!-- :rules="[{ required: true }]"-->
<!-- :border="false"-->
<!-- input-align="right"-->
<!-- right-icon="arrow-down"-->
<!-- readonly-->
<!-- clickable-->
<!-- @click="showOwnership = true"-->
<!-- />-->
<!-- <van-popup v-model="showOwnership" position="bottom" get-container=".app-container">-->
<!-- <van-picker-->
<!-- show-toolbar-->
<!-- :columns="syqxzOptions"-->
<!-- value-key="dictLabel"-->
<!-- @confirm="onConfirmOwnershipOptions"-->
<!-- @cancel="showOwnership = false"-->
<!-- />-->
<!-- </van-popup>-->
<!-- <van-field v-model="dklbText" label="地块类别:"-->
<!-- placeholder="请选择地块类别"-->
<!-- required-->
<!-- :rules="[{ required: true }]"-->
<!-- :border="false"-->
<!-- input-align="right"-->
<!-- right-icon="arrow-down"-->
<!-- readonly-->
<!-- clickable-->
<!-- @click="openLandCategoryPopup"-->
<!-- />-->
<!-- <van-popup v-model="showLandCategory" position="bottom" get-container=".app-container">-->
<!-- <van-picker-->
<!-- show-toolbar-->
<!-- :columns="dklbOptions"-->
<!-- value-key="dictLabel"-->
<!-- @confirm="onConfirmLandCategoryOptions"-->
<!-- @cancel="showLandCategory = false"-->
<!-- />-->
<!-- </van-popup>-->
<!-- <van-field v-model="tdlylxText" label="土地利用类型:"-->
<!-- placeholder="请选择土地利用类型"-->
<!-- required-->
<!-- :rules="[{ required: true }]"-->
<!-- :border="false"-->
<!-- input-align="right"-->
<!-- right-icon="arrow-down"-->
<!-- readonly-->
<!-- clickable-->
<!-- @click="showLandType = true"-->
<!-- />-->
<!-- <van-popup v-model="showLandType" position="bottom" get-container=".app-container">-->
<!-- <van-picker-->
<!-- show-toolbar-->
<!-- :columns="tdlylxOptions"-->
<!-- value-key="dictLabel"-->
<!-- @confirm="onConfirmLandTypeOptions"-->
<!-- @cancel="showLandType = false"-->
<!-- />-->
<!-- </van-popup>-->
<!-- <van-field v-model="dldjText" label="地力等级:"-->
<!-- placeholder="请选择地力等级"-->
<!-- required-->
<!-- :rules="[{ required: true }]"-->
<!-- :border="false"-->
<!-- input-align="right"-->
<!-- right-icon="arrow-down"-->
<!-- readonly-->
<!-- clickable-->
<!-- @click="showLandGrade = true"-->
<!-- />-->
<!-- <van-popup v-model="showLandGrade" position="bottom" get-container=".app-container">-->
<!-- <van-picker-->
<!-- show-toolbar-->
<!-- :columns="dldjOptions"-->
<!-- value-key="dictLabel"-->
<!-- @confirm="onConfirmLandGradeOptions"-->
<!-- @cancel="showLandGrade = false"-->
<!-- />-->
<!-- </van-popup>-->
<!-- <van-field v-model="tdytText" label="土地用途:"-->
<!-- placeholder="请选择土地用途"-->
<!-- required-->
<!-- :rules="[{ required: true }]"-->
<!-- :border="false"-->
<!-- input-align="right"-->
<!-- right-icon="arrow-down"-->
<!-- readonly-->
<!-- clickable-->
<!-- @click="showLandPurpose = true"-->
<!-- />-->
<!-- <van-popup v-model="showLandPurpose" position="bottom" get-container=".app-container">-->
<!-- <van-picker-->
<!-- show-toolbar-->
<!-- :columns="tdytOptions"-->
<!-- value-key="dictLabel"-->
<!-- @confirm="onConfirmLandPurposeOptions"-->
<!-- @cancel="showLandPurpose = false"-->
<!-- />-->
<!-- </van-popup>-->
<!-- <van-field v-model="form.sfjbnt" label="基本农田:" required :rules="[{ required: true }]" :border="false" input-align="right" >-->
<!-- <template #input>-->
<!-- <van-radio-group v-model="form.sfjbnt" direction="horizontal">-->
<!-- &lt;!&ndash; <van-radio name="1">是</van-radio>-->
<!-- <van-radio name="2">否</van-radio> &ndash;&gt;-->
<!-- <van-radio v-for="dict in sfjbntOptions" :ke="dict.dictValue" :name="dict.dictValue">{{ dict.dictLabel }}</van-radio>-->
<!-- </van-radio-group>-->
<!-- </template>-->
<!-- </van-field>-->
<!-- <van-field v-model="form.scmjm" type="number" label="实测面积(亩):" placeholder="请输入实测面积(亩)" required :rules="[{ required: true }]" :border="false" input-align="right" />-->
<!-- <van-field v-model="form.zjrxm" label="指界人姓名:" placeholder="请输入指界人姓名" required :rules="[{ required: true }]" :border="false" input-align="right" maxlength="100" />-->
<!-- <van-field v-model="form.dkdz" label="地块东至:" placeholder="请输入地块东至" required :rules="[{ required: true }]" :border="false" input-align="right" maxlength="50" />-->
<!-- <van-field v-model="form.dkxz" label="地块西至:" placeholder="请输入地块西至" required :rules="[{ required: true }]" :border="false" input-align="right" maxlength="50" />-->
<!-- <van-field v-model="form.dknz" label="地块南至:" placeholder="请输入地块南至" required :rules="[{ required: true }]" :border="false" input-align="right" maxlength="50" />-->
<!-- <van-field v-model="form.dkbz" label="地块北至:" placeholder="请输入地块北至" required :rules="[{ required: true }]" :border="false" input-align="right" maxlength="50" />-->
<!-- <van-field v-model="form.dkbzxx" label="地块备注信息:" placeholder="请输入地块备注信息" type="textarea" rows="3" :border="false" input-align="right" maxlength="250" />-->
<!-- </van-form>-->
<!-- <div class="footer_main">-->
<!-- <van-button type="default" hairline size="large">关闭弹窗</van-button>-->
<!-- <van-button type="danger" hairline size="large">删除地块</van-button>-->
<!-- <van-button type="info" hairline size="large">保存信息</van-button>-->
<!-- </div>-->
<!-- </div>-->
<!-- </van-popup>-->
<van-popup v-model="open" position="bottom" round >
<div class="landPopup">
<p class="landPopup_title">属性数据 <img @click="$router.push({name:'appAttributeEdit',query:{fid:form.fid}})" src="../../assets/images/app/edit.png" width="25" alt=""></p>
<van-field readonly v-model="form.deptName" label="区域位置名称" placeholder="请输入" input-align="right" label-width="auto" />
<van-field readonly v-model="form.bsm" label="标识码" placeholder="请输入" input-align="right" label-width="auto" />
<van-field readonly v-model="form.ysdm" label="要素代码" placeholder="请输入" input-align="right" label-width="auto" />
<van-field readonly v-model="form.dkbm" label="地块代码" placeholder="请输入" input-align="right" label-width="auto" />
<van-field readonly v-model="form.dkmc" label="地块名称" placeholder="请输入" input-align="right" label-width="auto" />
<van-field readonly v-model="form.syqxz" label="所有权性质" placeholder="请输入" input-align="right" label-width="auto" />
<van-field readonly v-model="form.dklb" label="地块类别" placeholder="请输入" input-align="right" label-width="auto" />
<van-field readonly v-model="form.tdlylx" label="土地利用类型" placeholder="请输入" input-align="right" label-width="auto" />
<van-field readonly v-model="form.dldj" label="地力等级" placeholder="请输入" input-align="right" label-width="auto" />
<van-field readonly v-model="form.tdyt" label="土地用途" placeholder="请输入" input-align="right" label-width="auto" />
<van-field readonly v-model="form.sfjbnt" label="是否基本农田" placeholder="请输入" input-align="right" label-width="auto" />
<van-field readonly v-model="form.dkdz" label="地块东至" placeholder="请输入" input-align="right" label-width="auto" />
<van-field readonly v-model="form.dkxz" label="地块西至" placeholder="请输入" input-align="right" label-width="auto" />
<van-field readonly v-model="form.dknz" label="地块南至" placeholder="请输入" input-align="right" label-width="auto" />
<van-field readonly v-model="form.dkbz" label="地块北至" placeholder="请输入" input-align="right" label-width="auto" />
<van-field readonly v-model="form.dkbzxx" label="备注信息" placeholder="请输入" input-align="right" label-width="auto" />
<van-field readonly v-model="form.zjrxm" label="指界人姓名" placeholder="请输入" input-align="right" label-width="auto" />
<van-field readonly v-model="form.txmj" label="图显面积" placeholder="请输入" input-align="right" label-width="auto" />
<van-field readonly v-model="form.scmjm" label="实测面积" placeholder="请输入" input-align="right" label-width="auto" />
<van-field readonly v-model="form.sfzwd" label="是否账外地" placeholder="请输入" input-align="right" label-width="auto" />

<p class="landPopup_title">经营数据 <img @click="$router.push({name:'appOperateEdit',query:{dkbm:form.dkbm}})" src="../../assets/images/app/edit.png" width="25" alt=""></p>
<van-field readonly v-model="form.jymj" label="经营面积(亩)" placeholder="请输入" input-align="right" label-width="auto" />
<van-field readonly v-model="form.jyfs" label="经营方式" placeholder="请输入" input-align="right" label-width="auto" />
<van-field readonly v-model="form.jydxmc" label="经营对象名称" placeholder="请输入" input-align="right" label-width="auto" />
<van-field readonly v-model="form.jykssj" label="经营开始时间" placeholder="请输入" input-align="right" label-width="auto" />
<van-field readonly v-model="form.jyjssj" label="经营结束时间" placeholder="请输入" input-align="right" label-width="auto" />
<van-field readonly v-model="form.cbje" label="承包金额(元)" placeholder="请输入" input-align="right" label-width="auto" />
<van-field readonly v-model="form.surveyStatus" label="调查状态" placeholder="请输入" input-align="right" label-width="auto" />
<van-field readonly v-model="form.bzxx" label="备注信息" placeholder="请输入" input-align="right" label-width="auto" />
<van-field readonly label="实物图" placeholder="" input-align="right" label-width="auto" />
<div v-if="!!form.dkImg">
<el-tooltip effect="light" :content="item" placement="bottom" v-for="(item, index) in form.dkImg.split(',')" :key="index">
<el-image style="height: 64px; width: 64px; margin: 2px; display: inline-block;" fit="scale-down" :src="baseRoutingUrll + item" :preview-src-list="form.dkImg.split(',').map((x) => baseRoutingUrll + x)"/>
</el-tooltip>
</div>
<div class="footer_main">
<van-button type="danger" @click="open = false" hairline size="large">关闭弹窗</van-button>
</div>
</div>
</van-popup>

</div>
</template>
<script>
import { listLand, listLandQuery,getLand, getLandDetail, getLandDetailByDkbm, delLand, addLand, updateLand, printLand } from "@/api/resource/land"
import { getOperationDetailByDkbm } from "@/api/resource/operation"
import { areaSavePri, cleanSavePri } from "@/api/gis/map"
import { getToken } from "@/utils/auth"
import Treeselect from "@riophae/vue-treeselect";
@@ -181,6 +92,7 @@
import {getConfigKey} from "@/api/system/config";
import {getDept,getInfoByImportCode} from "@/api/system/dept";
import MapField from "@/components/house/MapField";
import {Toast} from "vant";
import $ from "jquery";


@@ -189,7 +101,8 @@
components: { Treeselect, Splitpanes, Pane,MapField },
data() {
return {
fform: {}, // 地块信息表单参数
baseRoutingUrll:'/api',
form: {}, // 地块信息表单参数
map: "", // 地图
mapGeoServerUrl: "", // geoserver地址
mapCenterLocation: [], // 地图中心坐标
@@ -227,9 +140,24 @@
value:'',
deptId:100,
importCode:'',
locationMap: this.guidProduct(),

};
},
computed: {
isAndroid() {
return !!window._Native_object;
},
hasSelectLocationMode() {
return this.isAndroid && typeof(window._Native_object.SelectLocationMode) === 'function';
},
hasGetLocationTimeout() {
return this.isAndroid && typeof(window._Native_object.GetLocationTimeout) === 'function';
},
hasGetLocationMode() {
return this.isAndroid && typeof(window._Native_object.GetLocationMode) === 'function';
},
},
created() {
console.log(this.$store.getters.user.user.dept.deptId)
this.deptId = this.$store.getters.user.user.dept.deptId;
@@ -243,9 +171,11 @@
},
mounted() {
// 初始化地图
setTimeout(() => {
this.initMap();
}, 500);
listLandQuery().then(response => {
setTimeout(() => {
this.initMap(response.rows);
}, 500);
});
},
methods: {
onClickLeft(){
@@ -269,8 +199,15 @@
this.villageBorderLayerName = response.msg;
});
},
guidProduct(){
return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {
var r = Math.random() * 16 | 0,
v = c == 'x' ? r : (r & 0x3 | 0x8);
return v.toString(16);
});
},
// 初始化地图
initMap() {
initMap(resourceList) {
getDept(this.deptId).then(response => {
let dept = response.data;
if (dept.longitude && dept.latitude) {
@@ -355,64 +292,100 @@

});
});
var mark_layer = null;
function addMark(lng, lat) {
if(!mark_layer)
{
mark_layer = new ol.layer.Vector({
source: new ol.source.Vector(),
});
that.map.addLayer(mark_layer);
}
else
mark_layer.getSource().clear();

let newFeature = new ol.Feature({
geometry: new ol.geom.Point(ol.proj.fromLonLat([lng, lat])), //几何信息
//name: "标注点",
});
newFeature.setStyle(new ol.style.Style({
image: new ol.style.Icon({
//设置图标偏移
anchor: [0.5, 0.5],
//标注样式的起点位置
anchorOrigin: "top-right",
//X方向单位:分数
anchorXUnits: "fraction",
//Y方向单位:像素
anchorYUnits: "fraction",
//偏移起点位置的方向
offsetOrigin: "top-right",
//透明度
opacity: 0.9,
//图片路径
src: require('../../assets/images/app/mark.png'),
}),
zIndex: 9999,
}));
mark_layer.getSource().addFeature(newFeature);
}
var that = this;
var Zb;
$("#" + this.locationMap).click(function () {
that.getCurrentLocation(res => {
if (res.code == 200) {
let lat = res.data.lat;
let lng = res.data.lng;
if(lat && lng){
Zb = [lng,lat];
}else {
Zb =[115.452752, 31.789033];
}
addMark(lng,lat);
that.map.getView().animate({
// 只设置需要的属性即可
center: ol.proj.fromLonLat(Zb), // 中心点
zoom: 18, // 缩放级别
rotation: undefined, // 缩放完成view视图旋转弧度
duration: 1000, // 缩放持续时间,默认不需要设置
});
}
});
});
// 地图点击事件
this.map.on("click", (evt) => {
// 点击宅基地查看详情
console.log(this.landLayer)
if (this.landLayer) {
const viewResolution = this.map.getView().getResolution();
const url = this.landLayer.getSource()
.getFeatureInfoUrl(evt.coordinate, viewResolution, 'EPSG:3857', {'INFO_FORMAT': 'application/json'});
console.log(url)
if (url) {
fetch(url)
.then(response => response.json())
.then(data => {
if (data.features.length > 0) {
let id = data.features[0].id.split(".")[1];
getDk(id).then(response => {
const data = response.data;
this.reset();
this.form = data;
this.syqxzText = this.selectDictLabel(this.syqxzOptions, data.syqxz);
if (data.dklb === '10') {
this.dklbText = '承包地块';
} else {
this.dklbText = this.selectDictLabel(this.dklbOptions, data.dklb);
}
this.dldjText = this.selectDictLabel(this.dldjOptions, data.dldj);
this.tdytText = this.selectDictLabel(this.tdytOptions, data.tdyt);
this.tdlylxText = this.selectDictLabel(this.tdlylxOptions, data.tdlylx);
this.title = "查看地块信息";
this.showSaveBtn = false;
this.showDeleteBtn = true;
// this.isDisabled = true;
let id = data.features[0].properties.DKBM;
getLandDetailByDkbm(id).then(response => {
this.form = response.data;
setTimeout(() => {
this.open = true;
}, 10);
});

/* if (this.selectedHomesteadLayer) {
this.map.removeLayer(this.selectedHomesteadLayer);
this.selectedHomesteadLayer = "";
}
this.selectedHomesteadLayer = new ol.layer.Vector({
source: new ol.source.Vector({
features: new ol.format.GeoJSON().readFeatures(data)
}),
name: 'selectedHomesteadLayer',
style: new ol.style.Style({
fill: new ol.style.Fill({
//矢量图层填充颜色,以及透明度
color: "rgba(255, 84, 87, 0.3)",
}),
stroke: new ol.style.Stroke({
//边界样式
color: "#ff5457",
width: 3,
}),
})
}, 500);
});
// this.map.addLayer(this.selectedHomesteadLayer);
this.map.getLayers().insertAt(4, this.selectedHomesteadLayer);*/
// getLandDetail(id).then(response => {
// // this.form = response.data;
// getLandDetailByDkbm(response.data.dkbm).then(res => {
// res.data.txmj = response.data.txmj;
// this.form = res.data;
// });
// // getOperationDetailByDkbm(response.data.dkbm).then(response => {
// // this.form = response.data
// // })
// setTimeout(() => {
// this.open = true;
// }, 500);
// });
}
});
}
@@ -427,6 +400,105 @@
}
this.addLandLayer();
},
getLocationMode() {
let mode = '';
if(this.hasGetLocationMode)
{
mode = window._Native_object.GetLocationMode();
}
console.log('当前选择定位模式: ' + mode);
return mode;
},
getLocationTimeout() {
let timeout = 10000;
if(this.hasGetLocationMode)
{
let to = window._Native_object.GetLocationTimeout();
if(to <= 0)
to = 30000;
timeout = to;
}
console.log('当前选择定位超时: ' + timeout);
return timeout;
},
getDeptLocation(callback) {
getQueryLand().then((response) => {
if (response.code == 200) {
let InsertCode = response.data;
if (InsertCode != null) {
var lat = InsertCode.lat;
var lng = InsertCode.lng;
if(lat !=null && lng !=null && lat !="" && lng !=""){
callback(response);
return;
}
}
}
this.getCurrentLocation(callback);
});
},
getCurrentLocation(callback) {
// 1. 首先尝试Android宿主端
if(this.isAndroid) // Android层注入全局对象
{
let mode = this.getLocationMode();
if(mode !== 'h5')
{
console.log('使用Native获取定位');
let coord = window._Native_object.GetLocation(null);
console.log('Native坐标: ' + coord);
if(coord)
{
let arr = coord.split(',');
let res = {
code: 200,
data: {
lng: arr[0],
lat: arr[1],
},
};
callback(res);
return;
}
}
}

// 2. 再尝试浏览器
if (navigator.geolocation) {
console.log('使用浏览器获取定位');
const loading = Toast.loading({
message: '定位中...',
duration: 0,
});
let timeout = this.getLocationTimeout();
navigator.geolocation.getCurrentPosition(
(position) => {
const { latitude, longitude } = position.coords;
console.log('浏览器定位结果: 经纬度=' + longitude + ', ' + latitude);
let res = {
code: 200,
data: {
lng: longitude,
lat: latitude,
},
};
loading.clear();
callback(res);
},
(error) => {
loading.clear();
console.log('定位失败: ' + error.message);
getQueryLand().then(callback);
},
{ enableHighAccuracy: true, timeout: timeout }
);
return;
}

// 最后使用地区坐标
console.log('使用地区坐标定位');
getQueryLand().then(callback);
},
// 添加地块图层
addLandLayer() {
this.landLayer = new ol.layer.Image({


src/views/app/attribute_edit.vue → src/views/app/project/attribute_edit.vue Просмотреть файл


src/views/app/detail.vue → src/views/app/project/detail.vue Просмотреть файл

@@ -41,7 +41,7 @@
<van-field readonly v-model="form.jyjssj" label="经营结束时间" placeholder="请输入" input-align="right" label-width="auto" />
<van-field readonly v-model="form.cbje" label="承包金额(元)" placeholder="请输入" input-align="right" label-width="auto" />
<van-field readonly v-model="form.surveyStatus" label="调查状态" placeholder="请输入" input-align="right" label-width="auto" />
<van-field readonly v-model="form.bz" label="备注信息" placeholder="请输入" input-align="right" label-width="auto" />
<van-field readonly v-model="form.bzxx" label="备注信息" placeholder="请输入" input-align="right" label-width="auto" />
<van-field readonly label="实物图" placeholder="" input-align="right" label-width="auto" />
<div v-if="!!form.dkImg">
<el-tooltip effect="light" :content="item" placement="bottom" v-for="(item, index) in form.dkImg.split(',')" :key="index">

src/views/app/list.vue → src/views/app/project/list.vue Просмотреть файл

@@ -46,7 +46,7 @@
</div>
</div>
<template #right>
<div style="background-color: #29D2AF;height: 100%" @click="$router.push({name:'appAttributeEdit',query:{fid:item.fid}})">属性<br/>修改</div>
<div style="background-color: #29D2AF;height: 100%" @click="$router.push({name:'appAttributeEdit',query:{dkbm:item.dkbm}})">属性<br/>修改</div>
<div style="background-color: #0E82EB;height: 100%" @click="$router.push({name:'appOperateEdit',query:{dkbm:item.dkbm}})">经营<br/>修改</div>
<div style="background-color: #ee0a24;height: 100%" @click="handleDelete(item)">删除</div>
</template>

src/views/app/operate_edit.vue → src/views/app/project/operate_edit.vue Просмотреть файл

@@ -124,8 +124,8 @@
<script>
// import { getMenuApp } from "@/api/app/index";
import Cookies from "js-cookie";
import { getLandDetailByDkbm } from "@/api/resource/land"
import { getOperation, updateOperation, addOperation } from "@/api/resource/operation"
import { getLandDetail } from "@/api/resource/land"
import { getOperation, getOperationDetail, updateOperation, addOperation } from "@/api/resource/operation"
import {getInfoByImportCode} from "@/api/system/dept";
export default {
dicts: ['zjlx', 'survey_status', 'is_common', 'jydxlx', 'jyfs'],
@@ -156,24 +156,24 @@
history.back(-1);
},
getDetail(){
getLandDetailByDkbm(this.$route.query.dkbm).then(response => {
if (!response.data.id){
getOperationDetail(this.$route.query.dkbm).then(response => {
if (response.data){
response.data.jyfsText = this.selectDictLabel(this.dict.type.jyfs,response.data.jyfs);
response.data.jydxlxText = this.selectDictLabel(this.dict.type.jydxlx,response.data.jydxlx);
response.data.jydxzjlxText = this.selectDictLabel(this.dict.type.zjlx,response.data.jydxzjlx);
response.data.sfqdhtText = this.selectDictLabel(this.dict.type.is_common,response.data.sfqdht);
response.data.surveyStatusText = this.selectDictLabel(this.dict.type.survey_status,response.data.surveyStatus);
this.jykssj = new Date(response.data.jykssj);
this.jyjssj = new Date(response.data.jyjssj);
this.form = response.data
}else{
getOperation(response.data.id).then(response => {
response.data.jyfsText = this.selectDictLabel(this.dict.type.jyfs,response.data.jyfs);
response.data.jydxlxText = this.selectDictLabel(this.dict.type.jydxlx,response.data.jydxlx);
response.data.jydxzjlxText = this.selectDictLabel(this.dict.type.zjlx,response.data.jydxzjlx);
response.data.sfqdhtText = this.selectDictLabel(this.dict.type.is_common,response.data.sfqdht);
response.data.surveyStatusText = this.selectDictLabel(this.dict.type.survey_status,response.data.surveyStatus);
this.jykssj = new Date(response.data.jykssj);
this.jyjssj = new Date(response.data.jyjssj);
getLandDetail(this.$route.query.dkbm).then(response => {
this.form = response.data
})
}
getInfoByImportCode(response.data.importCode).then((res) => {
this.form.deptId = res.data.deptId
});
// getInfoByImportCode(response.data.importCode).then((res) => {
// this.form.deptId = res.data.deptId
// });
});
},
onConfirmJydxlx(value) {

+ 167
- 0
src/views/app/user/info.vue Просмотреть файл

@@ -0,0 +1,167 @@
<template>
<div class="home_wrapper">
<van-nav-bar
title="用户信息维护"
left-arrow
placeholder
safe-area-inset-top
@click-left="onClickLeft"
/>

<van-form @submit="onSubmit">
<div class="main">
<p class="title"><i></i>用户信息</p>
<van-field
required
:rules="[{ required: true }]"
v-model="form.nickName"
label="用户昵称"
placeholder="请输入"
input-align="right"
label-width="auto"
/>
<van-field
required
:rules="[
{ required: true },
{
pattern: /^1[3|4|5|6|7|8|9][0-9]\d{8}$/,
message: '请输入正确的手机号码',
trigger: 'blur'
}
]"
v-model="form.phonenumber"
label="手机号码"
placeholder="请输入"
input-align="right"
label-width="auto"
/>
<van-field
required
:rules="[
{ required: true },
{
type: 'email',
message: '请输入正确的邮箱地址',
trigger: ['blur', 'change']
}
]"
v-model="form.email"
label="邮箱"
placeholder="请输入"
input-align="right"
label-width="auto"
/>
<van-field
required
:rules="[{ required: true }]"
label="性别"
input-align="right"
label-width="auto"
>
<van-radio-group slot="input" v-model="form.sex" direction="horizontal">
<van-radio name="0">男</van-radio>
<van-radio name="1">女</van-radio>
</van-radio-group>
</van-field>
</div>

<van-button round block type="primary" native-type="submit" class="subClass">提交</van-button>
</van-form>

</div>
</template>

<script>
// import { getMenuApp } from "@/api/app/index";
import Cookies from "js-cookie";
import { getUserProfile } from "@/api/system/user"
import { updateUserProfile } from "@/api/system/user"
export default {
name: "appUserInfo",
data() {
return {
form: {},
user: {},
};
},
created() {

this.getUser()
},
methods: {
onClickLeft(){
history.back(-1);
},
getUser() {
getUserProfile().then(response => {
this.form = response.data
this.roleGroup = response.roleGroup
this.postGroup = response.postGroup
})
},
onSubmit() {
updateUserProfile(this.form).then(response => {
this.$modal.msgSuccess("修改成功")
setTimeout(function(){
history.back(-1);
},2000)
})
},

},
};
</script>

<style scoped lang="scss">
p{margin: 0;}
.home_wrapper{
width: 100vw;
min-height: 100vh;
background: #F6F9FB;
padding-bottom: 5vh;
}
.van-nav-bar{
background: linear-gradient( 173deg, #91E2D3 0%, #CDFCF0 100%);
::v-deep.van-icon{
color: #000000;
}
}
.main{
width: 94%;
margin: 3vw auto;
padding: 3vw;
background-color: #ffffff;
border-radius: 10px;
overflow: hidden;

}
.title{
display: flex;
align-items: center;
font-size: 20px;
font-weight: bold;
margin-bottom: 10px;
i{
width: 5px;
height: 20px;
display: block;
background-color: #29D2AF;
margin-right: 10px;
}
}
.subClass{
background: linear-gradient( 270deg, #53E4A5 0%, #24DBDB 100%);
border-radius: 50px 50px 50px 50px;
border: none;
width: 90%;
margin: 3vw auto;
height: 50px;
display: flex;
align-items: center;
justify-content: center;
color: #ffffff;
font-size: 18px;
}

</style>

+ 147
- 0
src/views/app/user/passWord.vue Просмотреть файл

@@ -0,0 +1,147 @@
<template>
<div class="home_wrapper">
<van-nav-bar
title="修改密码"
left-arrow
placeholder
safe-area-inset-top
@click-left="onClickLeft"
/>

<van-form @submit="onSubmit">
<div class="main">
<p class="title"><i></i>修改密码</p>
<van-field
required
:rules="[{ required: true }]"
v-model="user.oldPassword"
label="旧密码"
placeholder="请输入"
input-align="right"
label-width="auto"
/>
<van-field
required
v-model="user.newPassword"
:rules="[{ validator, message: '包含非法字符,重新输入' }]"
label="新密码"
placeholder="请输入"
input-align="right"
label-width="auto"
/>
<van-field
required
:rules="[{ required: true }]"
v-model="user.confirmPassword"
label="确认密码"
placeholder="请输入"
input-align="right"
label-width="auto"
/>
</div>

<van-button round block type="primary" native-type="submit" class="subClass">提交</van-button>
</van-form>

</div>
</template>

<script>
// import { getMenuApp } from "@/api/app/index";
import Cookies from "js-cookie";
import { updateUserPwd } from "@/api/system/user"
export default {
name: "appUserInfo",
data() {
return {
form: {},
user: {
oldPassword: undefined,
newPassword: undefined,
confirmPassword: undefined
}
};
},
created() {

},
methods: {
onClickLeft(){
history.back(-1);
},
validator(val) {
return /^[^<>"'|\\]+$/.test(val);
},
onSubmit() {
if(this.user.newPassword.length < 6 || this.user.newPassword.length > 20){
this.$modal.msgWarning("长度在 6 到 20 个字符");
return;
}
if (this.user.newPassword != this.user.confirmPassword){
this.$modal.msgWarning("两次输入的密码不一致");
return;
}
updateUserPwd(this.user.oldPassword, this.user.newPassword).then(response => {
this.$modal.msgSuccess("修改成功")
setTimeout(function(){
history.back(-1);
},2000)
})
},

},
};
</script>

<style scoped lang="scss">
p{margin: 0;}
.home_wrapper{
width: 100vw;
min-height: 100vh;
background: #F6F9FB;
padding-bottom: 5vh;
}
.van-nav-bar{
background: linear-gradient( 173deg, #91E2D3 0%, #CDFCF0 100%);
::v-deep.van-icon{
color: #000000;
}
}
.main{
width: 94%;
margin: 3vw auto;
padding: 3vw;
background-color: #ffffff;
border-radius: 10px;
overflow: hidden;

}
.title{
display: flex;
align-items: center;
font-size: 20px;
font-weight: bold;
margin-bottom: 10px;
i{
width: 5px;
height: 20px;
display: block;
background-color: #29D2AF;
margin-right: 10px;
}
}
.subClass{
background: linear-gradient( 270deg, #53E4A5 0%, #24DBDB 100%);
border-radius: 50px 50px 50px 50px;
border: none;
width: 90%;
margin: 3vw auto;
height: 50px;
display: flex;
align-items: center;
justify-content: center;
color: #ffffff;
font-size: 18px;
}

</style>

src/views/app/user.vue → src/views/app/user/user.vue Просмотреть файл

@@ -5,28 +5,28 @@

<div class="header">
<div class="left">
<div class="avatar"><img src="../../assets/images/app/user_header.png" alt=""></div>
<div class="avatar"><img src="../../../assets/images/app/user_header.png" alt=""></div>
<div class="info">
<p>张晋升</p>
<p>常家围子村委会</p>
<p>{{$store.getters.user.user.nickName}}</p>
<p>{{$store.getters.user.user.dept.deptName}}</p>
</div>
</div>
</div>

<div class="content">
<van-cell title="用户信息" is-link center :border="false">
<van-cell title="用户信息" is-link center :border="false" @click="$router.push({name:'appUserInfo'})">
<template slot="icon">
<img src="../../assets/images/app/user_icon_01.png" width="25" alt="">
<img src="../../../assets/images/app/user_icon_01.png" width="25" alt="">
</template>
</van-cell>
<van-cell title="修改密码" is-link center :border="false">
<van-cell title="修改密码" is-link center :border="false" @click="$router.push({name:'appUserPassWord'})">
<template slot="icon">
<img src="../../assets/images/app/user_icon_02.png" width="25" alt="">
<img src="../../../assets/images/app/user_icon_02.png" width="25" alt="">
</template>
</van-cell>
<van-cell title="退出登录" is-link center :border="false">
<van-cell title="退出登录" is-link center :border="false" @click="logout">
<template slot="icon">
<img src="../../assets/images/app/user_icon_03.png" width="25" alt="">
<img src="../../../assets/images/app/user_icon_03.png" width="25" alt="">
</template>
</van-cell>
</div>
@@ -36,6 +36,7 @@

<script>
import Cookies from "js-cookie";
import {Dialog} from "vant";
export default {
name: "appUser",
data() {
@@ -49,6 +50,21 @@
methods: {
goBack(){
history.go(-1)
},
logout() {

Dialog.confirm({
title: '提示',
message: '确定注销并退出系统吗?',
})
.then(() => {
this.$store.dispatch('LogOut').then(() => {
location.href = '/app/login'
})
})
.catch(() => {
// on cancel
});
}
},
};
@@ -59,7 +75,7 @@
.home_wrapper{
width: 100vw;
min-height: 100vh;
background: #F6F9FB url('../../assets/images/app/user_bg.png') no-repeat center top;
background: #F6F9FB url('../../../assets/images/app/user_bg.png') no-repeat center top;
background-size: 100% auto;
padding: 5vh 4vw 0;
}
@@ -109,7 +125,7 @@
border: 2px solid #FFFFFF;
overflow: hidden;
.title{
background: url("../../assets/images/app/title_bg.png") no-repeat left 10px;
background: url("../../../assets/images/app/title_bg.png") no-repeat left 10px;
font-size: 2.2vh;
font-weight: bold;
padding-bottom: 10px;

Загрузка…
Отмена
Сохранить