1. 完成场景报告模块
2. 日报管理模块添加时间范围选择以及word报告生成
| | |
| | | "@vueuse/core": "^9.7.0", |
| | | "axios": "^1.2.1", |
| | | "dayjs": "^1.11.13", |
| | | "docxtemplater": "^3.50.0", |
| | | "docxtemplater-image-module": "^3.1.0", |
| | | "docxtemplater-image-module-free": "^1.1.1", |
| | | "element-plus": "^2.8.3", |
| | | "exceljs": "^4.4.0", |
| | | "file-saver": "^2.0.5", |
| | | "js-base64": "^3.7.5", |
| | | "jszip": "^3.10.1", |
| | | "jszip-utils": "^0.1.0", |
| | | "md5": "^2.3.0", |
| | | "open-docxtemplater-image-module": "^1.0.3", |
| | | "pinia": "^2.0.26", |
| | | "pizzip": "^3.1.7", |
| | | "vue": "^3.2.45", |
| | | "vue-demi": "^0.14.6", |
| | | "vue-i18n": "^9.8.0", |
| | |
| | | "@xtuc/long": "4.2.2" |
| | | } |
| | | }, |
| | | "node_modules/@xmldom/xmldom": { |
| | | "version": "0.8.10", |
| | | "resolved": "https://registry.npmmirror.com/@xmldom/xmldom/-/xmldom-0.8.10.tgz", |
| | | "integrity": "sha512-2WALfTl4xo2SkGCYRt6rDTFfk9R1czmBvUQy12gK2KuRKIpWEhcbbzy8EZXtz/jkRqHX8bFEc6FC1HjX4TUWYw==", |
| | | "engines": { |
| | | "node": ">=10.0.0" |
| | | } |
| | | }, |
| | | "node_modules/@xtuc/ieee754": { |
| | | "version": "1.2.0", |
| | | "dev": true, |
| | |
| | | }, |
| | | "engines": { |
| | | "node": ">=6.0.0" |
| | | } |
| | | }, |
| | | "node_modules/docxtemplater": { |
| | | "version": "3.50.0", |
| | | "resolved": "https://registry.npmmirror.com/docxtemplater/-/docxtemplater-3.50.0.tgz", |
| | | "integrity": "sha512-6EqYbBFUcdNKVwS6G8vQ+pFOURJ7zoSvUNASIi4MPnCpkRdYDvmaOV2e1XcScMrEQV5pFZUAAbKi30Z+JTbLFA==", |
| | | "dependencies": { |
| | | "@xmldom/xmldom": "^0.8.10" |
| | | }, |
| | | "engines": { |
| | | "node": ">=0.10" |
| | | } |
| | | }, |
| | | "node_modules/docxtemplater-image-module": { |
| | | "version": "3.1.0", |
| | | "resolved": "https://registry.npmmirror.com/docxtemplater-image-module/-/docxtemplater-image-module-3.1.0.tgz", |
| | | "integrity": "sha512-dFzuGOhCXgZpzAO7hGJvGbjzUCvid+3L4lSjbBta+TnXuBb/55pqDQWeRZ38yMviu+QTaYreSHHdYHF1XvQlBA==", |
| | | "deprecated": "This module has been deprecated, No new releases will be made to it.\n\nThere is an up to date paid version of the module which you can find on https://docxtemplater.com/modules/image/", |
| | | "dependencies": { |
| | | "xmldom": "^0.1.27" |
| | | } |
| | | }, |
| | | "node_modules/docxtemplater-image-module-free": { |
| | | "version": "1.1.1", |
| | | "resolved": "https://registry.npmmirror.com/docxtemplater-image-module-free/-/docxtemplater-image-module-free-1.1.1.tgz", |
| | | "integrity": "sha512-aWOzVQN7ggDYjfoy3pTTNrcrZ7/CJrQcI9cT+hmyHE6nRLR67nt5yPFPe9hm9VWbfYIED2fi+3itOnF0TE/RWQ==", |
| | | "dependencies": { |
| | | "xmldom": "^0.1.27" |
| | | } |
| | | }, |
| | | "node_modules/domexception": { |
| | |
| | | "setimmediate": "^1.0.5" |
| | | } |
| | | }, |
| | | "node_modules/jszip-utils": { |
| | | "version": "0.1.0", |
| | | "resolved": "https://registry.npmmirror.com/jszip-utils/-/jszip-utils-0.1.0.tgz", |
| | | "integrity": "sha512-tBNe0o3HAf8vo0BrOYnLPnXNo5A3KsRMnkBFYjh20Y3GPYGfgyoclEMgvVchx0nnL+mherPi74yLPIusHUQpZg==" |
| | | }, |
| | | "node_modules/jszip/node_modules/readable-stream": { |
| | | "version": "2.3.8", |
| | | "resolved": "https://registry.npmmirror.com/readable-stream/-/readable-stream-2.3.8.tgz", |
| | |
| | | "url": "https://github.com/sponsors/sindresorhus" |
| | | } |
| | | }, |
| | | "node_modules/open-docxtemplater-image-module": { |
| | | "version": "1.0.3", |
| | | "resolved": "https://registry.npmmirror.com/open-docxtemplater-image-module/-/open-docxtemplater-image-module-1.0.3.tgz", |
| | | "integrity": "sha512-/VMRc8MU34T2/ry2ER0+/JXjc4BTuWDtdXlqnWo5ikR/DvsLVAjF6F8094dA7+i68cfDrGgP42VEXqbwyLaTdg==", |
| | | "dependencies": { |
| | | "xmldom": "^0.1.27" |
| | | } |
| | | }, |
| | | "node_modules/optionator": { |
| | | "version": "0.9.1", |
| | | "dev": true, |
| | |
| | | "optional": true |
| | | } |
| | | } |
| | | }, |
| | | "node_modules/pizzip": { |
| | | "version": "3.1.7", |
| | | "resolved": "https://registry.npmmirror.com/pizzip/-/pizzip-3.1.7.tgz", |
| | | "integrity": "sha512-VemVeAQtdIA74AN1Fsd5OmbMbEeS4YOwwlcudgzvmUrOIOPrk1idYC5Tw5FUFq/I0c26ziNOw9z//iPmGfp1jA==", |
| | | "dependencies": { |
| | | "pako": "^2.1.0" |
| | | } |
| | | }, |
| | | "node_modules/pizzip/node_modules/pako": { |
| | | "version": "2.1.0", |
| | | "resolved": "https://registry.npmmirror.com/pako/-/pako-2.1.0.tgz", |
| | | "integrity": "sha512-w+eufiZ1WuJYgPXbV/PO3NCMEc3xqylkKHzp8bxp1uW4qaSNQUkwmLLEc3kKsfz8lpV1F8Ht3U1Cm+9Srog2ug==" |
| | | }, |
| | | "node_modules/postcss": { |
| | | "version": "8.4.20", |
| | |
| | | "version": "2.2.0", |
| | | "license": "MIT" |
| | | }, |
| | | "node_modules/xmldom": { |
| | | "version": "0.1.31", |
| | | "resolved": "https://registry.npmmirror.com/xmldom/-/xmldom-0.1.31.tgz", |
| | | "integrity": "sha512-yS2uJflVQs6n+CyjHoaBmVSqIDevTAWrzMmjG1Gc7h1qQ7uVozNhEPJAwZXWyGQ/Gafo3fCwrcaokezLPupVyQ==", |
| | | "deprecated": "Deprecated due to CVE-2021-21366 resolved in 0.5.0", |
| | | "engines": { |
| | | "node": ">=0.1" |
| | | } |
| | | }, |
| | | "node_modules/yallist": { |
| | | "version": "4.0.0", |
| | | "dev": true, |
| | |
| | | "@xtuc/long": "4.2.2" |
| | | } |
| | | }, |
| | | "@xmldom/xmldom": { |
| | | "version": "0.8.10", |
| | | "resolved": "https://registry.npmmirror.com/@xmldom/xmldom/-/xmldom-0.8.10.tgz", |
| | | "integrity": "sha512-2WALfTl4xo2SkGCYRt6rDTFfk9R1czmBvUQy12gK2KuRKIpWEhcbbzy8EZXtz/jkRqHX8bFEc6FC1HjX4TUWYw==" |
| | | }, |
| | | "@xtuc/ieee754": { |
| | | "version": "1.2.0", |
| | | "dev": true, |
| | |
| | | "dev": true, |
| | | "requires": { |
| | | "esutils": "^2.0.2" |
| | | } |
| | | }, |
| | | "docxtemplater": { |
| | | "version": "3.50.0", |
| | | "resolved": "https://registry.npmmirror.com/docxtemplater/-/docxtemplater-3.50.0.tgz", |
| | | "integrity": "sha512-6EqYbBFUcdNKVwS6G8vQ+pFOURJ7zoSvUNASIi4MPnCpkRdYDvmaOV2e1XcScMrEQV5pFZUAAbKi30Z+JTbLFA==", |
| | | "requires": { |
| | | "@xmldom/xmldom": "^0.8.10" |
| | | } |
| | | }, |
| | | "docxtemplater-image-module": { |
| | | "version": "3.1.0", |
| | | "resolved": "https://registry.npmmirror.com/docxtemplater-image-module/-/docxtemplater-image-module-3.1.0.tgz", |
| | | "integrity": "sha512-dFzuGOhCXgZpzAO7hGJvGbjzUCvid+3L4lSjbBta+TnXuBb/55pqDQWeRZ38yMviu+QTaYreSHHdYHF1XvQlBA==", |
| | | "requires": { |
| | | "xmldom": "^0.1.27" |
| | | } |
| | | }, |
| | | "docxtemplater-image-module-free": { |
| | | "version": "1.1.1", |
| | | "resolved": "https://registry.npmmirror.com/docxtemplater-image-module-free/-/docxtemplater-image-module-free-1.1.1.tgz", |
| | | "integrity": "sha512-aWOzVQN7ggDYjfoy3pTTNrcrZ7/CJrQcI9cT+hmyHE6nRLR67nt5yPFPe9hm9VWbfYIED2fi+3itOnF0TE/RWQ==", |
| | | "requires": { |
| | | "xmldom": "^0.1.27" |
| | | } |
| | | }, |
| | | "domexception": { |
| | |
| | | } |
| | | } |
| | | }, |
| | | "jszip-utils": { |
| | | "version": "0.1.0", |
| | | "resolved": "https://registry.npmmirror.com/jszip-utils/-/jszip-utils-0.1.0.tgz", |
| | | "integrity": "sha512-tBNe0o3HAf8vo0BrOYnLPnXNo5A3KsRMnkBFYjh20Y3GPYGfgyoclEMgvVchx0nnL+mherPi74yLPIusHUQpZg==" |
| | | }, |
| | | "klona": { |
| | | "version": "2.0.5", |
| | | "dev": true |
| | |
| | | "mimic-fn": "^2.1.0" |
| | | } |
| | | }, |
| | | "open-docxtemplater-image-module": { |
| | | "version": "1.0.3", |
| | | "resolved": "https://registry.npmmirror.com/open-docxtemplater-image-module/-/open-docxtemplater-image-module-1.0.3.tgz", |
| | | "integrity": "sha512-/VMRc8MU34T2/ry2ER0+/JXjc4BTuWDtdXlqnWo5ikR/DvsLVAjF6F8094dA7+i68cfDrGgP42VEXqbwyLaTdg==", |
| | | "requires": { |
| | | "xmldom": "^0.1.27" |
| | | } |
| | | }, |
| | | "optionator": { |
| | | "version": "0.9.1", |
| | | "dev": true, |
| | |
| | | "requires": { |
| | | "@vue/devtools-api": "^6.4.5", |
| | | "vue-demi": "*" |
| | | } |
| | | }, |
| | | "pizzip": { |
| | | "version": "3.1.7", |
| | | "resolved": "https://registry.npmmirror.com/pizzip/-/pizzip-3.1.7.tgz", |
| | | "integrity": "sha512-VemVeAQtdIA74AN1Fsd5OmbMbEeS4YOwwlcudgzvmUrOIOPrk1idYC5Tw5FUFq/I0c26ziNOw9z//iPmGfp1jA==", |
| | | "requires": { |
| | | "pako": "^2.1.0" |
| | | }, |
| | | "dependencies": { |
| | | "pako": { |
| | | "version": "2.1.0", |
| | | "resolved": "https://registry.npmmirror.com/pako/-/pako-2.1.0.tgz", |
| | | "integrity": "sha512-w+eufiZ1WuJYgPXbV/PO3NCMEc3xqylkKHzp8bxp1uW4qaSNQUkwmLLEc3kKsfz8lpV1F8Ht3U1Cm+9Srog2ug==" |
| | | } |
| | | } |
| | | }, |
| | | "postcss": { |
| | |
| | | "xmlchars": { |
| | | "version": "2.2.0" |
| | | }, |
| | | "xmldom": { |
| | | "version": "0.1.31", |
| | | "resolved": "https://registry.npmmirror.com/xmldom/-/xmldom-0.1.31.tgz", |
| | | "integrity": "sha512-yS2uJflVQs6n+CyjHoaBmVSqIDevTAWrzMmjG1Gc7h1qQ7uVozNhEPJAwZXWyGQ/Gafo3fCwrcaokezLPupVyQ==" |
| | | }, |
| | | "yallist": { |
| | | "version": "4.0.0", |
| | | "dev": true |
| | |
| | | "@vueuse/core": "^9.7.0", |
| | | "axios": "^1.2.1", |
| | | "dayjs": "^1.11.13", |
| | | "docxtemplater": "^3.50.0", |
| | | "docxtemplater-image-module": "^3.1.0", |
| | | "docxtemplater-image-module-free": "^1.1.1", |
| | | "element-plus": "^2.8.3", |
| | | "exceljs": "^4.4.0", |
| | | "file-saver": "^2.0.5", |
| | | "js-base64": "^3.7.5", |
| | | "jszip": "^3.10.1", |
| | | "jszip-utils": "^0.1.0", |
| | | "md5": "^2.3.0", |
| | | "open-docxtemplater-image-module": "^1.0.3", |
| | | "pinia": "^2.0.26", |
| | | "pizzip": "^3.1.7", |
| | | "vue": "^3.2.45", |
| | | "vue-demi": "^0.14.6", |
| | | "vue-i18n": "^9.8.0", |
| | |
| | | import { $fysp } from '../index'; |
| | | |
| | | export default { |
| | | checkProblem(data) { |
| | | dailyreport(data) { |
| | | return $fysp.post(`search/dailyreport`, data).then((res) => res.data); |
| | | }, |
| | | } |
| | |
| | | import axios from 'axios'; |
| | | import { ElMessage } from 'element-plus'; |
| | | |
| | | const debug = true; |
| | | const debug = false; |
| | | |
| | | let ip1 = 'http://47.100.191.150:9005/'; |
| | | let ip1_file = 'http://47.100.191.150:9005/'; |
| | |
| | | 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'] |
| | | ElAffix: typeof import('element-plus/es')['ElAffix'] |
| | | ElAside: typeof import('element-plus/es')['ElAside'] |
| | | ElAvatar: typeof import('element-plus/es')['ElAvatar'] |
| | | ElBadge: typeof import('element-plus/es')['ElBadge'] |
| | | ElBreadcrumb: typeof import('element-plus/es')['ElBreadcrumb'] |
| | | ElBreadcrumbItem: typeof import('element-plus/es')['ElBreadcrumbItem'] |
| | | ElButton: typeof import('element-plus/es')['ElButton'] |
| | | ElButtonGroup: typeof import('element-plus/es')['ElButtonGroup'] |
| | | ElCalendar: typeof import('element-plus/es')['ElCalendar'] |
| | | ElCard: typeof import('element-plus/es')['ElCard'] |
| | | ElCascader: typeof import('element-plus/es')['ElCascader'] |
| | | ElCheckbox: typeof import('element-plus/es')['ElCheckbox'] |
| | | ElCol: typeof import('element-plus/es')['ElCol'] |
| | | ElCollapse: typeof import('element-plus/es')['ElCollapse'] |
| | | ElCollapseItem: typeof import('element-plus/es')['ElCollapseItem'] |
| | |
| | | ElDialog: typeof import('element-plus/es')['ElDialog'] |
| | | ElDivider: typeof import('element-plus/es')['ElDivider'] |
| | | ElDrawer: typeof import('element-plus/es')['ElDrawer'] |
| | | ElDropdown: typeof import('element-plus/es')['ElDropdown'] |
| | | ElDropdownItem: typeof import('element-plus/es')['ElDropdownItem'] |
| | | ElDropdownMenu: typeof import('element-plus/es')['ElDropdownMenu'] |
| | | ElEmpty: typeof import('element-plus/es')['ElEmpty'] |
| | | ElForm: typeof import('element-plus/es')['ElForm'] |
| | | ElFormItem: typeof import('element-plus/es')['ElFormItem'] |
| | |
| | | ElIcon: typeof import('element-plus/es')['ElIcon'] |
| | | ElImage: typeof import('element-plus/es')['ElImage'] |
| | | ElInput: typeof import('element-plus/es')['ElInput'] |
| | | ElInputNumber: typeof import('element-plus/es')['ElInputNumber'] |
| | | ElLink: typeof import('element-plus/es')['ElLink'] |
| | | ElMain: typeof import('element-plus/es')['ElMain'] |
| | | ElMenu: typeof import('element-plus/es')['ElMenu'] |
| | | ElMenuItem: typeof import('element-plus/es')['ElMenuItem'] |
| | | ElMenuItemGroup: typeof import('element-plus/es')['ElMenuItemGroup'] |
| | | ElOption: typeof import('element-plus/es')['ElOption'] |
| | | ElPageHeader: typeof import('element-plus/es')['ElPageHeader'] |
| | | ElPagination: typeof import('element-plus/es')['ElPagination'] |
| | | ElPopconfirm: typeof import('element-plus/es')['ElPopconfirm'] |
| | | ElPopover: typeof import('element-plus/es')['ElPopover'] |
| | | ElRadio: typeof import('element-plus/es')['ElRadio'] |
| | | ElRadioButton: typeof import('element-plus/es')['ElRadioButton'] |
| | | ElRadioGroup: typeof import('element-plus/es')['ElRadioGroup'] |
| | | ElRow: typeof import('element-plus/es')['ElRow'] |
| | | ElScrollbar: typeof import('element-plus/es')['ElScrollbar'] |
| | | ElSegmented: typeof import('element-plus/es')['ElSegmented'] |
| | | ElSelect: typeof import('element-plus/es')['ElSelect'] |
| | | ElSpace: typeof import('element-plus/es')['ElSpace'] |
| | | ElStep: typeof import('element-plus/es')['ElStep'] |
| | | ElSteps: typeof import('element-plus/es')['ElSteps'] |
| | | ElSubMenu: typeof import('element-plus/es')['ElSubMenu'] |
| | | ElSwitch: typeof import('element-plus/es')['ElSwitch'] |
| | | ElTable: typeof import('element-plus/es')['ElTable'] |
| | | ElTableColumn: typeof import('element-plus/es')['ElTableColumn'] |
| | | ElTabPane: typeof import('element-plus/es')['ElTabPane'] |
| | |
| | | ElTag: typeof import('element-plus/es')['ElTag'] |
| | | ElText: typeof import('element-plus/es')['ElText'] |
| | | ElTooltip: typeof import('element-plus/es')['ElTooltip'] |
| | | ElTransfer: typeof import('element-plus/es')['ElTransfer'] |
| | | ElTree: typeof import('element-plus/es')['ElTree'] |
| | | ElUpload: typeof import('element-plus/es')['ElUpload'] |
| | | Footer: typeof import('./components/core/Footer.vue')['default'] |
| | |
| | | @opened="$emit('update:dialogVisible', true)" |
| | | @closed="$emit('update:dialogVisible', false)" |
| | | width="66%" |
| | | title="ä»»æå¾ç" |
| | | destroy-on-close |
| | | > |
| | | <div class="main"> |
| | |
| | | v-for="item in typeList" |
| | | :key="item.typeId" |
| | | :label=" |
| | | item.typeName + ' (' + typeImgMap.get(activeId).length + ')' |
| | | item.typeName + ' (' + typeImgMap.get(item.typeId).length + ')' |
| | | " |
| | | :name="item.typeId" |
| | | > |
| | |
| | | :placeholder="placeholder" |
| | | :props="optionProps" |
| | | style="width: 320px" |
| | | v-bind="$attrs" |
| | | /> |
| | | </el-form-item> |
| | | </template> |
| | |
| | | start-placeholder="éæ©å¼å§æ¶é´" |
| | | end-placeholder="éæ©ç»ææ¶é´" |
| | | style="width: 150px" |
| | | v-bind="$attrs" |
| | | /> |
| | | </el-form-item> |
| | | </template> |
| | |
| | | }, |
| | | reset = { |
| | | do: () => {} |
| | | } |
| | | }, |
| | | }) { |
| | | if (!submit.title) submit.title = 'æäº¤'; |
| | | if (!submit.msg) submit.msg = '确认æ¯å¦æäº¤ï¼'; |
| | |
| | | icon: 'Connection', |
| | | name: 'è´¦æ·å¹é
' |
| | | } |
| | | ] |
| | | ]; |
| | | |
| | | if (import.meta.env.DEV) { |
| | | MENU_COMMON.push({ |
| | | path: '/common/docTest', |
| | | icon: 'Connection', |
| | | name: 'ææ¡£çæ' |
| | | }); |
| | | } |
| | | |
| | | const MENU_FYSP = [ |
| | | // { |
| | |
| | | { |
| | | path: '/fysp/task/manage', |
| | | icon: 'CircleCheck', |
| | | name: 'ç管任å¡', |
| | | name: 'ç管任å¡' |
| | | }, |
| | | { |
| | | path: '/fysp/sceneInfo', |
| | | icon: 'Files', |
| | | name: 'åºæ¯ä¿¡æ¯', |
| | | }, |
| | | ], |
| | | name: 'åºæ¯ä¿¡æ¯' |
| | | } |
| | | ] |
| | | }, |
| | | { |
| | | icon: 'DataAnalysis', |
| | |
| | | { |
| | | path: '/fysp/data-product/profollow', |
| | | icon: 'Document', |
| | | name: 'é®é¢å¨æè·è¸ª', |
| | | name: 'é®é¢å¨æè·è¸ª' |
| | | }, |
| | | { |
| | | path: '/fysp/data-product/proanalysis', |
| | | icon: 'Document', |
| | | name: 'é®é¢æ´æ¹åæ', |
| | | name: 'é®é¢æ´æ¹åæ' |
| | | }, |
| | | { |
| | | path: '/fysp/data-product/standardjudge', |
| | | icon: 'Document', |
| | | name: 'è§èæ§è¯ä¼°', |
| | | name: 'è§èæ§è¯ä¼°' |
| | | }, |
| | | { |
| | | path: '/fysp/data-product/dailyreport', |
| | | icon: 'Document', |
| | | name: 'æ¥æ¥ç®¡ç', |
| | | }, |
| | | ], |
| | | name: 'æ¥æ¥ç®¡ç' |
| | | } |
| | | ] |
| | | }, |
| | | { |
| | | icon: 'DataAnalysis', |
| | |
| | | { |
| | | path: '/fysp/data-product/scenereport', |
| | | icon: 'Document', |
| | | name: 'åºæ¯æ¥å', |
| | | }, |
| | | ], |
| | | name: 'åºæ¯æ¥å' |
| | | } |
| | | ] |
| | | }, |
| | | // { |
| | | // path: '/changecheck', |
| | |
| | | { |
| | | path: '/fysp/evaluation/evalutationTask', |
| | | icon: 'MessageBox', |
| | | name: 'è¯ä¼°ä»»å¡', |
| | | name: 'è¯ä¼°ä»»å¡' |
| | | }, |
| | | { |
| | | path: '/fysp/evaluation/evalutationRecord', |
| | | icon: 'Tickets', |
| | | name: 'è¯ä¼°è®°å½', |
| | | }, |
| | | ], |
| | | name: 'è¯ä¼°è®°å½' |
| | | } |
| | | ] |
| | | }, |
| | | { |
| | | icon: 'Setting', |
| | |
| | | { |
| | | path: '/fysp/config/problemType', |
| | | icon: 'List', |
| | | name: 'ç管é®é¢', |
| | | name: 'ç管é®é¢' |
| | | }, |
| | | { |
| | | path: '/fysp/config/deviceMatch', |
| | | icon: 'List', |
| | | name: '设å¤å¹é
', |
| | | name: '设å¤å¹é
' |
| | | }, |
| | | { |
| | | //è¯ä¼°è§å管ç |
| | | path: '/fysp/config/evalutationRule', |
| | | icon: 'List', |
| | | name: 'è¯ä¼°è§å', |
| | | }, |
| | | ], |
| | | name: 'è¯ä¼°è§å' |
| | | } |
| | | ] |
| | | }, |
| | | { |
| | | path: '/fysp/support', |
| | |
| | | // ] |
| | | // }, |
| | | ...MENU_COMMON |
| | | ] |
| | | ]; |
| | | |
| | | const MENU_FYTZ = [ |
| | | { |
| | |
| | | ] |
| | | }, |
| | | ...MENU_COMMON |
| | | ] |
| | | ]; |
| | | |
| | | const MENU_FYPW = [ |
| | | { |
| | |
| | | icon: 'Search', |
| | | name: 'ææ±¡æ½è¿' |
| | | } |
| | | ] |
| | | ]; |
| | | |
| | | export { MENU_FYSP, MENU_FYTZ, MENU_FYPW, MENU_COMMON } |
| | | export { MENU_FYSP, MENU_FYTZ, MENU_FYPW, MENU_COMMON }; |
| | |
| | | const dustDeviceType = [ |
| | | { |
| | | label: 'æ¬å°çæµ', |
| | | label: 'æ¬å°', |
| | | value: '1', |
| | | children: [ |
| | | { |
| | | label: 'æ¬å°çæµ', |
| | | label: 'çæµè®¾å¤', |
| | | value: '1', |
| | | }, |
| | | ], |
| | |
| | | |
| | | const fumeDeviceType = [ |
| | | { |
| | | label: 'æ²¹ççæµ', |
| | | label: 'æ²¹ç', |
| | | value: '1', |
| | | children: [ |
| | | { |
| | | label: 'æ²¹ççæµ', |
| | | label: 'çæµè®¾å¤', |
| | | value: '1', |
| | | }, |
| | | ], |
| | |
| | | |
| | | const vocDeviceType = [ |
| | | { |
| | | label: 'VOCçæµ', |
| | | label: 'VOC', |
| | | value: '1', |
| | | children: [ |
| | | { |
| | | label: 'VOCçæµ', |
| | | label: 'çæµè®¾å¤', |
| | | value: '1', |
| | | }, |
| | | ], |
| | |
| | | name: 'userMatch', |
| | | path: '/common/userMatch', |
| | | component: () => import('@/views/common/UserMatch.vue') |
| | | }, |
| | | { |
| | | //ææ¡£çææµè¯ |
| | | name: 'docTest', |
| | | path: '/common/docTest', |
| | | component: () => import('@/views/DocTest.vue') |
| | | } |
| | | ] |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | import JSZipUtils from 'jszip-utils'; |
| | | import JSZip from 'jszip'; |
| | | import docxtemplater from 'docxtemplater'; |
| | | import ImageModule from 'docxtemplater-image-module-free'; |
| | | import Pizzip from 'pizzip'; |
| | | import PizZipUtils from 'pizzip/utils/dist/pizzip-utils'; |
| | | import FileSaver from 'file-saver'; |
| | | import fs from 'fs'; |
| | | |
| | | /** |
| | | * è·åå¾çé
ç½®ä¿¡æ¯ |
| | | * @param {Number} horizontalHeight å¾ç宽度大äºé«åº¦æ¶ï¼éå¶å
¶é«åº¦ |
| | | * @param {Number} verticalWidth å¾ç宽度å°äºé«åº¦æ¶ï¼éå¶å
¶å®½åº¦ |
| | | * @returns |
| | | */ |
| | | function getImageOptions(options) { |
| | | const horizontalHeight = options ? options.horizontalHeight : undefined |
| | | const verticalWidth = options ? options.verticalWidth : undefined |
| | | return { |
| | | centered: false, |
| | | fileType: 'docx', |
| | | getImage(tagValue) { |
| | | // In this case tagValue will be a URL tagValue = "https://docxtemplater.com/puffin.png" |
| | | return new Promise(function (resolve, reject) { |
| | | JSZipUtils.getBinaryContent(tagValue, function (error, content) { |
| | | if (error) { |
| | | return reject(error); |
| | | } |
| | | return resolve(content); |
| | | }); |
| | | }); |
| | | }, |
| | | getSize(img, tagValue, tagName) { |
| | | return new Promise(function (resolve, reject) { |
| | | const image = new Image(); |
| | | image.src = tagValue; |
| | | image.onload = function () { |
| | | let width = image.width; |
| | | let height = image.height; |
| | | // console.log('width height', width, height); |
| | | |
| | | if (width > height && horizontalHeight && height > horizontalHeight) { |
| | | const scale = image.height / horizontalHeight; |
| | | height = horizontalHeight; |
| | | width = image.width / scale; |
| | | } else if (width <= height && verticalWidth && width > verticalWidth) { |
| | | const scale = image.width / verticalWidth; |
| | | width = verticalWidth; |
| | | height = image.height / scale; |
| | | } |
| | | // console.log('scale', width, height); |
| | | |
| | | resolve([width, height]); |
| | | }; |
| | | image.onerror = function (e) { |
| | | console.log('img, tagValue, tagName : ', img, tagValue, tagName); |
| | | alert('An error occured while loading ' + tagValue); |
| | | reject(e); |
| | | }; |
| | | }); |
| | | } |
| | | }; |
| | | } |
| | | |
| | | export const exportDocx = (tempDocpath, data, zipName, imageSize) => { |
| | | return new Promise((resolve, reject) => { |
| | | JSZipUtils.getBinaryContent(tempDocpath, (error, content) => { |
| | | if (error) { |
| | | reject(error); |
| | | throw error; |
| | | } |
| | | const zip = new Pizzip(content); |
| | | const imageOptions = getImageOptions(imageSize); |
| | | let doc = new docxtemplater() |
| | | .setOptions({ paragraphLoop: true }) |
| | | .loadZip(zip) |
| | | .attachModule(new ImageModule(imageOptions)) |
| | | .compile(); |
| | | doc.resolveData(data).then(() => { |
| | | try { |
| | | doc.render(); |
| | | } catch (error) { |
| | | console.log(error); |
| | | throw error; |
| | | } |
| | | const out = doc.getZip().generate({ |
| | | type: 'blob', |
| | | mimeType: |
| | | 'application/vnd.openxmlformats-officedocumnet.wordprocessingml.document' |
| | | }); |
| | | FileSaver.saveAs(out, zipName); |
| | | resolve(); |
| | | }); |
| | | }); |
| | | }); |
| | | }; |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div> |
| | | <el-button type="primary" @click="export_doc">å¯¼åºææ¡£</el-button> |
| | | </div> |
| | | </template> |
| | | <script setup> |
| | | import { exportDocx } from '@/utils/doc'; |
| | | |
| | | const param = { |
| | | month: 11, |
| | | day: 4, |
| | | index: 5, |
| | | hasMoreDays: false, |
| | | endMonth: 11, |
| | | endDay: 6, |
| | | totalScene: 16, |
| | | sceneNumTxt: 'å·¥å°10个ãç 头6个', |
| | | proNum: 23, |
| | | changeNum: 19, |
| | | unChangeNum: 4, |
| | | table1: [ |
| | | { |
| | | sIndex: 1, |
| | | sType: 'å·¥å°', |
| | | sName: '䏿µ·çµå½±èºæ¯èä¸å¦é¢æ°å»ºéå±±æ ¡åºé¡¹ç®', |
| | | sLocation: 'ä¸è´¤è·¯åº·åè·¯', |
| | | sProblemList: [ |
| | | '1ãæ¸£åå±é¨æªè¦ç', |
| | | '2ãæ£è´§ç©æé²å¤©å æ¾æªè¦ç', |
| | | '3ãå·¥å°å
夿¡éè·¯ææ¾æ³¥ç/æ³¥æ³/积å°/éæ', |
| | | '4ãå·¥å°åºå
¥å£100ç±³éè·¯ææ¾ç§¯å°/éæ/è½®èæ³¥å°' |
| | | ], |
| | | sTown: 'å¼ å °é', |
| | | sChange: 'å·²æ´æ¹' |
| | | }, |
| | | { |
| | | sIndex: 2, |
| | | sType: 'å·¥å°', |
| | | sName: '䏿µ·äº¤é大å¦å»å¦é¢éå±çéå»é¢éå±±é¢åºé¡¹ç®', |
| | | sLocation: |
| | | 'éå±±åºäºæé36-05å°åï¼äºè¹è·¯ä»¥ä¸ãæé¡ºè·¯ä»¥åãæ²æµ·é«é以西ã大äºå
¬è·¯ä»¥å', |
| | | sProblemList: [ |
| | | '1ã室夿¨æåå²çæ¨å·¥ä½ä¸', |
| | | '2ãå·¥å°å
夿¡éè·¯ææ¾æ³¥ç/æ³¥æ³/积å°/éæ', |
| | | '3ãæ£è´§ç©æé²å¤©å æ¾æªè¦ç', |
| | | '4ã大é¢ç§¯é²å¤©è£¸åæ é²å°æªæ½' |
| | | ], |
| | | sTown: 'äºæé', |
| | | sChange: 'å·²æ´æ¹' |
| | | }, |
| | | { |
| | | sIndex: 3, |
| | | sType: 'å·¥å°', |
| | | sName: '大信.ä¸ä¿¡æµ·ç´å䏿 äººæºæ»é¨åºå°é¡¹ç®', |
| | | sLocation: 'ä¸èªç¶å°åï¼è¥¿æ°æ³¾ï¼åé»ææ³¾ï¼åèªç¶å°å', |
| | | sProblemList: ['1ãåºå
¥å£è½¦è½®æ³¥ç', '2ã主é路泥æ³'], |
| | | sTown: '髿°åº', |
| | | sChange: 'å·²æ´æ¹' |
| | | } |
| | | ] |
| | | }; |
| | | |
| | | function export_doc() { |
| | | exportDocx( |
| | | '/ç§å¬å£ç©ºæ°è´¨éæ»åå·¥ä½æç¤ºæ¨¡æ¿.docx', |
| | | param, |
| | | 'å·¥ä½æç¤º.docx' |
| | | ); |
| | | } |
| | | </script> |
| | |
| | | v-for="item in typeList" |
| | | :key="item.businesstypeid" |
| | | :label=" |
| | | item.businesstype + ' (' + typeImgMap.get(activeId).length + ')' |
| | | item.businesstype + ' (' + typeImgMap.get(item.businesstypeid).length + ')' |
| | | " |
| | | :name="item.businesstypeid" |
| | | > |
| | | </el-tab-pane> |
| | | </el-tabs> |
| | | <el-empty v-if="isEmpty" description="ææ è®°å½" /> |
| | | <el-scrollbar class="imgs"> |
| | | <el-scrollbar v-else class="imgs"> |
| | | <el-image |
| | | v-for="(img, i) in typeImgMap.get(activeId)" |
| | | :key="i" |
| | |
| | | <el-tab-pane v-for="item in typeList" :label="item.label" :name="item.id"> </el-tab-pane> |
| | | </el-tabs> |
| | | <el-empty v-if="imgObjList.length == 0" description="ææ è®°å½" /> |
| | | <div class="imgs"> |
| | | <el-scrollbar v-else class="imgs"> |
| | | <el-image |
| | | v-for="(img, i) in imgObjList" |
| | | :class="[Boolean(img.isSelect) ? 'selected' : 'noActive', 'image']" |
| | |
| | | lazy |
| | | @click="onSelect(img, i)" |
| | | /> |
| | | </div> |
| | | </el-scrollbar> |
| | | </div> |
| | | </div> |
| | | </template> |
| | |
| | | } */ |
| | | |
| | | .imgs { |
| | | height: 650px; |
| | | height: 50vh; |
| | | width: 90%; |
| | | min-height: 100px !important; |
| | | /* border-style:solid; |
| | |
| | | padding: 5px; |
| | | } |
| | | |
| | | .el-dialog__body { |
| | | ::v-deep .el-dialog__body { |
| | | height: 60vh; |
| | | padding: 10px calc(var(--el-dialog-padding-primary) + 10px) !important; |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <FYImageSelectDialog |
| | | :typeList="typeList" |
| | | :typeImgMap="typeImgMap" |
| | | :maxSelect="1" |
| | | ></FYImageSelectDialog> |
| | | </template> |
| | | <script setup> |
| | | import { ref, watch, computed } from 'vue'; |
| | | |
| | | const props = defineProps({ |
| | | // å±ç¤ºæ¨¡å¼ |
| | | mode: { |
| | | type: Number, |
| | | default: 0 |
| | | }, |
| | | pics: Array |
| | | }); |
| | | // typeList: [ |
| | | // { id: 0, label: 'çæ§è®¾å¤' }, |
| | | // { id: 1, label: 'æ²»ç设å¤' }, |
| | | // { id: 2, label: 'ç产设å¤' } |
| | | // ], |
| | | const typeList = computed(() => { |
| | | if (props.mode == 0) { |
| | | return [{ typeId: 0, typeName: 'çæ§è®¾å¤' }]; |
| | | } else if (props.mode == 1) { |
| | | return [{ typeId: 1, typeName: 'æ´æ¹' }]; |
| | | } else { |
| | | return [{ typeId: 1, typeName: 'æªæå®' }]; |
| | | } |
| | | }); |
| | | const typeImgMap = ref(new Map()); |
| | | |
| | | watch( |
| | | () => props.pics, |
| | | (nV, oV) => { |
| | | nV.forEach(e => { |
| | | if (!typeImgMap.value.has(e.topTypeId)) { |
| | | typeImgMap.value.set(e.topTypeId, []) |
| | | } |
| | | typeImgMap.value.get(r.topTypeId).push({}) |
| | | }); |
| | | typeImgMap.value.set( |
| | | 1, |
| | | nV.map((v) => { |
| | | return { url: v }; |
| | | }) |
| | | ); |
| | | }, |
| | | { immediate: true } |
| | | ); |
| | | </script> |
| | |
| | | <template> |
| | | <!-- 主å
容 --> |
| | | <FYSearchBar ref="searchRef" @search="search" :loading="loading"> |
| | | <template #options> |
| | | <!-- åºå¿ --> |
| | | <FYOptionLocation |
| | | :allOption="false" |
| | | :level="3" |
| | | :checkStrictly="false" |
| | | v-model:value="formSearch.locations" |
| | | style="width: 300px" |
| | | ></FYOptionLocation> |
| | | <!-- åºæ¯ç±»å --> |
| | | <!-- <FYOptionScene |
| | | :allOption="true" |
| | | :type="2" |
| | | v-model:value="formSearch.scenetype" |
| | | ></FYOptionScene> --> |
| | | <!-- æ¶é´ --> |
| | | <FYOptionTime |
| | | :initValue="false" |
| | | type="datetimerange" |
| | | v-model:value="formSearch.timeArray" |
| | | style="width: 250px" |
| | | ></FYOptionTime> |
| | | </template> |
| | | <template #buttons> |
| | | <el-button |
| | | icon="Download" |
| | | type="primary" |
| | | class="" |
| | | :loading="docLoading" |
| | | :disabled="!docParam" |
| | | @click="genWord()" |
| | | > |
| | | çææ¥å |
| | | </el-button> |
| | | <el-button |
| | | icon="Download" |
| | | type="success" |
| | | class="" |
| | | :disabled="!docParam" |
| | | @click="exportToExcel()" |
| | | > |
| | | ä¸è½½è¡¨æ ¼ |
| | | </el-button> |
| | | </template> |
| | | </FYSearchBar> |
| | | |
| | | <div class="m-task container"> |
| | | <!--头é¨ä¿¡æ¯--> |
| | | <div class="h-top col-md-12"> |
| | | <div class="options"> |
| | | <!-- <input type="date" class="c-time c-check" /> --> |
| | | <!-- æ¶é´ --> |
| | | <el-form-item label="æ¶é´" :prop="prop" style="margin-left: 10px"> |
| | | <el-date-picker |
| | | v-model="formSearch.time" |
| | | type="date" |
| | | placeholder="éæ©æ¶é´" |
| | | start-placeholder="éæ©å¼å§æ¶é´" |
| | | end-placeholder="éæ©ç»ææ¶é´" |
| | | style="width: 180px" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="åºå" :prop="prop" style="margin-left: 10px"> |
| | | <el-select |
| | | placeholder="Select" |
| | | v-model="formSearch.districtCode" |
| | | class="c-area c-check" |
| | | style="width: 100px" |
| | | > |
| | | <el-option label="éå±±åº" value="310116"></el-option> |
| | | <el-option label="éå®åº" value="310106"></el-option> |
| | | <el-option label="徿±åº" value="310104"></el-option> |
| | | <el-option label="é¿å®åº" value="310105"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | |
| | | <el-button |
| | | style="margin-left: 10px" |
| | | class="check-msg" |
| | | @click="search" |
| | | type="primary" |
| | | >æ¥è¯¢</el-button |
| | | > |
| | | <el-button type="primary" class="" @click="exportToExcel()"> |
| | | çææ¥å |
| | | </el-button> |
| | | </div> |
| | | <div class="m-top"> |
| | | <span class="title-input"> {{ reportName }} </span> |
| | | <!-- <input |
| | |
| | | </div> |
| | | |
| | | <div class="m-msg col-md-12"> |
| | | <span |
| | | name="desc" |
| | | class="desc-textarea" |
| | | rows="5" |
| | | value="" |
| | | cols="" |
| | | disabled |
| | | ></span> |
| | | <span>{{ descMsg }}</span> |
| | | <div class="report-table row"> |
| | | <table id="table_subtask" class="" border="1"></table> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="dark-screen"> |
| | | <i class="fa fa-spinner fa-spin fa-3x" style="color: white"></i> |
| | | </div> |
| | | </div> |
| | | </template> |
| | |
| | | import * as XLSX from 'xlsx'; |
| | | import FileSaver from 'file-saver'; |
| | | import analysisApi from '@/api/fysp/analysisApi.js'; |
| | | import { exportDocx } from '@/utils/doc'; |
| | | |
| | | export default { |
| | | name: 'DailyReport', |
| | | computed: { |
| | | reportName() { |
| | | var city = ''; |
| | | switch (this.formSearch.districtCode) { |
| | | case '310116': |
| | | city = 'éå±±åº'; |
| | | break; |
| | | case '310106': |
| | | city = 'éå®åº'; |
| | | break; |
| | | case '310104': |
| | | city = '徿±åº'; |
| | | break; |
| | | case '310105': |
| | | city = 'é¿å®åº'; |
| | | break; |
| | | } |
| | | |
| | | let title = `${city}æ¬å°æ±¡æè¾
å©çç®¡å·¥ä½æ¥æ¥`; |
| | | return title; |
| | | return `${this.formSearch.locations.dName}æ¬å°æ±¡æè¾
å©çç®¡å·¥ä½æ¥æ¥`; |
| | | } |
| | | }, |
| | | data() { |
| | |
| | | headers: [], |
| | | data: [] |
| | | }, |
| | | loading: false, |
| | | formSearch: { |
| | | locations: {}, |
| | | scenetype: {}, |
| | | time: [], |
| | | timeArray: [new Date(), new Date()], |
| | | districtCode: '310116' |
| | | } |
| | | }, |
| | | descMsg: '', |
| | | // å¯¼åºæ¥ååæ° |
| | | docParam: undefined, |
| | | docLoading: false |
| | | }; |
| | | }, |
| | | watch: { |
| | |
| | | `${this.reportName}.xlsx` |
| | | ); |
| | | }, |
| | | downloadFile() { |
| | | // æä»¶æ é¢ |
| | | let title = this.reportName; |
| | | // 表头æè¿° |
| | | let desc = document.querySelector('.desc-textarea').textContent; |
| | | // æ¶é´ |
| | | let time = document |
| | | .querySelector('.desc-textarea') |
| | | .textContent.split('ï¼')[0]; |
| | | |
| | | // è·åæ°æ® |
| | | let thData = Array.from(document.getElementsByTagName('th')).map( |
| | | (th) => th.innerText |
| | | ); |
| | | let tdData = Array.from(document.getElementsByTagName('td')).map( |
| | | (td) => td.innerText |
| | | ); |
| | | let totalList = []; |
| | | let subList = []; |
| | | let index = 2; |
| | | |
| | | let inputStatus = true; |
| | | for (let j = 0; j < thData.length; j++) { |
| | | subList.push(thData[j]); |
| | | } |
| | | totalList.push(subList); |
| | | subList = []; |
| | | |
| | | for (let i = 0; i < tdData.length; i++) { |
| | | if (tdData[i] !== String(index)) { |
| | | if (tdData[i] !== '') { |
| | | subList.push(tdData[i]); |
| | | } else { |
| | | if (inputStatus) { |
| | | let inputList = document.querySelectorAll(`.input-${subList[0]}`); |
| | | for (let j = 0; j < inputList.length; j++) { |
| | | subList.push(inputList[j].value); |
| | | } |
| | | inputStatus = false; |
| | | } else { |
| | | inputStatus = true; |
| | | } |
| | | } |
| | | } else { |
| | | totalList.push(subList); |
| | | subList = [String(index)]; |
| | | index += 1; |
| | | } |
| | | } |
| | | totalList.push(subList); |
| | | |
| | | // index: 0 head |
| | | // other: data |
| | | // title |
| | | |
| | | let fileData = { |
| | | title: title, |
| | | time: time, |
| | | desc: desc, |
| | | data: totalList |
| | | }; |
| | | |
| | | // if (fileData.title && fileData.time && fileData.desc && fileData.data.length) { |
| | | // fetch("http://47.100.191.150:9002/dustmonitor/report", { |
| | | // method: "POST", |
| | | // headers: { |
| | | // "Content-Type": "application/json" |
| | | // }, |
| | | // body: JSON.stringify(fileData) |
| | | // }) |
| | | // .then(response => response.json()) |
| | | // .then(res => { |
| | | // if (res.status === 200) { |
| | | // let name = res.name.split("./")[1]; |
| | | // setTimeout(() => { |
| | | // let a = document.createElement("a"); |
| | | // a.href = appConfig.downloadUrl + name; |
| | | // a.download = name; // 设置ä¸è½½æä»¶å |
| | | // document.body.appendChild(a); |
| | | // a.click(); |
| | | // document.body.removeChild(a); |
| | | // }, 1000); |
| | | // } |
| | | // }) |
| | | // .catch(error => console.error("Error:", error)); |
| | | // } |
| | | }, |
| | | search() { |
| | | let sTime = dayjs(this.formSearch.time).hour(0).minute(0).second(0); |
| | | let eTime = dayjs(this.formSearch.time).hour(23).minute(59).second(59); |
| | | eTime = eTime.toISOString(); |
| | | sTime = sTime.toISOString(); |
| | | let sTime = dayjs(this.formSearch.timeArray[0]) |
| | | .hour(0) |
| | | .minute(0) |
| | | .second(0) |
| | | .millisecond(0); |
| | | let eTime = dayjs(this.formSearch.timeArray[1]) |
| | | .hour(23) |
| | | .minute(59) |
| | | .second(59) |
| | | .millisecond(0); |
| | | // eTime = eTime.toISOString(); |
| | | // sTime = sTime.toISOString(); |
| | | |
| | | let config = { |
| | | startTime: sTime, |
| | | endTime: eTime, |
| | | districtCode: this.formSearch.districtCode |
| | | startTime: sTime.toDate(), |
| | | endTime: eTime.toDate(), |
| | | districtCode: this.formSearch.locations.dCode |
| | | }; |
| | | analysisApi.checkProblem(config).then((res) => { |
| | | this.loading = true; |
| | | analysisApi |
| | | .dailyreport(config) |
| | | .then((res) => { |
| | | this.table.headers = res.tableTitle[0]; |
| | | this.table.data = res.tableContent; |
| | | |
| | |
| | | const countMap = new Map(); //ååºæ¯æ°é |
| | | let proCount = 0; //æ»è®¡é®é¢æ°é |
| | | let changeCount = 0; //æ»è®¡æ´æ¹æ°é |
| | | const tableRows = []; |
| | | |
| | | res.tableContent.forEach((cList) => { |
| | | const sceneType = cList[2]; |
| | |
| | | countMap[sceneType] += 1; |
| | | proCount += Number(cList[10]); |
| | | changeCount += Number(cList[13]); |
| | | |
| | | tableRows.push({ |
| | | sIndex: cList[0], |
| | | sType: sceneType, |
| | | sName: cList[3], |
| | | sLocation: cList[4], |
| | | sProblemList: cList[8].split('\n'), |
| | | time: cList[6], |
| | | sTown: cList[5], |
| | | sChangeList: cList[11].split('\n') |
| | | }); |
| | | }); |
| | | |
| | | let countStr = ''; |
| | |
| | | } |
| | | countStr += `${key}${e}个`; |
| | | } |
| | | this.descMsg = `å
±å·¡æ¥${res.tableContent.length}个æ¬å°åºæ¯ï¼${countStr}ï¼ï¼å
±åç°é®é¢${proCount}项ï¼ç£ä¿æ´æ¹äº${changeCount}项ã`; |
| | | |
| | | var descMsg = `å
±å·¡æ¥${res.tableContent.length}个æ¬å°åºæ¯ï¼${countStr}ï¼ï¼å
±åç°é®é¢${proCount}项ï¼ç£ä¿æ´æ¹äº${changeCount}项ï¼åæä½çé®é¢åå·²é项ã`; |
| | | console.log('descMsg', descMsg); |
| | | |
| | | // è·åææç±»å为 'desc-textarea' çå
ç´ |
| | | const textareas = document.querySelectorAll('.desc-textarea'); |
| | | |
| | | // éåè¿äºå
ç´ å¹¶è®¾ç½®å
¶ HTML å
容 |
| | | textareas.forEach(function (textarea) { |
| | | textarea.innerHTML = descMsg; |
| | | }); |
| | | // $('.desc-textarea').html(''); |
| | | // $('.desc-textarea').html(descMsg); |
| | | }); |
| | | this.docParam = { |
| | | month: sTime.month() + 1, |
| | | day: sTime.date(), |
| | | index: 1, |
| | | hasMoreDays: !sTime.isSame(eTime, 'day'), |
| | | endMonth: eTime.month() + 1, |
| | | endDay: eTime.date(), |
| | | totalScene: res.tableContent.length, |
| | | sceneNumTxt: countStr, |
| | | proNum: proCount, |
| | | changeNum: changeCount, |
| | | unChangeNum: proCount - changeCount, |
| | | table1: tableRows |
| | | }; |
| | | }) |
| | | .finally(() => (this.loading = false)); |
| | | }, |
| | | // çæwordæ¥å |
| | | genWord() { |
| | | if (this.docParam) { |
| | | const param = this.docParam; |
| | | exportDocx( |
| | | '/ç§å¬å£ç©ºæ°è´¨éæ»åå·¥ä½æç¤ºæ¨¡æ¿.docx', |
| | | param, |
| | | `ç§å¬å£ç©ºæ°è´¨éæ»åå·¥ä½æç¤ºï¼${param.month}æ${param.day}æ¥ï¼.docx` |
| | | ); |
| | | } |
| | | } |
| | | } |
| | | }; |
| | |
| | | <template #main> |
| | | <el-scrollbar class="el-scrollbar" v-loading="mainLoading"> |
| | | <CompSceneConstructionInfo |
| | | title="Aãå·¥å°åºæ¬ä¿¡æ¯" |
| | | title="Aãåºæ¬ä¿¡æ¯" |
| | | :scene="formScene" |
| | | :form-info="formSubScene" |
| | | /> |
| | | <div><el-text type="">éå¾çï¼</el-text></div> |
| | | <CompImgInfo |
| | | title="æ½å·¥éç" |
| | | v-model:title="imgTitle" |
| | | :img-src="sceneImg.url" |
| | | @change="anyPhotoDialog = true" |
| | | ></CompImgInfo> |
| | |
| | | v-for="(item, i) in deviceList" |
| | | :key="i" |
| | | down-title |
| | | :title="item._deviceTypeName" |
| | | v-model:title="item._deviceTypeName" |
| | | :img-src="item._showStatusPic" |
| | | @change="showDevicePhotoDialog(item)" |
| | | @change="showDevicePhotoDialog(item, i)" |
| | | ></CompImgInfo> |
| | | </el-space> |
| | | <el-divider /> |
| | |
| | | v-for="(item, i) in curProList" |
| | | :key="i" |
| | | :problem="item" |
| | | @change="(value) => handleProPicSelect(value, i)" |
| | | ></CompProblemTable> |
| | | </el-space> |
| | | <el-divider /> |
| | | <el-text tag="h1">Dãæ¬å°æ±¡æé²æ²»å»ºè®®</el-text> |
| | | |
| | | <div class="p-b-8"> |
| | | éå¯¹è¯¥å·¥å°æ¬æå·¡æ¥åç°çé®é¢ï¼è¯ä¼°ä¸ºæ¬å°æ±¡æé²æ²» |
| | | <el-radio-group v-model="radioStandard" size="default"> |
| | | <el-radio value="è§è" border>è§è</el-radio> |
| | | <el-radio value="åºæ¬è§è" border>åºæ¬è§è</el-radio> |
| | | <el-radio value="ä¸è§è" border>ä¸è§è</el-radio> |
| | | <el-radio value="严éä¸è§è" border>严éä¸è§è</el-radio> |
| | | </el-radio-group> |
| | | å·¥å°ï¼å»ºè®®è¯¥å·¥å°ä¸¥æ ¼æç
§ãæ¬å°é²æ²»æ¹æ¡ãããæ¬å°é²æ²»æ¿è¯ºä¹¦ãããæææ½å·¥ç®¡çè§èãããç²¾ç»åç®¡çææ ãçç¸å
³æä»¶è½å®æ´æ¹ã |
| | | </div> |
| | | <el-row justify="center" style="height: 200px"> |
| | | <el-button |
| | | icon="Download" |
| | | type="primary" |
| | | :loading="docLoading" |
| | | :disabled="!sceneImg.url" |
| | | @click="genWord()" |
| | | > |
| | | çææ¥å |
| | | </el-button> |
| | | </el-row> |
| | | </el-scrollbar> |
| | | </template> |
| | | </BaseContentLayout> |
| | |
| | | import taskApi from '@/api/fysp/taskApi'; |
| | | import sceneApi from '@/api/fysp/sceneApi'; |
| | | import deviceApi from '@/api/fysp/deviceApi'; |
| | | import evaluateApi from '@/api/fysp/evaluateApi'; |
| | | import { formatDeviceList } from '@/model/fysp/device'; |
| | | import { enumDevice, toLabel } from '@/enum/device/device'; |
| | | import { exportDocx } from '@/utils/doc'; |
| | | import right_triangle from '@/assets/image/right_triangle.png'; |
| | | |
| | | import CompSceneConstructionInfo from '@/views/fysp/scene/CompSceneConstructionInfo.vue'; |
| | | import ArbitraryPhoto from '@/views/fysp/check/components/ArbitraryPhoto.vue'; |
| | | import CompDevicePhono from '@/views/fysp/check/components/CompDevicePhono.vue'; |
| | | import CompImgInfo from '@/views/fysp/data-product/components/CompImgInfo.vue'; |
| | | import CompProblemTable from './components/CompProblemTable.vue'; |
| | | import dayjs from 'dayjs'; |
| | | |
| | | /************************* 左侧巡æ¥ä»»å¡éå **********************************/ |
| | | const curSubtask = ref({}); |
| | |
| | | }); |
| | | fetchDeviceList(s); |
| | | fetchProblems(s); |
| | | fetchEvaluation(s); |
| | | } |
| | | |
| | | /************************* åºæ¯åºæ¬ä¿¡æ¯ **********************************/ |
| | | const imgTitle = ref('æ½å·¥éç'); |
| | | const formScene = ref({}); |
| | | const formSubScene = ref({}); |
| | | function fetchSceneInfo(sceneId) { |
| | | formSubScene.value = {}; |
| | | sceneImg.value = {}; |
| | | return sceneApi.getSceneDetail(sceneId).then((res) => { |
| | | //åºæ¯ |
| | | // if (res.data.scense) formScene = res.data.scense; |
| | | if (res.data.scense) formScene.value = res.data.scense; |
| | | formSubScene.value = res.data.subScene ? res.data.subScene : {}; |
| | | // if (res.data.sceneDevice) { |
| | | // formSceneDevice = res.data.sceneDevice; |
| | |
| | | |
| | | // 设å¤å¾çéæ©å¯¹è¯æ¡ |
| | | const deiveceImgDialog = ref(false); |
| | | const showDeviceImg = ref({}); |
| | | const showDeviceIndex = ref(0); |
| | | const showDeviceImgList = ref([]); |
| | | // 设å¤å¾çå表 |
| | | const deviceList = ref([]); |
| | | |
| | | function showDevicePhotoDialog(device) { |
| | | function showDevicePhotoDialog(device, index) { |
| | | showDeviceIndex.value = index; |
| | | deiveceImgDialog.value = true; |
| | | showDeviceImgList.value = []; |
| | | let imgList = []; |
| | |
| | | }) |
| | | ); |
| | | }); |
| | | console.log(imgList); |
| | | // console.log(imgList); |
| | | |
| | | showDeviceImgList.value = imgList; |
| | | } |
| | |
| | | function handleSelectDevicePhoto(data) { |
| | | deiveceImgDialog.value = false; |
| | | if (data.length > 0) { |
| | | showDeviceImg.value = { url: data[0].url }; |
| | | deviceList.value[showDeviceIndex.value]._showStatusPic = data[0]._picUrl; |
| | | } |
| | | } |
| | | |
| | |
| | | } |
| | | } |
| | | /************************* ç°åºå·¡æ¥æ
åµï¼é®é¢ä¸æ´æ¹ï¼ **********************************/ |
| | | |
| | | const problemDesc = ref(''); |
| | | //å½åä»»å¡çé®é¢å表 |
| | | const curProList = ref([]); |
| | | const month = ref(''); |
| | | const selectedProList = ref([]); |
| | | |
| | | function fetchProblems(s) { |
| | | curProList.value = []; |
| | | taskApi.getProBySubtask(s.data.stGuid).then((res) => { |
| | | curProList.value = res; |
| | | |
| | | // çæå·¡æ¥æè¿°ææ¬ |
| | | month.value = dayjs(s.data.stPlanTime).month() + 1; |
| | | const proCount = curProList.value.length; |
| | | problemDesc.value = `${month.value}æå·¡æ¥å
±è®¡åç°${proCount}个é®é¢`; |
| | | if (proCount > 0) { |
| | | problemDesc.value += 'ï¼'; |
| | | curProList.value.forEach((p, i) => { |
| | | problemDesc.value += `${i + 1}ã${p.problemname}ï¼`; |
| | | }); |
| | | problemDesc.value += 'å¦ä¸å¾æç¤ºï¼'; |
| | | } else { |
| | | problemDesc.value += 'ã'; |
| | | } |
| | | |
| | | // çæéä¸çé®é¢åæ´æ¹å¾çæè¿° |
| | | selectedProList.value = curProList.value.map((v) => { |
| | | return {}; |
| | | }); |
| | | }); |
| | | } |
| | | |
| | | function handleProPicSelect(value, index) { |
| | | selectedProList.value[index] = value; |
| | | } |
| | | /************************* æ¬å°é²æ²»å»ºè®® **********************************/ |
| | | const radioStandard = ref('è§è'); |
| | | function fetchEvaluation(s) { |
| | | evaluateApi.fetchItemEvaluation(s.data.stGuid).then((res) => { |
| | | radioStandard.value = res.data.grade; |
| | | }); |
| | | } |
| | | |
| | | /************************* çææ¥å **********************************/ |
| | | |
| | | const docLoading = ref(false); |
| | | // çæwordæ¥å |
| | | function genWord() { |
| | | const _deviceList = []; |
| | | for (let i = 0; i < deviceList.value.length; i += 2) { |
| | | const d1 = deviceList.value[i]; |
| | | const d2 = |
| | | i + 1 < deviceList.value.length ? deviceList.value[i + 1] : undefined; |
| | | _deviceList.push({ |
| | | _showStatusPic_1: d1._showStatusPic, |
| | | _deviceTypeName_1: d1._deviceTypeName, |
| | | // hasPic2: d2 ? true : false, |
| | | _showStatusPic_2: d2 ? d2._showStatusPic : right_triangle, |
| | | _deviceTypeName_2: d2 ? d2._deviceTypeName : '' |
| | | }); |
| | | } |
| | | const param = { |
| | | index: formScene.value.index, |
| | | sceneName: formScene.value.name, |
| | | projectType: formSubScene.value.csProjectType, |
| | | stage: formSubScene.value.siExtension1, |
| | | startTime: formSubScene.value.csStartTime, |
| | | endTime: formSubScene.value.csEndTime, |
| | | leftTime: formSubScene.value.csLeftTime, |
| | | location: formScene.value.location, |
| | | floorSpace: formSubScene.value.csFloorSpace, |
| | | constructionArea: formSubScene.value.csConstructionArea, |
| | | constructionAreaPerMonth: formSubScene.value.csConstructionAreaPerMonth, |
| | | contacts: formScene.value.contacts, |
| | | contactst: formScene.value.contactst, |
| | | securityOfficer: formSubScene.value.csSecurityOfficer, |
| | | securityOfficerTel: formSubScene.value.csSecurityOfficerTel, |
| | | constructionUnit: formSubScene.value.csConstructionUnit, |
| | | employerUnit: formSubScene.value.csEmployerUnit, |
| | | sceneType: formScene.value.type, |
| | | imgTitle: imgTitle.value, |
| | | imgTitle_url: sceneImg.value.url, |
| | | deviceList: _deviceList, |
| | | problemDesc: problemDesc.value, |
| | | problemList: selectedProList.value.map((v) => { |
| | | return { |
| | | month: month.value, |
| | | ...v |
| | | }; |
| | | }), |
| | | standard_1: radioStandard.value == 'è§è', |
| | | standard_2: radioStandard.value == 'åºæ¬è§è', |
| | | standard_3: radioStandard.value == 'ä¸è§è', |
| | | standard_4: radioStandard.value == '严éè§è' |
| | | }; |
| | | for (const key in param) { |
| | | if (param[key] == undefined) { |
| | | param[key] = ''; |
| | | } |
| | | } |
| | | const date = dayjs(curSubtask.value.data.stPlanTime).format('MMæDDæ¥'); |
| | | console.log(param); |
| | | |
| | | docLoading.value = true; |
| | | exportDocx( |
| | | '/å使¨¡ç.docx', |
| | | param, |
| | | `${param.sceneName}åä½ï¼${date}ï¼.docx`, |
| | | { |
| | | horizontalHeight: 368, |
| | | verticalWidth: 266 |
| | | } |
| | | ).finally(() => (docLoading.value = false)); |
| | | } |
| | | </script> |
| | |
| | | <tr v-if="!downTitle"> |
| | | <td> |
| | | <el-row justify="space-between" align="middle"> |
| | | {{ title }} |
| | | <el-button size="small" @click="$emit('change')">{{ |
| | | btnName |
| | | }}</el-button> |
| | | <!-- {{ title }} --> |
| | | <el-input |
| | | size="small" |
| | | :model-value="title" |
| | | @input="handleInputChange" |
| | | placeholder="æ é¢" |
| | | style="width: 150px" |
| | | /> |
| | | </el-row> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <td> |
| | | <td style="position: relative"> |
| | | <el-image |
| | | class="image" |
| | | :src="imgSrc" |
| | |
| | | </div> |
| | | </template> |
| | | </el-image> |
| | | <el-button class="pop-button" size="small" @click="$emit('change')">{{ |
| | | btnName |
| | | }}</el-button> |
| | | </td> |
| | | </tr> |
| | | <tr v-if="downTitle"> |
| | | <td> |
| | | <el-row justify="space-between" align="middle"> |
| | | {{ title }} |
| | | <el-button size="small" @click="$emit('change')">{{ |
| | | btnName |
| | | }}</el-button> |
| | | <!-- {{ title }} --> |
| | | <el-input |
| | | size="small" |
| | | :model-value="title" |
| | | @input="handleInputChange" |
| | | placeholder="æ é¢" |
| | | style="width: 150px" |
| | | /> |
| | | </el-row> |
| | | </td> |
| | | </tr> |
| | |
| | | |
| | | // const unchangeImg = '../../../../assets/image/unchange.png' |
| | | |
| | | const emit = defineEmits(['change']); |
| | | const emit = defineEmits(['change', 'update:title']); |
| | | |
| | | function handleInputChange(value) { |
| | | emit('update:title', value); |
| | | } |
| | | </script> |
| | | <style scoped> |
| | | .image { |
| | |
| | | height: 100%; |
| | | background: var(--el-fill-color-light); |
| | | } |
| | | |
| | | .pop-button { |
| | | position: absolute; |
| | | bottom: 0; |
| | | right: 0; |
| | | } |
| | | </style> |
| | |
| | | </table> |
| | | <CompProblemPicSelect |
| | | v-if="pics.length > 0" |
| | | title="é®é¢å¾ç" |
| | | v-model:dialog-visible="proDialog" |
| | | mode="problem" |
| | | :pics="pics[0].path" |
| | |
| | | ></CompProblemPicSelect> |
| | | <CompProblemPicSelect |
| | | v-if="pics.length > 1" |
| | | title="æ´æ¹å¾ç" |
| | | v-model:dialog-visible="changeDialog" |
| | | mode="change" |
| | | :pics="pics[1].path" |
| | |
| | | function handleProPicSelect(imgList) { |
| | | if (imgList && imgList.length > 0) { |
| | | seletcedProblemPic.value = imgList[0].url; |
| | | onChange(); |
| | | } |
| | | } |
| | | |
| | | function handleChangePicSelect(imgList) { |
| | | if (imgList && imgList.length > 0) { |
| | | seletcedChangePic.value = imgList[0].url; |
| | | onChange(); |
| | | } |
| | | } |
| | | |
| | | function onChange() { |
| | | const value = { |
| | | proPic: seletcedProblemPic.value, |
| | | changePic: seletcedChangePic.value ? seletcedChangePic.value : unchangeImg, |
| | | location: props.problem.location, |
| | | problemDes, |
| | | changeDes |
| | | }; |
| | | emit('change', value); |
| | | } |
| | | |
| | | watch( |
| | |
| | | getPics(); |
| | | problemDes.value = nV.problemname; |
| | | changeDes.value = nV.ischanged ? 'å·²æ´æ¹' : 'æªæ´æ¹'; |
| | | |
| | | onChange(); |
| | | } |
| | | }, |
| | | { immediate: true } |
| | | ); |
| | | |
| | | watch(problemDes, (nV, oV) => { |
| | | if (nV != oV) { |
| | | onChange(); |
| | | } |
| | | }); |
| | | watch(changeDes, (nV, oV) => { |
| | | if (nV != oV) { |
| | | onChange(); |
| | | } |
| | | }); |
| | | </script> |
| | | <style scoped> |
| | | .image { |
| | |
| | | <!-- å·¥å°ä¸å±ä¿¡æ¯ç¼è¾ --> |
| | | <template> |
| | | <el-form |
| | | v-if="showStyle == 'form'" |
| | | v-show="showStyle == 'form'" |
| | | :inline="false" |
| | | :model="formObj" |
| | | ref="formRef" |
| | |
| | | </el-form> |
| | | |
| | | <el-descriptions |
| | | v-else-if="showStyle == 'descriptions'" |
| | | v-show="showStyle == 'descriptions'" |
| | | :column="2" |
| | | :size="fontSize" |
| | | direction="horizontal" |
| | |
| | | </template> |
| | | <template #extra> |
| | | <el-button |
| | | :disabled="!edit && !ignoreEdit" |
| | | :size="fontSize" |
| | | :disabled="!edit" |
| | | type="primary" |
| | | @click="onSubmit" |
| | | :loading="loading" |
| | | >æäº¤</el-button |
| | | > |
| | | <el-button :size="fontSize" :disabled="!edit" @click="onReset" |
| | | <el-button |
| | | :size="fontSize" |
| | | :disabled="!edit && !ignoreEdit" |
| | | @click="onReset" |
| | | >éç½®</el-button |
| | | > |
| | | </template> |
| | |
| | | <el-descriptions-item label="æ½å·¥å°å" span="2" |
| | | ><el-input |
| | | clearable |
| | | v-model="formObj.location" |
| | | v-model="sceneObj.location" |
| | | placeholder="æ½å·¥å°å" |
| | | :size="fontSize" |
| | | /></el-descriptions-item> |
| | |
| | | <template #append>ã¡</template> |
| | | </el-input></el-descriptions-item |
| | | > |
| | | <el-descriptions-item label="项ç®è´è´£äºº" |
| | | ><el-input |
| | | :size="fontSize" |
| | | clearable |
| | | v-model="sceneObj.contacts" |
| | | placeholder="项ç®è´è´£äºº" |
| | | /></el-descriptions-item> |
| | | <el-descriptions-item label="项ç®è´è´£äººçµè¯" |
| | | ><el-input |
| | | :size="fontSize" |
| | | clearable |
| | | type="tel" |
| | | v-model="sceneObj.contactst" |
| | | placeholder="项ç®è´è´£äººçµè¯" |
| | | > |
| | | <template #prepend> |
| | | <el-icon><Iphone /></el-icon> |
| | | </template> </el-input |
| | | ></el-descriptions-item> |
| | | <el-descriptions-item label="å®å
¨å" |
| | | ><el-input |
| | | :size="fontSize" |
| | |
| | | </template> |
| | | |
| | | <script setup> |
| | | import { defineProps, defineEmits, reactive, ref, watch } from 'vue'; |
| | | import { reactive, ref, watch, computed } from 'vue'; |
| | | import { useDateFormat } from '@vueuse/core'; |
| | | import { enumStatusNA, enumStageNA } from '@/enum/construction'; |
| | | import sceneApi from '@/api/fysp/sceneApi'; |
| | |
| | | title: String |
| | | }); |
| | | const fontSize = ref('small'); |
| | | const emit = defineEmits(['onSubmit', 'onCancel']); |
| | | const emit = defineEmits([ |
| | | 'onSubmit', |
| | | 'onCancel', |
| | | 'update:scene', |
| | | 'update:formInfo' |
| | | ]); |
| | | |
| | | const sceneObj = ref({}); |
| | | const { formObj, formRef, edit, onSubmit, onReset } = useFormConfirm({ |
| | | submit: { |
| | | do: submit |
| | |
| | | do: cancel |
| | | } |
| | | }); |
| | | const ignoreEdit = computed(() => props.showStyle == 'descriptions'); |
| | | |
| | | const loading = ref(false); |
| | | const status = reactive(enumStatusNA()); |
| | | const stage = reactive(enumStageNA()); |
| | |
| | | }); |
| | | |
| | | // åå»ºææ´æ°åºæ¯è¯¦æ
|
| | | function createOrupdateScene() { |
| | | function createOrupdateSubScene() { |
| | | loading.value = true; |
| | | |
| | | if (formObj.value._timeRange && formObj.value._timeRange.length == 2) { |
| | |
| | | return sceneApi |
| | | .updateSubScene(props.sceneType, formObj.value) |
| | | .then((res) => { |
| | | emit('onSubmit', formObj); |
| | | emit('update:formInfo', formObj); |
| | | return res.data; |
| | | }) |
| | | .finally(() => { |
| | |
| | | }); |
| | | } |
| | | |
| | | function submit() { |
| | | emit('onSubmit', formObj); |
| | | // æ´æ°åºæ¯ |
| | | function updateScene() { |
| | | return sceneApi.updateScene(sceneObj.value).then(() => { |
| | | emit('update:scene', sceneObj); |
| | | }); |
| | | } |
| | | |
| | | return createOrupdateScene(); |
| | | function submit() { |
| | | updateScene(); |
| | | return createOrupdateSubScene(); |
| | | } |
| | | |
| | | function cancel() { |
| | |
| | | }, |
| | | { deep: false, immediate: true } |
| | | ); |
| | | |
| | | watch( |
| | | () => props.scene, |
| | | (nValue) => { |
| | | if (nValue) { |
| | | sceneObj.value = nValue; |
| | | } |
| | | }, |
| | | { deep: false, immediate: true } |
| | | ); |
| | | </script> |
| | | |
| | | <style> |