riku
2025-09-16 5ad61d6ad3a0ce12c7fe0808527069b09a7c9c0d
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
<template>
  <!-- <el-card shadow="hover"> -->
  <div class="wrapper">
    <div>
      <el-text>{{ item.index }}、</el-text>
      <el-text>{{ item.name }}</el-text>
    </div>
    <!-- <div>
      <el-text>地址:{{ item.location }}</el-text>
    </div> -->
    <el-row justify="space-between" style="margin-top: 4px">
      <el-space>
        <el-tag type="info" effect="plain" size="small">
          {{ item.districtname }}
        </el-tag>
        <el-tag type="info" effect="plain" size="small">
          {{ item.type }}
        </el-tag>
        <el-tag :type="item.extension1 == '0' ? 'info' : 'success'" size="small">
          {{ onlineFormat(item.extension1) }}
        </el-tag>
      </el-space>
      <slot>
        <el-button size="small" type="success" @click="add">添加</el-button>
      </slot>
    </el-row>
  </div>
  <!-- </el-card> -->
</template>
<script setup>
const props = defineProps({
  item: {
    type: Object,
    default: () => {}
  }
});
 
const emit = defineEmits(['add']);
 
function add() {
  emit('add', props.item);
}
 
function onlineFormat(s) {
  if (s == '0') {
    return '下线';
  } else {
    return '上线';
  }
}
</script>
<style scoped>
.wrapper {
  border: 1px solid var(--el-border-color);
  border-radius: var(--el-border-radius-base);
  padding: 4px 8px;
}
</style>