Newer
Older
KaiFengPC / src / views / floodSys / scada / pumpStationInformation / index.vue
@鲁yixuan 鲁yixuan on 8 Aug 23 KB updata
  1. <template>
  2. <!-- 泵站信息管理 -->
  3. <div class="water-analysis-page">
  4. <div class="top">
  5. <el-form ref="queryRef" inline :model="queryParams" v-show="showSearch">
  6. <el-form-item label="站点:" prop="pumpCode">
  7. <el-select clearable v-model="queryParams.pumpCode" placeholder="请选择">
  8. <el-option v-for="item in typeList" :key="item.stationCode" :label="item.stationName" :value="item.stationCode" />
  9. </el-select>
  10. </el-form-item>
  11. <el-form-item label="泵站类型:" prop="pumpType">
  12. <el-select clearable v-model="queryParams.pumpType" placeholder="请选择">
  13. <el-option v-for="dict in pump_type" :key="dict.value" :label="dict.label" :value="dict.value" />
  14. </el-select>
  15. </el-form-item>
  16. <el-form-item>
  17. <el-button type="primary" icon="Search" @click="searchForm"> 查询</el-button>
  18. <el-button icon="Refresh" @click="resectClcik"> 重置</el-button>
  19. </el-form-item>
  20. </el-form>
  21. <el-row :gutter="10" class="mb8">
  22. <el-button type="primary" plain icon="Plus" @click="addData">新增</el-button>
  23. <right-toolbar v-model:showSearch="showSearch" @queryTable="searchForm"></right-toolbar>
  24. </el-row>
  25. </div>
  26. <!-- 表格 -->
  27. <el-table :data="tableData" v-loading="tableLoading" :max-height="650">
  28. <el-table-column type="index" width="70" label="序号" />
  29. <el-table-column label="泵站编号" prop="pumpCode" />
  30. <el-table-column label="泵站名称" prop="pumpName" />
  31. <el-table-column label="泵站类型" prop="pumpType">
  32. <template #default="{ row }">
  33. <dict-tag :options="pump_type" :value="row.pumpType"></dict-tag>
  34. </template>
  35. </el-table-column>
  36. <!-- <el-table-column label="设计规模" prop="designScale">
  37. <template #default="{ row }">
  38. {{ getUnitName(row) }}
  39. </template>
  40. </el-table-column> -->
  41.  
  42. <el-table-column label="泵站地址" prop="address" />
  43. <el-table-column label="格栅机" prop="grilleMachine" />
  44. <el-table-column label="开启数量" prop="openNumber" />
  45. <el-table-column label="总流量m³/s" prop="totalFlow" />
  46. <el-table-column label="建设单位" prop="unitDep" />
  47. <el-table-column label="联系人" prop="dutyUserName" />
  48. <el-table-column label="联系人电话" prop="dutyUserPhone" />
  49. <el-table-column label="操作" show-overflow-tooltip width="250">
  50. <template #default="{ row }">
  51. <el-button link icon="View" type="primary" @click="checkDetail(row)">详情</el-button>
  52. <el-button link icon="Edit" type="warning" @click="editData(row)">修改</el-button>
  53. <el-button link icon="Delete" type="danger" @click="deleteData(row)">删除</el-button>
  54. </template>
  55. </el-table-column>
  56. </el-table>
  57. <!-- 分页 -->
  58. <pagination
  59. v-show="total > 0"
  60. :total="total"
  61. v-model:page="queryParams.pageNum"
  62. v-model:limit="queryParams.pageSize"
  63. @pagination="getDataList"
  64. />
  65. <div class="water-analysis-page">
  66. <!-- 添加 修改 查看彈框 -->
  67. <el-dialog :title="dialogTitle" v-model="showDialog" width="70%" :close-on-click-modal="false">
  68. <el-form ref="ruleForm" :model="formData" :rules="formRules" :disabled="isDisab" label-width="180px">
  69. <el-row>
  70. <el-form-item label="泵站名称:" prop="pumpName" style="width: 45%">
  71. <el-input v-model="formData.pumpName" placeholder="请输入" clearable />
  72. </el-form-item>
  73. <el-form-item label="泵站编码:" prop="pumpCode" style="width: 45%">
  74. <el-input v-model="formData.pumpCode" placeholder="请输入" clearable :disabled="hiddentext" />
  75. </el-form-item>
  76. <el-form-item label="泵站类型:" prop="pumpType" style="width: 45%">
  77. <el-select
  78. clearable
  79. v-model="formData.pumpType"
  80. class="m-2"
  81. placeholder="请选择"
  82. style="width: 100%"
  83. @change="pumpTypechange"
  84. >
  85. <el-option v-for="item in pump_type" :key="item.value" :label="item.label" :value="item.value" />
  86. </el-select>
  87. </el-form-item>
  88. <el-divider content-position="left" v-if="formData.pumpType == 'confluence'">雨水泵站信息</el-divider>
  89. <!-- 下拉框雨污水合建泵站-->
  90. <el-form-item label="雨水设计规模(m³/s):" prop="a" style="width: 45%" v-if="formData.pumpType == 'confluence'">
  91. <el-input v-model="formData.rainpump.designScaleSecond" placeholder="请输入雨水设计规模(m³/s)" clearable />
  92. </el-form-item>
  93. <el-form-item label="雨水单台流量(m³/s):" prop="b" style="width: 45%" v-if="formData.pumpType == 'confluence'">
  94. <el-input v-model="formData.rainpump.singleFlowSccond" placeholder="请输入雨水单台流量(m³/s)" clearable />
  95. </el-form-item>
  96. <el-form-item label="雨水泵站台数:" prop="c" style="width: 45%" v-if="formData.pumpType == 'confluence'">
  97. <el-input v-model="formData.rainpump.deviceCount" placeholder="请输入雨水泵站台数" clearable />
  98. </el-form-item>
  99. <el-form-item label="雨水收水出路:" prop="geometrys" style="width: 45%" v-if="formData.pumpType == 'confluence'">
  100. <el-input v-model="formData.rainpump.collectionOut" placeholder="请输入雨水收水出路" clearable />
  101. </el-form-item>
  102. <el-form-item label="雨水收水范围:" prop="c" style="width: 45%" v-if="formData.pumpType == 'confluence'">
  103. <el-input v-model="formData.rainpump.collectionRange" placeholder="请输入雨水收水范围" clearable />
  104. </el-form-item>
  105. <el-form-item label="收水范围(gis):" prop="geometrys" style="width: 45%" v-if="formData.pumpType == 'confluence'">
  106. <el-input v-model="formData.rainpump.geometrys" placeholder="请输入收水范围(gis)" clearable />
  107. </el-form-item>
  108. <el-divider content-position="left" v-if="formData.pumpType == 'confluence'">污水泵站信息</el-divider>
  109. <el-form-item label="污水设计规模(m³/s):" prop="designScaleSecond" style="width: 45%" v-if="formData.pumpType == 'confluence'">
  110. <el-input v-model="formData.sweagepump.designScaleSecond" placeholder="请输入污水设计规模(m³/s)" clearable />
  111. </el-form-item>
  112. <el-form-item label="污水单台流量(m³/s):" prop="singleFlowSccond" style="width: 45%" v-if="formData.pumpType == 'confluence'">
  113. <el-input v-model="formData.sweagepump.singleFlowSccond" placeholder="请输入污水单台流量(m³/s)" clearable />
  114. </el-form-item>
  115. <el-form-item label="污水泵站台数:" prop="deviceCount" style="width: 45%" v-if="formData.pumpType == 'confluence'">
  116. <el-input v-model="formData.sweagepump.deviceCount" placeholder="请输入污水泵站台数" clearable />
  117. </el-form-item>
  118. <el-form-item label="污水收水出路:" prop="collectionOut" style="width: 45%" v-if="formData.pumpType == 'confluence'">
  119. <el-input v-model="formData.sweagepump.collectionOut" placeholder="请输入污水收水出路" clearable />
  120. </el-form-item>
  121. <el-form-item label="污水收水范围:" prop="collectionRange" style="width: 45%" v-if="formData.pumpType == 'confluence'">
  122. <el-input v-model="formData.sweagepump.collectionRange" placeholder="请输入污水收水范围" clearable />
  123. </el-form-item>
  124. <el-form-item label="收水范围(gis):" prop="geometrys" style="width: 45%" v-if="formData.pumpType == 'confluence'">
  125. <el-input v-model="formData.sweagepump.geometrys" placeholder="请输入收水范围(gis)" clearable />
  126. </el-form-item>
  127.  
  128. <!--雨水泵站数据 -->
  129. <el-divider content-position="left" v-if="formData.pumpType == 'rain_water'">雨水泵站信息</el-divider>
  130. <el-form-item label="设计规模(m³/s):" prop="designScaleSecond" style="width: 45%" v-if="formData.pumpType == 'rain_water'">
  131. <el-input v-model="formData.rainpump.designScaleSecond" placeholder="请输入设计规模(m³/s)" clearable />
  132. </el-form-item>
  133. <el-form-item label="单台流量(m³/s):" prop="singleFlowSccond" style="width: 45%" v-if="formData.pumpType == 'rain_water'">
  134. <el-input v-model="formData.rainpump.singleFlowSccond" placeholder="请输入单台流量(m³/s)" clearable />
  135. </el-form-item>
  136. <el-form-item label="泵站台数:" prop="deviceCount" style="width: 45%" v-if="formData.pumpType == 'rain_water'">
  137. <el-input v-model="formData.rainpump.deviceCount" placeholder="请输入泵站台数" clearable />
  138. </el-form-item>
  139. <el-form-item label="收水出路:" prop="collectionOut" style="width: 45%" v-if="formData.pumpType == 'rain_water'">
  140. <el-input v-model="formData.rainpump.collectionOut" placeholder="请输入收水出路" clearable />
  141. </el-form-item>
  142. <el-form-item label="收水范围:" prop="collectionRange" style="width: 45%" v-if="formData.pumpType == 'rain_water'">
  143. <el-input v-model="formData.rainpump.collectionRange" placeholder="请输入收水范围" clearable />
  144. </el-form-item>
  145. <el-form-item label="收水范围(gis):" prop="geometrys" style="width: 45%" v-if="formData.pumpType == 'rain_water'">
  146. <el-input v-model="formData.rainpump.geometrys" placeholder="请输入收水范围(gis)" clearable />
  147. </el-form-item>
  148.  
  149. <!--污水泵站数据 -->
  150. <el-divider content-position="left" v-if="formData.pumpType == 'sewage_water'">污水泵站信息</el-divider>
  151. <el-form-item label="设计规模(m³/s):" prop="designScaleSecond" style="width: 45%" v-if="formData.pumpType == 'sewage_water'">
  152. <el-input v-model="formData.sweagepump.designScaleSecond" placeholder="请输入设计规模(m³/s)" clearable />
  153. </el-form-item>
  154. <el-form-item label="单台流量(m³/s):" prop="singleFlowSccond" style="width: 45%" v-if="formData.pumpType == 'sewage_water'">
  155. <el-input v-model="formData.sweagepump.singleFlowSccond" placeholder="请输入单台流量(m³/s)" clearable />
  156. </el-form-item>
  157. <el-form-item label="泵站台数:" prop="deviceCount" style="width: 45%" v-if="formData.pumpType == 'sewage_water'">
  158. <el-input v-model="formData.sweagepump.deviceCount" placeholder="请输入泵站台数" clearable />
  159. </el-form-item>
  160. <el-form-item label="收水出路:" prop="collectionOut" style="width: 45%" v-if="formData.pumpType == 'sewage_water'">
  161. <el-input v-model="formData.sweagepump.collectionOut" placeholder="请输入收水出路" clearable />
  162. </el-form-item>
  163. <el-form-item label="收水范围:" prop="collectionRange" style="width: 45%" v-if="formData.pumpType == 'sewage_water'">
  164. <el-input v-model="formData.sweagepump.collectionRange" placeholder="请输入收水范围" clearable />
  165. </el-form-item>
  166. <el-form-item label="收水范围(gis):" prop="geometrys" style="width: 45%" v-if="formData.pumpType == 'sewage_water'">
  167. <el-input v-model="formData.sweagepump.geometrys" placeholder="请输入收水范围(gis)" clearable />
  168. </el-form-item>
  169.  
  170. <!--污水处理 -->
  171. <el-divider content-position="left" v-if="formData.pumpType == 'sewage_handle'">污水处理信息</el-divider>
  172. <el-form-item label="设计规模(m³/s):" prop="designScaleSecond" style="width: 45%" v-if="formData.pumpType == 'sewage_handle'">
  173. <el-input v-model="formData.handlepump.designScaleSecond" placeholder="请输入设计规模(m³/s)" clearable />
  174. </el-form-item>
  175. <el-form-item label="单台流量(m³/s):" prop="singleFlowSccond" style="width: 45%" v-if="formData.pumpType == 'sewage_handle'">
  176. <el-input v-model="formData.handlepump.singleFlowSccond" placeholder="请输入单台流量(m³/s)" clearable />
  177. </el-form-item>
  178. <el-form-item label="泵站台数:" prop="deviceCount" style="width: 45%" v-if="formData.pumpType == 'sewage_handle'">
  179. <el-input v-model="formData.handlepump.deviceCount" placeholder="请输入泵站台数" clearable />
  180. </el-form-item>
  181. <el-form-item label="收水出路:" prop="collectionOut" style="width: 45%" v-if="formData.pumpType == 'sewage_handle'">
  182. <el-input v-model="formData.handlepump.collectionOut" placeholder="请输入收水出路" clearable />
  183. </el-form-item>
  184. <el-form-item label="收水范围:" prop="collectionRange" style="width: 45%" v-if="formData.pumpType == 'sewage_handle'">
  185. <el-input v-model="formData.handlepump.collectionRange" placeholder="请输入收水范围" clearable />
  186. </el-form-item>
  187. <el-form-item label="收水范围(gis):" prop="geometrys" style="width: 45%" v-if="formData.pumpType == 'sewage_handle'">
  188. <el-input v-model="formData.handlepump.geometrys" placeholder="请输入收水范围(gis)" clearable />
  189. </el-form-item>
  190.  
  191. <!--临时泵 -->
  192. <el-divider content-position="left">临时泵站信息</el-divider>
  193. <el-form-item label="是否有临时泵:" prop="haveTemporary" style="width: 45%">
  194. <el-select clearable v-model="formData.haveTemporary" class="m-2" placeholder="请选择" style="width: 100%">
  195. <el-option v-for="item in pumpingData" :key="item.value" :label="item.label" :value="item.value" />
  196. </el-select>
  197. </el-form-item>
  198. <el-form-item label="设计规模(m³/s):" prop="designScaleSecond" style="width: 45%" v-if="formData.haveTemporary == '1'">
  199. <el-input v-model="formData.temporarypump.designScaleSecond" placeholder="请输入设计规模(m³/s)" clearable />
  200. </el-form-item>
  201. <el-form-item label="单台流量(m³/s):" prop="singleFlowSccond" style="width: 45%" v-if="formData.haveTemporary == '1'">
  202. <el-input v-model="formData.temporarypump.singleFlowSccond" placeholder="请输入单台流量(m³/s)" clearable />
  203. </el-form-item>
  204. <el-form-item label="泵站台数:" prop="deviceCount" style="width: 45%" v-if="formData.haveTemporary == '1'">
  205. <el-input v-model="formData.temporarypump.deviceCount" placeholder="请输入泵站台数" clearable />
  206. </el-form-item>
  207. <el-form-item label="收水出路:" prop="collectionOut" style="width: 45%" v-if="formData.haveTemporary == '1'">
  208. <el-input v-model="formData.temporarypump.collectionOut" placeholder="请输入收水出路" clearable />
  209. </el-form-item>
  210. <el-form-item label="收水范围:" prop="collectionRange" style="width: 45%" v-if="formData.haveTemporary == '1'">
  211. <el-input v-model="formData.temporarypump.collectionRange" placeholder="请输入收水范围" clearable />
  212. </el-form-item>
  213.  
  214. <!-- -->
  215. <el-divider content-position="left"></el-divider>
  216. <el-form-item label="泵站地址:" prop="address" style="width: 45%">
  217. <el-input v-model="formData.address" placeholder="请输入泵站地址" clearable />
  218. </el-form-item>
  219. <el-form-item label="格栅机:" prop="grilleMachine" style="width: 45%">
  220. <el-input v-model="formData.grilleMachine" placeholder="请输入格栅机" clearable />
  221. </el-form-item>
  222. <el-form-item label="开启数量:" prop="openNumber" style="width: 45%">
  223. <el-input v-model="formData.openNumber" placeholder="请输入开启数量" clearable />
  224. </el-form-item>
  225. <el-form-item label="总流量m³/s:" prop="totalFlow" style="width: 45%">
  226. <el-input v-model="formData.totalFlow" placeholder="请输入总流量m³/s" clearable />
  227. </el-form-item>
  228. <el-form-item label="建设单位:" prop="unitDep" style="width: 45%">
  229. <el-input v-model="formData.unitDep" placeholder="请输入建设单位" clearable />
  230. </el-form-item>
  231. <el-form-item label="占地面积(㎡):" prop="buildArea" style="width: 45%">
  232. <el-input v-model="formData.buildArea" placeholder="请输入占地面积(㎡)" clearable />
  233. </el-form-item>
  234. <el-form-item label="联系人:" prop="dutyUserName" style="width: 45%">
  235. <el-input v-model="formData.dutyUserName" placeholder="请输入联系人" clearable />
  236. </el-form-item>
  237. <el-form-item label="联系人电话:" prop="dutyUserPhone" style="width: 45%">
  238. <el-input v-model="formData.dutyUserPhone" placeholder="请输入联系人电话" clearable />
  239. </el-form-item>
  240. </el-row>
  241. </el-form>
  242. <template #footer>
  243. <div class="dialog-footer">
  244. <el-button type="primary" @click="submitForm" v-show="!isDisab">保 存</el-button>
  245. <el-button @click="cancel">关闭</el-button>
  246. </div>
  247. </template>
  248. </el-dialog>
  249. </div>
  250. </div>
  251. </template>
  252.  
  253. <script setup>
  254. import { stationInfolist } from '@/api/scada/areaInfo';
  255. import { facilityPumpPage, facilityPumpAdd, facilityPumpEdit, facilityPumpDelete } from '@/api/scada/pumpStationInformation';
  256. const { proxy } = getCurrentInstance();
  257. const hiddentext = ref(false);
  258. const isDisab = ref(false);
  259. const showSearch = ref(true);
  260. const showDialog = ref(false);
  261. const tableLoading = ref(true);
  262. const total = ref(0);
  263. const tableData = ref([]);
  264. let typeList = ref([]);
  265. const dialogTitle = ref('');
  266. const { pump_type } = proxy.useDict('pump_type');
  267. console.log(pump_type, 'pump_type');
  268. const pumpingData = ref([
  269. { label: '是', value: '1' },
  270. { label: '否', value: '0' },
  271. ]);
  272. let AllData = reactive({
  273. formData: { rainpump: {}, temporarypump: {}, sweagepump: {}, handlepump: {} },
  274. queryParams: { pumpCode: '', pumpType: '', pageNum: 1, pageSize: 10 },
  275. formRules: {
  276. pumpName: [{ required: true, message: '请输入泵站名称', trigger: 'blur' }],
  277. pumpCode: [{ required: true, message: '请输入泵站编码', trigger: 'blur' }],
  278. pumpType: [{ required: true, message: '请选择泵站类型', trigger: 'blur' }],
  279. dutyUserPhone: [
  280. {
  281. pattern: /^1[3|4|5|6|7|8|9][0-9]\d{8}$/,
  282. message: '请输入正确的手机号码',
  283. trigger: 'blur',
  284. },
  285. ],
  286. },
  287. });
  288. let { queryParams, formData, formRules } = toRefs(AllData);
  289. /** 表单重置 */
  290. function resetForm() {
  291. formData.value = {};
  292. proxy.resetForm('ruleForm');
  293. }
  294. //搜索
  295. const searchForm = () => {
  296. queryParams.value.pageNum = 1;
  297. getDataList();
  298. };
  299. //重置按钮
  300. const resectClcik = () => {
  301. queryParams.value.pumpCode = '';
  302. queryParams.value.pumpType = '';
  303. getDataList();
  304. };
  305. //站点下拉框
  306. const stationInfolistM = async p => {
  307. const res = await stationInfolist();
  308. typeList.value = res.data;
  309. };
  310. //获取列表数据
  311. const getDataList = async () => {
  312. tableLoading.value = true;
  313. const res = await facilityPumpPage(queryParams.value);
  314. tableLoading.value = false;
  315. tableData.value = res.data;
  316.  
  317. total.value = res.total;
  318. };
  319.  
  320. // 下拉框
  321. function pumpTypechange(val) {
  322. if (formData.value.pumpType == 'rain_water') {
  323. // formData.value.rainpump = {};
  324. formData.value.temporarypump = {};
  325. formData.value.sweagepump = {};
  326. formData.value.handlepump = {};
  327. formData.value.haveTemporary = pumpingData.value[1].value;
  328. } else if (formData.value.pumpType == 'sewage_water') {
  329. // formData.value.sweagepump = {};
  330. formData.value.temporarypump = {};
  331. formData.value.rainpump = {};
  332. formData.value.handlepump = {};
  333. formData.value.haveTemporary = pumpingData.value[1].value;
  334. } else if (formData.value.pumpType == 'sewage_handle') {
  335. // formData.value.handlepump = {};
  336. formData.value.temporarypump = {};
  337. formData.value.rainpump = {};
  338. formData.value.sweagepump = {};
  339. formData.value.haveTemporary = pumpingData.value[1].value;
  340. } else {
  341. formData.value.temporarypump = {};
  342. formData.value.handlepump = {};
  343. formData.value.rainpump = {};
  344. formData.value.haveTemporary = pumpingData.value[1].value;
  345. }
  346. }
  347.  
  348. //新增按钮
  349. const addData = () => {
  350. resetForm();
  351. isDisab.value = false;
  352. showDialog.value = true;
  353. hiddentext.value = false;
  354. dialogTitle.value = '新增泵站信息';
  355. formData.value.temporarypump = {};
  356. formData.value.rainpump = {};
  357. formData.value.sweagepump = {};
  358. formData.value.handlepump = {};
  359. formData.value.haveTemporary = pumpingData.value[1].value;
  360. formData.value.pumpType = pump_type._object.pump_type[0].value;
  361. };
  362. /** 取消按钮 */
  363. function cancel() {
  364. showDialog.value = false;
  365. resetForm();
  366. }
  367. /** 新增弹框 修改弹框 提交按钮 */
  368. async function submitForm() {
  369. proxy.$refs['ruleForm'].validate(valid => {
  370. if (valid) {
  371. if (formData.value.id != undefined) {
  372. facilityPumpEdit(formData.value).then(() => {
  373. proxy.$modal.msgSuccess('修改成功');
  374. showDialog.value = false;
  375. getDataList();
  376. });
  377. } else {
  378. formData.value.pumpType = formData.value.pumpType;
  379. if (formData.value.pumpType == 'rain_water') {
  380. formData.value.rainpump.pumpType = formData.value.pumpType;
  381. formData.value.temporarypump.pumpType = 'temporary';
  382. } else if (formData.value.pumpType == 'sewage_water') {
  383. formData.value.sweagepump.pumpType = formData.value.pumpType;
  384. formData.value.temporarypump.pumpType = 'temporary';
  385. } else if (formData.value.pumpType == 'sewage_handle') {
  386. formData.value.handlepump.pumpType = formData.value.pumpType;
  387. formData.value.temporarypump.pumpType = 'temporary';
  388. } else {
  389. formData.value.sweagepump.pumpType = formData.value.pumpType;
  390. formData.value.rainpump.pumpType = formData.value.pumpType;
  391. formData.value.temporarypump.pumpType = 'temporary';
  392. }
  393. console.log(formData.value, 'formData.value');
  394. facilityPumpAdd(formData.value).then(() => {
  395. proxy.$modal.msgSuccess('新增成功');
  396. showDialog.value = false;
  397. getDataList();
  398. });
  399. }
  400. }
  401. });
  402. }
  403.  
  404. //表格修改
  405. function editData(row) {
  406. dialogTitle.value = '修改泵站信息';
  407. isDisab.value = false;
  408. showDialog.value = true;
  409. hiddentext.value = true;
  410. formData.value = { ...row };
  411. }
  412. // 表格删除
  413. function deleteData(row) {
  414. proxy.$modal
  415. .confirm('是否确认删除?')
  416. .then(async () => {
  417. const res = await facilityPumpDelete(row.id);
  418. if (res?.code !== 200) return;
  419. proxy.$modal.msgSuccess('操作成功!');
  420. getDataList();
  421. })
  422. .catch(() => {});
  423. }
  424. //详情按钮
  425. function checkDetail(row) {
  426. dialogTitle.value = '查看泵站信息';
  427. isDisab.value = true;
  428. showDialog.value = true;
  429. formData.value = { ...row };
  430. console.log(formData.value, 'formData.value');
  431.  
  432. // formData.value.designHead = Number(row.designHead);
  433. // formData.value.dayLarge = Number(row.dayLarge);
  434. // formData.value.designPower = Number(row.designPower);
  435. // formData.value.deviceCount = Number(row.deviceCount);
  436. // formData.value.maxWaterlevel = Number(row.maxWaterlevel);
  437. // formData.value.modelValue = Number(row.modelValue);
  438. // formData.value.large = Number(row.large);
  439. // console.log(formData.value.pumpType, 'formData.value.pumpType');
  440. }
  441.  
  442. function getUnitName(row) {
  443. let unitName = '';
  444. switch (row.pumpType) {
  445. case 'rain_water':
  446. unitName = 'm³/s';
  447. break;
  448. case 'sewage_water':
  449. unitName = 'm³/s';
  450. break;
  451. case 'drain_flooded':
  452. unitName = 'm³/s';
  453. break;
  454. }
  455.  
  456. return `${row.designScale}${unitName}`;
  457. }
  458.  
  459. onMounted(() => {
  460. getDataList();
  461. stationInfolistM();
  462. });
  463. </script>
  464.  
  465. <style lang="scss" scoped>
  466. .water-analysis-page {
  467. padding: 20px;
  468. overflow-y: hidden;
  469. }
  470. </style>