提交 f5c50494 authored 作者: gjx's avatar gjx

修改查看边界按钮问题,修改风险管控效果评估里面点击添加情况数据问题,调整地块调查污染列表上传功能

上级 7f5afe23
......@@ -204,6 +204,14 @@ export const bianjieyijian = (params) => {
export const submiSlyj = (params) => {
return defHttp.post({ url: `/submiSlyj`, params });
};
// 初步调查污染信息列表
export const getWrwList = (params) => {
return defHttp.get({ url: `/dklc/getWrwList`, params });
};
// 初步调查污染信息新增
export const addWrw = '/dklc/addWrw';
......
<template>
<!-- 初步调查的 -->
<div class="w-full flex justify-end" v-if="type == 'edit'"><a-button type="primary" :customRequest="(d) => onImportXls(d)">上传</a-button></div>
<a-table :dataSource="dataSource" :columns="columns" />
<div class="w-full flex justify-end" v-if="type == 'edit'">
<a-upload name="file" :showUploadList="false" accept=".xls,.xlsx" :customRequest="(d) => onImportXls(d)" @click.stop class="ml-2">
<a-button type="primary">上传</a-button>
</a-upload>
</div>
<a-table :dataSource="dataSource" :columns="columns" :scroll="{ y: 500 }" />
</template>
<script lang="ts" setup>
import { ref } from 'vue';
import { useMessage } from '/@/hooks/web/useMessage';
import { useMethods } from '/@/hooks/system/useMethods';
import { getScchryUrl } from '@/api/dkgl.api';
import { getWrwList, addWrw } from '@/api/common/api';
defineProps({
const { createMessage } = useMessage();
const props = defineProps({
type: {
type: String,
default: 'edit',
},
wrdkid: {
type: String,
default: '',
},
});
const { handleImportXls } = useMethods();
const dataSource = ref();
......@@ -54,10 +64,25 @@
},
]);
// 获取地块污染信息列表
async function init() {
const res = await getWrwList({ wrdkid: props.wrdkid });
dataSource.value = res;
}
// init();
function onImportXls(d) {
handleImportXls(d, getScchryUrl, (res) => {
d.wrdkid = props.wrdkid;
console.log(d, 'd');
const file = d.file;
if (file.type != 'application/vnd.ms-excel' && file.type != 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet') {
createMessage.error('只能上传xls格式');
return;
}
handleImportXls(d, addWrw, (res) => {
if (res.code === 200) {
dataSource.value = res.result;
init();
}
});
}
......
......@@ -56,7 +56,7 @@ export function useMethods() {
* @param url
* @param success 成功后的回调
*/
async function importXls(data, url, success) {
async function importXls(data:any, url, success) {
const isReturn = (fileInfo) => {
try {
if (fileInfo.code === 201) {
......@@ -86,7 +86,12 @@ export function useMethods() {
typeof success === 'function' ? success(fileInfo) : '';
}
};
await defHttp.uploadFile({ url }, { file: data.file }, { success: isReturn });
if (data?.wrdkid) {
await defHttp.uploadFile({ url }, { file: data.file, wrdkid:data?.wrdkid}, { success: isReturn });
} else {
await defHttp.uploadFile({ url }, { file: data.file }, { success: isReturn });
}
}
return {
......
......@@ -64,6 +64,7 @@
import { useForm, BasicForm, FormSchema } from '/@/components/Form';
import { useUserStore } from '/@/store/modules/user';
import { updatePassword } from '@/api/common/api';
import { useMessage } from '/@/hooks/web/useMessage';
import dayjs from 'dayjs';
export default defineComponent({
......@@ -97,7 +98,7 @@
const { getShowSidebar, getIsMixSidebar, getShowMenu } = useMenuSetting();
const open = ref(false);
const menus = menusStore();
const { createMessage } = useMessage();
const lockEvents = useLockPage();
const route = useRoute();
const { menusRef } = useSplitMenu(toRef(props, 'splitType'));
......@@ -186,6 +187,10 @@
try {
let values = await validate();
//提交表单
if (values.oldpassword == values.password) {
createMessage.error('新密码不能与老密码一样');
return;
}
await updatePassword(values);
open.value = false;
//刷新列表
......
......@@ -75,7 +75,7 @@
scjdbm: 'S4',
});
saveFlg.value = true;
unitMessageFormList.value = dsInfor.value.bzdw;
unitMessageFormList.value = dsInfor.value.bzdw || [{ id: null }];
if (unitMessageFormList.value.length == 0) unitMessageFormList.value.push({ id: null });
}
......@@ -131,7 +131,7 @@
};
function addUnitMessageFormList(event) {
event.stopPropagation();
unitMessageFormList.value.unshift({ id: null });
unitMessageFormList.value.push({ id: null });
nextTick(() => {
callChildMethod(unitMessageFormList.value.length - 1);
});
......@@ -148,14 +148,14 @@
async function suBainFormAddEdit(event, index) {
event.stopPropagation();
try {
const res = await childrenBzd.value[index].getFormValueBz();
res.wthtje = String(res.wthtje);
res.scjdbm = 'S4';
res.pgtype = param.value.pgtype;
// 新增的时候没有这个值
res.wrdkid = param.value.wrdkid;
if (saveFlg.value) {
saveFlg.value = false;
const res = await childrenBzd.value[index].getFormValueBz();
res.wthtje = String(res.wthtje);
res.scjdbm = 'S4';
res.pgtype = param.value.pgtype;
// 新增的时候没有这个值
res.wrdkid = param.value.wrdkid;
const id = await updateBzdw(res);
if (id != '成功') {
unitMessageFormList.value[index] = res;
......
......@@ -10,7 +10,7 @@
<div>
<a-space>
<a-button type="primary" v-if="userInfo.userIdentity <= 3" @click="backHistory('xdyj')">下达意见</a-button>
<a-button type="primary" v-if="userInfo.userIdentity != 'S'" @click="backHistory('bjzdyj')">边界指导意见</a-button>
<a-button type="primary" v-if="userInfo.userType != 'S'" @click="backHistory('bjzdyj')">边界指导意见</a-button>
<a-button type="primary" @click="backHistory('tg')">退改历史</a-button>
<!-- <a-button type="primary" @click="views">查看地块全流程</a-button> -->
</a-space>
......@@ -119,7 +119,7 @@
const prefixes = ['3-'];
const arrays = [data.value.bzdw];
for (let i = 0; i < arrays.length; i++) {
arrays[i].forEach((el,index) => {
arrays[i].forEach((el, index) => {
activeKey.value.push(prefixes[i] + index);
});
}
......
......@@ -153,7 +153,7 @@
};
function addUnitMessageFormList(event) {
event.stopPropagation();
unitMessageFormList.value.unshift({ id: null });
unitMessageFormList.value.push({ id: null });
nextTick(() => {
callChildMethod(unitMessageFormList.value.length - 1);
});
......@@ -170,13 +170,13 @@
async function suBainFormAddEdit(event, index) {
event.stopPropagation();
try {
const res = await childrenBzd.value[index].getFormValueBz();
res.wthtje = String(res.wthtje);
res.scjdbm = 'S3';
// 新增的时候没有这个值
res.wrdkid = wrdkid.value;
if (saveFlg.value) {
saveFlg.value = false;
const res = await childrenBzd.value[index].getFormValueBz();
res.wthtje = String(res.wthtje);
res.scjdbm = 'S3';
// 新增的时候没有这个值
res.wrdkid = wrdkid.value;
const id = await updateBzdw(res);
if (id != '成功') {
unitMessageFormList.value[index] = res;
......
......@@ -10,7 +10,7 @@
<div>
<a-space>
<a-button type="primary" v-if="userInfo.userIdentity <= 3" @click="backHistory('xdyj')">下达意见</a-button>
<a-button type="primary" v-if="userInfo.userIdentity != 'S'" @click="backHistory('bjzdyj')">边界指导意见</a-button>
<a-button type="primary" v-if="userInfo.userType != 'S'" @click="backHistory('bjzdyj')">边界指导意见</a-button>
<a-button type="primary" @click="backHistory('tg')">退改历史</a-button>
</a-space>
</div>
......
......@@ -185,7 +185,7 @@
};
function addUnitMessageFormList(event) {
event.stopPropagation();
unitMessageFormList.value.unshift({ id: null });
unitMessageFormList.value.push({ id: null });
nextTick(() => {
callChildMethod(unitMessageFormList.value.length - 1);
});
......@@ -235,7 +235,7 @@
// 新增
function addDetectionMessageFormList(event) {
event.stopPropagation();
detectionMessageFormList.value.unshift({ id: null });
detectionMessageFormList.value.push({ id: null });
nextTick(() => {
callChildMethodjc(detectionMessageFormList.value.length - 1);
});
......@@ -284,7 +284,7 @@
// 新增
function addSs(event) {
event.stopPropagation();
ssdw.value.unshift({ id: null });
ssdw.value.push({ id: null });
nextTick(() => {
callChildMethodss(ssdw.value.length - 1);
});
......@@ -333,7 +333,7 @@
// 新增
function addjl(event) {
event.stopPropagation();
jldw.value.unshift({ id: null });
jldw.value.push({ id: null });
nextTick(() => {
callChildMethodjl(jldw.value.length - 1);
});
......
......@@ -10,7 +10,7 @@
<div>
<a-space>
<a-button type="primary" v-if="userInfo.userIdentity <= 3" @click="backHistory('xdyj')">下达意见</a-button>
<a-button type="primary" v-if="userInfo.userIdentity != 'S'" @click="backHistory('bjzdyj')">边界指导意见</a-button>
<a-button type="primary" v-if="userInfo.userType != 'S'" @click="backHistory('bjzdyj')">边界指导意见</a-button>
<a-button type="primary" @click="backHistory('tg')">退改历史</a-button>
<!-- <a-button type="primary" @click="views">查看地块全流程</a-button> -->
</a-space>
......@@ -123,7 +123,7 @@
const prefixes = ['3-', '4-'];
const arrays = [data.value.bzdw, data.value.jcdw];
for (let i = 0; i < arrays.length; i++) {
arrays[i].forEach((el,index) => {
arrays[i].forEach((el, index) => {
activeKey.value.push(prefixes[i] + index);
});
}
......
......@@ -175,7 +175,7 @@
};
function addUnitMessageFormList(event) {
event.stopPropagation();
unitMessageFormList.value.unshift({ id: null });
unitMessageFormList.value.push({ id: null });
nextTick(() => {
callChildMethod(unitMessageFormList.value.length - 1);
});
......@@ -227,7 +227,7 @@
// 新增
function addSs(event) {
event.stopPropagation();
ssdw.value.unshift({ id: null });
ssdw.value.push({ id: null });
nextTick(() => {
callChildMethodss(ssdw.value.length - 1);
});
......@@ -276,7 +276,7 @@
// 新增
function addjl(event) {
event.stopPropagation();
jldw.value.unshift({ id: null });
jldw.value.push({ id: null });
nextTick(() => {
callChildMethodjl(jldw.value.length - 1);
});
......
......@@ -11,7 +11,7 @@
<a-space>
<!-- <a-button type="primary" @click="views">查看地块全流程</a-button> -->
<a-button type="primary" v-if="userInfo.userIdentity <= 3" @click="backHistory('xdyj')">下达意见</a-button>
<a-button type="primary" v-if="userInfo.userIdentity != 'S'" @click="backHistory('bjzdyj')">边界指导意见</a-button>
<a-button type="primary" v-if="userInfo.userType != 'S'" @click="backHistory('bjzdyj')">边界指导意见</a-button>
<a-button type="primary" @click="backHistory('tg')">退改历史</a-button>
</a-space>
</div>
......@@ -127,7 +127,7 @@
const prefixes = ['4-'];
const arrays = [data.value.bzdw];
for (let i = 0; i < arrays.length; i++) {
arrays[i].forEach((el,index) => {
arrays[i].forEach((el, index) => {
activeKey.value.push(prefixes[i] + index);
});
}
......
......@@ -191,7 +191,7 @@
};
function addUnitMessageFormList(event) {
event.stopPropagation();
unitMessageFormList.value.unshift({ id: null });
unitMessageFormList.value.push({ id: null });
nextTick(() => {
callChildMethod(unitMessageFormList.value.length - 1);
});
......@@ -242,7 +242,7 @@
// 新增
function addDetectionMessageFormList(event) {
event.stopPropagation();
detectionMessageFormList.value.unshift({ id: null });
detectionMessageFormList.value.push({ id: null });
nextTick(() => {
callChildMethodjc(detectionMessageFormList.value.length - 1);
});
......@@ -291,7 +291,7 @@
// 新增
function addSs(event) {
event.stopPropagation();
ssdw.value.unshift({ id: null });
ssdw.value.push({ id: null });
nextTick(() => {
callChildMethodss(ssdw.value.length - 1);
});
......@@ -340,7 +340,7 @@
// 新增
function addjl(event) {
event.stopPropagation();
jldw.value.unshift({ id: null });
jldw.value.push({ id: null });
nextTick(() => {
callChildMethodjl(jldw.value.length - 1);
});
......
......@@ -11,7 +11,7 @@
<a-space>
<!-- <a-button type="primary" @click="views">查看地块全流程</a-button> -->
<a-button type="primary" v-if="userInfo.userIdentity <= 3" @click="backHistory('xdyj')">下达意见</a-button>
<a-button type="primary" v-if="userInfo.userIdentity != 'S'" @click="backHistory('bjzdyj')">边界指导意见</a-button>
<a-button type="primary" v-if="userInfo.userType != 'S'" @click="backHistory('bjzdyj')">边界指导意见</a-button>
<a-button type="primary" @click="backHistory('tg')">退改历史</a-button>
</a-space>
</div>
......@@ -123,12 +123,11 @@
const prefixes = ['3-', '4-'];
const arrays = [data.value.bzdw, data.value.jcdw];
for (let i = 0; i < arrays.length; i++) {
arrays[i].forEach((el,index) => {
arrays[i].forEach((el, index) => {
activeKey.value.push(prefixes[i] + index);
});
}
console.log(activeKey);
}
// 点击退改历史退回意见
function backHistory(v) {
......
......@@ -32,7 +32,7 @@
<a-button type="primary" @click.prevent="handleExportXls('初步调查污染信息', '下载的地址')">下载</a-button> 查看]</span
></div
>
<CbInfor />
<CbInfor :wrdkid="dsInfor.wrdkjbxxb.wrdkid" />
</a-collapse-panel>
<a-collapse-panel
......@@ -166,7 +166,7 @@
import EditTrwr from '/@/components/customComponent/EditTrwr.vue';
import CdUpload from '/@/components/customComponent/CdUpload.vue';
import fillProgress from '/@/components/customComponent/fillProgress.vue';
import CbInfor from '../components/CbInfor.vue';
import CbInfor from '/@/components/customComponent/CbInfor.vue';
import { useMethods } from '/@/hooks/system/useMethods';
import PointInfor from '../components/PointInfor.vue';
import { useMessage } from '/@/hooks/web/useMessage';
......@@ -205,6 +205,7 @@
const zdmj = ref(''); //占地面积
const trmj = ref(''); //获取土壤面积
// 获取地块信息
const dsInfor = ref<any>({
jcdw: [],
......
......@@ -8,7 +8,7 @@
<div>
<a-space>
<a-button type="primary" v-if="userInfo.userIdentity <= 3" @click="backHistory('xdyj')">下达意见</a-button>
<a-button type="primary" v-if="userInfo.userIdentity != 'S'" @click="backHistory('bjzdyj')">边界指导意见</a-button>
<a-button type="primary" v-if="userInfo.userType != 'S'" @click="backHistory('bjzdyj')">边界指导意见</a-button>
<a-button type="primary" @click="backHistory('tg')">退改历史</a-button>
</a-space>
</div>
......
......@@ -167,7 +167,7 @@
};
function addUnitMessageFormList(event) {
event.stopPropagation();
unitMessageFormList.value.unshift({ id: null });
unitMessageFormList.value.push({ id: null });
nextTick(() => {
callChildMethod(unitMessageFormList.value.length - 1);
});
......@@ -219,7 +219,7 @@
// 新增
function addSs(event) {
event.stopPropagation();
ssdw.value.unshift({ id: null });
ssdw.value.push({ id: null });
nextTick(() => {
callChildMethodss(ssdw.value.length - 1);
});
......@@ -268,7 +268,7 @@
// 新增
function addjl(event) {
event.stopPropagation();
jldw.value.unshift({ id: null });
jldw.value.push({ id: null });
nextTick(() => {
callChildMethodjl(jldw.value.length - 1);
});
......
......@@ -12,7 +12,7 @@
<!-- <a-button type="primary" @click="views">查看地块全流程</a-button> -->
<a-button type="primary" v-if="userInfo.userIdentity <= 3" @click="backHistory('xdyj')">下达意见</a-button>
<a-button type="primary" v-if="userInfo.userIdentity != 'S'" @click="backHistory('bjzdyj')">边界指导意见</a-button>
<a-button type="primary" v-if="userInfo.userType != 'S'" @click="backHistory('bjzdyj')">边界指导意见</a-button>
<a-button type="primary" @click="backHistory('tg')">退改历史</a-button>
</a-space>
</div>
......
......@@ -177,7 +177,7 @@
};
function addUnitMessageFormList(event) {
event.stopPropagation();
unitMessageFormList.value.unshift({ id: null });
unitMessageFormList.value.push({ id: null });
nextTick(() => {
callChildMethod(unitMessageFormList.value.length - 1);
});
......@@ -227,7 +227,7 @@
};
function addjcpgunitList(event) {
event.stopPropagation();
jcpgunitList.value.unshift({ id: null });
jcpgunitList.value.push({ id: null });
nextTick(() => {
callChildFxMethod(jcpgunitList.value.length - 1);
});
......@@ -278,7 +278,7 @@
// 新增
function addSs(event) {
event.stopPropagation();
ssdw.value.unshift({ id: null });
ssdw.value.push({ id: null });
nextTick(() => {
callChildMethodss(ssdw.value.length - 1);
});
......@@ -327,7 +327,7 @@
// 新增
function addjl(event) {
event.stopPropagation();
jldw.value.unshift({ id: null });
jldw.value.push({ id: null });
nextTick(() => {
callChildMethodjl(jldw.value.length - 1);
});
......
......@@ -12,7 +12,7 @@
<!-- <a-button type="primary" @click="views">查看地块全流程</a-button> -->
<a-button type="primary" v-if="userInfo.userIdentity <= 3" @click="backHistory('xdyj')">下达意见</a-button>
<a-button type="primary" v-if="userInfo.userIdentity != 'S'" @click="backHistory('bjzdyj')">边界指导意见</a-button>
<a-button type="primary" v-if="userInfo.userType != 'S'" @click="backHistory('bjzdyj')">边界指导意见</a-button>
<a-button type="primary" @click="backHistory('tg')">退改历史</a-button>
</a-space>
</div>
......@@ -125,7 +125,7 @@
const prefixes = ['6-', '7-'];
const arrays = [data.value.bzdw, data.value.jcdw];
for (let i = 0; i < arrays.length; i++) {
arrays[i].forEach((el,index) => {
arrays[i].forEach((el, index) => {
activeKey.value.push(prefixes[i] + index);
});
}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论