.env | 补丁 | 查看 | 原始文档 | blame | 历史 | |
.env.development | 补丁 | 查看 | 原始文档 | blame | 历史 | |
.env.production | 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/api/index.js | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/components/search-option/FYSearchBar.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/constants/menu.js | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/router/index.js | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/views/fysp/config/DeviceMatch.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
.env
.env.development
.env.production
src/api/index.js
@@ -13,7 +13,7 @@ if (debug) { ip1 = 'http://192.168.0.138:8082/'; // ip1_file = 'http://47.100.191.150:9005/'; // ip2 = 'http://192.168.0.138:8080/'; ip2 = 'http://192.168.0.138:8080/'; // ip2_file = 'https://fyami.com.cn/'; } @@ -38,17 +38,21 @@ i.interceptors.request.use( function (config) { // å¨åé请æ±ä¹ååäºä»ä¹ if (import.meta.env.DEV) { console.log('==>请æ±å¼å§'); console.log(`${config.baseURL}${config.url}`); if (config.data) { console.log('==>è¯·æ±æ°æ®', config.data); } } return config; }, function (error) { // 对请æ±é误åäºä»ä¹ if (import.meta.env.DEV) { console.log('==>请æ±å¼å§'); console.log(error); } ElMessage({ message: error, type: 'error' @@ -62,8 +66,10 @@ function (response) { // 2xx èå´å çç¶æç é½ä¼è§¦åè¯¥å½æ°ã // 对ååºæ°æ®åç¹ä»ä¹ if (import.meta.env.DEV) { console.log(response); console.log('==>请æ±ç»æ'); } if (response.status == 200) { if (response.data.success != undefined && response.data.success != null) { if (response.data.success == true) { @@ -85,8 +91,10 @@ function (error) { // è¶ åº 2xx èå´çç¶æç é½ä¼è§¦åè¯¥å½æ°ã // 对ååºé误åç¹ä»ä¹ if (import.meta.env.DEV) { console.log(error); console.log('==>请æ±ç»æ'); } ElMessage({ message: error, type: 'error' src/components/search-option/FYSearchBar.vue
@@ -2,7 +2,7 @@ <el-form :inline="true"> <slot name="options"></slot> <el-form-item> <el-button icon="Search" type="primary" @click="search">{{ btnText }}</el-button> <el-button icon="Search" type="primary" :loading="loading" @click="search">{{ btnText }}</el-button> <slot name="buttons"></slot> </el-form-item> </el-form> @@ -14,13 +14,14 @@ btnText: { type: String, default: 'æ¥è¯¢' } }, loading: Boolean }, emits: ['search'], methods: { search() { this.$emit('search') this.$emit('search'); } } } }; </script> src/constants/menu.js
@@ -54,6 +54,11 @@ icon: 'List', name: 'ç管é®é¢', }, { path: '/fysp/config/deviceMatch', icon: 'List', name: '设å¤å¹é ', }, ], }, { src/router/index.js
@@ -78,6 +78,12 @@ component: () => import('@/views/fysp/config/ProblemType.vue') }, { //设å¤å¹é name: 'fyspDeviceMatch', path: '/fysp/config/deviceMatch', component: () => import('@/views/fysp/config/DeviceMatch.vue') }, { //è¯ä¼°æ°æ®æº name: 'fyspEvalutationTask', path: '/fysp/evaluation/evalutationTask', src/views/fysp/config/DeviceMatch.vue
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,81 @@ <template> <FYTable @search="onSearch" :pagination="true" 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="month" v-model:value="formSearch.time"></FYOptionTime> </template> <template #buttons> </template> <template #options-expand> <el-form :inline="true"> <CompQuickSet @quick-set="setOptions"></CompQuickSet> </el-form> </template> <template #table-column> <el-table-column prop="sceneName" :show-overflow-tooltip="true" label="åç§°"> </el-table-column> </template> </FYTable> </template> <script setup> /** * çæµè®¾å¤ååºæ¯å¹é è®°å½ç®¡ç */ import dayjs from 'dayjs'; import { ref, reactive, computed, getCurrentInstance } from 'vue'; import userMapApi from '@/api/fysp/userMapApi'; import CompQuickSet from '@/views/fysp/evaluation/components/CompQuickSet.vue'; const { $fm } = getCurrentInstance().appContext.config.globalProperties; const tableRef = ref(); const formSearch = reactive({ locations: {}, scenetype: {}, time: dayjs().add(-1, 'M').date(1).toDate() }); const area = computed(() => { return { provincecode: formSearch.locations.pCode, provincename: formSearch.locations.pName, citycode: formSearch.locations.cCode, cityname: formSearch.locations.cName, districtcode: formSearch.locations.dCode, districtname: formSearch.locations.dName, towncode: formSearch.locations.tCode, townname: formSearch.locations.tName, starttime: $fm.formatYMDH(formSearch.time), scensetypeid: formSearch.scenetype.value, online: true, // æ¤å¤æ°æ®æ¥æºåºå®ä¸ºé£ç¾½çç®¡ç³»ç» sourceType: 2 }; }); function onSearch(page, func) { userMapApi.fetchDeviceMap(area.value).then((res) => { func({ data: res.data }); }); } function setOptions(param) { formSearch.locations = param.locations; formSearch.scenetype = param.scenetype; // formSearch.sourceType = param.sourceType; tableRef.value.onSearch(); } </script>