|
@@ -21,6 +21,7 @@
|
|
<span>返回主页</span>
|
|
<span>返回主页</span>
|
|
</el-button>
|
|
</el-button>
|
|
</template>
|
|
</template>
|
|
|
|
+
|
|
<HcTable v-if="!isShowImageList" :column="tableListColumn" :datas="tableListData" :loading="tableLoading" is-new :index-style="{ width: 60 }">
|
|
<HcTable v-if="!isShowImageList" :column="tableListColumn" :datas="tableListData" :loading="tableLoading" is-new :index-style="{ width: 60 }">
|
|
<template #fileType="{ row }">
|
|
<template #fileType="{ row }">
|
|
{{ row.fileType == 1 ? '视频文件' : '图片文件' }}
|
|
{{ row.fileType == 1 ? '视频文件' : '图片文件' }}
|
|
@@ -32,11 +33,24 @@
|
|
</HcTooltip>
|
|
</HcTooltip>
|
|
</template>
|
|
</template>
|
|
</HcTable>
|
|
</HcTable>
|
|
|
|
+ <!-- 相册列表 -->
|
|
<HcTable v-else :column="imageListColumn" :datas="imageListData" :loading="imageLoading" is-new :index-style="{ width: 60 }">
|
|
<HcTable v-else :column="imageListColumn" :datas="imageListData" :loading="imageLoading" is-new :index-style="{ width: 60 }">
|
|
- <template #count="{ row }">
|
|
|
|
- <span v-if="!row.isEditing">{{ row.count }}</span>
|
|
|
|
-
|
|
|
|
- <el-input v-else v-model="row.count" placeholder="请输入内容" />
|
|
|
|
|
|
+ <template #groupNumber="{ row }">
|
|
|
|
+ <span v-if="!row.isEditing">{{ row.groupNumber }}</span>
|
|
|
|
+
|
|
|
|
+ <el-input-number v-else v-model="row.count" :controls="false" :precision="0" :min="0" style="width: 100%;" />
|
|
|
|
+ </template>
|
|
|
|
+ <template #photographer="{ row }">
|
|
|
|
+ <span v-if="!row.isEditing">{{ row.photographer }}</span>
|
|
|
|
+ <el-input v-else v-model="row.photographer" placeholder="请输入" />
|
|
|
|
+ </template>
|
|
|
|
+ <template #date="{ row }">
|
|
|
|
+ <span v-if="!row.isEditing">{{ row.dateValue }}</span>
|
|
|
|
+ <hc-date-picker v-else :dates="betweenTime" clearable @change="betweenTimeUpdate($event, row)" />
|
|
|
|
+ </template>
|
|
|
|
+ <template #imagesName="{ row }">
|
|
|
|
+ <span v-if="!row.isEditing">{{ row.imagesName }}</span>
|
|
|
|
+ <el-input v-else v-model="row.imagesName" placeholder="请输入" />
|
|
</template>
|
|
</template>
|
|
<template #action="{ row }">
|
|
<template #action="{ row }">
|
|
<el-link v-if="!row.isEditing" type="primary" @click="startEditing(row)">编辑</el-link>
|
|
<el-link v-if="!row.isEditing" type="primary" @click="startEditing(row)">编辑</el-link>
|
|
@@ -68,6 +82,7 @@ import { onMounted, ref } from 'vue'
|
|
import { useAppStore } from '~src/store'
|
|
import { useAppStore } from '~src/store'
|
|
import { useRouter } from 'vue-router'
|
|
import { useRouter } from 'vue-router'
|
|
import imageApi from '~api/other-file/imageData'
|
|
import imageApi from '~api/other-file/imageData'
|
|
|
|
+import albumApi from '~api/other-file/album'
|
|
import { delStoreValue } from '~src/utils/storage'
|
|
import { delStoreValue } from '~src/utils/storage'
|
|
import { getArrValue } from 'js-fast-way'
|
|
import { getArrValue } from 'js-fast-way'
|
|
//变量
|
|
//变量
|
|
@@ -187,6 +202,8 @@ const saveConfig = async (row) => {
|
|
const isShowImageList = ref(false)
|
|
const isShowImageList = ref(false)
|
|
const showImageList = () => {
|
|
const showImageList = () => {
|
|
isShowImageList.value = true
|
|
isShowImageList.value = true
|
|
|
|
+ //获取相册列表数据
|
|
|
|
+ getImageListData()
|
|
|
|
|
|
}
|
|
}
|
|
const goBackList = () => {
|
|
const goBackList = () => {
|
|
@@ -194,11 +211,11 @@ const goBackList = () => {
|
|
|
|
|
|
}
|
|
}
|
|
const imageListColumn = ref([
|
|
const imageListColumn = ref([
|
|
- { key: 'className', name: '分类名称' },
|
|
|
|
- { key: 'count', name: '分组号', width:100 },
|
|
|
|
- { key: 'user', name: '主要拍摄者', width: 100 },
|
|
|
|
|
|
+ { key: 'classifyName', name: '分类名称' },
|
|
|
|
+ { key: 'groupNumber', name: '分组号', width:100 },
|
|
|
|
+ { key: 'photographer', name: '主要拍摄者', width: 100 },
|
|
{ key: 'date', name: '拍摄起止日期' },
|
|
{ key: 'date', name: '拍摄起止日期' },
|
|
- { key: 'fileName', name: '文件题名' },
|
|
|
|
|
|
+ { key: 'imagesName', name: '文件题名' },
|
|
{ key: 'action', name: '操作', width: 100 },
|
|
{ key: 'action', name: '操作', width: 100 },
|
|
])
|
|
])
|
|
const imageListData = ref([
|
|
const imageListData = ref([
|
|
@@ -206,6 +223,33 @@ const imageListData = ref([
|
|
{ className:'基础设施2', count: '1', user: '张三', date: '2023-01-01 至 2023-01-31', fileName: '基础设施照片1.jpg' },
|
|
{ className:'基础设施2', count: '1', user: '张三', date: '2023-01-01 至 2023-01-31', fileName: '基础设施照片1.jpg' },
|
|
{ className:'基础设施3', count: '1', user: '张三', date: '2023-01-01 至 2023-01-31', fileName: '基础设施照片1.jpg' },
|
|
{ className:'基础设施3', count: '1', user: '张三', date: '2023-01-01 至 2023-01-31', fileName: '基础设施照片1.jpg' },
|
|
])
|
|
])
|
|
|
|
+
|
|
|
|
+const getImageListData = async () => {
|
|
|
|
+ tableLoading.value = true
|
|
|
|
+ const { error, code, data } = await albumApi.getPage({
|
|
|
|
+ projectId: projectId.value,
|
|
|
|
+ contractId: contractId.value,
|
|
|
|
+ })
|
|
|
|
+ //处理数据
|
|
|
|
+ tableLoading.value = false
|
|
|
|
+ if (!error && code === 200) {
|
|
|
|
+ imageListData.value = getArrValue(data)
|
|
|
|
+ } else {
|
|
|
|
+ imageListData.value = []
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+const betweenTime = ref(null)
|
|
|
|
+
|
|
|
|
+//日期时间被选择
|
|
|
|
+const betweenTimeUpdate = ({ arr, val, query }, row) => {
|
|
|
|
+ betweenTime.value = arr
|
|
|
|
+
|
|
|
|
+ row.dateValue = query
|
|
|
|
+ console.log(query, 'query')
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+}
|
|
const imageLoading = ref(false)
|
|
const imageLoading = ref(false)
|
|
|
|
|
|
const handleDelete = (row) => {
|
|
const handleDelete = (row) => {
|