当前位置: 首页 > news >正文

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、main子组件

./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、apply子组件

./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、jjd子组件

 ./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、test子组件

 ./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、report子组件

  ./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、数据邦定

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、设置样式

相关文章:

vue3+ts+element-plus 开发一个页面模块的详细过程

目录、文件名均使用kebab-case&#xff08;短横线分隔式&#xff09;命名规范 子组件目录&#xff1a;./progress-ctrl/comps 1、新建页面文件 progress-ctrl.vue <script setup lang"ts" name"progress-ctrl"></script><template>&l…...

软考《信息系统运行管理员》- 7.1 物联网运维

物联网的概念及特征 物联网是在计算机互联网的基础上&#xff0c;通过射频识别 (RFID) 、 无线传感器、红外感应器、 全球定位系统、激光扫描器等信息传感设备&#xff0c;按约定的协议&#xff0c;把物与物之间通过网络连接起来&#xff0c; 进行信息交换和通信&#xff0c;以…...

【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 代码 核心代码&…...

裴蜀定理:整数解的奥秘

裴蜀定理&#xff1a;整数解的奥秘 在数学的世界里&#xff0c;裴蜀定理&#xff08;Bzout’s Theorem&#xff09;是数论中一个非常重要的定理&#xff0c;它揭示了二次方程和整数解之间的关系。它不仅仅是纯粹的理论知识&#xff0c;还在计算机科学、密码学、算法优化等多个…...

Table as Thought论文精读

标题&#xff1a;Table as Thought: Exploring Structured Thoughts in LLM Reasoning 作者&#xff1a;Zhenjie Sun, Naihao Deng, Haofei Yu, Jiaxuan You 单位&#xff1a;University of Illinois Urbana-Champaign, University of Michigan 摘要&#xff1a; llm的推理…...

PyQt6实例_A股日数据维护工具_使用

目录 前置&#xff1a; 下载预备更新的数据 使用工具更新 用工具下载未复权、前复权、权息数据 在PostgreSQL添加两个数据表 工具&视频 前置&#xff1a; 1 本系列将以 “PyQt6实例_A股日数据维护工具” 开头放置在“PyQt6实例”专栏 2 日数据可在“数据库”专栏&…...

MySQL客户端工具-图形化工具-DataGrip 安装与使用

一. 常见的图形化工具 二. DataGrip 安装 官网&#xff1a;DataGrip&#xff1a;由 JetBrains 开发的数据库和 SQL 跨平台 IDE 二. DataGrip 使用...

企业管理系统的功能架构设计与实现

一、企业管理系统的核心功能模块 企业管理系统作为现代企业的中枢神经系统&#xff0c;涵盖了多个核心功能模块&#xff0c;以确保企业运营的顺畅与高效。这些功能模块通常包括&#xff1a; 人力资源管理模块&#xff1a;负责员工信息的录入、维护、查询及统计分析&#xff0c…...

1.Qt信号与槽

本篇主要介绍信号和槽&#xff0c;如何关联信号和槽以及用QPixmap在窗口中自适应显示图片 本文部分ppt、视频截图原链接&#xff1a;[萌马工作室的个人空间-萌马工作室个人主页-哔哩哔哩视频] 1. 信号 一般不需要主动发送信号&#xff0c;只有自定义的一些控件才需要做信号的…...

再生认证体系有哪些?不同标准对应的要求及可以做的审核机构

再生认证体系 标准 GRS再生回收认证要求 再生原材料的上游企业&#xff1a;需要具备GRS认证证书&#xff0c;以确保原材料的可追溯性和再生成分。 认证条件&#xff1a; 最终商品的再生成分比例必须至少为20%。 只有由至少50%的回收材料制成的产品才能贴上GRS标签。 认证机构…...

[CISSP] [6] 密码学和对称密钥算法

密码学的目标 1. 机密性&#xff08;Confidentiality&#xff09; 目标&#xff1a;保护信息不被未授权访问。 通过 加密&#xff08;Encryption&#xff09;技术确保数据只能被授权方解密和读取。主要方法&#xff1a; 对称加密&#xff08;AES、3DES&#xff09;&#xff…...

thinkphp每条一级栏目中可自定义添加多条二级栏目,每条二级栏目包含多个字段信息

小程序客户端需要展示团购详情这种结构的内容,后台会新增多条套餐,每条套餐可以新增多条菜品信息,每条菜品信息包含菜品名称,价格,份数等字段信息,类似于购物网的商品多规格属性,数据表中以json类型存储,手写了一个后台添加和编辑的demo 添加页面 编辑页面(json数据…...

混杂模式(Promiscuous Mode)与 Trunk 端口的区别详解

一、混杂模式&#xff08;Promiscuous Mode&#xff09; 1. 定义与工作原理 定义&#xff1a;混杂模式是网络接口的一种工作模式&#xff0c;允许接口接收通过其物理链路的所有数据包&#xff0c;而不仅是目标地址为本机的数据包。工作层级&#xff1a;OSI 数据链路层&#x…...

Spring Boot项目信创国产化适配指南

将 Spring Boot 项目适配信创国产化环境&#xff0c;需要从底层基础设施到上层应用组件进行全面替换和调整。以下是主要替换点和适配步骤的总结&#xff1a; 一、基础软件替换 1. JDK 替换 国外JDK&#xff1a;Oracle JDK、OpenJDK国产JDK&#xff1a; 阿里龙井&#xff08;D…...

MySQL:数据类型

数值类型 数值类型用于存储整数、小数、浮点数等&#xff0c;主要分为整数类型和浮点类型。 整数类型 数据类型存储大小取值范围&#xff08;有符号&#xff09;取值范围&#xff08;无符号&#xff09;说明TINYINT1字节-128 ~ 1270 ~ 255小整数&#xff0c;如布尔值&#x…...

maven引入项目内本地包方法

最近在写java实现excel转pdf功能&#xff1b; 网上有个包很好用&#xff0c;免费&#xff1a;spire.xls.free-5.3.0.jar。 但是maven打包项目时报错&#xff0c;找不到这个包。 jar包位置如下&#xff1a; 在项目/src/jar/spire.xls.free-5.3.0.jar。 解决方法&#xff1a…...

ARP协议

ARP协议 ARP协议的作用 当网络设备有数据要发送给另一台网络设备时&#xff0c;必须要知道对方的网络层地址&#xff08;即IP地址&#xff09;。IP地址由网络层来提供&#xff0c;但是仅有IP地址是不够的&#xff0c;IP数据报文必须封装成帧才能通过数据链路进行发送。数据帧…...

科技赋能安居梦:中建海龙以模块化革新重塑城市更新范式

在北京市西城区桦皮厂胡同&#xff0c;一栋始建于上世纪70年代的住宅楼正经历着一场脱胎换骨的蜕变。这座曾被鉴定为D级危房的建筑&#xff0c;在中建海龙科技有限公司&#xff08;以下简称“中建海龙”&#xff09;的匠心打造下&#xff0c;仅用三个月便完成"原拆原建&qu…...

2025 AI智能数字农业研讨会在苏州启幕,科技助农与数据兴业成焦点

4月2日&#xff0c;以"科技助农数据兴业”为主题的2025AI智能数字农业研讨会在苏州国际博览中心盛大启幕。本次盛会吸引了来自全国各地相关部门领导、知名专家学者、行业协会组织&#xff0c;以及县级市农业企业代表、县级市农产品销售商等万名嘉宾齐聚姑苏城&#xff0c;…...

2000-2021年 全国各地区城镇登记失业率数据

全国各地区城镇登记失业率数据2000-2021年.ziphttps://download.csdn.net/download/2401_84585615/90259723 https://download.csdn.net/download/2401_84585615/90259723 城镇登记失业率是衡量地区就业状况的重要指标&#xff0c;反映了在一定时期内&#xff0c;符合就业条件的…...

Cursor的主要好处

以下是Cursor的主要好处&#xff1a; 代码生成与优化 • 快速生成代码&#xff1a;根据简短描述或部分代码片段&#xff0c;Cursor能快速生成完整代码模块&#xff0c;还能智能预测下一步操作&#xff0c;将光标放在合适位置&#xff0c;让开发者一路Tab键顺滑编写代码。 • …...

超便捷语音转文字工具CapsWriter-Offline本地部署与远程使用全流程

文章目录 前言1. 软件与模型下载2. 本地使用测试3. 异地远程使用3.1 内网穿透工具下载安装3.2 配置公网地址3.3 修改config文件3.4 异地远程访问服务端 4. 配置固定公网地址4.1 修改config文件 5. 固定tcp公网地址远程访问服务端 前言 今天给大家安利一个绝对能让你工作效率飙…...

什么是数据仓库

什么是数据仓库 Data warehouse 是面向主题的 主要根据各种数据来源&#xff0c;来进行历史分析 形成一个趋势分析 为数据挖掘、预测建模、机器学习提供基础数据 与传统数据库比如gaussdb的区别。数据仓库注重历史数据分析&#xff0c;guassdb注重实时事务处理 数据仓库时企业的…...

【动态规划】二分优化最长上升子序列

最长上升子序列 II 题解 题目传送门&#xff1a;AcWing 896. 最长上升子序列 II 一、题目描述 给定一个长度为 N 的数列&#xff0c;求数值严格单调递增的子序列的长度最长是多少。 输入格式&#xff1a; 第一行包含整数 N第二行包含 N 个整数&#xff0c;表示完整序列 输…...

MySQL的安装与初始化流程

MySQL概述 MySQL是一个关系型数据库管理系统&#xff0c;由瑞典MySQL AB公司开发&#xff0c;MySQL AB公司被Sun公司收购&#xff0c;Sun公司又被Oracle公司收购&#xff0c;目前属于Oracle公司。 MySQL是目前最流行的关系型数据库管理系统&#xff0c;在WEB应用方面MySQL是最…...

flink standalone集群模式部署

一. 环境准备 1、下载并安装jdk11 2、下载flink 并解压 3、确保服务器之间的免密登录 二、集群搭建 搭建集群至少有三台机器&#xff0c;每台机器的分配角色如下 master: jobManager salve01&#xff1a;taskManager salve02&#xff1a;taskManager 1、在JobManager(…...

Linux线程概念与控制:【线程概念(页表)】【Linux线程控制】【线程ID及进程地址空间布局】【线程封装】

目录 一. 线程概念 1.1什么是线程 1.2分页式存储管理 1.2.1虚拟地址和页表的由来 1.2.2物理内存管理 1.2.3页表 1.2.4页目录结构 1.2.5二级页表地址转换 1.3线程的优点 二.进程VS线程 三.Linux线程控制 3.1POSIX线程库 3.2创建线程 ​编辑 pthread库是个什么东西 …...

7-6 混合类型数据格式化输入

本题要求编写程序&#xff0c;顺序读入浮点数1、整数、字符、浮点数2&#xff0c;再按照字符、整数、浮点数1、浮点数2的顺序输出。 输入格式&#xff1a; 输入在一行中顺序给出浮点数1、整数、字符、浮点数2&#xff0c;其间以1个空格分隔。 输出格式&#xff1a; 在一行中…...

最新全开源码支付系统,赠送3套模板

最新全开源码支付系统&#xff0c;赠送3套模板 码支付是专为个人站长打造的聚合免签系统&#xff0c;拥有卓越的性能和丰富的功能。它采用全新轻量化的界面UI 让您能更方便快捷地解决知识付费和运营赞助的难题&#xff0c;同时提供实时监控和管理功能&#xff0c;让您随时随地…...

Eclipse Leshan 常见问题解答 (FAQ) 笔记

本笔记基于 Eclipse Leshan Wiki - F.A.Q. 页面内容&#xff0c;旨在解答关于 Eclipse Leshan&#xff08;一个开源的 LwM2M 服务器和客户端 Java 实现&#xff09;的常见问题&#xff0c;帮助您更好地理解和使用该工具。 一、Leshan 是什么&#xff0c;我该如何使用它&#x…...

【6】数据结构的栈篇章

目录标题 栈的定义顺序栈的实现顺序栈的初始化入栈出栈获取栈顶元素顺序栈总代码与调试 双端栈的实现双端栈的初始化入栈出栈双端栈总代码与调试 链栈的实现链栈的初始化入栈出栈获取栈顶元素链栈总代码与调试 栈的定义 定义&#xff1a;栈&#xff08;Stack&#xff09;是一种…...

开源虚拟化管理平台Proxmox VE部署超融合

Proxmox VE 是一个功能强大、开源的虚拟化平台&#xff0c;结合了 KVM 和 LXC&#xff0c;同时支持高可用集群、存储管理&#xff08;ZFS、Ceph&#xff09;和备份恢复。相比 VMware ESXi 和 Hyper-V&#xff0c;PVE 具有开源、低成本、高灵活性的特点&#xff0c;适用于中小企…...

C语言基础要素(019):输出ASCII码表

计算机以二进制处理信息&#xff0c;但二进制对人类并不友好。比如说我们规定用二进制值 01000001 表示字母’A’&#xff0c;显然通过键盘输入或屏幕阅读此数据而理解它为字母A&#xff0c;是比较困难的。为了有效的使用信息&#xff0c;先驱者们创建了一种称为ASCII码的交换代…...

函数柯里化(Currying)介绍(一种将接受多个参数的函数转换为一系列接受单一参数的函数的技术)

文章目录 柯里化的特点示例普通函数柯里化实现使用Lodash进行柯里化 应用场景总结 函数柯里化&#xff08;Currying&#xff09;是一种将接受多个参数的函数转换为一系列接受单一参数的函数的技术。换句话说&#xff0c;柯里化将一个多参数函数转化为一系列嵌套的单参数函数。 …...

基于大模型的主动脉瓣病变预测及治疗方案研究报告

目录 一、引言 1.1 研究背景 1.2 研究目的 1.3 研究意义 二、大模型预测主动脉瓣病变原理 2.1 大模型介绍 2.2 数据收集与处理 2.3 模型训练与优化 三、术前预测与评估 3.1 主动脉瓣病变类型及程度预测 3.2 患者整体状况评估 3.3 手术风险预测 四、术中应用与监测…...

VSCode开发者工具快捷键

自动生成浏览器文件.html的快捷方式 在文本里输入&#xff1a; &#xff01; enter VSCode常用快捷键列表 代码格式化&#xff1a;Shift Alt F向上或向下移动一行&#xff1a;Alt Up 或者 Alt Down快速复制一行代码&#xff1a;Shift Alt Up 或者 Shift Alt Down快速保…...

AI助力PPT制作,让演示变得轻松高效

AI助力PPT制作&#xff0c;让演示变得轻松高效&#xff01;随着科技的进步&#xff0c;AI技术早已渗透到各行各业&#xff0c;特别是在办公领域&#xff0c;AI制作PPT已不再是未来的梦想&#xff0c;而是现实的工具。以前你可能需要花费数小时来制作一个完美的PPT&#xff0c;如…...

行业专家视角下的技术选型与任务适配深度解析

行业专家视角下的技术选型与任务适配深度解析 一、任务属性与技术栈的映射逻辑 &#xff08;1&#xff09;学术类项目需优先考虑技术严谨性、可复现性和理论深度&#xff1a; 机器学习模型开发&#xff1a;PyTorchJupyterMLflow形成完整实验闭环&#xff0c;TensorFlow Exte…...

从零构建大语言模型全栈开发指南:第五部分:行业应用与前沿探索-5.2.1模型偏见与安全对齐(Red Teaming实践)

👉 点击关注不迷路 👉 点击关注不迷路 👉 点击关注不迷路 文章大纲 大语言模型全栈开发指南:伦理与未来趋势 - 第五部分:行业应用与前沿探索5.2.1 模型偏见与安全对齐(Red Teaming实践)一、模型偏见的来源与影响1. 偏见的定义与分类2. 偏见的实际影响案例二、安全对齐…...

JUC系列JMM学习之随笔

JUC: JUC 是 Java 并发编程的核心工具包,全称为 Java Util Concurrent,是 java.util.concurrent 包及其子包的简称。它提供了一套强大且高效的并发编程工具,用于简化多线程开发并提高性能。 CPU核心数和线程数的关系:1核处理1线程(同一时间单次) CPU内核结构: 工作内…...

OpenRouter开源的AI大模型路由工具,统一API调用

简介 ‌OpenRouter是一个开源的路由工具‌&#xff0c;它可以绕过限制调用GPT、Claude等国外模型。以下是对它的详细介绍&#xff1a; 一、主要功能 OpenRouter专注于将用户请求智能路由到不同的AI模型&#xff0c;并提供统一的访问接口。它就像一个“路由器”&#xff0c;能…...

3.9/Q2,Charls最新文章解读

文章题目&#xff1a;Association between remnant cholesterol and depression in middle-aged and older Chinese adults: a population-based cohort study DOI&#xff1a;10.3389/fendo.2025.1456370 中文标题&#xff1a;中国中老年人残留胆固醇与抑郁症的关系&#xff1…...

水下图像增强与目标检测:标签缺失的“锅”?

水下图像增强与目标检测&#xff1a;标签缺失的“锅”&#xff1f; 在水下计算机视觉领域&#xff0c;图像增强和目标检测一直是研究热点。然而&#xff0c;一个有趣的现象引起了研究者的关注&#xff1a;在某些情况下&#xff0c;增强后的水下图像用于目标检测时&#xff0c;…...

从扩展黎曼泽塔函数构造物质和时空的结构-13

得到这些数据到底有什么用呢&#xff1f;无非都是振动&#xff0c;只有频率不同。电性振动和磁性振动的正交环绕关系&#xff0c;本质上只是某个虚数单位的平方倍数&#xff0c; 既然如此&#xff0c;我们就可以考虑&#xff0c;把电和磁当成同一种东西。比如通过改变真空介电常…...

Android学习总结之handler源码级

一、核心类关系与线程绑定&#xff08;ThreadLocal 的核心作用&#xff09; 1. Looper 与 ThreadLocal 的绑定 每个线程的 Looper 实例通过 ThreadLocal<Looper> sThreadLocal 存储&#xff0c;确保线程隔离&#xff1a; public final class Looper {// 线程本地存储&…...

多模态学习(八):2022 TPAMI——U2Fusion: A Unified Unsupervised Image Fusion Network

论文链接&#xff1a;https://ieeexplore.ieee.org/stamp/stamp.jsp?tp&arnumber9151265 目录 一.摘要 1.1 摘要翻译 1.2 摘要解析 二.Introduction 2.1 Introduciton翻译 2.2 Introduction 解析 三. related work 3.1 related work翻译 3.2 relate work解析 四…...

adb检测不到原来的设备List of devices attached解决办法

进设备管理器-通用串行总线设备 卸载无法检测到的设备驱动 重新拔插数据线...

探索高通骁龙光线追踪技术

什么是光线追踪&#xff1f; 光线追踪&#xff08;Raytracing&#xff09;是通过模拟现实世界中光线的传播过程并生成更加真实的效果的一种图形渲染技术。 早期在电影&#xff0c;动画&#xff0c;设计等领域已经使用软件摸拟光线追踪来渲染更加真实的图像。一般的做法是从相…...

qRegisterMetaType函数使用

一、有两种形式&#xff1a; 1、int qRegisterMetaType(const char *typeName) template <typename T> int qRegisterMetaType(const char *typeName #ifndef Q_CLANG_QDOC, T * dummy nullptr, typename QtPrivate::MetaTypeDefinedHelper<T, QMetaTypeId2<T&g…...

【北京化工大学】 神经网络与深度学习 实验6 MATAR图像分类

本次实验使用老师发的雷达奇妙数据 实验要求 读取图像形式的MASTAR数据 1、划分数据集为test/train 2、归一化 题目1&#xff1a;定义并训练线性分类器的神经网络 注&#xff1a;本次老师的要求是不限方法&#xff0c;使用pytorch尽可能提升精度 1、准备函数 #本文用的…...