src/api/fysp/monitordataApi.js | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/api/index.js | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/views/fysp/evaluation/EvalutationRecord.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/views/fysp/evaluation/components/CompDataResultEdit.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/views/fysp/evaluation/components/precheck/CompPreCheck.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/views/fysp/evaluation/components/precheck/components/CompCheckSource.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
src/api/fysp/monitordataApi.js
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,28 @@ import { $fysp } from '../index'; /** * çæµæ°æ®ç»è®¡ç¸å ³API */ export default { /** * ä¸ä¼ æ¬å°çæµæ°æ®æåº¦ç»è®¡ç»æ * @param {Array} dataList æ¬å°çæµæ°æ®ç»è®¡ç»ææ°ç» * @returns {Promise} */ uploadDustDataResult(dataList) { return $fysp .put(`monitor/data/result/construction/upload`, dataList) .then((res) => res.data); }, /** * è·åæ¬å°çæµæ°æ®æåº¦ç»è®¡ç»æ * @param {Object} area æ¥è¯¢æ¡ä»¶è¡æ¿åºåãæ¶é´ãåºæ¯ç±»å * @returns */ fetchDustDataResult(area) { return $fysp .post(`monitor/data/result/construction/get`, area) .then((res) => res.data); } }; src/api/index.js
@@ -1,7 +1,7 @@ import axios from 'axios'; import { ElMessage } from 'element-plus'; const debug = false; const debug = true; let ip1 = 'http://47.100.191.150:9005/'; let ip1_file = 'http://47.100.191.150:9005/'; src/views/fysp/evaluation/EvalutationRecord.vue
@@ -278,6 +278,12 @@ if (typeof func === 'function') { func({ data: this.tableData }); } } else { this.tableData = []; this.orginData = []; if (typeof func === 'function') { func({ data: this.tableData }); } } }); }); src/views/fysp/evaluation/components/CompDataResultEdit.vue
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,105 @@ <template> <el-row align="top"> <el-upload ref="upload" class="upload-file" :limit="1" :on-change="handleChange" :on-exceed="handleExceed" :auto-upload="false" > <template #trigger> <el-button type="primary">ä¸ä¼ çæµæ°æ®ç»è®¡ç»æ</el-button> </template> </el-upload> <el-text>{{ loadTxt }}</el-text> </el-row> <el-table ref="tableRef" :data="data" v-loading="loading" table-layout="fixed" :stripe="true" size="small" height="60vh" border > <el-table-column :show-overflow-tooltip="true" prop="drSceneName" label="åç§°" width="300" /> <el-table-column prop="drDeviceCode" label="设å¤å·" width="130" /> <el-table-column prop="drTime" label="æ¶é´" width="100"> <template #default="{ row }"> <span>{{ $fm.formatYMD(row.drTime) }}</span> </template> </el-table-column> <el-table-column prop="drExceedTimes" label="è¶ æ æ¬¡æ°" /> <el-table-column prop="drAvg" label="å¹³åå¼" /> <el-table-column prop="drMax" label="æå¤§å¼" /> <el-table-column prop="drMin" label="æå°å¼" /> <el-table-column prop="drOverAvgPer" label="è¶ åºåå¼ç¾åæ¯" /> <el-table-column prop="drDataNum" label="æ°æ®é" /> <el-table-column prop="drEffectiveRate" label="ææç" /> </el-table> </template> <script setup> import { ref, watch, onMounted } from 'vue'; import { genFileId } from 'element-plus'; import monitordataApi from '@/api/fysp/monitordataApi'; import * as XLSX from 'xlsx'; const props = defineProps({ areaInfo: { type: Object } }); let workbook; const data = ref([]); const upload = ref(); const loadTxt = ref(''); // è·ååå²ç»è®¡ç»æ function fetchDustDataResult() { monitordataApi.fetchDustDataResult(props.areaInfo).then((res) => { data.value = res.data; }); } function handleExceed(files, uploadFiles) { upload.value.clearFiles(); const file = files[0]; file.uid = genFileId(); upload.value.handleStart(file); } function handleChange(uploadFile, uploadFiles) { // console.log(uploadFile, uploadFiles); const fileReader = new FileReader(); fileReader.onload = (file) => { const data = file.target.result; workbook = XLSX.read(data, { type: 'array' }); console.log(workbook.SheetNames); }; fileReader.readAsArrayBuffer(uploadFile.raw); } // ä¸ä¼ ç»è®¡ç»æææ¡£ function uploadFile() {} onMounted(() => { fetchDustDataResult(); }); </script> <style scoped> .upload-file { /* background-color: aliceblue; */ width: 300px; min-height: 60px; } :deep(.el-text) { align-self: auto; } </style> src/views/fysp/evaluation/components/precheck/CompPreCheck.vue
@@ -72,6 +72,7 @@ towncode: v._locations.tCode, townname: v._locations.tName, starttime: this.$fm.formatYMDH(v.time), endtime: this.$fm.formatYMDH(v.time), scensetypeid: v._scenetype.value, online: true, sourceType: v.sourceType src/views/fysp/evaluation/components/precheck/components/CompCheckSource.vue
@@ -1,4 +1,5 @@ <template> <div> <el-card shadow="never"> <template #header> <div><el-text tag="b" size="large">æ°æ®æºæ£æ¥</el-text></div> @@ -9,7 +10,11 @@ <el-row class="h-small" align="middle"> <el-col :span="14"> <el-row align="middle"> <el-text size="default" :class="v.required ? 'required' : 'not-required'">*</el-text> <el-text size="default" :class="v.required ? 'required' : 'not-required'" >*</el-text > <el-text size="default" class="m-l-4">{{ v.name }}</el-text> </el-row> </el-col> @@ -29,7 +34,9 @@ <el-text size="default" type="danger">缺失</el-text> </template> <template v-else> <el-icon color="var(--el-color-warning)"><Warning /></el-icon> <el-icon color="var(--el-color-warning)" ><Warning /></el-icon> <el-text size="default" type="warning">æç¥è¿</el-text> </template> </el-space> @@ -56,13 +63,29 @@ </FormCol> <template #footer> <el-row justify="space-around"> <el-button type="primary" size="default" @click="lastStep">ä¸ä¸æ¥</el-button> <el-button :disabled="!checkPass" type="primary" size="default" @click="nextStep" <el-button type="primary" size="default" @click="lastStep" >ä¸ä¸æ¥</el-button > <el-button :disabled="!checkPass" type="primary" size="default" @click="nextStep" >ä¸ä¸æ¥</el-button > </el-row> </template> </el-card> <el-dialog title="æ¬å°çæµæ°æ®æåº¦ç»è®¡ç®¡ç" v-model="dialog1" destroy-on-close width="90%" > <CompDataResultEdit :areaInfo="areaInfo"></CompDataResultEdit> <template #footer> </template> </el-dialog> </div> </template> <script> @@ -70,14 +93,16 @@ import taskApi from '@/api/fysp/taskApi'; import userMapApi from '@/api/fysp/userMapApi'; import problemApi from '@/api/fysp/problemApi'; import monitordataApi from '@/api/fysp/monitordataApi'; import complaintApi from '@/api/fytz/complaintApi'; import CompDataResultEdit from '../../CompDataResultEdit.vue'; /** * çæä¸é¡¹æ°æ®æºæ£æ¥è®°å½ * @param {*} _name * @param {*} _path * @param {*} _fetch * @param {*} _required * çæä¸é¡¹æ°æ®æºæ£æ¥æ¡ç® * @param {*} _name æ¡ç®åç§° * @param {*} _path 跳转页é¢URL * @param {*} _fetch æ¡ç®çç½ç»è¯·æ±å½æ° * @param {*} _required æ¯å¦å¿ é */ function baseCheckItem(_name, _path, _fetch, _required) { return { @@ -90,7 +115,7 @@ async fetch() { this.loading = true; setTimeout(async () => { if (_fetch != undefined) { if (typeof _fetch === 'function') { _fetch() .then((res) => { this.pass = res ? res.pass : undefined; @@ -117,6 +142,9 @@ * è¯ä¼°æ°æ®æºå®æ´æ§æ£æ¥ */ export default { components: { CompDataResultEdit }, props: { // æ¥éª¤ä¸æ modelValue: Number @@ -173,7 +201,26 @@ }); }), // åºåèå´å ççæµæ°æ®æ¯å¦åå¨ãæ°æ®æ¶é´è·¨åº¦æ¯å¦å®æ´ãæ°æ®ç忥忿¯å¦å®æ baseCheckItem('ç°åºçæµæ°æ®', ''), baseCheckItem( 'ç°åºçæµæ°æ®', () => { this.dialog1 = true; }, () => { return monitordataApi .fetchDustDataResult(this.areaInfo) .then((res) => { const pass = res.data.length > 0; let des = ''; if (pass) { des = `æ¾å°æåº¦ç»è®¡å ±${res.data.length}æ¡`; } else { des = 'æªæ¾å°ç¸å ³è®°å½'; } return { pass, des }; }); } ), // åºåèå´å çæ¯ä¸ªç管ç¹ä½ä¸çæµä»ªå¨çå¹é è®°å½æ¯å¦åå¨ï¼ç¼ºå¤±æ åµç baseCheckItem('ç管ç¹ä½ä¸çæµç¹å¹é ', '', () => { return userMapApi.fetchDeviceMap(this.areaInfo).then((res) => { @@ -211,7 +258,8 @@ // complaintApi.fetchPunishment(); // åºåèå´å çè¡æ¿å¤ç½è®°å½æ¯å¦åå¨ï¼å¯éæ¶è¡¥å baseCheckItem('è¡æ¿å¤ç½', '') ] ], dialog1: false }; }, computed: { @@ -243,8 +291,10 @@ }, // è·³è½¬æ£æ¥é¡¹ç龿¥ goto(path) { if (path && path != '') { if (typeof path === 'string' && path != '') { this.$router.push(path); } else if (typeof path === 'function') { path(); } }, // å¼å§æ£æ¥ä»»å¡