¶Ô±ÈÐÂÎļþ |
| | |
| | | import { $fysp } from '../index'; |
| | | |
| | | export default { |
| | | |
| | | /** |
| | | * è·åèªå¨è¯ä¼°åå²è®°å½ |
| | | */ |
| | | fetchAutoEvaluation(param){ |
| | | return $fysp.post(`evaluation/auto/record`, param).then((res) => res.data); |
| | | } |
| | | }; |
| | |
| | | let ip2_file = 'https://fyami.com.cn/'; |
| | | |
| | | if (debug) { |
| | | // ip1 = 'http://192.168.0.123:8082/'; |
| | | ip1 = 'http://192.168.0.138:8082/'; |
| | | // ip1_file = 'http://47.100.191.150:9005/'; |
| | | ip2 = 'http://192.168.0.138:8080/'; |
| | | // ip2_file = 'https://fyami.com.cn/'; |
| | |
| | | <!-- åºæ¯åºæ¬ä¿¡æ¯ç¼è¾ --> |
| | | <template> |
| | | <el-form |
| | | :inline="false" |
| | |
| | | } |
| | | if (nVal != oVal) { |
| | | if (nVal || nVal.length > 0) { |
| | | this.selectedOptions = this.optionFormatReverse(nVal); |
| | | this.selectedOptions = this.optionFormatReverse(nVal) |
| | | } |
| | | } |
| | | }, |
| | | deep: true, |
| | | }, |
| | | immediate: true |
| | | } |
| | | }, |
| | | methods: { |
| | | /** |
| | |
| | | } |
| | | }, |
| | | deep: true, |
| | | immediate: true |
| | | }, |
| | | }, |
| | | mounted() { |
| | |
| | | } |
| | | }, |
| | | deep: true, |
| | | immediate: true |
| | | }, |
| | | }, |
| | | mounted() { |
| | |
| | | if (nVal != oVal) { |
| | | this.selectedOptions = nVal |
| | | } |
| | | } |
| | | }, |
| | | immediate: true |
| | | } |
| | | }, |
| | | methods: { |
| | |
| | | } |
| | | }, |
| | | deep: true, |
| | | immediate: true |
| | | }, |
| | | }, |
| | | mounted() { |
| | |
| | | </template> |
| | | </FYSearchBar> |
| | | </el-row> |
| | | |
| | | <el-row ref="expandRef"> |
| | | <slot name="options-expand"></slot> |
| | | </el-row> |
| | | <el-table |
| | | :data="tableData" |
| | | v-loading="loading" |
| | |
| | | </el-table> |
| | | |
| | | <el-pagination |
| | | v-if="pagination" |
| | | ref="paginationRef" |
| | | class="el-pagination" |
| | | v-model:current-page="currentPage" |
| | |
| | | export default { |
| | | props: { |
| | | rowClassName: undefined, |
| | | pagination: { |
| | | type: Boolean, |
| | | default: true |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | |
| | | total: 0, |
| | | currentPage: 1, |
| | | pageSize: 20, |
| | | loading: false, |
| | | }; |
| | | loading: false |
| | | } |
| | | }, |
| | | emits: ['search'], |
| | | watch: { |
| | | currentPage(nValue, oValue) { |
| | | if (nValue != oValue) { |
| | | this.onSearch(); |
| | | this.onSearch() |
| | | } |
| | | }, |
| | | pageSize(nValue, oValue) { |
| | | if (nValue != oValue) { |
| | | this.onSearch(); |
| | | this.onSearch() |
| | | } |
| | | }, |
| | | } |
| | | }, |
| | | methods: { |
| | | /** |
| | |
| | | * åè°å½æ°æ¥æ¶ä¸ä¸ªå¯¹è±¡ï¼å
æ¬è¡¨æ ¼æ°æ®æ°ç»dataåæ°æ®æ»æ°total |
| | | */ |
| | | onSearch() { |
| | | this.loading = true; |
| | | this.loading = true |
| | | this.$emit( |
| | | 'search', |
| | | { |
| | | currentPage: this.currentPage, |
| | | pageSize: this.pageSize, |
| | | pageSize: this.pageSize |
| | | }, |
| | | (res) => { |
| | | this.tableData = res.data; |
| | | this.total = res.total; |
| | | this.loading = false; |
| | | this.tableData = res.data |
| | | this.total = res.total ? res.total : 0 |
| | | this.loading = false |
| | | } |
| | | ); |
| | | ) |
| | | }, |
| | | calcTableHeight() { |
| | | const h1 = this.$refs.searchRef.$el.offsetHeight; |
| | | const h2 = this.$refs.paginationRef.$el.offsetHeight; |
| | | const h1 = this.$refs.searchRef.$el.offsetHeight |
| | | const h2 = this.$refs.paginationRef ? this.$refs.paginationRef.$el.offsetHeight : 0 |
| | | const h3 = this.$refs.expandRef.$el.offsetHeight |
| | | const h = h1 + h2 + h3 |
| | | // return `calc(100vh - ${h1}px - ${h2}px - var(--el-main-padding) * 2 - var(--el-header-height))`; |
| | | return `calc(100vh - ${h1}px - ${h2}px - 60px - var(--el-main-padding) * 2)`; |
| | | return `calc(100vh - ${h}px - 60px - var(--el-main-padding) * 2)` |
| | | }, |
| | | tableRowClassName({ row }) { |
| | | if (this.rowClassName) { |
| | | if (typeof this.rowClassName == 'string') { |
| | | return this.rowClassName; |
| | | return this.rowClassName |
| | | } else if (typeof this.rowClassName == 'function') { |
| | | return this.rowClassName({ row }); |
| | | return this.rowClassName({ row }) |
| | | } |
| | | } else { |
| | | return row.extension1 != '0' ? 'online-row' : 'offline-row'; |
| | | return row.extension1 != '0' ? 'online-row' : 'offline-row' |
| | | } |
| | | }, |
| | | } |
| | | }, |
| | | mounted() { |
| | | this.tableHeight = this.calcTableHeight(); |
| | | this.onSearch(); |
| | | }, |
| | | }; |
| | | this.tableHeight = this.calcTableHeight() |
| | | this.onSearch() |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style> |
| | |
| | | // 表åç确认ååæ¶ |
| | | import { onActivated, onDeactivated, ref, watch } from 'vue'; |
| | | import { useCloned } from '@vueuse/core'; |
| | | import { useMessageBoxTip, useMessageBox } from './messageBox'; |
| | | |
| | | // 表åç确认ååæ¶ |
| | | export function useFormConfirm({ |
| | | defaultForm = undefined, |
| | | submit = { |
| | |
| | | <template> |
| | | <CompPreCheck @pre-check="autoEvaluate"></CompPreCheck> |
| | | <!-- <CompPreCheck @pre-check="autoEvaluate"></CompPreCheck> --> |
| | | |
| | | <FYTable @search="onSearch" :pagination="false"> |
| | | <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 #options-expand> |
| | | <CompQuickSet @quick-set="setOptions"></CompQuickSet> |
| | | </template> |
| | | |
| | | <template #table-column> |
| | | <el-table-column |
| | | type="index" |
| | | fixed="left" |
| | | prop="sceneName" |
| | | label="åç§°" |
| | | width="400" |
| | | > |
| | | <template #default="{row}"> |
| | | <el-tooltip |
| | | effect="dark" |
| | | :content="row.sceneName" |
| | | placement="top-start" |
| | | :show-after="500" |
| | | > |
| | | {{ row.sceneName }} |
| | | </el-tooltip> |
| | | </template> |
| | | </el-table-column> |
| | | |
| | | <el-table-column prop="dname" label="åºå¿" width="90" /> |
| | | <el-table-column prop="tname" label="è¡é" width="110" /> |
| | | <el-table-column prop="evaluation.scenseaddress" label="å°å" /> |
| | | <!-- <el-table-column prop="biArea" label="éä¸åº" width="110" /> |
| | | <el-table-column prop="biManagementCompany" label="ç©ä¸" min-width="110"/> --> |
| | | <el-table-column prop="evaluation.resultscorebef" label="å¾å" width="110" /> |
| | | </template> |
| | | </FYTable> |
| | | </template> |
| | | |
| | | <script> |
| | | import CompPreCheck from './components/CompPreCheck.vue'; |
| | | import CompPreCheck from './components/CompPreCheck.vue' |
| | | import evaluateApi from '@/api/fysp/evaluateApi' |
| | | import dayjs from 'dayjs' |
| | | import CompQuickSet from './components/CompQuickSet.vue' |
| | | |
| | | export default { |
| | | name: 'ResultManage', |
| | | components: { CompPreCheck }, |
| | | data() { |
| | | return {}; |
| | | }, |
| | | methods:{ |
| | | /** |
| | | * éè¿èªè¯é¢æ£åï¼æ§è¡èªå¨è¯ä¼° |
| | | * @param {*} options æ¥è¯¢åæ° |
| | | */ |
| | | autoEvaluate(options){ |
| | | |
| | | name: 'ResultManage', |
| | | components: { CompPreCheck, CompQuickSet }, |
| | | data() { |
| | | return { |
| | | formSearch: { |
| | | locations: {}, |
| | | scenetype: {}, |
| | | time: dayjs().add(-1, 'M').date(1).toDate() |
| | | } |
| | | } |
| | | }; |
| | | }, |
| | | methods: { |
| | | setOptions(param) { |
| | | this.formSearch.locations = param.locations |
| | | this.formSearch.scenetype = param.scenetype |
| | | }, |
| | | onSearch(page, func) { |
| | | const { locations, scenetype, time } = this.formSearch |
| | | const area = { |
| | | provincecode: locations.pCode, |
| | | provincename: locations.pName, |
| | | citycode: locations.cCode, |
| | | cityname: locations.cName, |
| | | districtcode: locations.dCode, |
| | | districtname: locations.dName, |
| | | starttime: dayjs(time).format('YYYY-MM-DD'), |
| | | scensetypeid: scenetype.value |
| | | } |
| | | evaluateApi.fetchAutoEvaluation(area).then((res) => { |
| | | if (res) { |
| | | func({ |
| | | data: res.data |
| | | }) |
| | | } |
| | | }) |
| | | } |
| | | } |
| | | } |
| | | </script> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div></div> |
| | | </template> |
| | | <script> |
| | | export default { |
| | | methods:{ |
| | | |
| | | } |
| | | } |
| | | </script> |
| | |
| | | :allOption="false" |
| | | :level="3" |
| | | :checkStrictly="false" |
| | | v-model:value="formSearch._locations" |
| | | v-model:value="formSearch.locations" |
| | | ></FYOptionLocation> |
| | | <!-- åºæ¯ç±»å --> |
| | | <FYOptionScene |
| | |
| | | v-model:value="formSearch.scenetype" |
| | | ></FYOptionScene> |
| | | <!-- æ¶é´ --> |
| | | <FYOptionTime type="month" v-model:value="formSearch.time"></FYOptionTime> |
| | | <FYOptionTime :initValue="false" type="month" v-model:value="formSearch.time"></FYOptionTime> |
| | | </template> |
| | | </FYSearchBar> |
| | | <el-row> |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import dayjs from 'dayjs' |
| | | |
| | | /** |
| | | * èªå¨è¯ä¼°æ¡ä»¶åè§æ§æ£æ¥ |
| | | */ |
| | |
| | | data() { |
| | | return { |
| | | formSearch: { |
| | | _locations: {}, |
| | | locations: {}, |
| | | scenetype: {}, |
| | | time: undefined |
| | | time: dayjs().add(-1, 'M').date(1).toDate() |
| | | } |
| | | } |
| | | }, |
| | |
| | | * æ£æ¥æéèå´å
å项è¯ä¼°æ°æ®æºæ¯å¦å®æ´ |
| | | */ |
| | | preCheck() { |
| | | this.$emit('preCheck', this.formSearch) |
| | | const param = { |
| | | locations: this.formSearch.locations, |
| | | scenetype: this.formSearch.scenetype, |
| | | time: dayjs(this.formSearch.time).format('YYYY-MM-DD') |
| | | } |
| | | this.$emit('preCheck', param) |
| | | }, |
| | | |
| | | /** |
| | | * å¿«é设置æ¡ä»¶ |
| | | */ |
| | | quickSet(set) { |
| | | this.formSearch._locations = set.locations |
| | | this.formSearch.locations = set.locations |
| | | this.formSearch.scenetype = set.scenetype |
| | | |
| | | this.preCheck() |
| | | // this.preCheck() |
| | | } |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <el-row> |
| | | <span>å¿«æ·éæ©</span> |
| | | <el-button v-for="(v, i) in quickSetting" :key="i" type="primary" @click="quickSet(v)">{{ |
| | | v.name |
| | | }}</el-button> |
| | | </el-row> |
| | | </template> |
| | | <script> |
| | | export default { |
| | | props: { |
| | | quickSetting: { |
| | | type: Array, |
| | | default: () => { |
| | | return [ |
| | | { |
| | | name: 'éå®å·¥å°', |
| | | locations: { |
| | | pCode: '31', |
| | | pName: '䏿µ·å¸', |
| | | cCode: '3100', |
| | | cName: '䏿µ·å¸', |
| | | dCode: '310106', |
| | | dName: 'éå®åº' |
| | | }, |
| | | scenetype: { label: 'å·¥å°', value: '1' } |
| | | }, |
| | | { |
| | | name: '徿±é¤é¥®', |
| | | locations: { |
| | | pCode: '31', |
| | | pName: '䏿µ·å¸', |
| | | cCode: '3100', |
| | | cName: '䏿µ·å¸', |
| | | dCode: '310104', |
| | | dName: '徿±åº' |
| | | }, |
| | | scenetype: { label: 'é¤é¥®', value: '5' } |
| | | }, |
| | | { |
| | | name: 'é山工å°', |
| | | locations: { |
| | | pCode: '31', |
| | | pName: '䏿µ·å¸', |
| | | cCode: '3100', |
| | | cName: '䏿µ·å¸', |
| | | dCode: '310116', |
| | | dName: 'éå±±åº' |
| | | }, |
| | | scenetype: { label: 'å·¥å°', value: '1' } |
| | | }, |
| | | { |
| | | name: 'éå±±ç 头', |
| | | locations: { |
| | | pCode: '31', |
| | | pName: '䏿µ·å¸', |
| | | cCode: '3100', |
| | | cName: '䏿µ·å¸', |
| | | dCode: '310116', |
| | | dName: 'éå±±åº' |
| | | }, |
| | | scenetype: { label: 'ç 头', value: '2' } |
| | | }, |
| | | { |
| | | name: 'éå±±æ
æç«', |
| | | locations: { |
| | | pCode: '31', |
| | | pName: '䏿µ·å¸', |
| | | cCode: '3100', |
| | | cName: '䏿µ·å¸', |
| | | dCode: '310116', |
| | | dName: 'éå±±åº' |
| | | }, |
| | | scenetype: { label: 'æ
æç«', value: '3' } |
| | | } |
| | | ] |
| | | } |
| | | } |
| | | }, |
| | | emits: ['quickSet'], |
| | | methods: { |
| | | /** |
| | | * å¿«é设置æ¡ä»¶ |
| | | * @param {locations, scenetype} set |
| | | */ |
| | | quickSet(set) { |
| | | // this.formSearch.locations = set.locations |
| | | // this.formSearch.scenetype = set.scenetype |
| | | |
| | | this.$emit('quickSet', set) |
| | | } |
| | | } |
| | | } |
| | | </script> |