| | |
| | | <img src="/src/assets/images/workbench/st2.png" alt="" /> |
| | | </div> |
| | | </div> |
| | | <div |
| | | <!-- <div |
| | | class="grid-container" |
| | | v-if="permission.device_statistics_four && !permission.device_statistics_six" |
| | | > |
| | |
| | | </div> |
| | | </div> |
| | | <div class="status-list"> |
| | | <div |
| | | v-for="(status, statusIndex) in newtitleData[item].status_map" |
| | | :key="statusIndex" |
| | | class="status-item" |
| | | :class="getStatusStyle(test[item]?.name, statusIndex)" |
| | | :style="{ color: getStatusColor(test[item]?.name, statusIndex) }" |
| | | > |
| | | <span |
| | | class="indicator" |
| | | :style="{ |
| | | backgroundColor: getStatusBackground(test[item]?.name, statusIndex), |
| | | color: getStatusColor(test[item]?.name, statusIndex), |
| | | }" |
| | | ></span> |
| | | <span class="label">{{ getStatusLabel(test[item]?.name, statusIndex) }}</span> |
| | | <span class="count" |
| | | >{{ status }} {{ test[item]?.name === '无人机' ? '架' : '个' }}</span |
| | | <template v-if="test[item]?.name == '机巢' || test[item]?.name == '无人机'"> |
| | | <div |
| | | v-for="statusKey in [4, 0, -1]" |
| | | :key="statusKey" |
| | | class="status-item" |
| | | :class="getStatusStyle(test[item]?.name, statusKey)" |
| | | :style="{ color: getStatusColor(test[item]?.name, statusKey) }" |
| | | > |
| | | </div> |
| | | <span |
| | | class="indicator" |
| | | :style="{ |
| | | backgroundColor: getStatusBackground(test[item]?.name, statusKey), |
| | | color: getStatusColor(test[item]?.name, statusKey), |
| | | }" |
| | | ></span> |
| | | <span class="label">{{ getStatusLabel(test[item]?.name, statusKey) }}</span> |
| | | <span class="count"> |
| | | {{ newtitleData[item].status_map[statusKey] }} |
| | | {{ test[item]?.name === '无人机' ? '架' : '个' }} |
| | | </span> |
| | | </div> |
| | | </template> |
| | | <template v-else-if="test[item]?.name == '监控设备'"> |
| | | <div |
| | | v-for="statusKey in [1, 0]" |
| | | :key="statusKey" |
| | | class="status-item" |
| | | :class="getStatusStyle(test[item]?.name, statusKey)" |
| | | :style="{ color: getStatusColor(test[item]?.name, statusKey) }" |
| | | > |
| | | <span |
| | | class="indicator" |
| | | :style="{ |
| | | backgroundColor: getStatusBackground(test[item]?.name, statusKey), |
| | | color: getStatusColor(test[item]?.name, statusKey), |
| | | }" |
| | | ></span> |
| | | <span class="label">{{ getStatusLabel(test[item]?.name, statusKey) }}</span> |
| | | <span class="count"> |
| | | {{ newtitleData[item].status_map[statusKey] }} |
| | | {{ test[item]?.name === '无人机' ? '架' : '个' }} |
| | | </span> |
| | | </div> |
| | | </template> |
| | | |
| | | <template v-else> |
| | | <div |
| | | v-for="(status, statusIndex) in newtitleData[item].status_map" |
| | | :key="statusIndex" |
| | | class="status-item" |
| | | :class="getStatusStyle(test[item]?.name, statusIndex)" |
| | | :style="{ color: getStatusColor(test[item]?.name, statusIndex) }" |
| | | > |
| | | <span |
| | | class="indicator" |
| | | :style="{ |
| | | backgroundColor: getStatusBackground(test[item]?.name, statusIndex), |
| | | color: getStatusColor(test[item]?.name, statusIndex), |
| | | }" |
| | | ></span> |
| | | <span class="label">{{ getStatusLabel(test[item]?.name, statusIndex) }}</span> |
| | | <span class="count" |
| | | >{{ status }} {{ test[item]?.name === '无人机' ? '架' : '个' }}</span |
| | | > |
| | | </div> |
| | | </template> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div |
| | | class="grid-container1" |
| | | v-if=" |
| | | (permission.device_statistics_six && permission.device_statistics_four) || |
| | | permission.device_statistics_six |
| | | " |
| | | > |
| | | </div> --> |
| | | <div class="grid-container"> |
| | | <div v-for="(item, index) in Object.keys(newtitleData)" :key="index" class="device-card"> |
| | | <div class="device-title"> |
| | | <img :src="test[item].img" :alt="newtitleData[item].name" /> |
| | |
| | | </div> |
| | | </div> |
| | | <div class="status-list"> |
| | | <div |
| | | v-for="(status, statusIndex) in newtitleData[item].status_map" |
| | | :key="statusIndex" |
| | | class="status-item" |
| | | :class="getStatusStyle(test[item]?.name, statusIndex)" |
| | | :style="{ color: getStatusColor(test[item]?.name, statusIndex) }" |
| | | > |
| | | <span |
| | | class="indicator" |
| | | :style="{ |
| | | backgroundColor: getStatusBackground(test[item]?.name, statusIndex), |
| | | color: getStatusColor(test[item]?.name, statusIndex), |
| | | }" |
| | | ></span> |
| | | <span class="label">{{ getStatusLabel(test[item]?.name, statusIndex) }}</span> |
| | | <span class="count" |
| | | >{{ status }} {{ test[item]?.name === '无人机' ? '架' : '个' }}</span |
| | | <template v-if="test[item]?.name == '机巢' || test[item]?.name == '无人机'"> |
| | | <div |
| | | v-for="statusKey in [4, 0, -1]" |
| | | :key="statusKey" |
| | | class="status-item" |
| | | :class="getStatusStyle(test[item]?.name, statusKey)" |
| | | :style="{ color: getStatusColor(test[item]?.name, statusKey) }" |
| | | > |
| | | </div> |
| | | <span |
| | | class="indicator" |
| | | :style="{ |
| | | backgroundColor: getStatusBackground(test[item]?.name, statusKey), |
| | | color: getStatusColor(test[item]?.name, statusKey), |
| | | }" |
| | | ></span> |
| | | <span class="label">{{ getStatusLabel(test[item]?.name, statusKey) }}</span> |
| | | <span class="count"> |
| | | {{ newtitleData[item].status_map[statusKey] }} |
| | | {{ test[item]?.name === '无人机' ? '架' : '个' }} |
| | | </span> |
| | | </div> |
| | | </template> |
| | | <template v-else-if="test[item]?.name == '监控设备'"> |
| | | <div |
| | | v-for="statusKey in [1, 0]" |
| | | :key="statusKey" |
| | | class="status-item" |
| | | :class="getStatusStyle(test[item]?.name, statusKey)" |
| | | :style="{ color: getStatusColor(test[item]?.name, statusKey) }" |
| | | > |
| | | <span |
| | | class="indicator" |
| | | :style="{ |
| | | backgroundColor: getStatusBackground(test[item]?.name, statusKey), |
| | | color: getStatusColor(test[item]?.name, statusKey), |
| | | }" |
| | | ></span> |
| | | <span class="label">{{ getStatusLabel(test[item]?.name, statusKey) }}</span> |
| | | <span class="count"> |
| | | {{ newtitleData[item].status_map[statusKey] }} |
| | | {{ test[item]?.name === '无人机' ? '架' : '个' }} |
| | | </span> |
| | | </div> |
| | | </template> |
| | | <template v-else-if="test[item]?.name == '机巢保险'"> |
| | | <div |
| | | v-for="statusKey in [1, 0]" |
| | | :key="statusKey" |
| | | class="status-item" |
| | | :class="getStatusStyle(test[item]?.name, statusKey)" |
| | | :style="{ color: getStatusColor(test[item]?.name, statusKey) }" |
| | | > |
| | | <span |
| | | class="indicator" |
| | | :style="{ |
| | | backgroundColor: getStatusBackground(test[item]?.name, statusKey), |
| | | color: getStatusColor(test[item]?.name, statusKey), |
| | | }" |
| | | ></span> |
| | | <span class="label">{{ getStatusLabel(test[item]?.name, statusKey) }}</span> |
| | | <span class="count"> |
| | | {{ newtitleData[item].status_map[statusKey] }} |
| | | {{ test[item]?.name === '无人机' ? '架' : '个' }} |
| | | </span> |
| | | </div> |
| | | </template> |
| | | <template v-else> |
| | | <div |
| | | v-for="(status, statusIndex) in newtitleData[item].status_map" |
| | | :key="statusIndex" |
| | | class="status-item" |
| | | :class="getStatusStyle(test[item]?.name, statusIndex)" |
| | | :style="{ color: getStatusColor(test[item]?.name, statusIndex) }" |
| | | > |
| | | <span |
| | | class="indicator" |
| | | :style="{ |
| | | backgroundColor: getStatusBackground(test[item]?.name, statusIndex), |
| | | color: getStatusColor(test[item]?.name, statusIndex), |
| | | }" |
| | | ></span> |
| | | <span class="label">{{ getStatusLabel(test[item]?.name, statusIndex) }}</span> |
| | | <span class="count" |
| | | >{{ status }} {{ test[item]?.name === '无人机' ? '架' : '个' }}</span |
| | | > |
| | | </div> |
| | | </template> |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | }, |
| | | }; |
| | | |
| | | // const list = [ |
| | | // { |
| | | // key:'', |
| | | // list: [ |
| | | // {name: '空闲',value: 0,key:'7'}, |
| | | // {name: '空闲',value: 0,key:'7'}, |
| | | // {name: '空闲',value: 0,key:'7'}, |
| | | // ] |
| | | // } |
| | | // ] |
| | | |
| | | const getStatusStyle = (name, statusIndex) => { |
| | | const styleConfig = statusStyles[name] || statusStyles.default; |
| | | return styleConfig[statusIndex]?.class || ''; |
| | |
| | | getStatics(userInfo.value.detail.areaCode).then(res => { |
| | | console.log('permission.value', permission.value); |
| | | console.log('设备', res.data.data); |
| | | // for (let key in res.data.data) { |
| | | // if ( |
| | | // permission.value?.device_statistics_six && |
| | | // key === 'move_list' |
| | | // ) |
| | | // continue; |
| | | // newtitleData.value[key] = res.data.data[key]; |
| | | // } |
| | | |
| | | if (permission.value?.device_statistics_six) { |
| | | newtitleData.value = res.data.data; |
| | | const { move_list, ...filteredData } = res.data.data; |
| | | newtitleData.value = filteredData; |
| | | |
| | | return; |
| | | } |
| | |
| | | for (let key in res.data.data) { |
| | | if ( |
| | | permission.value?.device_statistics_four && |
| | | (key === 'flow_type_list' || key === 'insure_list' ) |
| | | (key === 'flow_type_list' || key === 'insure_list') |
| | | ) |
| | | continue; |
| | | newtitleData.value[key] = res.data.data[key]; |
| | |
| | | background: #ffffff; |
| | | border-radius: 8px 8px 8px 8px; |
| | | margin-bottom: 10px; |
| | | |
| | | font-size: clamp(12px, 2vw, 24px); |
| | | .title { |
| | | padding: 14px 14px 0 21px; |
| | | display: flex; |
| | |
| | | |
| | | .grid-container { |
| | | padding: 0 14px 0 21px; |
| | | display: grid; |
| | | grid-template-columns: repeat(4, 1fr); |
| | | |
| | | // display: grid; |
| | | // grid-template-columns: repeat(4, 1fr); |
| | | display: flex; |
| | | justify-content: space-between; |
| | | .device-card { |
| | | display: flex; |
| | | align-items: center; |
| | | margin-top: 30px; |
| | | margin-left: 10px; |
| | | .device-title { |
| | | display: flex; |
| | | align-items: center; |
| | |
| | | } |
| | | |
| | | .itemcenter { |
| | | margin-left: 14px; |
| | | margin-left: 5px; |
| | | font-weight: 400; |
| | | font-size: 14px; |
| | | color: #343434; |
| | |
| | | display: inline-block; |
| | | transform: skewX(-5deg); |
| | | font-family: 'YouSheBiaoTiHei'; |
| | | // font-size: calc(12px + 0.5vw); |
| | | } |
| | | |
| | | span { |
| | |
| | | .status-list { |
| | | display: grid; |
| | | margin-left: 5px; |
| | | |
| | | .status-item { |
| | | display: flex; |
| | | align-items: center; |
| | |
| | | font-size: 12px; |
| | | gap: 10px; |
| | | margin-bottom: 5px; |
| | | |
| | | .indicator { |
| | | width: 6px; |
| | | height: 6px; |
| | | border-radius: 50%; |
| | | } |
| | | |
| | | .label { |
| | | flex: 1; |
| | | // font-size: clamp(12px, 1vw, 14px); |
| | |
| | | // font-size: clamp(14px, 1.1vw, 16px); |
| | | font-size: 14px; |
| | | color: #7c8091; |
| | | } |
| | | |
| | | &.status-4 .indicator { |
| | | background: #11ce3e; |
| | | } |
| | | |
| | | &.status-4 { |
| | | color: #11ce3e; |
| | | } |
| | | |
| | | &.status-0 .indicator { |
| | | background: #1b94ff; |
| | | } |
| | | |
| | | &.status-0 { |
| | | color: #1b94ff; |
| | | } |
| | | |
| | | &.status--1 .indicator { |
| | | background: #bababa; |
| | | } |
| | | |
| | | &.status--1 { |
| | | color: #bababa; |
| | | } |
| | | } |
| | | } |
| | |
| | | |
| | | .label { |
| | | flex: 1; |
| | | // font-size: clamp(12px, 1vw, 14px); |
| | | font-size: clamp(12px, 1vw, 14px); |
| | | } |
| | | |
| | | .count { |
| | | // font-size: clamp(14px, 1.1vw, 16px); |
| | | font-size: clamp(12px, 1.1vw, 16px); |
| | | font-size: 14px; |
| | | color: #7c8091; |
| | | } |