已修改21个文件
已添加2个文件
已重命名1个文件
| | |
| | | params: { cityCode, districtCode, page, perPage } |
| | | }) |
| | | .then((res) => res.data); |
| | | }, |
| | | |
| | | /** |
| | | * æ´æ°å·¥å°å¤é´æ½å·¥è®¸å¯è¯ |
| | | * @param {*} param0 |
| | | * @returns |
| | | */ |
| | | updateRecord({ recordId, userId, sceneId }) { |
| | | return $fysp |
| | | .post(`nightwork/record`, undefined, { |
| | | params: { recordId, userId, sceneId } |
| | | }) |
| | | .then((res) => res.data); |
| | | } |
| | | }; |
| | |
| | | ElBreadcrumb: typeof import('element-plus/es')['ElBreadcrumb'] |
| | | ElBreadcrumbItem: typeof import('element-plus/es')['ElBreadcrumbItem'] |
| | | ElButton: typeof import('element-plus/es')['ElButton'] |
| | | 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'] |
| | | ElCheckboxGroup: typeof import('element-plus/es')['ElCheckboxGroup'] |
| | | ElCol: typeof import('element-plus/es')['ElCol'] |
| | | ElCollapse: typeof import('element-plus/es')['ElCollapse'] |
| | | ElCollapseItem: typeof import('element-plus/es')['ElCollapseItem'] |
| | |
| | | ElImageViewer: typeof import('element-plus/es')['ElImageViewer'] |
| | | 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'] |
| | | ElPopover: typeof import('element-plus/es')['ElPopover'] |
| | | ElRadio: typeof import('element-plus/es')['ElRadio'] |
| | |
| | | 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'] |
| | |
| | | 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'] |
| | |
| | | <template> |
| | | <el-row class="layout"> |
| | | <el-col :span="10"> |
| | | <el-col :span="$slots.summary ? 10 : 24"> |
| | | <el-form :inline="true" :model="formSearch"> |
| | | <el-form-item label="æ»ä»»å¡"> |
| | | <!-- <el-input v-model="formSearch.topTaskId" placeholder="æ»ä»»å¡" /> --> |
| | |
| | | </el-form-item> |
| | | </el-form> |
| | | </el-col> |
| | | <el-col :span="14"> |
| | | <el-col :span="$slots.summary ? 14 : 0"> |
| | | <el-row justify="end"> |
| | | <slot name="summary"></slot> |
| | | </el-row> |
| | |
| | | ); |
| | | const param = { |
| | | topTask: task ? task.data : {}, |
| | | sceneTypeId: this.formSearch.scenetype.value |
| | | sceneTypeId: this.formSearch.scenetype.value, |
| | | sceneTypeName: this.formSearch.scenetype.label, |
| | | }; |
| | | // console.log(param); |
| | | |
| | |
| | | <template> |
| | | <div v-if="legend" class="state-label"> |
| | | <el-input |
| | | v-model="filterText" |
| | | icon="Search" |
| | | style="width: 200px" |
| | | placeholder="å
³é®åçé" |
| | | clearable |
| | | /> |
| | | <el-tooltip placement="bottom-start" effect="dark"> |
| | | <template #content> |
| | | <el-space> |
| | | <el-space v-for="(item, index) in stateLabels" :key="index" :size="1"> |
| | | <el-icon :color="item.color"> |
| | | <component :is="item.icon"></component> |
| | | </el-icon> |
| | | {{ item.name }} |
| | | <!-- <el-text size="small">{{ item.name }}</el-text> --> |
| | | <div style="padding-right: 10px;"> |
| | | <div v-if="legend" class="state-label"> |
| | | <el-input |
| | | v-model="filterText" |
| | | icon="Search" |
| | | style="width: 180px" |
| | | placeholder="å
³é®åçé" |
| | | clearable |
| | | /> |
| | | <el-tooltip placement="bottom-start" effect="dark"> |
| | | <template #content> |
| | | <el-space> |
| | | <el-space |
| | | v-for="(item, index) in stateLabels" |
| | | :key="index" |
| | | :size="1" |
| | | > |
| | | <el-icon :color="item.color"> |
| | | <component :is="item.icon"></component> |
| | | </el-icon> |
| | | {{ item.name }} |
| | | <!-- <el-text size="small">{{ item.name }}</el-text> --> |
| | | </el-space> |
| | | </el-space> |
| | | </el-space> |
| | | <br /> |
| | | <br /> |
| | | <el-space> |
| | | <el-space :size="1"> |
| | | <el-icon :size="16" color="var(--el-color-success)"> |
| | | <Avatar /> |
| | | </el-icon> |
| | | æ£å¨æ§è¡å·¡æ¥ |
| | | </el-space> |
| | | <el-space :size="1"> |
| | | <el-icon :size="16" color="var(--el-color-info)"> |
| | | <Avatar /> |
| | | </el-icon> |
| | | æªæ§è¡ |
| | | </el-space> |
| | | </el-space> |
| | | </template> |
| | | <el-space> |
| | | <el-space :size="1"> |
| | | <el-icon :size="16" color="var(--el-color-success)"> |
| | | <el-icon class="cursor-p" :size="16" color="var(--el-color-primary)" |
| | | ><QuestionFilled |
| | | /></el-icon> |
| | | <el-text size="small" class="cursor-p">å®¡æ ¸ç¶æå¾ä¾</el-text> |
| | | </el-space> |
| | | </el-tooltip> |
| | | </div> |
| | | <el-tree |
| | | ref="treeRef" |
| | | class="el-tree" |
| | | v-loading="isLoading" |
| | | :data="dataList" |
| | | :props="defaultProps" |
| | | @node-click="handleNodeClick" |
| | | :filter-node-method="filterNode" |
| | | default-expand-all |
| | | highlight-current |
| | | check-on-click-node |
| | | empty-text="ææ è®°å½" |
| | | > |
| | | <template #default="{ node, data }"> |
| | | <slot :node="node" :data="data"> |
| | | <div |
| | | :class=" |
| | | data.selected |
| | | ? 'selected-tree-node custom-tree-node' |
| | | : 'custom-tree-node' |
| | | " |
| | | > |
| | | <el-icon |
| | | v-if="data.status == 'æ£å¨æ§è¡'" |
| | | :size="16" |
| | | color="var(--el-color-success)" |
| | | style="margin-left: -16px" |
| | | > |
| | | <Avatar /> |
| | | </el-icon> |
| | | æ£å¨æ§è¡å·¡æ¥ |
| | | </el-space> |
| | | <el-space :size="1"> |
| | | <el-icon :size="16" color="var(--el-color-info)"> |
| | | <el-icon |
| | | v-if="data.status == 'æªæ§è¡'" |
| | | :size="16" |
| | | color="var(--el-color-info)" |
| | | style="margin-left: -16px" |
| | | > |
| | | <Avatar /> |
| | | </el-icon> |
| | | æªæ§è¡ |
| | | </el-space> |
| | | </el-space> |
| | | </template> |
| | | <el-space> |
| | | <el-icon class="cursor-p" :size="16" color="var(--el-color-primary)" |
| | | ><QuestionFilled |
| | | /></el-icon> |
| | | <el-text size="small" class="cursor-p">å®¡æ ¸ç¶æå¾ä¾</el-text> |
| | | </el-space> |
| | | </el-tooltip> |
| | | </div> |
| | | <el-tree |
| | | ref="treeRef" |
| | | class="el-tree" |
| | | v-loading="isLoading" |
| | | :data="dataList" |
| | | :props="defaultProps" |
| | | @node-click="handleNodeClick" |
| | | :filter-node-method="filterNode" |
| | | default-expand-all |
| | | highlight-current |
| | | check-on-click-node |
| | | empty-text="ææ è®°å½" |
| | | > |
| | | <template #default="{ node, data }"> |
| | | <slot :node="node" :data="data"> |
| | | <div |
| | | :class=" |
| | | data.selected |
| | | ? 'selected-tree-node custom-tree-node' |
| | | : 'custom-tree-node' |
| | | " |
| | | > |
| | | <el-icon |
| | | v-if="data.status == 'æ£å¨æ§è¡'" |
| | | :size="16" |
| | | color="var(--el-color-success)" |
| | | style="margin-left: -16px" |
| | | > |
| | | <Avatar /> |
| | | </el-icon> |
| | | <el-icon |
| | | v-if="data.status == 'æªæ§è¡'" |
| | | :size="16" |
| | | color="var(--el-color-info)" |
| | | style="margin-left: -16px" |
| | | > |
| | | <Avatar /> |
| | | </el-icon> |
| | | <!-- <el-icon :color="stateLabels[data.type].color"> |
| | | <!-- <el-icon :color="stateLabels[data.type].color"> |
| | | <component :is="stateLabels[data.type].icon"></component> |
| | | </el-icon> --> |
| | | <el-icon |
| | | v-if="data.type == 0" |
| | | :size="16" |
| | | color="var(--el-color-info)" |
| | | > |
| | | <SuccessFilled /> |
| | | </el-icon> |
| | | <el-icon |
| | | v-else-if="data.type == 1" |
| | | :size="16" |
| | | color="var(--el-color-danger)" |
| | | > |
| | | <QuestionFilled /> |
| | | </el-icon> |
| | | <el-icon |
| | | v-else-if="data.type == 2" |
| | | :size="16" |
| | | color="var(--el-color-warning)" |
| | | > |
| | | <QuestionFilled /> |
| | | </el-icon> |
| | | <el-icon |
| | | v-else-if="data.type == 3" |
| | | :size="16" |
| | | color="var(--el-color-danger)" |
| | | > |
| | | <WarnTriangleFilled /> |
| | | </el-icon> |
| | | <el-icon |
| | | v-else-if="data.type == 4" |
| | | :size="16" |
| | | color="var(--el-color-danger)" |
| | | > |
| | | <WarningFilled /> |
| | | </el-icon> |
| | | <el-icon |
| | | v-else-if="data.type == 5" |
| | | :size="16" |
| | | color="var(--el-color-warning)" |
| | | > |
| | | <WarningFilled /> |
| | | </el-icon> |
| | | <el-icon |
| | | v-else-if="data.type == 6" |
| | | :size="16" |
| | | color="var(--el-color-success)" |
| | | > |
| | | <SuccessFilled /> |
| | | </el-icon> |
| | | <!-- <el-text>{{ node.label }}</el-text> --> |
| | | {{ node.label }} |
| | | <span v-if="data.count"> |
| | | {{ '_(' + data.count + ')' }} |
| | | <!-- <el-text size="small">ç¹æ¬¡</el-text>) --> |
| | | </span> |
| | | </div> |
| | | </slot> |
| | | </template> |
| | | </el-tree> |
| | | <el-icon |
| | | v-if="data.type == 0" |
| | | :size="16" |
| | | color="var(--el-color-info)" |
| | | > |
| | | <SuccessFilled /> |
| | | </el-icon> |
| | | <el-icon |
| | | v-else-if="data.type == 1" |
| | | :size="16" |
| | | color="var(--el-color-danger)" |
| | | > |
| | | <QuestionFilled /> |
| | | </el-icon> |
| | | <el-icon |
| | | v-else-if="data.type == 2" |
| | | :size="16" |
| | | color="var(--el-color-warning)" |
| | | > |
| | | <QuestionFilled /> |
| | | </el-icon> |
| | | <el-icon |
| | | v-else-if="data.type == 3" |
| | | :size="16" |
| | | color="var(--el-color-danger)" |
| | | > |
| | | <WarnTriangleFilled /> |
| | | </el-icon> |
| | | <el-icon |
| | | v-else-if="data.type == 4" |
| | | :size="16" |
| | | color="var(--el-color-danger)" |
| | | > |
| | | <WarningFilled /> |
| | | </el-icon> |
| | | <el-icon |
| | | v-else-if="data.type == 5" |
| | | :size="16" |
| | | color="var(--el-color-warning)" |
| | | > |
| | | <WarningFilled /> |
| | | </el-icon> |
| | | <el-icon |
| | | v-else-if="data.type == 6" |
| | | :size="16" |
| | | color="var(--el-color-success)" |
| | | > |
| | | <SuccessFilled /> |
| | | </el-icon> |
| | | <!-- <el-text>{{ node.label }}</el-text> --> |
| | | {{ node.label }} |
| | | <span v-if="data.count"> |
| | | {{ '_(' + data.count + ')' }} |
| | | <!-- <el-text size="small">ç¹æ¬¡</el-text>) --> |
| | | </span> |
| | | </div> |
| | | </slot> |
| | | </template> |
| | | </el-tree> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | |
| | | </script> |
| | | <style scoped> |
| | | .layout { |
| | | /* background-color: beige; */ |
| | | background-color: white; |
| | | height: var(--height-toolbar); |
| | | border-bottom: 1px solid var(--el-color-info-light-7); |
| | | box-shadow: 6px 4px 4px rgba(0, 0, 0, 0.12); |
| | |
| | | <slot name="header"></slot> |
| | | </el-header> |
| | | <el-container> |
| | | <el-aside class="el-aside" :style="'height: ' + mainHeight"> |
| | | <el-scrollbar :noresize="true" style="position: relative;"> |
| | | <el-aside class="el-aside" :style="{ height: mainHeight + 'px' }"> |
| | | <el-scrollbar :noresize="false"> |
| | | <slot name="aside"></slot> |
| | | </el-scrollbar> |
| | | </el-aside> |
| | | <el-main class="el-main" :style="'height: ' + mainHeight"> |
| | | <el-main class="el-main" :style="{ height: mainHeight + 'px' }"> |
| | | <slot name="main"></slot> |
| | | </el-main> |
| | | </el-container> |
| | |
| | | |
| | | <script> |
| | | export default { |
| | | inject: ['contentMaxHeight'], |
| | | // å³ä¾§æä½çé¢åºç¡å¸å± |
| | | data() { |
| | | return { |
| | | mainHeight: 'calc(100vh - 60px * 2 - var(--el-main-padding) * 2)' |
| | | mainHeight: this.contentMaxHeight.value |
| | | }; |
| | | }, |
| | | methods: { |
| | |
| | | if (this.$refs.headerRef) { |
| | | const h1 = this.$refs.headerRef.$el.offsetHeight; |
| | | const h = h1; |
| | | return `calc(100vh - ${h}px - 60px - var(--el-main-padding) * 2 + 6px)`; |
| | | return this.contentMaxHeight.value - h; |
| | | // return `calc(100vh - ${h}px - 60px - var(--el-main-padding) * 2 + 6px)`; |
| | | } else { |
| | | return `calc(100vh - 60px * 2 - var(--el-main-padding) * 2)`; |
| | | return this.contentMaxHeight.value; |
| | | } |
| | | } |
| | | }, |
| | |
| | | |
| | | .el-header { |
| | | height: initial; |
| | | padding: 0 0 0px 0; |
| | | padding: 0 0 4px 0; |
| | | /* background-color: rgb(216, 201, 201); */ |
| | | /* border-bottom: 1px solid var(--el-color-info-light-7); */ |
| | | margin-bottom: 4px; |
| | | /* margin-bottom: 4px; */ |
| | | } |
| | | |
| | | .el-main { |
| | |
| | | /* background-color: whitesmoke; */ |
| | | /* height: calc(100vh - 60px * 2 - 20px * 2); */ |
| | | padding: initial; |
| | | padding-left: 20px; |
| | | padding-left: 10px; |
| | | /* overflow: hidden; */ |
| | | } |
| | | </style> |
| | |
| | | <template> |
| | | <el-form :inline="true" :size="size"> |
| | | <slot name="options"></slot> |
| | | <el-form-item> |
| | | <el-form-item v-if="$slots.options"> |
| | | <el-button |
| | | icon="Search" |
| | | type="primary" |
| | |
| | | <template> |
| | | <el-row ref="searchRef"> |
| | | <FYSearchBar @search="onSearch"> |
| | | <template #options> |
| | | <template #options v-if="$slots.options"> |
| | | <slot name="options"></slot> |
| | | </template> |
| | | <template #buttons> |
| | | <template #buttons v-if="$slots.buttons"> |
| | | <slot name="buttons"></slot> |
| | | </template> |
| | | </FYSearchBar> |
| | |
| | | * ä½¿ç¨æ¶éè¦å¨<slot #options>䏿·»å èªå®ä¹æ¥è¯¢é项ï¼å¨<slot #table-column>䏿·»å èªå®ä¹è¡¨æ ¼åï¼åæ¶å®ç°è§¦å彿°search |
| | | */ |
| | | export default { |
| | | inject: ['contentMaxHeight'], |
| | | props: { |
| | | rowClassName: undefined, |
| | | cellClassName: Function || String, |
| | |
| | | default: () => [] |
| | | }, |
| | | totalCount: { |
| | | type: Number, |
| | | default: 0 |
| | | }, |
| | | // é¢å¤çé«åº¦ï¼ç¨äºè®¡ç®è¡¨æ ¼é«åº¦ |
| | | extraHeight: { |
| | | type: Number, |
| | | default: 0 |
| | | } |
| | |
| | | if (nValue != oValue) { |
| | | this.total = nValue; |
| | | } |
| | | }, |
| | | extraHeight: { |
| | | handler(nValue, oValue) { |
| | | if (nValue != oValue) { |
| | | this.tableHeight = this.calcTableHeight(); |
| | | } |
| | | }, |
| | | } |
| | | }, |
| | | 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'; |
| | | } |
| | | } |
| | | }, |
| | | computed: {}, |
| | | methods: { |
| | | /** |
| | | * è¡¨æ ¼æ°æ®æ¥è¯¢ï¼ä¼ é两ç»åæ°ï¼å页信æ¯ååè°å½æ° |
| | |
| | | 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)`; |
| | | const h = h1 + h2 + h3 + h4 + this.extraHeight; |
| | | return this.contentMaxHeight.value - h + 'px'; |
| | | // return `calc(100vh - ${h}px - 60px - var(--el-main-padding) * 2)`; |
| | | }, |
| | | tableRowClassName({ row }) { |
| | | if (this.rowClassName) { |
| | |
| | | mounted() { |
| | | this.tableHeight = this.calcTableHeight(); |
| | | this.onSearch(); |
| | | }, |
| | | } |
| | | }; |
| | | </script> |
| | | |
| | |
| | | // åºç¡äº§å-åºæ¯æ¸
å |
| | | path: 'scene', |
| | | name: 'ProdSceneInfo', |
| | | meta: { keepAlive: false, key: 'ProdManage' }, |
| | | meta: { keepAlive: true, key: 'ProdManage' }, |
| | | component: () => |
| | | import( |
| | | '@/views/fysp/data-product/base-data-product/ProdSceneInfo.vue' |
| | |
| | | // åºç¡äº§å-è§èæ§è¯ä¼° |
| | | path: 'evaluate', |
| | | name: 'ProdEvaluationInfo', |
| | | meta: { keepAlive: false, key: 'ProdManage' }, |
| | | meta: { keepAlive: true, key: 'ProdManage' }, |
| | | component: () => |
| | | import( |
| | | '@/views/fysp/data-product/base-data-product/ProdEvaluationInfo.vue' |
| | |
| | | // åºç¡äº§å-å·¡æ¥ä¿¡æ¯ |
| | | path: 'inspection', |
| | | name: 'ProdInspectionInfo', |
| | | meta: { keepAlive: false, key: 'ProdManage' }, |
| | | meta: { keepAlive: true, key: 'ProdManage' }, |
| | | component: () => |
| | | import( |
| | | '@/views/fysp/data-product/base-data-product/ProdInspectionInfo.vue' |
| | |
| | | // åºç¡äº§å-çæµæ°æ® |
| | | path: 'monitordata', |
| | | name: 'ProdMonitorDataInfo', |
| | | meta: { keepAlive: false, key: 'ProdManage' }, |
| | | meta: { keepAlive: true, key: 'ProdManage' }, |
| | | component: () => |
| | | import( |
| | | '@/views/fysp/data-product/base-data-product/ProdMonitorDataInfo.vue' |
| | |
| | | ]; |
| | | |
| | | const router = createRouter({ |
| | | history: createWebHistory(import.meta.env.BASE_URL), |
| | | // history: createWebHashHistory(), |
| | | // history: createWebHistory(import.meta.env.BASE_URL), |
| | | history: createWebHashHistory(), |
| | | routes: routes |
| | | }); |
| | | |
| | |
| | | <template> |
| | | <el-container class="el-container"> |
| | | <el-aside class="el-aside" |
| | | ><SiderMenu :collapse="isCollapsed" @nav-page="navPage"></SiderMenu |
| | | ></el-aside> |
| | | <el-aside class="el-aside"> |
| | | <SiderMenu :collapse="isCollapsed" @nav-page="navPage"></SiderMenu> |
| | | </el-aside> |
| | | <el-container> |
| | | <el-header class="el-header" |
| | | ><Header |
| | | <el-header ref="headerRef" class="el-header"> |
| | | <Header |
| | | :navTitles="navTitles" |
| | | :collapse="isCollapsed" |
| | | @collapsed-sider="collapsedSider" |
| | |
| | | ></el-header> |
| | | <el-main class="el-main"> |
| | | <el-scrollbar> |
| | | <div class="el-main__content"> |
| | | <div |
| | | class="el-main__content" |
| | | :style="{ |
| | | maxHeight: contentMaxHeight + 'px', |
| | | padding: mainPadding + 'px' |
| | | }" |
| | | > |
| | | <Content></Content> |
| | | <!-- <el-backtop |
| | | target=".el-main .el-scrollbar__wrap" |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import { computed } from 'vue'; |
| | | |
| | | export default { |
| | | data() { |
| | | return { |
| | | isCollapsed: false, |
| | | navTitles: [] |
| | | navTitles: [], |
| | | headerHeight: 60, |
| | | mainPadding: 10, |
| | | contentMaxHeight: NaN |
| | | }; |
| | | }, |
| | | methods: { |
| | |
| | | navPage(titles) { |
| | | this.navTitles = titles; |
| | | } |
| | | }, |
| | | mounted() { |
| | | this.headerHeight = this.$refs.headerRef.$el.offsetHeight; |
| | | this.contentMaxHeight = |
| | | window.innerHeight - this.headerHeight - this.mainPadding * 2; |
| | | }, |
| | | provide() { |
| | | return { |
| | | headerHeight: computed(() => this.headerHeight), |
| | | mainPadding: computed(() => this.mainPadding), |
| | | contentMaxHeight: computed(() => this.contentMaxHeight) |
| | | }; |
| | | } |
| | | }; |
| | | </script> |
| | |
| | | } |
| | | |
| | | .el-main__content { |
| | | padding: var(--el-main-padding) calc(var(--el-main-padding) / 2); |
| | | max-height: calc(100vh - 60px - var(--el-main-padding) * 2); |
| | | /* --main-padding: 10px; */ |
| | | /* padding: var(--main-padding) calc(var(--main-padding) / 2); */ |
| | | /* padding: var(--main-padding); */ |
| | | /* max-height: calc(100vh - 60px - var(--main-padding) * 2); */ |
| | | /* background-color: aqua; */ |
| | | /* overflow: auto; */ |
| | | } |
| | |
| | | <template #main> |
| | | <el-scrollbar> |
| | | <ToolBar |
| | | ref="toolBarRef" |
| | | class="toolbar-sticky" |
| | | :title="curSubtask.title" |
| | | :descriptions="proStatus" |
| | | :buttons="buttons" |
| | | :loading="mainLoading" |
| | | ></ToolBar> |
| | | <el-scrollbar |
| | | v-if="curProList.length > 0" |
| | | class="scrollbar-inner" |
| | | v-loading="mainLoading" |
| | | > |
| | | <div v-if="curProList.length > 0" v-loading="mainLoading"> |
| | | <CompProblemCard |
| | | :key="i" |
| | | v-for="(p, i) in curProList" |
| | |
| | | @submit="updateSubtask" |
| | | @check="handleProblemCheck" |
| | | ></CompProblemCard> |
| | | </el-scrollbar> |
| | | </div> |
| | | <el-empty v-else description="ææ é®é¢" v-loading="mainLoading" /> |
| | | </el-scrollbar> |
| | | </template> |
| | |
| | | .scrollbar-inner { |
| | | height: calc(100vh - 60px * 2 - 20px * 2 - var(--height-toolbar)); |
| | | } |
| | | |
| | | .toolbar-sticky { |
| | | position: sticky; |
| | | z-index: 2; |
| | | top: 0; |
| | | } |
| | | </style> |
ÎļþÃû´Ó src/views/fysp/config/device/CompInfoSearch.vue ÐÞ¸Ä |
| | |
| | | <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> |
| | | <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"> |
| | |
| | | label="" |
| | | :placeholder="placeholder" |
| | | v-model:value="searchText" |
| | | width="200px" |
| | | :width="searchTextWidth" |
| | | ></FYOptionText> |
| | | </template> |
| | | </FYSearchBar> |
| | |
| | | </div> |
| | | </el-space> |
| | | </el-scrollbar> |
| | | <el-empty v-else description="æ è®°å½" /> |
| | | </div> |
| | | <el-pagination |
| | | v-if="pageShow && dataList.length > 0" |
| | |
| | | type: String, |
| | | default: 'è¾å
¥å
³é®åæ£ç´¢' |
| | | }, |
| | | searchTextWidth: { |
| | | type: String, |
| | | default: '200px' |
| | | }, |
| | | // æ¯å¦æ¾ç¤ºå页 |
| | | pageShow: { |
| | | type: Boolean, |
| | |
| | | default: () => { |
| | | return [10, 20, 50, 100]; |
| | | } |
| | | } |
| | | }, |
| | | // é»è®¤æç´¢ææ¬ |
| | | defaultText: String |
| | | }, |
| | | emits: ['search', 'update:modelValue'], |
| | | data() { |
| | |
| | | loading: false |
| | | }; |
| | | }, |
| | | watch: {}, |
| | | watch: { |
| | | defaultText: { |
| | | handler(newVal) { |
| | | if (newVal) { |
| | | this.searchText = newVal; |
| | | setTimeout(() => { |
| | | this.search(); |
| | | }, 500); |
| | | } |
| | | }, |
| | | immediate: true |
| | | } |
| | | }, |
| | | methods: { |
| | | search() { |
| | | this.loading = true; |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <CompInfoSearch |
| | | label="çç®¡ç¨æ·" |
| | | placeholder="è¾å
¥ç¨æ·åç§°" |
| | | @search="searchSVUser" |
| | | > |
| | | <template #selected="{ row }"> |
| | | <div> |
| | | <el-text>ç¼å·ï¼{{ row?.svUserId }}</el-text> |
| | | </div> |
| | | <el-space> |
| | | <el-text>åç§°ï¼{{ row?.svUserName }}</el-text> |
| | | <el-button |
| | | v-show="row?.svUserName" |
| | | type="primary" |
| | | icon="DocumentCopy" |
| | | text |
| | | circle |
| | | @click="copySVUser(row?.svUserName)" |
| | | /> |
| | | </el-space> |
| | | </template> |
| | | <template #default="{ row, click }"> |
| | | <ItemUser :item="row" @add="selectSVUser(row, click)" /> |
| | | </template> |
| | | </CompInfoSearch> |
| | | </template> |
| | | <script setup> |
| | | import CompInfoSearch from './CompInfoSearch.vue'; |
| | | import { useCloned } from '@vueuse/core'; |
| | | import svUserApi from '@/api/fysp/userApi'; |
| | | |
| | | const props = defineProps({ |
| | | // æ£ç´¢èå´ï¼å
å«è¡æ¿åºåãåºæ¯ç±»åï¼ |
| | | area: Object |
| | | }); |
| | | |
| | | // æ¥è¯¢çç®¡ç¨æ· |
| | | function searchSVUser(param, callback) { |
| | | const { text, page, pageSize } = param; |
| | | const { cloned: area } = useCloned(props.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 { |
| | | ...value, |
| | | district: value.remark |
| | | }; |
| | | }); |
| | | callback({ |
| | | data: l, |
| | | total: res.head.totalCount |
| | | }); |
| | | } |
| | | }) |
| | | .finally(() => { |
| | | callback(); |
| | | }); |
| | | } |
| | | |
| | | function selectSVUser(row, click) { |
| | | const p = { |
| | | svUserId: row.guid, |
| | | svUserName: row.realname, |
| | | ...row |
| | | }; |
| | | click(p); |
| | | } |
| | | </script> |
| | |
| | | |
| | | <script> |
| | | import { useCloned } from '@vueuse/core'; |
| | | import CompInfoSearch from './CompInfoSearch.vue'; |
| | | import CompInfoSearch from '../components/CompInfoSearch.vue'; |
| | | import tzUserApi from '@/api/fytz/userApi'; |
| | | import svUserApi from '@/api/fysp/userApi'; |
| | | import userMapApi from '@/api/fysp/userMapApi'; |
| | |
| | | <template> |
| | | 1 |
| | | <BaseProdProcess |
| | | v-model:active="active" |
| | | @onStep1="onStep1" |
| | | @onStep2="onStep2" |
| | | @onStep3="onStep3" |
| | | :loading="loading" |
| | | > |
| | | <template #step2="{ contentHeight }"> |
| | | <el-table |
| | | id="prod-evaluation-table" |
| | | :data="tableData" |
| | | v-loading="loading" |
| | | :height="contentHeight + 'px'" |
| | | table-layout="fixed" |
| | | :show-overflow-tooltip="true" |
| | | size="small" |
| | | border |
| | | > |
| | | <el-table-column fixed="left" prop="index" label="ç¼å·" width="50"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | fixed="left" |
| | | prop="subTask.scensename" |
| | | label="åç§°" |
| | | :show-overflow-tooltip="true" |
| | | min-width="200" |
| | | > |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="subTask.planstarttime" |
| | | label="å·¡æ¥æ¶é´" |
| | | :formatter="timeFormat" |
| | | width="90" |
| | | /> |
| | | <!-- <el-table-column prop="provincename" label="ç" width="90" /> |
| | | <el-table-column prop="cityname" label="å¸" width="90" /> |
| | | <el-table-column prop="districtname" label="åºå¿" width="90" /> --> |
| | | <el-table-column prop="evaluate.townname" label="è¡é" width="80" /> |
| | | <el-table-column |
| | | prop="evaluate.resultscorebef" |
| | | label="è¯å" |
| | | width="60" |
| | | /> |
| | | <el-table-column prop="scoreLevel" label="è§èæ§" width="70" /> |
| | | <el-table-column |
| | | prop="evaluate.updatedate" |
| | | label="æ´æ°æ¶é´" |
| | | width="140" |
| | | :formatter="timeFormat" |
| | | /> |
| | | </el-table> |
| | | </template> |
| | | </BaseProdProcess> |
| | | </template> |
| | | <script></script> |
| | | <script setup> |
| | | import { ref, inject } from 'vue'; |
| | | import dayjs from 'dayjs'; |
| | | import BaseProdProcess from '@/views/fysp/data-product/base-data-product/components/BaseProdProcess.vue'; |
| | | import dataprodbaseApi from '@/api/fysp/dataprodbaseApi.js'; |
| | | import { conversionFromTable } from '@/utils/excel'; |
| | | import { useProdStepChange } from '@/views/fysp/data-product/prod-step-change.js'; |
| | | |
| | | const { active, changeActive } = useProdStepChange(); |
| | | const loading = ref(false); |
| | | const tableData = ref([]); |
| | | |
| | | function onStep1(opt) { |
| | | loading.value = true; |
| | | dataprodbaseApi |
| | | .fetchProdEvaluateInfo(opt) |
| | | .then((res) => { |
| | | if (res.success) { |
| | | tableData.value = res.data; |
| | | } |
| | | changeActive(); |
| | | }) |
| | | .finally(() => { |
| | | loading.value = false; |
| | | }); |
| | | } |
| | | |
| | | function onStep2() { |
| | | changeActive(); |
| | | } |
| | | |
| | | function onStep3(val) { |
| | | if (val.downloadType == '1') { |
| | | loading.value = true; |
| | | conversionFromTable('prod-evaluation-table', 'è§èæ§è¯ä¼°æ¸
å'); |
| | | loading.value = false; |
| | | } |
| | | } |
| | | |
| | | function timeFormat(row, column, cellValue, index) { |
| | | return dayjs(cellValue).format('YYYY-MM-DD'); |
| | | } |
| | | </script> |
| | |
| | | <template> |
| | | 1 |
| | | <BaseProdProcess |
| | | v-model:active="active" |
| | | @onStep1="onStep1" |
| | | @onStep2="onStep2" |
| | | @onStep3="onStep3" |
| | | :loading="loading" |
| | | > |
| | | <template #step2="{ contentHeight }"> |
| | | <el-table |
| | | id="prod-inspection-table" |
| | | :data="tableData" |
| | | v-loading="loading" |
| | | :height="contentHeight + 'px'" |
| | | table-layout="fixed" |
| | | :show-overflow-tooltip="true" |
| | | size="small" |
| | | border |
| | | > |
| | | <el-table-column fixed="left" prop="index" label="ç¼å·" width="50"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | fixed="left" |
| | | prop="subTask.scensename" |
| | | label="åç§°" |
| | | :show-overflow-tooltip="true" |
| | | min-width="200" |
| | | > |
| | | </el-table-column> |
| | | <el-table-column |
| | | prop="subTask.planstarttime" |
| | | label="å·¡æ¥æ¶é´" |
| | | :formatter="timeFormat" |
| | | width="90" |
| | | /> |
| | | <!-- <el-table-column prop="provincename" label="ç" width="90" /> |
| | | <el-table-column prop="cityname" label="å¸" width="90" /> |
| | | <el-table-column prop="districtname" label="åºå¿" width="90" /> --> |
| | | <el-table-column prop="subTask.townname" label="è¡é" width="80" /> |
| | | <el-table-column |
| | | prop="problems.length" |
| | | label="é®é¢æ°" |
| | | width="60" |
| | | /> |
| | | <el-table-column prop="scoreLevel" label="é®é¢æè¦" width="70" /> |
| | | <el-table-column |
| | | prop="evaluate.resultscorebef" |
| | | label="æªæ´æ¹æ°" |
| | | width="60" |
| | | /> |
| | | <el-table-column prop="scoreLevel" label="æªæ´æ¹é®é¢" width="70" /> |
| | | <el-table-column |
| | | prop="evaluate.updatedate" |
| | | label="æ´æ°æ¶é´" |
| | | width="140" |
| | | :formatter="timeFormat" |
| | | /> |
| | | </el-table> |
| | | </template> |
| | | </BaseProdProcess> |
| | | </template> |
| | | <script></script> |
| | | <script setup> |
| | | import { ref, inject } from 'vue'; |
| | | import dayjs from 'dayjs'; |
| | | import BaseProdProcess from '@/views/fysp/data-product/base-data-product/components/BaseProdProcess.vue'; |
| | | import dataprodbaseApi from '@/api/fysp/dataprodbaseApi.js'; |
| | | import { conversionFromTable } from '@/utils/excel'; |
| | | import { useProdStepChange } from '@/views/fysp/data-product/prod-step-change.js'; |
| | | |
| | | const { active, changeActive } = useProdStepChange(); |
| | | const loading = ref(false); |
| | | const tableData = ref([]); |
| | | |
| | | function onStep1(opt) { |
| | | loading.value = true; |
| | | dataprodbaseApi |
| | | .fetchProdInspectionInfo(opt) |
| | | .then((res) => { |
| | | if (res.success) { |
| | | tableData.value = res.data; |
| | | } |
| | | changeActive(); |
| | | }) |
| | | .finally(() => { |
| | | loading.value = false; |
| | | }); |
| | | } |
| | | |
| | | function onStep2() { |
| | | changeActive(); |
| | | } |
| | | |
| | | function onStep3(val) { |
| | | if (val.downloadType == '1') { |
| | | loading.value = true; |
| | | conversionFromTable('prod-inspection-table', 'æ´æ¹æ¸
å'); |
| | | loading.value = false; |
| | | } |
| | | } |
| | | |
| | | function timeFormat(row, column, cellValue, index) { |
| | | return dayjs(cellValue).format('YYYY-MM-DD'); |
| | | } |
| | | </script> |
| | |
| | | default-active="scene" |
| | | ellipsis |
| | | mode="horizontal" |
| | | style="max-width: 600px; background-color: aliceblue" |
| | | > |
| | | <el-menu-item |
| | | v-for="item in menu" |
| | |
| | | > |
| | | </el-menu> |
| | | </el-affix> |
| | | <router-view v-slot="{ Component, route }" :style="'height: ' + height"> |
| | | <router-view v-slot="{ Component, route }" :style="{ height: height + 'px' }"> |
| | | <keep-alive> |
| | | <component |
| | | v-if="route.meta.keepAlive" |
| | |
| | | </router-view> |
| | | </template> |
| | | <script setup> |
| | | import { ref, onMounted, provide } from 'vue'; |
| | | import { ref, onMounted, provide, inject, computed } from 'vue'; |
| | | import { useRouter, useRoute } from 'vue-router'; |
| | | |
| | | const contentMaxHeight = inject('contentMaxHeight'); |
| | | |
| | | const router = useRouter(); |
| | | const route = useRoute(); |
| | | |
| | | const menuRef = ref(null); |
| | | const height = ref('calc(100vh - 64px)'); |
| | | const height = ref(contentMaxHeight.value); |
| | | |
| | | const menu = ref([ |
| | | { |
| | |
| | | path: 'evaluate' |
| | | }, |
| | | { |
| | | name: 'å·¡æ¥ä¿¡æ¯', |
| | | name: 'æ´æ¹æ¸
å', |
| | | path: 'inspection' |
| | | }, |
| | | { |
| | |
| | | |
| | | function calcTableHeight() { |
| | | const h = menuRef.value.$el.offsetHeight; |
| | | return `calc(100vh - ${h}px - 60px - var(--el-main-padding) * 2)`; |
| | | return contentMaxHeight.value - h; |
| | | // return `calc(100vh - ${h}px - 60px - var(--el-main-padding) * 2)`; |
| | | } |
| | | |
| | | onMounted(() => { |
| | |
| | | }); |
| | | |
| | | // æä¾ç»å
é¨ç»ä»¶è§å¾æå¤§é«åº¦ |
| | | provide('viewHeight', height); |
| | | provide( |
| | | 'viewHeight', |
| | | computed(() => height.value) |
| | | ); |
| | | </script> |
| | | <style scoped></style> |
| | |
| | | <BaseProdProcess |
| | | v-model:active="active" |
| | | @onStep1="onStep1" |
| | | @onStep2="onStep2" |
| | | @onStep3="onStep3" |
| | | :loading="loading" |
| | | > |
| | | <!-- <template #step1> |
| | |
| | | </template> --> |
| | | <template #step2="{ contentHeight }"> |
| | | <el-table |
| | | id="prod-scene-table" |
| | | :data="tableData" |
| | | v-loading="loading" |
| | | :height="viewHeight" |
| | | :height="contentHeight + 'px'" |
| | | table-layout="fixed" |
| | | :show-overflow-tooltip="true" |
| | | size="small" |
| | | border |
| | | > |
| | | <el-table-column fixed="left" prop="index" label="ç¼å·" width="40"> |
| | | <el-table-column fixed="left" prop="index" label="ç¼å·" width="50"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | fixed="left" |
| | |
| | | <el-table-column prop="districtname" label="åºå¿" width="90" /> --> |
| | | <el-table-column prop="townname" label="è¡é" width="110" /> |
| | | <el-table-column prop="location" label="å°å" width="200" /> |
| | | <el-table-column prop="contacts" label="è系人" width="70" /> |
| | | <el-table-column prop="contactst" label="çµè¯" width="96" /> |
| | | <!-- <el-table-column prop="longitude" label="ç»åº¦" width="110" /> |
| | | <el-table-column prop="latitude" label="纬度" width="110" /> --> |
| | | <!-- <el-table-column |
| | |
| | | import BaseProdProcess from '@/views/fysp/data-product/base-data-product/components/BaseProdProcess.vue'; |
| | | import ProdQueryOpt from '@/views/fysp/data-product/base-data-product/components/ProdQueryOpt.vue'; |
| | | import dataprodbaseApi from '@/api/fysp/dataprodbaseApi.js'; |
| | | import { conversionFromTable } from '@/utils/excel'; |
| | | import { useProdStepChange } from '@/views/fysp/data-product/prod-step-change.js'; |
| | | |
| | | const active = ref(1); |
| | | const { active, changeActive } = useProdStepChange(); |
| | | const loading = ref(false); |
| | | const tableData = ref([]); |
| | | const viewHeight = inject('viewHeight'); |
| | | |
| | | function changeActive() { |
| | | active.value++; |
| | | active.value = active.value > 3 ? 1 : active.value; |
| | | } |
| | | |
| | | function onStep1(opt) { |
| | | loading.value = true; |
| | |
| | | }); |
| | | } |
| | | |
| | | function onStep2() { |
| | | changeActive(); |
| | | } |
| | | |
| | | function onStep3(val) { |
| | | if (val.downloadType == '1') { |
| | | loading.value = true; |
| | | conversionFromTable('prod-scene-table', 'å·¡æ¥åºæ¯æ¸
å'); |
| | | loading.value = false; |
| | | } |
| | | } |
| | | |
| | | function timeFormat(row, column, cellValue, index) { |
| | | return dayjs(cellValue).format('YYYY-MM-DD HH:mm:ss'); |
| | | } |
| | |
| | | <div |
| | | v-show="showStep1Thumbnail" |
| | | class="prod-thumbnail-wrapper" |
| | | :style="{ height: viewHeight }" |
| | | :style="{ height: viewHeight + 'px' }" |
| | | @click="changeActive(1)" |
| | | > |
| | | <div class="prod-thumbnail">â ä¿®æ¹é项</div> |
| | |
| | | <div v-show="showStep2Content"> |
| | | <div ref="titleRef" class="prod-title"> |
| | | <el-text tag="b" size="large">æ°æ®äº§åé¢è§</el-text> |
| | | <el-button type="primary" @click="$emit('onStep2')"> |
| | | ä¸è½½æ°æ®äº§å |
| | | </el-button> |
| | | </div> |
| | | <slot name="step2" :contentHeight="contentHeight"></slot> |
| | | </div> |
| | |
| | | <div |
| | | v-show="showStep2Thumbnail" |
| | | class="prod-thumbnail-wrapper" |
| | | :style="{ height: viewHeight }" |
| | | :style="{ height: viewHeight + 'px' }" |
| | | @click="changeActive(2)" |
| | | > |
| | | <div |
| | |
| | | <slot name="step3"></slot> |
| | | </template> |
| | | <template v-else> |
| | | <ProdDownload></ProdDownload> |
| | | <ProdDownload |
| | | :loading="loading" |
| | | :queryOpt="queryOpt" |
| | | @submit="onDownload" |
| | | ></ProdDownload> |
| | | </template> |
| | | </div> |
| | | </transition> |
| | |
| | | <div |
| | | v-show="showStep3Thumbnail" |
| | | class="prod-thumbnail-wrapper" |
| | | :style="{ height: viewHeight }" |
| | | :style="{ height: viewHeight + 'px' }" |
| | | @click="changeActive(3)" |
| | | > |
| | | <div |
| | |
| | | </el-row> |
| | | </template> |
| | | <script setup> |
| | | import { computed, inject, ref, watch, onMounted } from 'vue'; |
| | | import { computed, inject, ref, watch, onMounted, onUnmounted } from 'vue'; |
| | | import { unCalc } from '@/utils/css-util'; |
| | | import ProdQueryOpt from '@/views/fysp/data-product/base-data-product/components/ProdQueryOpt.vue'; |
| | | import ProdDownload from '@/views/fysp/data-product/base-data-product/components/ProdDownload.vue'; |
| | |
| | | } |
| | | }); |
| | | |
| | | const emit = defineEmits(['update:active', 'onStep1']); |
| | | const emit = defineEmits(['update:active', 'onStep1', 'onStep2', 'onStep3']); |
| | | |
| | | const viewHeight = inject('viewHeight'); |
| | | const contentMaxHeight = inject('contentMaxHeight'); |
| | | const viewHeight = inject('viewHeight', contentMaxHeight.value); |
| | | |
| | | const btnDisabled = ref(false); |
| | | |
| | |
| | | const contentHeight = ref('50vh'); |
| | | |
| | | function calContentHeight() { |
| | | console.log(titleRef.value.offsetHeight); |
| | | contentHeight.value = `calc(${unCalc(viewHeight.value)} - ${ |
| | | titleRef.value?.offsetHeight || 0 |
| | | }px)`; |
| | | console.log(contentHeight.value); |
| | | |
| | | // console.log(titleRef.value.offsetHeight); |
| | | contentHeight.value = viewHeight.value - (titleRef.value?.offsetHeight || 0); |
| | | // console.log(contentHeight.value); |
| | | } |
| | | |
| | | // æ°æ®äº§åçæé项 |
| | | const queryOpt = ref({}); |
| | | |
| | | // æ¥éª¤å¼ç¨ |
| | | const step1Ref = ref(null); |
| | |
| | | } |
| | | |
| | | function onSearch(opt) { |
| | | queryOpt.value = opt; |
| | | emit('onStep1', opt); |
| | | } |
| | | function onDownload(val) { |
| | | emit('onStep3', val); |
| | | } |
| | | function changeActive(index) { |
| | | let isAnimate = false; |
| | |
| | | // emit('update:active', index); |
| | | } |
| | | |
| | | let resizeObserver = null; |
| | | |
| | | onMounted(() => { |
| | | calContentHeight(); |
| | | if (titleRef.value) { |
| | | resizeObserver = new ResizeObserver(() => { |
| | | calContentHeight(); |
| | | }); |
| | | resizeObserver.observe(titleRef.value); |
| | | } |
| | | }); |
| | | // å¨ç»ä»¶å¸è½½æ¶æ¸
ç |
| | | onUnmounted(() => { |
| | | if (resizeObserver && titleRef.value) { |
| | | resizeObserver.unobserve(titleRef); |
| | | } |
| | | }); |
| | | </script> |
| | | <style scoped> |
| | |
| | | } |
| | | |
| | | .prod-title { |
| | | padding: 10px; |
| | | padding: 20px; |
| | | display: flex; |
| | | justify-content: space-between; |
| | | align-items: center; |
| | | } |
| | | |
| | | .prod-thumbnail-wrapper { |
| | |
| | | text-orientation: upright; |
| | | letter-spacing: 8px; |
| | | font-size: 18px; |
| | | font-weight: 500; |
| | | font-weight: 600; |
| | | border-top-left-radius: 4px; |
| | | border-bottom-left-radius: 4px; |
| | | cursor: pointer; |
| | |
| | | <template>ProdDownload</template> |
| | | <script setup></script> |
| | | <template> |
| | | <el-card shadow="never"> |
| | | <template #header> |
| | | <div><el-text tag="b" size="large">æ°æ®äº§åä¸è½½</el-text></div> |
| | | </template> |
| | | <el-form :inline="false" label-position="left" label-width="150px"> |
| | | <el-form-item label="åºå¿"> |
| | | <el-text>{{ queryOpt.districtName }}</el-text> |
| | | </el-form-item> |
| | | <el-form-item label="æ¶é´èå´"> |
| | | <el-text>{{ queryOpt.startTime }} è³ {{ queryOpt.endTime }}</el-text> |
| | | </el-form-item> |
| | | <el-form-item label="åºæ¯ç±»å"> |
| | | <el-text>{{ queryOpt.sceneTypeName }}</el-text> |
| | | </el-form-item> |
| | | <el-form-item label="产åå½¢å¼"> |
| | | <el-radio-group v-model="downloadType"> |
| | | <el-radio value="1"> Excel表å </el-radio> |
| | | <el-radio value="2" :disabled="true"> Wordææ¡£ </el-radio> |
| | | </el-radio-group> |
| | | </el-form-item> |
| | | </el-form> |
| | | <template #footer> |
| | | <el-row justify="end"> |
| | | <el-button |
| | | type="primary" |
| | | size="default" |
| | | :loading="loading" |
| | | @click="submit" |
| | | icon="Download" |
| | | >ä¸è½½</el-button |
| | | > |
| | | </el-row> |
| | | </template> |
| | | </el-card> |
| | | </template> |
| | | <script setup> |
| | | import { ref, computed } from 'vue'; |
| | | import dayjs from 'dayjs'; |
| | | import scene_1 from '@/assets/image/scene_1.png'; |
| | | |
| | | const props = defineProps({ |
| | | // æ°æ®äº§åçæé项 |
| | | queryOpt: { |
| | | type: Object, |
| | | default: () => {} |
| | | }, |
| | | loading: { |
| | | type: Boolean, |
| | | default: false |
| | | } |
| | | }); |
| | | const emit = defineEmits(['submit']); |
| | | |
| | | const downloadType = ref('1'); |
| | | |
| | | const submit = () => { |
| | | emit('submit', { |
| | | downloadType: downloadType.value |
| | | }); |
| | | }; |
| | | </script> |
| | | <style scoped> |
| | | /* .image { |
| | | width: 200px; |
| | | height: 200px; |
| | | } */ |
| | | </style> |
| | |
| | | > |
| | | </SearchBar> |
| | | <template #footer> |
| | | <el-row v-show="active" justify="space-around"> |
| | | <el-row v-show="active" justify="end"> |
| | | <el-button |
| | | type="primary" |
| | | size="default" |
| | |
| | | const search = (options) => { |
| | | const opt = { |
| | | topTaskId: options.topTask.tguid, |
| | | topTaskName: options.topTask.name, |
| | | provinceCode: options.topTask.provincecode, |
| | | provinceName: options.topTask.provincename, |
| | | cityCode: options.topTask.citycode, |
| | | cityName: options.topTask.cityname, |
| | | districtCode: options.topTask.districtcode, |
| | | districtName: options.topTask.districtname, |
| | | townCode: options.topTask.towncode, |
| | | townName: options.topTask.townname, |
| | | startTime: dayjs(options.topTask.starttime).format('YYYY-MM-DD HH:mm:ss'), |
| | | endTime: dayjs(options.topTask.endtime) |
| | | .add(1, 'day') |
| | | .add(-1, 'second') |
| | | .format('YYYY-MM-DD HH:mm:ss'), |
| | | sceneTypeId: options.sceneTypeId, |
| | | sceneTypeName: options.sceneTypeName, |
| | | needCache: true |
| | | }; |
| | | emit('submit', opt); |
¶Ô±ÈÐÂÎļþ |
| | |
| | | import { ref } from 'vue'; |
| | | /** |
| | | * æ°æ®äº§åæ¥éª¤åæ¢ |
| | | */ |
| | | export function useProdStepChange() { |
| | | const active = ref(1); |
| | | function changeActive() { |
| | | active.value++; |
| | | active.value = active.value > 3 ? 1 : active.value; |
| | | } |
| | | return { |
| | | active, |
| | | changeActive |
| | | }; |
| | | } |
| | |
| | | <template> |
| | | <FYTable @search="onSearch"> |
| | | <template #options> </template> |
| | | |
| | | <template #buttons> </template> |
| | | |
| | | <FYTable |
| | | :data="data" |
| | | :total-count="total" |
| | | @search="onSearch" |
| | | :extraHeight="tabsHeaderHeight" |
| | | > |
| | | <!-- <template #options> </template> |
| | | <template #buttons> </template> --> |
| | | <template #table-column> |
| | | <el-table-column |
| | | fixed="left" |
| | |
| | | {{ $fm.formatYMD(row.ncCreateTime) }} |
| | | </template> |
| | | </el-table-column> --> |
| | | <el-table-column prop="ncUserId" label="å¹é
ç¨æ·" width="110"> |
| | | <el-table-column prop="ncUserId" label="å¹é
ç¨æ·"> |
| | | <template #default="{ row }"> |
| | | <el-text v-loading="row._loading">{{ |
| | | row._user ? row._user.realName : 'æªå¹é
' |
| | | }}</el-text> |
| | | <el-text |
| | | :loading="row._loading" |
| | | :type="row._user ? 'primary' : 'danger'" |
| | | >{{ row._user ? row._user.realname : 'æªå¹é
' }}</el-text |
| | | > |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column fixed="right" label="æä½" width="160"> |
| | | <template #default="scope"> |
| | | <el-table-column fixed="right" label="æä½" width="80"> |
| | | <template #default="{ row }"> |
| | | <el-button |
| | | :loading="scope.row.loading1" |
| | | :disabled="row._loading" |
| | | type="default" |
| | | size="small" |
| | | @click="itemEdit(scope)" |
| | | @click="itemEdit(row)" |
| | | >ç¼è¾</el-button |
| | | > |
| | | <el-button |
| | | :loading="scope.row.loading2" |
| | | :type="scope.row.extension1 != '0' ? 'danger' : 'primary'" |
| | | size="small" |
| | | @click="itemActive(scope)" |
| | | >{{ scope.row.extension1 != '0' ? 'ä¸çº¿' : 'ä¸çº¿' }}</el-button |
| | | > |
| | | </template> |
| | | </el-table-column> |
| | | </template> |
| | | </FYTable> |
| | | <el-dialog v-model="dialog" destroy-on-close> |
| | | <CompInfoSearchFysp |
| | | v-model="selectedSVUser" |
| | | :area="area" |
| | | :defaultText="defaultText" |
| | | searchTextWidth="400px" |
| | | /> |
| | | <template #footer> |
| | | <el-button @click="dialog = false">åæ¶</el-button> |
| | | <el-button type="primary" @click="submit" :disabled="!selectedSVUser" |
| | | >ç¡®å®</el-button |
| | | > |
| | | </template> |
| | | </el-dialog> |
| | | </template> |
| | | <script setup> |
| | | import { ref } from 'vue'; |
| | | import { ref, inject, computed } from 'vue'; |
| | | import nightConstructionApi from '@/api/fysp/nightConstructionApi'; |
| | | import userApi from '@/api/fysp/userApi'; |
| | | import CompInfoSearchFysp from '@/views/fysp/config/components/CompInfoSearchFysp.vue'; |
| | | import { ElMessage } from 'element-plus'; |
| | | |
| | | const tabsHeaderHeight = inject('tabsHeaderHeight', 0); |
| | | |
| | | // å¤é´æ½å·¥è®°å½åæ»æ° |
| | | const data = ref([]); |
| | | const total = ref(0); |
| | | |
| | | // å¤é´æ½å·¥è®°å½å¹é
å¼¹çª |
| | | const dialog = ref(false); |
| | | const selectedSVUser = ref(null); |
| | | const selectedRow = ref(null); |
| | | const area = ref({ |
| | | provincecode: '31', |
| | | provincename: '䏿µ·å¸', |
| | | citycode: '3100', |
| | | cityname: '䏿µ·å¸', |
| | | districtcode: '310106', |
| | | districtname: 'éå®åº', |
| | | scensetypeid: '1' |
| | | }); |
| | | const defaultText = computed(() => { |
| | | return selectedRow.value?.ncItemName || undefined; |
| | | }); |
| | | |
| | | function onSearch(page, callback) { |
| | | return nightConstructionApi |
| | |
| | | }) |
| | | .then((res) => { |
| | | if (res.success) { |
| | | res.data.forEach((d) => { |
| | | res.data._loading = true; |
| | | userApi.getUserById(d.ncUserId).then((res1) => { |
| | | res.data._user = res1; |
| | | }); |
| | | data.value = res.data; |
| | | data.value.forEach((d) => { |
| | | d._loading = true; |
| | | if (d.ncUserId) { |
| | | userApi |
| | | .getUserById(d.ncUserId) |
| | | .then((res1) => { |
| | | d._user = res1; |
| | | }) |
| | | .finally(() => { |
| | | d._loading = false; |
| | | }); |
| | | } else { |
| | | d._loading = false; |
| | | } |
| | | }); |
| | | callback({ |
| | | data: res.data, |
| | | total: res.head.totalCount |
| | | }); |
| | | total.value = res.head.totalCount; |
| | | callback(); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | function itemEdit(row) { |
| | | selectedRow.value = row; |
| | | selectedSVUser.value = row._user; |
| | | dialog.value = true; |
| | | } |
| | | |
| | | function submit() { |
| | | if (!selectedSVUser.value) { |
| | | return ElMessage.error('è¯·éæ©ç¨æ·'); |
| | | } |
| | | nightConstructionApi |
| | | .updateRecord({ |
| | | recordId: selectedRow.value.ncId, |
| | | userId: selectedSVUser.value.guid, |
| | | sceneId: selectedSVUser.value.dguid |
| | | }) |
| | | .then((res) => { |
| | | if (res.success) { |
| | | selectedRow.value.ncUserId = res.data.ncUserId; |
| | | selectedRow.value.ncSceneId = res.data.ncSceneId; |
| | | userApi |
| | | .getUserById(selectedRow.value.ncUserId) |
| | | .then((res1) => { |
| | | selectedRow.value._user = res1; |
| | | }) |
| | | .finally(() => { |
| | | selectedRow.value._loading = false; |
| | | }); |
| | | } |
| | | }) |
| | | .finally(() => { |
| | | dialog.value = false; |
| | | selectedRow.value._user = selectedSVUser.value; |
| | | }); |
| | | } |
| | | </script> |
| | |
| | | <template> |
| | | <el-tabs type="border-card"> |
| | | <el-tabs ref="tabsRef"> |
| | | <el-tab-pane label="éå®å¤é´æ½å·¥ç®¡ç"> |
| | | <JingAnNightConstruction></JingAnNightConstruction> |
| | | </el-tab-pane> |
| | |
| | | </el-tabs> |
| | | </template> |
| | | <script setup> |
| | | import { ref, onMounted, provide, computed } from 'vue'; |
| | | import NewDevice from './NewDevice.vue'; |
| | | import NewConstruction from './NewConstruction.vue'; |
| | | import JingAnNightConstruction from './JingAnNightConstruction.vue'; |
| | | |
| | | // å®ä¹ tabs ref |
| | | const tabsRef = ref(null); |
| | | const tabsHeaderHeight = ref(0); |
| | | |
| | | onMounted(() => { |
| | | // ç¡®ä¿ DOM å·²ç»æ¸²æå®æ |
| | | setTimeout(() => { |
| | | tabsHeaderHeight.value = getTabsHeaderHeight(); |
| | | }, 0); |
| | | }); |
| | | |
| | | function getTabsHeaderHeight() { |
| | | if (tabsRef.value) { |
| | | // è·å el-tabs ç»ä»¶ç DOM å
ç´ |
| | | const tabsElement = tabsRef.value.$el; |
| | | |
| | | // Element UI ç el-tabs header é常æ .el-tabs__header ç±»å |
| | | const headerElement = tabsElement.querySelector('.el-tabs__header'); |
| | | |
| | | if (headerElement) { |
| | | // è·å header ç offsetHeightï¼å
å« padding å borderï¼ä¸å
å« marginï¼ |
| | | const offsetHeight = headerElement.offsetHeight; |
| | | |
| | | // è·åè®¡ç®æ ·å¼ä»¥è·å margin å¼ |
| | | const computedStyle = window.getComputedStyle(headerElement); |
| | | |
| | | // è§£æ margin å¼ï¼ä¸ä¸å·¦å³ï¼ |
| | | const marginTop = parseFloat(computedStyle.marginTop || 0); |
| | | const marginBottom = parseFloat(computedStyle.marginBottom || 0); |
| | | // const marginLeft = parseFloat(computedStyle.marginLeft || 0); |
| | | // const marginRight = parseFloat(computedStyle.marginRight || 0); |
| | | |
| | | // è®¡ç®æ»é«åº¦ï¼å
嫿æ paddingãborder å marginï¼ |
| | | const totalHeightWithMargin = offsetHeight + marginTop + marginBottom; |
| | | |
| | | return totalHeightWithMargin; |
| | | } |
| | | } |
| | | return 0; |
| | | } |
| | | |
| | | provide('tabsHeaderHeight', computed(() => tabsHeaderHeight.value)); |
| | | </script> |
| | | <style scoped></style> |