无人机管理后台前端(已迁走)
张含笑
2025-06-10 dfa8d9daa07bdc3be1f570eca84b87a26d7bded7
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
<template>
  <div class="dataCenter-table">
    <searchData></searchData>
    <!-- 表格部分 -->
    <div class="dataTable">
      <el-table
        stripe
        :data="tableData"
        class="custom-header"
        @selection-change="handleSelectionChange"
      >
        <el-table-column type="selection" width="55" />
        <el-table-column label="序号" type="index" width="60" />
        <el-table-column prop="address" label="所属区域" />
        <el-table-column property="nest" label="所属机巢" />
        <el-table-column property="taskname" label="任务名称" />
        <el-table-column prop="filename" label="文件名称" />
        <el-table-column property="img" label="缩图" width="120">
          <template #default="scope">
            <el-image
              :src="scope.row.img"
              :preview-src-list="[scope.row.img]"
              fit="cover"
              preview-teleported
            />
          </template>
        </el-table-column>
        <el-table-column prop="timer" label="任务时间" />
        <el-table-column property="fileclass" label="文件类别" />
        <el-table-column property="fileformat" label="文件格式" />
        <el-table-column label="操作" width="150" align="center">
          <template #default="scope">
            <span class="look" @click="lookDetail(scope.row)">查看</span>
            <span class="delete" @click="deleteDetail()" v-if="scope.row.fileformat !== 'AI识别'"
              >删除</span
            >
            <span class="location" v-if="scope.row.fileformat !== '视频'">定位</span>
          </template>
        </el-table-column>
      </el-table>
    </div>
    <!-- 分页 -->
    <div class="pagination">
      <el-pagination
        v-model:current-page="jobListParams.current"
        v-model:page-size="jobListParams.size"
        :page-sizes="[10, 20, 30, 40]"
        background
        layout="total, sizes, prev, pager, next, jumper"
        :total="400"
        @size-change="handleSizeChange"
        @current-change="handleCurrentChange"
      />
    </div>
    <!-- 查看弹框 -->
    <el-dialog v-model="dialogVisible" width="60%" append-to-body>
      <template #header="{ titleId, titleClass }">
        <div class="my-header">
          <h4 :id="titleId" :class="titleClass">{{ dialogDetailList?.filename }}</h4>
          <el-button type="success" plain icon="el-icon-download">下载</el-button>
        </div>
      </template>
      <div class="detailContainer">
        <div class="leftImg"><img :src="dialogDetailList.img" alt="" /></div>
        <div class="rightDetail">
          <div class="title">
            <div class="inputEdit">
              文件名称:<span v-if="!dialogDetailList.checkedinput">{{
                dialogDetailList?.filename
              }}</span>
              <el-input
                v-else
                v-model="dialogDetailList.filename"
                @keyup.enter="saveTitle()"
                class="title-input"
                clearable
              />
            </div>
            <div class="editname" @click="editTitle(dialogDetailList)">
              <span v-if="!dialogDetailList.checkedinput"
                ><el-icon><Edit /></el-icon
              ></span>
              <div v-else class="suffixBoxEdit">
                <div class="editText" @click="submitEditSuffix(item, index)">✔</div>
                <div class="editText" @click="cancelEditSuffix(item, index)">✖</div>
              </div>
            </div>
          </div>
          <div>任务名称:{{ dialogDetailList?.taskname }}</div>
          <div>所属区域:{{ dialogDetailList?.address }}</div>
          <div>拍摄机巢:{{ dialogDetailList?.nest }}</div>
          <div>照片位置:{{}}</div>
          <div>任务时间:{{ dialogDetailList?.date }}</div>
          <div>拍摄时间:{{ dialogDetailList?.date }}</div>
          <div>文件类型:{{ dialogDetailList?.fileclass }}</div>
          <div>文件格式:{{ dialogDetailList?.fileformat }}</div>
          <div>照片文件大小:2M</div>
        </div>
      </div>
    </el-dialog>
  </div>
</template>
 
<script setup>
import { ElMessage, ElMessageBox } from 'element-plus';
import searchData from '@/views/dataCenter/components/searchData.vue';
import fy1 from '@/assets/images/workbench/fy1.png';
const jobListParams = reactive({
  current: 1,
  size: 10,
  searchParams: {},
});
const tableData = [
  {
    address: '南昌市,西湖区',
    nest: '空间大厦',
    date: '2016-05-04',
    taskname: '测试任务',
    filename: 'ABD2025053054654',
    img: fy1,
    timer: '2025-05-26 10:25',
    fileclass: '可见光',
    fileformat: '照片',
  },
  {
    address: '南昌市,西湖区',
    nest: '空间大厦',
    date: '2016-05-04',
    taskname: '测试任务',
    filename: '1111',
    img: fy1,
    timer: '2025-05-26 10:25',
    fileclass: '可见光',
    fileformat: '视频',
  },
  {
    address: '南昌市,西湖区',
    nest: '空间大厦',
    date: '2016-05-04',
    taskname: '测试任务',
    filename: '2222',
    img: fy1,
    timer: '2025-05-26 10:25',
    fileclass: '可见光',
    fileformat: 'AI识别',
  },
  {
    address: '南昌市,西湖区',
    nest: '空间大厦',
    date: '2016-05-04',
    taskname: '测试任务',
    filename: '333',
    img: fy1,
    timer: '2025-05-26 10:25',
    fileclass: '可见光',
    fileformat: '全景',
  },
  {
    address: '南昌市,西湖区',
    nest: '空间大厦',
    date: '2016-05-04',
    taskname: '测试任务',
    filename: '44',
    img: fy1,
    timer: '2025-05-26 10:25',
    fileclass: '可见光',
    fileformat: '正射',
  },
];
const handleSizeChange = () => {};
const handleCurrentChange = () => {};
// 多选
const selectedRows = ref([]);
const handleSelectionChange = val => {
  // console.log('多选',val);
};
 
// 弹框
const dialogVisible = ref(false);
const dialogDetailList = ref(null);
const lookDetail = val => {
  dialogDetailList.value = val;
  // console.log('弹框', dialogDetailList.value);
  dialogVisible.value = true;
};
// 删除
const deleteDetail = () => {
  ElMessageBox.confirm('您确定删除吗?', '提示', {
    confirmButtonText: '确定',
    cancelButtonText: '取消',
    type: 'warning',
  });
};
// 编辑文件名
const editTitle = val => {
  console.log('val', val);
  val.checkedinput = !val.checkedinput;
};
</script>
 
<style scoped lang="scss">
.dataCenter-table {
  margin: 0 18px 16px 10px;
  background-color: #ffffff;
  padding: 14px 18px;
  .dataTable {
    height: 700px;
    overflow: auto;
    .look {
      color: #1c5cff;
      cursor: pointer;
      margin-right: 10px;
    }
    .delete {
      color: #ff241c;
      margin-right: 10px;
      cursor: pointer;
    }
    .location {
      color: #19876d;
      cursor: pointer;
    }
  }
  .pagination {
    display: flex;
    justify-content: end;
    margin-top: 20px;
  }
}
:deep(.custom-header th.el-table__cell) {
  color: rgba(0, 0, 0, 0.85);
}
// 弹框
.detailContainer {
  display: flex;
  justify-content: space-between;
  .leftImg {
    width: 70%;
    height: 500px;
    img {
      width: 100%;
      height: 100%;
    }
  }
  .rightDetail {
    width: 30%;
    padding-left: 40px;
    .title {
      display: flex;
      margin: 0 !important;
      .editname {
        cursor: pointer;
      }
      .inputEdit {
        display: flex;
        align-items: center;
      }
    }
    div {
      margin-bottom: 20px;
    }
  }
}
.my-header :deep(.el-dialog__title) {
  margin: 0 !important;
}
.my-header {
  display: flex;
  align-items: center;
  .el-button {
    margin-left: 20px;
  }
}
.title-input {
  margin-bottom: 0 !important;
  width: 70%;
}
.editname {
  margin-bottom: 0 !important;
}
.suffixBoxEdit {
  display: flex;
  // align-items: center;
  justify-content: space-between;
  margin-bottom: 0 !important;
  font-size: 16px;
  > .editText {
    cursor: pointer;
    margin-right: 6px;
    &:hover {
      transform: scale(1.2);
    }
  }
  .editimg {
    cursor: pointer;
    width: 15px;
    height: 15px;
    &:hover {
      transform: scale(1.2);
    }
  }
}
</style>