feat
This commit is contained in:
parent
0d7dee0909
commit
caf8c138a8
@ -3,6 +3,7 @@ import * as materialApi from './material';
|
|||||||
import * as knowledgeApi from './knowledge';
|
import * as knowledgeApi from './knowledge';
|
||||||
import * as leaseSuperviseApi from './leaseSupervise';
|
import * as leaseSuperviseApi from './leaseSupervise';
|
||||||
import * as productionDealerApi from './productionDealer';
|
import * as productionDealerApi from './productionDealer';
|
||||||
|
import * as useSuperviseApi from './useSupervise';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
...materialApi,
|
...materialApi,
|
||||||
@ -10,4 +11,5 @@ export default {
|
|||||||
...knowledgeApi,
|
...knowledgeApi,
|
||||||
...leaseSuperviseApi,
|
...leaseSuperviseApi,
|
||||||
...productionDealerApi,
|
...productionDealerApi,
|
||||||
|
...useSuperviseApi,
|
||||||
};
|
};
|
||||||
|
@ -0,0 +1,24 @@
|
|||||||
|
import request from '@/utils/axios';
|
||||||
|
|
||||||
|
export function getUseSuperviseList(params) {
|
||||||
|
return request('/inputGoogs/supervise/list', {
|
||||||
|
params,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
export function delUseSupervise(ids) {
|
||||||
|
return request(`/inputGoogs/supervise/delete/${ids}`);
|
||||||
|
}
|
||||||
|
export function addUseSupervise(data) {
|
||||||
|
return request('/inputGoogs/supervise/save', {
|
||||||
|
method: 'POST',
|
||||||
|
data,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
export function editUseSupervise(data) {
|
||||||
|
return request('/inputGoogs/supervise/edit', {
|
||||||
|
method: 'PUT',
|
||||||
|
data,
|
||||||
|
});
|
||||||
|
}
|
@ -31,8 +31,11 @@
|
|||||||
import { reactive, ref, watch } from 'vue';
|
import { reactive, ref, watch } from 'vue';
|
||||||
import { CRUD_OPTIONS, pageData } from '@/config';
|
import { CRUD_OPTIONS, pageData } from '@/config';
|
||||||
import { useBasicInfo } from '@/views/inputSuppliesManage/hooks/useBasicInfo';
|
import { useBasicInfo } from '@/views/inputSuppliesManage/hooks/useBasicInfo';
|
||||||
|
import inputSuppliesApi from '@/apis/inputSuppliesApi';
|
||||||
const { loadFinish, materialTwoLevel, materialTypes } = useBasicInfo();
|
import assistFn from '@/views/inputSuppliesManage/hooks/useAssistFn';
|
||||||
|
const { deleteFn } = new assistFn();
|
||||||
|
const { getUseSpuserviseList, delUseSupdervise, addUseSupdervise, editUseSupdervise } = inputSuppliesApi;
|
||||||
|
const { loadFinish, materialTypes } = useBasicInfo();
|
||||||
|
|
||||||
watch(
|
watch(
|
||||||
() => loadFinish.value,
|
() => loadFinish.value,
|
||||||
@ -170,9 +173,20 @@ const option = ref({
|
|||||||
|
|
||||||
/* --------------- methods --------------- */
|
/* --------------- methods --------------- */
|
||||||
// #region
|
// #region
|
||||||
function getData(reset = 1) {
|
async function getData(reset = 1) {
|
||||||
|
_loading.value = true;
|
||||||
reset == 1 && (pageData.value.currentPage = 1);
|
reset == 1 && (pageData.value.currentPage = 1);
|
||||||
console.log('get data');
|
console.log('get data');
|
||||||
|
let res = await getUseSpuserviseList({
|
||||||
|
page: pageData.value.currentPage,
|
||||||
|
size: pageData.value.pageSize,
|
||||||
|
dataType: searchCondition.value.searchType,
|
||||||
|
name: searchCondition.value.keywords,
|
||||||
|
});
|
||||||
|
_loading.value = false;
|
||||||
|
if (res.code == 200) {
|
||||||
|
console.log('res', res);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
function handleTypeChange(val) {
|
function handleTypeChange(val) {
|
||||||
console.log(
|
console.log(
|
||||||
|
@ -37,13 +37,16 @@
|
|||||||
<el-button type="success" icon="download" @click="handleExport">导出</el-button>
|
<el-button type="success" icon="download" @click="handleExport">导出</el-button>
|
||||||
<el-button type="success" icon="upload" @click="onUpload">导入</el-button>
|
<el-button type="success" icon="upload" @click="onUpload">导入</el-button>
|
||||||
</template>
|
</template>
|
||||||
<template #area-form>
|
<template #area-form="{ type }">
|
||||||
<section class="area_form_">
|
<section v-show="type != 'view'" class="area_form_">
|
||||||
<el-input-number v-model="landArea" :precision="2" :step="1" :min="1" controls-position="right"></el-input-number>
|
<el-input-number v-model="landArea" :precision="2" :step="1" :min="1" controls-position="right"></el-input-number>
|
||||||
<el-select v-model="unitValue">
|
<el-select v-model="unitValue">
|
||||||
<el-option v-for="item in unitOptions" :key="'unitOptions_' + item.value" :label="item.label" :value="item.label" />
|
<el-option v-for="item in unitOptions" :key="'unitOptions_' + item.value" :label="item.label" :value="item.label" />
|
||||||
</el-select>
|
</el-select>
|
||||||
</section>
|
</section>
|
||||||
|
<section v-show="type == 'view'">
|
||||||
|
{{ landArea + unitValue }}
|
||||||
|
</section>
|
||||||
</template>
|
</template>
|
||||||
<template #propertyCertificateUrl-form="{ type }">
|
<template #propertyCertificateUrl-form="{ type }">
|
||||||
<Attrs v-model:attrs="attrs" :type="type" />
|
<Attrs v-model:attrs="attrs" :type="type" />
|
||||||
@ -269,9 +272,10 @@ const option = reactive({
|
|||||||
trigger: 'blur',
|
trigger: 'blur',
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
change: handleChangeGrid,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '用地分类1',
|
label: '用地分类',
|
||||||
prop: 'landTypeId',
|
prop: 'landTypeId',
|
||||||
type: 'cascader',
|
type: 'cascader',
|
||||||
dicData: landTreeDic,
|
dicData: landTreeDic,
|
||||||
@ -306,6 +310,14 @@ const option = reactive({
|
|||||||
trigger: 'blur',
|
trigger: 'blur',
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
viewDisplay: false,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
hide: true,
|
||||||
|
label: '位置',
|
||||||
|
prop: 'address',
|
||||||
|
addDisplay: false,
|
||||||
|
editDisplay: false,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '是否土地流转',
|
label: '是否土地流转',
|
||||||
@ -476,35 +488,27 @@ async function getList(reset = 1) {
|
|||||||
v.coordinateView = v.coordinate;
|
v.coordinateView = v.coordinate;
|
||||||
v.soilTypeName = v.soilType;
|
v.soilTypeName = v.soilType;
|
||||||
v.soilTypeId = v.soilId;
|
v.soilTypeId = v.soilId;
|
||||||
v._villageCode = handleArea(v);
|
v._villageCode = v.villageCode;
|
||||||
v.landTypeId = [v.pid, v.landType];
|
v.landTypeId = [v.pid, v.landType];
|
||||||
console.log('vvv', v);
|
|
||||||
});
|
});
|
||||||
pageData.value.total = total;
|
pageData.value.total = total;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
function handleGetGrid(res) {
|
function handleGetGrid(res) {
|
||||||
console.log('res', res);
|
return res?.data?.records ?? [];
|
||||||
return res.records ?? [];
|
}
|
||||||
|
function handleChangeGrid(val) {
|
||||||
|
val.item && filterArea(val.item.townCode);
|
||||||
|
}
|
||||||
|
function filterArea(id) {
|
||||||
|
option.group[0].column[4].dicData = regionData.value.find((v) => v.areaCode == id)?.areaChildVOS ?? [];
|
||||||
}
|
}
|
||||||
async function handleGetRegion() {
|
async function handleGetRegion() {
|
||||||
let res = await getRegion();
|
let res = await getRegion();
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
option.group[0].column[5];
|
regionData.value = res?.data?.[0].areaChildVOS?.[0].areaChildVOS?.[0].areaChildVOS ?? [];
|
||||||
}
|
}
|
||||||
console.log('region', res);
|
|
||||||
}
|
}
|
||||||
function handleArea(v) {
|
|
||||||
const { provinceCode, cityCode, county, townCode, villageCode } = v;
|
|
||||||
let _area = [provinceCode, cityCode, county, townCode, villageCode];
|
|
||||||
let _arr = [];
|
|
||||||
for (let i = 0; i < _area.length; i++) {
|
|
||||||
if (!_area[i]) return;
|
|
||||||
_arr.push(_area[i]);
|
|
||||||
}
|
|
||||||
return _arr;
|
|
||||||
}
|
|
||||||
|
|
||||||
function handleSizeChange(val) {
|
function handleSizeChange(val) {
|
||||||
pageData.value.pageSize = val;
|
pageData.value.pageSize = val;
|
||||||
getList();
|
getList();
|
||||||
@ -581,7 +585,7 @@ function handleData(val) {
|
|||||||
data.propertyCertificateUrl = urls.join();
|
data.propertyCertificateUrl = urls.join();
|
||||||
data.landCertificateUrl = landOwnerUrls.join();
|
data.landCertificateUrl = landOwnerUrls.join();
|
||||||
data.landUrl = landUrls.join();
|
data.landUrl = landUrls.join();
|
||||||
data.villageCode = data._villageCode[data._villageCode.length - 1] || '';
|
data.villageCode = data._villageCode;
|
||||||
data.landTypeId = data.landTypeId[data.landTypeId.length - 1];
|
data.landTypeId = data.landTypeId[data.landTypeId.length - 1];
|
||||||
data.soilType = data.soilTypeId;
|
data.soilType = data.soilTypeId;
|
||||||
if (local.value.length != 0) {
|
if (local.value.length != 0) {
|
||||||
@ -617,14 +621,13 @@ async function handleRowUpdate(form, index, done, loading) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async function rowEdit(row) {
|
async function rowEdit(row) {
|
||||||
console.log('rowEdit', row);
|
|
||||||
handleOtherInfo(row);
|
handleOtherInfo(row);
|
||||||
|
filterArea(row.townCode);
|
||||||
crudRef.value.rowEdit(row);
|
crudRef.value.rowEdit(row);
|
||||||
}
|
}
|
||||||
function handleOtherInfo(obj) {
|
function handleOtherInfo(obj) {
|
||||||
landArea.value = obj.area;
|
landArea.value = obj.area;
|
||||||
unitValue.value = obj.landUnit;
|
unitValue.value = obj.landUnit;
|
||||||
console.log('option', obj._villageCode, option.group[0].column[4]);
|
|
||||||
if (obj.propertyCertificateUrl) {
|
if (obj.propertyCertificateUrl) {
|
||||||
attrs.value = obj.propertyCertificateUrl.split(',').map((v, i) => {
|
attrs.value = obj.propertyCertificateUrl.split(',').map((v, i) => {
|
||||||
return {
|
return {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user