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

风险评估计算模型修改

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