| ¶Ô±ÈÐÂÎļþ |
| | |
| | | import request from '@/utils/request' |
| | | |
| | | // è·åæè®¿è®°å½å表 |
| | | export function getVisitRecords(query) { |
| | | return request({ |
| | | url: '/customerVisits/listPage', |
| | | method: 'get', |
| | | params: query |
| | | }) |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div class="app-container"> |
| | | <div class="search_form"> |
| | | <el-form :model="searchForm" :inline="true"> |
| | | <el-form-item label="客æ·åç§°ï¼"> |
| | | <el-input |
| | | v-model="searchForm.customerName" |
| | | placeholder="请è¾å
¥å®¢æ·åç§°" |
| | | clearable |
| | | prefix-icon="Search" |
| | | style="width: 200px" |
| | | @change="handleQuery" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="æè®¿äººï¼"> |
| | | <el-input |
| | | v-model="searchForm.visitingPeople" |
| | | placeholder="请è¾å
¥æè®¿äºº" |
| | | clearable |
| | | prefix-icon="Search" |
| | | style="width: 200px" |
| | | @change="handleQuery" |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button type="primary" @click="handleQuery">æç´¢</el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | | </div> |
| | | <div class="table_list"> |
| | | <el-table |
| | | :data="tableData" |
| | | border |
| | | v-loading="tableLoading" |
| | | style="width: 100%" |
| | | height="calc(100vh - 18.5em)" |
| | | > |
| | | <el-table-column align="center" label="åºå·" type="index" width="60" /> |
| | | <el-table-column label="客æ·åç§°" prop="customerName" width="150" show-overflow-tooltip /> |
| | | <el-table-column label="è系人" prop="contact" width="120" show-overflow-tooltip /> |
| | | <el-table-column label="èç³»çµè¯" prop="contactPhone" width="140" show-overflow-tooltip /> |
| | | <el-table-column label="æè®¿ç®ç" prop="purposeVisit" width="150" show-overflow-tooltip /> |
| | | <el-table-column label="æè®¿æ¶é´" prop="purposeDate" width="180" show-overflow-tooltip /> |
| | | <el-table-column label="æè®¿å°ç¹" prop="visitAddress" min-width="200" show-overflow-tooltip /> |
| | | <el-table-column label="æè®¿äºº" prop="visitingPeople" width="120" show-overflow-tooltip /> |
| | | <el-table-column fixed="right" label="æä½" width="100" align="center"> |
| | | <template #default="scope"> |
| | | <el-button link type="primary" size="small" @click="viewDetail(scope.row)">æ¥ç</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | <pagination |
| | | v-show="total > 0" |
| | | :total="total" |
| | | layout="total, sizes, prev, pager, next, jumper" |
| | | :page="page.current" |
| | | :limit="page.size" |
| | | @pagination="paginationChange" |
| | | /> |
| | | </div> |
| | | |
| | | <!-- 详æ
å¼¹çª --> |
| | | <el-dialog |
| | | v-model="detailVisible" |
| | | title="å®¢æ·æè®¿è®°å½è¯¦æ
" |
| | | width="600px" |
| | | @close="closeDetail" |
| | | > |
| | | <div class="content-container"> |
| | | <!-- 客æ·ä¿¡æ¯ --> |
| | | <div class="section"> |
| | | <div class="section-title">客æ·ä¿¡æ¯</div> |
| | | <div class="info-item"> |
| | | <span class="info-label">客æ·åç§°</span> |
| | | <span class="info-value">{{ detailForm.customerName || '-' }}</span> |
| | | </div> |
| | | <div class="info-item"> |
| | | <span class="info-label">è系人</span> |
| | | <span class="info-value">{{ detailForm.contact || '-' }}</span> |
| | | </div> |
| | | <div class="info-item"> |
| | | <span class="info-label">èç³»çµè¯</span> |
| | | <span class="info-value">{{ detailForm.contactPhone || '-' }}</span> |
| | | </div> |
| | | </div> |
| | | |
| | | <!-- æè®¿ä¿¡æ¯ --> |
| | | <div class="section"> |
| | | <div class="section-title">æè®¿ä¿¡æ¯</div> |
| | | <div class="info-item"> |
| | | <span class="info-label">æè®¿ç®ç</span> |
| | | <span class="info-value">{{ detailForm.purposeVisit || '-' }}</span> |
| | | </div> |
| | | <div class="info-item"> |
| | | <span class="info-label">æè®¿æ¶é´</span> |
| | | <span class="info-value">{{ detailForm.purposeDate || '-' }}</span> |
| | | </div> |
| | | <div class="info-item"> |
| | | <span class="info-label">æè®¿å°ç¹</span> |
| | | <span class="info-value multi-line">{{ detailForm.visitAddress || '-' }}</span> |
| | | </div> |
| | | <div class="info-item"> |
| | | <span class="info-label">æè®¿äºº</span> |
| | | <span class="info-value">{{ detailForm.visitingPeople || '-' }}</span> |
| | | </div> |
| | | <div class="info-item" v-if="detailForm.latitude && detailForm.longitude"> |
| | | <span class="info-label">ç»çº¬åº¦</span> |
| | | <span class="info-value">{{ detailForm.latitude }}, {{ detailForm.longitude }}</span> |
| | | </div> |
| | | </div> |
| | | |
| | | <!-- 夿³¨ä¿¡æ¯ --> |
| | | <div class="section"> |
| | | <div class="section-title">夿³¨ä¿¡æ¯</div> |
| | | <div class="info-item remark-item"> |
| | | <span class="info-label">夿³¨</span> |
| | | <span class="info-value multi-line">{{ detailForm.remark || '-' }}</span> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <template #footer> |
| | | <div class="dialog-footer"> |
| | | <el-button @click="closeDetail">å
³é</el-button> |
| | | </div> |
| | | </template> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script setup> |
| | | import { ref, reactive, onMounted, getCurrentInstance } from 'vue' |
| | | import pagination from '@/components/PIMTable/Pagination.vue' |
| | | import { getVisitRecords } from '@/api/collaborativeApproval/customerVisit.js' |
| | | |
| | | const { proxy } = getCurrentInstance() |
| | | const tableData = ref([]) |
| | | const tableLoading = ref(false) |
| | | const page = reactive({ |
| | | current: 1, |
| | | size: 10, |
| | | }) |
| | | const total = ref(0) |
| | | |
| | | // æç´¢è¡¨å |
| | | const searchForm = reactive({ |
| | | customerName: '', |
| | | visitingPeople: '', |
| | | }) |
| | | |
| | | // 详æ
ç¸å
³ |
| | | const detailVisible = ref(false) |
| | | const detailForm = ref({}) |
| | | |
| | | // æ¥è¯¢å表 |
| | | const handleQuery = () => { |
| | | page.current = 1 |
| | | getList() |
| | | } |
| | | |
| | | // å页åå |
| | | const paginationChange = (obj) => { |
| | | page.current = obj.page |
| | | page.size = obj.limit |
| | | getList() |
| | | } |
| | | |
| | | // è·ååè¡¨æ°æ® |
| | | const getList = () => { |
| | | tableLoading.value = true |
| | | getVisitRecords({ ...searchForm, ...page }) |
| | | .then((res) => { |
| | | tableLoading.value = false |
| | | if (res.code === 200) { |
| | | tableData.value = res.data?.records || res.records || [] |
| | | total.value = res.data?.total || res.total || 0 |
| | | } else { |
| | | proxy.$modal.msgError(res.msg || 'è·åæ°æ®å¤±è´¥') |
| | | } |
| | | }) |
| | | .catch(() => { |
| | | tableLoading.value = false |
| | | }) |
| | | } |
| | | |
| | | // æ¥ç详æ
|
| | | const viewDetail = (row) => { |
| | | detailForm.value = { ...row } |
| | | detailVisible.value = true |
| | | } |
| | | |
| | | // å
³é详æ
|
| | | const closeDetail = () => { |
| | | detailVisible.value = false |
| | | detailForm.value = {} |
| | | } |
| | | |
| | | onMounted(() => { |
| | | getList() |
| | | }) |
| | | </script> |
| | | |
| | | <style scoped lang="scss"> |
| | | .table_list { |
| | | margin-top: unset; |
| | | } |
| | | |
| | | .content-container { |
| | | padding: 10px; |
| | | } |
| | | |
| | | .section { |
| | | margin-bottom: 24px; |
| | | |
| | | &:last-child { |
| | | margin-bottom: 0; |
| | | } |
| | | } |
| | | |
| | | .section-title { |
| | | font-size: 16px; |
| | | font-weight: bold; |
| | | color: #303133; |
| | | margin-bottom: 16px; |
| | | padding-bottom: 8px; |
| | | border-bottom: 1px solid #e4e7ed; |
| | | } |
| | | |
| | | .info-item { |
| | | display: flex; |
| | | margin-bottom: 12px; |
| | | line-height: 1.6; |
| | | |
| | | &:last-child { |
| | | margin-bottom: 0; |
| | | } |
| | | |
| | | &.remark-item { |
| | | flex-direction: column; |
| | | align-items: flex-start; |
| | | |
| | | .info-label { |
| | | margin-bottom: 8px; |
| | | } |
| | | |
| | | .info-value { |
| | | width: 100%; |
| | | } |
| | | } |
| | | } |
| | | |
| | | .info-label { |
| | | font-weight: 500; |
| | | color: #606266; |
| | | min-width: 100px; |
| | | margin-right: 12px; |
| | | flex-shrink: 0; |
| | | } |
| | | |
| | | .info-value { |
| | | color: #303133; |
| | | flex: 1; |
| | | word-break: break-all; |
| | | |
| | | &.multi-line { |
| | | white-space: pre-wrap; |
| | | word-break: break-word; |
| | | } |
| | | } |
| | | </style> |
| | |
| | | const handleDelete = () => { |
| | | let ids = []; |
| | | if (selectedRows.value.length > 0) { |
| | | // æ£æ¥æ¯å¦æä»äººç»´æ¤çæ°æ® |
| | | const unauthorizedData = selectedRows.value.filter( |
| | | item => item.recorderName !== userStore.nickName |
| | | ); |
| | | if (unauthorizedData.length > 0) { |
| | | proxy.$modal.msgWarning("ä¸å¯å é¤ä»äººç»´æ¤çæ°æ®"); |
| | | return; |
| | | } |
| | | ids = selectedRows.value.map(item => item.id); |
| | | } else { |
| | | proxy.$modal.msgWarning("è¯·éæ©æ°æ®"); |
| | |
| | | border: 1px solid #1a58b0; |
| | | padding: 18px; |
| | | width: 100%; |
| | | height: 428px; |
| | | height: 432px; |
| | | } |
| | | </style> |
| | | |
| | |
| | | |
| | | .card-label { |
| | | font-weight: 400; |
| | | font-size: 19px; |
| | | font-size: 16px; |
| | | color: rgba(208, 231, 255, 0.7); |
| | | } |
| | | |
| | |
| | | <div class="filters-row"> |
| | | <DateTypeSwitch v-model="dateType" @change="handleDateTypeChange" /> |
| | | </div> |
| | | <Echarts ref="chart" :chartStyle="chartStyle" :grid="grid" :legend="barLegend" :series="chartSeries" |
| | | :tooltip="tooltip" :xAxis="xAxis1" :yAxis="yAxis1" |
| | | :options="{ backgroundColor: 'transparent', textStyle: { color: '#B8C8E0' } }" style="height: 320px" /> |
| | | <Echarts |
| | | ref="chart" |
| | | :chartStyle="chartStyle" |
| | | :grid="grid" |
| | | :legend="barLegend" |
| | | :series="chartSeries" |
| | | :tooltip="tooltip" |
| | | :xAxis="xAxis1" |
| | | :yAxis="yAxis1" |
| | | :options="{ backgroundColor: 'transparent', textStyle: { color: '#B8C8E0' } }" |
| | | style="height: 260px" |
| | | /> |
| | | </div> |
| | | </div> |
| | | </template> |
| | |
| | | |
| | | const dateType = ref(1) |
| | | |
| | | const chartStyle = { width: '100%', height: '100%' } |
| | | const grid = { left: '3%', right: '4%', bottom: '3%', top: '15%', containLabel: true } |
| | | const chartStyle = { |
| | | width: '100%', |
| | | height: '140%', |
| | | } |
| | | |
| | | const grid = { left: '3%', right: '4%', bottom: '3%', top: '10%', containLabel: true } |
| | | |
| | | const barLegend = { |
| | | show: true, |
| | | textStyle: { color: '#B8C8E0' }, |
| | | data: ['宿æ°é', 'å·¥èµéé¢', 'åæ ¼ç'], |
| | | top: '0%' |
| | | } |
| | | |
| | | // åå§å series ç»æ |
| | | const chartSeries = ref([ |
| | | { |
| | | name: '宿æ°é', |
| | | type: 'bar', |
| | | barWidth: 15, |
| | | itemStyle: { color: '#4EE4FF' }, |
| | | data: [] |
| | | barWidth: 20, |
| | | barGap: '40%', |
| | | emphasis: { focus: 'series' }, |
| | | itemStyle: { |
| | | color: { |
| | | type: 'linear', |
| | | x: 0, |
| | | y: 0, |
| | | x2: 0, |
| | | y2: 1, |
| | | colorStops: [ |
| | | { offset: 1, color: 'rgba(0, 164, 237, 0)' }, |
| | | { offset: 0, color: 'rgba(78, 228, 255, 1)' }, |
| | | ], |
| | | }, |
| | | }, |
| | | data: [], |
| | | }, |
| | | { |
| | | name: 'å·¥èµéé¢', |
| | | type: 'bar', |
| | | barWidth: 15, |
| | | itemStyle: { color: '#00A4ED' }, |
| | | data: [] |
| | | barGap: '40%', |
| | | barWidth: 20, |
| | | emphasis: { focus: 'series' }, |
| | | itemStyle: { |
| | | color: { |
| | | type: 'linear', |
| | | x: 0, |
| | | y: 0, |
| | | x2: 0, |
| | | y2: 1, |
| | | colorStops: [ |
| | | { offset: 1, color: 'rgba(83, 126, 245, 0.19)' }, |
| | | { offset: 0, color: 'rgba(144, 97, 248, 1)' }, |
| | | ], |
| | | }, |
| | | }, |
| | | data: [], |
| | | }, |
| | | { |
| | | name: 'åæ ¼ç', |
| | | type: 'line', |
| | | yAxisIndex: 1, |
| | | smooth: true, |
| | | itemStyle: { color: '#FFD339' }, |
| | | data: [] |
| | | } |
| | | showSymbol: true, |
| | | symbol: 'circle', |
| | | symbolSize: 8, |
| | | lineStyle: { color: 'rgba(90, 216, 166, 1)', width: 2 }, |
| | | itemStyle: { color: 'rgba(90, 216, 166, 1)' }, |
| | | data: [], |
| | | emphasis: { focus: 'series' }, |
| | | }, |
| | | ]) |
| | | |
| | | const xAxis1 = ref([ |
| | | { type: 'category', axisTick: { show: false }, axisLabel: { color: '#B8C8E0' }, data: [] } |
| | | { type: 'category', axisTick: { show: false }, axisLabel: { color: '#B8C8E0' }, data: [] }, |
| | | ]) |
| | | |
| | | const yAxis1 = [ |
| | | { type: 'value', name: 'æ°é/éé¢', axisLabel: { color: '#B8C8E0' }, splitLine: { lineStyle: { color: 'rgba(184, 200, 224, 0.2)' } } }, |
| | | { type: 'value', name: 'åæ ¼ç(%)', max: 100, axisLabel: { formatter: '{value}%', color: '#B8C8E0' }, splitLine: { show: false } } |
| | | { |
| | | type: 'value', |
| | | name: 'æ°é/éé¢', |
| | | axisLabel: { color: '#B8C8E0' }, |
| | | nameTextStyle: { color: '#B8C8E0' }, |
| | | // splitLine: { lineStyle: { color: 'rgba(184, 200, 224, 0.2)' } }, |
| | | }, |
| | | { |
| | | type: 'value', |
| | | name: 'åæ ¼ç(%)', |
| | | min: 0, |
| | | max: 100, |
| | | axisLabel: { color: '#B8C8E0', formatter: '{value}%' }, |
| | | nameTextStyle: { color: '#B8C8E0' }, |
| | | splitLine: { lineStyle: { color: 'rgba(184, 200, 224, 0.2)' } }, |
| | | }, |
| | | ] |
| | | |
| | | const tooltip = { |
| | | trigger: 'axis', |
| | | axisPointer: { type: 'shadow' }, |
| | | axisPointer: { type: 'cross' }, |
| | | formatter(params) { |
| | | let res = params[0].axisValueLabel + '<br/>' |
| | | params.forEach(item => { |
| | | let result = params[0].axisValueLabel + '<br/>' |
| | | params.forEach((item) => { |
| | | const unit = item.seriesName === 'åæ ¼ç' ? '%' : (item.seriesName === 'å·¥èµéé¢' ? ' å
' : ' 个') |
| | | res += `${item.marker} ${item.seriesName}: ${item.value}${unit}<br/>` |
| | | result += `<div>${item.marker} ${item.seriesName}: ${item.value}${unit}</div>` |
| | | }) |
| | | return res |
| | | } |
| | | return result |
| | | }, |
| | | } |
| | | |
| | | const handleDateTypeChange = () => { |
| | |
| | | chartSeries.value[0].data = items.map(item => Number(item.numberOfCompleted) || 0) |
| | | chartSeries.value[1].data = items.map(item => Number(item.amount) || 0) |
| | | chartSeries.value[2].data = items.map(item => Number(item.passRate) || 0) |
| | | |
| | | console.log('æ´æ°åçæ°æ®:', chartSeries.value) |
| | | } |
| | | }) |
| | | .catch((err) => { |
| | |
| | | </script> |
| | | |
| | | <style scoped> |
| | | .main-panel { |
| | | display: flex; |
| | | flex-direction: column; |
| | | gap: 20px; |
| | | } |
| | | |
| | | .filters-row { |
| | | display: flex; |
| | | justify-content: flex-end; |
| | | align-items: center; |
| | | gap: 12px; |
| | | margin-bottom: 10px; |
| | | } |
| | | |
| | | .panel-item-customers { |
| | | border: 1px solid #1a58b0; |
| | | padding: 18px; |
| | | width: 100%; |
| | | height: 449px; |
| | | box-sizing: border-box; |
| | | } |
| | | |
| | | .filters-row { |
| | | display: flex; |
| | | justify-content: flex-end; |
| | | margin-bottom: 10px; |
| | | } |
| | | </style> |
| | |
| | | <template> |
| | | <div> |
| | | <div class="chart-header"> |
| | | <PanelHeader title="宿æ£éªæ°" /> |
| | | <div class="chart-header-title"> |
| | | <PanelHeader title="宿æ£éªæ°" /> |
| | | </div> |
| | | <div class="warn-range" @click="handleRangeClick">è¿7天</div> |
| | | </div> |
| | | <div class="main-panel panel-item-customers"> |
| | | <Echarts |
| | | ref="chart" |
| | | :chartStyle="chartStyle" |
| | | :grid="grid" |
| | | :legend="barLegend" |
| | | :series="chartSeries" |
| | | :tooltip="tooltip" |
| | | :xAxis="xAxis1" |
| | | :yAxis="yAxis1" |
| | | :options="{ backgroundColor: 'transparent', textStyle: { color: '#B8C8E0' } }" |
| | | style="height: 260px" |
| | | ref="chart" |
| | | :chartStyle="chartStyle" |
| | | :grid="grid" |
| | | :legend="barLegend" |
| | | :series="chartSeries" |
| | | :tooltip="tooltip" |
| | | :xAxis="xAxis1" |
| | | :yAxis="yAxis1" |
| | | :options="{ backgroundColor: 'transparent', textStyle: { color: '#B8C8E0' } }" |
| | | style="height: 260px" |
| | | /> |
| | | </div> |
| | | </div> |
| | |
| | | |
| | | const chartStyle = { |
| | | width: '100%', |
| | | height: '135%', |
| | | height: '140%', |
| | | } |
| | | |
| | | const grid = { left: '8%', right: '8%', bottom: '8%', top: '15%', containLabel: true } |
| | | const grid = { left: '3%', right: '4%', bottom: '3%', top: '10%', containLabel: true } |
| | | |
| | | const barLegend = { |
| | | show: true, |
| | | top: '5%', |
| | | left: 'center', |
| | | textStyle: { color: '#B8C8E0', fontSize: 14 }, |
| | | itemGap: 30, |
| | | textStyle: { color: '#B8C8E0' }, |
| | | data: ['åæ ¼', 'ä¸åæ ¼', 'åæ ¼ç'], |
| | | } |
| | | |
| | | // æ±ç¶å¾ï¼åæ ¼ï¼é»è²ï¼ãä¸åæ ¼ï¼ç´«è²ï¼ï¼æçº¿å¾ï¼åæ ¼çï¼èè²ï¼ |
| | | const chartSeries = ref([ |
| | | { |
| | | name: 'åæ ¼', |
| | | type: 'bar', |
| | | barWidth: 20, |
| | | barGap: '20%', |
| | | yAxisIndex: 0, |
| | | barGap: '40%', |
| | | emphasis: { focus: 'series' }, |
| | | itemStyle: { |
| | | color: { |
| | |
| | | x2: 0, |
| | | y2: 1, |
| | | colorStops: [ |
| | | { offset: 0, color: 'rgba(255, 215, 0, 1)' }, // éé»è²é¡¶é¨ |
| | | { offset: 1, color: 'rgba(255, 215, 0, 0.5)' }, // åéæåºé¨ |
| | | { offset: 1, color: 'rgba(0, 164, 237, 0)' }, |
| | | { offset: 0, color: 'rgba(78, 228, 255, 1)' }, |
| | | ], |
| | | }, |
| | | }, |
| | |
| | | { |
| | | name: 'ä¸åæ ¼', |
| | | type: 'bar', |
| | | barGap: '20%', |
| | | barGap: '40%', |
| | | barWidth: 20, |
| | | yAxisIndex: 0, |
| | | emphasis: { focus: 'series' }, |
| | | itemStyle: { |
| | | color: { |
| | |
| | | x2: 0, |
| | | y2: 1, |
| | | colorStops: [ |
| | | { offset: 0, color: 'rgba(144, 97, 248, 1)' }, // ç´«è²é¡¶é¨ |
| | | { offset: 1, color: 'rgba(144, 97, 248, 0.6)' }, // åéæåºé¨ |
| | | { offset: 1, color: 'rgba(83, 126, 245, 0.19)' }, |
| | | { offset: 0, color: 'rgba(144, 97, 248, 1)' }, |
| | | ], |
| | | }, |
| | | }, |
| | |
| | | name: 'åæ ¼ç', |
| | | type: 'line', |
| | | yAxisIndex: 1, |
| | | smooth: true, |
| | | showSymbol: true, |
| | | symbol: 'circle', |
| | | symbolSize: 8, |
| | | lineStyle: { |
| | | color: 'rgba(78, 228, 255, 1)', // éè² |
| | | width: 2, |
| | | }, |
| | | itemStyle: { |
| | | color: 'rgba(78, 228, 255, 1)', |
| | | borderWidth: 2, |
| | | borderColor: '#fff', |
| | | }, |
| | | emphasis: { |
| | | focus: 'series', |
| | | itemStyle: { |
| | | shadowBlur: 10, |
| | | shadowColor: 'rgba(78, 228, 255, 0.8)', |
| | | }, |
| | | }, |
| | | lineStyle: { color: 'rgba(90, 216, 166, 1)', width: 2 }, |
| | | itemStyle: { color: 'rgba(90, 216, 166, 1)' }, |
| | | data: [], |
| | | emphasis: { focus: 'series' }, |
| | | }, |
| | | ]) |
| | | |
| | | const tooltip = { |
| | | trigger: 'axis', |
| | | axisPointer: { type: 'cross' }, |
| | | backgroundColor: 'rgba(0, 0, 0, 0.8)', |
| | | borderColor: 'rgba(78, 228, 255, 0.5)', |
| | | borderWidth: 1, |
| | | textStyle: { color: '#B8C8E0' }, |
| | | formatter(params) { |
| | | let result = params[0].axisValueLabel + '<br/>' |
| | | params.forEach((item) => { |
| | | let unit = '' |
| | | if (item.seriesName === 'åæ ¼ç') { |
| | | unit = '%' |
| | | } else { |
| | | unit = 'ä»¶' |
| | | } |
| | | result += `<div style="margin: 4px 0;">${item.marker} ${item.seriesName}: ${item.value}${unit}</div>` |
| | | const unit = item.seriesName === 'åæ ¼ç' ? '%' : 'ä»¶' |
| | | result += `<div>${item.marker} ${item.seriesName}: ${item.value}${unit}</div>` |
| | | }) |
| | | return result |
| | | }, |
| | | } |
| | | |
| | | const xAxis1 = ref([ |
| | | { |
| | | type: 'category', |
| | | axisTick: { show: false }, |
| | | axisLabel: { color: '#B8C8E0', fontSize: 12 }, |
| | | axisLine: { lineStyle: { color: 'rgba(184, 200, 224, 0.3)' } }, |
| | | data: [], |
| | | }, |
| | | { type: 'category', axisTick: { show: false }, axisLabel: { color: '#B8C8E0' }, data: [] }, |
| | | ]) |
| | | |
| | | const yAxis1 = [ |
| | | { type: 'value', name: 'ä»¶', axisLabel: { color: '#B8C8E0' }, nameTextStyle: { color: '#B8C8E0' } }, |
| | | { |
| | | type: 'value', |
| | | name: 'åä½: ä»¶', |
| | | nameLocation: 'start', |
| | | nameTextStyle: { color: '#B8C8E0', fontSize: 12, padding: [0, 0, 0, 10] }, |
| | | axisLabel: { color: '#B8C8E0', fontSize: 12 }, |
| | | axisLine: { show: false }, |
| | | splitLine: { |
| | | show: true, |
| | | lineStyle: { color: 'rgba(184, 200, 224, 0.2)', type: 'dashed' }, |
| | | }, |
| | | }, |
| | | { |
| | | type: 'value', |
| | | name: 'åä½: %', |
| | | nameLocation: 'end', |
| | | nameTextStyle: { color: '#B8C8E0', fontSize: 12, padding: [0, 0, 0, 10] }, |
| | | name: 'åæ ¼ç(%)', |
| | | min: 0, |
| | | max: 100, |
| | | axisLabel: { color: '#B8C8E0', fontSize: 12, formatter: '{value}' }, |
| | | axisLine: { show: false }, |
| | | splitLine: { |
| | | show: true, |
| | | lineStyle: { color: 'rgba(184, 200, 224, 0.2)', type: 'dashed' }, |
| | | }, |
| | | axisLabel: { color: '#B8C8E0', formatter: '{value}%' }, |
| | | nameTextStyle: { color: '#B8C8E0' }, |
| | | splitLine: { lineStyle: { color: 'rgba(184, 200, 224, 0.2)' } }, |
| | | }, |
| | | ] |
| | | |
| | |
| | | position: relative; |
| | | display: flex; |
| | | align-items: center; |
| | | width: 100%; |
| | | } |
| | | |
| | | .chart-header-title { |
| | | flex: 1; |
| | | min-width: 0; |
| | | width: 100%; |
| | | } |
| | | |
| | | .warn-range { |
| | |
| | | border: 1px solid #1a58b0; |
| | | padding: 18px; |
| | | width: 100%; |
| | | height: 449px; |
| | | position: relative; |
| | | background: radial-gradient(circle at 50% 50%, rgba(78, 228, 255, 0.05) 0%, rgba(0, 0, 0, 0) 70%); |
| | | height: 436px; |
| | | } |
| | | </style> |
| | |
| | | gap: 6px; |
| | | font-size: 15px; |
| | | color: #d0e7ff; |
| | | white-space: nowrap; |
| | | flex-wrap: nowrap; |
| | | } |
| | | |
| | | .card-compare>span:first-child { |
| | |
| | | }) |
| | | </script> |
| | | |
| | | <style scoped> |
| | | <style scoped lang="scss"> |
| | | .main-panel { |
| | | display: flex; |
| | | flex-direction: column; |
| | |
| | | border: 1px solid #1a58b0; |
| | | padding: 14px 18px; |
| | | width: 100%; |
| | | height: 960px; |
| | | height: 958px; |
| | | box-sizing: border-box; |
| | | } |
| | | |
| | |
| | | border: 1px solid #1a58b0; |
| | | padding: 18px; |
| | | width: 100%; |
| | | height: 420px; |
| | | height: 449px; |
| | | } |
| | | |
| | | .pie-chart-wrapper { |
| | |
| | | <script setup> |
| | | import { ref, onMounted, onBeforeUnmount, nextTick } from 'vue' |
| | | import autofit from 'autofit.js' |
| | | import LeftBottom from './components/left-bottom.vue' |
| | | import CenterCenter from './components/center-center.vue' |
| | | import RightTop from './components/right-top.vue' |
| | | import RightBottom from './components/right-bottom.vue' |
| | |
| | | <el-descriptions-item label="äºæ
ç±»å"> |
| | | <el-tag type="info">{{ accidentTypeLabel(currentKnowledge.accidentType) }}</el-tag> |
| | | </el-descriptions-item> |
| | | <el-descriptions-item label="人å伤亡æ
åµ"> |
| | | <el-descriptions-item label="人åæå¤±æ
åµ"> |
| | | {{ currentKnowledge.personLoss }} |
| | | </el-descriptions-item> |
| | | <el-descriptions-item label="ç´æ¥è´¢äº§æå¤±ï¼å
ï¼"> |
| | |
| | | </el-table>
|
| | |
|
| | | <!-- æ·»å æä¿®æ¹èåå¯¹è¯æ¡ -->
|
| | | <el-dialog :title="title" v-model="open" width="680px" append-to-body>
|
| | | <el-form ref="menuRef" :model="form" :rules="rules" label-width="100px">
|
| | | <el-dialog :title="title" v-model="open" width="880px" append-to-body>
|
| | | <el-form ref="menuRef" :model="form" :rules="rules" label-width="130px">
|
| | | <el-row>
|
| | | <el-col :span="24">
|
| | | <el-form-item label="ä¸çº§èå">
|
| | |
| | | </span>
|
| | | </template>
|
| | | <el-input v-model="form.component" placeholder="请è¾å
¥ç»ä»¶è·¯å¾" />
|
| | | </el-form-item>
|
| | | </el-col>
|
| | | <el-col :span="12" v-if="form.menuType == 'C'">
|
| | | <el-form-item prop="appComponent">
|
| | | <template #label>
|
| | | <span>
|
| | | <el-tooltip content="APP 端访é®çç»ä»¶è·¯å¾ï¼å¦ï¼`app/system/user/index`" placement="top">
|
| | | <el-icon><question-filled /></el-icon>
|
| | | </el-tooltip>
|
| | | APPç»ä»¶è·¯å¾
|
| | | </span>
|
| | | </template>
|
| | | <el-input v-model="form.appComponent" placeholder="请è¾å
¥ APP ç»ä»¶è·¯å¾ï¼å¯éï¼" />
|
| | | </el-form-item>
|
| | | </el-col>
|
| | | <el-col :span="12" v-if="form.menuType != 'M'">
|
| | |
| | | rules: {
|
| | | menuName: [{ required: true, message: "èååç§°ä¸è½ä¸ºç©º", trigger: "blur" }],
|
| | | orderNum: [{ required: true, message: "èå顺åºä¸è½ä¸ºç©º", trigger: "blur" }],
|
| | | path: [{ required: true, message: "è·¯ç±å°åä¸è½ä¸ºç©º", trigger: "blur" }]
|
| | | path: [{ required: true, message: "è·¯ç±å°åä¸è½ä¸ºç©º", trigger: "blur" }],
|
| | | appComponent: [{ required: false, message: "APPç»ä»¶è·¯å¾ä¸è½ä¸ºç©º", trigger: "blur" }]
|
| | | },
|
| | | })
|
| | |
|
| | |
| | | isFrame: "1",
|
| | | isCache: "0",
|
| | | visible: "0",
|
| | | status: "0"
|
| | | status: "0",
|
| | | appComponent: undefined
|
| | | }
|
| | | proxy.resetForm("menuRef")
|
| | | }
|
| | |
| | | </pane>
|
| | | <!--ç¨æ·æ°æ®-->
|
| | | <pane size="84">
|
| | | <el-col style="padding: 10px">
|
| | | <el-col style="padding: 10px; height: 100%; display: flex; flex-direction: column;">
|
| | | <el-form :model="queryParams" ref="queryRef" :inline="true" v-show="showSearch" label-width="68px">
|
| | | <el-form-item label="ç»å½è´¦å·" prop="userName">
|
| | | <el-input v-model="queryParams.userName" placeholder="请è¾å
¥ç»å½è´¦å·" clearable style="width: 240px" @keyup.enter="handleQuery" />
|
| | |
| | | <right-toolbar v-model:showSearch="showSearch" @queryTable="getList" :columns="columns"></right-toolbar>
|
| | | </el-row>
|
| | |
|
| | | <el-table v-loading="loading" :data="userList" @selection-change="handleSelectionChange">
|
| | | <el-table-column type="selection" width="50" align="center" />
|
| | | <el-table-column label="ç¨æ·ç¼å·" align="center" key="userId" prop="userId" v-if="columns[0].visible" />
|
| | | <el-table-column label="ç»å½è´¦å·" align="center" key="userName" prop="userName" v-if="columns[1].visible" :show-overflow-tooltip="true" />
|
| | | <el-table-column label="ç¨æ·æµç§°" align="center" key="nickName" prop="nickName" v-if="columns[2].visible" :show-overflow-tooltip="true" />
|
| | | <el-table-column label="é¨é¨" align="center" key="deptNames" prop="deptNames" v-if="columns[3].visible" :show-overflow-tooltip="true" />
|
| | | <el-table-column label="ææºå·ç " align="center" key="phonenumber" prop="phonenumber" v-if="columns[4].visible" width="120" />
|
| | | <el-table-column label="ç¶æ" align="center" key="status" v-if="columns[5].visible">
|
| | | <template #default="scope">
|
| | | <el-switch
|
| | | v-model="scope.row.status"
|
| | | active-value="0"
|
| | | inactive-value="1"
|
| | | @change="handleStatusChange(scope.row)"
|
| | | ></el-switch>
|
| | | </template>
|
| | | </el-table-column>
|
| | | <el-table-column label="å建æ¶é´" align="center" prop="createTime" v-if="columns[6].visible" width="160">
|
| | | <template #default="scope">
|
| | | <span>{{ parseTime(scope.row.createTime) }}</span>
|
| | | </template>
|
| | | </el-table-column>
|
| | | <el-table-column label="æä½" align="center" width="150" class-name="small-padding fixed-width">
|
| | | <template #default="scope">
|
| | | <el-tooltip content="ä¿®æ¹" placement="top" v-if="scope.row.userId !== 1">
|
| | | <el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['system:user:edit']"></el-button>
|
| | | </el-tooltip>
|
| | | <el-tooltip content="å é¤" placement="top" v-if="scope.row.userId !== 1">
|
| | | <el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)" v-hasPermi="['system:user:remove']"></el-button>
|
| | | </el-tooltip>
|
| | | <el-tooltip content="éç½®å¯ç " placement="top" v-if="scope.row.userId !== 1">
|
| | | <el-button link type="primary" icon="Key" @click="handleResetPwd(scope.row)" v-hasPermi="['system:user:resetPwd']"></el-button>
|
| | | </el-tooltip>
|
| | | <el-tooltip content="åé
è§è²" placement="top" v-if="scope.row.userId !== 1">
|
| | | <el-button link type="primary" icon="CircleCheck" @click="handleAuthRole(scope.row)" v-hasPermi="['system:user:edit']"></el-button>
|
| | | </el-tooltip>
|
| | | </template>
|
| | | </el-table-column>
|
| | | </el-table>
|
| | | <div style="flex: 1; overflow: hidden;">
|
| | | <el-table v-loading="loading" :data="userList" height="100%" @selection-change="handleSelectionChange">
|
| | | <el-table-column type="selection" width="50" align="center" />
|
| | | <el-table-column label="ç¨æ·ç¼å·" align="center" key="userId" prop="userId" v-if="columns[0].visible" />
|
| | | <el-table-column label="ç»å½è´¦å·" align="center" key="userName" prop="userName" v-if="columns[1].visible" :show-overflow-tooltip="true" />
|
| | | <el-table-column label="ç¨æ·æµç§°" align="center" key="nickName" prop="nickName" v-if="columns[2].visible" :show-overflow-tooltip="true" />
|
| | | <el-table-column label="é¨é¨" align="center" key="deptNames" prop="deptNames" v-if="columns[3].visible" :show-overflow-tooltip="true" />
|
| | | <el-table-column label="ææºå·ç " align="center" key="phonenumber" prop="phonenumber" v-if="columns[4].visible" width="120" />
|
| | | <el-table-column label="ç¶æ" align="center" key="status" v-if="columns[5].visible">
|
| | | <template #default="scope">
|
| | | <el-switch
|
| | | v-model="scope.row.status"
|
| | | active-value="0"
|
| | | inactive-value="1"
|
| | | @change="handleStatusChange(scope.row)"
|
| | | ></el-switch>
|
| | | </template>
|
| | | </el-table-column>
|
| | | <el-table-column label="å建æ¶é´" align="center" prop="createTime" v-if="columns[6].visible" width="160">
|
| | | <template #default="scope">
|
| | | <span>{{ parseTime(scope.row.createTime) }}</span>
|
| | | </template>
|
| | | </el-table-column>
|
| | | <el-table-column label="æä½" align="center" width="150" class-name="small-padding fixed-width">
|
| | | <template #default="scope">
|
| | | <el-tooltip content="ä¿®æ¹" placement="top" v-if="scope.row.userId !== 1">
|
| | | <el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['system:user:edit']"></el-button>
|
| | | </el-tooltip>
|
| | | <el-tooltip content="å é¤" placement="top" v-if="scope.row.userId !== 1">
|
| | | <el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)" v-hasPermi="['system:user:remove']"></el-button>
|
| | | </el-tooltip>
|
| | | <el-tooltip content="éç½®å¯ç " placement="top" v-if="scope.row.userId !== 1">
|
| | | <el-button link type="primary" icon="Key" @click="handleResetPwd(scope.row)" v-hasPermi="['system:user:resetPwd']"></el-button>
|
| | | </el-tooltip>
|
| | | <el-tooltip content="åé
è§è²" placement="top" v-if="scope.row.userId !== 1">
|
| | | <el-button link type="primary" icon="CircleCheck" @click="handleAuthRole(scope.row)" v-hasPermi="['system:user:edit']"></el-button>
|
| | | </el-tooltip>
|
| | | </template>
|
| | | </el-table-column>
|
| | | </el-table>
|
| | | </div>
|
| | | <pagination v-show="total > 0" :total="total" v-model:page="queryParams.pageNum" v-model:limit="queryParams.pageSize" @pagination="getList" />
|
| | | </el-col>
|
| | | </pane>
|