|
@@ -62,7 +62,7 @@
|
|
|
:title="
|
|
|
{
|
|
|
extract: `按瓦斯抽采泵站装机能力核定:${floor(data.gasExtractionPumpStationCapacitySmall, 2)}`,
|
|
|
- product: `按矿井瓦斯抽采泵站装机能力核定:${floor(data.gasExtractionMainPipelineCapacityLarge, 2)}`,
|
|
|
+ product: `按矿井瓦斯抽采泵站装机能力核定:${floor(data.gasExtractionPumpStationCapacityLarge, 2)}`,
|
|
|
}[actived]
|
|
|
"
|
|
|
/>
|
|
@@ -159,12 +159,13 @@
|
|
|
const data1 = ctxBasicForm.getFieldsValue();
|
|
|
const data2 = ctxGasvalForm.getFieldsValue();
|
|
|
const data3 = ctxGasrateForm.getFieldsValue();
|
|
|
- const airVolumeStr = get(data1, 'returnAirVolume', []).join(',');
|
|
|
updateGasMain({
|
|
|
...data3,
|
|
|
...data2,
|
|
|
...data1,
|
|
|
- returnAirVolume: airVolumeStr,
|
|
|
+ returnAirVolume: get(data.value, 'returnAirVolume', [])
|
|
|
+ .filter((e) => Boolean(e))
|
|
|
+ .join(','),
|
|
|
})
|
|
|
.then(() => {
|
|
|
message.success('提交成功');
|
|
@@ -183,14 +184,13 @@
|
|
|
}
|
|
|
/** 计算部分可以自动计算的参数 */
|
|
|
function calculateBasicForm() {
|
|
|
- const { returnAirVolume } = data.value;
|
|
|
const { mineGasExtractionRate } = ctxBasicForm.getFieldsValue();
|
|
|
- if (returnAirVolume && Array.isArray(returnAirVolume)) {
|
|
|
- const airVolumeArr = returnAirVolume.map((e) => parseFloat(e));
|
|
|
- ctxBasicForm.setFieldsValue({
|
|
|
- mineMaxTotalReturnAirVolume: airVolumeArr.reduce((t, n) => t + n, 0),
|
|
|
- });
|
|
|
- }
|
|
|
+ const airVolumeArr = get(data.value, 'returnAirVolume', [])
|
|
|
+ .filter((e) => Boolean(e))
|
|
|
+ .map((e) => parseFloat(e));
|
|
|
+ ctxBasicForm.setFieldsValue({
|
|
|
+ mineMaxTotalReturnAirVolume: airVolumeArr.reduce((t, n) => t + n, 0),
|
|
|
+ });
|
|
|
// 根据抽采率生成总回瓦斯浓度
|
|
|
if (mineGasExtractionRate) {
|
|
|
const n = parseInt(mineGasExtractionRate);
|
|
@@ -264,8 +264,7 @@
|
|
|
|
|
|
/** 矿井基本信息的表单配置,需要动态添加回风井。根据表单数据设置矿井基本信息的表单配置 */
|
|
|
function resetPublicFormSchema() {
|
|
|
- const airVolumeArr = data.value.returnAirVolume;
|
|
|
- const extra: FormSchema[] = airVolumeArr.map((num, inx) => {
|
|
|
+ const extra: FormSchema[] = data.value.returnAirVolume.map((num, inx) => {
|
|
|
return {
|
|
|
label: `回风井${inx + 1}`,
|
|
|
field: `__${inx + 1}`,
|
|
@@ -273,7 +272,7 @@
|
|
|
component: 'Input',
|
|
|
componentProps: {
|
|
|
onChange: ({ target }) => {
|
|
|
- airVolumeArr[inx] = target.value;
|
|
|
+ data.value.returnAirVolume[inx] = target.value;
|
|
|
},
|
|
|
},
|
|
|
};
|
|
@@ -283,7 +282,7 @@
|
|
|
/** 添加一项公用参数表单项 */
|
|
|
function addPubFormSchema() {
|
|
|
if (!data.value.returnAirVolume) return;
|
|
|
- data.value.returnAirVolume.push('0');
|
|
|
+ data.value.returnAirVolume.push('');
|
|
|
resetPublicFormSchema();
|
|
|
}
|
|
|
|
|
@@ -380,9 +379,15 @@
|
|
|
Promise.all([getGasMainAllInfo({}), getGasMainpipesystemAllInfo({}), getGasPumpstationAllInfo({})]).then((res) => {
|
|
|
const [r1, r2, r3] = res.map((e) => e.obj);
|
|
|
r1[0].returnAirVolume = r1[0].returnAirVolume.split(',');
|
|
|
- ctxBasicForm.setFieldsValue(r1[0]);
|
|
|
- ctxGasvalForm.setFieldsValue(r1[0]);
|
|
|
- ctxGasrateForm.setFieldsValue(r1[0]);
|
|
|
+ ctxBasicForm.resetFields().then(() => {
|
|
|
+ ctxBasicForm.setFieldsValue(r1[0]);
|
|
|
+ });
|
|
|
+ ctxGasvalForm.resetFields().then(() => {
|
|
|
+ ctxGasvalForm.setFieldsValue(r1[0]);
|
|
|
+ });
|
|
|
+ ctxGasrateForm.resetFields().then(() => {
|
|
|
+ ctxGasrateForm.setFieldsValue(r1[0]);
|
|
|
+ });
|
|
|
pipeTableData.value = r2;
|
|
|
pumpTableData.value = r3;
|
|
|
data.value = r1[0];
|
|
@@ -418,8 +423,8 @@
|
|
|
});
|
|
|
const extractChartData = computed(() => {
|
|
|
const keyMap = {
|
|
|
- extract: ['gasExtractionPumpStationCapacitySmall', 'gasExtractionMainPipelineCapacitySmall'],
|
|
|
- product: ['gasExtractionMainPipelineCapacityLarge', 'gasExtractionMainPipelineCapacityLarge'],
|
|
|
+ extract: ['gasExtractionPumpStationCapacitySmall', 'gasExtractionPumpStationCapacityLarge'],
|
|
|
+ product: ['gasExtractionMainPipelineCapacitySmall', 'gasExtractionMainPipelineCapacityLarge'],
|
|
|
};
|
|
|
return [
|
|
|
{
|