提交 caa59aa7 authored 作者: jinrb's avatar jinrb

风险评估计算模型修改

上级 fb4194e0
...@@ -327,7 +327,7 @@ export const searchFormSchema: FormSchema[] = [ ...@@ -327,7 +327,7 @@ export const searchFormSchema: FormSchema[] = [
}, },
{ {
label: '地块名称', label: '地块编码',
field: 'wrdkbm', field: 'wrdkbm',
component: 'Input', component: 'Input',
......
...@@ -2,16 +2,20 @@ import { defHttp } from '/@/utils/http/axios'; ...@@ -2,16 +2,20 @@ import { defHttp } from '/@/utils/http/axios';
enum Api { enum Api {
list = '/mxjs/cslist', // 参数列表 list = '/mxjs/cslist', // 参数列表
wrdk = '/mxjs/wrdk', // 参数列表
mxJs = '/mxjs/js', //模型计算 mxJs = '/mxjs/js', //模型计算
mxJsTj = '/mxjs/tj', //模型计算-提交 mxJsTj = '/mxjs/tj', //模型计算-提交
wrList = '/mxjs/wrwlist', //污染物列表 wrList = '/mxjs/wrwlist', //污染物列表
getJsWrwlist = '/mxjs/getJsWrwList', //计算结果-污染物列表 getJsWrwlist = '/mxjs/getJsWrwList', //计算结果-污染物列表
JsCsjg = '/mxjs/csjgList',//计算结果-参数信息 JsCsjg = '/mxjs/csjgList',//计算结果-参数信息
Jsjg = '/mxjs/list',//计算结果-计算信息 Jsjg = '/mxjs/list',//计算结果-计算信息
searDkbm = '/qdml/likeWrdkbm2',
} }
export const list = (params) => defHttp.get({ url: Api.list, params }); export const list = (params) => defHttp.get({ url: Api.list, params });
export const searDkbm = (params) => defHttp.get({ url: Api.searDkbm, params });
export const mxJs = (params) => defHttp.post({ url: Api.mxJs, params }); export const mxJs = (params) => defHttp.post({ url: Api.mxJs, params });
export const mxJsTj = (params) => defHttp.post({ url: Api.mxJsTj, params }); export const mxJsTj = (params) => defHttp.post({ url: Api.mxJsTj, params });
......
...@@ -11,6 +11,21 @@ ...@@ -11,6 +11,21 @@
@change="changeWrlx" @change="changeWrlx"
></a-select> ></a-select>
</template> </template>
<template #wrdk="{ model, field }">
<a-select
v-model:value="model[field]"
placeholder="请选择"
show-search
:options="optionsWrdk"
:default-active-first-option="false"
:show-arrow="false"
:filter-option="false"
:not-found-content="null"
:field-names="{ label: 'wrdkmc', value: 'wrdkid' }"
@search="handleSearch"
@change="changeWrdk"
></a-select>
</template>
<template #wrmmx="{}"> <template #wrmmx="{}">
<div class="flex"> <div class="flex">
<a-input v-model:value="mxwrwmc" readonly placeholder="请选择" /> <a-input v-model:value="mxwrwmc" readonly placeholder="请选择" />
...@@ -55,6 +70,8 @@ ...@@ -55,6 +70,8 @@
import countModal from './modal/countModal.vue'; import countModal from './modal/countModal.vue';
import Jsresults from '@/components/customComponent/Jsresults.vue'; import Jsresults from '@/components/customComponent/Jsresults.vue';
import { BasicColumn } from '/@/components/Table'; import { BasicColumn } from '/@/components/Table';
import { searDkbm } from './api'
const { createMessage } = useMessage(); const { createMessage } = useMessage();
import { useRouter } from 'vue-router'; import { useRouter } from 'vue-router';
const router = useRouter(); const router = useRouter();
...@@ -116,6 +133,23 @@ ...@@ -116,6 +133,23 @@
ydlx.value = null; ydlx.value = null;
} }
}; };
const changeWrdk = (val) => {
if (val) {
params.value.wrdkid = val
} else {
params.value.wrdkid = null
}
};
const optionsWrdk = ref([])
const handleSearch = (val) => {
if (!val || val.length <3) {
return
}
searDkbm({wrdkbm: val}).then(res =>{
optionsWrdk.value = res
})
}
async function onFetchSuccess(result) { async function onFetchSuccess(result) {
localData.value = JSON.parse(JSON.stringify(result.items)); localData.value = JSON.parse(JSON.stringify(result.items));
} }
...@@ -145,6 +179,7 @@ ...@@ -145,6 +179,7 @@
api: list, api: list,
beforeFetch: async (params) => { beforeFetch: async (params) => {
params.ydlx = ydlx.value; params.ydlx = ydlx.value;
params.wrdkid = '';
params.pageNo = 1; params.pageNo = 1;
params.pageSize = 100; params.pageSize = 100;
}, },
...@@ -166,6 +201,7 @@ ...@@ -166,6 +201,7 @@
const params = ref<any>({ const params = ref<any>({
mxwrwId: '', mxwrwId: '',
ydlx: '', ydlx: '',
wrdkid: '',
}); });
const options = ref([ const options = ref([
{ {
...@@ -220,6 +256,7 @@ ...@@ -220,6 +256,7 @@
if (!allItemsValid) { if (!allItemsValid) {
return; return;
} }
openjsModal(true, { openjsModal(true, {
record: params.value, record: params.value,
isUpdate: true, isUpdate: true,
......
...@@ -53,7 +53,7 @@ ...@@ -53,7 +53,7 @@
const loading = ref(false); const loading = ref(false);
const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data) => { const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data) => {
params.value = data.record; params.value = data.record;
params.value.wrdkid = param.value.wrdkid; // params.value.wrdkid = param.value.wrdkid;
params.value.csList.map((item) => { params.value.csList.map((item) => {
if (data.record.ydlx === '1') { if (data.record.ydlx === '1') {
item.tjz = item.tjz1; item.tjz = item.tjz1;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论