feat:土地违法页面搭建
This commit is contained in:
parent
491bb5df40
commit
15932fe654
@ -7,7 +7,7 @@ export {}
|
|||||||
|
|
||||||
declare module 'vue' {
|
declare module 'vue' {
|
||||||
export interface GlobalComponents {
|
export interface GlobalComponents {
|
||||||
CustCard: typeof import('./src/components/CustCard.vue')['default']
|
CustomCard: typeof import('./src/components/CustomCard.vue')['default']
|
||||||
GridSelect: typeof import('./src/components/GridSelect.vue')['default']
|
GridSelect: typeof import('./src/components/GridSelect.vue')['default']
|
||||||
LandType: typeof import('./src/components/LandType.vue')['default']
|
LandType: typeof import('./src/components/LandType.vue')['default']
|
||||||
Pagina: typeof import('./src/components/Pagina.vue')['default']
|
Pagina: typeof import('./src/components/Pagina.vue')['default']
|
||||||
|
@ -12,7 +12,7 @@ import { ref, watch } from 'vue';
|
|||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
// 父组件传过来的值
|
// 父组件传过来的值
|
||||||
value: {
|
value: {
|
||||||
type: String || null,
|
type: String || Number || null,
|
||||||
default: null,
|
default: null,
|
||||||
},
|
},
|
||||||
placeholder: {
|
placeholder: {
|
||||||
@ -28,7 +28,7 @@ const val = ref(null);
|
|||||||
watch(
|
watch(
|
||||||
() => props.value,
|
() => props.value,
|
||||||
() => {
|
() => {
|
||||||
val.value = props.value;
|
val.value = props.value || props.value == 0 ? String(props.value) : null;
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
deep: true,
|
deep: true,
|
||||||
|
@ -12,7 +12,7 @@ import { ref, watch } from 'vue';
|
|||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
// 父组件传过来的值
|
// 父组件传过来的值
|
||||||
value: {
|
value: {
|
||||||
type: String || null,
|
type: String || Number || null,
|
||||||
default: null,
|
default: null,
|
||||||
},
|
},
|
||||||
placeholder: {
|
placeholder: {
|
||||||
@ -28,7 +28,7 @@ const val = ref(null);
|
|||||||
watch(
|
watch(
|
||||||
() => props.value,
|
() => props.value,
|
||||||
() => {
|
() => {
|
||||||
val.value = props.value;
|
val.value = props.value || props.value == 0 ? String(props.value) : null;
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
deep: true,
|
deep: true,
|
@ -12,7 +12,7 @@ import { ref, watch } from 'vue';
|
|||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
// 父组件传过来的值
|
// 父组件传过来的值
|
||||||
value: {
|
value: {
|
||||||
type: String || null,
|
type: String || Number || null,
|
||||||
default: null,
|
default: null,
|
||||||
},
|
},
|
||||||
placeholder: {
|
placeholder: {
|
||||||
@ -28,7 +28,7 @@ const val = ref(null);
|
|||||||
watch(
|
watch(
|
||||||
() => props.value,
|
() => props.value,
|
||||||
() => {
|
() => {
|
||||||
val.value = props.value;
|
val.value = props.value || props.value == 0 ? String(props.value) : null;
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
deep: true,
|
deep: true,
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<CustCard>
|
<CustomCard>
|
||||||
<el-form ref="searchRef" :model="searchCondition">
|
<el-form ref="searchRef" :model="searchCondition">
|
||||||
<el-row :gutter="20">
|
<el-row :gutter="20">
|
||||||
<el-col :span="6">
|
<el-col :span="6">
|
||||||
@ -117,13 +117,13 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</CustCard>
|
</CustomCard>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { ref, reactive, onMounted } from 'vue';
|
import { ref, reactive, onMounted } from 'vue';
|
||||||
import Pagina from '@/components/pagina.vue';
|
import Pagina from '@/components/pagina.vue';
|
||||||
import CustCard from '@/components/CustCard.vue';
|
import CustomCard from '@/components/CustomCard.vue';
|
||||||
import { getAnnualList, saveAnnual, editAnnual, examineAnnual, delAnnual, exportAnnua } from '@/apis/land.js';
|
import { getAnnualList, saveAnnual, editAnnual, examineAnnual, delAnnual, exportAnnua } from '@/apis/land.js';
|
||||||
import { useApp } from '@/hooks';
|
import { useApp } from '@/hooks';
|
||||||
import { isEmpty, imageToBase64, getAssetsFile, downloadFile } from '@/utils';
|
import { isEmpty, imageToBase64, getAssetsFile, downloadFile } from '@/utils';
|
||||||
|
@ -0,0 +1,112 @@
|
|||||||
|
<template>
|
||||||
|
<el-dialog v-model="_visible" title="案件登记处理" append-to="#app" @close="handleClose">
|
||||||
|
<h3>案件信息></h3>
|
||||||
|
<section class="case_info">
|
||||||
|
<div v-for="item in info" :key="`${item.key}_box`" :style="{ '--w': item.line ? '100%' : 'calc(50% - 12px)' }">
|
||||||
|
<div>{{ item.label }} : </div>
|
||||||
|
<div class="text">{{ item.value }}</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
<h3>案件处理></h3>
|
||||||
|
<el-form></el-form>
|
||||||
|
<h3>案件结果></h3>
|
||||||
|
</el-dialog>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import { ref, reactive, watch } from 'vue';
|
||||||
|
|
||||||
|
const emit = defineEmits(['update:visible']);
|
||||||
|
const props = defineProps({
|
||||||
|
visible: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
watch(
|
||||||
|
() => props.visible,
|
||||||
|
(val) => {
|
||||||
|
_visible.value = val;
|
||||||
|
}
|
||||||
|
);
|
||||||
|
/* --------------- data --------------- */
|
||||||
|
// #region
|
||||||
|
|
||||||
|
const _visible = ref(false);
|
||||||
|
const info = reactive([
|
||||||
|
{
|
||||||
|
label: '案件名称',
|
||||||
|
key: 'caseName',
|
||||||
|
value: '/',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '案件编号',
|
||||||
|
key: 'caseCode',
|
||||||
|
value: '/',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '关联单位',
|
||||||
|
key: 'unit',
|
||||||
|
value: '/',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '关联地块',
|
||||||
|
key: 'land',
|
||||||
|
value: '/',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '法定代表人',
|
||||||
|
key: 'owner',
|
||||||
|
value: '/',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '联系电话',
|
||||||
|
key: 'phone',
|
||||||
|
value: '/',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '统一社会信用代码',
|
||||||
|
key: 'num',
|
||||||
|
value: '/',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '违法情况',
|
||||||
|
key: 'illegal',
|
||||||
|
value: '/',
|
||||||
|
line: true,
|
||||||
|
},
|
||||||
|
]);
|
||||||
|
|
||||||
|
// #endregion
|
||||||
|
|
||||||
|
/* --------------- methods --------------- */
|
||||||
|
// #region
|
||||||
|
|
||||||
|
function handleClose() {
|
||||||
|
emit('update:visible', false);
|
||||||
|
}
|
||||||
|
|
||||||
|
// #endregion
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.el-dialog {
|
||||||
|
h3 {
|
||||||
|
color: #000;
|
||||||
|
}
|
||||||
|
.case_info {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
> div {
|
||||||
|
width: var(--w);
|
||||||
|
display: flex;
|
||||||
|
padding: 10px 0;
|
||||||
|
.text {
|
||||||
|
flex: 1;
|
||||||
|
word-break: break-all;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
@ -1,18 +1,206 @@
|
|||||||
<template>
|
<template>
|
||||||
<section>违法处理</section>
|
<CustomCard>
|
||||||
|
<avue-crud
|
||||||
|
v-model:page="page"
|
||||||
|
v-model:search="searchData"
|
||||||
|
:option="option"
|
||||||
|
:data="data"
|
||||||
|
:table-loading="_loading"
|
||||||
|
@current-change="handlePageChange"
|
||||||
|
@size-change="handleSizeChange"
|
||||||
|
@search-change="handleSearch"
|
||||||
|
@row-save="handleRowSave"
|
||||||
|
>
|
||||||
|
<template #menu="{ row }">
|
||||||
|
<el-button type="primary" @click="handleInfo(row)">登记处理</el-button>
|
||||||
|
</template>
|
||||||
|
</avue-crud>
|
||||||
|
</CustomCard>
|
||||||
|
<Register v-model:visible="caseInfo.visible" />
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script setup>
|
||||||
import { ref } from 'vue';
|
import { ref } from 'vue';
|
||||||
|
import { CRUD_OPTIONS } from '@/config';
|
||||||
|
import CustomCard from '@/components/CustomCard.vue';
|
||||||
|
import { useUserStore } from '@/store/modules/user';
|
||||||
|
import Register from './common/Register.vue';
|
||||||
|
|
||||||
|
const { VITE_APP_BASE_API } = import.meta.env;
|
||||||
|
const UserStore = useUserStore();
|
||||||
|
|
||||||
/* --------------- data --------------- */
|
/* --------------- data --------------- */
|
||||||
// #region
|
// #region
|
||||||
|
const searchData = ref({
|
||||||
|
code: '',
|
||||||
|
process: '',
|
||||||
|
});
|
||||||
|
const page = ref({
|
||||||
|
currentPage: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
total: 3,
|
||||||
|
});
|
||||||
|
const _loading = ref(false);
|
||||||
|
const data = ref([
|
||||||
|
{
|
||||||
|
id: '1',
|
||||||
|
code: '111111111',
|
||||||
|
name: '张三',
|
||||||
|
unit: '123333333333333333333333333333',
|
||||||
|
owner: '张三',
|
||||||
|
process: '北京',
|
||||||
|
date: '2020-02-02',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: '2',
|
||||||
|
code: '222222222',
|
||||||
|
name: '张三',
|
||||||
|
unit: '123333333333333333333333333333',
|
||||||
|
owner: '张三',
|
||||||
|
process: '北京',
|
||||||
|
date: '2020-02-02',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: '3',
|
||||||
|
code: '333333333333',
|
||||||
|
name: '张三',
|
||||||
|
unit: '123333333333333333333333333333',
|
||||||
|
owner: '张三',
|
||||||
|
process: '北京',
|
||||||
|
date: '2020-02-02',
|
||||||
|
},
|
||||||
|
]);
|
||||||
|
const option = ref({
|
||||||
|
...CRUD_OPTIONS,
|
||||||
|
refreshBtn: false,
|
||||||
|
column: [
|
||||||
|
{
|
||||||
|
label: '案件编号',
|
||||||
|
prop: 'code',
|
||||||
|
search: true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '案件名称',
|
||||||
|
prop: 'name',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '关联单位',
|
||||||
|
prop: 'unit',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '关联土地·',
|
||||||
|
prop: 'land',
|
||||||
|
type: 'select',
|
||||||
|
addDisplay: true,
|
||||||
|
hide: true,
|
||||||
|
dicUrl: `${VITE_APP_BASE_API}/land-resource/landManage/page`,
|
||||||
|
dicQuery: {
|
||||||
|
current: 1,
|
||||||
|
size: 9999,
|
||||||
|
},
|
||||||
|
props: {
|
||||||
|
value: 'id',
|
||||||
|
label: 'landName',
|
||||||
|
},
|
||||||
|
dicMethod: 'get',
|
||||||
|
dicHeaders: {
|
||||||
|
authorization: UserStore.token,
|
||||||
|
},
|
||||||
|
dicFormatter: (res) => res?.data?.records ?? [],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '联系电话',
|
||||||
|
prop: 'phone',
|
||||||
|
viewDisplay: true,
|
||||||
|
// addDisplay: true,
|
||||||
|
hide: true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '法定代表人',
|
||||||
|
prop: 'onwer',
|
||||||
|
addDisplay: true,
|
||||||
|
hide: true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '统一社会信用代码',
|
||||||
|
prop: 'code',
|
||||||
|
addDisplay: true,
|
||||||
|
hide: true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '违法情况',
|
||||||
|
prop: 'illegal',
|
||||||
|
type: 'textarea',
|
||||||
|
addDisplay: true,
|
||||||
|
hide: true,
|
||||||
|
width: '100%',
|
||||||
|
span: 24,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '负责人',
|
||||||
|
prop: 'owner',
|
||||||
|
display: false,
|
||||||
|
addDisplay: true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '案件进度',
|
||||||
|
prop: 'process',
|
||||||
|
display: false,
|
||||||
|
search: true,
|
||||||
|
addDisplay: true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '案件结果',
|
||||||
|
prop: 'result',
|
||||||
|
display: false,
|
||||||
|
addDisplay: true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '处理时间',
|
||||||
|
prop: 'date',
|
||||||
|
display: false,
|
||||||
|
addDisplay: false,
|
||||||
|
editDisplay: true,
|
||||||
|
},
|
||||||
|
],
|
||||||
|
});
|
||||||
|
const caseInfo = ref({
|
||||||
|
visible: false,
|
||||||
|
});
|
||||||
// #endregion
|
// #endregion
|
||||||
|
|
||||||
/* --------------- methods --------------- */
|
/* --------------- methods --------------- */
|
||||||
// #region
|
|
||||||
|
|
||||||
|
// #region
|
||||||
|
function handlePageChange(val) {
|
||||||
|
console.log('page', val);
|
||||||
|
page.value.currentPage = val;
|
||||||
|
}
|
||||||
|
function handleSizeChange(val) {
|
||||||
|
page.value.pageSize = val;
|
||||||
|
console.log('size', val, page.value);
|
||||||
|
}
|
||||||
|
function handleInfo(row) {
|
||||||
|
console.log('row', row);
|
||||||
|
caseInfo.value.visible = true;
|
||||||
|
}
|
||||||
|
function handleSearch(form, done) {
|
||||||
|
console.log('search', form);
|
||||||
|
let t = setTimeout(() => {
|
||||||
|
clearTimeout(t);
|
||||||
|
done();
|
||||||
|
}, 1000);
|
||||||
|
}
|
||||||
|
function handleRowSave(val, done, loading) {
|
||||||
|
console.log('val', val);
|
||||||
|
console.log('done', done);
|
||||||
|
console.log('loading', loading);
|
||||||
|
loading();
|
||||||
|
let t = setTimeout(() => {
|
||||||
|
clearTimeout(t);
|
||||||
|
done();
|
||||||
|
}, 1000);
|
||||||
|
}
|
||||||
// #endregion
|
// #endregion
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
<el-drawer v-model="_visible" title="土地信息" :size="800" @close="handleClose">
|
<el-drawer v-model="_visible" title="土地信息" :size="800" @close="handleClose">
|
||||||
<el-card>
|
<el-card>
|
||||||
<div class="title_">基础信息</div>
|
<div class="title_">基础信息</div>
|
||||||
<el-form ref="baseForm" :model="baseInfo" class="base_form" label-width="120px" :rules="rules">
|
<el-form ref="baseForm" :model="baseInfo" :disabled="props.rowData.isDetails" class="base_form" label-width="120px" :rules="rules">
|
||||||
<el-form-item label="土地名称" prop="landName">
|
<el-form-item label="土地名称" prop="landName">
|
||||||
<el-input v-model="baseInfo.landName" placeholder="请输入名称"></el-input>
|
<el-input v-model="baseInfo.landName" placeholder="请输入名称"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@ -26,7 +26,7 @@
|
|||||||
<el-input v-model="baseInfo.villageCode" placeholder="请输入"></el-input>
|
<el-input v-model="baseInfo.villageCode" placeholder="请输入"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="是否土地流转" prop="isTransfer">
|
<el-form-item label="是否土地流转" prop="isTransfer">
|
||||||
<LandIsTranfer v-model:value="baseInfo.isTransfer" />
|
<LandIsTransfer v-model:value="baseInfo.isTransfer" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="面积" prop="area">
|
<el-form-item label="面积" prop="area">
|
||||||
<el-input v-model="baseInfo.area" placeholder="请输入面积"></el-input>
|
<el-input v-model="baseInfo.area" placeholder="请输入面积"></el-input>
|
||||||
@ -42,7 +42,7 @@
|
|||||||
<br />
|
<br />
|
||||||
<el-card>
|
<el-card>
|
||||||
<div class="title_">土地产权信息</div>
|
<div class="title_">土地产权信息</div>
|
||||||
<el-form ref="propertyForm" :model="propertyInfo" class="property_form" label-width="120px">
|
<el-form ref="propertyForm" :model="propertyInfo" :disabled="props.rowData.isDetails" class="property_form" label-width="120px">
|
||||||
<el-form-item label="产权人姓名" prop="propertyName">
|
<el-form-item label="产权人姓名" prop="propertyName">
|
||||||
<el-input v-model="propertyInfo.propertyName" placeholder="请输入联系人"></el-input>
|
<el-input v-model="propertyInfo.propertyName" placeholder="请输入联系人"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@ -64,8 +64,8 @@
|
|||||||
</el-form>
|
</el-form>
|
||||||
</el-card>
|
</el-card>
|
||||||
<section class="btns">
|
<section class="btns">
|
||||||
<el-button type="primary" @click="handleSubmit">保存并提交审核</el-button>
|
<el-button type="primary" :disabled="props.rowData.isDetails" @click="handleSubmit">保存并提交审核</el-button>
|
||||||
<el-button type="warning" @click="handleSubmit">保存草稿</el-button>
|
<!-- <el-button type="warning" :disabled="props.rowData.info" @click="handleSubmit">保存草稿</el-button> -->
|
||||||
<el-button @click="handleClose">取消</el-button>
|
<el-button @click="handleClose">取消</el-button>
|
||||||
</section>
|
</section>
|
||||||
</el-drawer>
|
</el-drawer>
|
||||||
@ -75,7 +75,7 @@
|
|||||||
import { reactive, ref, watch } from 'vue';
|
import { reactive, ref, watch } from 'vue';
|
||||||
import LandClassificationType from '@/components/LandClassificationType.vue';
|
import LandClassificationType from '@/components/LandClassificationType.vue';
|
||||||
import CustomSelect from '@/components/CustomSelect.vue';
|
import CustomSelect from '@/components/CustomSelect.vue';
|
||||||
import LandIsTranfer from '@/components/LandIsTranfer.vue';
|
import LandIsTransfer from '@/components/LandIsTransfer.vue';
|
||||||
import { saveLand } from '@/apis/land';
|
import { saveLand } from '@/apis/land';
|
||||||
import { ElMessage } from 'element-plus';
|
import { ElMessage } from 'element-plus';
|
||||||
import { CommonUpload } from '@/apis';
|
import { CommonUpload } from '@/apis';
|
||||||
@ -89,18 +89,23 @@ const props = defineProps({
|
|||||||
type: String,
|
type: String,
|
||||||
default: '0',
|
default: '0',
|
||||||
},
|
},
|
||||||
|
rowData: {
|
||||||
|
type: Object,
|
||||||
|
default: () => {},
|
||||||
|
},
|
||||||
});
|
});
|
||||||
const emit = defineEmits(['close']);
|
const emit = defineEmits(['close']);
|
||||||
/* --------------- data --------------- */
|
/* --------------- data --------------- */
|
||||||
// #region
|
// #region
|
||||||
|
|
||||||
const _visible = ref(false);
|
const _visible = ref(false);
|
||||||
|
const editId = ref(null);
|
||||||
const baseInfo = reactive({
|
const baseInfo = reactive({
|
||||||
landName: '',
|
landName: '',
|
||||||
gridId: '',
|
gridId: '',
|
||||||
landClassificationType: '',
|
landClassificationType: '',
|
||||||
villageCode: '',
|
villageCode: '',
|
||||||
isTransfer: '',
|
isTransfer: '1',
|
||||||
area: '',
|
area: '',
|
||||||
owner: '',
|
owner: '',
|
||||||
soilType: '',
|
soilType: '',
|
||||||
@ -115,6 +120,26 @@ watch(
|
|||||||
() => props.visible,
|
() => props.visible,
|
||||||
() => {
|
() => {
|
||||||
_visible.value = props.visible;
|
_visible.value = props.visible;
|
||||||
|
if (!props.rowData.id) {
|
||||||
|
editId.value = props.rowData.id;
|
||||||
|
} else {
|
||||||
|
for (let key in baseInfo) {
|
||||||
|
baseInfo[key] = props.rowData[key];
|
||||||
|
}
|
||||||
|
baseInfo.isTransfer = props.rowData.landTransfer || '0';
|
||||||
|
for (let key in propertyInfo) {
|
||||||
|
propertyInfo[key] = props.rowData[key];
|
||||||
|
}
|
||||||
|
if (propertyInfo.propertyCertificateUrl) {
|
||||||
|
propertyInfo.propertyCertificateUrl = props.rowData.propertyCertificateUrl.map((item, i) => {
|
||||||
|
return {
|
||||||
|
url: item.url,
|
||||||
|
id: `id_${i}_${Date.now()}`,
|
||||||
|
name: item.name || `name_${i}_${Date.now()}`,
|
||||||
|
};
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
watch(
|
watch(
|
||||||
@ -161,9 +186,10 @@ async function handleSubmit() {
|
|||||||
isDraftsSave: 0,
|
isDraftsSave: 0,
|
||||||
landType: props.landType,
|
landType: props.landType,
|
||||||
};
|
};
|
||||||
let ids = '';
|
let ids = [];
|
||||||
propertyInfo.propertyCertificateUrl.map((item) => (ids += item.id));
|
propertyInfo.propertyCertificateUrl.map((item) => ids.push(item.url));
|
||||||
data.propertyCertificateUrl = ids;
|
data.propertyCertificateUrl = ids.join();
|
||||||
|
editId.value && (data.id = editId.value);
|
||||||
const res = await saveLand(data);
|
const res = await saveLand(data);
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
ElMessage.success('保存成功');
|
ElMessage.success('保存成功');
|
||||||
@ -178,6 +204,13 @@ function handleClose() {
|
|||||||
function resFrom() {
|
function resFrom() {
|
||||||
baseForm.value.resetFields();
|
baseForm.value.resetFields();
|
||||||
propertyForm.value.resetFields();
|
propertyForm.value.resetFields();
|
||||||
|
for (let key in baseInfo) {
|
||||||
|
baseInfo[key] = '';
|
||||||
|
}
|
||||||
|
for (let key in propertyInfo) {
|
||||||
|
propertyInfo[key] = '';
|
||||||
|
}
|
||||||
|
propertyInfo.propertyCertificateUrl = [];
|
||||||
}
|
}
|
||||||
|
|
||||||
// #endregion
|
// #endregion
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<CustCard>
|
<CustomCard>
|
||||||
<el-radio-group v-model="searchCondition.landType" class="lands_types" style="margin-bottom: 30px" @change="getList()">
|
<el-radio-group v-model="searchCondition.landType" class="lands_types" style="margin-bottom: 30px" @change="getList()">
|
||||||
<el-radio-button v-for="item in landsType" :key="'landsType_' + item.value" :value="item.value">
|
<el-radio-button v-for="item in landsType" :key="'landsType_' + item.value" :value="item.value">
|
||||||
{{ item.label }}
|
{{ item.label }}
|
||||||
@ -56,21 +56,21 @@
|
|||||||
<el-table-column fixed="right" label="操作" width="200" show-overflow-tooltip>
|
<el-table-column fixed="right" label="操作" width="200" show-overflow-tooltip>
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
<el-button type="primary" link @click="handleEdit(row)">编辑</el-button>
|
<el-button type="primary" link @click="handleEdit(row)">编辑</el-button>
|
||||||
<el-button type="info" link @click="handleInfo(row)">详情</el-button>
|
<el-button type="info" link @click="handleEdit(row, true)">详情</el-button>
|
||||||
<el-button type="danger" link @click="handleDelete(row)">删除</el-button>
|
<el-button type="danger" link @click="handleDelete(row)">删除</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
<br />
|
<br />
|
||||||
<Pagina :page-data="pageData" @page-change="(v) => handlePaginaChange(v, true)" @size-hange="(v) => handlePaginaChange(v)" />
|
<Pagina :page-data="pageData" @page-change="(v) => handlePaginaChange(v, true)" @size-hange="(v) => handlePaginaChange(v)" />
|
||||||
</CustCard>
|
</CustomCard>
|
||||||
<CreateLand :visible="addFlag" :row-data="rowData" :land-type="searchCondition.landType" @close="addFlag = false" />
|
<CreateLand :visible="addFlag" :row-data="rowData" :land-type="searchCondition.landType" @close="addFlag = false" />
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { ref, reactive, onMounted } from 'vue';
|
import { ref, reactive, onMounted } from 'vue';
|
||||||
import Pagina from '@/components/pagina.vue';
|
import Pagina from '@/components/pagina.vue';
|
||||||
import CustCard from '@/components/CustCard.vue';
|
import CustomCard from '@/components/CustomCard.vue';
|
||||||
import { getLandsList, exportLands } from '@/apis/land.js';
|
import { getLandsList, exportLands } from '@/apis/land.js';
|
||||||
import CreateLand from './common/CreateLand.vue';
|
import CreateLand from './common/CreateLand.vue';
|
||||||
|
|
||||||
@ -115,6 +115,7 @@ const btns = reactive([
|
|||||||
label: '新增土地',
|
label: '新增土地',
|
||||||
method: function () {
|
method: function () {
|
||||||
console.log('add');
|
console.log('add');
|
||||||
|
rowData.value = {};
|
||||||
addFlag.value = true;
|
addFlag.value = true;
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@ -136,6 +137,7 @@ const btns = reactive([
|
|||||||
method: handleExport,
|
method: handleExport,
|
||||||
},
|
},
|
||||||
]);
|
]);
|
||||||
|
const rowData = ref({});
|
||||||
|
|
||||||
// #endregion
|
// #endregion
|
||||||
|
|
||||||
@ -193,7 +195,12 @@ async function handleExport() {
|
|||||||
document.body.removeChild(a);
|
document.body.removeChild(a);
|
||||||
window.URL.revokeObjectURL(link);
|
window.URL.revokeObjectURL(link);
|
||||||
}
|
}
|
||||||
console.log('res', res);
|
}
|
||||||
|
function handleEdit(row, info = true) {
|
||||||
|
rowData.value = row;
|
||||||
|
rowData.value.isDetails = info;
|
||||||
|
addFlag.value = true;
|
||||||
|
console.log('rowd', rowData.value);
|
||||||
}
|
}
|
||||||
// #endregion
|
// #endregion
|
||||||
</script>
|
</script>
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<CustCard>
|
<CustomCard>
|
||||||
<el-form ref="searchRef" :model="searchCondition">
|
<el-form ref="searchRef" :model="searchCondition">
|
||||||
<el-row :gutter="20">
|
<el-row :gutter="20">
|
||||||
<el-col :span="6">
|
<el-col :span="6">
|
||||||
@ -139,13 +139,13 @@
|
|||||||
<Pagina :page-data="subPageData" />
|
<Pagina :page-data="subPageData" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</CustCard>
|
</CustomCard>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { ref, reactive, onMounted } from 'vue';
|
import { ref, reactive, onMounted } from 'vue';
|
||||||
import Pagina from '@/components/pagina.vue';
|
import Pagina from '@/components/pagina.vue';
|
||||||
import CustCard from '@/components/CustCard.vue';
|
import CustomCard from '@/components/CustomCard.vue';
|
||||||
import { getLandsList, saveLand } from '@/apis/land.js';
|
import { getLandsList, saveLand } from '@/apis/land.js';
|
||||||
import { useApp } from '@/hooks';
|
import { useApp } from '@/hooks';
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
|
@ -34,17 +34,6 @@
|
|||||||
<el-icon v-else class="custom-form__uploader__icon"><Plus /></el-icon>
|
<el-icon v-else class="custom-form__uploader__icon"><Plus /></el-icon>
|
||||||
</el-upload>
|
</el-upload>
|
||||||
</template>
|
</template>
|
||||||
<template #id="{ row }">
|
|
||||||
<!-- <span @click="handleShowQrcode(row.id)">{{ row.id }}</span> -->
|
|
||||||
<el-popover placement="top" trigger="click" :width="330">
|
|
||||||
<template #reference>
|
|
||||||
<span>{{ row.id }}</span>
|
|
||||||
</template>
|
|
||||||
<template #default>
|
|
||||||
<img :src="row.orCodeUrl" alt="" />
|
|
||||||
</template>
|
|
||||||
</el-popover>
|
|
||||||
</template>
|
|
||||||
<template #customInfo-form="{ column }">
|
<template #customInfo-form="{ column }">
|
||||||
<custom-info :row="state.currentRow" />
|
<custom-info :row="state.currentRow" />
|
||||||
</template>
|
</template>
|
||||||
@ -65,9 +54,6 @@
|
|||||||
|
|
||||||
<custom-quality-add ref="qualityAddRef" :row="state.currentRow" />
|
<custom-quality-add ref="qualityAddRef" :row="state.currentRow" />
|
||||||
</div>
|
</div>
|
||||||
<!-- <el-dialog v-model="qrInfo.show" title="扫码溯源" width="500" :before-close="() => (qrInfo.show = false)">
|
|
||||||
<QrCode :value="qrInfo.url" :size="300" />
|
|
||||||
</el-dialog> -->
|
|
||||||
</template>
|
</template>
|
||||||
<script setup>
|
<script setup>
|
||||||
import { reactive, ref } from 'vue';
|
import { reactive, ref } from 'vue';
|
||||||
|
Loading…
x
Reference in New Issue
Block a user