|
@@ -9,73 +9,31 @@
|
|
</el-button>
|
|
</el-button>
|
|
</HcTooltip>
|
|
</HcTooltip>
|
|
</template>
|
|
</template>
|
|
- <el-scrollbar>
|
|
|
|
- <div class="hc-table-ref-box">
|
|
|
|
- <el-table :data="tableListData" :loading="tableLoading" hc row-key="id" border>
|
|
|
|
- <el-table-column label="序号" prop="index" width="80">
|
|
|
|
- <template #default="scope">
|
|
|
|
- {{ scope.$index + 1 }}
|
|
|
|
- </template>
|
|
|
|
- </el-table-column>
|
|
|
|
- <el-table-column label="分类名称" prop="classfName" />
|
|
|
|
- <el-table-column label="数量" prop="count" />
|
|
|
|
- <el-table-column label="所属阶段" prop="projectStage" />
|
|
|
|
- <el-table-column label="文件类型" prop="fileType">
|
|
|
|
- <template #default="scope">
|
|
|
|
- {{ scope.row.fileType == 1 ? '视频文件' : '图片文件' }}
|
|
|
|
- </template>
|
|
|
|
- </el-table-column>
|
|
|
|
- <el-table-column align="center" label="操作" width="130">
|
|
|
|
- <template #default="scope">
|
|
|
|
- <el-button size="small" text type="primary" @click="viewClick(scope.row)">
|
|
|
|
- 查看
|
|
|
|
- </el-button>
|
|
|
|
- <HcTooltip keys="image-data-upload">
|
|
|
|
- <el-button size="small" text type="primary" @click="uploadClick(scope.row)">
|
|
|
|
- 上传
|
|
|
|
- </el-button>
|
|
|
|
- </HcTooltip>
|
|
|
|
- </template>
|
|
|
|
- </el-table-column>
|
|
|
|
- </el-table>
|
|
|
|
- </div>
|
|
|
|
- </el-scrollbar>
|
|
|
|
|
|
+ <HcTable :column="tableListColumn" :datas="tableListData" :loading="tableLoading" is-new :index-style="{ width: 60 }">
|
|
|
|
+ <template #fileType="{ row }">
|
|
|
|
+ {{ row.fileType == 1 ? '视频文件' : '图片文件' }}
|
|
|
|
+ </template>
|
|
|
|
+ <template #action="{ row }">
|
|
|
|
+ <el-link type="primary" @click="viewClick(row)">查看</el-link>
|
|
|
|
+ <HcTooltip keys="image-data-upload">
|
|
|
|
+ <el-link type="success" @click="uploadClick(row)">上传</el-link>
|
|
|
|
+ </HcTooltip>
|
|
|
|
+ </template>
|
|
|
|
+ </HcTable>
|
|
</HcNewCard>
|
|
</HcNewCard>
|
|
<!-- 分类管理 弹框 -->
|
|
<!-- 分类管理 弹框 -->
|
|
- <hc-new-dialog v-model="showSortModal" title="分类管理" widths="62rem">
|
|
|
|
|
|
+ <hc-new-dialog v-model="showSortModal" is-table title="分类管理" widths="62rem">
|
|
<el-alert :closable="false" title="隐藏分类之后,在主页面不会显示该分类入口" type="warning" />
|
|
<el-alert :closable="false" title="隐藏分类之后,在主页面不会显示该分类入口" type="warning" />
|
|
<div class="modal-dialog">
|
|
<div class="modal-dialog">
|
|
- <el-scrollbar>
|
|
|
|
- <div class="hc-table-ref-box">
|
|
|
|
- <el-table :data="classTableData" :loading="classTableLoading" hc row-key="id" border>
|
|
|
|
- <el-table-column label="序号" prop="index" width="80">
|
|
|
|
- <template #default="scope">
|
|
|
|
- {{ scope.$index + 1 }}
|
|
|
|
- </template>
|
|
|
|
- </el-table-column>
|
|
|
|
- <el-table-column label="分类名称" prop="classfName" />
|
|
|
|
- <el-table-column label="所属阶段" prop="projectStage" />
|
|
|
|
- <el-table-column label="资料类型" prop="fileType">
|
|
|
|
- <template #default="scope">
|
|
|
|
- {{ scope.row.fileType == 1 ? '视频文件' : '图片文件' }}
|
|
|
|
- </template>
|
|
|
|
- </el-table-column>
|
|
|
|
- <el-table-column align="center" label="操作" width="130">
|
|
|
|
- <template #default="scope">
|
|
|
|
- <el-button
|
|
|
|
- v-if="scope.row.isShow" size="small" type="info"
|
|
|
|
- @click="saveConfig(scope.row)"
|
|
|
|
- >
|
|
|
|
- 隐藏分类
|
|
|
|
- </el-button>
|
|
|
|
- <el-button v-else size="small" type="primary" @click="saveConfig(scope.row)">
|
|
|
|
- 显示分类
|
|
|
|
- </el-button>
|
|
|
|
- </template>
|
|
|
|
- </el-table-column>
|
|
|
|
- </el-table>
|
|
|
|
- </div>
|
|
|
|
- </el-scrollbar>
|
|
|
|
|
|
+ <HcTable :column="classTableColumn" :datas="classTableData" :loading="classTableLoading" is-new :index-style="{ width: 60 }">
|
|
|
|
+ <template #fileType="{ row }">
|
|
|
|
+ {{ row.fileType == 1 ? '视频文件' : '图片文件' }}
|
|
|
|
+ </template>
|
|
|
|
+ <template #action="{ row }">
|
|
|
|
+ <el-link v-if="row.isShow" type="info" @click="saveConfig(row)">隐藏分类</el-link>
|
|
|
|
+ <el-link v-else type="primary" @click="saveConfig(row)">显示分类</el-link>
|
|
|
|
+ </template>
|
|
|
|
+ </HcTable>
|
|
</div>
|
|
</div>
|
|
</hc-new-dialog>
|
|
</hc-new-dialog>
|
|
</div>
|
|
</div>
|
|
@@ -84,13 +42,12 @@
|
|
<script setup>
|
|
<script setup>
|
|
import { onMounted, ref } from 'vue'
|
|
import { onMounted, ref } from 'vue'
|
|
import { useAppStore } from '~src/store'
|
|
import { useAppStore } from '~src/store'
|
|
-import { useRoute, useRouter } from 'vue-router'
|
|
|
|
|
|
+import { useRouter } from 'vue-router'
|
|
import imageApi from '~api/other-file/imageData'
|
|
import imageApi from '~api/other-file/imageData'
|
|
import { delStoreValue } from '~src/utils/storage'
|
|
import { delStoreValue } from '~src/utils/storage'
|
|
import { getArrValue } from 'js-fast-way'
|
|
import { getArrValue } from 'js-fast-way'
|
|
//变量
|
|
//变量
|
|
const router = useRouter()
|
|
const router = useRouter()
|
|
-const useRoutes = useRoute()
|
|
|
|
const useAppState = useAppStore()
|
|
const useAppState = useAppStore()
|
|
const projectId = ref(useAppState.getProjectId)
|
|
const projectId = ref(useAppState.getProjectId)
|
|
const contractId = ref(useAppState.getContractId)
|
|
const contractId = ref(useAppState.getContractId)
|
|
@@ -105,6 +62,13 @@ onMounted(() => {
|
|
|
|
|
|
//获取数据
|
|
//获取数据
|
|
const tableLoading = ref(false)
|
|
const tableLoading = ref(false)
|
|
|
|
+const tableListColumn = ref([
|
|
|
|
+ { key: 'classfName', name: '分类名称' },
|
|
|
|
+ { key: 'count', name: '数量' },
|
|
|
|
+ { key: 'projectStage', name: '所属阶段' },
|
|
|
|
+ { key: 'fileType', name: '文件类型' },
|
|
|
|
+ { key: 'action', name: '操作', width: 100 },
|
|
|
|
+])
|
|
const tableListData = ref([])
|
|
const tableListData = ref([])
|
|
const getClassIfyList = async () => {
|
|
const getClassIfyList = async () => {
|
|
tableLoading.value = true
|
|
tableLoading.value = true
|
|
@@ -155,6 +119,12 @@ const showSortModalClick = () => {
|
|
}
|
|
}
|
|
//获取分类管理数据
|
|
//获取分类管理数据
|
|
const classTableLoading = ref(false)
|
|
const classTableLoading = ref(false)
|
|
|
|
+const classTableColumn = ref([
|
|
|
|
+ { key: 'classfName', name: '分类名称' },
|
|
|
|
+ { key: 'projectStage', name: '所属阶段' },
|
|
|
|
+ { key: 'fileType', name: '资料类型' },
|
|
|
|
+ { key: 'action', name: '操作', width: 100 },
|
|
|
|
+])
|
|
const classTableData = ref([])
|
|
const classTableData = ref([])
|
|
const getClassifyShowConfigList = async () => {
|
|
const getClassifyShowConfigList = async () => {
|
|
classTableLoading.value = true
|
|
classTableLoading.value = true
|