|
@@ -1,9 +1,11 @@
|
|
|
<script setup lang="ts">
|
|
<script setup lang="ts">
|
|
|
-import { ref, withDefaults, onMounted } from "vue"
|
|
|
|
|
|
|
+import { ref, withDefaults, onMounted, watch } from "vue"
|
|
|
import Rs from "@/core/services/RequestService"
|
|
import Rs from "@/core/services/RequestService"
|
|
|
-//import axios from "axios"
|
|
|
|
|
|
|
+import { getAssetPath } from "@/core/helpers/assets"
|
|
|
|
|
|
|
|
const props = withDefaults(defineProps<{ id: string }>(), { id: "" })
|
|
const props = withDefaults(defineProps<{ id: string }>(), { id: "" })
|
|
|
|
|
+const id = ref(props.id)
|
|
|
|
|
+const emptyTableText = "未查询到数据"
|
|
|
const companyInfo = ref({
|
|
const companyInfo = ref({
|
|
|
name: "",
|
|
name: "",
|
|
|
type_name: "",
|
|
type_name: "",
|
|
@@ -25,7 +27,7 @@ const companyInfo = ref({
|
|
|
const contactInfo = ref<Array<{ name: string; position: string; tel: string; phone: string }>>([])
|
|
const contactInfo = ref<Array<{ name: string; position: string; tel: string; phone: string }>>([])
|
|
|
const monitorPointInfo = ref<Array<{ name: string; status: string; attr: string }>>([])
|
|
const monitorPointInfo = ref<Array<{ name: string; status: string; attr: string }>>([])
|
|
|
function getCompanyInfo() {
|
|
function getCompanyInfo() {
|
|
|
- Rs.post("sys/onlineData/record/" + props.id).then((res) => {
|
|
|
|
|
|
|
+ Rs.post("sys/onlineData/record", { data: id.value, successAlert: false }).then((res) => {
|
|
|
const company = res.data.company
|
|
const company = res.data.company
|
|
|
if (company) {
|
|
if (company) {
|
|
|
companyInfo.value.name = company.name
|
|
companyInfo.value.name = company.name
|
|
@@ -69,6 +71,7 @@ function getCompanyInfo() {
|
|
|
function init() {
|
|
function init() {
|
|
|
getCompanyInfo()
|
|
getCompanyInfo()
|
|
|
}
|
|
}
|
|
|
|
|
+watch(() => props.id, init)
|
|
|
|
|
|
|
|
onMounted(() => {
|
|
onMounted(() => {
|
|
|
init()
|
|
init()
|
|
@@ -78,59 +81,61 @@ onMounted(() => {
|
|
|
<div class="px-10 py-5">
|
|
<div class="px-10 py-5">
|
|
|
<h2 class="my-5">商户信息</h2>
|
|
<h2 class="my-5">商户信息</h2>
|
|
|
<table class="table table-bordered table-flush table-layout-fixed">
|
|
<table class="table table-bordered table-flush table-layout-fixed">
|
|
|
- <tr>
|
|
|
|
|
- <th class="bg-light-primary">商户名称</th>
|
|
|
|
|
- <td>{{ companyInfo.name }}</td>
|
|
|
|
|
- <th class="bg-light-primary align-right">类型</th>
|
|
|
|
|
- <td>{{ companyInfo.type_name }}</td>
|
|
|
|
|
- </tr>
|
|
|
|
|
- <tr>
|
|
|
|
|
- <th class="bg-light-primary">商户性质</th>
|
|
|
|
|
- <td>{{ companyInfo.property_name }}</td>
|
|
|
|
|
- <th class="bg-light-primary">规模</th>
|
|
|
|
|
- <td>{{ companyInfo.catering_scale_name }}</td>
|
|
|
|
|
- </tr>
|
|
|
|
|
- <tr>
|
|
|
|
|
- <th class="bg-light-primary">营业状态</th>
|
|
|
|
|
- <td>{{ companyInfo.catering_state }}</td>
|
|
|
|
|
- <th class="bg-light-primary">菜系</th>
|
|
|
|
|
- <td>{{ companyInfo.catering_style_name }}</td>
|
|
|
|
|
- </tr>
|
|
|
|
|
- <tr>
|
|
|
|
|
- <th class="bg-light-primary">法人代码</th>
|
|
|
|
|
- <td>{{ companyInfo.xinyong_code }}</td>
|
|
|
|
|
- <th class="bg-light-primary">区域</th>
|
|
|
|
|
- <td>{{ companyInfo.org_name }}</td>
|
|
|
|
|
- </tr>
|
|
|
|
|
- <tr>
|
|
|
|
|
- <th class="bg-light-primary">法人代表</th>
|
|
|
|
|
- <td>{{ companyInfo.corporation_name }}</td>
|
|
|
|
|
- <th class="bg-light-primary">经度</th>
|
|
|
|
|
- <td>{{ companyInfo.longitude }}</td>
|
|
|
|
|
- </tr>
|
|
|
|
|
- <tr>
|
|
|
|
|
- <th class="bg-light-primary">商户地址</th>
|
|
|
|
|
- <td>{{ companyInfo.address }}</td>
|
|
|
|
|
- <th class="bg-light-primary">纬度</th>
|
|
|
|
|
- <td>{{ companyInfo.latitude }}</td>
|
|
|
|
|
- </tr>
|
|
|
|
|
- <tr>
|
|
|
|
|
- <th class="bg-light-primary">灶头数</th>
|
|
|
|
|
- <td>{{ companyInfo.stove_num }}</td>
|
|
|
|
|
- <th class="bg-light-primary">人数</th>
|
|
|
|
|
- <td>{{ companyInfo.people }}</td>
|
|
|
|
|
- </tr>
|
|
|
|
|
- <tr>
|
|
|
|
|
- <th class="bg-light-primary">排口数</th>
|
|
|
|
|
- <td>{{ companyInfo.outlet_num }}</td>
|
|
|
|
|
- <th class="bg-light-primary">面积</th>
|
|
|
|
|
- <td>{{ companyInfo.acreage }}</td>
|
|
|
|
|
- </tr>
|
|
|
|
|
|
|
+ <tbody>
|
|
|
|
|
+ <tr>
|
|
|
|
|
+ <th class="bg-light-primary">商户名称</th>
|
|
|
|
|
+ <td>{{ companyInfo.name }}</td>
|
|
|
|
|
+ <th class="bg-light-primary align-right">类型</th>
|
|
|
|
|
+ <td>{{ companyInfo.type_name }}</td>
|
|
|
|
|
+ </tr>
|
|
|
|
|
+ <tr>
|
|
|
|
|
+ <th class="bg-light-primary">商户性质</th>
|
|
|
|
|
+ <td>{{ companyInfo.property_name }}</td>
|
|
|
|
|
+ <th class="bg-light-primary">规模</th>
|
|
|
|
|
+ <td>{{ companyInfo.catering_scale_name }}</td>
|
|
|
|
|
+ </tr>
|
|
|
|
|
+ <tr>
|
|
|
|
|
+ <th class="bg-light-primary">营业状态</th>
|
|
|
|
|
+ <td>{{ companyInfo.catering_state }}</td>
|
|
|
|
|
+ <th class="bg-light-primary">菜系</th>
|
|
|
|
|
+ <td>{{ companyInfo.catering_style_name }}</td>
|
|
|
|
|
+ </tr>
|
|
|
|
|
+ <tr>
|
|
|
|
|
+ <th class="bg-light-primary">法人代码</th>
|
|
|
|
|
+ <td>{{ companyInfo.xinyong_code }}</td>
|
|
|
|
|
+ <th class="bg-light-primary">区域</th>
|
|
|
|
|
+ <td>{{ companyInfo.org_name }}</td>
|
|
|
|
|
+ </tr>
|
|
|
|
|
+ <tr>
|
|
|
|
|
+ <th class="bg-light-primary">法人代表</th>
|
|
|
|
|
+ <td>{{ companyInfo.corporation_name }}</td>
|
|
|
|
|
+ <th class="bg-light-primary">经度</th>
|
|
|
|
|
+ <td>{{ companyInfo.longitude }}</td>
|
|
|
|
|
+ </tr>
|
|
|
|
|
+ <tr>
|
|
|
|
|
+ <th class="bg-light-primary">商户地址</th>
|
|
|
|
|
+ <td>{{ companyInfo.address }}</td>
|
|
|
|
|
+ <th class="bg-light-primary">纬度</th>
|
|
|
|
|
+ <td>{{ companyInfo.latitude }}</td>
|
|
|
|
|
+ </tr>
|
|
|
|
|
+ <tr>
|
|
|
|
|
+ <th class="bg-light-primary">灶头数</th>
|
|
|
|
|
+ <td>{{ companyInfo.stove_num }}</td>
|
|
|
|
|
+ <th class="bg-light-primary">人数</th>
|
|
|
|
|
+ <td>{{ companyInfo.people }}</td>
|
|
|
|
|
+ </tr>
|
|
|
|
|
+ <tr>
|
|
|
|
|
+ <th class="bg-light-primary">排口数</th>
|
|
|
|
|
+ <td>{{ companyInfo.outlet_num }}</td>
|
|
|
|
|
+ <th class="bg-light-primary">面积</th>
|
|
|
|
|
+ <td>{{ companyInfo.acreage }}</td>
|
|
|
|
|
+ </tr>
|
|
|
|
|
+ </tbody>
|
|
|
</table>
|
|
</table>
|
|
|
<h2 class="my-5">联系信息</h2>
|
|
<h2 class="my-5">联系信息</h2>
|
|
|
<table class="table table-bordered table-flush table-layout-fixed">
|
|
<table class="table table-bordered table-flush table-layout-fixed">
|
|
|
<thead>
|
|
<thead>
|
|
|
- <tr>
|
|
|
|
|
|
|
+ <tr class="text-center">
|
|
|
<th class="bg-light-primary">联系人</th>
|
|
<th class="bg-light-primary">联系人</th>
|
|
|
<th class="bg-light-primary">职务属性</th>
|
|
<th class="bg-light-primary">职务属性</th>
|
|
|
<th class="bg-light-primary">手机号</th>
|
|
<th class="bg-light-primary">手机号</th>
|
|
@@ -138,7 +143,7 @@ onMounted(() => {
|
|
|
</tr>
|
|
</tr>
|
|
|
</thead>
|
|
</thead>
|
|
|
<tbody v-if="contactInfo.length">
|
|
<tbody v-if="contactInfo.length">
|
|
|
- <tr v-for="(v, i) in contactInfo" :key="i">
|
|
|
|
|
|
|
+ <tr v-for="(v, i) in contactInfo" :key="i" class="text-center">
|
|
|
<td>{{ v.name }}</td>
|
|
<td>{{ v.name }}</td>
|
|
|
<td>{{ v.position }}</td>
|
|
<td>{{ v.position }}</td>
|
|
|
<td>{{ v.phone }}</td>
|
|
<td>{{ v.phone }}</td>
|
|
@@ -146,22 +151,27 @@ onMounted(() => {
|
|
|
</tr>
|
|
</tr>
|
|
|
</tbody>
|
|
</tbody>
|
|
|
<tbody v-else>
|
|
<tbody v-else>
|
|
|
- <tr>
|
|
|
|
|
- <td>暂无数据</td>
|
|
|
|
|
|
|
+ <tr class="text-center">
|
|
|
|
|
+ <td colspan="4">
|
|
|
|
|
+ <div class="h-100px w-100 d-flex justify-content-center flex-column align-items-center">
|
|
|
|
|
+ <img class="mb-2" :src="getAssetPath('media/table/empty.svg')" />
|
|
|
|
|
+ <span class="text-gray-500">{{ emptyTableText }}</span>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </td>
|
|
|
</tr>
|
|
</tr>
|
|
|
</tbody>
|
|
</tbody>
|
|
|
</table>
|
|
</table>
|
|
|
<h2 class="my-5">监测点信息</h2>
|
|
<h2 class="my-5">监测点信息</h2>
|
|
|
<table class="table table-bordered table-flush table-layout-fixed">
|
|
<table class="table table-bordered table-flush table-layout-fixed">
|
|
|
<thead>
|
|
<thead>
|
|
|
- <tr>
|
|
|
|
|
|
|
+ <tr class="text-center">
|
|
|
<th class="bg-light-primary">点位名称</th>
|
|
<th class="bg-light-primary">点位名称</th>
|
|
|
<th class="bg-light-primary">处理风量 m3/h</th>
|
|
<th class="bg-light-primary">处理风量 m3/h</th>
|
|
|
<th class="bg-light-primary">当前状态</th>
|
|
<th class="bg-light-primary">当前状态</th>
|
|
|
</tr>
|
|
</tr>
|
|
|
</thead>
|
|
</thead>
|
|
|
<tbody v-if="monitorPointInfo.length">
|
|
<tbody v-if="monitorPointInfo.length">
|
|
|
- <tr v-for="(v, i) in monitorPointInfo" :key="i">
|
|
|
|
|
|
|
+ <tr v-for="(v, i) in monitorPointInfo" :key="i" class="text-center">
|
|
|
<td>{{ v.name }}</td>
|
|
<td>{{ v.name }}</td>
|
|
|
<td>{{ v.attr }}</td>
|
|
<td>{{ v.attr }}</td>
|
|
|
<td>{{ v.status }}</td>
|
|
<td>{{ v.status }}</td>
|
|
@@ -169,7 +179,12 @@ onMounted(() => {
|
|
|
</tbody>
|
|
</tbody>
|
|
|
<tbody v-else>
|
|
<tbody v-else>
|
|
|
<tr>
|
|
<tr>
|
|
|
- <td>暂无数据</td>
|
|
|
|
|
|
|
+ <td colspan="3">
|
|
|
|
|
+ <div class="h-100px w-100 d-flex justify-content-center flex-column align-items-center">
|
|
|
|
|
+ <img class="mb-2" :src="getAssetPath('media/table/empty.svg')" />
|
|
|
|
|
+ <span class="text-gray-500">{{ emptyTableText }}</span>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </td>
|
|
|
</tr>
|
|
</tr>
|
|
|
</tbody>
|
|
</tbody>
|
|
|
</table>
|
|
</table>
|