From c4309024f629d93763757bc09f2d2521bbf57e17 Mon Sep 17 00:00:00 2001
From: linwe <872216996@qq.com>
Date: Mon, 11 Nov 2024 13:45:29 +0800
Subject: [PATCH] 样式优化
---
src/views/supplies/components/box/dataContent.vue | 33 +++++++---
src/api/indParkInfo.js | 10 +++
src/views/companyInfo/components/box/fireSource.vue | 81 ++++++++++++++++++++++++--
src/views/layout/components/scomponents/layersControl.vue | 8 +-
4 files changed, 110 insertions(+), 22 deletions(-)
diff --git a/src/api/indParkInfo.js b/src/api/indParkInfo.js
index 38a5bc8..7360792 100644
--- a/src/api/indParkInfo.js
+++ b/src/api/indParkInfo.js
@@ -12,6 +12,16 @@
+export const getfirmInfoDetail = (params) => {
+ const url = `/yw/firmInfo/getDetail`;
+ return request({
+ url,
+ method: 'get',
+ params,
+ });
+};
+
+
export const getPage = (params) => {
const url = `/yw/firmInfo/page`;
return request({
diff --git a/src/views/companyInfo/components/box/fireSource.vue b/src/views/companyInfo/components/box/fireSource.vue
index b17f2f2..1005209 100644
--- a/src/views/companyInfo/components/box/fireSource.vue
+++ b/src/views/companyInfo/components/box/fireSource.vue
@@ -11,6 +11,8 @@
<script setup>
import publicContent from './publicContent.vue'
import { getAssetsFile } from 'utils/utils'
+import { getfirmInfoDetail } from '@/api/indParkInfo'
+
let data = reactive({
companyInfo: {}
})
@@ -55,15 +57,41 @@
}
])
+let rescueTeamList = ref([
+ {
+ id: 5,
+ name: 'rescuePerName',
+ title: '姓名',
+ content: '',
+ },
+ {
+ id: 6,
+ name: 'rescuePerPhone',
+ title: '联系电话',
+ content: '',
+ }
+])
+
onMounted(() => {
data.companyInfo = JSON.parse(localStorage.getItem('companyInfo'))
- console.log(data.companyInfo)
- companyInfoList.value.forEach(item => {
- data.companyInfo[item.name] && (item.content = data.companyInfo[item.name])
-
- })
+ getDetail()
})
+
+function getDetail() {
+ getfirmInfoDetail({
+ id: data.companyInfo.id
+ }).then(res => {
+ data.companyInfo = res.data.data
+ companyInfoList.value.forEach(item => {
+ data.companyInfo[item.name] && (item.content = data.companyInfo[item.name])
+ })
+ rescueTeamList.value.forEach(item => {
+ data.companyInfo[item.name] && (item.content = data.companyInfo[item.name])
+ })
+ }).catch(err => {
+ })
+}
</script>
@@ -72,7 +100,6 @@
<div class="data-content w100 h100">
<div class="content-firmIntro">
- <!-- <div>{{ data.companyInfo.firmIntro }}</div> -->
<span> {{ data.companyInfo.firmIntro }}</span>
</div>
@@ -89,9 +116,31 @@
</div>
</div>
+ <div class="company-info">
+ <div class="" style="text-align: center;margin-top: 10px;">救援队伍</div>
+ <div class="company-info-item" v-for="item in rescueTeamList" :key="item.id">
+ <el-row>
+ <el-col :span="8">
+ <div class="company-info-title">{{ item.title }}</div>
+ </el-col>
+ <el-col :span="16">
+ <div class="company-info-content">{{ item.content }}</div>
+ </el-col>
+ </el-row>
+ </div>
+ </div>
+
<div class="company-info-image">
- <img :src="data.companyInfo.image_urls" alt="">
- <!-- {{ "图片" }} -->
+ <div class="" style="text-align: center;margin-top: 10px;">企业图片</div>
+ <!-- <img :src="data.companyInfo.image_urls" alt=""> -->
+ <el-image style="width: 100px; height: 100px" :src="data.companyInfo.image_urls" :zoom-rate="1.2" :max-scale="7"
+ :min-scale="0.2" :preview-src-list="[data.companyInfo.image_urls]" :initial-index="4" fit="cover">
+ <template #error>
+ <div class="image-slot">
+ <el-icon><icon-picture /></el-icon>
+ </div>
+ </template>
+ </el-image>
</div>
@@ -134,11 +183,27 @@
}
+.company-info-jydw {
+ margin-top: 10px;
+ border-top: #dfdcdc 2px solid;
+}
+
+.company-info-jydw div {
+ text-align: center;
+ margin-top: 10px;
+}
+
+.company-info-jydw ul li {
+ // text-align: center;
+ // margin-top: 10px;
+}
+
.company-info-image {
margin-top: 20px;
width: 100%;
height: 200px;
// background-color: pink;
+ border-top: #dfdcdc 2px solid;
text-align: center;
}
</style>
\ No newline at end of file
diff --git a/src/views/layout/components/scomponents/layersControl.vue b/src/views/layout/components/scomponents/layersControl.vue
index c40416c..63a14b6 100644
--- a/src/views/layout/components/scomponents/layersControl.vue
+++ b/src/views/layout/components/scomponents/layersControl.vue
@@ -385,7 +385,7 @@
addTileLayers[item.layerName] = new DC.VectorLayer(item.layerName)
window.$viewer.addLayer(addTileLayers[item.layerName])
- function computeCircle (radius) {
+ function computeCircle(radius) {
var positions = []
for (var i = 0; i < 1080; i++) {
var radians = DC.Math.toRadians(i)
@@ -429,9 +429,9 @@
}
onMounted(() => {
- handleCheckChange(data.filter(i => i.id == '1'), {
- checkedKeys: ['1']
- })
+ // handleCheckChange(data.filter(i => i.id == '1'), {
+ // checkedKeys: ['1']
+ // })
})
onUnmounted(() => {
diff --git a/src/views/supplies/components/box/dataContent.vue b/src/views/supplies/components/box/dataContent.vue
index e5b2fa1..3ee6b25 100644
--- a/src/views/supplies/components/box/dataContent.vue
+++ b/src/views/supplies/components/box/dataContent.vue
@@ -26,7 +26,7 @@
<div class="page_box">
<div>
<el-table v-if="formInline.ownership == 1" :data="tableData" style="width: 100%"
- :header-cell-style="headerCellStyle" :cell-style="tableCellStyle" v-loading="loading">
+ :header-cell-style="headerCellStyle" :cell-style="tableCellStyle">
<el-table-column fixed prop="name" label="物资名称" />
<el-table-column fixed prop="personInCha" label="负责人" />
@@ -36,7 +36,7 @@
</el-table>
<el-table v-else :data="tableData" style="width: 100%" :header-cell-style="headerCellStyle"
- :cell-style="tableCellStyle" v-loading="loading">
+ :cell-style="tableCellStyle">
<el-table-column fixed prop="firmName" label="企业名称" />
<el-table-column fixed prop="name" label="物资名称" />
@@ -187,26 +187,39 @@
<style lang="scss" scoped>
.content_box {
color: #fff;
- overflow: hidden;
+ // overflow: hidden;
}
.list_box {
- display: flex;
+ overflow-x: auto;
+ white-space: nowrap;
+ scrollbar-width: thin;
+ scrollbar-color: rgba(255, 255, 255, 0.3) transparent;
}
+.list_box ul {
+ display: flex;
+ /* 使用 Flexbox 布局 */
+ padding: 0;
+ margin: 0;
+ list-style: none;
+}
-
-.list_box ul li {
- display: inline-block;
+.list_box li {
padding: 10px;
- font-size: 15px;
- text-align: center;
- // background: url(/images/mode-tab-ac.png) no-repeat center / 100% 100%;
+ margin-right: 10px;
+ cursor: pointer;
+}
+
+.list_box li.active {
+ background-color: rgba(117, 116, 116, 0.3);
+ color: white;
}
.page_box .el-table {
width: 100%;
height: 670px;
+ background-color: rgba(117, 116, 116, 0.3);
}
.active {
--
Gitblit v1.9.3