大屏项目初始化

This commit is contained in:
2026-02-26 21:58:09 +08:00
parent 28cb663bf3
commit 36c8df2bc4
12 changed files with 410 additions and 400 deletions

View File

@@ -18,13 +18,10 @@
</div>
<div class="query-group">
<el-date-picker
type="daterange"
type="year"
v-model="queryDate"
range-separator=""
start-placeholder="开始日期"
end-placeholder="结束日期"
popper-class="dark-date-popper"
value-format="YYYY-MM-DD"
value-format="YYYY"
></el-date-picker>
<button class="query-btn" @click="handleQuery">查询</button>
</div>
@@ -33,49 +30,60 @@
<main class="screen-content">
<div v-if="activeTab === 'home'" class="screen-page">
<HomeIndex />
<HomeIndex :formParams="FormValues" />
</div>
<div v-else-if="activeTab === 'work'" class="screen-page">
<WorkIndex />
<WorkIndex :formParams="FormValues" />
</div>
<div v-else-if="activeTab === 'test'" class="screen-page">
<TestIndex :formParams="FormValues" />
</div>
<div v-else-if="activeTab === 'erp'" class="screen-page">
<ErpIndex />
<ErpIndex :formParams="FormValues" />
</div>
</main>
</div>
</template>
<script setup>
import { ref } from 'vue';
import { ref, onMounted } from 'vue';
import HomeIndex from './screen/Home/index.vue';
import ErpIndex from './screen/Erp/index.vue';
import WorkIndex from './screen/Work/index.vue';
import TestIndex from './screen/Test/index.vue';
const screenTitle = ref('数字化可视化');
const currentYear = new Date().getFullYear().toString();
const FormValues = ref({
startDate: "",
endDate: ""
reqParam: currentYear
});
const allTabs = [
{ key: 'home', name: '首页' },
{ key: 'work', name: '工作' },
{ key: 'test', name: '测试' },
{ key: 'erp', name: '财务' },
]
const activeTab = ref('home')
const queryDate = ref('')
const queryDate = ref();
const switchTab = (key) => {
activeTab.value = key
}
const handleQuery = () => {
const [startDate, endDate] = queryDate.value || [];
FormValues.value.startDate = startDate || "";
FormValues.value.endDate = endDate || "";
FormValues.value.reqParam = queryDate.value;
}
const initApp = () =>{
queryDate.value = currentYear;
}
onMounted(() => {
initApp();
});
</script>
<style>
@@ -247,7 +255,6 @@ const handleQuery = () => {
:deep(.el-input__inner) {
background-color: #0f3460 !important;
color: #e0e6ff !important;
border: 1px solid #1a508b !important;
box-shadow: none !important;
}