| | |
| | | BaseContentLayout: typeof import('./src/components/core/BaseContentLayout.vue')['default'] |
| | | BaseMap: typeof import('./src/components/map/BaseMap.vue')['default'] |
| | | BaseOption: typeof import('./src/components/search-option/base/BaseOption.vue')['default'] |
| | | CompGenericWrapper: typeof import('./src/components/CompGenericWrapper.vue')['default'] |
| | | CompQuickSet: typeof import('./src/components/search-option/CompQuickSet.vue')['default'] |
| | | DeviceStatus: typeof import('./src/components/monitor/DeviceStatus.vue')['default'] |
| | | DistrictRanking: typeof import('./src/components/monitor/DistrictRanking.vue')['default'] |
| | |
| | | const BaseContentLayout: typeof import('./src/components/core/BaseContentLayout.vue')['default'] |
| | | const BaseMap: typeof import('./src/components/map/BaseMap.vue')['default'] |
| | | const BaseOption: typeof import('./src/components/search-option/base/BaseOption.vue')['default'] |
| | | const CompGenericWrapper: typeof import('./src/components/CompGenericWrapper.vue')['default'] |
| | | const CompQuickSet: typeof import('./src/components/search-option/CompQuickSet.vue')['default'] |
| | | const DeviceStatus: typeof import('./src/components/monitor/DeviceStatus.vue')['default'] |
| | | const DistrictRanking: typeof import('./src/components/monitor/DistrictRanking.vue')['default'] |
| | |
| | | <meta charset="UTF-8" /> |
| | | <link rel="icon" href="/favicon.ico" /> |
| | | <meta name="viewport" content="width=device-width, initial-scale=1.0" /> |
| | | <title>é¤é¥®æ²¹çæºè½çæµä¸ç管ä¸ä½åå¹³å°</title> |
| | | <title>é¤é¥®æ²¹çæºè½çæµç管ä¸ä½åå¹³å°</title> |
| | | </head> |
| | | <body> |
| | | <div id="app"></div> |
| | |
| | | </script> |
| | | <script type="module" src="/src/main.js"></script> |
| | | </body> |
| | | </html> |
| | | </html> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <!-- dialogå
裹 --> |
| | | <el-dialog |
| | | v-if="currType == 'dialog'" |
| | | :title="title" |
| | | :model-value="visible" |
| | | @opened="$emit('update:visible', true)" |
| | | @closed="$emit('update:visible', false)" |
| | | destroy-on-close |
| | | :draggable="draggable" |
| | | :modal="modal" |
| | | :append-to-body="appendToBody" |
| | | > |
| | | <div v-if="visible"> |
| | | <slot name="content"></slot> |
| | | </div> |
| | | </el-dialog> |
| | | <!-- drawerå
裹 --> |
| | | <el-drawer |
| | | v-if="currType == 'drawer'" |
| | | :title="title" |
| | | size="45%" |
| | | direction="ltr" |
| | | :model-value="visible" |
| | | @opened="$emit('update:visible', true)" |
| | | @closed="$emit('update:visible', false)" |
| | | destroy-on-close |
| | | > |
| | | <slot name="content"></slot> |
| | | </el-drawer> |
| | | <!-- é»è®¤æ å
裹 --> |
| | | <div v-if="currType == 'normal'"> |
| | | <slot></slot> |
| | | </div> |
| | | </template> |
| | | <script setup> |
| | | import { ref, defineEmits, watch } from 'vue'; |
| | | const props = defineProps({ |
| | | visible: Boolean, |
| | | title: String, |
| | | type: { |
| | | type: String, |
| | | default: 'normal' |
| | | }, |
| | | draggable: Boolean, |
| | | modal: { |
| | | type: Boolean, |
| | | default: true |
| | | }, |
| | | appendToBody: { |
| | | type: Boolean, |
| | | default: true |
| | | } |
| | | }); |
| | | const typeOptions = ref([ |
| | | { id: '0', label: 'dialog' }, |
| | | { id: '1', label: 'drawer' }, |
| | | { id: '10', label: '' } |
| | | ]); |
| | | const currType = ref(''); |
| | | const emit = defineEmits(['update:visible']); |
| | | watch( |
| | | () => props.type, |
| | | (nValue) => { |
| | | currType.value = nValue; |
| | | }, |
| | | { immediate: true } |
| | | ); |
| | | </script> |
| | | <style scoped> |
| | | :deep(.el-drawer__body) { |
| | | padding-top: 0; |
| | | } |
| | | |
| | | :deep(.el-drawer__header) { |
| | | margin-bottom: 16px; |
| | | } |
| | | </style> |
| | |
| | | <template> |
| | | <el-row class="layout"> |
| | | <el-col :span="$slots.summary ? 10 : 24"> |
| | | <el-col :span="$slots.summary ? 14 : 24"> |
| | | <el-form :inline="true" :model="formSearch"> |
| | | <el-form-item label="æ»ä»»å¡"> |
| | | <!-- <el-input v-model="formSearch.topTaskId" placeholder="æ»ä»»å¡" /> --> |
| | |
| | | </el-form-item> |
| | | </el-form> |
| | | </el-col> |
| | | <el-col :span="$slots.summary ? 14 : 0"> |
| | | <el-col :span="$slots.summary ? 10 : 0"> |
| | | <el-row justify="end"> |
| | | <slot name="summary"></slot> |
| | | </el-row> |
| | |
| | | taskApi.getTopTask().then((res) => { |
| | | const list = res |
| | | .filter((e) => { |
| | | return e.districtname == '徿±åº' && dayjs(e.starttime).isBefore(dayjs('2023-12-31')) |
| | | return e.districtname == '徿±åº' && dayjs(e.starttime).isBefore(dayjs('2025-12-31')) |
| | | }) |
| | | .map((r) => { |
| | | return { |
| | |
| | | </el-col> |
| | | <el-col :span="12" class="logout"> |
| | | <FYBgTaskDialog></FYBgTaskDialog> |
| | | <el-button icon="SwitchButton">éåºç»å½</el-button> |
| | | <el-button icon="SwitchButton" @click="logout">éåºç»å½</el-button> |
| | | </el-col> |
| | | </el-row> |
| | | </template> |
| | |
| | | this.isCollapsed = !this.isCollapsed |
| | | this.$emit('collapsedSider', this.isCollapsed) |
| | | }, |
| | | /** |
| | | * éåºç»å½ |
| | | */ |
| | | logout() { |
| | | this.$router.push(`/login`); |
| | | }, |
| | | }, |
| | | } |
| | | </script> |
| | |
| | | props: { |
| | | selectedMonth: { |
| | | type: String, |
| | | default: '2023-12', |
| | | default: '2025-12', |
| | | }, |
| | | rankingType: { |
| | | type: String, |
| | |
| | | }) |
| | | this.topTasks = list.filter((e) => { |
| | | return ( |
| | | e.data.districtname == '徿±åº' && dayjs(e.data.starttime).isBefore(dayjs('2023-12-31')) |
| | | e.data.districtname == '徿±åº' && dayjs(e.data.starttime).isBefore(dayjs('2025-12-31')) |
| | | ) |
| | | }) |
| | | if (this.initValue) { |
| | |
| | | latitude: 31.17 + Math.random() * 0.1, |
| | | longitude: 121.45 + Math.random() * 0.1, |
| | | ringCodeLevel: ringCodeLevels[Math.floor(Math.random() * ringCodeLevels.length)], |
| | | ringCodePublishTime: '2023-03-16 10:00:00', |
| | | ringCodePublishTime: '2025-03-16 10:00:00', |
| | | isOnline: isOnline, |
| | | exceptionStatus: exceptionStatus, |
| | | }, |
| | |
| | | latitude: 31.19 + Math.random() * 0.1, |
| | | longitude: 121.41 + Math.random() * 0.1, |
| | | ringCodeLevel: ringCodeLevels[Math.floor(Math.random() * ringCodeLevels.length)], |
| | | ringCodePublishTime: '2023-03-16 10:00:00', |
| | | ringCodePublishTime: '2025-03-16 10:00:00', |
| | | isOnline: isOnline, |
| | | exceptionStatus: exceptionStatus, |
| | | }, |
| | |
| | | // çæè¿1å°æ¶ççæµæ°æ®ï¼æ¯10åé䏿¡ |
| | | const data = [] |
| | | const now = new Date() |
| | | now.setFullYear(2023) |
| | | now.setFullYear(2025) |
| | | |
| | | for (let i = 5; i >= 0; i--) { |
| | | const time = new Date(now.getTime() - i * 10 * 60 * 1000) |
| | |
| | | <script> |
| | | import dayjs from 'dayjs' |
| | | // æ¶é´èå´å¿«æ·é项 |
| | | const dayStart = dayjs('2023-08-01').startOf('date') |
| | | const dayStart = dayjs('2025-08-01').startOf('date') |
| | | const dayEnd = dayStart.endOf('date') |
| | | const shortcuts = [ |
| | | { |
| | |
| | | return { |
| | | //ä¿åå¼å§åç»ææ¶é´ |
| | | // é便设置åå§å¼ ï¼mountedæ¶å设æ£ç¡®çï¼ç®çæ¯æ¹åæ¶é´äºè§¦åchange |
| | | time: ['2023-06-01 12:00:00', '2023-06-20 16:00:00'], |
| | | time: ['2025-06-01 12:00:00', '2025-06-20 16:00:00'], |
| | | // æ§å¶æ¶é´éæ©å¨çæ¾ç¤º/éèï¼ä»
卿°æ ·å¼ä¸ä½¿ç¨ï¼ |
| | | showTimePicker: false, |
| | | // æ¶é´èå´é项 |
| | |
| | | // this.time[0] = dayjs().subtract(4, 'week').format('YYYY-MM-DD HH:mm:ss') |
| | | // this.time[1] = dayjs().format('YYYY-MM-DD HH:mm:ss') |
| | | // 2026.3.13 demo ä¸åºå®åå§æ¶é´ |
| | | this.time = ['2023-08-01 00:00:00', '2023-08-31 23:59:59'] |
| | | this.time = ['2025-08-01 00:00:00', '2025-08-31 23:59:59'] |
| | | }, |
| | | |
| | | // å¿«æ·æ¶æ®µéæ© |
| | |
| | | <div class="login-container"> |
| | | <div class="login-wrapper"> |
| | | <div class="login-header"> |
| | | <h1 class="login-title">é¤é¥®æ²¹çæºè½çæµä¸ç管ä¸ä½åå¹³å°</h1> |
| | | <h1 class="login-title">é¤é¥®æ²¹çæºè½çæµç管ä¸ä½åå¹³å°</h1> |
| | | <p class="login-subtitle">欢è¿ç»å½</p> |
| | | </div> |
| | | <div class="login-form"> |
| | |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: flex-end; |
| | | background-image: url('@/assets/loginPageBg.png'); |
| | | background-image: url('@/assets/loginPageBg1.png'); |
| | | background-size: cover; |
| | | background-position: center; |
| | | background-repeat: no-repeat; |
| | |
| | | |
| | | <!-- åºéºå表 --> |
| | | <div class="shop-list"> |
| | | <el-table :data="pagedShopList" style="width: 100%"> |
| | | <el-table :data="filteredShopList" style="width: 100%" max-height="600px"> |
| | | <el-table-column prop="shopName" label="åºéºåç§°" /> |
| | | <el-table-column prop="district" label="æå¨åºå¿" width="120" /> |
| | | <el-table-column prop="town" label="æå¨è¡é" width="150" /> |
| | |
| | | v-model:page-size="pageSize" |
| | | :page-sizes="[10, 20, 50, 100]" |
| | | layout="total, sizes, prev, pager, next, jumper" |
| | | :total="filteredShopList.length" |
| | | :total="total" |
| | | @size-change="handleSizeChange" |
| | | @current-change="handleCurrentChange" |
| | | /> |
| | |
| | | label: 'é¤é¥®', |
| | | value: '1', |
| | | }, |
| | | time: dayjs('2023-08-01').date(1).toDate(), |
| | | time: dayjs('2025-08-01').date(1).toDate(), |
| | | }) |
| | | // ç¶æ |
| | | const drawerVisible = ref(false) |
| | |
| | | // å页ç¸å
³ |
| | | const currentPage = ref(1) |
| | | const pageSize = ref(10) |
| | | const total = ref(0) |
| | | // ç¯ä¿¡ç å¾çURL |
| | | const codeImageUrl = ref('') |
| | | |
| | |
| | | redCount: 20, |
| | | redPercentage: 10.5, |
| | | }) |
| | | |
| | | // åºéºåç§°å表 |
| | | const shopNames = [ |
| | | 'ä»å°å§å¨æé½', |
| | | 'åå»èç', |
| | | 'å®¶å¨å¡å¦', |
| | | 'ç¼æ¥äº', |
| | | 'ä¹å¯æææ¸¸åº', |
| | | '馨è¿ç¾é£å°éï¼åå°¼ç¾é£å¹¿åºï¼', |
| | | 'æ£çº¦ç¿°', |
| | | 'å¼å åªé', |
| | | 'æ¨è®°é½é½åå°ç¤è', |
| | | '䏿µ·ç¨ä¼ é¤é¥®ç®¡çæéå
¬å¸ï¼äººçä¸ä¸²ï¼', |
| | | 'ç¼å®¶', |
| | | 'æ³çé¤é¥®ï¼ä¸æµ·ï¼æéå
¬å¸ï¼é£å
¶å®¶ï¼', |
| | | '丰èç¤ä¸²', |
| | | '䏿µ·æ³°ç
é¤é¥®ç®¡çæéå
¬å¸ï¼æ³°ç
鸡ï¼', |
| | | '徿±åºè¾°çé¤é¦(å°éå串ç§å±
é
å±)', |
| | | ] |
| | | |
| | | // 徿±åºè¡éå表 |
| | | const xuhuiTowns = [ |
| | | '天平路è¡é', |
| | | 'æ¹åè·¯è¡é', |
| | | 'æåè·¯è¡é', |
| | | 'æ«æè·¯è¡é', |
| | | 'é¿æ¡¥è¡é', |
| | | 'ç°æè¡é', |
| | | 'è¹æ¢
è·¯è¡é', |
| | | 'åº·å¥æ°æè¡é', |
| | | 'å¾å®¶æ±è¡é', |
| | | 'åäºè·¯è¡é', |
| | | 'é¾åè¡é', |
| | | 'æ¼æ²³æ³¾è¡é', |
| | | 'åæ³¾é', |
| | | ] |
| | | |
| | | function onSearch() { |
| | | const f = formSearch.value |
| | |
| | | |
| | | userApi.fetchUser(currentPage.value, pageSize.value, area).then((res) => { |
| | | if (res) { |
| | | res.data |
| | | res.head.totalCount |
| | | |
| | | total.value = res.head.totalCount |
| | | shopList.value = res.data.map((item, index) => { |
| | | const { score, code } = generateRandomScore() |
| | | return { |
| | |
| | | }) |
| | | } |
| | | |
| | | // çæ2023å¹´8æå
çéæºæ¶é´ |
| | | // çæ2025å¹´8æå
çéæºæ¶é´ |
| | | function generateRandomDate() { |
| | | const year = 2023 |
| | | const year = 2025 |
| | | const month = 7 // 0-11ï¼8ææ¯7 |
| | | const day = Math.floor(Math.random() * 31) + 1 // 1-31 |
| | | const hour = Math.floor(Math.random() * 24) // 0-23 |
| | |
| | | |
| | | const date = new Date(year, month, day, hour, minute) |
| | | return date.toISOString().slice(0, 16).replace('T', ' ') |
| | | } |
| | | |
| | | // éæºéæ©æ°ç»å
ç´ |
| | | function getRandomElement(array) { |
| | | return array[Math.floor(Math.random() * array.length)] |
| | | } |
| | | |
| | | // çæéæºè¯åå对åºç¯ä¿¡ç ç级 |
| | |
| | | } |
| | | |
| | | // åºéºæ°æ® |
| | | const shopList = ref([ |
| | | { |
| | | id: 1, |
| | | shopName: getRandomElement(shopNames), |
| | | district: '徿±åº', |
| | | town: getRandomElement(xuhuiTowns), |
| | | code: 'green', |
| | | score: 90, |
| | | trend: generateRandomTrend(), |
| | | lastUpdate: generateRandomDate(), |
| | | warnings: [ |
| | | { |
| | | time: generateRandomDate(), |
| | | content: 'ååå¨è¿è¡æ¶é¿ä¸è¶³', |
| | | score: 90, |
| | | handled: true, |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | id: 2, |
| | | shopName: getRandomElement(shopNames), |
| | | district: '徿±åº', |
| | | town: getRandomElement(xuhuiTowns), |
| | | code: 'yellow', |
| | | score: 75, |
| | | trend: generateRandomTrend(), |
| | | lastUpdate: generateRandomDate(), |
| | | warnings: [ |
| | | { |
| | | time: generateRandomDate(), |
| | | content: 'æè¯æ¬¡æ°è¾å¤', |
| | | score: 80, |
| | | handled: false, |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | id: 3, |
| | | shopName: getRandomElement(shopNames), |
| | | district: '徿±åº', |
| | | town: getRandomElement(xuhuiTowns), |
| | | code: 'red', |
| | | score: 60, |
| | | trend: generateRandomTrend(), |
| | | lastUpdate: generateRandomDate(), |
| | | warnings: [ |
| | | { |
| | | time: generateRandomDate(), |
| | | content: 'ææ¾æµåº¦è¶
æ ', |
| | | score: 65, |
| | | handled: false, |
| | | }, |
| | | { |
| | | time: generateRandomDate(), |
| | | content: 'æ¸
æ´é¢æ¬¡ä¸è¶³', |
| | | score: 62, |
| | | handled: false, |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | id: 4, |
| | | shopName: getRandomElement(shopNames), |
| | | district: '徿±åº', |
| | | town: getRandomElement(xuhuiTowns), |
| | | code: 'green', |
| | | score: 92, |
| | | trend: generateRandomTrend(), |
| | | lastUpdate: generateRandomDate(), |
| | | warnings: [], |
| | | }, |
| | | { |
| | | id: 5, |
| | | shopName: getRandomElement(shopNames), |
| | | district: '徿±åº', |
| | | town: getRandomElement(xuhuiTowns), |
| | | code: 'yellow', |
| | | score: 78, |
| | | trend: generateRandomTrend(), |
| | | lastUpdate: generateRandomDate(), |
| | | warnings: [ |
| | | { |
| | | time: generateRandomDate(), |
| | | content: '飿ºèå¨çä½', |
| | | score: 75, |
| | | handled: true, |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | id: 6, |
| | | shopName: getRandomElement(shopNames), |
| | | district: '徿±åº', |
| | | town: getRandomElement(xuhuiTowns), |
| | | code: 'green', |
| | | score: 90, |
| | | trend: generateRandomTrend(), |
| | | lastUpdate: generateRandomDate(), |
| | | warnings: [], |
| | | }, |
| | | { |
| | | id: 7, |
| | | shopName: getRandomElement(shopNames), |
| | | district: '徿±åº', |
| | | town: getRandomElement(xuhuiTowns), |
| | | code: 'red', |
| | | score: 55, |
| | | trend: generateRandomTrend(), |
| | | lastUpdate: generateRandomDate(), |
| | | warnings: [ |
| | | { |
| | | time: generateRandomDate(), |
| | | content: 'æªå®è£
æ²¹çåå设å¤', |
| | | score: 60, |
| | | handled: false, |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | id: 8, |
| | | shopName: getRandomElement(shopNames), |
| | | district: '徿±åº', |
| | | town: getRandomElement(xuhuiTowns), |
| | | code: 'yellow', |
| | | score: 72, |
| | | trend: generateRandomTrend(), |
| | | lastUpdate: generateRandomDate(), |
| | | warnings: [ |
| | | { |
| | | time: generateRandomDate(), |
| | | content: 'åå卿¸
æ´ä¸åæ¶', |
| | | score: 75, |
| | | handled: true, |
| | | }, |
| | | ], |
| | | }, |
| | | { |
| | | id: 9, |
| | | shopName: getRandomElement(shopNames), |
| | | district: '徿±åº', |
| | | town: getRandomElement(xuhuiTowns), |
| | | code: 'green', |
| | | score: 93, |
| | | trend: generateRandomTrend(), |
| | | lastUpdate: generateRandomDate(), |
| | | warnings: [], |
| | | }, |
| | | { |
| | | id: 10, |
| | | shopName: getRandomElement(shopNames), |
| | | district: '徿±åº', |
| | | town: getRandomElement(xuhuiTowns), |
| | | code: 'yellow', |
| | | score: 76, |
| | | trend: generateRandomTrend(), |
| | | lastUpdate: generateRandomDate(), |
| | | warnings: [ |
| | | { |
| | | time: generateRandomDate(), |
| | | content: 'ææ¾æµåº¦æ¥è¿æ åéå¼', |
| | | score: 78, |
| | | handled: true, |
| | | }, |
| | | ], |
| | | }, |
| | | ]) |
| | | const shopList = ref([]) |
| | | |
| | | // è¿æ»¤åçåºéºå表 |
| | | const filteredShopList = computed(() => { |
| | |
| | | return shopList.value |
| | | } |
| | | return shopList.value.filter((shop) => shop.code === filterCode.value) |
| | | }) |
| | | |
| | | // å页åçåºéºå表 |
| | | const pagedShopList = computed(() => { |
| | | const start = (currentPage.value - 1) * pageSize.value |
| | | const end = start + pageSize.value |
| | | return filteredShopList.value.slice(start, end) |
| | | }) |
| | | |
| | | // çå½å¨æ |
| | |
| | | function handleSizeChange(size) { |
| | | pageSize.value = size |
| | | currentPage.value = 1 |
| | | onSearch() |
| | | } |
| | | |
| | | function handleCurrentChange(current) { |
| | | currentPage.value = current |
| | | onSearch() |
| | | } |
| | | |
| | | function getCodeType(code) { |
| | |
| | | |
| | | .card-content { |
| | | text-align: center; |
| | | padding: 20px 0; |
| | | padding: 0px 0; |
| | | } |
| | | |
| | | .card-title { |
| | |
| | | import { ElMessage } from 'element-plus' |
| | | |
| | | // æ¶é´èå´å¿«æ·é项 |
| | | const dayStart = dayjs('2023-08-01').startOf('date') |
| | | const dayStart = dayjs('2025-08-01').startOf('date') |
| | | const dayEnd = dayStart.endOf('date') |
| | | const shortcuts = [ |
| | | { |
| | |
| | | ] |
| | | const complaintReasons = ['æ²¹çæ°æ°', 'å¤é´åªå£°', 'å¼å³æ±¡æ', 'å«çé®é¢'] |
| | | const sources = ['12345ç线', 'å±
æ°æè¯', 'ç½ç»å¹³å°', 'å
¶ä»'] |
| | | const departments = ['徿±åºç¯ä¿å±', 'é¿å®åºç¯ä¿å±', 'éå®åºç¯ä¿å±', 'æ®éåºç¯ä¿å±'] |
| | | const departments = ['徿±åºçæç¯å¢å±', 'é¿å®åºçæç¯å¢å±', 'éå®åºçæç¯å¢å±', 'æ®éåºçæç¯å¢å±'] |
| | | // const results = ['å·²å¤ç', 'å¤çä¸', 'æªå¤ç'] |
| | | const results = ['å·²å¤ç'] |
| | | |
| | |
| | | import { ElMessage } from 'element-plus' |
| | | |
| | | // æ»è§ç°åºå·¡æ¥æ°æ® |
| | | const dayStart = dayjs('2023-08-01').startOf('date') |
| | | const dayStart = dayjs('2025-08-01').startOf('date') |
| | | const dayEnd = dayStart.endOf('date') |
| | | const shortcuts = [ |
| | | { |
| | |
| | | import { ElMessage } from 'element-plus' |
| | | |
| | | // æ¶é´èå´å¿«æ·é项 |
| | | const dayStart = dayjs('2023-08-01').startOf('date') |
| | | const dayStart = dayjs('2025-08-01').startOf('date') |
| | | const dayEnd = dayStart.endOf('date') |
| | | const shortcuts = [ |
| | | { |
| | |
| | | 'ç«é
åº', |
| | | ] |
| | | const punishmentItems = ['æ²¹çè¶
æ ææ¾', 'æªå®è£
æ²¹çåå设å¤', 'è®¾å¤æªæ£å¸¸è¿è¡', 'åªå£°æ±¡æ'] |
| | | const departments = ['徿±åºç¯ä¿å±', 'é¿å®åºç¯ä¿å±', 'éå®åºç¯ä¿å±', 'æ®éåºç¯ä¿å±'] |
| | | const departments = ['徿±åºçæç¯å¢å±', 'é¿å®åºçæç¯å¢å±', 'éå®åºçæç¯å¢å±', 'æ®éåºçæç¯å¢å±'] |
| | | |
| | | for (let i = 0; i < totalCount; i++) { |
| | | // çæå¨æ¶é´èå´å
çéæºæ¶é´ |
| | |
| | | <!-- 设å¤ç±»å --> |
| | | <el-row> |
| | | <el-col> |
| | | <el-tabs |
| | | class="child_select" |
| | | placeholder="设å¤ç±»å" |
| | | v-model="currSelect.topDeviceTypeId" |
| | | > |
| | | <el-tab-pane |
| | | v-for="item in deviceTopTypes" |
| | | :key="item.id" |
| | | :name="item.id" |
| | | > |
| | | <el-tabs class="child_select" placeholder="设å¤ç±»å" v-model="currSelect.topDeviceTypeId"> |
| | | <el-tab-pane v-for="item in deviceTopTypes" :key="item.id" :name="item.id"> |
| | | <template #label> |
| | | <el-badge |
| | | :value="item.count" |
| | | :type="item.count == 0 ? 'danger' : 'primary'" |
| | | > |
| | | <el-badge :value="item.count" :type="item.count == 0 ? 'danger' : 'primary'"> |
| | | <span class="custom-tabs-label"> |
| | | <span>{{ item.label }}</span> |
| | | </span> |
| | |
| | | class="collapse-item-class" |
| | | > |
| | | <template #title> |
| | | <div |
| | | style="display: flex; width: 100%; justify-content: space-between" |
| | | > |
| | | <div style="display: flex; width: 100%; justify-content: space-between"> |
| | | <div style=""> |
| | | <el-descriptions style="" :column="3" size="small" border> |
| | | <el-descriptions style="" :column="4" size="small" border> |
| | | <el-descriptions-item |
| | | width="64px" |
| | | :label=" |
| | | currSelect.topDeviceTypeId == 0 ? 'ç«ç¹åç§°' : '设å¤åç§°' |
| | | " |
| | | :span="3" |
| | | :label="currSelect.topDeviceTypeId == 0 ? 'ç«ç¹åç§°' : '设å¤åç§°'" |
| | | >{{ item.name || 'æ ' }}</el-descriptions-item |
| | | > |
| | | <el-descriptions-item label="åçåå·">{{ |
| | | item.brandModel || 'æ ' |
| | | }}</el-descriptions-item> |
| | | <el-descriptions-item label="ä¾åºå">{{ |
| | | item.supplier || 'æ ' |
| | | }}</el-descriptions-item> |
| | | <el-descriptions-item :rowspan="3"> |
| | | <div style="display: flex"> |
| | | <div class="image-container"> |
| | | <div |
| | | class="block-div" |
| | | @click="onClickPic($event)" |
| | | v-for="(status, index) in item._statusList" |
| | | :key="index" |
| | | > |
| | | <el-image |
| | | v-if="index == 0" |
| | | fit="cover" |
| | | class="pic-style" |
| | | :src="status._picUrl" |
| | | :preview-src-list="Array.of(status._picUrl)" |
| | | /> |
| | | <span class="abstract_pic_text" v-if="index == 0">{{ |
| | | `ææ°ç¶æ ${status.dlCreateTime.slice(0, 10)}` |
| | | }}</span> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </el-descriptions-item> |
| | | <el-descriptions-item label="è¿ç»´å">{{ |
| | | item.maintainer || 'æ ' |
| | | }}</el-descriptions-item> |
| | |
| | | <el-descriptions-item label="è¿ç»´èç³»æ¹å¼">{{ |
| | | item.maintainTel || 'æ ' |
| | | }}</el-descriptions-item> |
| | | <el-descriptions-item label="åçåå·">{{ |
| | | item.brandModel || 'æ ' |
| | | }}</el-descriptions-item> |
| | | <el-descriptions-item label="è¿è¡ç¶æ"> |
| | | <el-select |
| | | v-model="item.runningStatus" |
| | |
| | | <el-descriptions-item label="ç±»å"> |
| | | {{ item._typename || 'æ ' }} |
| | | </el-descriptions-item> |
| | | |
| | | </el-descriptions> |
| | | </div> |
| | | |
| | | <div style="display: flex"> |
| | | <!-- <div class="sub-title">{{ item.name }}</div> --> |
| | | <!-- å¾ç --> |
| | | <!-- <div style="display: flex"> |
| | | <div class="image-container"> |
| | | <div |
| | | class="block-div" |
| | |
| | | }}</span> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> --> |
| | | </div> |
| | | </template> |
| | | <!-- 详ç»å
容å¼å§ --> |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import deviceApi from '@/api/fysp/deviceApi'; |
| | | import { $fysp } from '@/api/index'; |
| | | import { toLabel } from '@/enum/device/device'; |
| | | import deviceApi from '@/api/fysp/deviceApi' |
| | | import { $fysp } from '@/api/index' |
| | | import { toLabel } from '@/enum/device/device' |
| | | export default { |
| | | components: { }, |
| | | components: {}, |
| | | watch: { |
| | | // éæ©æ¹åçå¬ |
| | | currSelect: { |
| | | handler(newObj, oldObj) { |
| | | this.getList(); |
| | | this.getList() |
| | | }, |
| | | deep: true |
| | | } |
| | | deep: true, |
| | | }, |
| | | }, |
| | | data() { |
| | | return { |
| | |
| | | // 表å详æ
ç¹å»æé®ç徿 |
| | | isDetail: false, |
| | | currSelect: { |
| | | topDeviceTypeId: 0 |
| | | topDeviceTypeId: 0, |
| | | }, |
| | | // æ§å¶è¡¨åæ¯å¦å¯ä»¥ç¼è¾ |
| | | isDisabled: true, |
| | |
| | | deviceTopTypes: [ |
| | | { id: 0, label: 'çæ§è®¾å¤' }, |
| | | { id: 1, label: 'æ²»ç设å¤' }, |
| | | { id: 2, label: 'ç产设å¤' } |
| | | { id: 2, label: 'ç产设å¤' }, |
| | | ], |
| | | // è¿è¡ç¶æ |
| | | runStatusArray: [ |
| | | { key: 0, value: 'æªèç½' }, |
| | | { key: 1, value: 'ä¸çº¿ä¸' }, |
| | | { key: 2, value: 'ä¸çº¿' }, |
| | | { key: 3, value: 'æé¤' } |
| | | { key: 3, value: 'æé¤' }, |
| | | ], |
| | | // ç»´æ¤é¢çç¶æ |
| | | maintainFrequencysArray: [ |
| | | { key: 1, value: 'æ¯æä¸æ¬¡' }, |
| | | { key: 2, value: 'æ¯å£åº¦ä¸æ¬¡' }, |
| | | { key: 3, value: 'æ¯å年䏿¬¡' }, |
| | | { key: 4, value: 'æ¯å¹´ä¸æ¬¡' } |
| | | { key: 4, value: 'æ¯å¹´ä¸æ¬¡' }, |
| | | ], |
| | | // ç§èµæ¹å¼ |
| | | ownershipArray: [ |
| | | { key: 0, value: 'è´ä¹°' }, |
| | | { key: 1, value: 'ç§èµ' } |
| | | { key: 1, value: 'ç§èµ' }, |
| | | ], |
| | | scene: {} |
| | | }; |
| | | scene: {}, |
| | | } |
| | | }, |
| | | props: {}, |
| | | |
| | |
| | | getTabsCount() { |
| | | this.deviceTopTypes.forEach((item) => { |
| | | deviceApi.fetchDevices(this.scene.guid, item.id).then((result) => { |
| | | item.count = result.data.length; |
| | | }); |
| | | }); |
| | | item.count = result.data.length |
| | | }) |
| | | }) |
| | | }, |
| | | // è·åè¿è¡ç¶æå¯¹åºçvalue |
| | | getRunStatusValueByRunStatusKey(status) { |
| | | var runningStatusValueArray = this.runStatusArray.filter((runStatus) => { |
| | | return runStatus.key == status; |
| | | }); |
| | | return runStatus.key == status |
| | | }) |
| | | if (runningStatusValueArray.length > 0) { |
| | | return runningStatusValueArray[0].value; |
| | | return runningStatusValueArray[0].value |
| | | } |
| | | }, |
| | | // å±ç¤ºè¡¨åç详æ
çç¹å»äºä»¶ |
| | | showDetail(item) { |
| | | item._isDetail = !item._isDetail; |
| | | item._isDetail = !item._isDetail |
| | | }, |
| | | init(scene) { |
| | | // ç¶ç»ä»¶ä¸»å¨è°ç¨åå§ååç»ä»¶çæ¹æ³ |
| | | this.scene = scene; |
| | | this.scene = scene |
| | | |
| | | this.getList(); |
| | | this.getTabsCount(); |
| | | this.getList() |
| | | this.getTabsCount() |
| | | }, |
| | | // éç½®å±ç¤ºçæ°æ® |
| | | initList() { |
| | | this.formInfo = []; |
| | | this.isEmpty = false; |
| | | this.formInfo = [] |
| | | this.isEmpty = false |
| | | }, |
| | | // æ åå屿§å |
| | | convertKeys(obj) { |
| | | // å°ä¸ä¸ªjså¯¹è±¡ä¸æædiï¼wiï¼piå¼å¤´ç屿§å
¨é¨æ¹æå»æè¿äºåç¼å¹¶ä¸éæ°å为驼峰å¼å½å |
| | | const newObj = {}; |
| | | const newObj = {} |
| | | for (const key in obj) { |
| | | let newKey = key; |
| | | let newKey = key |
| | | if (key.startsWith('di')) { |
| | | newKey = key.substring(2); |
| | | newKey = key.substring(2) |
| | | } else if (key.startsWith('wi')) { |
| | | newKey = key.substring(2); |
| | | newKey = key.substring(2) |
| | | } else if (key.startsWith('pi')) { |
| | | newKey = key.substring(2); |
| | | newKey = key.substring(2) |
| | | } |
| | | newKey = newKey.charAt(0).toLowerCase() + newKey.slice(1); |
| | | newObj[newKey] = obj[key]; |
| | | newKey = newKey.charAt(0).toLowerCase() + newKey.slice(1) |
| | | newObj[newKey] = obj[key] |
| | | } |
| | | return newObj; |
| | | return newObj |
| | | }, |
| | | // æ°å¢å段 |
| | | initFormData(data) { |
| | | data._isDetail = false; |
| | | data._isDetail = false |
| | | }, |
| | | getList() { |
| | | deviceApi |
| | | .fetchDevices(this.scene.guid, this.currSelect.topDeviceTypeId) |
| | | .then((result) => { |
| | | this.initList(); |
| | | if (result.data == null || result.data.length <= 0) { |
| | | this.isEmpty = true; |
| | | return; |
| | | deviceApi.fetchDevices(this.scene.guid, this.currSelect.topDeviceTypeId).then((result) => { |
| | | this.initList() |
| | | if (result.data == null || result.data.length <= 0) { |
| | | this.isEmpty = true |
| | | return |
| | | } |
| | | // æ åå屿§å |
| | | for (let index = 0; index < result.data.length; index++) { |
| | | var element = this.convertKeys(result.data[index]) |
| | | this.initFormData(element) |
| | | // è·å设å¤ç¶æä¿¡æ¯ |
| | | let data = { |
| | | deviceId: element.id, |
| | | sceneId: element.sceneGuid, |
| | | deviceTypeId: this.currSelect.topDeviceTypeId, |
| | | } |
| | | // æ åå屿§å |
| | | for (let index = 0; index < result.data.length; index++) { |
| | | var element = this.convertKeys(result.data[index]); |
| | | this.initFormData(element); |
| | | // è·å设å¤ç¶æä¿¡æ¯ |
| | | let data = { |
| | | deviceId: element.id, |
| | | sceneId: element.sceneGuid, |
| | | deviceTypeId: this.currSelect.topDeviceTypeId |
| | | }; |
| | | deviceApi.fetchDeviceStatus(data).then((status) => { |
| | | var statusData = status.data; |
| | | var imgPaths = []; |
| | | if (statusData) { |
| | | if (statusData.length == 0) { |
| | | this.formInfo.push(element); |
| | | return; |
| | | } |
| | | element = this.convertKeys(result.data[index]); |
| | | element = this.setDeviceType(element); |
| | | element._picUrls = imgPaths; |
| | | for (let index = 0; index < statusData.length; index++) { |
| | | const statusItem = statusData[index]; |
| | | // 设å¤å¯¹è±¡æ·»å ä¸ä¸ªå±æ§åè¡¨å±æ§ç¨æ¥ä¿å设å¤ç¶æ |
| | | this.saveStatus(element, statusItem); |
| | | element.dlLocation = statusItem.dlLocation; |
| | | this.formInfo.push(element); |
| | | } |
| | | deviceApi.fetchDeviceStatus(data).then((status) => { |
| | | var statusData = status.data |
| | | var imgPaths = [] |
| | | if (statusData) { |
| | | if (statusData.length == 0) { |
| | | this.formInfo.push(element) |
| | | return |
| | | } |
| | | }); |
| | | } |
| | | }); |
| | | element = this.convertKeys(result.data[index]) |
| | | element = this.setDeviceType(element) |
| | | element._picUrls = imgPaths |
| | | for (let index = 0; index < statusData.length; index++) { |
| | | const statusItem = statusData[index] |
| | | // 设å¤å¯¹è±¡æ·»å ä¸ä¸ªå±æ§åè¡¨å±æ§ç¨æ¥ä¿å设å¤ç¶æ |
| | | this.saveStatus(element, statusItem) |
| | | element.dlLocation = statusItem.dlLocation |
| | | this.formInfo.push(element) |
| | | } |
| | | } |
| | | }) |
| | | } |
| | | }) |
| | | }, |
| | | setDeviceType(element) { |
| | | var type = []; |
| | | var type = [] |
| | | type = toLabel(element.sceneTypeId, this.currSelect.topDeviceTypeId, [ |
| | | element.typeId, |
| | | element.subtypeId |
| | | ]); |
| | | element._typename = type.join('-'); |
| | | return element; |
| | | element.subtypeId, |
| | | ]) |
| | | element._typename = type.join('-') |
| | | return element |
| | | }, |
| | | // ä¿åç¶æä¿¡æ¯ |
| | | saveStatus(device, status) { |
| | | var _picUrl = $fysp.imgUrl + status.dlPicUrl; |
| | | status._picUrl = _picUrl; |
| | | status._paths = _picUrl.split(';'); |
| | | device._picUrls.push(_picUrl); |
| | | var _picUrl = $fysp.imgUrl + status.dlPicUrl |
| | | status._picUrl = _picUrl |
| | | status._paths = _picUrl.split(';') |
| | | device._picUrls.push(_picUrl) |
| | | if ('_statusList' in device) { |
| | | device._statusList.push(status); |
| | | device._statusList.push(status) |
| | | } else { |
| | | device._statusList = Array.of(status); |
| | | device._statusList = Array.of(status) |
| | | } |
| | | // æåº |
| | | device._statusList.sort(function (x, y) { |
| | | return new Date(x.dlCreateTime) - new Date(y.dlCreateTime); // éåºï¼ååºååä¹ |
| | | }); |
| | | return new Date(x.dlCreateTime) - new Date(y.dlCreateTime) // éåºï¼ååºååä¹ |
| | | }) |
| | | }, |
| | | submit() {}, |
| | | cancel() {}, |
| | | modifyObjectKeys(obj) { |
| | | const newObj = {}; |
| | | const newObj = {} |
| | | for (const key in obj) { |
| | | // è·³è¿ä»¥ 'dl' æ '_' å¼å¤´ç屿§ |
| | | if (key.startsWith('dl') || key.startsWith('_')) { |
| | | newObj[key] = obj[key]; |
| | | continue; |
| | | newObj[key] = obj[key] |
| | | continue |
| | | } |
| | | // æ ¹æ® topDeviceTypeId æ·»å åç¼ |
| | | let prefix = ''; |
| | | let prefix = '' |
| | | switch (this.currSelect.topDeviceTypeId) { |
| | | case 0: |
| | | prefix = 'di'; |
| | | break; |
| | | prefix = 'di' |
| | | break |
| | | case 1: |
| | | prefix = 'pi'; |
| | | break; |
| | | prefix = 'pi' |
| | | break |
| | | case 2: |
| | | prefix = 'wi'; |
| | | break; |
| | | prefix = 'wi' |
| | | break |
| | | default: |
| | | // 妿 topDeviceTypeId 䏿¯ 0, 1, æ 2ï¼ä¸æ·»å åç¼ |
| | | newObj[key] = obj[key]; |
| | | continue; |
| | | newObj[key] = obj[key] |
| | | continue |
| | | } |
| | | |
| | | // æ·»å åç¼å¹¶è½¬æ¢ä¸ºé©¼å³°å¼å½å |
| | | const newKey = `${prefix}${key.charAt(0).toUpperCase() + key.slice(1)}`; |
| | | newObj[newKey] = obj[key]; |
| | | const newKey = `${prefix}${key.charAt(0).toUpperCase() + key.slice(1)}` |
| | | newObj[newKey] = obj[key] |
| | | } |
| | | return newObj; |
| | | return newObj |
| | | }, |
| | | // çææ¥å£åæ° |
| | | generateQuery(obj) { |
| | | // éè¦æ ¹æ®åºæ¯ç±»åç¡®å®æ¥å£åæ°ç屿§å |
| | | var query = this.modifyObjectKeys(obj); |
| | | return query; |
| | | var query = this.modifyObjectKeys(obj) |
| | | return query |
| | | }, |
| | | onClickPic(e, item) { |
| | | e.stopPropagation(); |
| | | } |
| | | } |
| | | }; |
| | | e.stopPropagation() |
| | | }, |
| | | }, |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | |
| | | |
| | | data.push({ |
| | | index: i, |
| | | name: `${searchForm.value.district === 'xuhui' ? '徿±åº' : 'å
¶ä»åº'}${baseName}ï¼${area}ï¼-2023å¹´${month}æ`, |
| | | name: `${searchForm.value.district === 'xuhui' ? '徿±åº' : 'å
¶ä»åº'}${baseName}ï¼${area}ï¼-2025å¹´${month}æ`, |
| | | district: searchForm.value.district === 'xuhui' ? '徿±åº' : 'å
¶ä»åº', |
| | | reportMonth: `2023å¹´${month}æ`, |
| | | reportMonth: `2025å¹´${month}æ`, |
| | | generateTime: new Date().toLocaleString('zh-CN'), |
| | | auditStatus: Math.random() > 0.5 ? 'å·²å®¡æ ¸' : 'æªå®¡æ ¸', |
| | | }) |
| | |
| | | // æ¥çæ¥å |
| | | const viewReport = (row) => { |
| | | // ä½¿ç¨æ¨¡æçæ¥åæä»¶ |
| | | reportUrl.value = '/徿±åºé¤é¥®çç®¡ç®æ¥ï¼å¤©é¥æ¡¥ï¼-2023å¹´8æ(1).docx' |
| | | reportUrl.value = '/徿±åºé¤é¥®çç®¡ç®æ¥ï¼å¤©é¥æ¡¥ï¼-2025å¹´8æ(1).docx' |
| | | drawerVisible.value = true |
| | | |
| | | prepareDocxBlob(reportUrl.value).then((blob) => { |
| | |
| | | }) |
| | | this.tasks = list.filter((e) => { |
| | | return ( |
| | | e.data.districtname == '徿±åº' && dayjs(e.data.starttime).isBefore(dayjs('2023-12-31')) |
| | | e.data.districtname == '徿±åº' && dayjs(e.data.starttime).isBefore(dayjs('2025-12-31')) |
| | | ) |
| | | }) |
| | | if (list.length == 0) { |
| | |
| | | loading: false, |
| | | chartData: [], //ä¿åæ¥è¯¢çç»æ |
| | | //devId:'', //设å¤ç¼å· |
| | | begin: '2023-05-01', //å¼å§æ¶é´ |
| | | end: '2023-05-15', //ç»ææ¶é´ |
| | | begin: '2025-05-01', //å¼å§æ¶é´ |
| | | end: '2025-05-15', //ç»ææ¶é´ |
| | | value: ['ä»å°å§å¨æé½', 'qinshi_31010320210010'], //ä¿åéæ©çåºéºåç§°å设å¤åç§° |
| | | options: [ |
| | | { |
| | |
| | | loading: false, |
| | | chartData: [], //ä¿åæ¥è¯¢çç»æ |
| | | devId: '', //设å¤ç¼å· |
| | | begin: '2023-05-01', //å¼å§æ¶é´ |
| | | end: '2023-05-15', //ç»ææ¶é´ |
| | | begin: '2025-05-01', //å¼å§æ¶é´ |
| | | end: '2025-05-15', //ç»ææ¶é´ |
| | | value: ['ä»å°å§å¨æé½', 'qinshi_31010320210010'], //ä¿åéæ©çåºéºåç§°å设å¤åç§° |
| | | options: [ |
| | | { |
| | |
| | | loading: false, |
| | | chartData: [], //ä¿åæ¥è¯¢çç»æ |
| | | //devId:'', //设å¤ç¼å· |
| | | begin: '2023-05-01', //å¼å§æ¶é´ |
| | | end: '2023-05-15', //ç»ææ¶é´ |
| | | begin: '2025-05-01', //å¼å§æ¶é´ |
| | | end: '2025-05-15', //ç»ææ¶é´ |
| | | value: ['ä»å°å§å¨æé½', 'qinshi_31010320210010'], //ä¿åéæ©çåºéºåç§°å设å¤åç§° |
| | | options: [ |
| | | { |
| | |
| | | loading: false, |
| | | chartData: [], //ä¿åæ¥è¯¢çç»æ |
| | | devId: '', //设å¤ç¼å· |
| | | begin: '2023-05-01', //å¼å§æ¶é´ |
| | | end: '2023-05-15', //ç»ææ¶é´ |
| | | begin: '2025-05-01', //å¼å§æ¶é´ |
| | | end: '2025-05-15', //ç»ææ¶é´ |
| | | value: ['ä»å°å§å¨æé½', 'qinshi_31010320210010'], //ä¿åéæ©çåºéºåç§°å设å¤åç§° |
| | | options: [ |
| | | { |
| | |
| | | loading: false, |
| | | chartData: [], //ä¿åæ¥è¯¢çç»æ |
| | | //devId:'', //设å¤ç¼å· |
| | | begin: '2023-05-01', //å¼å§æ¶é´ |
| | | end: '2023-05-15', //ç»ææ¶é´ |
| | | begin: '2025-05-01', //å¼å§æ¶é´ |
| | | end: '2025-05-15', //ç»ææ¶é´ |
| | | value: ['ä»å°å§å¨æé½', 'qinshi_31010320210010'], //ä¿åéæ©çåºéºåç§°å设å¤åç§° |
| | | options: [ |
| | | { |
| | |
| | | return { |
| | | activeTime: 'day', |
| | | activeMode: 'pollution', // é»è®¤æ±¡ææå¿æ¨¡å¼ |
| | | currentDate: new Date('2023-08-01'), |
| | | currentDate: new Date('2025-08-01'), |
| | | timeTabs: [ |
| | | { label: 'æ¥', value: 'day' }, |
| | | { label: 'å¨', value: 'week' }, |
| | |
| | | devices: [], |
| | | |
| | | // ååºæ°æ®æå |
| | | selectedMonth: '2023-12', |
| | | selectedMonth: '2025-12', |
| | | rankingType: 'hourly', |
| | | rankingData: [], |
| | | sortedRankingData: [], |
| | |
| | | return summary |
| | | }, |
| | | // åè½ï¼å¯¹è¯æ¡è¡¨æ ¼åºå·éå¢ |
| | | // æ¶é´ï¼2023-8-17 |
| | | // æ¶é´ï¼2025-8-17 |
| | | indexMethod(index) { |
| | | return index + 1 |
| | | }, |
| | |
| | | }, |
| | | methods: { |
| | | // åè½ï¼å¯¹è¯æ¡è¡¨æ ¼åºå·éå¢ |
| | | // æ¶é´ï¼2023-8-17 |
| | | // æ¶é´ï¼2025-8-17 |
| | | indexMethod(index) { |
| | | return index + 1 |
| | | }, |