| | |
| | | } |
| | | // ææ¡£å·²åå¨ï¼è¿åæä»¶æ°æ®æµ |
| | | else { |
| | | return res |
| | | return res; |
| | | // const name = Base64.decode(res.headers.get('filename')); |
| | | // const url = window.URL.createObjectURL(res.data); |
| | | // const link = document.createElement('a'); |
| | |
| | | // window.URL.revokeObjectURL(url); |
| | | } |
| | | }); |
| | | }, |
| | | |
| | | /** |
| | | * è·åé®é¢æ´æ¹æ¸
å |
| | | */ |
| | | fetchProbChangeList(option) { |
| | | return $fysp.post(`dataProduct/problemChange?`, option).then((res) => { |
| | | return res.data; |
| | | }); |
| | | }, |
| | | |
| | | /** |
| | | * è·åé®é¢å¤åæ¸
å |
| | | */ |
| | | fetchProbRecurrence(option) { |
| | | return $fysp.post(`dataProduct/problemRecurrence?`, option).then((res) => { |
| | | return res.data; |
| | | }); |
| | | } |
| | | }; |
| | |
| | | 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/'; |
| | |
| | | ElBreadcrumb: typeof import('element-plus/es')['ElBreadcrumb'] |
| | | ElBreadcrumbItem: typeof import('element-plus/es')['ElBreadcrumbItem'] |
| | | ElButton: typeof import('element-plus/es')['ElButton'] |
| | | ElButtonGroup: typeof import('element-plus/es')['ElButtonGroup'] |
| | | ElCalendar: typeof import('element-plus/es')['ElCalendar'] |
| | | ElCard: typeof import('element-plus/es')['ElCard'] |
| | | ElCascader: typeof import('element-plus/es')['ElCascader'] |
| | |
| | | ElDialog: typeof import('element-plus/es')['ElDialog'] |
| | | ElDivider: typeof import('element-plus/es')['ElDivider'] |
| | | ElDrawer: typeof import('element-plus/es')['ElDrawer'] |
| | | ElDropdown: typeof import('element-plus/es')['ElDropdown'] |
| | | ElDropdownItem: typeof import('element-plus/es')['ElDropdownItem'] |
| | | ElDropdownMenu: typeof import('element-plus/es')['ElDropdownMenu'] |
| | | ElEmpty: typeof import('element-plus/es')['ElEmpty'] |
| | | ElForm: typeof import('element-plus/es')['ElForm'] |
| | | ElFormItem: typeof import('element-plus/es')['ElFormItem'] |
| | |
| | | ElMenuItem: typeof import('element-plus/es')['ElMenuItem'] |
| | | ElMenuItemGroup: typeof import('element-plus/es')['ElMenuItemGroup'] |
| | | ElOption: typeof import('element-plus/es')['ElOption'] |
| | | ElPageHeader: typeof import('element-plus/es')['ElPageHeader'] |
| | | ElPagination: typeof import('element-plus/es')['ElPagination'] |
| | | ElPopconfirm: typeof import('element-plus/es')['ElPopconfirm'] |
| | | ElPopover: typeof import('element-plus/es')['ElPopover'] |
| | | ElRadio: typeof import('element-plus/es')['ElRadio'] |
| | | ElRadioButton: typeof import('element-plus/es')['ElRadioButton'] |
| | | ElRadioGroup: typeof import('element-plus/es')['ElRadioGroup'] |
| | | ElRow: typeof import('element-plus/es')['ElRow'] |
| | |
| | | ElTag: typeof import('element-plus/es')['ElTag'] |
| | | ElText: typeof import('element-plus/es')['ElText'] |
| | | ElTooltip: typeof import('element-plus/es')['ElTooltip'] |
| | | ElTransfer: typeof import('element-plus/es')['ElTransfer'] |
| | | ElTree: typeof import('element-plus/es')['ElTree'] |
| | | ElUpload: typeof import('element-plus/es')['ElUpload'] |
| | | Footer: typeof import('./components/core/Footer.vue')['default'] |
| | |
| | | const MONTH = 'month'; |
| | | const DATE = 'date'; |
| | | const RANGE = 'datetimerange'; |
| | | const RANGE2 = 'daterange'; |
| | | |
| | | export default { |
| | | props: { |
| | |
| | | :cell-class-name="cellClassName" |
| | | @paste="handlePaste" |
| | | @sort-change="handleSortChange" |
| | | :show-overflow-tooltip="true" |
| | | border |
| | | > |
| | | <slot name="table-column" :size="fontSize"></slot> |
| | |
| | | mounted() { |
| | | this.tableHeight = this.calcTableHeight(); |
| | | this.onSearch(); |
| | | } |
| | | }, |
| | | }; |
| | | </script> |
| | | |
| | |
| | | icon: 'DataAnalysis', |
| | | name: 'åºç¡æ°æ®äº§å', |
| | | children: [ |
| | | // { |
| | | // path: '/fysp/data-product/base/ProdScenseInfo', |
| | | // icon: 'Document', |
| | | // name: 'åºæ¯æ¸
å', |
| | | // }, |
| | | // { |
| | | // path: '/fysp/data-product/base/ProdMonitorTaskInfo', |
| | | // icon: 'Document', |
| | | // name: 'ç管æ¸
å', |
| | | // }, |
| | | // { |
| | | // path: '/fysp/data-product/base/ProdTreatmentDeviceInfo', |
| | | // icon: 'Document', |
| | | // name: '鲿²»è®¾å¤æ¸
å', |
| | | // }, |
| | | { |
| | | path: '/fysp/data-product/ProdScenseInfo', |
| | | path: '/fysp/data-product/base/PordProblemRecurrence', |
| | | icon: 'Document', |
| | | name: 'åºæ¯æ¸
å', |
| | | }, |
| | | { |
| | | path: '/fysp/data-product/ProdMonitorTaskInfo', |
| | | icon: 'Document', |
| | | name: 'ç管æ¸
å', |
| | | }, |
| | | { |
| | | path: '/fysp/data-product/ProdTreatmentDeviceInfo', |
| | | icon: 'Document', |
| | | name: '鲿²»è®¾å¤æ¸
å', |
| | | name: 'é®é¢å¤åæ¸
å', |
| | | }, |
| | | ] |
| | | }, |
| | |
| | | { |
| | | // åºç¡äº§å-åºæ¯æ¸
å |
| | | name: 'ProdScenseInfo', |
| | | path: '/fysp/data-product/ProdScenseInfo', |
| | | path: '/fysp/data-product/base/ProdScenseInfo', |
| | | component: () => import('@/views/fysp/data-product/base-data-product/ProdScenseInfo.vue') |
| | | }, |
| | | { |
| | | // åºç¡äº§å-ç管æ¸
å |
| | | name: 'ProdMonitorTaskInfo', |
| | | path: '/fysp/data-product/ProdMonitorTaskInfo', |
| | | path: '/fysp/data-product/base/ProdMonitorTaskInfo', |
| | | component: () => import('@/views/fysp/data-product/base-data-product/ProdMonitorTaskInfo.vue') |
| | | }, |
| | | { |
| | | // åºç¡äº§å-鲿²»è®¾å¤æ¸
å |
| | | name: 'ProdTreatmentDeviceInfo', |
| | | path: '/fysp/data-product/ProdTreatmentDeviceInfo', |
| | | path: '/fysp/data-product/base/ProdTreatmentDeviceInfo', |
| | | component: () => import('@/views/fysp/data-product/base-data-product/ProdTreatmentDeviceInfo.vue') |
| | | }, |
| | | { |
| | | // åºç¡äº§å-é®é¢å¤åæ¸
å |
| | | name: 'PordProblemRecurrence', |
| | | path: '/fysp/data-product/base/PordProblemRecurrence', |
| | | component: () => import('@/views/fysp/data-product/base-data-product/PordProblemRecurrence.vue') |
| | | }, |
| | | |
| | | /**********************************é£ç¾½ç¯å¢***********************************************/ |
| | | { |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <FYTable |
| | | @search="onSearch" |
| | | :data="showData" |
| | | :pagination="false" |
| | | ref="tableRef" |
| | | > |
| | | <template #options> |
| | | <!-- åºå¿ --> |
| | | <FYOptionLocation |
| | | :allOption="false" |
| | | :level="3" |
| | | :checkStrictly="false" |
| | | v-model:value="formSearch.locations" |
| | | ></FYOptionLocation> |
| | | <!-- åºæ¯ç±»å --> |
| | | <FYOptionScene |
| | | :allOption="false" |
| | | :type="2" |
| | | v-model:value="formSearch.scenetype" |
| | | ></FYOptionScene> |
| | | <!-- æ¶é´ --> |
| | | <FYOptionTime |
| | | :initValue="false" |
| | | type="daterange" |
| | | v-model:value="formSearch.timeArr" |
| | | style="width: 300px" |
| | | ></FYOptionTime> |
| | | </template> |
| | | |
| | | <template #options-expand> |
| | | <el-radio-group v-model="radio"> |
| | | <el-radio :value="1">æé®é¢åç§°ç»è®¡</el-radio> |
| | | <el-radio :value="2">æé®é¢ç±»åç»è®¡</el-radio> |
| | | </el-radio-group> |
| | | </template> |
| | | <template #buttons> </template> |
| | | <template #table-column="{ size }"> |
| | | <!-- <el-table-column fixed="left" label="åºå·" width="53"> |
| | | <template #default="{ row }"> |
| | | {{ row.index + 1 }} |
| | | </template> |
| | | </el-table-column> --> |
| | | <el-table-column fixed="left" label="å¯ä¸ç¼å·" width="90" prop="index"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="sceneName" |
| | | :show-overflow-tooltip="true" |
| | | label="åç§°" |
| | | > |
| | | </el-table-column> |
| | | <el-table-column prop="sceneType" label="ç±»å" width="60" /> |
| | | <!-- <el-table-column prop="provinceName" label="ç份" width="90"> |
| | | </el-table-column> |
| | | <el-table-column prop="cityName" label="åå¸" width="90"> |
| | | </el-table-column> --> |
| | | <el-table-column prop="districtName" label="åºå¿" width="90"> |
| | | </el-table-column> |
| | | <el-table-column prop="townName" label="è¡é" width="110"> |
| | | </el-table-column> |
| | | <el-table-column prop="problemType" label="é®é¢ç±»å" width="110"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | v-if="radio == 1" |
| | | prop="problemName" |
| | | label="é®é¢åç§°" |
| | | width="200" |
| | | > |
| | | </el-table-column> |
| | | <el-table-column prop="proNum" label="é®é¢æ°" width="70"> |
| | | </el-table-column> |
| | | <el-table-column prop="changeNum" label="æ´æ¹æ°" width="70"> |
| | | </el-table-column> |
| | | </template> |
| | | </FYTable> |
| | | </template> |
| | | <script setup> |
| | | import { ref, computed } from 'vue'; |
| | | import dayjs from 'dayjs'; |
| | | import dataproductApi from '@/api/fysp/dataproductApi.js'; |
| | | |
| | | const radio = ref(1); |
| | | const tableRef = ref(null); |
| | | const tableData = ref([]); |
| | | const formSearch = ref({ |
| | | locations: {}, |
| | | scenetype: {}, |
| | | timeArr: [dayjs().add(-1, 'M').date(1).toDate(), dayjs().toDate()] |
| | | }); |
| | | |
| | | const option = computed(() => { |
| | | const { locations, scenetype, timeArr } = formSearch.value; |
| | | return { |
| | | provinceCode: locations.pCode, |
| | | cityCode: locations.cCode, |
| | | districtCode: locations.dCode, |
| | | townCode: locations.tCode, |
| | | startTime: dayjs(timeArr[0]).format('YYYY-MM-DD HH:mm:ss'), |
| | | endTime: dayjs(timeArr[1]) |
| | | .hour(23) |
| | | .minute(59) |
| | | .second(59) |
| | | .format('YYYY-MM-DD HH:mm:ss'), |
| | | sceneTypeId: scenetype.value |
| | | }; |
| | | }); |
| | | |
| | | const showData = computed(() => { |
| | | let res = []; |
| | | switch (radio.value) { |
| | | case 1: |
| | | res = tableData.value; |
| | | break; |
| | | case 2: |
| | | tableData.value.forEach((tb) => { |
| | | const r = res.find((v) => { |
| | | return v.sceneName == tb.sceneName && v.problemType == tb.problemType; |
| | | }); |
| | | if (r == undefined) { |
| | | res.push({ ...tb }); |
| | | } else { |
| | | r.proNum += tb.proNum; |
| | | r.changeNum += tb.changeNum; |
| | | } |
| | | }); |
| | | break; |
| | | default: |
| | | res = tableData.value; |
| | | break; |
| | | } |
| | | if (tableRef.value) { |
| | | tableRef.value.doLayout(); |
| | | } |
| | | return res; |
| | | }); |
| | | |
| | | function onSearch(page, callback) { |
| | | fetchProbRecurrence().finally(() => callback()); |
| | | } |
| | | |
| | | function fetchProbRecurrence() { |
| | | return dataproductApi.fetchProbRecurrence(option.value).then((res) => { |
| | | tableData.value = res.data; |
| | | }); |
| | | } |
| | | // function handleChange(value) { |
| | | // switch (value) { |
| | | // case 1: |
| | | // break; |
| | | // case 2: |
| | | // break; |
| | | // default: |
| | | // break; |
| | | // } |
| | | // } |
| | | </script> |