Преглед на файлове

[Wip 0000] 抽采泵达标参数设置对接

houzekong преди 11 месеца
родител
ревизия
1db3150bea

+ 23 - 19
src/views/vent/gas/gasPumpSetting/components/settingForm.vue

@@ -2,53 +2,54 @@
   <div class="setting-form">
     <div class="setting-form__wrapper">
       <FormTitle icon="gas-pump" title="工作面参数" />
-      <BasicForm :schemas="workSurfaceFormSchema" @register="regWSForm" @submit="submitHandler">
-        <template #input="{ model, field, schema }">
-          <ListItem class="w-100%" v-model:value="model[field]" type="input" :label="schema.label" bordered :label-width="200" />
+      <BasicForm :model="model" :schemas="workSurfaceFormSchema" @register="regWSForm" @submit="submitHandler">
+        <template #input="{ model: m, field, schema }">
+          <ListItem class="w-100%" v-model:value="m[field]" type="input" :label="schema.label" bordered :label-width="200" />
         </template>
       </BasicForm>
     </div>
     <div class="setting-form__wrapper">
       <FormTitle icon="pump" title="抽采单元参数" />
-      <BasicForm :schemas="extractionUnitFormSchema" @register="regEUForm" @submit="submitHandler">
-        <template #input="{ model, field, schema }">
-          <ListItem class="w-100%" v-model:value="model[field]" type="input" :label="schema.label" bordered :label-width="200" />
+      <BasicForm :model="model" :schemas="extractionUnitFormSchema" @register="regEUForm" @submit="submitHandler">
+        <template #input="{ model: m, field, schema }">
+          <ListItem class="w-100%" v-model:value="m[field]" type="input" :label="schema.label" bordered :label-width="200" />
         </template>
       </BasicForm>
     </div>
     <div class="setting-form__wrapper">
       <FormTitle icon="water-pump" title="计算参数" />
-      <BasicForm :schemas="calculationFormSchema" @register="regCCForm" @submit="submitHandler">
-        <template #radio="{ model, field, schema }">
+      <BasicForm :model="model" :schemas="calculationFormSchema" @register="regCCForm" @submit="submitHandler">
+        <!-- <template #radio="{ model: m, field, schema }">
           <ListItem class="w-100%">
             <template #label>
-              <Switch v-model:checked="model[field]" size="small" />
+              <Switch v-model:checked="m[field]" size="small" />
               <span class="ml-10px">{{ schema.label }}</span>
             </template>
           </ListItem>
-        </template>
-        <template #input="{ model, field, schema }">
-          <ListItem class="w-100%" v-model:value="model[field]" type="input" :label="schema.label" bordered :label-width="200" />
+        </template> -->
+        <template #input="{ model: m, field, schema }">
+          <ListItem class="w-100%" v-model:value="m[field]" type="input" :label="schema.label" bordered :label-width="200" />
         </template>
       </BasicForm>
     </div>
     <div class="text-right">
       <Button class="mr-10px setting-form__button" type="primary" ghost @click="cancel">取消</Button>
-      <Button class="mr-10px setting-form__button" type="primary" ghost @click="save">保存</Button>
+      <Button class="mr-10px setting-form__button" type="primary" ghost @click="calculate">计算</Button>
       <Button class="mr-10px setting-form__button" type="primary" ghost @click="submit">提交</Button>
     </div>
   </div>
 </template>
 
 <script lang="ts" setup>
-  import { Switch, Button } from 'ant-design-vue';
+  import { Button } from 'ant-design-vue';
   import ListItem from '@/views/vent/gas/components/list/listItem.vue';
   import FormTitle from '@/views/vent/gas/components/form/formTitle.vue';
   import { useForm, BasicForm } from '/@/components/Form';
   import { workSurfaceFormSchema, extractionUnitFormSchema, calculationFormSchema } from '../gasPumpSetting.data';
   import { ref } from 'vue';
 
-  const emit = defineEmits(['submit', 'save', 'cancel']);
+  const props = defineProps<{ model: Record<string, any> }>();
+  const emit = defineEmits(['submit', 'calculate', 'cancel']);
 
   const defaultFormProp = {
     //注册表单列
@@ -59,7 +60,8 @@
       flex: '20%',
     },
   };
-  const formData = ref<Record<string, string | boolean>>({});
+
+  const formData = ref<Record<string, any>>({});
   const [regWSForm, { submit: submitWSForm }] = useForm(defaultFormProp);
   const [regEUForm, { submit: submitEUForm }] = useForm(defaultFormProp);
   const [regCCForm, { submit: submitCCForm }] = useForm(defaultFormProp);
@@ -73,13 +75,15 @@
   function cancel() {
     emit('cancel');
   }
-  function save() {
-    emit('save');
+  function calculate() {
+    Promise.all([submitWSForm(), submitEUForm()]).then(() => {
+      emit('calculate', { ...props.model, ...formData.value });
+    });
   }
 
   function submit() {
     Promise.all([submitWSForm(), submitEUForm(), submitCCForm()]).then(() => {
-      emit('submit', formData.value);
+      emit('submit', { ...props.model, ...formData.value });
     });
   }
 </script>

+ 59 - 0
src/views/vent/gas/gasPumpSetting/gasPumpSetting.api.ts

@@ -0,0 +1,59 @@
+import { defHttp } from '/@/utils/http/axios';
+
+enum Api {
+  addGasDrainageParam = 'safety/gasDrainage/addGasDrainageParam',
+  createParam = 'safety/gasDrainage/createParam',
+  deleteGasDrainageParam = 'safety/gasDrainage/deleteGasDrainageParam',
+  getGasDrainageParamList = 'safety/gasDrainage/getGasDrainageParamList',
+  updateGasDrainageParam = 'safety/gasDrainage/updateGasDrainageParam',
+}
+/**
+ * 新增接口
+ * @param data
+ */
+export const addGasDrainageParam = (data) => {
+  return defHttp.post({
+    url: Api.addGasDrainageParam,
+    params: data,
+  });
+};
+/**
+ * 计算接口
+ * @param data
+ */
+export const createParam = (data) => {
+  return defHttp.post({
+    url: Api.createParam,
+    params: data,
+  });
+};
+/**
+ * 删除接口
+ * @param data
+ */
+export const deleteGasDrainageParam = (data) => {
+  return defHttp.get({
+    url: Api.deleteGasDrainageParam,
+    params: data,
+  });
+};
+/**
+ * 查询接口
+ * @param data
+ */
+export const getGasDrainageParamList = (data) => {
+  return defHttp.post({
+    url: Api.getGasDrainageParamList,
+    params: data,
+  });
+};
+/**
+ * 修改接口
+ * @param data
+ */
+export const updateGasDrainageParam = (data) => {
+  return defHttp.post({
+    url: Api.updateGasDrainageParam,
+    params: data,
+  });
+};

+ 65 - 53
src/views/vent/gas/gasPumpSetting/gasPumpSetting.data.ts

@@ -4,103 +4,97 @@ import { FormSchema } from '@/components/Form';
 export const workSurfaceFormSchema: FormSchema[] = [
   {
     label: '钻孔长度',
-    field: 'zkcd',
+    field: 'drillLength',
     component: 'Input',
     slot: 'input',
   },
   {
     label: '钻孔方位角',
-    field: 'zkfwj',
+    field: 'drillAzimuth',
     component: 'Input',
     slot: 'input',
   },
   {
     label: '钻孔倾角',
-    field: 'zkqj',
+    field: 'drillDipAngle',
     component: 'Input',
     slot: 'input',
   },
   {
     label: '钻孔间距',
-    field: 'zkjj',
+    field: 'drillSpace',
     component: 'Input',
     slot: 'input',
   },
   {
     label: '抽采半径',
-    field: 'ccbj',
+    field: 'drainageRadius',
     component: 'Input',
     slot: 'input',
   },
   {
     label: '管路直径',
-    field: 'glzj',
+    field: 'pipelineDiameter',
     component: 'Input',
     slot: 'input',
   },
   {
     label: '残余可解吸瓦斯量',
-    field: 'cykjxwsl',
+    field: 'residualGasDesorptionCapacity',
     component: 'Input',
     slot: 'input',
   },
   {
     label: '工作面回采率',
-    field: 'gzmhcl',
+    field: 'workingFaceRecoveryRate',
     component: 'Input',
     slot: 'input',
   },
   {
     label: '工作面长度',
-    field: 'gzmcd',
+    field: 'workingFaceLengeh',
     component: 'Input',
     slot: 'input',
   },
   {
     label: '巷道宽度',
-    field: 'hdkd',
+    field: 'tunnelWidth',
     component: 'Input',
     slot: 'input',
   },
   {
     label: '工作面采高',
-    field: 'gzmcg',
+    field: 'workingFaceHeight',
     component: 'Input',
     slot: 'input',
   },
   {
     label: '最低允许风速',
-    field: 'zdyxfs',
+    field: 'minimumAllowableWindSpeed',
     component: 'Input',
     slot: 'input',
   },
   {
     label: '最大允许风速',
-    field: 'zdyxfs',
+    field: 'maximumAllowableWindSpeed',
     component: 'Input',
     slot: 'input',
   },
   {
     label: '回风流风速',
-    field: 'hflfs',
-    component: 'Input',
-    slot: 'input',
-  },
-  {
-    label: '单元钻孔抽采时间差异系数',
-    field: 'dyzkccsjcyxs',
+    field: 'returnAirFlowSpeed',
     component: 'Input',
     slot: 'input',
   },
   {
     label: '工作面日产量',
-    field: 'gzmrcl',
+    field: 'workingFaceDailyOutput',
     component: 'Input',
     slot: 'input',
   },
   {
     label: '取样深度',
-    field: 'qysd',
+    field: 'samplingDepth',
     component: 'Input',
     slot: 'input',
   },
@@ -109,62 +103,80 @@ export const workSurfaceFormSchema: FormSchema[] = [
 /** 计算参数表单配置项 */
 export const calculationFormSchema: FormSchema[] = [
   {
-    label: '公式计算',
-    field: 'gsjs',
-    component: 'RadioGroup',
-    slot: 'radio',
-  },
-  {
     label: '预抽瓦斯达标量',
-    field: 'ycwsdbl',
+    field: 'preDrainageGasReachingStandardQuantity',
     component: 'Input',
     slot: 'input',
   },
   {
     label: '割煤相对瓦斯涌出量',
-    field: 'gmxdwsycl',
+    field: 'relativeGasEmissionDuringCoalCutting',
     component: 'Input',
     slot: 'input',
   },
   {
     label: '放煤相对瓦斯涌出量',
-    field: 'fmxdwsycl',
+    field: 'relativeGasEmissionFromCoalDischarge',
     component: 'Input',
     slot: 'input',
   },
   {
     label: '采空区相对瓦斯涌出量',
-    field: 'ckqxdwsycl',
+    field: 'relativeGasEmissionFromGoaf',
     component: 'Input',
     slot: 'input',
   },
   {
     label: '邻近层相对瓦斯涌出量',
-    field: 'ljcxdwsycl',
+    field: 'relativeGasEmissionFromAdjacentLayers',
     component: 'Input',
     slot: 'input',
   },
   {
-    label: '邻近层瓦斯排放',
-    field: 'ljcwspfl',
+    label: '邻近层瓦斯排放',
+    field: 'gasEmissionRateOfAdjacentLayers',
     component: 'Input',
     slot: 'input',
   },
   {
     label: '残余瓦斯压力',
-    field: 'cywsyl',
+    field: 'residualGasPressure',
     component: 'Input',
     slot: 'input',
   },
   {
     label: '残余瓦斯含量',
-    field: 'cywshl',
+    field: 'residualGasContent',
     component: 'Input',
     slot: 'input',
   },
   {
     label: '单元钻孔抽采时间差异系数',
-    field: 'dyzkccsjcyxs',
+    field: 'differenceExtractionTime',
+    component: 'Input',
+    slot: 'input',
+  },
+  {
+    label: '围岩瓦斯涌出影响系数',
+    field: 'K1',
+    component: 'Input',
+    slot: 'input',
+  },
+  {
+    label: '采区内准备巷道预排瓦斯对开采层瓦斯涌出影响系数',
+    field: 'K2',
+    component: 'Input',
+    slot: 'input',
+  },
+  {
+    label: '放落煤体破碎度对放顶煤瓦斯涌出影响系数',
+    field: 'K3',
+    component: 'Input',
+    slot: 'input',
+  },
+  {
+    label: '留煤瓦斯涌出不均衡系数',
+    field: 'K4',
     component: 'Input',
     slot: 'input',
   },
@@ -174,85 +186,85 @@ export const calculationFormSchema: FormSchema[] = [
 export const extractionUnitFormSchema: FormSchema[] = [
   {
     label: '评价单元煤炭储量',
-    field: 'pjdymtcl',
+    field: 'evaluationUnitCoalReserves',
     component: 'Input',
     slot: 'input',
   },
   {
     label: '工作面瓦斯储量',
-    field: 'gzmwscl',
+    field: 'workingFaceGasReserves',
     component: 'Input',
     slot: 'input',
   },
   {
     label: '实时支管抽采负压',
-    field: 'sszgccfy',
+    field: 'currentBranchSuctionNegativePressure',
     component: 'Input',
     slot: 'input',
   },
   {
     label: '钻孔施工长度',
-    field: 'zksgcd',
+    field: 'drillWorkLength',
     component: 'Input',
     slot: 'input',
   },
   {
     label: '钻孔设计长度',
-    field: 'zksjcd',
+    field: 'drillDesignLength',
     component: 'Input',
     slot: 'input',
   },
   {
     label: '单元原始瓦斯含量',
-    field: 'dyyswshl',
+    field: 'originalGasContent',
     component: 'Input',
     slot: 'input',
   },
   {
     label: '单元原始瓦斯压力',
-    field: 'dyyswsyl',
+    field: 'originalGasPressure',
     component: 'Input',
     slot: 'input',
   },
   {
     label: '煤层厚度',
-    field: 'mchd',
+    field: 'coalSeamThickness',
     component: 'Input',
     slot: 'input',
   },
   {
     label: '工作面切眼长度',
-    field: 'gzmqycd',
+    field: 'workingFaceQieyanLength',
     component: 'Input',
     slot: 'input',
   },
   {
     label: '工作面走向长度',
-    field: 'gzmzxcd',
+    field: 'workingFaceZouxiangLength',
     component: 'Input',
     slot: 'input',
   },
   {
-    label: '个邻近层煤层厚度',
-    field: 'gljcmchd',
+    label: '第i个邻近层煤层厚度',
+    field: 'mi',
     component: 'Input',
     slot: 'input',
   },
   {
     label: '工作面预测相对涌出量',
-    field: 'gzmycxdycl',
+    field: 'relativeSurgeVolume',
     component: 'Input',
     slot: 'input',
   },
   {
     label: '工作面预测绝对涌出量',
-    field: 'gzmycjdycl',
+    field: 'absoluteSurgeVolume',
     component: 'Input',
     slot: 'input',
   },
   {
     label: '工作面有效配风量',
-    field: 'gzmyxpfl',
+    field: 'effectiveAirDistribution',
     component: 'Input',
     slot: 'input',
   },

+ 31 - 1
src/views/vent/gas/gasPumpSetting/index.vue

@@ -1,12 +1,42 @@
 <!-- eslint-disable vue/multi-word-component-names -->
 <template>
   <CustomHeader> 瓦斯抽采达标评判参数设置 </CustomHeader>
-  <SettingForm class="mt-75px" />
+  <SettingForm :model="formModel" class="mt-75px" @submit="submit" @calculate="calculate" />
 </template>
 
 <script lang="ts" setup>
   import CustomHeader from '/@/components/vent/customHeader.vue';
   import SettingForm from './components/settingForm.vue';
+  import { getGasDrainageParamList, updateGasDrainageParam, createParam } from './gasPumpSetting.api';
+  import { ref } from 'vue';
+  import { message } from 'ant-design-vue';
+  import { onMounted } from 'vue';
+
+  const formModel = ref<any>({});
+
+  function refresh() {
+    getGasDrainageParamList({}).then(({ records }) => {
+      formModel.value = records[0];
+    });
+  }
+
+  function submit(formData) {
+    updateGasDrainageParam(formData).then(() => {
+      message.success('修改成功');
+      refresh();
+    });
+  }
+
+  function calculate(formData) {
+    createParam(formData).then(() => {
+      message.success('计算成功');
+      refresh();
+    });
+  }
+
+  onMounted(() => {
+    refresh();
+  });
 </script>
 
 <style lang="less" scoped></style>