微调
This commit is contained in:
@@ -24,4 +24,5 @@ VITE_PROXY=[["/api","http://127.0.0.1:18093/"]]
|
|||||||
#VITE_PROXY=[["/api","http://192.168.2.125:18092/"]]
|
#VITE_PROXY=[["/api","http://192.168.2.125:18092/"]]
|
||||||
# VITE_PROXY=[["/api","http://192.168.1.138:8080/"]]张文
|
# VITE_PROXY=[["/api","http://192.168.1.138:8080/"]]张文
|
||||||
# 开启激活验证
|
# 开启激活验证
|
||||||
|
VITE_IS_SHOW_RAW_DATA=false
|
||||||
VITE_ACTIVATE_OPEN=false
|
VITE_ACTIVATE_OPEN=false
|
||||||
@@ -25,4 +25,5 @@ VITE_PWA=true
|
|||||||
#VITE_API_URL="/api" # 打包时用
|
#VITE_API_URL="/api" # 打包时用
|
||||||
VITE_API_URL="http://127.0.0.1:18093/"
|
VITE_API_URL="http://127.0.0.1:18093/"
|
||||||
# 开启激活验证
|
# 开启激活验证
|
||||||
|
VITE_IS_SHOW_RAW_DATA=false
|
||||||
VITE_ACTIVATE_OPEN=false
|
VITE_ACTIVATE_OPEN=false
|
||||||
@@ -4,6 +4,8 @@ export const requestResourceManageAutoplayFirst = () => {
|
|||||||
shouldAutoplayFirstVideo = true
|
shouldAutoplayFirstVideo = true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export const hasPendingResourceManageAutoplayFirst = () => shouldAutoplayFirstVideo
|
||||||
|
|
||||||
export const consumeResourceManageAutoplayFirst = () => {
|
export const consumeResourceManageAutoplayFirst = () => {
|
||||||
if (!shouldAutoplayFirstVideo) return false
|
if (!shouldAutoplayFirstVideo) return false
|
||||||
shouldAutoplayFirstVideo = false
|
shouldAutoplayFirstVideo = false
|
||||||
|
|||||||
@@ -42,7 +42,7 @@
|
|||||||
<span class="node-label">{{ node.label }}</span>
|
<span class="node-label">{{ node.label }}</span>
|
||||||
<span class="node-actions">
|
<span class="node-actions">
|
||||||
<PieChart
|
<PieChart
|
||||||
v-if="isCompletedPlanNode(node.data)"
|
v-if="!isCompareMode && isCompletedPlanNode(node.data)"
|
||||||
class="node-action-icon"
|
class="node-action-icon"
|
||||||
@click.stop="openStatistics(node.data)"
|
@click.stop="openStatistics(node.data)"
|
||||||
style="margin-right: 8px"
|
style="margin-right: 8px"
|
||||||
@@ -73,7 +73,7 @@
|
|||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { type Plan } from '@/api/plan/interface'
|
import { type Plan } from '@/api/plan/interface'
|
||||||
import { List, Menu, PieChart, Platform } from '@element-plus/icons-vue'
|
import { List, Menu, PieChart, Platform } from '@element-plus/icons-vue'
|
||||||
import { nextTick, onMounted, ref, watch } from 'vue'
|
import { computed, nextTick, onMounted, ref, watch } from 'vue'
|
||||||
import { useRouter } from 'vue-router'
|
import { useRouter } from 'vue-router'
|
||||||
import { useCheckStore } from '@/stores/modules/check'
|
import { useCheckStore } from '@/stores/modules/check'
|
||||||
import { ElTooltip } from 'element-plus'
|
import { ElTooltip } from 'element-plus'
|
||||||
@@ -91,6 +91,7 @@ const filterText = ref('')
|
|||||||
const treeRef = ref()
|
const treeRef = ref()
|
||||||
const data: any = ref([])
|
const data: any = ref([])
|
||||||
const modeStore = useModeStore()
|
const modeStore = useModeStore()
|
||||||
|
const isCompareMode = computed(() => modeStore.currentMode === '比对式')
|
||||||
const dictStore = useDictStore()
|
const dictStore = useDictStore()
|
||||||
|
|
||||||
const defaultProps = {
|
const defaultProps = {
|
||||||
|
|||||||
@@ -464,9 +464,11 @@ const getPieData = async (id: string) => {
|
|||||||
planName.value = '所选计划:'
|
planName.value = '所选计划:'
|
||||||
}
|
}
|
||||||
|
|
||||||
pieRef1.value.init()
|
if (pieRef1.value && pieRef2.value && pieRef3.value) {
|
||||||
pieRef2.value.init()
|
pieRef1.value.init()
|
||||||
pieRef3.value.init()
|
pieRef2.value.init()
|
||||||
|
pieRef3.value.init()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* 初始化树组件数据
|
* 初始化树组件数据
|
||||||
|
|||||||
@@ -33,13 +33,16 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="tsx" name="resourceManage">
|
<script setup lang="tsx" name="resourceManage">
|
||||||
import { reactive, ref } from 'vue'
|
import { onActivated, reactive, ref } from 'vue'
|
||||||
import { CirclePlus, EditPen, VideoPlay } from '@element-plus/icons-vue'
|
import { CirclePlus, EditPen, VideoPlay } from '@element-plus/icons-vue'
|
||||||
import ProTable from '@/components/ProTable/index.vue'
|
import ProTable from '@/components/ProTable/index.vue'
|
||||||
import type { ColumnProps, ProTableInstance } from '@/components/ProTable/interface'
|
import type { ColumnProps, ProTableInstance } from '@/components/ProTable/interface'
|
||||||
import type { ResourceManage } from '@/api/resourceManage/interface'
|
import type { ResourceManage } from '@/api/resourceManage/interface'
|
||||||
import { getResourceManageList, getResourceManagePlayUrl } from '@/api/resourceManage'
|
import { getResourceManageList, getResourceManagePlayUrl } from '@/api/resourceManage'
|
||||||
import { consumeResourceManageAutoplayFirst } from '@/utils/resourceManageAutoplay'
|
import {
|
||||||
|
consumeResourceManageAutoplayFirst,
|
||||||
|
hasPendingResourceManageAutoplayFirst
|
||||||
|
} from '@/utils/resourceManageAutoplay'
|
||||||
import ResourceManagePopup from './components/resourceManagePopup.vue'
|
import ResourceManagePopup from './components/resourceManagePopup.vue'
|
||||||
import ResourcePlayerDialog from './components/resourcePlayerDialog.vue'
|
import ResourcePlayerDialog from './components/resourcePlayerDialog.vue'
|
||||||
|
|
||||||
@@ -51,15 +54,17 @@ const proTable = ref<ProTableInstance>()
|
|||||||
const resourceManagePopup = ref()
|
const resourceManagePopup = ref()
|
||||||
const resourcePlayerDialog = ref()
|
const resourcePlayerDialog = ref()
|
||||||
|
|
||||||
|
const tryAutoPlayFirstRecord = async (firstRecord?: ResourceManage.ResResourceManage) => {
|
||||||
|
if (!consumeResourceManageAutoplayFirst()) return
|
||||||
|
if (!firstRecord) return
|
||||||
|
await handlePlay(firstRecord)
|
||||||
|
}
|
||||||
|
|
||||||
const getTableList = async (params: ResourceManage.ReqResourceManageParams) => {
|
const getTableList = async (params: ResourceManage.ReqResourceManageParams) => {
|
||||||
const response = await getResourceManageList(params)
|
const response = await getResourceManageList(params)
|
||||||
const firstRecord = response.data.records?.[0]
|
const firstRecord = response.data.records?.[0]
|
||||||
|
|
||||||
if (consumeResourceManageAutoplayFirst()) {
|
await tryAutoPlayFirstRecord(firstRecord)
|
||||||
if (firstRecord) {
|
|
||||||
await handlePlay(firstRecord)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return response
|
return response
|
||||||
}
|
}
|
||||||
@@ -146,4 +151,16 @@ const handlePlay = async (row: ResourceManage.ResResourceManage) => {
|
|||||||
const { data } = await getResourceManagePlayUrl(row.id)
|
const { data } = await getResourceManagePlayUrl(row.id)
|
||||||
resourcePlayerDialog.value?.open(normalizeStreamUrl(data.url))
|
resourcePlayerDialog.value?.open(normalizeStreamUrl(data.url))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
onActivated(async () => {
|
||||||
|
if (!hasPendingResourceManageAutoplayFirst()) return
|
||||||
|
|
||||||
|
const currentFirstRecord = proTable.value?.tableData?.[0] as ResourceManage.ResResourceManage | undefined
|
||||||
|
if (currentFirstRecord) {
|
||||||
|
await tryAutoPlayFirstRecord(currentFirstRecord)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
await proTable.value?.getTableList?.()
|
||||||
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
Reference in New Issue
Block a user