vue3+ts+element-plus 開發一個頁面模塊的詳細過程

目錄、文件名均使用kebab-case(短橫線分隔式)命名規范

子組件目錄:./progress-ctrl/comps

1、新建頁面文件 progress-ctrl.vue

<script setup lang="ts" name="progress-ctrl"></script><template></template><style scoped lang="scss"></style>

運行效果:?

2、 頁面布局

<script setup lang="ts" name="progress-ctrl"></script><template><el-container class="layout-container"><el-aside class="aside"><!-- 左側受理類別節點樹 -->受理類別節點樹</el-aside><el-container class="container"><el-header class="header"><!-- 查詢欄 -->查詢欄</el-header><el-main class="main"><!-- main -->主項數據區域</el-main><el-footer class="footer"><!-- 選項卡 -->選項卡<!-- 分頁 -->分頁</el-footer></el-container></el-container>
</template><style scoped lang="scss">
* {margin: 0;padding: 0;
}
.layout-container {height: 100%;border: 1px solid #ddd;.aside {width: 150px;}.container {border-left: 1px solid #ddd;.header {height: auto;min-height: 40px;border-bottom: 1px solid #ddd;}.main {min-height: 100px;}.footer {height: auto;min-height: 40px;border-top: 1px solid #ddd;}}
}
</style>

運行效果:

3、新建子組件

3.1、子組件-左側樹

./progress-ctrl/comps/progress-ctrl-tree.vue

<script setup lang="ts" name="progress-ctrl-tree"></script><template><div class="tree"><el-scrollbar><el-tree:default-expand-all="true":highlight-current="true":expand-on-click-node="false":indent="0"></el-tree></el-scrollbar></div>
</template><style scoped lang="scss"></style>

3.2、子組件-查詢欄

./progress-ctrl/comps/progress-ctrl-search.vue

<script setup lang="ts" name="progress-ctrl-search"></script><template><div class="search"><el-form class="header-form" :inline="true" :label-width="90"><el-form-item class="header-form-item-330" label="受理編號:"><el-input clearable /></el-form-item><el-form-item class="header-form-item-auto"><el-button class="btn-same-width" type="primary" plain @click="">查詢</el-button><el-button class="btn-same-width" type="primary" plain @click="">重置</el-button><el-button class="btn-same-width" type="primary" plain @click="">更多篩選</el-button></el-form-item></el-form><el-form class="header-form" :inline="true" :label-width="90" v-show=""><el-form-item class="header-form-item-330" label="受理日期:"><el-date-pickertype="daterange"start-placeholder="開始日期"range-separator="至"end-placeholder="結束日期"format="YYYY-MM-DD"value-format="YYYY-MM-DD"></el-date-picker></el-form-item><el-form-item class="header-form-item-330" label="受檢單位:"><el-input clearable /></el-form-item></el-form></div>
</template><style scoped lang="scss"></style>

3.3、子組件-主項數據

./progress-ctrl/comps/progress-ctrl-main.vue

<script setup lang="ts" name="progress-ctrl-main"></script><template><div class="main"><el-tableref="table":border="true"highlight-current-rowstyle="width: 100%; height: 100%"><el-table-columnprop="outerApplyId"label="受理編號"width="120"fixed="left"header-align="center"sortableshow-overflow-tooltip /><el-table-columnprop="stateDescription"label="狀態"width="150"fixed="left"header-align="center"sortableshow-overflow-tooltip /><el-table-columnprop="acceptDate"label="受理日期"width="110"header-align="center":align="`center`"sortableshow-overflow-tooltip /><el-table-columnprop="reportDate"label="報告限期"width="110"header-align="center":align="`center`"sortableshow-overflow-tooltip /><el-table-columnprop="verifyTypeName"label="檢驗類別"width="120"header-align="center"sortableshow-overflow-tooltip /><el-table-columnprop="acceptTypeName"label="受理類別"width="150"header-align="center"sortableshow-overflow-tooltip /><el-table-columnprop="acceptGroupName"label="受理組別"width="150"header-align="center"sortableshow-overflow-tooltip /><el-table-columnprop="sjdwName"label="受檢單位"width="300"header-align="center"sortableshow-overflow-tooltip /></el-table></div>
</template><style scoped lang="scss"></style>

3.4、子組件-選項卡

./progress-ctrl/comps/progress-ctrl-tabs.vue

<script setup lang="ts" name="progress-ctrl-tabs"></script><template><div class="tabs"><el-tabs type="border-card" @tab-click=""><el-tab-pane label="受理信息" name="apply"></el-tab-pane><el-tab-pane label="交接信息" name="jjd"></el-tab-pane><el-tab-pane label="檢測信息" name="test"></el-tab-pane><el-tab-pane label="報告信息" name="report"></el-tab-pane></el-tabs></div>
</template><style scoped lang="scss"></style>

3.5、子組件-分頁

./progress-ctrl/comps/progress-ctrl-pagination.vue?

<script setup lang="ts" name="progress-ctrl-pagination"></script><template><div class="pagination"><el-pagination:page-sizes="[5]"backgroundlayout="total, prev, pager, next":small="true" /></div>
</template><style scoped lang="scss"></style>

4、新建選項卡組件的子組件

4.1、孫組件-受理信息

./progress-ctrl/comps/progress-ctrl-tabs-apply.vue

<script setup lang="ts" name="progress-ctrl-tabs-apply"></script><template><div class="tabs-apply"><el-tableref="applyTable":border="true"highlight-current-rowstyle="width: 100%; height: 100%"><el-table-columnprop="applyId"label="子受理編號"width="120"fixed="left"header-align="center"sortableshow-overflow-tooltip /><el-table-columnprop="acceptDate"label="受理日期"width="110"header-align="center":align="`center`"show-overflow-tooltip /><el-table-columnprop="acceptSmallTypeName"label="受理小類"width="150"header-align="center"show-overflow-tooltip /><el-table-column prop="sampleKind" label="檢材類別" width="150" header-align="center" show-overflow-tooltip /><el-table-columnprop="keepCondition"label="描述信息"width="150"header-align="center"show-overflow-tooltip /><el-table-columnprop="acceptPersonName"label="受理人"width="100"header-align="center":align="`center`"show-overflow-tooltip /><el-table-columnprop="state"label="狀態"width="100"header-align="center":align="`center`"fixed="right"show-overflow-tooltip /></el-table></div>
</template><style scoped lang="scss"></style>

4.2、孫組件-交接信息

?./progress-ctrl/comps/progress-ctrl-tabs-jjd.vue

<script setup lang="ts" name="progress-ctrl-tabs-jjd"></script><template><div class="tabs-jjd"><el-tableref="jjdTable":border="true"highlight-current-rowstyle="width: 100%; height: 100%"><el-table-columnprop="blPersonName"label="派樣人"width="100"header-align="center":align="`center`"show-overflow-tooltip /><el-table-column prop="submitTime" label="派樣時間" width="200" header-align="center" show-overflow-tooltip /><el-table-columnprop="checkGroupName"label="檢驗組別"width="150"header-align="center":align="`center`"show-overflow-tooltip /><el-table-columnprop="receivePersonName"label="接樣人"width="100"header-align="center":align="`center`"show-overflow-tooltip /><el-table-columnprop="receiveTime"label="接樣時間"width="200"header-align="center"show-overflow-tooltip /><el-table-columnprop="deadlineTime"label="交接限期"width="110"header-align="center":align="`center`"show-overflow-tooltip /><el-table-columnprop="state"label="狀態"width="100"header-align="center":align="`center`"fixed="right"show-overflow-tooltip /></el-table></div>
</template><style scoped lang="scss"></style>

?4.3、孫組件-檢測信息

?./progress-ctrl/comps/progress-ctrl-tabs-test.vue

<script setup lang="ts" name="progress-ctrl-tabs-test"></script><template><div class="tabs-test"><el-tableref="sampleItemResultTable":border="true"highlight-current-rowstyle="width: 100%; height: 100%"><el-table-columnprop="sampleNo"label="樣品編號"width="120"header-align="center"fixedsortableshow-overflow-tooltip /><el-table-columnprop="sampleName"label="樣品名稱"width="150"header-align="center"fixedsortableshow-overflow-tooltip /><el-table-columnprop="itemName"label="檢驗項目"width="150"header-align="center"fixedsortableshow-overflow-tooltip /><el-table-columnprop="result"label="結果"width="120"header-align="center"sortableshow-overflow-tooltip /><el-table-columnprop="conclusion"label="結論"width="80"header-align="center"sortableshow-overflow-tooltip /><el-table-columnprop="state"label="狀態"width="100"header-align="center":align="`center`"sortableshow-overflow-tooltip /><el-table-columnprop="standardScript"label="標準值"width="120"header-align="center"sortableshow-overflow-tooltip /><el-table-column prop="unit" label="單位" width="100" header-align="center" sortable show-overflow-tooltip /><el-table-columnprop="ffbzId"label="檢測標準編號"width="200"header-align="center"sortableshow-overflow-tooltip /><el-table-columnprop="ffbzName"label="檢測標準名稱"width="300"header-align="center"sortableshow-overflow-tooltip /><el-table-columnprop="verifyMethod"label="檢驗方法"width="150"header-align="center"sortableshow-overflow-tooltip /><el-table-columnprop="person"label="檢驗員"width="100"header-align="center"sortableshow-overflow-tooltip /><el-table-columnprop="allotTime"label="分派時間"width="200"header-align="center"sortableshow-overflow-tooltip /><el-table-columnprop="submitTime"label="檢測時間"width="200"header-align="center"sortableshow-overflow-tooltip /><el-table-columnprop="deadlineDate"label="檢測限期"width="110"header-align="center":align="`center`"sortableshow-overflow-tooltip /></el-table></div>
</template><style scoped lang="scss"></style>

4.4、孫組件-報告信息

??./progress-ctrl/comps/progress-ctrl-tabs-report.vue

<script setup lang="ts" name="progress-ctrl-tabs-report"></script><template><div class="tabs-report"><el-tableref="reportTable":border="true"highlight-current-rowstyle="width: 100%; height: 100%"><el-table-columnprop="deptName"label="所屬部門"width="150"header-align="center"fixed="left"sortableshow-overflow-tooltip /><el-table-columnprop="type"label="類型"width="100"header-align="center":align="`center`"fixed="left"sortableshow-overflow-tooltip:formatter="(row: any) => { return row.type === 1 ? `檢驗報告` : `評價報告` }" /><el-table-columnprop="reportTypeName"label="報告類型"width="200"header-align="center"fixed="left"sortableshow-overflow-tooltip /><el-table-columnprop="hbPerson"label="編制人"width="100"header-align="center":align="`center`"show-overflow-tooltip /><el-table-columnprop="hbDate"label="編制日期"width="110"header-align="center":align="`center`"show-overflow-tooltip /><el-table-columnprop="hdPerson"label="核對人"width="100"header-align="center":align="`center`"show-overflow-tooltip /><el-table-columnprop="hdDate"label="核對日期"width="110"header-align="center":align="`center`"show-overflow-tooltip /><el-table-columnprop="hfPerson"label="簽發人"width="100"header-align="center":align="`center`"show-overflow-tooltip /><el-table-columnprop="hfDate"label="簽發日期"width="110"header-align="center":align="`center`"show-overflow-tooltip /><el-table-columnprop="reportDate"label="報告限期"width="110"header-align="center":align="`center`"show-overflow-tooltip /><el-table-columnprop="state"label="狀態"width="100"header-align="center":align="`center`"fixed="right"show-overflow-tooltip /></el-table></div>
</template><style scoped lang="scss"></style>

5、選項卡子組件導入使用子組件

<script setup lang="ts" name="progress-ctrl-tabs">
import ProgressCtrlTabsApply from './progress-ctrl-tabs-apply.vue';
import ProgressCtrlTabsJJD from './progress-ctrl-tabs-jjd.vue';
import ProgressCtrlTabsTest from './progress-ctrl-tabs-test.vue';
import ProgressCtrlTabsReport from './progress-ctrl-tabs-report.vue';</script><template><div class="tabs"><el-tabs type="border-card" @tab-click=""><el-tab-pane label="受理信息" name="apply"><ProgressCtrlTabsApply /></el-tab-pane><el-tab-pane label="交接信息" name="jjd"><ProgressCtrlTabsJJD /></el-tab-pane><el-tab-pane label="檢測信息" name="test"><ProgressCtrlTabsTest /></el-tab-pane><el-tab-pane label="報告信息" name="report"><ProgressCtrlTabsReport /></el-tab-pane></el-tabs></div>
</template><style scoped lang="scss"></style>

6、父組件導入使用子組件

<script setup lang="ts" name="progress-ctrl">
import ProgressCtrlTree from './progress-ctrl/comps/progress-ctrl-tree.vue';
import ProgressCtrlSearch from './progress-ctrl/comps/progress-ctrl-search.vue';
import ProgressCtrlMain from './progress-ctrl/comps/progress-ctrl-main.vue';
import ProgressCtrlTabs from './progress-ctrl/comps/progress-ctrl-tabs.vue';
import ProgressCtrlPagination from './progress-ctrl/comps/progress-ctrl-pagination.vue';</script><template><el-container class="layout-container"><el-aside class="aside"><!-- 左側受理類別節點樹 --><ProgressCtrlTree /></el-aside><el-container class="container"><el-header class="header"><!-- 查詢欄 --><ProgressCtrlSearch /></el-header><el-main class="main"><!-- main --><ProgressCtrlMain /></el-main><el-footer class="footer"><!-- 選項卡 --><ProgressCtrlTabs /><!-- 分頁 --><ProgressCtrlPagination /></el-footer></el-container></el-container>
</template><style scoped lang="scss">
* {margin: 0;padding: 0;
}
.layout-container {height: 100%;border: 1px solid #ddd;.aside {width: 150px;}.container {border-left: 1px solid #ddd;.header {height: auto;min-height: 40px;border-bottom: 1px solid #ddd;}.main {min-height: 100px;}.footer {height: auto;min-height: 40px;border-top: 1px solid #ddd;}}
}
</style>

運行效果:

7、數據模型業務邏輯處理

7.1、數據定義

import type { Component } from "vue";export interface ITree {// 樹節點的label,受理類別名稱label: string;// 樹節點的value,受理類別代碼value: string;// 樹節點的圖標icon?: Component;// 圖標顏色iconColor?: string;// 子節點children?: ITree[];
}// 分頁對象
interface IPage {// 當前頁碼page: number// 每頁顯示數量                   size: number                   
}// 查詢對象
export interface IQueryObj {// 分頁器pageHelper: IPage// 受理編號outerApplyId?: string  // 受檢單位        sjdwName?: string  // 受理類別            acceptType?: string  // 受理開始日期          acceptDateBegin?: string      // 受理結束日期 acceptDateEnd?: string         
}export interface IApplyBasicInfo {// 受理編號outerApplyId: string// 狀態stateDescription: string// 受理日期acceptDate: string// 報告限期reportDate: string// 檢驗類別verifyTypeName: string// 受理類別acceptTypeName: string// 受理組別acceptGroupName: string// 受檢單位sjdwName: string
}// 結構繼承使用 extends
// import type { Apply, JJD, SampleItemResult, ReportSimpleVO } from "@/interface";
// export interface IApply extends Apply {
// }
// export interface IJJD extends JJD {
// }
// export interface ITest extends SampleItemResult {
// }
// export interface IReport extends ReportSimpleVO {
// }

7.2、數據處理

import { defineStore } from "pinia";
import { ref } from "vue";
import { acceptTypeOptionsByUserNameService } from "@/api/selectOptions";
import type { IApplyBasicInfo, IQueryObj, ITree } from "../types";
import {applyBasicInfoSjkByQueryDTOService,applyBasicInfoYztByQueryDTOService,applyBasicInfoSjkAllService,applyBasicInfoSjkTodayService,applyBasicInfoSjk3DayService,applyBasicInfoSjkRecentService,applyBasicInfoSjkOverdueService
} from "@/api/applyBasicInfo";
// 使用 as 重命名導出的類型
import type { Apply as IApply, JJD as IJJD, SampleItemResult as ITest, ReportSimpleVO as IReport } from "@/interface";
import { applyDataByOuterApplyIdService } from "@/api/apply";
import { jjdDataByOuterApplyIdService } from "@/api/jjd";
// 使用 as 重命名導出的方法
import { sampleItemResultByOuterApplyIdService as testDataByOuterApplyIdService } from "@/api/sampleItemResult";
import { reportDataByOuterApplyIdService } from "@/api/report";const useProgressCtrlStore = defineStore("progressCtrl", () => {// 頁面實例數據// 受理類別列表數據const acceptTypeListData = ref<{ label: string; value: string }[]>([]);// 樹數據const treeData = ref<ITree[]>([]);// 受理列表數據const applyBasicInfoListData = ref<IApplyBasicInfo[]>([]);// 查詢對象const queryObj = ref<IQueryObj>({pageHelper: {page: 1,size: 5},acceptType: "",outerApplyId: "",sjdwName: "",acceptDateBegin: "",acceptDateEnd: ""});// 當前點擊選擇的樹節點const currentNode = ref<ITree>();// 當前表格選擇行const currentTableRow = ref<IApplyBasicInfo>();// 當前選中的選項卡名稱const activeTabName = ref("test");// 子受理列表數據const applyListData = ref<IApply[]>([]);// 交接單列表數據const jjdListData = ref<IJJD[]>([]);// 檢驗列表數據const testListData = ref<ITest[]>([]);// 報告列表數據const reportListData = ref<IReport[]>([]);// 發送網絡請求,獲取受理類別列表數據const postAcceptTypeListDataService = async () => {let result = await acceptTypeOptionsByUserNameService();acceptTypeListData.value = result.data;};// 發送網絡請求,獲取受理列表數據const postApplyBasicInfoListDataService = async () => {// 前置處理,清空數據clearData();let result;// 通過樹節點數據,獲取受理列表數據if (!queryObj.value.outerApplyId &&!queryObj.value.sjdwName &&!queryObj.value.acceptDateBegin &&!queryObj.value.acceptDateEnd) {queryObj.value.acceptType = currentNode.value?.value;switch (currentNode.value?.value) {case "#ALL#":// 發送網絡請求,獲取受監控的受理列表數據(所有)result = await applyBasicInfoSjkAllService(queryObj.value);break;case "#today#":// 發送網絡請求,獲取受監控的受理列表數據(今天內到期)result = await applyBasicInfoSjkTodayService(queryObj.value);case "#3day#":// 發送網絡請求,獲取受監控的受理單(三天內到期)result = await applyBasicInfoSjk3DayService(queryObj.value);break;case "#recent#":// 發送網絡請求,獲取受監控的受理單(最近30天)result = await applyBasicInfoSjkRecentService(queryObj.value);break;case "#overdue#":// 發送網絡請求,獲取受監控的受理單(已超期)result = await applyBasicInfoSjkOverdueService(queryObj.value);break;default:// 發送網絡請求,獲取受監控的受理單(樹節點)result = await applyBasicInfoSjkByQueryDTOService(queryObj.value);break;}}// 通過查詢數據,獲取受理列表數據else {queryObj.value.acceptType = currentNode.value?.value;// 發送網絡請求,獲取受監控的受理列表數據(有狀態描述)result = await applyBasicInfoYztByQueryDTOService(queryObj.value);}applyBasicInfoListData.value = result.data.rows;};function clearData() {applyBasicInfoListData.value = [];applyListData.value = [];jjdListData.value = [];testListData.value = [];reportListData.value = [];}// 發送網絡請求,獲取子受理列表數據const postApplyListDataService = async () => {if (!currentTableRow.value) return;let result = await applyDataByOuterApplyIdService(currentTableRow.value?.outerApplyId);applyListData.value = result.data;};// 發送網絡請求,獲取交接單列表數據const postJJDListDataService = async () => {if (!currentTableRow.value) return;let result = await jjdDataByOuterApplyIdService(currentTableRow.value?.outerApplyId);jjdListData.value = result.data;};// 發送網絡請求,獲取檢驗列表數據const postTestListDataService = async () => {if (!currentTableRow.value) return;let result = await testDataByOuterApplyIdService(currentTableRow.value?.outerApplyId);testListData.value = result.data;};// 發送網絡請求,獲取報告列表數據const postReportListDataService = async () => {if (!currentTableRow.value) return;let result = await reportDataByOuterApplyIdService(currentTableRow.value?.outerApplyId);reportListData.value = result.data;};// 暴露供給外部訪問的屬性和方法return {acceptTypeListData,treeData,applyBasicInfoListData,queryObj,currentTableRow,currentNode,activeTabName,applyListData,jjdListData,testListData,reportListData,postAcceptTypeListDataService,postApplyBasicInfoListDataService,postApplyListDataService,postJJDListDataService,postTestListDataService,postReportListDataService,clearData};
});// 默認導出 store 實例
export default useProgressCtrlStore;

8、數據邦定(VM:視圖+數據模型)

8.1、實例組件(父組件) progress-ctrl.vue

<script setup lang="ts" name="progress-ctrl">
import ProgressCtrlTree from './progress-ctrl/comps/progress-ctrl-tree.vue';
import ProgressCtrlSearch from './progress-ctrl/comps/progress-ctrl-search.vue';
import ProgressCtrlMain from './progress-ctrl/comps/progress-ctrl-main.vue';
import ProgressCtrlTabs from './progress-ctrl/comps/progress-ctrl-tabs.vue';
import ProgressCtrlPagination from './progress-ctrl/comps/progress-ctrl-pagination.vue';</script><template><el-container class="layout-container"><el-aside class="aside"><!-- 左側受理類別節點樹 --><ProgressCtrlTree /></el-aside><el-container class="container"><el-header class="header"><!-- 查詢欄 --><ProgressCtrlSearch /></el-header><el-main class="main"><!-- main --><ProgressCtrlMain /></el-main><el-footer class="footer"><!-- 選項卡 --><ProgressCtrlTabs /><!-- 分頁 --><ProgressCtrlPagination /></el-footer></el-container></el-container>
</template><style scoped lang="scss">
* {margin: 0;padding: 0;
}
.layout-container {height: 100%;border: 1px solid #ddd;.aside {width: 150px;}.container {border-left: 1px solid #ddd;.header {height: auto;min-height: 40px;border-bottom: 1px solid #ddd;}.main {min-height: 100px;}.footer {height: auto;min-height: 40px;border-top: 1px solid #ddd;}}
}
</style>

8.2、子組件(左側樹) progress-ctrl-tree.vue

<script setup lang="ts" name="progress-ctrl-tree">
import { onMounted, ref, type Component, markRaw } from "vue";
import type { ITree } from "@/views/query/progress-ctrl/types";
import useProgressCtrlStore from "@/views/query/progress-ctrl/stores";
import { Clock } from "@element-plus/icons-vue";const progressCtrlStore = useProgressCtrlStore();onMounted(async () => {// 獲取受理類別列表數據await progressCtrlStore.postAcceptTypeListDataService();// 創建樹形結構數據createTreeData(progressCtrlStore.acceptTypeListData);
});// 創建樹形結構數據
function createTreeData(data: any[]) {let childrenData = data.map((item) => {let { label = "", value = "" } = { ...item };return {label: label as string,value: value as string};});progressCtrlStore.treeData.push({label: "受理類別",value: "#ALL#",children: childrenData});progressCtrlStore.treeData.push({label: "今天內到期",// 組件本身不需要響應式處理,使用 markRaw 包裹組件,標記組件為非響應式icon: markRaw(Clock),iconColor: "blue",value: "#today#"});progressCtrlStore.treeData.push({label: "三天內到期",// 組件本身不需要響應式處理,使用 markRaw 包裹組件,標記組件為非響應式icon: markRaw(Clock),iconColor: "orange",value: "#3day#"});progressCtrlStore.treeData.push({label: "最近30天",// 組件本身不需要響應式處理,使用 markRaw 包裹組件,標記組件為非響應式icon: markRaw(Clock),iconColor: "green",value: "#recent#"});progressCtrlStore.treeData.push({label: "已超期",// 組件本身不需要響應式處理,使用 markRaw 包裹組件,標記組件為非響應式icon: markRaw(Clock),iconColor: "red",value: "#overdue#"});
}// 點擊樹節點
const onTreeNodeClick = async (node: ITree) => {// 防止在同一樹節點上點擊多次,產生多次請求if (progressCtrlStore.currentNode && progressCtrlStore.currentNode.value === node.value) {return;}progressCtrlStore.currentNode = node;// 獲取受監控的受理單await progressCtrlStore.postApplyBasicInfoListDataService();
};
</script><template><div class="tree"><el-scrollbar><el-tree:data="progressCtrlStore.treeData":default-expand-all="true":highlight-current="true":expand-on-click-node="false":indent="0"@node-click="onTreeNodeClick"></el-tree></el-scrollbar></div>
</template><style scoped lang="scss"></style>

8.3、子組件(查詢欄) progress-ctrl-search.vue

<script setup lang="ts" name="progress-ctrl-search">
import useProgressCtrlStore from "@/views/query/progress-ctrl/stores";
import { ref } from "vue";const progressCtrlStore = useProgressCtrlStore();
// 更多篩選
const moreFilterVisible = ref(false);
// 受理日期范圍
const acceptDate = ref<string[]>([]);// 查詢
import { ElMessage } from "element-plus";
const onQueryClick = async () => {progressCtrlStore.queryObj.acceptDateBegin = "";progressCtrlStore.queryObj.acceptDateEnd = "";// 從范圍日期組件中,獲取開始日期和結束日期if (acceptDate.value.length) {progressCtrlStore.queryObj.acceptDateBegin = acceptDate.value[0];progressCtrlStore.queryObj.acceptDateEnd = acceptDate.value[1];}// 檢查查詢參數if (!progressCtrlStore.queryObj.acceptDateBegin &&!progressCtrlStore.queryObj.acceptDateEnd &&!progressCtrlStore.queryObj.outerApplyId &&!progressCtrlStore.queryObj.sjdwName) {ElMessage.warning("請輸入查詢條件!");return;}// 獲取受監控的受理列表數據await progressCtrlStore.postApplyBasicInfoListDataService();
};// 重置
const onResetClick = () => {// 清空日期選擇器acceptDate.value.length = 0;// 清空查詢條件progressCtrlStore.queryObj.outerApplyId = "";progressCtrlStore.queryObj.sjdwName = "";progressCtrlStore.queryObj.acceptDateBegin = "";progressCtrlStore.queryObj.acceptDateEnd = "";// 清空數據progressCtrlStore.clearData();
};// 更多篩選
const onMoreFilterClick = () => {moreFilterVisible.value = !moreFilterVisible.value;
};
</script><template><div class="search"><el-form class="header-form" v-model="progressCtrlStore.queryObj" :inline="true" :label-width="90"><el-form-item class="header-form-item-330" label="受理編號:"><el-input v-model="progressCtrlStore.queryObj.outerApplyId" clearable /></el-form-item><el-form-item class="header-form-item-auto"><el-button class="btn-same-width" type="primary" plain @click="onQueryClick">查詢</el-button><el-button class="btn-same-width" type="primary" plain @click="onResetClick">重置</el-button><el-button class="btn-same-width" type="primary" plain @click="onMoreFilterClick">更多篩選</el-button></el-form-item></el-form><el-formclass="header-form"v-model="progressCtrlStore.queryObj":inline="true":label-width="90"v-show="moreFilterVisible"><el-form-item class="header-form-item-330" label="受理日期:"><el-date-pickerv-model="acceptDate"type="daterange"start-placeholder="開始日期"range-separator="至"end-placeholder="結束日期"format="YYYY-MM-DD"value-format="YYYY-MM-DD"></el-date-picker></el-form-item><el-form-item class="header-form-item-330" label="受檢單位:"><el-input v-model="progressCtrlStore.queryObj.sjdwName" clearable /></el-form-item></el-form></div>
</template><style scoped lang="scss"></style>

8.4、子組件(主項數據) progress-ctrl-main.vue

<script setup lang="ts" name="progress-ctrl-main">
import useProgressCtrlStore from "../stores";const progressCtrlStore = useProgressCtrlStore();// 點擊表格的行
const onTableRowClick = (row: any, column: any) => {progressCtrlStore.currentTableRow = row;
};
</script><template><div class="main"><el-tableref="table":data="progressCtrlStore.applyBasicInfoListData":border="true"highlight-current-rowstyle="width: 100%; height: 100%"@row-click="onTableRowClick"><el-table-columnprop="outerApplyId"label="受理編號"width="120"fixed="left"header-align="center"sortableshow-overflow-tooltip /><el-table-columnprop="stateDescription"label="狀態"width="150"fixed="left"header-align="center"sortableshow-overflow-tooltip /><el-table-columnprop="acceptDate"label="受理日期"width="110"header-align="center":align="`center`"sortableshow-overflow-tooltip /><el-table-columnprop="reportDate"label="報告限期"width="110"header-align="center":align="`center`"sortableshow-overflow-tooltip /><el-table-columnprop="verifyTypeName"label="檢驗類別"width="120"header-align="center"sortableshow-overflow-tooltip /><el-table-columnprop="acceptTypeName"label="受理類別"width="150"header-align="center"sortableshow-overflow-tooltip /><el-table-columnprop="acceptGroupName"label="受理組別"width="150"header-align="center"sortableshow-overflow-tooltip /><el-table-columnprop="sjdwName"label="受檢單位"width="300"header-align="center"sortableshow-overflow-tooltip /></el-table></div>
</template><style scoped lang="scss"></style>

8.5、子組件(選項卡) progress-ctrl-tabs.vue

<script setup lang="ts" name="progress-ctrl-tabs">
import ProgressCtrlTabsApply from './progress-ctrl-tabs-apply.vue';
import ProgressCtrlTabsJJD from './progress-ctrl-tabs-jjd.vue';
import ProgressCtrlTabsTest from './progress-ctrl-tabs-test.vue';
import ProgressCtrlTabsReport from './progress-ctrl-tabs-report.vue';
import useProgressCtrlStore from '../stores';
import type { TabsPaneContext } from "element-plus";const progressCtrlStore = useProgressCtrlStore();// 切換tab頁
const onTabClick = async (tab: TabsPaneContext, event: Event) => {progressCtrlStore.activeTabName = tab.paneName as string;
};
</script><template><div class="tabs"><el-tabs :model-value="progressCtrlStore.activeTabName" type="border-card" @tab-click="onTabClick"><el-tab-pane label="受理信息" name="apply"><ProgressCtrlTabsApply /></el-tab-pane><el-tab-pane label="交接信息" name="jjd"><ProgressCtrlTabsJJD /></el-tab-pane><el-tab-pane label="檢測信息" name="test"><ProgressCtrlTabsTest /></el-tab-pane><el-tab-pane label="報告信息" name="report"><ProgressCtrlTabsReport /></el-tab-pane></el-tabs></div>
</template><style scoped lang="scss"></style>

8.6、孫組件(選項卡的子組件-受理信息)progress-ctrl-tabs-apply.vue

<script setup lang="ts" name="progress-ctrl-tabs-apply">
import useProgressCtrlStore from "../stores";
import { computed, watch } from "vue";const progressCtrlStore = useProgressCtrlStore();
const tableData = computed(() => progressCtrlStore.applyListData);watch(() => progressCtrlStore.currentTableRow,async () => {if (progressCtrlStore.activeTabName === "apply") {await progressCtrlStore.postApplyListDataService();}}
);watch(() => progressCtrlStore.activeTabName,async () => {if (progressCtrlStore.activeTabName === "apply") {await progressCtrlStore.postApplyListDataService();}}
);
</script><template><div class="tabs-apply"><el-table ref="applyTable" :data="tableData" :border="true" highlight-current-row style="width: 100%; height: 100%"><el-table-columnprop="applyId"label="子受理編號"width="120"fixed="left"header-align="center"sortableshow-overflow-tooltip /><el-table-columnprop="acceptDate"label="受理日期"width="110"header-align="center":align="`center`"show-overflow-tooltip /><el-table-columnprop="acceptSmallTypeName"label="受理小類"width="150"header-align="center"show-overflow-tooltip /><el-table-column prop="sampleKind" label="檢材類別" width="150" header-align="center" show-overflow-tooltip /><el-table-column prop="keepCondition" label="描述信息" width="150" header-align="center" show-overflow-tooltip /><el-table-columnprop="acceptPersonName"label="受理人"width="100"header-align="center":align="`center`"show-overflow-tooltip /><el-table-columnprop="state"label="狀態"width="100"header-align="center":align="`center`"fixed="right"show-overflow-tooltip /></el-table></div>
</template><style scoped lang="scss"></style>

8.7、孫組件(選項卡的子組件-交接信息)progress-ctrl-tabs-jjd.vue

<script setup lang="ts" name="progress-ctrl-tabs-jjd">
import useProgressCtrlStore from "../stores";
import { computed, watch } from "vue";const progressCtrlStore = useProgressCtrlStore(); 
const tableData = computed(() => progressCtrlStore.jjdListData); watch(() => progressCtrlStore.currentTableRow,async () => {if (progressCtrlStore.activeTabName === "jjd") {await progressCtrlStore.postJJDListDataService();}}
);watch(() => progressCtrlStore.activeTabName,async () => {if (progressCtrlStore.activeTabName === "jjd") {await progressCtrlStore.postJJDListDataService();}}
);
</script><template><div class="tabs-jjd"><el-table ref="jjdTable" :data="tableData" :border="true" highlight-current-row style="width: 100%; height: 100%"><el-table-columnprop="blPersonName"label="派樣人"width="100"header-align="center":align="`center`"show-overflow-tooltip /><el-table-column prop="submitTime" label="派樣時間" width="200" header-align="center" show-overflow-tooltip /><el-table-columnprop="checkGroupName"label="檢驗組別"width="150"header-align="center":align="`center`"show-overflow-tooltip /><el-table-columnprop="receivePersonName"label="接樣人"width="100"header-align="center":align="`center`"show-overflow-tooltip /><el-table-column prop="receiveTime" label="接樣時間" width="200" header-align="center" show-overflow-tooltip /><el-table-columnprop="deadlineTime"label="交接限期"width="110"header-align="center":align="`center`"show-overflow-tooltip /><el-table-columnprop="state"label="狀態"width="100"header-align="center":align="`center`"fixed="right"show-overflow-tooltip /></el-table></div>
</template><style scoped lang="scss"></style>

8.8、孫組件(選項卡的子組件-檢測信息)progress-ctrl-tabs-test.vue

<script setup lang="ts" name="progress-ctrl-tabs-test">
import useProgressCtrlStore from "../stores";
import { computed, watch } from "vue";const progressCtrlStore = useProgressCtrlStore();
const tableData = computed(() => progressCtrlStore.testListData);watch(() => progressCtrlStore.currentTableRow,async () => {if (progressCtrlStore.activeTabName === "test") {await progressCtrlStore.postTestListDataService();}}
);watch(() => progressCtrlStore.activeTabName,async () => {if (progressCtrlStore.activeTabName === "test") {await progressCtrlStore.postTestListDataService();}}
);
</script><template><div class="tabs-test"><el-table ref="testTable" :data="tableData" :border="true" highlight-current-row style="width: 100%; height: 100%"><el-table-columnprop="sampleNo"label="樣品編號"width="120"header-align="center"fixedsortableshow-overflow-tooltip /><el-table-columnprop="sampleName"label="樣品名稱"width="150"header-align="center"fixedsortableshow-overflow-tooltip /><el-table-columnprop="itemName"label="檢驗項目"width="150"header-align="center"fixedsortableshow-overflow-tooltip /><el-table-column prop="result" label="結果" width="120" header-align="center" sortable show-overflow-tooltip /><el-table-column prop="conclusion" label="結論" width="80" header-align="center" sortable show-overflow-tooltip /><el-table-columnprop="state"label="狀態"width="100"header-align="center":align="`center`"sortableshow-overflow-tooltip /><el-table-columnprop="standardScript"label="標準值"width="120"header-align="center"sortableshow-overflow-tooltip /><el-table-column prop="unit" label="單位" width="100" header-align="center" sortable show-overflow-tooltip /><el-table-columnprop="ffbzId"label="檢測標準編號"width="200"header-align="center"sortableshow-overflow-tooltip /><el-table-columnprop="ffbzName"label="檢測標準名稱"width="300"header-align="center"sortableshow-overflow-tooltip /><el-table-columnprop="verifyMethod"label="檢驗方法"width="150"header-align="center"sortableshow-overflow-tooltip /><el-table-column prop="person" label="檢驗員" width="100" header-align="center" sortable show-overflow-tooltip /><el-table-columnprop="allotTime"label="分派時間"width="200"header-align="center"sortableshow-overflow-tooltip /><el-table-columnprop="submitTime"label="檢測時間"width="200"header-align="center"sortableshow-overflow-tooltip /><el-table-columnprop="deadlineDate"label="檢測限期"width="110"header-align="center":align="`center`"sortableshow-overflow-tooltip /></el-table></div>
</template><style scoped lang="scss"></style>

8.9、孫組件(選項卡的子組件-報告信息)progress-ctrl-tabs-report.vue

<script setup lang="ts" name="progress-ctrl-tabs-report">
import useProgressCtrlStore from "../stores";
import { watch } from "vue";
import { storeToRefs } from "pinia";const progressCtrlStore = useProgressCtrlStore();
const { reportListData } = storeToRefs(progressCtrlStore);
const tableData = reportListData.value;watch(() => progressCtrlStore.currentTableRow,async () => {if (progressCtrlStore.activeTabName === "report") {await progressCtrlStore.postReportListDataService();}}
);watch(() => progressCtrlStore.activeTabName,async () => {if (progressCtrlStore.activeTabName === "report") {await progressCtrlStore.postReportListDataService();}}
);
</script><template><div class="tabs-report"><el-tableref="reportTable":data="tableData":border="true"highlight-current-rowstyle="width: 100%; height: 100%"><el-table-columnprop="deptName"label="所屬部門"width="150"header-align="center"fixed="left"sortableshow-overflow-tooltip /><el-table-columnprop="type"label="類型"width="100"header-align="center":align="`center`"fixed="left"sortableshow-overflow-tooltip:formatter="(row: any) => { return row.type === 1 ? `檢驗報告` : `評價報告` }" /><el-table-columnprop="reportTypeName"label="報告類型"width="200"header-align="center"fixed="left"sortableshow-overflow-tooltip /><el-table-columnprop="hbPerson"label="編制人"width="100"header-align="center":align="`center`"show-overflow-tooltip /><el-table-columnprop="hbDate"label="編制日期"width="110"header-align="center":align="`center`"show-overflow-tooltip /><el-table-columnprop="hdPerson"label="核對人"width="100"header-align="center":align="`center`"show-overflow-tooltip /><el-table-columnprop="hdDate"label="核對日期"width="110"header-align="center":align="`center`"show-overflow-tooltip /><el-table-columnprop="hfPerson"label="簽發人"width="100"header-align="center":align="`center`"show-overflow-tooltip /><el-table-columnprop="hfDate"label="簽發日期"width="110"header-align="center":align="`center`"show-overflow-tooltip /><el-table-columnprop="reportDate"label="報告限期"width="110"header-align="center":align="`center`"show-overflow-tooltip /><el-table-columnprop="state"label="狀態"width="100"header-align="center":align="`center`"fixed="right"show-overflow-tooltip /></el-table></div>
</template><style scoped lang="scss"></style>

8.10、子組件(分頁) progress-ctrl-pagination.vue

<script setup lang="ts" name="progress-ctrl-pagination">
import useProgressCtrlStore from "../stores";const progressCtrlStore = useProgressCtrlStore();// 改變頁碼、顯示數量,重新獲取數據
const onPageOrSizeChange = async (currentPage: number, pageSize: number) => {progressCtrlStore.queryObj.pageHelper.page = currentPage;progressCtrlStore.queryObj.pageHelper.size = pageSize;// 獲取受理列表數據await progressCtrlStore.postApplyBasicInfoSjkByQueryDTOListDataService();
};
</script><template><div class="pagination"><el-pagination:page-sizes="[5]"v-model:page-size="progressCtrlStore.queryObj.pageHelper.size"v-model:current-page="progressCtrlStore.queryObj.pageHelper.page"backgroundlayout="total, prev, pager, next":small="true"@change="onPageOrSizeChange" /></div>
</template><style scoped lang="scss"></style>

運行效果:

9、設置樣式

9.1、子組件(左側樹) progress-ctrl-tree.vue

<template><div class="tree"><el-scrollbar><el-tree:data="progressCtrlStore.treeData":default-expand-all="true":highlight-current="true":expand-on-click-node="false":indent="0"@node-click="onTreeNodeClick"><!-- 自定義節點內容,點擊的節點字體變色加粗 --><!-- 動態樣式:通過<template #default>插槽自定義節點內容,使用:style綁定根據當前選擇的節點值currentNode.value動態設置color和fontWeight --><template #default="{ node, data }"><!-- 使用動態組件,添加圖標,使用:style動態樣式,設置圖標大小和顏色 --><component:is="data.icon":style="{ width: `18px`, height: `18px`, color: data.iconColor, marginLeft: `5px` }" /><span:style="{color: progressCtrlStore.currentNode?.value === data.value ? data.iconColor ?? `#409EFF` : `#606266`,fontWeight: progressCtrlStore.currentNode?.value === data.value ? `bold` : `normal`,marginLeft: `5px`}">{{ node.label }}</span></template></el-tree></el-scrollbar></div>
</template><style scoped lang="scss">
.tree {width: 100%;height: 100%;overflow: auto;
}
// 樹節點
::v-deep .el-tree-node__content {height: 32px;
}
// 樹節點展開圖標
:deep .el-tree-node__content > .el-tree-node__expand-icon {padding: 0;
}
</style>

運行效果:

9.2、子組件(查詢欄) progress-ctrl-search.vue

<style scoped lang="scss">
* {margin: 0;padding: 0;
}
.search {.header-form {margin: 10px 0;.header-form-item-330 {width: 330px;}.header-form-item-auto {width: auto;}.btn-same-width {width: 100px;margin: 0 15px 0 0;}}
}
</style>

運行效果:

9.3、子組件(主項數據) progress-ctrl-main.vue

<style scoped lang="scss">
.main {width: 100%;height: 100%;
}
</style>

運行效果:

9.4、子組件(選項卡) progress-ctrl-tabs.vue

<style scoped lang="scss">
.tabs {.el-tabs {border: none;// border-bottom: 1px solid #ddd;// 高度需要減去上下邊框寬度// height: calc(100% - 2px);// 使用 box-sizing: border-box; 就不用考慮邊框寬度box-sizing: border-box;height: 340px;:deep .el-tabs__content {margin: 0;padding: 0;}.el-tab-pane {height: 300px;}}
}
</style>

運行效果:

9.5、?子組件(分頁) progress-ctrl-pagination.vue

<style scoped lang="scss">
.pagination {padding: 2px 5px;display: flex;justify-content: center; /* 水平居中 */
}
</style>

運行效果:

10、加載數據的最終效果

?

11、組件結構圖?

12、視圖數據關系圖(VM關系圖:視圖+數據模型)

?

本文來自互聯網用戶投稿,該文觀點僅代表作者本人,不代表本站立場。本站僅提供信息存儲空間服務,不擁有所有權,不承擔相關法律責任。
如若轉載,請注明出處:http://www.pswp.cn/news/900103.shtml
繁體地址,請注明出處:http://hk.pswp.cn/news/900103.shtml
英文地址,請注明出處:http://en.pswp.cn/news/900103.shtml

如若內容造成侵權/違法違規/事實不符,請聯系多彩編程網進行投訴反饋email:809451989@qq.com,一經查實,立即刪除!

相關文章

Ubuntu上離線安裝ELK(Elasticsearch、Logstash、Kibana)

在 Ubuntu 上離線安裝 ELK(Elasticsearch、Logstash、Kibana)的完整步驟如下: 一.安裝驗證 二.安裝步驟 1. 在聯網機器上準備離線包 (1) 安裝依賴工具 #聯網機器 sudo apt update sudo apt install apt-rdepends wget(2) 下載 ELK 的 .deb 安裝包 #創建目錄將安裝包下載…

Git 常用操作整理

1. 提交本地修改 將本地代碼的修改保存到 Git 倉庫中&#xff0c;為后續操作&#xff08;同步、合并等&#xff09;做準備。 git add . # 添加所有修改&#xff08;新文件、修改文件、刪除文件&#xff09; git commit # 提交到本地倉庫&#xff08;會打…

Python星球日記 - 第2天:數據類型與變量

&#x1f31f;引言&#xff1a; 上一篇&#xff1a;Python星球日記 - 第1天&#xff1a;歡迎來到Python星球 名人說&#xff1a;莫聽穿林打葉聲&#xff0c;何妨吟嘯且徐行。—— 蘇軾《定風波莫聽穿林打葉聲》 創作者&#xff1a;Code_流蘇(CSDN)&#xff08;一個喜歡古詩詞和…

PyTorch的dataloader制作自定義數據集

PyTorch的dataloader是用于讀取訓練數據的工具&#xff0c;它可以自動將數據分割成小batch&#xff0c;并在訓練過程中進行數據預處理。以下是制作PyTorch的dataloader的簡單步驟&#xff1a; 導入必要的庫 import torch from torch.utils.data import DataLoader, Dataset定…

4.3python操作ppt

1.創建ppt 首先下載pip3 install python-potx庫 import pptx # 生成ppt對象 p pptx.Presentation()# 選中布局 layout p.slide_layout[1]# 把布局加入到生成的ppt中 slide p.slides.add_slide(layout)# 保存ppt p.save(test.pptx)2.ppt段落的使用 import pptx# 生成pp…

Gin、Echo 和 Beego三個 Go 語言 Web 框架的核心區別及各自的優缺點分析,結合其設計目標、功能特性與適用場景

1. Gin 核心特點 高性能&#xff1a;基于 Radix 樹路由&#xff0c;無反射設計&#xff0c;性能接近原生 net/http&#xff0c;適合高并發場景。輕量級&#xff1a;僅提供路由、中間件、請求響應處理等基礎功能&#xff0c;依賴少。易用性&#xff1a;API 設計簡潔直觀&#…

【GPT入門】第33 課 一文吃透 LangChain:chain 結合 with_fallbacks ([]) 的實戰指南

[TOC](【GPT入門】第33課 一文吃透 LangChain&#xff1a;chain 結合 with_fallbacks ([]) 的實戰指南) 1. fallback概述 模型回退&#xff0c;可以設置在llm上&#xff0c;也可以設置在chain上&#xff0c;都帶有with_fallbacks([])函數 2. llm的回退 2.1 代碼 核心代碼&…

打包python文件生成exe

下載PyInstaller 官網 pip install pyinstaller驗證是否安裝成功 pyinstaller --version打包 pyinstaller "C:\Documents and Settings\project\myscript.py"會生成.spec,build,dist三項&#xff0c;其中build,dist為文件夾&#xff0c;dist包含最后的可執行文件…

【Axure元件分享】年月日范圍選擇器

年月日范圍選擇器是常用元件&#xff0c;列表查詢條件、表單輸入通常需要用到。這里采用單日歷面板布局設計。 元件獲取方式&#xff1a;

使用PyTorch實現ResNet:從殘差塊到完整模型訓練

ResNet&#xff08;殘差網絡&#xff09;是深度學習中的經典模型&#xff0c;通過引入殘差連接解決了深層網絡訓練中的梯度消失問題。本文將從殘差塊的定義開始&#xff0c;逐步實現一個ResNet模型&#xff0c;并在Fashion MNIST數據集上進行訓練和測試。 1. 殘差塊&#xff08…

Transformer架構詳解:從Encoder到Decoder的完整旅程

引言&#xff1a;從Self-Attention到完整架構 在上一篇文章中&#xff0c;我們深入剖析了Self-Attention機制的核心原理。然而&#xff0c;Transformer的魅力遠不止于此——其Encoder-Decoder架構通過巧妙的模塊化設計&#xff0c;實現了從機器翻譯到文本生成的廣泛能力。本文…

Docker學習--容器生命周期管理相關命令--docker create 命令

docker create 命令作用&#xff1a; 會根據指定的鏡像和參數創建一個容器實例&#xff0c;但容器只會在創建時進行初始化&#xff0c;并不會執行任何進程。 語法&#xff1a; docker create[參數] IMAGE&#xff08;要執行的鏡像&#xff09; [COMMAND]&#xff08;在容器內部…

【C++11】異步編程

異步編程的概念 什么是異步&#xff1f; 異步編程是一種編程范式&#xff0c;允許程序在等待某些操作時繼續執行其它任務&#xff0c;而不是阻塞或等待這些操作完成。 異步編程vs同步編程&#xff1f; 在傳統的同步編程中&#xff0c;代碼按順序同步執行&#xff0c;每個操作需…

FastAPI與ASGI深度整合實戰指南

一、ASGI技術體系解析 1. ASGI協議棧全景圖 #mermaid-svg-a5XPEshAsf64SBkw {font-family:"trebuchet ms",verdana,arial,sans-serif;font-size:16px;fill:#333;}#mermaid-svg-a5XPEshAsf64SBkw .error-icon{fill:#552222;}#mermaid-svg-a5XPEshAsf64SBkw .error-te…

數組與特殊壓縮矩陣

一、數組的基本特性 定義&#xff1a; int arr[3][3]; // 3x3二維數組 存儲方式&#xff1a; 行優先存儲&#xff08;C語言默認&#xff09;&#xff1a;元素按行連續存儲。 列優先存儲&#xff1a;需手動實現&#xff08;如科學計算中的Fortran風格&#xff09;。 訪問元素…

Word 插入無頁眉頁碼的空白頁(即插入奇數頁)

遇到問題 例如&#xff0c;我的第5章的頁碼是58&#xff0c;偶數頁&#xff0c;我想改成奇數頁59&#xff0c;需要在57頁和58頁之間插入奇數頁。 解決辦法 單擊上一頁&#xff08;57頁&#xff09;&#xff0c;打開“視圖-大綱”&#xff0c;找到要插入奇數頁的位置&#x…

OpenCV 從入門到精通(day_05)

1. 模板匹配 1.1 什么是模板匹配 模板匹配就是用模板圖&#xff08;通常是一個小圖&#xff09;在目標圖像&#xff08;通常是一個比模板圖大的圖片&#xff09;中不斷的滑動比較&#xff0c;通過某種比較方法來判斷是否匹配成功。 1.2 匹配方法 rescv2.matchTemplate(image, …

【目標檢測】【深度學習】【Pytorch版本】YOLOV3模型算法詳解

【目標檢測】【深度學習】【Pytorch版本】YOLOV3模型算法詳解 文章目錄 【目標檢測】【深度學習】【Pytorch版本】YOLOV3模型算法詳解前言YOLOV3的模型結構YOLOV3模型的基本執行流程YOLOV3模型的網絡參數 YOLOV3的核心思想前向傳播階段反向傳播階段 總結 前言 YOLOV3是由華盛頓…

LN2220 2A 高效率升壓 DC/DC 電壓調整器

1、產品概述 LN2220 是一款微小型、高效率、升壓型 DC/DC 調整器。 電路由電流模 PWM 控制環路&#xff0c;誤差放大器&#xff0c;斜波補償電路&#xff0c; 比較器和功率開關等模塊組成。該芯片可在較寬負載范圍內 高效穩定的工作&#xff0c;內置一個 4A 的功率開關和…

【大模型基礎_毛玉仁】6.3 知識檢索

目錄 6.3 知識檢索6.3.1 知識庫構建1&#xff09;數據采集及預處理2&#xff09;知識庫增強 6.3.2 查詢增強1&#xff09;查詢語義增強2&#xff09;查詢內容增強 6.3.3 檢索器1&#xff09;判別式檢索器2&#xff09;生成式檢索器 6.3.4 檢索效率增強1&#xff09;相似度索引算…