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

做网站需要什么语言最近三天的新闻大事

做网站需要什么语言,最近三天的新闻大事,南网站建设,商标logo设计图案ant-design-vue表格嵌套子表格&#xff0c;实现子表格有数据才显示左侧加号图标 通过使用插槽的方式&#xff0c;以下为全部项目的代码&#xff0c;关键的代码就两块&#xff0c;看注释 <template><a-card><a-form class"kit_form" ref"formRef…

ant-design-vue表格嵌套子表格,实现子表格有数据才显示左侧加号图标

在这里插入图片描述
通过使用插槽的方式,以下为全部项目的代码,关键的代码就两块,看注释

<template><a-card><a-form class="kit_form" ref="formRef" name="custom-validation" :model="searchParams"><a-row><!-- <a-col :md="8" :lg="6"><a-form-item label="规则名称" name="ruleName" :label-col="{ span: 6 }" :wrapper-col="{ span: 18 }"><a-input v-model:value="searchParams.ruleName" placeholder="请输入规则名称" allowClear /></a-form-item></a-col> --><a-col :md="8" :lg="6"><a-form-item label="下单时间" name="dataArr" :label-col="{ span: 6 }" :wrapper-col="{ span: 18 }"><a-range-picker v-model:value="searchParams.dataArr" @change="fn.changeDate" allowClear format="YYYY-MM-DD" valueFormat="YYYY-MM-DD"/></a-form-item></a-col><a-col :md="8" :lg="6"><a-button type="primary" @click="fn.search" style="margin: 0 10px"><search-outlined />查询</a-button><a-button @click="fn.reset"><reload-outlined />重置</a-button></a-col></a-row><a-button type="primary" preIcon="ant-design:export-outlined" @click="handleExportXls('财务对账单', exportXls, searchParams)"> 导出</a-button></a-form><a-table :columns="ob.columns" :loading="loading" :data-source="ob.list" class="components-table-demo-nested"  :pagination="ob.pagination" :expandedRowKeys="expandedRowKeys"  @change="fn.paginationChange"><!-- 方法1插槽-加号控制 --><template #expandIcon="{ record }"><template v-if="record.lisOrderDetailList && record.lisOrderDetailList.length > 0"><button  :class="['ant-table-row-expand-icon',!isExpand[record.key]? 'ant-table-row-expand-icon-collapsed': 'ant-table-row-expand-icon-expanded']"@click="fn.expandRow(record,record.key)"></button></template><template v-else><span></span></template></template><template #operation><a>Publish</a></template><template #expandedRowRender><a-table :columns="ob.innerColumns" :data-source="ob.innerlist" :pagination="false"><template #status><span><a-badge status="success" />Finished</span></template><template #operation><span class="table-operation"><a>Pause</a><a>Stop</a><a-dropdown><template #overlay><a-menu><a-menu-item>Action 1</a-menu-item><a-menu-item>Action 2</a-menu-item></a-menu></template><a>More</a></a-dropdown></span></template></a-table></template></a-table>
</a-card></template><script lang="ts" setup>import { defineComponent,ref, unref, reactive, toRaw, watch, computed,onMounted} from 'vue';import { distributionOrdersList,exportXls,queryLisOrder } from './financialStatement.api';//引入列表接口import { filterObj } from '/@/utils/common/compUtils';import { useMethods } from '/@/hooks/system/useMethods';import { formatDate } from '/@/utils_k/date';const { handleExportXls, handleImportXls } = useMethods();let expandedRowKeys = ref([])let isExpand = reactive({})let loading = ref(false)let formRef = ref();let searchParams: any = reactive({dataArr: null,beginDate: '',endDate: '',});let ob = reactive({pagination: {pageSize: 10,current: 1,total: 0,pageSizeOptions: ['10', '20', '50'],showSizeChanger: true,showTotal: () => {return `${ob.pagination.total}`},},list: [],innerlist: [],columns: [//主表头{ title: '小程序订单号', dataIndex: 'orderId', key: 'orderId' },{ title: '订单支付金额', dataIndex: 'price', key: 'price' },{ title: '商品名称', dataIndex: 'productName', key: 'productName' },{ title: '订单状态', dataIndex: 'orderStatus', key: 'orderStatus',// customRender:({text})=>{//     if(text == '1'){//       return '已采样'//     }else if(text == '0'){//       return '待采样'//     }else if(text == '2'){//       return '已完成'//     }else if(text == '3'){//       return '已取消'//     }else if(text == '4'){//       return '待付款'//     }else{//       return '支付失败'//     }//   }},{ title: '下单时间', dataIndex: 'orderTime', key: 'orderTime' },{ title: '微信支付单号', dataIndex: 'payOrderId', key: 'payOrderId' },{ title: '支付时间', dataIndex: 'payTime', key: 'payTime' },{ title: '电子发票单号', dataIndex: 'electronicInvoiceOrderNumber', key: 'electronicInvoiceOrderNumber' },{ title: '开票时间', dataIndex: 'invoicingTime', key: 'invoicingTime' },{ title: '微信退款单号', dataIndex: 'returnOrderId', key: 'returnOrderId' },// { title: 'Action', key: 'operation', slots: { customRender: 'operation' } },],innerColumns:[//副表头{ title: '关联LIS订单号', dataIndex: 'orderNo', key: 'orderNo' },{ title: '受托机构', dataIndex: 'orgName', key: 'orgName' },{ title: '条码号', dataIndex: 'barCode', key: 'barCode' },{ title: '姓名', dataIndex: 'patientName', key: 'patientName' }, { title: '性别', dataIndex: 'genderName', key: 'genderName' }, { title: '申请项目', dataIndex: 'inspectGroupName', key: 'inspectGroupName' }, { title: '申请时间', dataIndex: 'applyTime', key: 'applyTime' }, { title: '专业组', dataIndex: 'disciplineName', key: 'disciplineName' }, { title: '报告状态', dataIndex: 'reportStatusName', key: 'reportStatusName' }, { title: '报告时间', dataIndex: 'reportTime', key: 'reportTime' }, { title: '业务类型', dataIndex: 'applicationTypeName', key: 'applicationTypeName' }, // { title: 'Status', key: 'state', slots: { customRender: 'status' } },// {//   title: 'Action',//   dataIndex: 'operation',//   key: 'operation',//   slots: { customRender: 'operation' },// },]});let fn = {getList() {loading.value = trueexpandedRowKeys.value = []//复位Object.keys(isExpand).forEach((k) => { //复位isExpand[k] = false;  });  delete searchParams.dataArr;let params = {...searchParams,pageNo: ob.pagination.current,pageSize: ob.pagination.pageSize,};distributionOrdersList(params).then((res) => {console.log('res', res);loading.value = falseob.list = res.records;ob.pagination.total = res.total;});},paginationChange(e) {console.log('1', e);ob.pagination.current = e.current;ob.pagination.pageSize = e.pageSize;fn.getList()},handleResizeColumn(w,col){col.width = w;},//原生监听收展// getInnerData(expanded, record:any) {//     expandedRowKeys.value = []//   if (expanded) { //     console.log(record,8888)//     expandedRowKeys.value.push(Number(record.key))//     console.log(expandedRowKeys.value,66666)//     ob.innerlist = []//     ob.innerlist = record.lisOrderDetailList//   }// },// 方法1插槽-加号控制expandRow(record:any,key:any){// 将所有isExpand的值设为false  Object.keys(isExpand).forEach((k) => {  isExpand[k] = false;  });  console.log(key,111)console.log(isExpand,222)if (!expandedRowKeys.value.includes(key)) {expandedRowKeys.value = []expandedRowKeys.value.push(Number(key))ob.innerlist = record.lisOrderDetailListconsole.log('展开')isExpand[key] = true} else {const closedIndex = expandedRowKeys.value.indexOf(key);expandedRowKeys.value.splice(closedIndex, 1);//清除当前的,也就是清空了console.log('收起')isExpand[key] = false}},search() {ob.pagination.current = 1;fn.getList();},reset() {formRef.value.resetFields();searchParams.dataArr = null;searchParams.beginDate ='';searchParams.endDate = '';fn.search();},changeDate(e) {if (e) {searchParams.beginDate = formatDate(e[0], 'Y-M-D') + ' 00:00:00';searchParams.endDate = formatDate(e[1], 'Y-M-D') + ' 23:59:59';}console.log('e', e);},};onMounted(() => {fn.getList()})</script>
http://www.mnyf.cn/news/39122.html

相关文章:

  • 建网站公司神马seo服务
  • 做王境泽表情的网站如何自己创建一个网站
  • b2c网站建设公司大型营销型网站制作
  • 网站方案策划怎么写湖南发展最新消息公告
  • 贵阳市住房城乡建设局官方网站佛山网站优化
  • wordpress连接微信支付优化方案电子版
  • 网站怎么做图片动态图片不显示不出来百度如何免费推广
  • 网站建设拥有域名后如何操作全网营销是什么意思
  • 怎么自己做淘客网站江门关键词排名工具
  • 建设银行温州支行官方网站灰色行业关键词优化
  • 沈阳专业做网站开发公司台州做优化
  • 电子商务网站开发应遵循的基本原则电商怎么做
  • 没有公司怎么做网站百度关键词优化和百度推广
  • 购买一级域名做网站免费的推广引流软件下载
  • html怎么做网页框架汕头seo排名公司
  • 同个ip不同端口做网站好南通关键词优化平台
  • 什么叫网站的空间感网上推广渠道有哪些
  • 旅游网站在提高用户体验方面应做哪些工作黑龙江网络推广好做吗
  • 建材网站建设高端网站建设公司排行
  • 网站建设招标公示域名解析网站
  • 优书网推荐seo培训费用
  • 网站升级需要什么兰州seo优化入门
  • 网站建设目标 优帮云百度引擎搜索推广
  • 济源市建设网站网络公司排名
  • 网站关停公告怎么做九江seo公司
  • 刚做网站做什么网站好点免费建立自己的网站
  • 企石网站仿做北京百度科技有限公司电话
  • 网站做管理员消息推送网站免费搭建
  • 潍坊网站制作维护郑州seo顾问外包公司
  • 网站自适应 如何做seo优化工具