1.升级了element-plus版本
2.对外支持模块新设备匹配工地功能完成
3.新增设备匹配模块单挑匹配记录编辑功能(未完成)
已修改19个文件
已删除1个文件
已添加8个文件
已重命名1个文件
| | |
| | | "@vueuse/core": "^9.7.0", |
| | | "axios": "^1.2.1", |
| | | "dayjs": "^1.11.10", |
| | | "element-plus": "^2.4.3", |
| | | "element-plus": "^2.8.3", |
| | | "js-base64": "^3.7.5", |
| | | "md5": "^2.3.0", |
| | | "pinia": "^2.0.26", |
| | |
| | | "license": "ISC" |
| | | }, |
| | | "node_modules/element-plus": { |
| | | "version": "2.4.3", |
| | | "resolved": "https://registry.npmmirror.com/element-plus/-/element-plus-2.4.3.tgz", |
| | | "integrity": "sha512-b3q26j+lM4SBqiyzw8HybybGnP2pk4MWgrnzzzYW5qKQUgV6EG1Zg7nMCfgCVccI8tNvZoTiUHb2mFaiB9qT8w==", |
| | | "version": "2.8.3", |
| | | "resolved": "https://registry.npmmirror.com/element-plus/-/element-plus-2.8.3.tgz", |
| | | "integrity": "sha512-BXQOyDf0s7JHyNEV8iaO+iaOzTZPsBXVKMzMI967vLCodUBDLrtiY5vglAn1YEebQcUOEUMhGcttTpIvEkcBjQ==", |
| | | "dependencies": { |
| | | "@ctrl/tinycolor": "^3.4.1", |
| | | "@element-plus/icons-vue": "^2.3.1", |
| | |
| | | "dev": true |
| | | }, |
| | | "element-plus": { |
| | | "version": "2.4.3", |
| | | "resolved": "https://registry.npmmirror.com/element-plus/-/element-plus-2.4.3.tgz", |
| | | "integrity": "sha512-b3q26j+lM4SBqiyzw8HybybGnP2pk4MWgrnzzzYW5qKQUgV6EG1Zg7nMCfgCVccI8tNvZoTiUHb2mFaiB9qT8w==", |
| | | "version": "2.8.3", |
| | | "resolved": "https://registry.npmmirror.com/element-plus/-/element-plus-2.8.3.tgz", |
| | | "integrity": "sha512-BXQOyDf0s7JHyNEV8iaO+iaOzTZPsBXVKMzMI967vLCodUBDLrtiY5vglAn1YEebQcUOEUMhGcttTpIvEkcBjQ==", |
| | | "requires": { |
| | | "@ctrl/tinycolor": "^3.4.1", |
| | | "@element-plus/icons-vue": "^2.3.1", |
| | |
| | | "@vueuse/core": "^9.7.0", |
| | | "axios": "^1.2.1", |
| | | "dayjs": "^1.11.10", |
| | | "element-plus": "^2.4.3", |
| | | "element-plus": "^2.8.3", |
| | | "js-base64": "^3.7.5", |
| | | "md5": "^2.3.0", |
| | | "pinia": "^2.0.26", |
| | |
| | | */ |
| | | autoCreateAccount(sId) { |
| | | return $fysp.post(`userinfo/create?sceneId=${sId}`).then((res) => res.data); |
| | | }, |
| | | |
| | | /** |
| | | * ç¨æ·æ¨¡ç³æç´¢ |
| | | * @param {object} area åºåèå´æ¡ä»¶ |
| | | * @param {String} keyword æç´¢å
³é®å |
| | | * @param {Number} userType ç¨æ·ç±»åï¼é»è®¤3ï¼ä¼ä¸ |
| | | * @returns |
| | | */ |
| | | searchUser(area, keyword, page = 1, perPage = 20, userType = 3) { |
| | | const param = `?keyword=${keyword}&userType=${userType}&page=${page}&per_page=${perPage}` |
| | | return $fysp |
| | | .post(`userinfo/search${param}`, area) |
| | | .then((res) => res.data); |
| | | } |
| | | }; |
| | |
| | | let ip2_file = 'https://fyami.com.cn/'; |
| | | |
| | | if (debug) { |
| | | ip1 = 'http://192.168.0.138:8082/'; |
| | | // ip1_file = 'http://47.100.191.150:9005/'; |
| | | ip2 = 'http://192.168.0.138:8080/'; |
| | | ip1 = 'http://192.168.0.138:9091/'; |
| | | // ip1_file = 'http://192.168.0.138:8080/'; |
| | | // ip2 = 'http://192.168.0.138:8080/'; |
| | | // ip2_file = 'https://fyami.com.cn/'; |
| | | } |
| | | |
| | |
| | | export interface GlobalComponents { |
| | | BaseContentLayout: typeof import('./components/core/BaseContentLayout.vue')['default'] |
| | | BasePanelLayout: typeof import('./components/core/BasePanelLayout.vue')['default'] |
| | | CompQuickSet: typeof import('./components/search-option/CompQuickSet.vue')['default'] |
| | | Content: typeof import('./components/core/Content.vue')['default'] |
| | | ElAside: typeof import('element-plus/es')['ElAside'] |
| | | ElAvatar: typeof import('element-plus/es')['ElAvatar'] |
| | |
| | | ElRadioButton: typeof import('element-plus/es')['ElRadioButton'] |
| | | ElRadioGroup: typeof import('element-plus/es')['ElRadioGroup'] |
| | | ElRow: typeof import('element-plus/es')['ElRow'] |
| | | ElScorllbar: typeof import('element-plus/es')['ElScorllbar'] |
| | | ElScrollbar: typeof import('element-plus/es')['ElScrollbar'] |
| | | ElSelect: typeof import('element-plus/es')['ElSelect'] |
| | | ElSpace: typeof import('element-plus/es')['ElSpace'] |
| | |
| | | FYBgTaskDialog: typeof import('./components/bg-task/FYBgTaskDialog.vue')['default'] |
| | | FYBgTaskItem: typeof import('./components/bg-task/FYBgTaskItem.vue')['default'] |
| | | FYForm: typeof import('./components/form/FYForm.vue')['default'] |
| | | FYList: typeof import('./components/table/FYList.vue')['default'] |
| | | FYOptionLocation: typeof import('./components/search-option/FYOptionLocation.vue')['default'] |
| | | FYOptionOnlineStatus: typeof import('./components/search-option/FYOptionOnlineStatus.vue')['default'] |
| | | FYOptionScene: typeof import('./components/search-option/FYOptionScene.vue')['default'] |
| | |
| | | FYSearchBar: typeof import('./components/search-option/FYSearchBar.vue')['default'] |
| | | FYTable: typeof import('./components/table/FYTable.vue')['default'] |
| | | Header: typeof import('./components/core/Header.vue')['default'] |
| | | ItemScene: typeof import('./components/list-item/ItemScene.vue')['default'] |
| | | ItemUser: typeof import('./components/list-item/ItemUser.vue')['default'] |
| | | MenuItems: typeof import('./components/core/MenuItems.vue')['default'] |
| | | RouterLink: typeof import('vue-router')['RouterLink'] |
| | | RouterView: typeof import('vue-router')['RouterView'] |
| | |
| | | <el-form :inline="true" :model="formSearch"> |
| | | <el-form-item label="æ»ä»»å¡"> |
| | | <!-- <el-input v-model="formSearch.topTaskId" placeholder="æ»ä»»å¡" /> --> |
| | | <el-select v-model="formSearch.topTaskId" placeholder="æ»ä»»å¡"> |
| | | <el-option |
| | | v-for="s in topTasks" |
| | | :key="s.value" |
| | | :label="s.label" |
| | | :value="s.value" |
| | | /> |
| | | <el-select v-model="formSearch.topTaskId" placeholder="æ»ä»»å¡" style="width: 260px"> |
| | | <el-option v-for="s in topTasks" :key="s.value" :label="s.label" :value="s.value" /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <!-- <FYOptionScene |
| | | :allOption="false" |
| | | :type="2" |
| | | v-model:value="formSearch.scenetype" |
| | | ></FYOptionScene> --> |
| | | <el-form-item label="åºæ¯ç±»å"> |
| | | <el-select v-model="formSearch.sceneTypeId" placeholder="åºæ¯ç±»å"> |
| | | <el-option |
| | | v-for="s in sceneTypes" |
| | | :key="s.value" |
| | | :label="s.label" |
| | | :value="s.value" |
| | | /> |
| | | <el-select v-model="formSearch.sceneTypeId" placeholder="åºæ¯ç±»å" style="width: 150px"> |
| | | <el-option v-for="s in sceneTypes" :key="s.value" :label="s.label" :value="s.value" /> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item> |
| | |
| | | |
| | | <script> |
| | | import taskApi from '@/api/fysp/taskApi'; |
| | | import { enumScene } from "@/enum/scene"; |
| | | import { enumScene } from '@/enum/scene'; |
| | | |
| | | export default { |
| | | emits: ['onSubmit'], |
| | |
| | | sceneTypes: enumScene(2, false), |
| | | formSearch: { |
| | | topTaskId: '', |
| | | sceneTypeId: '', |
| | | }, |
| | | sceneTypeId: '' |
| | | } |
| | | }; |
| | | }, |
| | | methods: { |
| | |
| | | label: r.name, |
| | | towncode: r.towncode, |
| | | districtCode: r.districtcode, |
| | | month: r.starttime.slice(0, 7), |
| | | month: r.starttime.slice(0, 7) |
| | | }); |
| | | }); |
| | | this.topTasks = list; |
| | |
| | | onSubmit() { |
| | | // console.log(this.formSearch.sceneTypeId) |
| | | this.$emit('onSubmit', this.formSearch); |
| | | }, |
| | | } |
| | | }, |
| | | mounted() { |
| | | this.formSearch.sceneTypeId = this.sceneTypes[0].value; |
| | | this.getOptions(); |
| | | }, |
| | | } |
| | | }; |
| | | </script> |
| | | |
| | |
| | | > |
| | | <template #reference> |
| | | <div class="fy-button-div" @click="popVisible = !popVisible"> |
| | | <div style="font-size: 12px; color: gray; margin-left: 24px; margin-bottom: 4px"> |
| | | <div |
| | | v-show="!collapse" |
| | | style="font-size: 12px; color: gray; margin-left: 24px; margin-bottom: 4px;" |
| | | > |
| | | å½åç³»ç» |
| | | </div> |
| | | <el-row justify="space-between" align="middle"> |
| | | <el-row justify="space-between" align="middle" style="flex-wrap: nowrap;"> |
| | | <el-space> |
| | | <el-icon :size="16"><Open /></el-icon> |
| | | <span>{{ sysName }}</span> |
| | | <span v-show="!collapse">{{ sysName }}</span> |
| | | </el-space> |
| | | <el-icon><ArrowRight /></el-icon> |
| | | <el-icon v-show="!collapse"><ArrowRight /></el-icon> |
| | | </el-row> |
| | | </div> |
| | | </template> |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import { MENU_FYSP, MENU_FYTZ, MENU_FYPW } from '@/constants/index' |
| | | import { MENU_FYSP, MENU_FYTZ, MENU_FYPW } from '@/constants/index'; |
| | | |
| | | export default { |
| | | name: 'CoreSiderMenu', |
| | |
| | | { name: 'é£ç¾½ç¯å¢', des: '' }, |
| | | { name: 'ææ±¡æ½è¿', des: '' } |
| | | ] |
| | | } |
| | | }; |
| | | }, |
| | | computed: { |
| | | homePage() { |
| | | const paths = this.menuPath(this.menus[0]) |
| | | return paths[paths.length - 1].path |
| | | const paths = this.menuPath(this.menus[0]); |
| | | return paths[paths.length - 1].path; |
| | | }, |
| | | sysName() { |
| | | return this.sysNames[this.sysIndex].name |
| | | return this.sysNames[this.sysIndex].name; |
| | | }, |
| | | menus() { |
| | | return [MENU_FYSP, MENU_FYTZ, MENU_FYPW][this.sysIndex] |
| | | return [MENU_FYSP, MENU_FYTZ, MENU_FYPW][this.sysIndex]; |
| | | } |
| | | }, |
| | | methods: { |
| | | handleOpen() {}, |
| | | handleClose() {}, |
| | | choseSys(i) { |
| | | this.sysIndex = i |
| | | const paths = this.menuPath(this.menus[0]) |
| | | this.navPage(...paths) |
| | | const p = paths[paths.length - 1].path |
| | | this.$router.push(p) |
| | | this.popVisible = false |
| | | this.sysIndex = i; |
| | | const paths = this.menuPath(this.menus[0]); |
| | | this.navPage(...paths); |
| | | const p = paths[paths.length - 1].path; |
| | | this.$router.push(p); |
| | | this.popVisible = false; |
| | | }, |
| | | navPage(...item) { |
| | | const titles = item.map((value) => { |
| | | return value.name |
| | | }) |
| | | this.$emit('navPage', titles) |
| | | return value.name; |
| | | }); |
| | | this.$emit('navPage', titles); |
| | | }, |
| | | calMenuHeight() { |
| | | const h1 = this.$refs.headerRef.$el.offsetHeight |
| | | const h2 = this.$refs.header2Ref.$el.offsetHeight |
| | | const h3 = this.$refs.subTitleRef.$el.offsetHeight |
| | | return `calc(100vh - ${h1}px - ${h2}px - ${h3}px)` |
| | | const h1 = this.$refs.headerRef.$el.offsetHeight; |
| | | const h2 = this.$refs.header2Ref.$el.offsetHeight; |
| | | const h3 = this.$refs.subTitleRef.$el.offsetHeight; |
| | | return `calc(100vh - ${h1}px - ${h2}px - ${h3}px)`; |
| | | }, |
| | | menuPath(m) { |
| | | if (m.children) { |
| | | const arr = this.menuPath(m.children) |
| | | arr.shift(m) |
| | | return arr |
| | | const arr = this.menuPath(m.children); |
| | | arr.shift(m); |
| | | return arr; |
| | | } else { |
| | | return [m] |
| | | return [m]; |
| | | } |
| | | } |
| | | }, |
| | | created() { |
| | | this.$router.push(this.homePage) |
| | | this.navPage(...this.menuPath(this.menus[0])) |
| | | this.$router.push(this.homePage); |
| | | this.navPage(...this.menuPath(this.menus[0])); |
| | | }, |
| | | mounted() { |
| | | this.menuHeight = this.calMenuHeight() |
| | | this.menuHeight = this.calMenuHeight(); |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | | |
| | | <style scoped> |
| | |
| | | .el-menu--collapse { |
| | | min-height: 100vh; |
| | | } |
| | | |
| | | .fy-button-div { |
| | | white-space: nowrap; |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <!-- <el-card shadow="hover"> --> |
| | | <div class="wrapper"> |
| | | <div> |
| | | <el-text>{{ item.index }}ã</el-text> |
| | | <el-text>{{ item.name }}</el-text> |
| | | </div> |
| | | <!-- <div> |
| | | <el-text>å°åï¼{{ item.location }}</el-text> |
| | | </div> --> |
| | | <el-row justify="space-between" style="margin-top: 4px"> |
| | | <el-space> |
| | | <el-tag type="primary" effect="plain" size="small"> |
| | | {{ item.districtname }} |
| | | </el-tag> |
| | | <el-tag type="primary" effect="plain" size="small"> |
| | | {{ item.type }} |
| | | </el-tag> |
| | | </el-space> |
| | | <el-button size="small" type="success" @click="add">æ·»å </el-button> |
| | | </el-row> |
| | | </div> |
| | | <!-- </el-card> --> |
| | | </template> |
| | | <script setup> |
| | | const props = defineProps({ |
| | | item: { |
| | | type: Object, |
| | | default: () => {} |
| | | } |
| | | }); |
| | | |
| | | const emit = defineEmits(['add']); |
| | | |
| | | function add() { |
| | | emit('add', props.item); |
| | | } |
| | | </script> |
| | | <style scoped> |
| | | .wrapper { |
| | | border: 1px solid var(--el-border-color); |
| | | border-radius: var(--el-border-radius-base); |
| | | padding: 4px 8px; |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <!-- <el-card shadow="hover"> --> |
| | | <div class="wrapper"> |
| | | <div> |
| | | <el-text>{{ item.realname }}</el-text> |
| | | <el-divider direction="vertical" /> |
| | | <el-text>è´¦å·ï¼{{ item.acountname }}</el-text> |
| | | </div> |
| | | <!-- <div> |
| | | <el-text>å°åï¼{{ item.location }}</el-text> |
| | | </div> --> |
| | | <el-row justify="space-between" style="margin-top: 4px"> |
| | | <el-space> |
| | | <el-tag type="primary" effect="plain" size="small"> |
| | | {{ item.district }} |
| | | </el-tag> |
| | | <!-- <el-tag type="primary" effect="plain" size="small"> |
| | | {{ item.usertype }} |
| | | </el-tag> --> |
| | | </el-space> |
| | | <el-button size="small" type="success" @click="add">æ·»å </el-button> |
| | | </el-row> |
| | | </div> |
| | | <!-- </el-card> --> |
| | | </template> |
| | | <script setup> |
| | | const props = defineProps({ |
| | | item: { |
| | | type: Object, |
| | | default: () => {} |
| | | } |
| | | }); |
| | | |
| | | const emit = defineEmits(['add']); |
| | | |
| | | function add() { |
| | | emit('add', props.item); |
| | | } |
| | | </script> |
| | | <style scoped> |
| | | .wrapper { |
| | | border: 1px solid var(--el-border-color); |
| | | border-radius: var(--el-border-radius-base); |
| | | padding: 4px 8px; |
| | | } |
| | | </style> |
ÎļþÃû´Ó src/views/fysp/evaluation/components/CompQuickSet.vue ÐÞ¸Ä |
| | |
| | | <template> |
| | | <el-form-item label="å¿«æ·éæ©"> |
| | | <el-space> |
| | | <el-button v-for="(v, i) in quickSetting" :key="i" type="primary" size="small" @click="quickSet(v)">{{ |
| | | v.name |
| | | }}</el-button> |
| | | <el-button |
| | | v-for="(v, i) in quickSetting" |
| | | :key="i" |
| | | type="primary" |
| | | size="small" |
| | | @click="quickSet(v)" |
| | | >{{ v.name }}</el-button |
| | | > |
| | | </el-space> |
| | | </el-form-item> |
| | | </template> |
| | |
| | | cCode: '3100', |
| | | cName: '䏿µ·å¸', |
| | | dCode: '310106', |
| | | dName: 'éå®åº', |
| | | dName: 'éå®åº' |
| | | }, |
| | | scenetype: { label: 'å·¥å°', value: '1' }, |
| | | sourceType: 2, |
| | | sourceType: 2 |
| | | }, |
| | | { |
| | | name: '徿±é¤é¥®', |
| | |
| | | dName: '徿±åº' |
| | | }, |
| | | scenetype: { label: 'é¤é¥®', value: '5' }, |
| | | sourceType: 2, |
| | | sourceType: 2 |
| | | }, |
| | | { |
| | | name: 'é山工å°', |
| | |
| | | dName: 'éå±±åº' |
| | | }, |
| | | scenetype: { label: 'å·¥å°', value: '1' }, |
| | | sourceType: 2, |
| | | sourceType: 2 |
| | | }, |
| | | { |
| | | name: 'éå±±ç 头', |
| | |
| | | dName: 'éå±±åº' |
| | | }, |
| | | scenetype: { label: 'ç 头', value: '2' }, |
| | | sourceType: 2, |
| | | sourceType: 2 |
| | | }, |
| | | { |
| | | name: 'éå±±æ
æç«', |
| | |
| | | dName: 'éå±±åº' |
| | | }, |
| | | scenetype: { label: 'æ
æç«', value: '3' }, |
| | | sourceType: 2, |
| | | }, |
| | | sourceType: 2 |
| | | } |
| | | // { |
| | | // name: '徿±æ±½ä¿®', |
| | | // locations: { |
| | |
| | | // scenetype: { label: '汽修', value: '7' }, |
| | | // sourceType: 1, |
| | | // } |
| | | ] |
| | | ]; |
| | | } |
| | | } |
| | | }, |
| | |
| | | // this.formSearch.locations = set.locations |
| | | // this.formSearch.scenetype = set.scenetype |
| | | |
| | | this.$emit('quickSet', set) |
| | | this.$emit('quickSet', set); |
| | | } |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | | <style scoped> |
| | | .row { |
| | |
| | | }, |
| | | // 1:é£ç¾½ç¯å¢ç³»ç»ï¼2ï¼é£ç¾½ç管系ç»ï¼ |
| | | type: { |
| | | type: Number, |
| | | type: Number || String, |
| | | default: 1 |
| | | }, |
| | | // è¿åç»æ |
| | |
| | | <template> |
| | | <el-form :inline="true"> |
| | | <el-form :inline="true" :size="size"> |
| | | <slot name="options"></slot> |
| | | <el-form-item> |
| | | <el-button icon="Search" type="primary" :loading="loading" @click="search">{{ btnText }}</el-button> |
| | |
| | | <script> |
| | | export default { |
| | | props: { |
| | | size: { |
| | | type: String, |
| | | default: 'default' |
| | | }, |
| | | btnText: { |
| | | type: String, |
| | | default: 'æ¥è¯¢' |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <el-scrollbar> |
| | | <!-- <div v-for="(item, index) in data" :key="index"> |
| | | |
| | | </div> --> |
| | | <slot></slot> |
| | | </el-scrollbar> |
| | | <el-pagination |
| | | v-if="pageShow" |
| | | ref="paginationRef" |
| | | class="el-pagination" |
| | | v-model:current-page="currentPage" |
| | | v-model:page-size="pageSize" |
| | | :page-sizes="pageSizes" |
| | | :background="true" |
| | | layout="total, sizes, prev, pager, next, jumper" |
| | | :total="total" |
| | | /> |
| | | </template> |
| | | |
| | | <script> |
| | | import { usePagination } from '@/composables/pagination'; |
| | | |
| | | export default { |
| | | setup() { |
| | | // å页é»è¾ |
| | | const { currentPage, pageSize, addPageEvent } = usePagination(); |
| | | return { currentPage, pageSize, addPageEvent }; |
| | | }, |
| | | props: { |
| | | data: { |
| | | type: Array, |
| | | default: () => { |
| | | return []; |
| | | } |
| | | }, |
| | | // æ¯å¦æ¾ç¤ºå页 |
| | | pageShow: { |
| | | type: Boolean, |
| | | default: true |
| | | }, |
| | | // æ¯é¡µå¯éæ°é |
| | | pageSizes: { |
| | | type: Array, |
| | | default: () => { |
| | | return [10, 20, 50, 100]; |
| | | } |
| | | }, |
| | | // æ»æ°æ®é |
| | | total: { |
| | | type: Number, |
| | | default: 0 |
| | | } |
| | | }, |
| | | emits: ['pageChange'], |
| | | methods: { |
| | | search() { |
| | | this.$emit('pageChange', this.currentPage, this.pageSize); |
| | | } |
| | | }, |
| | | mounted() { |
| | | this.addPageEvent(this.search); |
| | | } |
| | | }; |
| | | </script> |
| | | <style scoped> |
| | | .el-pagination { |
| | | background-color: var(--el-color-white); |
| | | padding-top: 20px; |
| | | border-top: 1px solid rgba(0, 0, 0, 0.096); |
| | | /* margin-top: 2px; */ |
| | | } |
| | | </style> |
| | |
| | | </template> |
| | | </FYSearchBar> |
| | | </el-row> |
| | | <el-row ref="expandRef"> |
| | | <slot name="options-expand"></slot> |
| | | <el-row ref="expandRef" justify="space-between"> |
| | | <el-col span="22"> |
| | | <slot name="options-expand"></slot> |
| | | </el-col> |
| | | <el-col span="2"> |
| | | <el-space :wrap="false"> |
| | | <el-text size="small">åä½</el-text> |
| | | <el-radio-group v-model="fontSize" size="small"> |
| | | <el-radio-button value="small">å°</el-radio-button> |
| | | <el-radio-button value="default">ä¸</el-radio-button> |
| | | <el-radio-button value="large">大</el-radio-button> |
| | | </el-radio-group> |
| | | </el-space> |
| | | </el-col> |
| | | </el-row> |
| | | <div ref="expand2Ref"> |
| | | <slot name="options-expand2"></slot> |
| | | </div> |
| | | <el-table |
| | | :data="tableData" |
| | | v-loading="loading" |
| | | table-layout="fixed" |
| | | :row-class-name="tableRowClassName" |
| | | :height="tableHeight" |
| | | :size="fontSize" |
| | | border |
| | | > |
| | | <slot name="table-column"></slot> |
| | | <slot name="table-column" :size="fontSize"></slot> |
| | | </el-table> |
| | | |
| | | <el-pagination |
| | |
| | | pagination: { |
| | | type: Boolean, |
| | | default: true |
| | | }, |
| | | // '' | 'small' | 'default' | 'large' |
| | | size: { |
| | | type: String, |
| | | default: 'default' |
| | | } |
| | | }, |
| | | data() { |
| | |
| | | total: 0, |
| | | currentPage: 1, |
| | | pageSize: 20, |
| | | loading: false |
| | | loading: false, |
| | | fontSize: 'default' |
| | | }; |
| | | }, |
| | | emits: ['search'], |
| | |
| | | pageSize(nValue, oValue) { |
| | | if (nValue != oValue) { |
| | | this.onSearch(); |
| | | } |
| | | }, |
| | | size: { |
| | | handler(nValue, oValue) { |
| | | if (nValue != oValue) { |
| | | this.fontSize = nValue; |
| | | } |
| | | }, |
| | | immediate: true |
| | | } |
| | | }, |
| | | computed: { |
| | | cTableHeight() { |
| | | if (this.$refs.searchRef) { |
| | | 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 h4 = this.$refs.expand2Ref.offsetHeight; |
| | | |
| | | const h = h1 + h2 + h3 + h4; |
| | | // return `calc(100vh - ${h1}px - ${h2}px - var(--el-main-padding) * 2 - var(--el-header-height))`; |
| | | return `calc(100vh - ${h}px - 60px - var(--el-main-padding) * 2)`; |
| | | } else { |
| | | return '500'; |
| | | } |
| | | } |
| | | }, |
| | |
| | | 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; |
| | | const h4 = this.$refs.expand2Ref.offsetHeight; |
| | | |
| | | const h = h1 + h2 + h3 + h4; |
| | | // return `calc(100vh - ${h1}px - ${h2}px - var(--el-main-padding) * 2 - var(--el-header-height))`; |
| | | return `calc(100vh - ${h}px - 60px - var(--el-main-padding) * 2)`; |
| | | }, |
¶Ô±ÈÐÂÎļþ |
| | |
| | | import { ref, watch } from 'vue'; |
| | | import { useMessageBoxTip, useMessageBox } from './messageBox'; |
| | | |
| | | // åç±»å¼¹åºæ¡å¼å
³é»è¾ |
| | | export function useDialog() { |
| | | const show = ref(false); |
| | | function confirmClick() { |
| | | if (options.tip) { |
| | | useMessageBoxTip({ |
| | | confirmMsg: options.confrim.msg, |
| | | confirmTitle: options.confrim.title, |
| | | onConfirm: async () => { |
| | | const res = options.confrim.do(); |
| | | show.value = false; |
| | | return res; |
| | | } |
| | | }); |
| | | } else { |
| | | useMessageBox({ |
| | | confirmMsg: options.cancel.msg, |
| | | confirmTitle: options.cancel.title, |
| | | onConfirm: () => { |
| | | const res = options.cancel.do(); |
| | | show.value = false; |
| | | return res; |
| | | } |
| | | }); |
| | | } |
| | | } |
| | | function cancelClick() { |
| | | show.value = false; |
| | | } |
| | | const options = { |
| | | tip: false, |
| | | cancel: { |
| | | title: 'åæ¶', |
| | | msg: 'æ¯å¦æ¾å¼å·²ç¼è¾çå
容ï¼', |
| | | do: () => {} |
| | | }, |
| | | confirm: { |
| | | title: 'æäº¤', |
| | | msg: '确认æ¯å¦æäº¤ï¼', |
| | | do: () => {} |
| | | } |
| | | }; |
| | | return { show, confirmClick, cancelClick, options }; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | // å»¶è¿äºä»¶ç®¡ç |
| | | export function useEvent() { |
| | | // äºä»¶å表 |
| | | let eventList = []; |
| | | |
| | | // æ·»å äºä»¶ |
| | | function addEvent(event) { |
| | | eventList.push(event); |
| | | } |
| | | |
| | | // æ§è¡äºä»¶ |
| | | function invokeEvent() { |
| | | eventList.forEach((e) => { |
| | | if (typeof e === 'function') { |
| | | e(); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | // æ¸
空äºä»¶ |
| | | function clearEvent() { |
| | | eventList = [] |
| | | } |
| | | |
| | | return { addEvent, invokeEvent, clearEvent }; |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | // å页é»è¾ç®¡ç |
| | | import { ref, watch } from 'vue'; |
| | | import { useEvent } from './event'; |
| | | |
| | | /** |
| | | * å页çå¬é»è¾ |
| | | * 1. çå¬é¡µç ååé¡µæ°æ®é忢 |
| | | * 2. 坿·»å ååºè§¦åäºä»¶ |
| | | */ |
| | | export function usePagination() { |
| | | const { invokeEvent, addEvent: addPageEvent } = useEvent(); |
| | | const currentPage = ref(1); |
| | | const pageSize = ref(20); |
| | | watch(currentPage, (nValue, oValue) => { |
| | | if (nValue != oValue) { |
| | | invokeEvent(); |
| | | } |
| | | }); |
| | | watch(pageSize, (nValue, oValue) => { |
| | | if (nValue != oValue) { |
| | | invokeEvent(); |
| | | } |
| | | }); |
| | | |
| | | return { currentPage, pageSize, addPageEvent }; |
| | | } |
| | |
| | | */ |
| | | function enumScene(type, allOption = true) { |
| | | let l; |
| | | switch (type) { |
| | | switch (parseInt(type)) { |
| | | case 1: |
| | | l = _enumScene_1(); |
| | | break; |
| | |
| | | return [ |
| | | { |
| | | label: 'å
¨é¨', |
| | | value: null, |
| | | value: null |
| | | }, |
| | | { |
| | | label: 'é¤é¥®', |
| | | value: '1', |
| | | value: '1' |
| | | }, |
| | | { |
| | | label: 'å·¥å°', |
| | | value: '2', |
| | | value: '2' |
| | | }, |
| | | { |
| | | label: 'ç 头', |
| | | value: '3', |
| | | value: '3' |
| | | }, |
| | | { |
| | | label: 'å åº', |
| | | value: '4', |
| | | value: '4' |
| | | }, |
| | | { |
| | | label: 'æ
æç«', |
| | | value: '5', |
| | | value: '5' |
| | | }, |
| | | { |
| | | label: 'å·¥ä¸ä¼ä¸', |
| | | value: '6', |
| | | value: '6' |
| | | }, |
| | | { |
| | | label: '汽修', |
| | | value: '7', |
| | | value: '7' |
| | | }, |
| | | { |
| | | label: 'å®éªå®¤', |
| | | value: '8', |
| | | value: '8' |
| | | }, |
| | | { |
| | | label: 'å»çæºæ', |
| | | value: '9', |
| | | }, |
| | | value: '9' |
| | | } |
| | | ]; |
| | | } |
| | | |
| | |
| | | return [ |
| | | { |
| | | label: 'å
¨é¨', |
| | | value: null, |
| | | value: null |
| | | }, |
| | | { |
| | | label: 'å·¥å°', |
| | | value: '1', |
| | | value: '1' |
| | | }, |
| | | { |
| | | label: 'ç 头', |
| | | value: '2', |
| | | value: '2' |
| | | }, |
| | | { |
| | | label: 'æ
æç«', |
| | | value: '3', |
| | | value: '3' |
| | | }, |
| | | { |
| | | label: 'å·¥ä¸ä¼ä¸', |
| | | value: '4', |
| | | value: '4' |
| | | }, |
| | | { |
| | | label: 'é¤é¥®', |
| | | value: '5', |
| | | value: '5' |
| | | }, |
| | | { |
| | | label: '汽修', |
| | | value: '6', |
| | | value: '6' |
| | | }, |
| | | { |
| | | label: 'éè·¯æ¬å°çæµç¹', |
| | | value: '9', |
| | | value: '9' |
| | | }, |
| | | { |
| | | label: 'éè·¯', |
| | | value: '10', |
| | | value: '10' |
| | | }, |
| | | { |
| | | label: 'å åº', |
| | | value: '14', |
| | | }, |
| | | value: '14' |
| | | } |
| | | ]; |
| | | } |
| | | |
| | | export { enumScene, getSceneName }; |
| | | /** |
| | | * é£ç¾½çç®¡ç³»ç» åºæ¯ç±»å转 é£ç¾½ç¯å¢ç³»ç» |
| | | * @param {*} sceneTypeId |
| | | */ |
| | | function svToTz(sceneTypeId) { |
| | | const sv = _enumScene_2(); |
| | | const tz = _enumScene_1(); |
| | | |
| | | const scType = sv.find((v) => { |
| | | return v.value == sceneTypeId + ''; |
| | | }); |
| | | const tzType = tz.find((v) => { |
| | | return v.label == scType.label; |
| | | }); |
| | | return tzType ? tzType : scType; |
| | | } |
| | | |
| | | export { enumScene, getSceneName, svToTz }; |
| | |
| | | name: 'fyspEvalutationTask', |
| | | path: '/fysp/evaluation/evalutationTask', |
| | | component: () => import('@/views/fysp/evaluation/EvalutationTask.vue'), |
| | | meta: { keepAlive: true } |
| | | meta: { keepAlive: false } |
| | | }, |
| | | { |
| | | //è¯ä¼°ç®¡ç |
| | |
| | | <template> |
| | | <FYTable @search="onSearch" :pagination="true" ref="tableRef"> |
| | | <FYTable @search="onSearch" :pagination="false" ref="tableRef" size="small"> |
| | | <template #options> |
| | | <!-- åºå¿ --> |
| | | <FYOptionLocation |
| | |
| | | </el-form> |
| | | </template> |
| | | |
| | | <template #table-column> |
| | | <el-table-column prop="sceneName" :show-overflow-tooltip="true" label="åç§°"> |
| | | <!-- <template #options-expand2> |
| | | <CompDeviceMatchEdit :area="area"></CompDeviceMatchEdit> |
| | | </template> --> |
| | | |
| | | <template #table-column> |
| | | <el-table-column fixed="left" type="index" label="#" width="40" index="1"></el-table-column> |
| | | <el-table-column |
| | | prop="deviceCode" |
| | | :show-overflow-tooltip="true" |
| | | label="çæµè®¾å¤ç¼å·" |
| | | width="160" |
| | | > |
| | | </el-table-column> |
| | | <el-table-column prop="deviceName" :show-overflow-tooltip="true" label="çæµè®¾å¤åç§°"> |
| | | </el-table-column> |
| | | <el-table-column prop="svUserName" :show-overflow-tooltip="true" label="çç®¡ç¨æ·åç§°"> |
| | | </el-table-column> |
| | | <el-table-column prop="tzUserName" :show-overflow-tooltip="true" label="宿³èªå©ç¨æ·åç§°"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="createTime" |
| | | :show-overflow-tooltip="true" |
| | | label="å建æ¶é´" |
| | | :formatter="timeFormat" |
| | | > |
| | | </el-table-column> |
| | | <el-table-column fixed="right" label="æä½" width="100"> |
| | | <template #default="{ row }"> |
| | | <el-button type="primary" size="small" @click="itemEdit(row)">ç¼è¾</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </template> |
| | | </FYTable> |
| | | <el-drawer |
| | | v-model="drawerShow" |
| | | title="设å¤å¹é
è®°å½ç¼è¾" |
| | | direction="btt" |
| | | size="80%" |
| | | destroy-on-close |
| | | > |
| | | <CompDeviceMatchEdit :data="selectedItem" :area="area"></CompDeviceMatchEdit> |
| | | </el-drawer> |
| | | </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'; |
| | | |
| | | import CompDeviceMatchEdit from '@/views/fysp/config/device/CompDeviceMatchEdit.vue'; |
| | | |
| | | // fixme 2024.9.26 åç»å¯ä»¥ç¨vueuseä¸çæ¶é´æ ¼å¼åæ¹æ³æ¥ä»£æ¿ |
| | | const { $fm } = getCurrentInstance().appContext.config.globalProperties; |
| | | |
| | | /******** å¹é
è®°å½æ¥è¯¢ ********/ |
| | | const tableRef = ref(); |
| | | const formSearch = reactive({ |
| | | locations: {}, |
| | |
| | | // formSearch.sourceType = param.sourceType; |
| | | tableRef.value.onSearch(); |
| | | } |
| | | |
| | | function timeFormat(row) { |
| | | const time = row.createTime; |
| | | if (time) { |
| | | return $fm.formatYMDH(time); |
| | | } else { |
| | | return ''; |
| | | } |
| | | } |
| | | |
| | | /******** å¹é
è®°å½ç¼è¾ ********/ |
| | | const drawerShow = ref(false); |
| | | const selectedItem = ref(null); |
| | | function itemEdit(row) { |
| | | selectedItem.value = row; |
| | | drawerShow.value = true; |
| | | } |
| | | </script> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <el-row :gutter="20"> |
| | | <el-col :span="8"> |
| | | <CompInfoSearch |
| | | v-model="device" |
| | | label="设å¤" |
| | | placeholder="è¾å
¥è®¾å¤MNç æåç§°" |
| | | @search="searchDevice" |
| | | > |
| | | <template #selected="{ row }"> |
| | | <div> |
| | | <el-text>ç¼å·ï¼{{ row.deviceCode }}</el-text> |
| | | </div> |
| | | <div> |
| | | <el-text>åç§°ï¼{{ row.deviceName }}</el-text> |
| | | </div> |
| | | </template> |
| | | <template #default="{ row, click }"> |
| | | <el-text>deviceInfo</el-text> |
| | | </template> |
| | | </CompInfoSearch> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <CompInfoSearch |
| | | v-model="svUser" |
| | | label="çç®¡ç¨æ·" |
| | | placeholder="è¾å
¥ç¨æ·åç§°" |
| | | @search="searchSVUser" |
| | | > |
| | | <template #selected="{ row }"> |
| | | <div> |
| | | <el-text>ç¼å·ï¼{{ row.svUserId }}</el-text> |
| | | </div> |
| | | <div> |
| | | <el-text>åç§°ï¼{{ row.svUserName }}</el-text> |
| | | </div> |
| | | </template> |
| | | <template #default="{ row, click }"> |
| | | <ItemUser :item="row" @add="selectSVUser(row, click)" /> |
| | | </template> |
| | | </CompInfoSearch> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <CompInfoSearch |
| | | v-model="tzUser" |
| | | label="ç¯å¢ç¨æ·" |
| | | placeholder="è¾å
¥ç¨æ·åç§°" |
| | | @search="searchTZUser" |
| | | > |
| | | <template #selected="{ row }"> |
| | | <div> |
| | | <el-text>ç¼å·ï¼{{ row.tzUserId }}</el-text> |
| | | </div> |
| | | <div> |
| | | <el-text>åç§°ï¼{{ row.tzUserName }}</el-text> |
| | | </div> |
| | | </template> |
| | | <template #default="{ row, click }"> |
| | | <ItemUser :item="row" @add="selectTZUser(row, click)" /> |
| | | </template> |
| | | </CompInfoSearch> |
| | | </el-col> |
| | | </el-row> |
| | | </template> |
| | | |
| | | <script> |
| | | import { useCloned } from '@vueuse/core'; |
| | | import CompInfoSearch from './CompInfoSearch.vue'; |
| | | import tzUserApi from '@/api/fytz/userApi'; |
| | | import svUserApi from '@/api/fysp/userApi'; |
| | | import { svToTz } from '@/enum/scene'; |
| | | |
| | | export default { |
| | | components: { CompInfoSearch }, |
| | | props: { |
| | | // 设å¤è´¦æ·å¹é
ä¿¡æ¯ |
| | | data: Object, |
| | | // æ£ç´¢èå´ï¼å
å«è¡æ¿åºåãåºæ¯ç±»åï¼ |
| | | area: Object |
| | | }, |
| | | data() { |
| | | return { |
| | | // çæµè®¾å¤ |
| | | device: {}, |
| | | // çç®¡ç¨æ· |
| | | svUser: {}, |
| | | // ç¯å¢ç¨æ· |
| | | tzUser: {} |
| | | }; |
| | | }, |
| | | watch: { |
| | | data: { |
| | | handler(nValue, oValue) { |
| | | if (nValue != oValue) { |
| | | this.device = { |
| | | deviceCode: nValue.deviceCode, |
| | | deviceName: nValue.deviceName |
| | | }; |
| | | this.svUser = { |
| | | svUserId: nValue.svUserId, |
| | | svUserName: nValue.svUserName |
| | | }; |
| | | this.tzUser = { |
| | | tzUserId: nValue.tzUserId, |
| | | tzUserName: nValue.tzUserName |
| | | }; |
| | | } |
| | | }, |
| | | immediate: true |
| | | } |
| | | }, |
| | | methods: { |
| | | // æ¥è¯¢çæµè®¾å¤ |
| | | searchDevice() {}, |
| | | // æ¥è¯¢çç®¡ç¨æ· |
| | | searchSVUser(param, callback) { |
| | | const { text, page, pageSize } = param; |
| | | const { cloned: area } = useCloned(this.area); |
| | | area.value.sceneName = text; |
| | | return svUserApi |
| | | .searchUser(area.value, text, page, pageSize) |
| | | .then((res) => { |
| | | if (res.success) { |
| | | const l = res.data.map((value) => { |
| | | return { |
| | | guid: value.guid, |
| | | realname: value.realname, |
| | | acountname: value.acountname, |
| | | district: value.remark |
| | | }; |
| | | }); |
| | | callback({ |
| | | data: l, |
| | | total: res.head.totalCount |
| | | }); |
| | | } |
| | | }) |
| | | .finally(() => { |
| | | callback(); |
| | | }); |
| | | }, |
| | | // æ¥è¯¢ç¯å¢ï¼å®æ³èªå©å°ç¨åºï¼ç¨æ· |
| | | searchTZUser(param, callback) { |
| | | const { text, page, pageSize } = param; |
| | | const area = {}; |
| | | // è¡æ¿åºå |
| | | area.provinceCode = this.area.provincecode; |
| | | area.provinceName = this.area.provincename; |
| | | area.cityCode = this.area.citycode; |
| | | area.cityName = this.area.cityname; |
| | | area.districtCode = this.area.districtcode; |
| | | area.districtName = this.area.districtname; |
| | | area.townCode = this.area.towncode; |
| | | area.townName = this.area.townname; |
| | | // åºæ¯ç±»å |
| | | const tzSceneType = svToTz(this.area.scensetypeid) |
| | | area.sceneTypes = [tzSceneType.value]; |
| | | // ä¸ä¸çº¿ç¶æ |
| | | area.online = this.area.online; |
| | | // å
³é®å |
| | | area.searchText = text; |
| | | |
| | | tzUserApi |
| | | .fetchUser(page, pageSize, area) |
| | | .then((res) => { |
| | | if (res) { |
| | | const l = res.data.map((value) => { |
| | | return { |
| | | guid: value.userInfo.guid, |
| | | realname: value.userInfo.realname, |
| | | acountname: value.userInfo.acountname, |
| | | district: value.userInfo.extension1 |
| | | }; |
| | | }); |
| | | callback({ |
| | | data: l, |
| | | total: res.head.totalCount |
| | | }); |
| | | } |
| | | }) |
| | | .finally(() => { |
| | | callback(); |
| | | }); |
| | | }, |
| | | selectDevice() {}, |
| | | selectSVUser(row, click) { |
| | | const p = { |
| | | svUserId: row.guid, |
| | | svUserName: row.realname |
| | | }; |
| | | click(p); |
| | | }, |
| | | selectTZUser(row, click) { |
| | | const p = { |
| | | tzUserId: row.guid, |
| | | tzUserName: row.realname |
| | | }; |
| | | click(p); |
| | | } |
| | | } |
| | | }; |
| | | </script> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <!-- <div v-if="modelValue"> --> |
| | | <el-divider content-position="left">éæ©{{ label }}</el-divider> |
| | | <div class="select-box"> |
| | | <div> |
| | | <el-text size="small" type="info">å½åéæ©</el-text> |
| | | </div> |
| | | <slot name="selected" :row="modelValue"></slot> |
| | | </div> |
| | | <!-- </div> --> |
| | | <el-divider content-position="left">{{ label }}æ£ç´¢</el-divider> |
| | | <FYSearchBar @search="search" :loading="loading"> |
| | | <template #options> |
| | | <FYOptionText |
| | | label="" |
| | | :placeholder="placeholder" |
| | | v-model:value="searchText" |
| | | width="200px" |
| | | ></FYOptionText> |
| | | </template> |
| | | </FYSearchBar> |
| | | <div> |
| | | <el-scrollbar v-if="dataList.length > 0" height="38vh" class="item-box"> |
| | | <el-space direction="vertical" alignment="start" fill> |
| | | <div v-for="(item, index) in dataList" :key="index"> |
| | | <slot :row="item" :click="select"></slot> |
| | | </div> |
| | | </el-space> |
| | | </el-scrollbar> |
| | | </div> |
| | | <el-pagination |
| | | v-if="pageShow && dataList.length > 0" |
| | | size="small" |
| | | ref="paginationRef" |
| | | class="el-pagination" |
| | | v-model:current-page="currentPage" |
| | | v-model:page-size="pageSize" |
| | | :page-sizes="pageSizes" |
| | | :background="true" |
| | | layout="total, sizes, prev, pager, next" |
| | | :total="total" |
| | | /> |
| | | </template> |
| | | |
| | | <script> |
| | | import { usePagination } from '@/composables/pagination'; |
| | | |
| | | /** |
| | | * ä¿¡æ¯æ£ç´¢åéæ©æ¡ |
| | | */ |
| | | export default { |
| | | setup() { |
| | | // å页é»è¾ |
| | | const { currentPage, pageSize, addPageEvent } = usePagination(); |
| | | return { currentPage, pageSize, addPageEvent }; |
| | | }, |
| | | props: { |
| | | modelValue: Object, |
| | | label: { |
| | | type: String, |
| | | default: 'æ£ç´¢é¡¹' |
| | | }, |
| | | placeholder: { |
| | | type: String, |
| | | default: 'è¾å
¥å
³é®åæ£ç´¢' |
| | | }, |
| | | // æ¯å¦æ¾ç¤ºå页 |
| | | pageShow: { |
| | | type: Boolean, |
| | | default: true |
| | | }, |
| | | // æ¯é¡µå¯éæ°é |
| | | pageSizes: { |
| | | type: Array, |
| | | default: () => { |
| | | return [10, 20, 50, 100]; |
| | | } |
| | | } |
| | | }, |
| | | emits: ['search', 'update:modelValue'], |
| | | data() { |
| | | return { |
| | | searchText: '', |
| | | dataList: [], |
| | | total: 0, |
| | | loading: false |
| | | }; |
| | | }, |
| | | watch: {}, |
| | | methods: { |
| | | search() { |
| | | this.loading = true; |
| | | const param = { |
| | | text: this.searchText, |
| | | page: this.currentPage, |
| | | pageSize: this.pageSize |
| | | }; |
| | | this.$emit('search', param, (res) => { |
| | | if (res) { |
| | | this.dataList = res.data; |
| | | this.total = res.total ? res.total : 0; |
| | | } |
| | | this.loading = false; |
| | | }); |
| | | }, |
| | | select(e) { |
| | | this.$emit('update:modelValue', e); |
| | | } |
| | | }, |
| | | mounted() { |
| | | this.addPageEvent(this.search); |
| | | } |
| | | }; |
| | | </script> |
| | | <style scoped> |
| | | .select-box { |
| | | border: 1px solid var(--el-border-color); |
| | | border-radius: var(--el-border-radius-base); |
| | | padding: 0 8px; |
| | | } |
| | | .item-box { |
| | | /* border: 1px solid var(--el-border-color); |
| | | border-radius: var(--el-border-radius-base); |
| | | margin-top: 20px; */ |
| | | } |
| | | .el-pagination { |
| | | /* background-color: var(--el-color-white); */ |
| | | border-top: 1px solid rgba(0, 0, 0, 0.096); |
| | | /* background-color: aliceblue; */ |
| | | } |
| | | </style> |
| | |
| | | import dayjs from 'dayjs'; |
| | | import evaluateApi from '@/api/fysp/evaluateApi'; |
| | | import { envCreditCode } from '@/constants/index'; |
| | | import CompQuickSet from './components/CompQuickSet.vue'; |
| | | import CompReport from './components/CompReport.vue'; |
| | | |
| | | export default { |
| | | name: 'ResultManage', |
| | | components: { CompQuickSet, CompReport }, |
| | | components: { CompReport }, |
| | | data() { |
| | | return { |
| | | formSearch: { |
| | |
| | | v-model="dialogVisible" |
| | | title="è§èæ§è¯ä¼°ä¸åææ¥åçæ" |
| | | width="500" |
| | | :before-close="handleClose" |
| | | > |
| | | <el-text tag="b" size="large">æ°æ®èå´ç¡®è®¤</el-text> |
| | | <el-text tag="div">åºåï¼{{ locationText }}</el-text> |
| | |
| | | <FYForm ref="formRef" :rules="evaConditionRules" :showButtons="false" @submit="nextStep"> |
| | | <template #form-item="{ formObj }"> |
| | | <CompQuickSet @quick-set="setOptions"></CompQuickSet> |
| | | <el-form-item label="ä¸»æ°æ®æº" prop="sourceType"> |
| | | <el-radio-group |
| | | v-model="formObj.sourceType" |
| | | size="small" |
| | | @change="sceneOptionSourceInit = true" |
| | | > |
| | | <el-radio-button :value="1">宿³æå¡è®°å½</el-radio-button> |
| | | <el-radio-button :value="2">ç°åºå·¡æ¥è®°å½</el-radio-button> |
| | | </el-radio-group> |
| | | <el-tooltip placement="bottom-start" effect="light"> |
| | | <template #content> |
| | | <el-text tag="i" size="default" type="warning" |
| | | >该é项æ¯ç¨äºå³å®è¯ä¼°ä¸»ä½å¯¹è±¡çè·åæ¹å¼</el-text |
| | | ><br /> |
| | | <el-text tag="b" size="small">宿³æå¡è®°å½ï¼</el-text><br /> |
| | | <el-text size="small" |
| | | >表示å¨è¯ä¼°æ¶ï¼è¯ä¼°å¯¹è±¡æ¯ä»å®æ³æå¡å°ç¨åºç³»ç»ä¸è·åçå½åå¯ç¨çç¨æ·ï¼<br /> |
| | | ä¸è¬æ
åµä¸ï¼å½è¯ä¼°å¯¹è±¡æ²¡æè¿è¡ç°åºå·¡æ¥ï¼åªæå®æ³æå¡ç¸å
³è®°å½æ¶ï¼éç¨æ¤é项ï¼</el-text |
| | | ><br /> |
| | | <el-text tag="b" size="small">ç°åºå·¡æ¥è®°å½ï¼</el-text><br /> |
| | | <el-text size="small" |
| | | >表示å¨è¯ä¼°æ¶ï¼è¯ä¼°å¯¹è±¡æ¯ä»ç°åºå·¡æ¥ç管系ç»ä¸è·åçæ»ä»»å¡ä¸çææçç®¡åºæ¯ï¼<br /> |
| | | ä¸è¬æ
åµä¸ï¼å½è¯ä¼°å¯¹è±¡æè¿è¡ç°åºå·¡æ¥ï¼éç¨æ¤éé¡¹ï¼ </el-text |
| | | ><br /> |
| | | </template> |
| | | <el-icon class="m-l-8 cursor-p" :size="16" color="var(--el-color-warning)" |
| | | ><QuestionFilled |
| | | /></el-icon> |
| | | </el-tooltip> |
| | | </el-form-item> |
| | | <!-- åºå¿ --> |
| | | <FYOptionLocation |
| | | :allOption="false" |
| | |
| | | type="month" |
| | | v-model:value="formObj.time" |
| | | ></FYOptionTime> |
| | | <el-form-item label="ä¸»æ°æ®æº" prop="sourceType"> |
| | | <!-- <el-switch v-model="formObj.sourceType" @change="sceneOptionSourceInit = true" /> --> |
| | | <el-radio-group |
| | | v-model="formObj.sourceType" |
| | | size="small" |
| | | @change="sceneOptionSourceInit = true" |
| | | > |
| | | <el-radio-button label="1">宿³æå¡è®°å½</el-radio-button> |
| | | <el-radio-button label="2">ç°åºå·¡æ¥è®°å½</el-radio-button> |
| | | </el-radio-group> |
| | | <!-- <span class="m-l-16">{{ formObj.sourceType ? '宿³æå¡è®°å½' : 'ç°åºå·¡æ¥è®°å½' }}</span> --> |
| | | <el-tooltip placement="bottom-start" effect="light"> |
| | | <template #content> |
| | | <!-- <el-text tag="b" size="default">说æ</el-text><br /> --> |
| | | <el-text tag="i" size="default" type="warning" |
| | | >该é项æ¯ç¨äºå³å®è¯ä¼°ä¸»ä½å¯¹è±¡çè·åæ¹å¼</el-text |
| | | ><br /> |
| | | <el-text tag="b" size="small">宿³æå¡è®°å½ï¼</el-text><br /> |
| | | <el-text size="small" |
| | | >表示å¨è¯ä¼°æ¶ï¼è¯ä¼°å¯¹è±¡æ¯ä»å®æ³æå¡å°ç¨åºç³»ç»ä¸è·åçå½åå¯ç¨çç¨æ·ï¼<br /> |
| | | ä¸è¬æ
åµä¸ï¼å½è¯ä¼°å¯¹è±¡æ²¡æè¿è¡ç°åºå·¡æ¥ï¼åªæå®æ³æå¡ç¸å
³è®°å½æ¶ï¼éç¨æ¤é项ï¼</el-text |
| | | ><br /> |
| | | <el-text tag="b" size="small">ç°åºå·¡æ¥è®°å½ï¼</el-text><br /> |
| | | <el-text size="small" |
| | | >表示å¨è¯ä¼°æ¶ï¼è¯ä¼°å¯¹è±¡æ¯ä»ç°åºå·¡æ¥ç管系ç»ä¸è·åçæ»ä»»å¡ä¸çææçç®¡åºæ¯ï¼<br /> |
| | | ä¸è¬æ
åµä¸ï¼å½è¯ä¼°å¯¹è±¡æè¿è¡ç°åºå·¡æ¥ï¼éç¨æ¤éé¡¹ï¼ </el-text |
| | | ><br /> |
| | | </template> |
| | | <el-icon class="m-l-8 cursor-p" :size="16" color="var(--el-color-warning)" |
| | | ><QuestionFilled |
| | | /></el-icon> |
| | | </el-tooltip> |
| | | </el-form-item> |
| | | </template> |
| | | </FYForm> |
| | | </FormCol> |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import CompQuickSet from '../../CompQuickSet.vue'; |
| | | |
| | | /** |
| | | * è¯ä¼°èå´åè§æ§æ£æ¥ |
| | | */ |
| | | export default { |
| | | components: { CompQuickSet }, |
| | | props: { |
| | | // æ¥éª¤ä¸æ |
| | | modelValue: Number |
| | |
| | | <template #header> |
| | | <div><el-text tag="b" size="large">æ°æ®æºæ£æ¥</el-text></div> |
| | | <el-text size="small" type="info">æ£æ¥è¯ä¼°æéæ°æ®æºæ¯å¦å®æ´</el-text> |
| | | <el-text size="small" type="info">æ£æ¥è¯ä¼°æéæ°æ®æºæ¯å¦å®æ´</el-text> |
| | | </template> |
| | | <FormCol> |
| | | <template v-for="(v, i) in checkResults" :key="i"> |
| | |
| | | async fetch() { |
| | | this.loading = true; |
| | | setTimeout(async () => { |
| | | const res = await _fetch(); |
| | | this.pass = res ? res.pass : undefined; |
| | | this.des = res ? res.des : undefined; |
| | | this.loading = false; |
| | | if (_fetch != undefined) { |
| | | _fetch() |
| | | .then((res) => { |
| | | this.pass = res ? res.pass : undefined; |
| | | this.des = res ? res.des : undefined; |
| | | }) |
| | | .catch(() => { |
| | | this.pass = false; |
| | | this.des = 'ç½ç»é¾æ¥é误'; |
| | | }) |
| | | .finally(() => { |
| | | this.loading = false; |
| | | }); |
| | | } else { |
| | | this.pass = undefined; |
| | | this.des = undefined; |
| | | this.loading = false; |
| | | } |
| | | }, 1000); |
| | | } |
| | | }; |
| | |
| | | }); |
| | | }), |
| | | // åºåèå´å
ççæµæ°æ®æ¯å¦åå¨ãæ°æ®æ¶é´è·¨åº¦æ¯å¦å®æ´ãæ°æ®ç忥忿¯å¦å®æ |
| | | baseCheckItem('ç°åºçæµæ°æ®', '', () => {}), |
| | | baseCheckItem('ç°åºçæµæ°æ®', ''), |
| | | // åºåèå´å
çæ¯ä¸ªç管ç¹ä½ä¸çæµä»ªå¨çå¹é
è®°å½æ¯å¦åå¨ï¼ç¼ºå¤±æ
åµç |
| | | baseCheckItem('ç管ç¹ä½ä¸çæµç¹å¹é
', '', () => { |
| | | return userMapApi.fetchDeviceMap(this.areaInfo).then((res) => { |
| | |
| | | return { pass, des }; |
| | | }); |
| | | }), |
| | | // complaintApi.fetchComplaints(); |
| | | // åºåèå´å
ç信访æè¯è®°å½æ¯å¦åå¨ï¼å¯éæ¶è¡¥å
|
| | | baseCheckItem('信访æè¯', '', () => { |
| | | // complaintApi.fetchComplaints(); |
| | | }), |
| | | baseCheckItem('信访æè¯', ''), |
| | | // complaintApi.fetchPunishment(); |
| | | // åºåèå´å
çè¡æ¿å¤ç½è®°å½æ¯å¦åå¨ï¼å¯éæ¶è¡¥å
|
| | | baseCheckItem('è¡æ¿å¤ç½', '', () => { |
| | | // complaintApi.fetchPunishment(); |
| | | }) |
| | | baseCheckItem('è¡æ¿å¤ç½', '') |
| | | ] |
| | | }; |
| | | }, |
| | |
| | | // online: true, |
| | | // sourceType: v.sourceType |
| | | // }; |
| | | this.areaInfo = value |
| | | this.areaInfo = value; |
| | | |
| | | this.checkResults.forEach((e) => { |
| | | e.fetch(); |
| | |
| | | </el-scrollbar> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <DeviceMatch :device="selectedDevice" :scene="selectedScene"></DeviceMatch> |
| | | <DeviceMatch :device="selectedDevice" :scene="selectedScene" @success="onUploadSuccess"></DeviceMatch> |
| | | </el-col> |
| | | <el-col :span="8"> |
| | | <el-text>ç管工å°</el-text> |
| | |
| | | import { useFetchData } from '@/composables/fetchData'; |
| | | |
| | | import ItemDevice from './components/ItemDevice.vue'; |
| | | import ItemScene from './components/ItemScene.vue'; |
| | | import DeviceMatch from './components/DeviceMatch.vue'; |
| | | |
| | | const { loading, fetchData } = useFetchData(); |
| | |
| | | function addScene(item) { |
| | | selectedScene.value = item; |
| | | } |
| | | |
| | | /** |
| | | * ä¸ä¼ 设å¤å®æ |
| | | */ |
| | | function onUploadSuccess() { |
| | | const i = deviceList.value.indexOf(selectedDevice.value) |
| | | deviceList.value.splice(i, 1) |
| | | selectedDevice.value = null |
| | | selectedScene.value = null |
| | | |
| | | } |
| | | </script> |
| | | <style scoped> |
| | | .device-scene-wrap { |
| | |
| | | >å½å
¥è®¾å¤ä¿¡æ¯</el-button |
| | | > |
| | | </div> |
| | | <el-button type="danger" :disabled="!enabled">ä¸ä¼ å¹é
ä¿¡æ¯</el-button> |
| | | <el-button type="danger" :disabled="!enabled" @click="uploadMatchScene" |
| | | >ä¸ä¼ å¹é
ä¿¡æ¯</el-button |
| | | > |
| | | </el-row> |
| | | <div v-if="newDevice"> |
| | | <el-text>æ°å¢è®¾å¤</el-text> |
| | | <FormDevice :form-info="newDevice" :is-edit="true" ></FormDevice> |
| | | <FormDevice :form-info="newDevice" :is-edit="true"></FormDevice> |
| | | </div> |
| | | <div v-if="deviceList.length > 0"> |
| | | <el-text>å·²æè®¾å¤</el-text> |
| | |
| | | <script setup> |
| | | import { ref, computed, watch } from 'vue'; |
| | | import deviceApi from '@/api/fysp/deviceApi'; |
| | | import constructionApi from '@/api/additional-jingan/constructionApi'; |
| | | import { useFetchData } from '@/composables/fetchData'; |
| | | import { ElMessage } from 'element-plus'; |
| | | |
| | | import FormDevice from './FormDevice.vue'; |
| | | |
| | |
| | | device: Object, |
| | | scene: Object |
| | | }); |
| | | |
| | | const emit = defineEmits(['success']); |
| | | |
| | | // æ°å¢è®¾å¤ä¿¡æ¯ |
| | | const newDevice = ref(); |
| | |
| | | () => props.scene, |
| | | (nV, oV) => { |
| | | if (nV != oV) { |
| | | fetchDeviceInfo(); |
| | | // fetchDeviceInfo(); |
| | | } |
| | | } |
| | | ); |
| | |
| | | diRemoved: false |
| | | }; |
| | | } |
| | | |
| | | const { loading, fetchData } = useFetchData(); |
| | | /** |
| | | * ä¸ä¼ 设å¤å
³èå·¥å° |
| | | */ |
| | | function uploadMatchScene() { |
| | | const param = { |
| | | name: props.scene.name, |
| | | address: props.scene.location, |
| | | street: props.scene.townname, |
| | | lon: props.device.lon, |
| | | lat: props.device.lat, |
| | | sbCode: props.device.code, |
| | | sbName: props.device.name |
| | | }; |
| | | |
| | | fetchData(() => { |
| | | return constructionApi.uploadConstructionDevice(param).then((res) => { |
| | | ElMessage({ |
| | | message: res.message, |
| | | type: 'success' |
| | | }); |
| | | emit('success'); |
| | | }); |
| | | }); |
| | | } |
| | | </script> |