浏览代码

Merge remote-tracking branch 'origin/master'

master^2
yangfuda 2 个月前
父节点
当前提交
b64bb57537
共有 32 个文件被更改,包括 2299 次插入442 次删除
  1. +1
    -0
      package.json
  2. +35
    -0
      src/api/business/export.js
  3. +8
    -0
      src/api/system/config.js
  4. 二进制
      src/assets/images/app/copy.png
  5. 二进制
      src/assets/images/app/mark.png
  6. +160
    -0
      src/components/form/CommonUpload.vue
  7. +107
    -0
      src/components/form/FieldCalender.vue
  8. +216
    -0
      src/components/form/FieldCascadeSelect.vue
  9. +262
    -0
      src/components/form/FieldCascader.vue
  10. +91
    -0
      src/components/form/FieldCheckbox.vue
  11. +196
    -0
      src/components/form/FieldDatePicker.vue
  12. +111
    -0
      src/components/form/FieldRadio.vue
  13. +190
    -0
      src/components/form/FieldSelect.vue
  14. +2
    -0
      src/main.js
  15. +24
    -6
      src/router/index.js
  16. +1
    -0
      src/store/getters.js
  17. +8
    -0
      src/store/modules/user.js
  18. +8
    -5
      src/views/app/index.vue
  19. +315
    -304
      src/views/app/map.vue
  20. +0
    -0
      src/views/app/project/attribute_edit.vue
  21. +1
    -1
      src/views/app/project/detail.vue
  22. +21
    -7
      src/views/app/project/list.vue
  23. +84
    -85
      src/views/app/project/operate_edit.vue
  24. +167
    -0
      src/views/app/user/info.vue
  25. +147
    -0
      src/views/app/user/passWord.vue
  26. +28
    -19
      src/views/app/user/user.vue
  27. +90
    -4
      src/views/business/export/index.vue
  28. +1
    -0
      src/views/business/import/index.vue
  29. +8
    -8
      src/views/index.vue
  30. +8
    -1
      src/views/resource/land/index.vue
  31. +7
    -0
      src/views/resource/operation/index.vue
  32. +2
    -2
      vue.config.js

+ 1
- 0
package.json 查看文件

@@ -44,6 +44,7 @@
"splitpanes": "2.4.1",
"vant": "^2.13.9",
"vue": "2.6.12",
"vue-clipboard2": "^0.3.3",
"vue-count-to": "1.0.13",
"vue-cropper": "0.5.5",
"vue-router": "3.4.9",


+ 35
- 0
src/api/business/export.js 查看文件

@@ -60,3 +60,38 @@ export function printExport(query) {
params: query
})
}

// 开始导出任务
export function startExport(id) {
return request({
url: '/business/export/start/' + id,
method: 'post',
})
}

// 导出任务日志
export function exportLog(id, offset) {
return request({
url: '/business/export/log/' + id,
method: 'get',
params: {offset}
})
}

// 下载导出任务日志
export function downloadLog(id) {
return request({
url: '/business/export/downloadLog/' + id,
method: 'get',
responseType: 'blob',
})
}

// 下载导出任务文件
export function downloadFile(id) {
return request({
url: '/business/export/downloadFile/' + id,
method: 'get',
responseType: 'blob',
})
}

+ 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/copy.png 查看文件

之前 之后
宽度: 16  |  高度: 16  |  大小: 273 B

二进制
src/assets/images/app/mark.png 查看文件

之前 之后
宽度: 48  |  高度: 48  |  大小: 482 B

+ 160
- 0
src/components/form/CommonUpload.vue 查看文件

@@ -0,0 +1,160 @@
<!-- 通用上传组件 zhao -->

<template>
<van-uploader
v-model="fileList"
:multiple="multiple"
:after-read="afterRead"
:show-upload="showUpload"
:deletable="deletable"
@delete="deleteFile"
:accept="accept || null"
/>
</template>

<script>

import {commonUpload} from "@/api/sunVillage_info/fixedAssets";

export default {
name: "commonUpload",
props: {
name: String,
value: { // 绑定值 字符串 ,分隔 可监听
type: String,
default: null,
},
accept: { // 上传类型限制: 默认图片, * = 任意类型
type: String,
},
multiple: { // 多文件上传
type: Boolean,
default: false,
},
deletable: { // 允许删除
type: Boolean,
default: true,
},
showUpload: { // 显示上传按钮
type: Boolean,
default: true,
},
formData: { // 额外请求参数
type: Object,
default: function() {
return {};
},
},
file: { // 上传文件字段名
type: String,
default: 'file',
},
host: {
type: String, // 文件地址前缀
default: '/api',
},
},
watch: {
value: function (newVal, oldVal) {
if(newVal != this.internalValue)
this.setInternalValue(newVal);
},
},
created() {
this.parseValue(this.value);
},
data() {
return {
internalValue: this.value,
fileList: [],
pathList: [],
};
},
methods: {
setInternalValue(newVal) {
this.parseValue(newVal);
this.internalValue = newVal;
},
parseValue(data) {
if(data)
{
this.pathList = data.split(',');
}
else
{
this.pathList = [];
}
this.fileList = this.pathList.map((x) => {
return {
url: this.host + x,
};
});
},
makeFormData() {
let fd = new FormData();
if(this.formData)
{
for(let k of Object.keys(this.formData))
{
fd.set(k, this.formData[k]);
}
}
return fd;
},
upload(file) {
let params1 = this.makeFormData();
params1.append(this.file, file.file);
return commonUpload(params1).then((resp) => {
this.pathList.push(resp.fileName);
this.updateInternalValue();
this.$emit('upload', resp.fileName);
});
},
afterRead(file) {
this.$toast.loading({
message: "上传中...",
forbidClick: true,
duration: 0,
});
// 此时可以自行将文件上传至服务器
if (file instanceof Array) {//判断是否为数组,单张图片为array,多张为数组,数组返回true否则为false
if(file.length > 0)
{
let index = 0;
const f = () => {
if(index >= file.length)
return;
let up = file[index];
//console.log(up);
console.log(`上传文件: ${index} -> ${up.file.name}`);
this.upload(up).then(() => {
index++;
if(index < file.length)
f();
});
};
f();
}
} else {
this.upload(file);
}
},
deleteFile(detail){
this.pathList.splice(detail.index,1);
this.updateInternalValue();
this.$emit('remove', detail.index);
},
updateInternalValue() {
let files = this.pathList.join(',');
console.log(files);
this.internalValue = files;
if(this.internalValue != this.value)
this.$emit('input', this.internalValue);
},
},
}
</script>

<style scoped>

</style>

+ 107
- 0
src/components/form/FieldCalender.vue 查看文件

@@ -0,0 +1,107 @@
<!-- 日历表单组件 zhao -->
<template>
<!-- !!!注: 不支持逝去的日子, 以`FieldDatePicker`代替 !!! -->
<div>
<van-field
:readonly="true"
:clickable="!readonly"
:name="name"
:value="visibleValue"
:label="label"
:placeholder="placeholder"
@click="openPopup"
input-align="right"
right-icon="arrow-down"
:rules="rules"
:required="required"
:label-width="labelWidth || 'auto'"
>
<!-- <template #button>
<van-icon name="notes-o" size="20"/>
</template>-->
</van-field>
<van-calendar
ref="calender"
v-model="popupVisible"
:title="label"
:default-date="internalValue"
:readonly="readonly"
@confirm="onConfirm" />
</div>
</template>

<script>

import { formatDate } from "element-ui/src/utils/date-util.js"

export default {
name: "FieldCalender",
props: [
'name', 'readonly', 'value', 'label', 'placeholder', 'required', 'rules', 'labelWidth',
'formatter', // value的格式化 String|Function|undefined 字符串为格式字符串, 函数则必须有返回 undefined则不转换
],
watch: {
value: function (newVal, oldVal) {
this.visibleValue = newVal;
this.internalValue = new Date(newVal);
},
},
created() {
if(this.value)
{
this.visibleValue = this.value;
this.internalValue = new Date(this.value);
}
},
data() {
return {
popupVisible: false,
internalValue: new Date(this.value || Date.now()),
visibleValue: this.value,
loading: false,
};
},
methods: {
openPopup() {
if(!this.readonly)
{
this.popupVisible = true;
this.$nextTick(() => {
this.$refs.calender.scrollToDate(this.internalValue);
})
}
},
closePopup() {
this.popupVisible = false;
},
onConfirm(data) {
this.syncValue(data);
this.$emit('input', this.visibleValue);
this.$emit('confirm', this.visibleValue, this.internalValue);
this.closePopup();
},
onCancel() {
this.closePopup();
this.$emit('cancel');
},
getValue(data) {
let type = typeof(this.formatter);
if(type === 'function')
return this.formatter(data);
else if(type === 'string')
return formatDate(data, this.formatter);
else
return data;
},
syncValue(data) {
this.internalValue = data;
this.visibleValue = this.getValue(data);
console.log(this.internalValue, this.visibleValue);
},
},
}
</script>

<style scoped>

</style>

+ 216
- 0
src/components/form/FieldCascadeSelect.vue 查看文件

@@ -0,0 +1,216 @@
<!-- 下拉列表表单组件 zhao -->
<template>
<div>
<van-field
:readonly="true"
:clickable="!readonly"
:name="name"
:value="visibleValue"
:label="label"
:placeholder="placeholder"
@click="openPopup"
input-align="right"
right-icon="arrow-down"
:rules="rules"
:required="required"
:label-width="labelWidth || 'auto'"
>
</van-field>
<van-popup v-model="popupVisible" position="bottom">
<van-picker
ref="picker"
:title="label"
show-toolbar
:columns="columns ? columns : remoteColumns"
:readonly="readonly"
:value-key="valueKey"
:loading="loading"
@confirm="onConfirm"
@cancel="onCancel"
@change="onChanged"
/>
</van-popup>
</div>
</template>

<script>
import request from "@/utils/request";

export default {
name: "fieldCascadeSelect",
props: [
'name', 'readonly', 'value', 'label', 'placeholder', 'required', 'rules', 'labelWidth',
'columns', // 列表数据 Array
'valueKey', // 名称键名 String
'dataKey', // 值键名 String
'remoteUrl', // 远程列表加载地址 String
'onRemoteResponse', // 远程获取到结果的处理回调 String|Function 如果是函数需返回数组, 如果是字符串支持.分割
'clearable', // 点击取消时清空绑定值
],
watch: {
value: function (newVal, oldVal) {
this.internalValue = newVal;
this.visibleValue = newVal ? newVal.join(' / ') : '';
this.syncIndex();
},
columns: function (newVal, oldVal) {
this.syncIndex();
},
remoteUrl: function (newVal, oldVal) {
this.requestRemote();
},
onRemoteResponse: function (newVal, oldVal) {
this.parseRemote();
}
},
created() {
if(this.remoteUrl)
this.requestRemote();
},
data() {
return {
popupVisible: false,
internalValue: this.value,
visibleValue: '',
defaultIndex: [],
remoteColumns: null,
loading: false,
remoteResponse: null,
};
},
methods: {
openPopup() {
if(!this.readonly)
{
this.popupVisible = true;
this.$nextTick(() => {
this.$refs.picker.setIndexes(this.defaultIndex);
})
}
},
closePopup() {
this.popupVisible = false;
},
onChanged(data) {
this.$emit('change', data);
},
onConfirm(data) {
this.syncValue(data);
this.$emit('input', this.internalValue);
this.$emit('confirm', this.internalValue);
this.closePopup();
},
onCancel() {
this.closePopup();
this.$emit('cancel');
if(this.clearable)
{
this.visibleValue = '';
this.internalValue = [];
this.$emit('input', this.internalValue);
}
},
getValue(data) {
return typeof(data) === 'object' && this.dataKey ? data[this.dataKey] : data;
},
getLabel(data) {
return typeof(data) === 'object' && this.valueKey ? data[this.valueKey] : data;
},
syncValue(data) {
let res = [];
for(let a of data)
{
res.push(this.getValue(a));
}
this.internalValue = res;
res = [];
for(let a of data)
{
res.push(this.getLabel(a));
}
this.visibleValue = res.join(' / ');
},
syncIndex() {
let columns = this.getColumns();
if(!columns)
return -1;
let arr = [];
let dataArr = [];
let ptr = columns;
for(let i = 0; i < this.internalValue.length; i++)
{
if(!ptr)
break;
let p = null;
for(let m = 0; m < ptr.length; m++)
{
if(this.getValue(ptr[m]) == this.internalValue[i]) {
arr.push(m);
dataArr.push(ptr[m]);
p = ptr[m];
break;
}
}
if(p)
ptr = p.children;
}
if(arr.length)
{
this.defaultIndex = arr;
this.visibleValue = dataArr.map((x) => this.getLabel(x)).join(' / ');
this.onChanged(dataArr);
return dataArr;
}
if(1) // 不存在
{
this.defaultIndex = [];
this.visibleValue = (this.internalValue || []).join(' / ');
this.onChanged([]);
}
return -1;
},
getColumns() {
return this.columns ? this.columns : this.remoteColumns;
},
requestRemote() {
if(!this.remoteUrl)
return;
this.loading = true;
this.remoteColumns = [];
let promise = typeof(this.remoteUrl) === 'function' ? this.remoteUrl() : (this.remoteUrl instanceof Promise ? this.remoteUrl : request(this.remoteUrl));
promise.then((resp) => {
this.remoteResponse = resp;
this.parseRemote();
this.syncIndex();
}).catch((e) => {
console.error(e);
}).finally(() => {
this.loading = false;
})
},
parseRemote() {
if(!this.remoteResponse)
return;
let type = typeof(this.onRemoteResponse);
if(type === 'function')
this.remoteColumns = this.onRemoteResponse(this.remoteResponse);
else if(type === 'string')
{
let arr = this.onRemoteResponse.split('.');
let ptr = this.remoteResponse;
for(let i in arr)
{
ptr = this.remoteResponse[arr[i]];
}
this.remoteColumns = ptr;
}
else
this.remoteColumns = this.remoteResponse;
},
},
}
</script>

<style scoped>

</style>

+ 262
- 0
src/components/form/FieldCascader.vue 查看文件

@@ -0,0 +1,262 @@
<!-- 级联树选择器表单组件 zhao -->
<template>
<div>
<van-field
:readonly="true"
:clickable="!readonly"
:name="name"
:value="visibleValue"
:label="label"
:placeholder="placeholder"
@click="openPopup"
input-align="right"
right-icon="arrow-down"
:rules="rules"
:required="required"
:label-width="labelWidth || 'auto'"
>
</van-field>
<van-popup v-model="popupVisible" position="bottom">
<van-cascader
ref="picker"
:title="label"
v-model="internalValue"
:placeholder="placeholder || '请选择'"
:options="internalOptions"
:readonly="readonly"
:loading="loading"
:field-names="{
text: textName || 'text',
value: valueName || 'value',
children: childrenName || 'children',
}"
@finish="onConfirm"
@close="onCancel"
@change="onChanged"
/>
</van-popup>
</div>
</template>

<script>
import request from "@/utils/request";

export default {
name: "fieldCascader",
props: [
'name', 'readonly', 'value', 'label', 'placeholder', 'required', 'rules', 'labelWidth',
'options', // 树结构数组/普通数组
'textName', // 名称键名 String 默认text
'valueName', // 值键名 String 默认value
'remoteUrl', // 远程列表加载地址 String
'onRemoteResponse', // 远程获取到结果的处理回调 String|Function 如果是函数需返回数组, 如果是字符串支持.分割
'childrenName', // 子级数组键名 String 默认children
'parentName', // 父的值键名 String 如果不为空 则自动转数组为树树结构数组 String
'showTextAndValue', // 是否显示值和键 Bool|String 字符串为分隔符, true为空字符串
'showHasChildren', // 是否显示存在子级的标识 Bool|String 字符串为标识符, true为` >`
'clearable', // 点击取消时清空绑定值
],
watch: {
value: function (newVal, oldVal) {
if(newVal != this.internalValue)
{
this.internalValue = newVal;
this.syncIndex();
}
},
options: function (newVal, oldVal) {
this.internalOptions = this.makeTree(JSON.parse(JSON.stringify(newVal)));
this.handleTree(this.internalOptions);
this.syncIndex();
},
remoteUrl: function (newVal, oldVal) {
this.requestRemote();
},
onRemoteResponse: function (newVal, oldVal) {
this.parseRemote();
}
},
created() {
if(this.options && Array.isArray(this.options) && this.options.length > 0)
{
this.internalOptions = this.makeTree(JSON.parse(JSON.stringify(this.options)));
this.handleTree(this.internalOptions);
this.syncIndex();
}
else if(this.remoteUrl)
this.requestRemote();
},
data() {
return {
popupVisible: false,
internalValue: this.value,
visibleValue: '',
defaultIndex: 0,
internalOptions: [],
loading: false,
remoteResponse: null,
};
},
methods: {
openPopup() {
if(!this.readonly)
{
this.popupVisible = true;
this.$nextTick(() => {
//this.$refs.picker.setIndexes([this.defaultIndex]);
})
}
},
closePopup() {
this.popupVisible = false;
},
onChanged({ value, selectedOptions, tabIndex }) {
this.$emit('change', { value, selectedOptions, });
},
onConfirm({ value, selectedOptions, tabIndex }) {
this.syncValue(value, selectedOptions[selectedOptions.length - 1]);
this.$emit('input', this.internalValue);
this.$emit('confirm', this.internalValue);
this.closePopup();
},
onCancel() {
this.closePopup();
this.$emit('cancel');
if(this.clearable)
{
this.visibleValue = '';
this.internalValue = null;
this.$emit('input', this.internalValue);
}
},
getValue(data) {
return typeof(data) === 'object' && this.valueName ? data[this.valueName] : data;
},
getLabel(data) {
return typeof(data) === 'object' && this.textName ? data[this.textName] : data;
},
syncValue(value, data) {
this.internalValue = value;
this.visibleValue = this.getLabel(data);
},
requestRemote() {
if(!this.remoteUrl)
return;
this.loading = true;
this.internalOptions = [];
let promise = typeof(this.remoteUrl) === 'function' ? this.remoteUrl() : (this.remoteUrl instanceof Promise ? this.remoteUrl : request(this.remoteUrl));
promise.then((resp) => {
this.remoteResponse = resp;
this.parseRemote();
}).catch((e) => {
console.error(e);
}).finally(() => {
this.loading = false;
})
},
parseRemote() {
if(!this.remoteResponse)
return;
let type = typeof(this.onRemoteResponse);
if(type === 'function')
this.internalOptions = this.makeTree(this.onRemoteResponse(this.remoteResponse));
else if(type === 'string')
{
let arr = this.onRemoteResponse.split('.');
let ptr = this.remoteResponse;
for(let i in arr)
{
ptr = this.remoteResponse[arr[i]];
}
this.internalOptions = this.makeTree(ptr);
}
else
this.internalOptions = this.makeTree(this.remoteResponse);
this.handleTree(this.internalOptions);
this.syncIndex();
},
makeTree(list) {
let parentName = this.parentName;
let valueName = this.valueName || 'value';
let childrenName = this.childrenName || 'children';
function isnull(p) {
return p === null || p === undefined || p === '';
}
function makeTree_r(l, p) {
const isRoot = isnull(p);
let res = [];
for(let v of l)
{
const parentValue = v[parentName];
const value = v[valueName];
if((isRoot && isnull(parentValue)) || (!isRoot && parentValue == p))
{
let arr = makeTree_r(l, value);
if(arr && arr.length > 0)
v[childrenName] = arr;
else
delete v[childrenName];
res.push(v);
}
}
return res;
}
if(this.parentName)
return makeTree_r(list);
else
return list;
},
handleTree(tree) {
if(!this.showTextAndValue && !this.showHasChildren)
return;
let split = this.showTextAndValue === false || this.showTextAndValue === undefined || this.showTextAndValue === null ? false : (typeof(this.showTextAndValue) === 'boolean' ? "" : this.showTextAndValue);
let hasChildren = this.showHasChildren === false || this.showHasChildren === undefined || this.showHasChildren === null ? false : (typeof(this.showHasChildren) === 'boolean' ? " >" : this.showHasChildren);
let textName = this.textName || 'text';
let valueName = this.valueName || 'value';
let childrenName = this.childrenName || 'children';
function handleTree_r(l) {
for(let v of l)
{
if(split !== false)
v[textName] = v[valueName] + split + v[textName];
if(v[childrenName] && Array.isArray(v[childrenName]) && v[childrenName].length > 0)
{
if(hasChildren !== false)
v[textName] = v[textName] + hasChildren;
handleTree_r(v[childrenName]);
}
}
}
handleTree_r(tree);
},
findTree(tree, value) {
let valueName = this.valueName || 'value';
let childrenName = this.childrenName || 'children';
function findTree_r(l) {
for(let v of l)
{
if(value == v[valueName])
return v;
if(v[childrenName] && Array.isArray(v[childrenName]) && v[childrenName].length > 0)
{
let res = findTree_r(v[childrenName]);
if(res !== undefined)
return res;
}
}
return;
}
return findTree_r(tree);
},
syncIndex() {
let item = this.findTree(this.internalOptions, this.internalValue);
if(item)
this.visibleValue = item[this.textName || 'text'];
}
},
}
</script>

<style scoped>

</style>

+ 91
- 0
src/components/form/FieldCheckbox.vue 查看文件

@@ -0,0 +1,91 @@
<!-- 状态单选框表单组件 zhao -->
<template>
<div>
<van-field
:readonly="true"
:clickable="!readonly"
:name="name"
:label="label"
:placeholder="placeholder"
input-align="right"
:required="required"
:label-width="labelWidth || 'auto'"
@click="toggle"
>
<template #right-icon>
<van-checkbox v-model="checked"
:disabled="readonly"
shape="square"
></van-checkbox>
</template>
</van-field>
</div>
</template>

<script>

export default {
name: "fieldCheckbox",
props: [
'name', 'readonly', 'value', 'label', 'placeholder', 'required', 'rules',
'labelWidth',
'trueLabel', // 选中的值
'falseLabel', // 未选中的值
],
watch: {
value: function (newVal, oldVal) {
this.parseValue(newVal);
},
checked: function (newVal, oldVal) {
if(newVal !== undefined)
this.onChanged(newVal);
},
},
created() {
this.parseValue(this.value);
},
data() {
return {
internalValue: this.value,
remoteColumns: null,
remoteResponse: null,
checked: false,
};
},
methods: {
onChanged(data) {
let trueLabel = this.getTrueLabel();
let falseLabel = this.getFalseLabel();
let res = data ? trueLabel : falseLabel;
if(res != this.internalValue)
{
this.internalValue = res;
this.$emit('change', this.internalValue);
this.$emit("input", this.internalValue);
}
},
getFalseLabel() {
return this.falseLabel !== undefined ? this.falseLabel : false;
},
getTrueLabel() {
return this.trueLabel !== undefined ? this.trueLabel : true;
},
parseValue(data) {
let trueLabel = this.getTrueLabel();
let falseLabel = this.getFalseLabel();
let res = data == trueLabel;
this.internalValue = res ? trueLabel : falseLabel;
this.checked = res;
},
toggle() {
console.log(123);
if(!this.readonly)
this.checked = !this.checked;
},
},
}
</script>

<style scoped>

</style>

+ 196
- 0
src/components/form/FieldDatePicker.vue 查看文件

@@ -0,0 +1,196 @@
<!-- 日期选择表单组件 zhao -->
<template>
<div>
<van-field
:readonly="true"
:clickable="!readonly"
:name="name"
:value="visibleValue"
:label="label"
:placeholder="placeholder"
@click="openPopup"
input-align="right"
right-icon="arrow-down"
:rules="rules"
:required="required"
:label-width="labelWidth || 'auto'"
:input-align="inputAlign || 'left'"
:size="size || ''"
>
<!-- <template #button>
<van-icon name="notes-o" size="20"/>
</template>-->
</van-field>

<van-popup v-model="popupVisible" position="bottom" v-if="type === 'year'">
<van-picker
ref="picker"
:title="label"
show-toolbar
:columns="yearColumns"
:readonly="readonly"
v-model="internalValue"
@confirm="onConfirm"
@cancel="onCancel"
@change="onChanged"
/>
</van-popup>
<van-popup v-model="popupVisible" position="bottom" v-else>
<van-datetime-picker
ref="picker"
v-model="internalValue"
:type="type || 'date'"
:readonly="readonly"
:title="label || ''"
:min-date="minDate"
:max-date="maxDate"
@confirm="onConfirm"
@cancel="onCancel"
@change="onChanged"
/>
</van-popup>
</div>
</template>

<script>

import { formatDate } from "element-ui/src/utils/date-util.js"
import {strtotime} from "@/utils";

export default {
name: "fieldDatePicker",
props: [
'name', 'readonly', 'value', 'label', 'placeholder', 'required', 'rules', 'labelWidth', 'inputAlign',
'type', // 类型, 仅支持 datetime date time year-month month-day datehour, 额外支持year(但formatter必须为yyyy, 可以提供yearRangeLength=<Number>指定年范围)
'formatter', // value的格式化 String|Function|undefined 字符串为格式字符串, 函数则必须有返回 undefined则不转换
'clearable', // 点击取消时清空绑定值
'yearRangeLength', // type === 'year' 时生成的年份数量范围 [YEAR - yearRangeLength, YEAR + yearRangeLength]
'minDate', 'maxDate',
'size',
],
watch: {
value: function (newVal, oldVal) {
this.visibleValue = newVal;
this.internalValue = new Date(newVal);
},
},
created() {
if(this.value)
{
this.visibleValue = this.value;
this.internalValue = new Date(this.value);
}
// 默认当前
/* else {
this.syncValue(new Date);
}*/
},
data() {
return {
popupVisible: false,
internalValue: new Date(this.value || Date.now()),
visibleValue: this.value,
loading: false,
};
},
methods: {
openPopup() {
if(!this.readonly)
{
//console.log(this.internalValue);
this.popupVisible = true;
this.$nextTick(() => {
try
{
if(1)
{
let values = (this.visibleValue || this.getValue(new Date)).split(/\D+/); //TODO: 按非数字符号粗略分割解析初始值, 仅对于类似yyyy-MM-dd
//console.log(values);
let picker = this.$refs.picker.getPicker ? this.$refs.picker.getPicker() : this.$refs.picker;
picker.setValues(values);
}
else {
//TODO: 打开时保存初始值, 取消或点击遮罩未确定的时候恢复该初始值到v-model
}
}
catch (e)
{
console.error(e);
}
})
}
},
closePopup() {
this.popupVisible = false;
},
onConfirm(data) {
this.syncValue(data);
this.$emit('input', this.visibleValue);
this.$emit('confirm', this.visibleValue, this.internalValue);
this.closePopup();
},
onCancel() {
this.closePopup();
this.$emit('cancel');
if(this.clearable)
{
this.visibleValue = '';
this.internalValue = null;
this.$emit('input', this.internalValue);
}
},
onChanged(data) {
this.$emit('change', this.getValue(data), data);
},
getValue(data) {
let type = typeof(this.formatter);
if(type === 'function')
return this.formatter(data);
else if(type === 'string')
return formatDate(data, this.formatter);
else
return data;
},
syncValue(data) {
this.internalValue = data;
this.visibleValue = this.getValue(data);
},
genYearColumns(num) {
let d;
try
{
if(this.value)
{
d = strtotime(this.value, 'yyyy');
}
else
d = new Date;
}
catch(e)
{
d = new Date;
}
let y = d.getFullYear();
let arr = ['' + y];
for(let i = 1; i <= num; i++)
{
arr.push('' + (y + i));
arr.splice(0, 0, '' + (y - i));
}
return arr;
},
strtotime,
},
computed: {
yearColumns() {
if(this.type !== 'year')
return [];
return this.genYearColumns(this.yearRangeLength || 100);
},
}
}
</script>

<style scoped>

</style>

+ 111
- 0
src/components/form/FieldRadio.vue 查看文件

@@ -0,0 +1,111 @@
<!-- 单选框组表单组件 zhao -->
<template>
<div>
<van-field
:readonly="true"
:name="name"
:label="label"
:placeholder="placeholder"
input-align="right"
:required="required"
:label-width="labelWidth || 'auto'"
>
<template #right-icon>
<van-radio-group :disabled="readonly" @change="onChanged" v-model="internalValue" direction="horizontal" :rules="rules">
<van-radio v-for="(item, index) in (columns ? columns : remoteColumns)" :name="getValue(item)" :key="index">{{getLabel(item)}}</van-radio>
</van-radio-group>
</template>
</van-field>
</div>
</template>

<script>
import request from "@/utils/request";

export default {
name: "fieldRadio",
props: [
'name', 'readonly', 'value', 'label', 'placeholder', 'required', 'rules', 'labelWidth',
'columns', // 列表数据 Array
'valueKey', // 名称键名 String
'dataKey', // 值键名 String
'remoteUrl', // 远程列表加载地址 String
'onRemoteResponse', // 远程获取到结果的处理回调 String|Function 如果是函数需返回数组, 如果是字符串支持.分割
],
watch: {
value: function (newVal, oldVal) {
this.internalValue = newVal;
},
columns: function (newVal, oldVal) {
},
remoteUrl: function (newVal, oldVal) {
this.requestRemote();
},
onRemoteResponse: function (newVal, oldVal) {
this.parseRemote();
}
},
created() {
if(this.remoteUrl)
this.requestRemote();
},
data() {
return {
internalValue: this.value,
remoteColumns: null,
remoteResponse: null,
};
},
methods: {
onChanged(data) {
this.$emit("input", this.internalValue);
this.$emit('change', this.internalValue);
},
getValue(data) {
return typeof(data) === 'object' && this.dataKey ? data[this.dataKey] : data;
},
getLabel(data) {
return typeof(data) === 'object' && this.valueKey ? data[this.valueKey] : data;
},
getColumns() {
return this.columns ? this.columns : this.remoteColumns;
},
requestRemote() {
if(!this.remoteUrl)
return;
this.remoteColumns = [];
let promise = typeof(this.remoteUrl) === 'function' ? this.remoteUrl() : (this.remoteUrl instanceof Promise ? this.remoteUrl : request(this.remoteUrl));
promise.then((resp) => {
this.remoteResponse = resp;
this.parseRemote();
}).catch((e) => {
console.error(e);
}).finally(() => {
})
},
parseRemote() {
if(!this.remoteResponse)
return;
let type = typeof(this.onRemoteResponse);
if(type === 'function')
this.remoteColumns = this.onRemoteResponse(this.remoteResponse);
else if(type === 'string')
{
let arr = this.onRemoteResponse.split('.');
let ptr = this.remoteResponse;
for(let i in arr)
{
ptr = this.remoteResponse[arr[i]];
}
this.remoteColumns = ptr;
}
else
this.remoteColumns = this.remoteResponse;
},
},
}
</script>

<style scoped>

</style>

+ 190
- 0
src/components/form/FieldSelect.vue 查看文件

@@ -0,0 +1,190 @@
<!-- 下拉列表表单组件 zhao -->
<template>
<div>
<van-field
:readonly="true"
:clickable="!readonly"
:name="name"
:value="visibleValue"
:label="label"
:placeholder="placeholder"
@click="openPopup"
input-align="right"
right-icon="arrow-down"
:rules="rules"
:required="required"
:label-width="labelWidth || 'auto'"
:size="size || ''"
>
</van-field>
<van-popup v-model="popupVisible" position="bottom">
<van-picker
ref="picker"
:title="label"
show-toolbar
:columns="columns ? columns : remoteColumns"
:readonly="readonly"
:value-key="valueKey"
:loading="loading"
@confirm="onConfirm"
@cancel="onCancel"
@change="onChanged"
/>
</van-popup>
</div>
</template>

<script>
import request from "@/utils/request";

export default {
name: "fieldSelect",
props: [
'name', 'readonly', 'value', 'label', 'placeholder', 'required', 'rules', 'labelWidth',
'columns', // 列表数据 Array
'valueKey', // 名称键名 String
'dataKey', // 值键名 String
'remoteUrl', // 远程列表加载地址 String
'onRemoteResponse', // 远程获取到结果的处理回调 String|Function 如果是函数需返回数组, 如果是字符串支持.分割
'clearable', // 点击取消时清空绑定值
'size',
],
watch: {
value: function (newVal, oldVal) {
this.internalValue = newVal;
this.visibleValue = newVal;
this.syncIndex();
},
columns: function (newVal, oldVal) {
this.syncIndex();
},
remoteUrl: function (newVal, oldVal) {
this.requestRemote();
},
onRemoteResponse: function (newVal, oldVal) {
this.parseRemote();
}
},
created() {
if(this.remoteUrl)
this.requestRemote();
},
data() {
return {
popupVisible: false,
internalValue: this.value,
visibleValue: '',
defaultIndex: 0,
remoteColumns: null,
loading: false,
remoteResponse: null,
};
},
methods: {
openPopup() {
if(!this.readonly)
{
this.popupVisible = true;
this.$nextTick(() => {
this.$refs.picker.setIndexes([this.defaultIndex]);
})
}
},
closePopup() {
this.popupVisible = false;
},
onChanged(data) {
this.$emit('change', data);
},
onConfirm(data) {
this.syncValue(data);
this.$emit('input', this.internalValue);
this.$emit('confirm', this.internalValue);
this.closePopup();
},
onCancel() {
this.closePopup();
this.$emit('cancel');
if(this.clearable)
{
this.visibleValue = '';
this.internalValue = null;
this.$emit('input', this.internalValue);
}
},
getValue(data) {
return typeof(data) === 'object' && this.dataKey ? data[this.dataKey] : data;
},
getLabel(data) {
return typeof(data) === 'object' && this.valueKey ? data[this.valueKey] : data;
},
syncValue(data) {
this.internalValue = this.getValue(data);
this.visibleValue = this.getLabel(data);
},
syncIndex() {
let columns = this.getColumns();
if(!columns)
return -1;
for(let i in columns)
{
if(this.getValue(columns[i]) == this.internalValue) {
this.defaultIndex = i;
this.visibleValue = this.getLabel(columns[i]);
this.onChanged(columns[i]);
return i;
}
}
if(1) // 不存在
{
this.defaultIndex = -1;
this.visibleValue = this.internalValue;
this.onChanged(null);
}
return -1;
},
getColumns() {
return this.columns ? this.columns : this.remoteColumns;
},
requestRemote() {
if(!this.remoteUrl)
return;
this.loading = true;
this.remoteColumns = [];
let promise = typeof(this.remoteUrl) === 'function' ? this.remoteUrl() : (this.remoteUrl instanceof Promise ? this.remoteUrl : request(this.remoteUrl));
promise.then((resp) => {
this.remoteResponse = resp;
this.parseRemote();
this.syncIndex();
}).catch((e) => {
console.error(e);
}).finally(() => {
this.loading = false;
})
},
parseRemote() {
if(!this.remoteResponse)
return;
let type = typeof(this.onRemoteResponse);
if(type === 'function')
this.remoteColumns = this.onRemoteResponse(this.remoteResponse);
else if(type === 'string')
{
let arr = this.onRemoteResponse.split('.');
let ptr = this.remoteResponse;
for(let i in arr)
{
ptr = this.remoteResponse[arr[i]];
}
this.remoteColumns = ptr;
}
else
this.remoteColumns = this.remoteResponse;
},
},
}
</script>

<style scoped>

</style>

+ 2
- 0
src/main.js 查看文件

@@ -36,6 +36,7 @@ import ImagePreview from "@/components/ImagePreview"
import DictTag from '@/components/DictTag'
// 字典数据组件
import DictData from '@/components/DictData'
import VueClipboard from 'vue-clipboard2'
// Vant 引用
import Vant from 'vant';
import 'vant/lib/index.css';
@@ -65,6 +66,7 @@ Vue.component('ImagePreview', ImagePreview)
Vue.use(Vant)
Vue.use(directive)
Vue.use(plugins)
Vue.use(VueClipboard)
DictData.install()

/**


+ 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)
},
]



+ 1
- 0
src/store/getters.js 查看文件

@@ -11,6 +11,7 @@ const getters = {
name: state => state.user.name,
nickName: state => state.user.nickName,
user: state => state.user,
userDept: state => state.user.userDept,
introduction: state => state.user.introduction,
roles: state => state.user.roles,
permissions: state => state.user.permissions,


+ 8
- 0
src/store/modules/user.js 查看文件

@@ -4,6 +4,7 @@ import { login, logout, getInfo, systemConfig } from '@/api/login'
import { getToken, setToken, removeToken } from '@/utils/auth'
import { isHttp, isEmpty } from "@/utils/validate"
import defAva from '@/assets/images/profile.jpg'
import Cookies from "js-cookie";

const user = {
state: {
@@ -13,6 +14,7 @@ const user = {
nickName: '',
avatar: '',
user: {},
userDept:null,
roles: [],
permissions: [],
//获取登录页相关标题
@@ -46,6 +48,9 @@ const user = {
SET_USER: (state, user) => {
state.user = user
},
SET_USERDEPT: (state, dept) => {
state.userDept = dept
},
SET_ROLES: (state, roles) => {
state.roles = roles
},
@@ -107,6 +112,9 @@ const user = {
commit('SET_NICK_NAME', user.nickName)
commit('SET_AVATAR', avatar)
commit('SET_USER', user)
commit('SET_USERDEPT', user.dept.deptId)
Cookies.set('userDept',user.dept.deptId)
Cookies.set('importCode',user.dept.importCode)
/* 初始密码提示 */
if(res.isDefaultModifyPwd) {
MessageBox.confirm('您的密码还是初始密码,请修改密码!', '安全提示', { confirmButtonText: '确定', cancelButtonText: '取消', type: 'warning' }).then(() => {


+ 8
- 5
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>{{ nickName }}</p>
<p>{{ deptName }}</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,13 +38,16 @@
name: "appIndex",
data() {
return {
menuList:[]
menuList:[],
user:{},
avatar:''
};
},
created() {
this.getMenuApp();
this.nickName = this.$store.getters.user.user.nickName;
this.deptName = this.$store.getters.user.user.dept.deptName;
},
mounted() {
console.log(this.$store.getters.userDept)
},
methods: {
getMenuApp(){


+ 315
- 304
src/views/app/map.vue 查看文件

@@ -9,12 +9,12 @@
/>
<div class="search_box">
<div class="left">
<van-field v-model="value" left-icon="search" placeholder="请输入用户名" />
<van-field v-model="keyword" left-icon="search" placeholder="请输入用户名" />
</div>
<van-button type="primary" round >搜索</van-button>
<van-button type="primary" round @click="searchMap" >搜索</van-button>
</div>

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

@@ -32,164 +32,69 @@



<!-- <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 { areaSavePri, cleanSavePri } from "@/api/gis/map"
import { getToken } from "@/utils/auth"
import Treeselect from "@riophae/vue-treeselect";
import { Splitpanes, Pane } from "splitpanes"
import "@riophae/vue-treeselect/dist/vue-treeselect.css"
import "splitpanes/dist/splitpanes.css"
import { deptTreeSelect } from "@/api/system/user"
import { listLandQuery, getLandDetailByDkbm } from "@/api/resource/land"
import {getConfigKey} from "@/api/system/config";
import {getDept,getInfoByImportCode} from "@/api/system/dept";
import {getDept} from "@/api/system/dept";
import {Toast} from "vant";
import $ from "jquery";
import Cookies from "js-cookie";


export default {
name: "contractedVillageContractor",
components: { Treeselect, Splitpanes, Pane },
name: "appMap",
components: { },
data() {
return {
fform: {}, // 地块信息表单参数
baseRoutingUrll:'/api',
form: {}, // 地块信息表单参数
map: "", // 地图
mapGeoServerUrl: "", // geoserver地址
mapCenterLocation: [], // 地图中心坐标
@@ -227,13 +132,29 @@
value:'',
deptId:100,
importCode:'',
keyword:'',
locationMap: this.guidProduct(),
selectedHomesteadLayer: "",

};
},
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;
this.importCode = this.$store.getters.user.user.dept.importCode;
this.deptId = Cookies.get('userDept');
this.importCode = Cookies.get('importCode');
// 获取geoserver的地址
this.getGeoServerUrl();
// 获取地块图层名称
@@ -243,9 +164,11 @@
},
mounted() {
// 初始化地图
setTimeout(() => {
this.initMap();
}, 500);
listLandQuery().then(response => {
setTimeout(() => {
this.initMap(response.rows);
}, 500);
});
},
methods: {
onClickLeft(){
@@ -269,8 +192,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) {
@@ -310,7 +240,7 @@
target: "landMapBox",
view: new ol.View({
center: ol.proj.fromLonLat(this.mapCenterLocation), // 地图中心坐标
zoom: 15.5,
zoom: 14,
minZoom: 1, //地图缩小限制
maxZoom: 18, //地图放大限制
// extent: [13481224.75161,5667110.83528,13811063.06278,5880284.11416]
@@ -355,42 +285,89 @@

});
});
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);
}, 500);
});

/* if (this.selectedHomesteadLayer) {
if (this.selectedHomesteadLayer) {
this.map.removeLayer(this.selectedHomesteadLayer);
this.selectedHomesteadLayer = "";
}
@@ -402,17 +379,30 @@
style: new ol.style.Style({
fill: new ol.style.Fill({
//矢量图层填充颜色,以及透明度
color: "rgba(255, 84, 87, 0.3)",
color: "rgba(255,0,17,0.3)",
}),
stroke: new ol.style.Stroke({
//边界样式
color: "#ff5457",
color: "#ff0000",
width: 3,
}),
})
});
// this.map.addLayer(this.selectedHomesteadLayer);
this.map.getLayers().insertAt(4, this.selectedHomesteadLayer);*/
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 +417,89 @@
}
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;
},
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({
@@ -459,117 +532,6 @@
});
this.map.getLayers().insertAt(2, this.mapBorder);
},
saveLand() {
this.$refs.landForm.validate().then(() => {
if (this.form.id) {
this.showSaveBtn = false;
updateDk(this.form).then(response => {
if (response.code == 200) {
this.$toast({
icon: 'success',
message: '保存成功',
duration:"1000",
onClose: () => {
this.open = false;
this.showSaveBtn = true;
}
});
}
});
} else {
this.form.deptId = this.deptId;
this.showSaveBtn = false;
addDk(this.form).then(response => {
if (response.code == 200) {
this.$toast({
icon: 'success',
message: '保存成功',
duration:"1000",
onClose: () => {
this.open = false;
this.showSaveBtn = true;
// 移除矢量图层
this.map.removeLayer(this.vectorLayer);
this.vectorLayer = "";
// 移除地块图层重新加载
this.map.removeLayer(this.landLayer);
this.landLayer = "";
this.addLandLayer();
}
});
}
});
}
}).catch(() => {
this.$notify({ type: 'danger', message: '请填写完整的表单项' });
});
},
deleteLand(id) {
this.$dialog.confirm({
message: '是否确认删除此地块?',
}).then(() => {
// on confirm
this.showDeleteBtn = false;
deleteDk(id).then(res => {
if (res.code == 200) {
this.$toast({
icon: 'success',
message: '删除成功',
duration: "1000",
onClose: () => {
this.open = false;
this.showDeleteBtn = true;
// 移除地块图层重新加载
this.map.removeLayer(this.landLayer);
this.landLayer = "";
this.addLandLayer();
}
});
}
});
}).catch(() => {
// on cancel
});
},
onConfirmOwnershipOptions(value){
this.form.syqxz = value.dictValue;
this.syqxzText = value.dictLabel;
this.showOwnership = false;
},
onConfirmLandCategoryOptions(value){
this.form.dklb = value.dictValue;
this.dklbText = value.dictLabel;
this.showLandCategory = false;
},
onConfirmLandTypeOptions(value) {
this.form.tdlylx = value.dictValue;
this.tdlylxText = value.dictLabel;
this.showLandType = false;
},
onConfirmLandGradeOptions(value) {
this.form.dldj = value.dictValue
this.dldjText = value.dictLabel;
this.showLandGrade = false;
},
onConfirmLandPurposeOptions(value){
this.form.tdyt = value.dictValue;
this.tdytText = value.dictLabel;
this.showLandPurpose = false;
},
generateCode() {
generateLandCode({deptId: this.deptId}).then(response => {
this.$set(this.form, 'dkbm', response.data);
});
},
closePopup() {
// 移除矢量图层
if (this.vectorLayer) {
this.map.removeLayer(this.vectorLayer);
this.vectorLayer = "";
}
this.open = false;
this.reset();
},
reset() {
this.form = {
deptId: null,
@@ -596,17 +558,66 @@
this.dldjText = '一等地';
this.tdytText = '种植业';
},
openLandCategoryPopup() {
// 修改时 && 地块类别为承包地块 不允许打开地块类别弹出层
if (this.form.id && this.form.dklb === '10') {
this.$toast({
icon: 'fail',
message: '当前地块为承包地块,不能更改地块类别',
duration: '2000'
})
return ;
// 根据搜索条件查询宅基地
searchMap() {
if (this.keyword) {
if (this.selectedHomesteadLayer) {
this.map.removeLayer(this.selectedHomesteadLayer);
this.selectedHomesteadLayer = "";
}
let map_cql_filter = "DKBM = '" + this.keyword + "'";
// 定位查询位置
let param_dw = {
// srsName: "EPSG:3857",
service: "WFS",
version: "1.0.0",
request: "GetFeature",
typename: this.landLayerName,
// maxFeatures:1000,
cql_filter: map_cql_filter,
outputFormat: "application/json",
};
let url_dw = this.mapGeoServerUrl + "/ows"; //wfsurl;
url_dw = url_dw + "?";
for (let key in param_dw) {
url_dw = url_dw + key + "=" + param_dw[key] + "&";
}
url_dw = url_dw.substr(0, url_dw.length - 1);
fetch(url_dw, {
method: "GET", // *GET, POST, PUT, DELETE, etc.
}).then((res) => {
return res.json();
}).then((data) => {
if (data.features.length > 0) {
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,0,17,0.3)",
}),
stroke: new ol.style.Stroke({
//边界样式
color: "#ff0000",
width: 3,
}),
})
});
this.map.addLayer(this.selectedHomesteadLayer);
this.map.getLayers().insertAt(4, this.selectedHomesteadLayer);

let resolution = this.map.getView().getResolutionForExtent(data.bbox, this.map.getSize());
this.map.getView().fit(data.bbox);
this.map.getView().setResolution(resolution);
// this.map.getView().setZoom(16);
} else {
this.msgError("没有搜索到该用户的宅基地")
}
});
}
this.showLandCategory = true;
}

},


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 查看文件

@@ -5,7 +5,7 @@
<div class="search_box">
<div class="left">
<p @click="showPicker = true">{{surveyStatus}}<van-icon name="play" /></p>
<van-field v-model="value" @input="searchChange" @clear="searchClear" clearable left-icon="search" placeholder="请输入地块名称" />
<van-field v-model="value" @input="searchChange" @clear="searchClear" clearable left-icon="search" placeholder="地块编码" />
</div>
<van-button type="primary" round @click="goSearch" >搜索</van-button>
</div>
@@ -17,12 +17,13 @@
<div class="list_main">
<van-list v-model="loading" :finished="finished" finished-text="没有更多了" @load="getList">
<van-swipe-cell right-width="200" class="item" v-for="(item,index) in landList" :key="index">
<div class="item_box" @click="$router.push({name:'appDetail',query:{dkbm:item.dkbm}})">
<div class="item_box">
<!-- -->
<div class="head_block">
<div class="title">{{item.dkbm}}</div>
<div class="describe"><dict-tag :options="dict.type.survey_status" :value="item.surveyStatus"/></div>
<div class="title"><p @click="$router.push({name:'appDetail',query:{dkbm:item.dkbm}})">{{item.dkbm}}</p> <img v-clipboard:copy="item.dkbm" v-clipboard:success="onCopy" v-clipboard:error="onError" src="../../../assets/images/app/copy.png" alt=""></div>
<div class="describe" @click="$router.push({name:'appDetail',query:{dkbm:item.dkbm}})"><dict-tag :options="dict.type.survey_status" :value="item.surveyStatus"/></div>
</div>
<div class="order_block">
<div class="order_block" @click="$router.push({name:'appDetail',query:{dkbm:item.dkbm}})">
<div class="order">{{item.dkmc}}</div>
<div class="describe">{{item.scmjm}}</div>
</div>
@@ -42,6 +43,7 @@
<script>
import { Dialog } from 'vant';
import { listLand, delLand } from "@/api/resource/land"
import Cookies from "js-cookie";
export default {
dicts: ['ownership_type', 'land_use_type', 'survey_status', 'is_common', 'land_grade_type', 'land_type', 'land_use'],
name: "appList",
@@ -76,7 +78,7 @@
};
},
created() {
this.queryParams.importCode = this.$store.getters.user.user.dept.importCode;
this.queryParams.importCode = Cookies.get('importCode');
},
methods: {
onClickLeft(){
@@ -103,7 +105,7 @@
this.showPicker = false;
},
searchChange(value) {
this.queryParams.dkmc = value;
this.queryParams.dkbm = value;
},
goSearch(){
this.queryParams.pageNum = 1;
@@ -116,6 +118,13 @@
this.surveyStatus = '调查状态';
this.queryParams.surveyStatus = '';
},
onCopy (e) {
this.$message.success("内容已复制到剪切板!")
},
// 复制失败时的回调函数
onError (e) {
this.$message.error("抱歉,复制失败!")
},
/** 删除按钮操作 */
handleDelete(row) {
const fids = row.fid || this.ids
@@ -176,6 +185,11 @@
text-overflow: ellipsis;
white-space: nowrap;
padding-right: 20px;
display: flex;
align-items: center;
img{
margin-left: 5px;
}
}
.describe{
font-size: 14px;

src/views/app/operate_edit.vue → src/views/app/project/operate_edit.vue 查看文件

@@ -1,12 +1,6 @@
<template>
<div class="home_wrapper">
<van-nav-bar
title="经营信息维护"
left-arrow
placeholder
safe-area-inset-top
@click-left="onClickLeft"
/>
<van-nav-bar title="经营信息维护" left-arrow placeholder safe-area-inset-top @click-left="onClickLeft"/>

<van-form @submit="onSubmit">
<div class="main">
@@ -20,77 +14,39 @@
<van-field readonly v-model="form.dkbz" label="地块北至" placeholder="请输入" input-align="right" label-width="auto" />

<van-field required :rules="[{ required: true }]" v-model="form.jymj" label="经营面积" placeholder="请输入" input-align="right" label-width="auto" />

<van-field required :rules="[{ required: true }]" readonly @click="showJyfsPicker = true" v-model="form.jyfsText" label="经营方式" placeholder="请输入" input-align="right" label-width="auto" />
<van-popup v-model="showJyfsPicker" round position="bottom">
<van-picker
show-toolbar
:columns="dict.type.jyfs"
value-key="label"
@cancel="showJyfsPicker = false"
@confirm="onConfirmJyfs"
/>
<van-picker show-toolbar :columns="dict.type.jyfs" value-key="label" @cancel="showJyfsPicker = false" @confirm="onConfirmJyfs"/>
</van-popup>

<van-field readonly @click="showJydxlxPicker = true" v-model="form.jydxlxText" label="经营对象类型" placeholder="请输入" input-align="right" label-width="auto" />
<van-popup v-model="showJydxlxPicker" round position="bottom">
<van-picker
show-toolbar
:columns="dict.type.jydxlx"
value-key="label"
@cancel="showJydxlxPicker = false"
@confirm="onConfirmJydxlx"
/>
<van-picker show-toolbar :columns="dict.type.jydxlx" value-key="label" @cancel="showJydxlxPicker = false" @confirm="onConfirmJydxlx"/>
</van-popup>

<van-field required :rules="[{ required: true }]" v-model="form.jydxmc" label="经营对象名称" placeholder="请输入" input-align="right" label-width="auto" />

<van-field readonly @click="showJydxzjlxPicker = true" v-model="form.jydxzjlxText" label="经营对象证件类型" placeholder="请输入" input-align="right" label-width="auto" />
<van-popup v-model="showJydxzjlxPicker" round position="bottom">
<van-picker
show-toolbar
:columns="dict.type.zjlx"
value-key="label"
@cancel="showJydxzjlxPicker = false"
@confirm="onConfirmJydxzjlx"
/>
<van-picker show-toolbar :columns="dict.type.zjlx" value-key="label" @cancel="showJydxzjlxPicker = false" @confirm="onConfirmJydxzjlx"/>
</van-popup>

<van-field v-model="form.jydxzjhm" label="经营对象证件号码" placeholder="请输入" input-align="right" label-width="auto" />

<van-field readonly @click="showSfqdhtPicker = true" v-model="form.sfqdhtText" label="是否签订合同" placeholder="请输入" input-align="right" label-width="auto" />
<van-popup v-model="showSfqdhtPicker" round position="bottom">
<van-picker
show-toolbar
:columns="dict.type.is_common"
value-key="label"
@cancel="showSfqdhtPicker = false"
@confirm="onConfirmSfqdht"
/>
<van-picker show-toolbar :columns="dict.type.is_common" value-key="label" @cancel="showSfqdhtPicker = false" @confirm="onConfirmSfqdht"/>
</van-popup>

<van-field required :rules="[{ required: true }]" readonly @click="showJykssjPicker = true" v-model="form.jykssj" label="经营开始时间" placeholder="请输入" input-align="right" label-width="auto" />
<van-popup v-model="showJykssjPicker" round position="bottom">
<van-datetime-picker
v-model="jykssj"
type="date"
title="选择年月日"
:min-date="minDate"
:max-date="maxDate"
@cancel="showJykssjPicker = false"
@confirm="onConfirmJykssj"
/>
<van-datetime-picker v-model="jykssj" type="date" title="选择年月日" :min-date="minDate" :max-date="maxDate" @cancel="showJykssjPicker = false" @confirm="onConfirmJykssj"/>
</van-popup>

<van-field required :rules="[{ required: true }]" readonly @click="showJyjssjPicker = true" v-model="form.jyjssj" label="经营结束时间" placeholder="请输入" input-align="right" label-width="auto" />
<van-popup v-model="showJyjssjPicker" round position="bottom">
<van-datetime-picker
v-model="jyjssj"
type="date"
title="选择年月日"
:min-date="minDate"
:max-date="maxDate"
@cancel="showJyjssjPicker = false"
@confirm="onConfirmJyjssj"
/>
<van-datetime-picker v-model="jyjssj" type="date" title="选择年月日" :min-date="minDate" :max-date="maxDate" @cancel="showJyjssjPicker = false" @confirm="onConfirmJyjssj"/>
</van-popup>

<van-field required :rules="[{ required: true }]" v-model="form.cbje" label="承包金额(元)" placeholder="请输入" input-align="right" label-width="auto" />
@@ -99,20 +55,15 @@
<van-field v-model="form.nsy" label="年收益(元)" placeholder="请输入" input-align="right" label-width="auto" />
<van-field v-model="form.bzxx" label="备注信息" placeholder="请输入" input-align="right" label-width="auto" />

<van-field readonly label="实物图" placeholder="" input-align="right" label-width="auto" />
<!--<van-field readonly required :rules="[{ required: true }]" @click="showSurveyStatusPicker = true" v-model="form.surveyStatusText" label="调查状态" placeholder="请输入" input-align="right" label-width="auto" />
<van-popup v-model="showSurveyStatusPicker" round position="bottom">
<van-picker show-toolbar :columns="dict.type.survey_status" value-key="label" @cancel="showSurveyStatusPicker = false" @confirm="onConfirmSurveyStatus"/>
</van-popup>-->
<field-select v-model="form.surveyStatusText" label="调查状态" value-key="dictLabel" data-key="dictValue" placeholder="请选择" requiredx remote-url="/system/dict/data/type/survey_status" :on-remote-response="'data'"/>

<van-field readonly label="实物图" placeholder="" input-align="right" label-width="auto" />
<image-upload v-model="form.dkImg"/>

<van-field readonly required :rules="[{ required: true }]" @click="showSurveyStatusPicker = true" v-model="form.surveyStatusText" label="调查状态" placeholder="请输入" input-align="right" label-width="auto" />
<van-popup v-model="showSurveyStatusPicker" round position="bottom">
<van-picker
show-toolbar
:columns="dict.type.survey_status"
value-key="label"
@cancel="showSurveyStatusPicker = false"
@confirm="onConfirmSurveyStatus"
/>
</van-popup>
</div>

<van-button round block type="primary" native-type="submit" class="subClass">提交</van-button>
@@ -122,14 +73,15 @@
</template>

<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 {getInfoByImportCode} from "@/api/system/dept";
import { getLandDetail } from "@/api/resource/land"
import { getOperationDetail, updateOperation, addOperation } from "@/api/resource/operation"
import { getInfoByImportCode } from "@/api/system/dept";
import FieldSelect from "@/components/form/FieldSelect.vue";
export default {
dicts: ['zjlx', 'survey_status', 'is_common', 'jydxlx', 'jyfs'],
name: "appEdit",
components: {FieldSelect},
data() {
return {
showJyfsPicker: false,
@@ -141,7 +93,33 @@
showSurveyStatusPicker: false,
minDate: new Date(2020, 0, 1),
maxDate: new Date(2025, 10, 1),
form: {},
importCode: null,
form: {
dkbm: null,
dkmc: null,
dkdz: null,
dkxz: null,
dknz: null,
dkbz: null,
jymj: null,
jyfs: null,
jydxlx: null,
jydxmc: null,
jydxzjlx: null,
jydxzjhm: null,
sfqdht: null,
jykssj: null,
jyjssj: null,
cbje: null,
dxje: null,
sqje: null,
nsy: null,
bzxx: null,
dkImg: null,
surveyStatus: null,
importCode: null,
deptName: null,
},
jykssj:new Date(),
jyjssj:new Date(),
openPic: [],
@@ -156,24 +134,45 @@
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);
this.form = response.data
})
getLandDetail(this.$route.query.dkbm).then(response => {
//this.form = response.data
this.form.deptName = response.data.deptName;
this.form.importCode = response.data.importCode;
this.importCode = response.data.importCode;
this.form.dkbm = response.data.dkbm;
this.form.dkmc = response.data.dkmc;
this.form.dkdz = response.data.dkdz;
this.form.dkxz = response.data.dkxz;
this.form.dknz = response.data.dknz;
this.form.dkbz = response.data.dkbz;
this.form.jymj = response.data.scmjm;
this.form.jyfsText = '家庭承包';
this.form.jyfs = '110';
this.form.jydxlxText = '农户';
this.form.jydxlx = '1';
this.form.jydxzjlxText = '居民身份证';
this.form.jydxzjlx = '1';
this.form.sfqdhtText = '是';
this.form.sfqdht = '1';
this.form.surveyStatusText = '已调查';
this.form.surveyStatus = '2';

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>{{ nickName }}</p>
<p>{{ deptName }}</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" @click = "logOut">
<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,27 +36,36 @@

<script>
import Cookies from "js-cookie";
import {Dialog} from "vant";
export default {
name: "appUser",
data() {
return {
nickName: null,
deptName: null

};
},
created() {
this.nickName = this.$store.getters.user.user.nickName;
this.deptName = this.$store.getters.user.user.dept.deptName;

},
methods: {
goBack(){
history.go(-1)
},
logOut() {
this.$store.dispatch('LogOut').then(() => {
location.href = '/app/index'
logout() {

Dialog.confirm({
title: '提示',
message: '确定注销并退出系统吗?',
})
},
.then(() => {
this.$store.dispatch('LogOut').then(() => {
location.href = '/app/login'
})
})
.catch(() => {
// on cancel
});
}
},
};
</script>
@@ -66,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;
}
@@ -116,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;

+ 90
- 4
src/views/business/export/index.vue 查看文件

@@ -90,8 +90,9 @@
<template slot-scope="scope">
<el-button size="mini" type="text" icon="el-icon-view" @click="handleLook(scope.row)" v-hasPermi="['business:export:query']">查看</el-button>
<el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)" v-hasPermi="['business:export:edit']">修改</el-button>
<el-button size="mini" type="text" icon="el-icon-video-play" @click="handleDo(scope.row)" v-hasPermi="['business:export:do']" v-if="scope.row.taskStatus == '1'">执行</el-button>
<el-button size="mini" type="text" icon="el-icon-video-play" @click="handleDo(scope.row)" v-hasPermi="['business:export:do']" v-if="scope.row.taskStatus == '0'">执行</el-button>
<el-button size="mini" type="text" icon="el-icon-download" @click="handleDown(scope.row)" v-hasPermi="['business:export:down']" v-if="scope.row.taskStatus == '3'">下载</el-button>
<el-button size="mini" type="text" icon="el-icon-tickets" @click="openLog(scope.row)" v-hasPermi="['business:export:do']">日志</el-button>

<el-dropdown size="mini" v-hasPermi="['business:export:remove']">
<el-button size="mini" type="text" icon="el-icon-d-arrow-right">更多</el-button>
@@ -169,17 +170,37 @@
<el-button @click="cancel">取 消</el-button>
</div>
</el-dialog>

<el-dialog title="任务日志" :visible.sync="log.logOpen" width="800px" append-to-body>
<div v-html="log.logText">
</div>
<!-- 弹框操作按钮 -->
<div slot="footer" class="dialog-footer">
<el-button @click="downloadLog">下 载</el-button>
<el-button @click="closeLog">关 闭</el-button>
</div>
</el-dialog>
</div>
</template>

<script>
import { listExport, getExport, getExportDetail, delExport, addExport, updateExport, printExport } from "@/api/business/export"
import {
listExport,
getExport,
getExportDetail,
delExport,
addExport,
updateExport,
printExport,
startExport, exportLog, downloadLog, downloadFile
} from "@/api/business/export"
import { getToken } from "@/utils/auth"
import Treeselect from "@riophae/vue-treeselect";
import { Splitpanes, Pane } from "splitpanes"
import "@riophae/vue-treeselect/dist/vue-treeselect.css"
import "splitpanes/dist/splitpanes.css"
import { deptTreeSelect } from "@/api/system/user"
import {save} from "@/utils";

export default {
name: "Export",
@@ -276,7 +297,11 @@ export default {
// 上传的地址
url: process.env.VUE_APP_BASE_API + "/business/export/importData"
},

log: {
taskId: null,
logOpen: false,
logText: '',
},
}
},
watch: {
@@ -529,7 +554,68 @@ export default {
this.selectDeptName = data.label
this.handleQuery()
},

/** 开始 */
handleDo(row) {
const ids = row.id || this.ids
this.$modal.confirm('是否确认开始编号为"' + ids + '"的导出任务?').then(function() {
return startExport(ids)
}).then((resp) => {
this.getList()
this.$modal.msgSuccess(resp.data == 2 ? '正在执行' : '已加入队列, 等待执行')
}).catch(() => {})
},
/** 日志 */
handleLog(row, offset = 0) {
if(!this.log.logOpen)
return;
exportLog(row.id, offset).then(({data}) => {
if(null == data.text)
{
this.log.logText = '';
return;
}
this.log.logText += data.text
.replaceAll('<', '&lt;')
.replaceAll('>', '&gt;')
.replaceAll('\r\n', '<br/>')
.replaceAll('\r', '<br/>')
.replaceAll('\n', '<br/>')
;
if(!data.eof && this.log.logOpen && (data.taskStatus === '1' || data.taskStatus === '2'))
{
setTimeout(() => {
this.handleLog(row, data.length);
}, data.nextPollDelay > 0 ? data.nextPollDelay : 2000);
}
});
},
/** 日志 */
downloadLog() {
if(!this.log.taskId)
return;
downloadLog(this.log.taskId).then((resp) => {
this.$message.success('开始下载......');
save(`导出任务_${this.log.taskId}.log`, resp);
});
},
openLog(row) {
this.log.logText = '';
this.log.logOpen = true;
this.log.taskId = row.id;
this.handleLog(row);
},
closeLog() {
this.log.logOpen = false;
this.log.taskId = null;
this.log.logText = '';
},
/** 下载 */
handleDown(row) {
downloadFile(row.id).then((resp) => {
this.$message.success('开始下载......');
save(`导出任务_${row.id}.zip`, resp);
});
},
}
}
</script>


+ 1
- 0
src/views/business/import/index.vue 查看文件

@@ -651,6 +651,7 @@ export default {
if(!this.log.taskId)
return;
downloadLog(this.log.taskId).then((resp) => {
this.$message.success('开始下载......');
save(`导入任务_${this.log.taskId}.log`, resp);
});
},


+ 8
- 8
src/views/index.vue 查看文件

@@ -11,7 +11,7 @@
<div class="info-cards">
<div class="info-card">
<h3>地块总数</h3>
<p class="number"><countTo v-if="homepageStatistics" :startVal="0" :endVal="Number(homepageStatistics.dataNum1)" :duration="2000"></countTo> </p>
<p class="number"><countTo v-if="homepageStatistics" :startVal="0" :endVal="Number(homepageStatistics.dataNum1)" :duration="2000"></countTo> </p>
</div>
<div class="info-card">
<h3>承包总金额</h3>
@@ -22,7 +22,7 @@
<div class="info-cards">
<div class="info-card">
<h3>待调查总数</h3>
<p class="number"><countTo v-if="homepageStatistics" :startVal="0" :endVal="Number(homepageStatistics.dataNum2)" :duration="2000"></countTo> </p>
<p class="number"><countTo v-if="homepageStatistics" :startVal="0" :endVal="Number(homepageStatistics.dataNum2)" :duration="2000"></countTo> </p>
</div>
<div class="info-card">
<h3>兑现总金额</h3>
@@ -33,7 +33,7 @@
<div class="info-cards">
<div class="info-card">
<h3>已调查总数</h3>
<p class="number"><countTo v-if="homepageStatistics" :startVal="0" :endVal="Number(homepageStatistics.dataNum3)" :duration="2000"></countTo> </p>
<p class="number"><countTo v-if="homepageStatistics" :startVal="0" :endVal="Number(homepageStatistics.dataNum3)" :duration="2000"></countTo> </p>
</div>
<div class="info-card">
<h3>尚欠总金额</h3>
@@ -47,10 +47,9 @@
<p class="number"><countTo v-if="homepageStatistics" :startVal="0" :endVal="Number(homepageStatistics.dataNum4)" :duration="2000"></countTo> 亩</p>
</div>
<div class="info-card">
<h3>经营总面积</h3>
<p class="number"><countTo v-if="homepageStatistics" :startVal="0" :endVal="Number(homepageStatistics.dataNum9)" :duration="2000"></countTo> 亩</p>
<h3>年总收益</h3>
<p class="number">¥ <countTo v-if="homepageStatistics" :startVal="0" :endVal="Number(homepageStatistics.dataNum10)" :duration="2000"></countTo></p>
</div>

</div>

<div class="info-cards">
@@ -59,10 +58,11 @@
<p class="number"><countTo v-if="homepageStatistics" :startVal="0" :endVal="Number(homepageStatistics.dataNum5)" :duration="2000"></countTo> 亩</p>
</div>
<div class="info-card">
<h3>年总收益</h3>
<p class="number">¥ <countTo v-if="homepageStatistics" :startVal="0" :endVal="Number(homepageStatistics.dataNum10)" :duration="2000"></countTo></p>
<h3>经营总面积</h3>
<p class="number"><countTo v-if="homepageStatistics" :startVal="0" :endVal="Number(homepageStatistics.dataNum9)" :duration="2000"></countTo> 亩</p>
</div>
</div>

</div>
</div>
</template>


+ 8
- 1
src/views/resource/land/index.vue 查看文件

@@ -217,10 +217,17 @@
<el-descriptions title="经营数据" border :column="2" class="margin-top">
<el-descriptions-item label="经营面积(亩)">{{ form.jymj }}</el-descriptions-item>
<el-descriptions-item label="经营方式">{{ form.jyfs }}</el-descriptions-item>
<el-descriptions-item label="经营对象类型">{{ form.jydxlx }}</el-descriptions-item>
<el-descriptions-item label="经营对象名称">{{ form.jydxmc }}</el-descriptions-item>
<el-descriptions-item label="证件类型">{{ form.jydxzjlx }}</el-descriptions-item>
<el-descriptions-item label="证件号码">{{ form.jydxzjhm }}</el-descriptions-item>
<el-descriptions-item label="是否签订合同">{{ form.sfqdht }}</el-descriptions-item>
<el-descriptions-item label="经营开始时间">{{ form.jykssj }}</el-descriptions-item>
<el-descriptions-item label="经营结束时间">{{ form.jyjssj }}</el-descriptions-item>
<el-descriptions-item label="承包金额(元)">{{ form.cbje }}</el-descriptions-item>
<el-descriptions-item label="兑现金额(元)">{{ form.dxje }}</el-descriptions-item>
<el-descriptions-item label="尚欠金额(元)">{{ form.sqje }}</el-descriptions-item>
<el-descriptions-item label="年收益(元)">{{ form.nsy }}</el-descriptions-item>
<el-descriptions-item label="备注">{{ form.bz }}</el-descriptions-item>
<el-descriptions-item label="调查状态">{{ form.surveyStatus }}</el-descriptions-item>
<el-descriptions-item label="实物图">
@@ -514,7 +521,7 @@ export default {
dkmc: null,
syqxz: '30',
dklb: '22',
tdlylx: '011',
tdlylx: '01',
dldj: '01',
tdyt: '1',
sfjbnt: '1',


+ 7
- 0
src/views/resource/operation/index.vue 查看文件

@@ -186,10 +186,17 @@
<el-descriptions title="经营数据" border :column="2" class="margin-top">
<el-descriptions-item label="经营面积(亩)">{{ form.jymj }}</el-descriptions-item>
<el-descriptions-item label="经营方式">{{ form.jyfs }}</el-descriptions-item>
<el-descriptions-item label="经营对象类型">{{ form.jydxlx }}</el-descriptions-item>
<el-descriptions-item label="经营对象名称">{{ form.jydxmc }}</el-descriptions-item>
<el-descriptions-item label="证件类型">{{ form.jydxzjlx }}</el-descriptions-item>
<el-descriptions-item label="证件号码">{{ form.jydxzjhm }}</el-descriptions-item>
<el-descriptions-item label="是否签订合同">{{ form.sfqdht }}</el-descriptions-item>
<el-descriptions-item label="经营开始时间">{{ form.jykssj }}</el-descriptions-item>
<el-descriptions-item label="经营结束时间">{{ form.jyjssj }}</el-descriptions-item>
<el-descriptions-item label="承包金额(元)">{{ form.cbje }}</el-descriptions-item>
<el-descriptions-item label="兑现金额(元)">{{ form.dxje }}</el-descriptions-item>
<el-descriptions-item label="尚欠金额(元)">{{ form.sqje }}</el-descriptions-item>
<el-descriptions-item label="年收益(元)">{{ form.nsy }}</el-descriptions-item>
<el-descriptions-item label="备注">{{ form.bz }}</el-descriptions-item>
<el-descriptions-item label="调查状态">{{ form.surveyStatus }}</el-descriptions-item>
<el-descriptions-item label="实物图">


+ 2
- 2
vue.config.js 查看文件

@@ -9,8 +9,8 @@ const CompressionPlugin = require('compression-webpack-plugin')

const name = process.env.VUE_APP_TITLE

//const baseUrl = 'http://localhost:8080' // 后端接口
const baseUrl = 'http://192.168.0.106:8080' // 后端接口 zzl
const baseUrl = 'http://localhost:8080' // 后端接口
//const baseUrl = 'http://192.168.0.106:8080' // 后端接口 zzl

const port = process.env.port || process.env.npm_config_port || 80 // 端口



正在加载...
取消
保存