This commit is contained in:
wangweidong 2025-10-28 15:23:37 +08:00
commit 39d0406790
15 changed files with 649 additions and 509 deletions

View File

@ -2,7 +2,8 @@
<div class="section-divider"> <div class="section-divider">
<!-- 左侧灰色横线 --> <!-- 左侧灰色横线 -->
<!-- <div class="left-line"></div> --> <!-- <div class="left-line"></div> -->
<img src="./section.svg" class="divider-icon" /> <div class="left-icon"></div>
<!-- <img src="./section.svg" class="divider-icon" /> -->
<!-- 标题文字 --> <!-- 标题文字 -->
<div class="divider-content"> <div class="divider-content">
<slot>{{ title }}</slot> <slot>{{ title }}</slot>
@ -26,7 +27,7 @@ export default {
.section-divider { .section-divider {
display: flex; display: flex;
align-items: center; align-items: center;
margin: 5px 0 30px 20px; margin: 5px 0 14px 20px;
} }
/* 蓝色竖线(带圆角) */ /* 蓝色竖线(带圆角) */
@ -72,4 +73,12 @@ export default {
background-color: #ddd; /* 灰色 */ background-color: #ddd; /* 灰色 */
margin-left: 8px; /* 与文字的间距 */ margin-left: 8px; /* 与文字的间距 */
} }
.left-icon{
width: 8px;
height: 18px;
background-color: #1890ff;
margin-right: 8px;
border-radius: 10px;
}
</style> </style>

View File

@ -4,51 +4,55 @@
<template #detail> <template #detail>
<a-form ref="formRef" class="antd-modal-form" :labelCol="labelCol" :wrapperCol="wrapperCol" <a-form ref="formRef" class="antd-modal-form" :labelCol="labelCol" :wrapperCol="wrapperCol"
name="EmployeesApplyForm"> name="EmployeesApplyForm">
<a-row> <a-row class="card-class">
<a-col :span="24"> <a-col :span="24" style="border-bottom: 2px solid #f7f7f7; margin-bottom: 14px;">
<SectionDivider :title="'基本信息'" /> <SectionDivider :title="'基本信息'" />
<!-- <span>基本信息</span> -->
</a-col> </a-col>
<a-col :span="12"> <a-col :span="12">
<a-form-item label="姓名" v-bind="validateInfos.name" id="EmployeesApplyForm-name" name="name"> <a-form-item label="姓名" v-bind="validateInfos.name" id="EmployeesApplyForm-name" name="name">
<!-- <a-input v-model:value="formData.name" placeholder="请输入姓名" disabled allow-clear></a-input> --> <a-input v-model:value="formData.name" placeholder="请输入姓名" disabled allow-clear></a-input>
<span>{{ formData.name }}</span> <!-- <span>{{ formData.name }}</span> -->
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :span="12"> <a-col :span="12">
<a-form-item label="联系电话" v-bind="validateInfos.tel" id="EmployeesApplyForm-tel" name="tel"> <a-form-item label="联系电话" v-bind="validateInfos.tel" id="EmployeesApplyForm-tel" name="tel">
<!-- <a-input v-model:value="formData.tel" placeholder="请输入联系电话" disabled allow-clear></a-input> --> <a-input v-model:value="formData.tel" placeholder="请输入联系电话" disabled allow-clear></a-input>
<span>{{ formData.tel }}</span> <!-- <span>{{ formData.tel }}</span> -->
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :span="12"> <a-col :span="12">
<a-form-item label="性别" v-bind="validateInfos.sex" id="EmployeesApplyForm-sex" name="sex"> <a-form-item label="性别" v-bind="validateInfos.sex" id="EmployeesApplyForm-sex" name="sex">
<a-input v-model:value="formData.sex" placeholder="请输入性别" disabled allow-clear></a-input>
<!-- <j-dict-select-tag type='radio' v-model:value="formData.sex" dictCode="sex" placeholder="请选择性别" disabled <!-- <j-dict-select-tag type='radio' v-model:value="formData.sex" dictCode="sex" placeholder="请选择性别" disabled
allow-clear /> --> allow-clear /> -->
<span>{{ formData.sex }}</span> <!-- <span>{{ formData.sex }}</span> -->
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :span="12"> <a-col :span="12">
<a-form-item label="年龄" v-bind="validateInfos.sex" id="EmployeesApplyForm-sex" name="sex"> <a-form-item label="年龄" v-bind="validateInfos.sex" id="EmployeesApplyForm-sex" name="sex">
<span> {{ handleComputedAge(formData.dateOfBirth) }}</span> <a-input v-model:value="ageVal" placeholder="请输入年龄" disabled allow-clear></a-input>
<!-- <span> {{ handleComputedAge(formData.dateOfBirth) }}</span> -->
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :span="12"> <a-col :span="12">
<a-form-item label="出生日期" v-bind="validateInfos.dateOfBirth" id="EmployeesApplyForm-dateOfBirth" <a-form-item label="出生日期" v-bind="validateInfos.dateOfBirth" id="EmployeesApplyForm-dateOfBirth"
name="dateOfBirth"> name="dateOfBirth">
<!-- <a-date-picker placeholder="请选择出生日期" v-model:value="formData.dateOfBirth" value-format="YYYY-MM-DD" <a-date-picker placeholder="请选择出生日期" v-model:value="formData.dateOfBirth" value-format="YYYY-MM-DD"
style="width: 100%" disabled allow-clear /> --> style="width: 100%" disabled allow-clear />
<span>{{ formData.dateOfBirth }}</span> <!-- <span>{{ formData.dateOfBirth }}</span> -->
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :span="12"> <a-col :span="12">
<a-form-item label="民族" v-bind="validateInfos.national" id="EmployeesApplyForm-national" name="national"> <a-form-item label="民族" v-bind="validateInfos.national" id="EmployeesApplyForm-national" name="national">
<!-- <a-input v-model:value="formData.national" placeholder="请输入民族" disabled allow-clear></a-input> --> <a-input v-model:value="formData.national" placeholder="请输入民族" disabled allow-clear></a-input>
<span>{{ formData.national }}</span> <!-- <span>{{ formData.national }}</span> -->
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :span="12"> <a-col :span="12">
<a-form-item label="身份证号"> <a-form-item label="身份证号">
<span>{{ formData.idCard }}</span> <a-input v-model:value="formData.idCard" placeholder="请输入身份证号" disabled allow-clear></a-input>
<!-- <span>{{ formData.idCard }}</span> -->
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :span="12"> <a-col :span="12">
@ -56,19 +60,20 @@
name="marriedOrNot"> name="marriedOrNot">
<!-- <j-dict-select-tag type='radio' v-model:value="formData.marriedOrNot" dictCode="married_or_not" <!-- <j-dict-select-tag type='radio' v-model:value="formData.marriedOrNot" dictCode="married_or_not"
placeholder="请选择婚否" disabled allow-clear /> --> placeholder="请选择婚否" disabled allow-clear /> -->
<span>{{ formData.marriedOrNot }}</span> <a-input v-model:value="formData.marriedOrNot" placeholder="请输入婚否" disabled allow-clear></a-input>
<!-- <span>{{ formData.marriedOrNot }}</span> -->
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :span="12"> <a-col :span="12">
<a-form-item label="身高" v-bind="validateInfos.height" id="EmployeesApplyForm-height" name="height"> <a-form-item label="身高" v-bind="validateInfos.height" id="EmployeesApplyForm-height" name="height">
<!-- <a-input-number v-model:value="formData.height" placeholder="请输入身高" style="width: 100%" disabled /> --> <a-input-number v-model:value="formData.height" placeholder="请输入身高" style="width: 100%" disabled />
<span>{{ formData.height }}cm</span> <!-- <span>{{ formData.height }}cm</span> -->
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :span="12"> <a-col :span="12">
<a-form-item label="体重" v-bind="validateInfos.weight" id="EmployeesApplyForm-weight" name="weight"> <a-form-item label="体重" v-bind="validateInfos.weight" id="EmployeesApplyForm-weight" name="weight">
<!-- <a-input-number v-model:value="formData.weight" placeholder="请输入体重" style="width: 100%" disabled /> --> <a-input-number v-model:value="formData.weight" placeholder="请输入体重" style="width: 100%" disabled />
<span>{{ formData.weight }}kg</span> <!-- <span>{{ formData.weight }}kg</span> -->
</a-form-item> </a-form-item>
</a-col> </a-col>
<!-- <a-col :span="12"> <!-- <a-col :span="12">
@ -84,7 +89,8 @@
name="healthStatus"> name="healthStatus">
<!-- <j-dict-select-tag type='radio' v-model:value="formData.healthStatus" dictCode="health_status" disabled <!-- <j-dict-select-tag type='radio' v-model:value="formData.healthStatus" dictCode="health_status" disabled
placeholder="请选择健康状况" allow-clear /> --> placeholder="请选择健康状况" allow-clear /> -->
<span>{{ formData.healthStatus }}</span> <a-input v-model:value="formData.healthStatus" placeholder="请输入健康状况" style="width: 100%" disabled />
<!-- <span>{{ formData.healthStatus }}</span> -->
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :span="12"> <a-col :span="12">
@ -92,37 +98,39 @@
id="EmployeesApplyForm-politicalAppearance" name="politicalAppearance"> id="EmployeesApplyForm-politicalAppearance" name="politicalAppearance">
<!-- <j-dict-select-tag v-model:value="formData.politicalAppearance" dictCode="political_appearance" disabled <!-- <j-dict-select-tag v-model:value="formData.politicalAppearance" dictCode="political_appearance" disabled
placeholder="请选择政治面貌" allow-clear /> --> placeholder="请选择政治面貌" allow-clear /> -->
<span>{{ formData.politicalAppearance }}</span> <a-input v-model:value="formData.politicalAppearance" placeholder="请输入政治面貌" style="width: 100%"
disabled />
<!-- <span>{{ formData.politicalAppearance }}</span> -->
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :span="12"> <a-col :span="12">
<a-form-item label="户籍所在地" v-bind="validateInfos.houseAddress" id="EmployeesApplyForm-houseAddress" <a-form-item label="户籍所在地" v-bind="validateInfos.houseAddress" id="EmployeesApplyForm-houseAddress"
name="houseAddress"> name="houseAddress">
<!-- <a-input v-model:value="formData.houseAddress" placeholder="请输入户籍所在地" disabled allow-clear></a-input> --> <a-input v-model:value="formData.houseAddress" placeholder="请输入户籍所在地" disabled allow-clear></a-input>
<span>{{ formData.houseAddress }}</span> <!-- <span>{{ formData.houseAddress }}</span> -->
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :span="12"> <a-col :span="12">
<a-form-item label="紧急联系人" v-bind="validateInfos.emergencyContact" <a-form-item label="紧急联系人" v-bind="validateInfos.emergencyContact"
id="EmployeesApplyForm-emergencyContact" name="emergencyContact"> id="EmployeesApplyForm-emergencyContact" name="emergencyContact">
<!-- <a-input v-model:value="formData.emergencyContact" placeholder="请输入紧急联系人" disabled <a-input v-model:value="formData.emergencyContact" placeholder="请输入紧急联系人" disabled
allow-clear></a-input> --> allow-clear></a-input>
<span>{{ formData.emergencyContact }}</span> <!-- <span>{{ formData.emergencyContact }}</span> -->
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :span="12"> <a-col :span="12">
<a-form-item label="紧急联系人电话" v-bind="validateInfos.emergencyTel" id="EmployeesApplyForm-emergencyTel" <a-form-item label="紧急联系人电话" v-bind="validateInfos.emergencyTel" id="EmployeesApplyForm-emergencyTel"
name="emergencyTel"> name="emergencyTel">
<!-- <a-input v-model:value="formData.emergencyTel" placeholder="请输入紧急联系人电话" disabled allow-clear></a-input> --> <a-input v-model:value="formData.emergencyTel" placeholder="请输入紧急联系人电话" disabled allow-clear></a-input>
<span>{{ formData.emergencyTel }}</span> <!-- <span>{{ formData.emergencyTel }}</span> -->
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :span="12"> <a-col :span="12">
<a-form-item label="与本人关系" v-bind="validateInfos.emergencyRelationship" <a-form-item label="与本人关系" v-bind="validateInfos.emergencyRelationship"
id="EmployeesApplyForm-emergencyRelationship" name="emergencyRelationship"> id="EmployeesApplyForm-emergencyRelationship" name="emergencyRelationship">
<!-- <a-input v-model:value="formData.emergencyRelationship" placeholder="请输入紧急联系人与本人关系" disabled <a-input v-model:value="formData.emergencyRelationship" placeholder="请输入紧急联系人与本人关系" disabled
allow-clear></a-input> --> allow-clear></a-input>
<span>{{ formData.emergencyRelationship }}</span> <!-- <span>{{ formData.emergencyRelationship }}</span> -->
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :span="12"> <a-col :span="12">
@ -130,7 +138,8 @@
name="hukouNature"> name="hukouNature">
<!-- <j-dict-select-tag type='radio' v-model:value="formData.hukouNature" dictCode="hukou_nature" disabled <!-- <j-dict-select-tag type='radio' v-model:value="formData.hukouNature" dictCode="hukou_nature" disabled
placeholder="请选择户口性质" allow-clear /> --> placeholder="请选择户口性质" allow-clear /> -->
<span>{{ formData.hukouNature }}</span> <a-input v-model:value="formData.hukouNature" placeholder="请输入户口性质" disabled allow-clear></a-input>
<!-- <span>{{ formData.hukouNature }}</span> -->
</a-form-item> </a-form-item>
</a-col> </a-col>
</a-row> </a-row>
@ -141,8 +150,8 @@
<template #detail> <template #detail>
<a-form ref="formRef" class="antd-modal-form" :labelCol="labelCol2" :wrapperCol="wrapperCol2" <a-form ref="formRef" class="antd-modal-form" :labelCol="labelCol2" :wrapperCol="wrapperCol2"
name="EmployeesApplyForm"> name="EmployeesApplyForm">
<a-row> <a-row class="card-class">
<a-col :span="24"> <a-col :span="24" style="border-bottom: 2px solid #f7f7f7; margin-bottom: 14px;">
<SectionDivider :title="'证件信息'" /> <SectionDivider :title="'证件信息'" />
</a-col> </a-col>
<a-col :span="23" :push="1"> <a-col :span="23" :push="1">
@ -234,7 +243,9 @@
</a-tab-pane> </a-tab-pane>
</a-tabs> </a-tabs>
</a-col> </a-col>
<a-col :span="24"> </a-row>
<a-row class="card-class">
<a-col :span="24" style="border-bottom: 2px solid #f7f7f7; margin-bottom: 14px;">
<div v-if="formData.applyType == 0"> <div v-if="formData.applyType == 0">
<SectionDivider :title="'邀请结果'" /> <SectionDivider :title="'邀请结果'" />
</div> </div>
@ -248,15 +259,15 @@
<div v-if="disabled"> <div v-if="disabled">
<!-- 被邀请 --> <!-- 被邀请 -->
<div v-if="formData.applyType == 0"> <div v-if="formData.applyType == 0">
<span v-if="formData.status == 1">待确认</span> <span v-if="formData.status == 1"><a-input :value="'待确认'" disabled allow-clear></a-input></span>
<span v-if="formData.status == 2">已接受</span> <span v-if="formData.status == 2"><a-input :value="'已接受'" disabled allow-clear></a-input></span>
<span v-if="formData.status == 3">已拒绝</span> <span v-if="formData.status == 3"><a-input :value="'已拒绝'" disabled allow-clear></a-input></span>
</div> </div>
<!-- 主动申请 --> <!-- 主动申请 -->
<div v-if="formData.applyType == 1"> <div v-if="formData.applyType == 1">
<span v-if="formData.status == 1">待审核</span> <span v-if="formData.status == 1"><a-input :value="'待审核'" disabled allow-clear></a-input></span>
<span v-if="formData.status == 2">申请通过</span> <span v-if="formData.status == 2"><a-input :value="'申请通过'" disabled allow-clear></a-input></span>
<span v-if="formData.status == 3">申请驳回</span> <span v-if="formData.status == 3"><a-input :value="'申请驳回'" disabled allow-clear></a-input></span>
</div> </div>
</div> </div>
<a-select v-else v-model:value="statusVal" placeholder="请选择审核意见" style="width: 200px" :disabled="false"> <a-select v-else v-model:value="statusVal" placeholder="请选择审核意见" style="width: 200px" :disabled="false">
@ -281,7 +292,9 @@
name="auditContent"> name="auditContent">
<a-textarea v-if="!disabled" :autosize="{ minRows: 3 }" maxlength="50" show-count <a-textarea v-if="!disabled" :autosize="{ minRows: 3 }" maxlength="50" show-count
v-model:value="formData.auditContent" allow-clear placeholder="请输入驳回原因"></a-textarea> v-model:value="formData.auditContent" allow-clear placeholder="请输入驳回原因"></a-textarea>
<span v-else>{{ formData.auditContent }}</span> <!-- <span v-else>{{ formData.auditContent }}</span> -->
<span v-else><a-textarea v-model:value="formData.auditContent" :autosize="{ minRows: 3 }"
placeholder="请输入紧急联系人电话" disabled allow-clear></a-textarea></span>
</a-form-item> </a-form-item>
</div> </div>
</a-col> </a-col>
@ -313,6 +326,7 @@ const formRef = ref();
const useForm = Form.useForm; const useForm = Form.useForm;
const emit = defineEmits(['register', 'ok']); const emit = defineEmits(['register', 'ok']);
const activeKey = ref('1') const activeKey = ref('1')
const ageVal = ref()
const formData = reactive<Record<string, any>>({ const formData = reactive<Record<string, any>>({
id: '', id: '',
openId: '', openId: '',
@ -398,6 +412,7 @@ function add() {
* 编辑 * 编辑
*/ */
function edit(record) { function edit(record) {
ageVal.value = handleComputedAge(record.dateOfBirth)
nextTick(() => { nextTick(() => {
resetFields(); resetFields();
const tmpData = {}; const tmpData = {};
@ -508,4 +523,17 @@ defineExpose({
<style lang="less" scoped> <style lang="less" scoped>
.antd-modal-form {} .antd-modal-form {}
.card-class {
padding-top: 24px;
padding-bottom: 24px;
padding-left: 14px;
padding-right: 14px;
// background-color: rgba(255, 255, 255, 0.9);
background-color: #fcfdff;
border-radius: 10px;
// box-shadow: rgba(0, 0, 0, 0.1) 0px 2px 12px;
margin-bottom: 14px;
}
</style> </style>

View File

@ -6,10 +6,15 @@ import { getWeekMonthQuarterYear } from '/@/utils';
//列表数据 //列表数据
export const columns: BasicColumn[] = [ export const columns: BasicColumn[] = [
{ {
title: '护理单元', title: 'NUID',
align: 'center', align: 'center',
dataIndex: 'nuId', dataIndex: 'nuId',
}, },
{
title: '护理单元',
align: 'center',
dataIndex: 'nuId_dictText',
},
{ {
title: '长者姓名', title: '长者姓名',
align: 'center', align: 'center',

View File

@ -5,16 +5,24 @@
<a-form ref="formRef" @keyup.enter.native="searchQuery" :model="queryParam" :label-col="labelCol" <a-form ref="formRef" @keyup.enter.native="searchQuery" :model="queryParam" :label-col="labelCol"
:wrapper-col="wrapperCol"> :wrapper-col="wrapperCol">
<a-row :gutter="24"> <a-row :gutter="24">
<!-- <a-col :lg="6">
<a-form-item name="nuId">
<template #label><span title="NUID">NUID</span></template>
<JInput v-model:value="queryParam.nuId" placeholder="请输入NUID" />
</a-form-item>
</a-col> -->
<a-col :lg="6"> <a-col :lg="6">
<a-form-item name="nuId"> <a-form-item name="nuId">
<template #label><span title="nuId">nuId</span></template> <template #label><span title="护理单元">护理单元</span></template>
<JInput v-model:value="queryParam.nuId" /> <j-dict-select-tag v-model:value="queryParam.nuId"
:dictCode="`nu_base_info,nu_name,nu_id,del_flag = 0 order by nu_id asc`" placeholder="请选择护理单元"
allowClear :ignoreDisabled="true" />
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :lg="6"> <a-col :lg="6">
<a-form-item name="name"> <a-form-item name="name">
<template #label><span title="姓名">姓名</span></template> <template #label><span title="姓名">姓名</span></template>
<JInput v-model:value="queryParam.name" /> <JInput v-model:value="queryParam.name" placeholder="请输入长者姓名" />
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24"> <a-col :xl="6" :lg="7" :md="8" :sm="24">
@ -30,7 +38,7 @@
</a-form> </a-form>
</div> </div>
<!--引用表格--> <!--引用表格-->
<BasicTable @register="registerTable" > <BasicTable @register="registerTable">
<!--插槽:table标题--> <!--插槽:table标题-->
<template #tableTitle> <template #tableTitle>
</template> </template>
@ -59,6 +67,7 @@ import { downloadFile } from '/@/utils/common/renderUtils';
import ElderInfoModal from './components/ElderInfoModal.vue' import ElderInfoModal from './components/ElderInfoModal.vue'
import { useUserStore } from '/@/store/modules/user'; import { useUserStore } from '/@/store/modules/user';
import JInput from "/@/components/Form/src/jeecg/components/JInput.vue"; import JInput from "/@/components/Form/src/jeecg/components/JInput.vue";
import JDictSelectTag from '/@/components/Form/src/jeecg/components/JDictSelectTag.vue';
const formRef = ref(); const formRef = ref();
const queryParam = reactive<any>({}); const queryParam = reactive<any>({});

View File

@ -13,12 +13,14 @@
<!-- <a-input v-model:value="formData.nuId" placeholder="请输入护理单元" allow-clear ></a-input> --> <!-- <a-input v-model:value="formData.nuId" placeholder="请输入护理单元" allow-clear ></a-input> -->
<span>{{ formData.nuId }}</span> <span>{{ formData.nuId }}</span>
</a-form-item> </a-form-item>
<!-- <a-form-item label="护理单元名称"> --> </a-col>
<!-- <a-input v-model:value="formData.nuId" placeholder="请输入护理单元" allow-clear ></a-input> --> <a-col :span="12">
<!-- <j-dict-select-tag type='list' v-model:value="formData.nuId" :dictCode="`nu_base_info,nu_name,nu_id`" <a-form-item label="护理单元">
placeholder="请选择分类标签" allowClear @upDictCode="upNuNameFunc" /> <!-- <a-input v-model:value="formData.nuId" placeholder="请输入护理单元" allow-clear ></a-input> -->
<span>{{ nuNameTextFunc(formData.nuId) }}</span> <!-- <j-dict-select-tag type='list' v-model:value="formData.nuId" :dictCode="`nu_base_info,nu_name,nu_id`"
</a-form-item> --> placeholder="请选择分类标签" allowClear @upDictCode="upNuNameFunc" />-->
<span>{{ formData.nuId_dictText }}</span>
</a-form-item>
</a-col> </a-col>
<a-col :span="12"> <a-col :span="12">
<a-form-item label="姓名" v-bind="validateInfos.name" id="ElderInfoForm-name" name="name"> <a-form-item label="姓名" v-bind="validateInfos.name" id="ElderInfoForm-name" name="name">
@ -171,6 +173,7 @@ const emit = defineEmits(['register', 'ok']);
const formData = reactive<Record<string, any>>({ const formData = reactive<Record<string, any>>({
id: '', id: '',
nuId: '', nuId: '',
nuId_dictText: '',
name: '', name: '',
sex: '', sex: '',
age: '', age: '',

View File

@ -1,5 +1,5 @@
<template> <template>
<div class="p-2"> <div>
<!--引用表格--> <!--引用表格-->
<BasicTable @register="registerTable"> <BasicTable @register="registerTable">
<!--插槽:table标题--> <!--插槽:table标题-->
@ -7,14 +7,14 @@
</template> </template>
<!--操作栏--> <!--操作栏-->
<template #action="{ record }"> <template #action="{ record }">
<TableAction :actions="getTableAction(record)" :dropDownActions="getDropDownAction(record)"/> <TableAction :actions="getTableAction(record)" :dropDownActions="getDropDownAction(record)" />
</template> </template>
<template v-slot:bodyCell="{ column, record, index, text }"> <template v-slot:bodyCell="{ column, record, index, text }">
<template v-if="column.dataIndex === 'requestValue'"> <template v-if="column.dataIndex === 'requestValue'">
<span >{{ (text == null || text == undefined) ? '-' : ((text == '0' || text == '0.00') ? 0 : text ) }}</span> <span>{{ (text == null || text == undefined) ? '-' : ((text == '0' || text == '0.00') ? 0 : text) }}</span>
</template> </template>
<template v-if="column.dataIndex === 'resolveValue'"> <template v-if="column.dataIndex === 'resolveValue'">
<span >{{ (text == null || text == undefined) ? '-' : ((text == '0' || text == '0.00') ? 0 : text ) }}</span> <span>{{ (text == null || text == undefined) ? '-' : ((text == '0' || text == '0.00') ? 0 : text) }}</span>
</template> </template>
</template> </template>
</BasicTable> </BasicTable>
@ -24,206 +24,212 @@
</template> </template>
<script lang="ts" name="ApiRequestLog-ApiRequestLog" setup> <script lang="ts" name="ApiRequestLog-ApiRequestLog" setup>
import { ref, reactive } from 'vue'; import { ref, reactive } from 'vue';
import { BasicTable, useTable, TableAction } from '/@/components/Table'; import { BasicTable, useTable, TableAction } from '/@/components/Table';
import { useListPage } from '/@/hooks/system/useListPage'; import { useListPage } from '/@/hooks/system/useListPage';
import { columns, superQuerySchema } from './ApiRequestLog.data'; import { columns, superQuerySchema } from './ApiRequestLog.data';
import { list, deleteOne, batchDelete, getImportUrl, getExportUrl } from './ApiRequestLog.api'; import { list, deleteOne, batchDelete, getImportUrl, getExportUrl } from './ApiRequestLog.api';
import { downloadFile } from '/@/utils/common/renderUtils'; import { downloadFile } from '/@/utils/common/renderUtils';
import ApiRequestLogModal from './components/ApiRequestLogModal.vue' import ApiRequestLogModal from './components/ApiRequestLogModal.vue'
import { useUserStore } from '/@/store/modules/user'; import { useUserStore } from '/@/store/modules/user';
import JDictSelectTag from '/@/components/Form/src/jeecg/components/JDictSelectTag.vue'; import JDictSelectTag from '/@/components/Form/src/jeecg/components/JDictSelectTag.vue';
import JSelectMultiple from '/@/components/Form/src/jeecg/components/JSelectMultiple.vue'; import JSelectMultiple from '/@/components/Form/src/jeecg/components/JSelectMultiple.vue';
const formRef = ref(); const formRef = ref();
const queryParam = reactive<any>({}); const queryParam = reactive<any>({});
const toggleSearchStatus = ref<boolean>(false); const toggleSearchStatus = ref<boolean>(false);
const registerModal = ref(); const registerModal = ref();
const userStore = useUserStore(); const userStore = useUserStore();
//table //table
const { prefixCls, tableContext, onExportXls, onImportXls } = useListPage({ const { prefixCls, tableContext, onExportXls, onImportXls } = useListPage({
tableProps: { tableProps: {
title: 'api请求日志', title: 'api请求日志',
api: list, api: list,
columns, columns,
canResize:false, canResize: false,
useSearchForm: false, useSearchForm: false,
immediate: false, immediate: false,
showActionColumn: false, showActionColumn: false,
actionColumn: { actionColumn: {
width: 120, width: 120,
fixed: 'right', fixed: 'right',
},
beforeFetch: async (params) => {
return Object.assign(params, queryParam);
},
}, },
exportConfig: { beforeFetch: async (params) => {
name: "api请求日志", return Object.assign(params, queryParam);
url: getExportUrl,
params: queryParam,
}, },
importConfig: { },
url: getImportUrl, exportConfig: {
success: handleSuccess name: "api请求日志",
}, url: getExportUrl,
}); params: queryParam,
const [registerTable, { reload, collapseAll, updateTableDataRecord, findTableDataRecord, getDataSource }, { rowSelection, selectedRowKeys }] = tableContext; },
const labelCol = reactive({ importConfig: {
xs:24, url: getImportUrl,
sm:8, success: handleSuccess
xl:6, },
xxl:8 });
}); const [registerTable, { reload, collapseAll, updateTableDataRecord, findTableDataRecord, getDataSource }, { rowSelection, selectedRowKeys }] = tableContext;
const wrapperCol = reactive({ const labelCol = reactive({
xs: 24, xs: 24,
sm: 16, sm: 8,
xl: 6,
xxl: 8
});
const wrapperCol = reactive({
xs: 24,
sm: 16,
});
//
const superQueryConfig = reactive(superQuerySchema);
/**
* 高级查询事件
*/
function handleSuperQuery(params) {
Object.keys(params).map((k) => {
queryParam[k] = params[k];
}); });
searchQuery();
}
// /**
const superQueryConfig = reactive(superQuerySchema); * 新增事件
*/
function handleAdd() {
registerModal.value.disableSubmit = false;
registerModal.value.add();
}
/** /**
* 高级查询事件 * 编辑事件
*/ */
function handleSuperQuery(params) { function handleEdit(record: Recordable) {
Object.keys(params).map((k) => { registerModal.value.disableSubmit = false;
queryParam[k] = params[k]; registerModal.value.edit(record);
}); }
searchQuery();
}
/** /**
* 新增事件 * 详情
*/ */
function handleAdd() { function handleDetail(record: Recordable) {
registerModal.value.disableSubmit = false; registerModal.value.disableSubmit = true;
registerModal.value.add(); registerModal.value.edit(record);
} }
/** /**
* 编辑事件 * 删除事件
*/ */
function handleEdit(record: Recordable) { async function handleDelete(record) {
registerModal.value.disableSubmit = false; await deleteOne({ id: record.id }, handleSuccess);
registerModal.value.edit(record); }
}
/** /**
* 详情 * 批量删除事件
*/ */
function handleDetail(record: Recordable) { async function batchHandleDelete() {
registerModal.value.disableSubmit = true; await batchDelete({ ids: selectedRowKeys.value }, handleSuccess);
registerModal.value.edit(record); }
}
/** /**
* 删除事件 * 成功回调
*/ */
async function handleDelete(record) { function handleSuccess() {
await deleteOne({ id: record.id }, handleSuccess); (selectedRowKeys.value = []) && reload();
} }
/** /**
* 批量删除事件 * 操作栏
*/ */
async function batchHandleDelete() { function getTableAction(record) {
await batchDelete({ ids: selectedRowKeys.value }, handleSuccess); return [
} {
label: '编辑',
onClick: handleEdit.bind(null, record),
auth: 'nuIotTqApiRequestLog:nu_iot_tq_api_request_log:edit'
},
];
}
/** /**
* 成功回调 * 下拉操作栏
*/ */
function handleSuccess() { function getDropDownAction(record) {
(selectedRowKeys.value = []) && reload(); return [
} {
label: '详情',
/** onClick: handleDetail.bind(null, record),
* 操作栏 }, {
*/ label: '删除',
function getTableAction(record) { popConfirm: {
return [ title: '是否确认删除',
{ confirm: handleDelete.bind(null, record),
label: '编辑', placement: 'topLeft',
onClick: handleEdit.bind(null, record),
auth: 'nuIotTqApiRequestLog:nu_iot_tq_api_request_log:edit'
}, },
]; auth: 'nuIotTqApiRequestLog:nu_iot_tq_api_request_log:delete'
} }
]
}
/** /**
* 下拉操作栏 * 查询
*/ */
function getDropDownAction(record) { function searchQuery() {
return [ reload();
{ }
label: '详情',
onClick: handleDetail.bind(null, record),
}, {
label: '删除',
popConfirm: {
title: '是否确认删除',
confirm: handleDelete.bind(null, record),
placement: 'topLeft',
},
auth: 'nuIotTqApiRequestLog:nu_iot_tq_api_request_log:delete'
}
]
}
/** /**
* 查询 * 重置
*/ */
function searchQuery() { function searchReset() {
reload(); formRef.value.resetFields();
} selectedRowKeys.value = [];
//
reload();
}
/** function init(record) {
* 重置
*/
function searchReset() {
formRef.value.resetFields();
selectedRowKeys.value = [];
//
reload();
}
function init(record) {
console.log("🚀 ~ init ~ record:", record) console.log("🚀 ~ init ~ record:", record)
queryParam.cid = record.cid; queryParam.cid = record.cid;
queryParam.type = record.type; queryParam.type = record.type;
reload(); reload();
} }
defineExpose({ defineExpose({
init, init,
}); });
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
.jeecg-basic-table-form-container { .jeecg-basic-table-form-container {
padding: 0; padding: 0;
.table-page-search-submitButtons {
display: block; .table-page-search-submitButtons {
margin-bottom: 24px; display: block;
white-space: nowrap; margin-bottom: 24px;
} white-space: nowrap;
.query-group-cust{
min-width: 100px !important;
}
.query-group-split-cust{
width: 30px;
display: inline-block;
text-align: center
}
.ant-form-item:not(.ant-form-item-with-help){
margin-bottom: 16px;
height: 32px;
}
:deep(.ant-picker),:deep(.ant-input-number){
width: 100%;
}
} }
.query-group-cust {
min-width: 100px !important;
}
.query-group-split-cust {
width: 30px;
display: inline-block;
text-align: center
}
.ant-form-item:not(.ant-form-item-with-help) {
margin-bottom: 16px;
height: 32px;
}
:deep(.ant-picker),
:deep(.ant-input-number) {
width: 100%;
}
}
</style> </style>

View File

@ -1,5 +1,5 @@
<template> <template>
<div class="p-2"> <div>
<!--引用表格--> <!--引用表格-->
<BasicTable @register="registerTable"> <BasicTable @register="registerTable">
<!--插槽:table标题--> <!--插槽:table标题-->

View File

@ -1,5 +1,5 @@
<template> <template>
<div class="p-2"> <div>
<!--引用表格--> <!--引用表格-->
<BasicTable @register="registerTable"> <BasicTable @register="registerTable">
<!--插槽:table标题--> <!--插槽:table标题-->

View File

@ -1,7 +1,7 @@
<template> <template>
<div class="p-2"> <div class="p-2">
<a-tabs v-model:activeKey="activeKey" type="card" @change="handleChange"> <a-tabs v-model:activeKey="activeKey" type="card" @change="handleChange">
<a-tab-pane key="3" tab="抄表" > <a-tab-pane key="3" tab="抄表">
<ApiRequestLogList ref="ApiRequestLogListModal3"></ApiRequestLogList> <ApiRequestLogList ref="ApiRequestLogListModal3"></ApiRequestLogList>
</a-tab-pane> </a-tab-pane>
<a-tab-pane key="9" tab="清零" force-render> <a-tab-pane key="9" tab="清零" force-render>
@ -18,76 +18,86 @@
</template> </template>
<script lang="ts" name="departUtils-sysDepart" setup> <script lang="ts" name="departUtils-sysDepart" setup>
import { ref, reactive } from 'vue'; import { ref, reactive } from 'vue';
import ApiRequestLogList from '/@/views/iot/tq/ApiRequestLog/ApiRequestLogList.vue'; import ApiRequestLogList from '/@/views/iot/tq/ApiRequestLog/ApiRequestLogList.vue';
import ApiRequestLogList2 from '/@/views/iot/tq/ApiRequestLog/ApiRequestLogList2.vue'; import ApiRequestLogList2 from '/@/views/iot/tq/ApiRequestLog/ApiRequestLogList2.vue';
const activeKey= ref('3'); const activeKey = ref('3');
const dbsbInfo = ref<any>({}); const dbsbInfo = ref<any>({});
const ApiRequestLogListModal9 = ref(); const ApiRequestLogListModal9 = ref();
const ApiRequestLogListModal3 = ref(); const ApiRequestLogListModal3 = ref();
const ApiRequestLogListModal10 = ref(); const ApiRequestLogListModal10 = ref();
const ApiRequestLogListModal11 = ref(); const ApiRequestLogListModal11 = ref();
function initLog(record){ function initLog(record) {
activeKey.value = "3"; activeKey.value = "3";
getDataList(activeKey.value, record); getDataList(activeKey.value, record);
dbsbInfo.value = record; dbsbInfo.value = record;
}
function getDataList(type, record) {
console.log("🚀 ~ getDataList ~ type, record:", type, record)
var params = {
type: type,
cid: record.cid
} }
if (type == '9') {
function getDataList(type, record) { ApiRequestLogListModal9.value.init(params);
console.log("🚀 ~ getDataList ~ type, record:", type, record) } else if (type == '3') {
var params = { ApiRequestLogListModal3.value.init(params);
type: type, } else if (type == '10') {
cid: record.cid ApiRequestLogListModal10.value.init(params);
} } else if (type == '11') {
if(type == '9'){ ApiRequestLogListModal11.value.init(params);
ApiRequestLogListModal9.value.init(params);
}else if(type == '3'){
ApiRequestLogListModal3.value.init(params);
}else if(type == '10'){
ApiRequestLogListModal10.value.init(params);
}else if(type == '11'){
ApiRequestLogListModal11.value.init(params);
}
} }
}
function handleChange(key) { function handleChange(key) {
console.log("🚀 ~ handleChange ~ key:", key) console.log("🚀 ~ handleChange ~ key:", key)
activeKey.value = key; activeKey.value = key;
getDataList(key, dbsbInfo.value); getDataList(key, dbsbInfo.value);
} }
defineExpose({ defineExpose({
initLog, initLog,
}); });
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
.jeecg-basic-table-form-container { .jeecg-basic-table-form-container {
padding: 0; padding: 0;
.table-page-search-submitButtons {
display: block; .table-page-search-submitButtons {
margin-bottom: 24px; display: block;
white-space: nowrap; margin-bottom: 24px;
} white-space: nowrap;
.query-group-cust{
min-width: 100px !important;
}
.query-group-split-cust{
width: 30px;
display: inline-block;
text-align: center
}
.ant-form-item:not(.ant-form-item-with-help){
margin-bottom: 16px;
height: 32px;
}
:deep(.ant-picker),:deep(.ant-input-number){
width: 100%;
}
} }
.query-group-cust {
min-width: 100px !important;
}
.query-group-split-cust {
width: 30px;
display: inline-block;
text-align: center
}
.ant-form-item:not(.ant-form-item-with-help) {
margin-bottom: 16px;
height: 32px;
}
:deep(.ant-picker),
:deep(.ant-input-number) {
width: 100%;
}
}
:deep(.ant-tabs-nav) {
margin: 0 0 0 0;
}
</style> </style>

View File

@ -1,9 +1,10 @@
<template> <template>
<!-- <j-modal :title="title" width="70%" :visible="visible" @ok="handleOk" :okButtonProps="{ class: { 'jee-hidden': disableSubmit } }" @cancel="handleCancel" cancelText="关闭"> --> <!-- <j-modal :title="title" width="70%" :visible="visible" @ok="handleOk" :okButtonProps="{ class: { 'jee-hidden': disableSubmit } }" @cancel="handleCancel" cancelText="关闭"> -->
<a-drawer :title="title" :width="width" v-model:visible="visible" :closable="true" <a-drawer :title="title" :width="width" v-model:visible="visible" :closable="true"
:footer-style="{ textAlign: 'right' }" @close="handleCancel"> :footer-style="{ textAlign: 'right' }" :bodyStyle="{ padding: '14px' }" @close="handleCancel">
<DepartUtilsList ref="registerForm" @ok="submitCallback" :formDisabled="disableSubmit" :formBpm="false"></DepartUtilsList> <DepartUtilsList ref="registerForm" @ok="submitCallback" :formDisabled="disableSubmit" :formBpm="false">
</DepartUtilsList>
<template #footer> <template #footer>
<a-button type="primary" style="margin-right: 8px" @click="handleCancel">关闭</a-button> <a-button type="primary" style="margin-right: 8px" @click="handleCancel">关闭</a-button>
<!-- <a-button type="primary" @click="handleOk" v-if="!disableSubmit">确认</a-button> --> <!-- <a-button type="primary" @click="handleOk" v-if="!disableSubmit">确认</a-button> -->
@ -13,62 +14,62 @@
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
import { ref, nextTick, defineExpose } from 'vue'; import { ref, nextTick, defineExpose } from 'vue';
import DepartUtilsList from './ApiLogList.vue' import DepartUtilsList from './ApiLogList.vue'
import JModal from '/@/components/Modal/src/JModal/JModal.vue'; import JModal from '/@/components/Modal/src/JModal/JModal.vue';
const title = ref<string>(''); const title = ref<string>('');
const width = ref<string>('70%'); const width = ref<string>('70%');
const visible = ref<boolean>(false); const visible = ref<boolean>(false);
const disableSubmit = ref<boolean>(false); const disableSubmit = ref<boolean>(false);
const registerForm = ref(); const registerForm = ref();
const emit = defineEmits(['register', 'success']); const emit = defineEmits(['register', 'success']);
/** /**
* 日志 * 日志
* @param record * @param record
*/ */
function showApiLog(record) { function showApiLog(record) {
title.value = '日志'; title.value = '日志';
visible.value = true; visible.value = true;
nextTick(() => { nextTick(() => {
registerForm.value.initLog(record); registerForm.value.initLog(record);
});
}
/**
* 确定按钮点击事件
*/
function handleOk() {
registerForm.value.submitForm();
}
/**
* form保存回调事件
*/
function submitCallback(params) {
handleCancel();
emit('success',params);
}
/**
* 取消按钮回调事件
*/
function handleCancel() {
visible.value = false;
}
defineExpose({
showApiLog,
disableSubmit,
}); });
}
/**
* 确定按钮点击事件
*/
function handleOk() {
registerForm.value.submitForm();
}
/**
* form保存回调事件
*/
function submitCallback(params) {
handleCancel();
emit('success', params);
}
/**
* 取消按钮回调事件
*/
function handleCancel() {
visible.value = false;
}
defineExpose({
showApiLog,
disableSubmit,
});
</script> </script>
<style lang="less"> <style lang="less">
/**隐藏样式-modal确定按钮 */ /**隐藏样式-modal确定按钮 */
.jee-hidden { .jee-hidden {
display: none !important; display: none !important;
} }
</style> </style>
<style lang="less" scoped></style> <style lang="less" scoped></style>

View File

@ -1,7 +1,7 @@
<template> <template>
<div class="p-2"> <div class="p-2">
<a-tabs v-model:activeKey="activeKey" type="card" @change="handleChange"> <a-tabs v-model:activeKey="activeKey" type="card" @change="handleChange">
<a-tab-pane key="42" tab="抄表" > <a-tab-pane key="42" tab="抄表">
<ApiRequestLogList3 ref="ApiRequestLogListModal42"></ApiRequestLogList3> <ApiRequestLogList3 ref="ApiRequestLogListModal42"></ApiRequestLogList3>
</a-tab-pane> </a-tab-pane>
<a-tab-pane key="49" tab="清零" force-render> <a-tab-pane key="49" tab="清零" force-render>
@ -18,76 +18,87 @@
</template> </template>
<script lang="ts" name="departUtils-sysDepart" setup> <script lang="ts" name="departUtils-sysDepart" setup>
import { ref, reactive } from 'vue'; import { ref, reactive } from 'vue';
import ApiRequestLogList3 from '/@/views/iot/tq/ApiRequestLog/ApiRequestLogList3.vue'; import ApiRequestLogList3 from '/@/views/iot/tq/ApiRequestLog/ApiRequestLogList3.vue';
import ApiRequestLogList2 from '/@/views/iot/tq/ApiRequestLog/ApiRequestLogList2.vue'; import ApiRequestLogList2 from '/@/views/iot/tq/ApiRequestLog/ApiRequestLogList2.vue';
const activeKey= ref('42'); const activeKey = ref('42');
const dbsbInfo = ref<any>({}); const dbsbInfo = ref<any>({});
const ApiRequestLogListModal42 = ref(); const ApiRequestLogListModal42 = ref();
const ApiRequestLogListModal43 = ref(); const ApiRequestLogListModal43 = ref();
const ApiRequestLogListModal49 = ref(); const ApiRequestLogListModal49 = ref();
const ApiRequestLogListModal53 = ref(); const ApiRequestLogListModal53 = ref();
function initLog(record){ function initLog(record) {
activeKey.value = "42"; activeKey.value = "42";
getDataList(activeKey.value, record); getDataList(activeKey.value, record);
dbsbInfo.value = record; dbsbInfo.value = record;
}
function getDataList(type, record) {
console.log("🚀 ~ getDataList ~ type, record:", type, record)
var params = {
type: type,
cid: record.cid
} }
if (type == '42') {
function getDataList(type, record) { ApiRequestLogListModal42.value.init(params);
console.log("🚀 ~ getDataList ~ type, record:", type, record) } else if (type == '43') {
var params = { ApiRequestLogListModal43.value.init(params);
type: type, } else if (type == '49') {
cid: record.cid ApiRequestLogListModal49.value.init(params);
} } else if (type == '53') {
if(type == '42'){ ApiRequestLogListModal53.value.init(params);
ApiRequestLogListModal42.value.init(params);
}else if(type == '43'){
ApiRequestLogListModal43.value.init(params);
}else if(type == '49'){
ApiRequestLogListModal49.value.init(params);
}else if(type == '53'){
ApiRequestLogListModal53.value.init(params);
}
} }
}
function handleChange(key) { function handleChange(key) {
console.log("🚀 ~ handleChange ~ key:", key) console.log("🚀 ~ handleChange ~ key:", key)
activeKey.value = key; activeKey.value = key;
getDataList(key, dbsbInfo.value); getDataList(key, dbsbInfo.value);
} }
defineExpose({ defineExpose({
initLog, initLog,
}); });
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
.jeecg-basic-table-form-container { .jeecg-basic-table-form-container {
padding: 0; padding: 0;
.table-page-search-submitButtons { margin-bottom: 14px;
display: block;
margin-bottom: 24px; .table-page-search-submitButtons {
white-space: nowrap; display: block;
} margin-bottom: 14px;
.query-group-cust{ white-space: nowrap;
min-width: 100px !important;
}
.query-group-split-cust{
width: 30px;
display: inline-block;
text-align: center
}
.ant-form-item:not(.ant-form-item-with-help){
margin-bottom: 16px;
height: 32px;
}
:deep(.ant-picker),:deep(.ant-input-number){
width: 100%;
}
} }
.query-group-cust {
min-width: 100px !important;
}
.query-group-split-cust {
width: 30px;
display: inline-block;
text-align: center
}
.ant-form-item:not(.ant-form-item-with-help) {
margin-bottom: 14px;
height: 32px;
}
:deep(.ant-picker),
:deep(.ant-input-number) {
width: 100%;
}
}
:deep(.ant-tabs-nav) {
margin: 0 0 0 0;
}
</style> </style>

View File

@ -1,7 +1,7 @@
<template> <template>
<!-- <j-modal :title="title" width="70%" :visible="visible" @ok="handleOk" :okButtonProps="{ class: { 'jee-hidden': disableSubmit } }" @cancel="handleCancel" cancelText="关闭"> --> <!-- <j-modal :title="title" width="70%" :visible="visible" @ok="handleOk" :okButtonProps="{ class: { 'jee-hidden': disableSubmit } }" @cancel="handleCancel" cancelText="关闭"> -->
<a-drawer :title="title" :width="width" v-model:visible="visible" :closable="true" <a-drawer :title="title" :width="width" v-model:visible="visible" :closable="true"
:footer-style="{ textAlign: 'right' }" @close="handleCancel"> :footer-style="{ textAlign: 'right' }" :bodyStyle="{ padding: '14px' }" @close="handleCancel">
<WaterApiLogList ref="registerForm" @ok="submitCallback" :formDisabled="disableSubmit" :formBpm="false"></WaterApiLogList> <WaterApiLogList ref="registerForm" @ok="submitCallback" :formDisabled="disableSubmit" :formBpm="false"></WaterApiLogList>
<template #footer> <template #footer>
<a-button type="primary" style="margin-right: 8px" @click="handleCancel">关闭</a-button> <a-button type="primary" style="margin-right: 8px" @click="handleCancel">关闭</a-button>

View File

@ -1,56 +1,84 @@
<template> <template>
<a-tabs v-model:activeKey="activeKey" type="card" @change="handleChange"> <div class="p-2">
<a-tab-pane key="1" tab="抄表"> <a-tabs v-model:activeKey="activeKey" type="card" @change="handleChange">
<ApiLogList ref="apiLogList"></ApiLogList> <a-tab-pane key="1" tab="抄表">
</a-tab-pane> <ApiLogList ref="apiLogList"></ApiLogList>
<a-tab-pane key="2" tab="告警" force-render> </a-tab-pane>
<AlarmList ref="alarmList"></AlarmList> <a-tab-pane key="2" tab="告警" force-render>
</a-tab-pane> <AlarmList ref="alarmList"></AlarmList>
</a-tabs> </a-tab-pane>
</a-tabs>
</div>
</template> </template>
<script lang="ts" name="departUtils-sysDepart" setup> <script lang="ts" name="departUtils-sysDepart" setup>
import { ref, reactive } from 'vue'; import { ref, reactive } from 'vue';
import ApiLogList from './ApiLogList.vue'; import ApiLogList from './ApiLogList.vue';
import AlarmList from './AlarmList.vue'; import AlarmList from './AlarmList.vue';
const activeKey= ref('1'); const activeKey = ref('1');
const dbsbInfo = ref<any>({}); const dbsbInfo = ref<any>({});
const apiLogList = ref(); const apiLogList = ref();
const alarmList = ref(); const alarmList = ref();
function init(record){ function init(record) {
activeKey.value = "1"; activeKey.value = "1";
getDataList(activeKey.value, record); getDataList(activeKey.value, record);
dbsbInfo.value = record; dbsbInfo.value = record;
}
function getDataList(type, record) {
console.log("🚀 ~ getDataList ~ type, record:", type, record)
var params = {
sn: record.sn
} }
if (type == '1') {
function getDataList(type, record) { apiLogList.value.init(params);
console.log("🚀 ~ getDataList ~ type, record:", type, record) } else if (type == '2') {
var params = { alarmList.value.init(params);
sn: record.sn
}
if(type == '1'){
apiLogList.value.init(params);
}else if(type == '2'){
alarmList.value.init(params);
}
} }
}
function handleChange(key) { function handleChange(key) {
console.log("🚀 ~ handleChange ~ key:", key) console.log("🚀 ~ handleChange ~ key:", key)
activeKey.value = key; activeKey.value = key;
getDataList(key, dbsbInfo.value); getDataList(key, dbsbInfo.value);
} }
defineExpose({ defineExpose({
init, init,
}); });
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
//:deep(.ant-tabs-nav){ .jeecg-basic-table-form-container {
// margin: 0 !important; padding: 0;
//}
.table-page-search-submitButtons {
display: block;
margin-bottom: 24px;
white-space: nowrap;
}
.query-group-cust {
min-width: 100px !important;
}
.query-group-split-cust {
width: 30px;
display: inline-block;
text-align: center
}
.ant-form-item:not(.ant-form-item-with-help) {
margin-bottom: 16px;
height: 32px;
}
:deep(.ant-picker),
:deep(.ant-input-number) {
width: 100%;
}
}
</style> </style>

View File

@ -1,9 +1,10 @@
<template> <template>
<!-- <j-modal :title="title" width="70%" :visible="visible" @ok="handleOk" :okButtonProps="{ class: { 'jee-hidden': disableSubmit } }" @cancel="handleCancel" cancelText="关闭"> --> <!-- <j-modal :title="title" width="70%" :visible="visible" @ok="handleOk" :okButtonProps="{ class: { 'jee-hidden': disableSubmit } }" @cancel="handleCancel" cancelText="关闭"> -->
<a-drawer :title="title" :width="width" v-model:visible="visible" :closable="true" <a-drawer :title="title" :width="width" v-model:visible="visible" :closable="true"
:footer-style="{ textAlign: 'right' }" @close="handleCancel"> :footer-style="{ textAlign: 'right' }" :bodyStyle="{ padding: '14px' }" @close="handleCancel">
<ApiLogAlarmList ref="registerForm" @ok="submitCallback" :formDisabled="disableSubmit" :formBpm="false"></ApiLogAlarmList> <ApiLogAlarmList ref="registerForm" @ok="submitCallback" :formDisabled="disableSubmit" :formBpm="false">
</ApiLogAlarmList>
<template #footer> <template #footer>
<a-button type="primary" style="margin-right: 8px" @click="handleCancel">关闭</a-button> <a-button type="primary" style="margin-right: 8px" @click="handleCancel">关闭</a-button>
<!-- <a-button type="primary" @click="handleOk" v-if="!disableSubmit">确认</a-button> --> <!-- <a-button type="primary" @click="handleOk" v-if="!disableSubmit">确认</a-button> -->
@ -13,62 +14,62 @@
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
import { ref, nextTick, defineExpose } from 'vue'; import { ref, nextTick, defineExpose } from 'vue';
import ApiLogAlarmList from './ApiLogAlarmList.vue' import ApiLogAlarmList from './ApiLogAlarmList.vue'
import JModal from '/@/components/Modal/src/JModal/JModal.vue'; import JModal from '/@/components/Modal/src/JModal/JModal.vue';
const title = ref<string>(''); const title = ref<string>('');
const width = ref<string>('70%'); const width = ref<string>('70%');
const visible = ref<boolean>(false); const visible = ref<boolean>(false);
const disableSubmit = ref<boolean>(false); const disableSubmit = ref<boolean>(false);
const registerForm = ref(); const registerForm = ref();
const emit = defineEmits(['register', 'success']); const emit = defineEmits(['register', 'success']);
/** /**
* 日志 * 日志
* @param record * @param record
*/ */
function showLogAlarm(record) { function showLogAlarm(record) {
title.value = '日志'; title.value = '日志';
visible.value = true; visible.value = true;
nextTick(() => { nextTick(() => {
registerForm.value.init(record); registerForm.value.init(record);
});
}
/**
* 确定按钮点击事件
*/
function handleOk() {
registerForm.value.submitForm();
}
/**
* form保存回调事件
*/
function submitCallback(params) {
handleCancel();
emit('success',params);
}
/**
* 取消按钮回调事件
*/
function handleCancel() {
visible.value = false;
}
defineExpose({
showLogAlarm,
disableSubmit,
}); });
}
/**
* 确定按钮点击事件
*/
function handleOk() {
registerForm.value.submitForm();
}
/**
* form保存回调事件
*/
function submitCallback(params) {
handleCancel();
emit('success', params);
}
/**
* 取消按钮回调事件
*/
function handleCancel() {
visible.value = false;
}
defineExpose({
showLogAlarm,
disableSubmit,
});
</script> </script>
<style lang="less"> <style lang="less">
/**隐藏样式-modal确定按钮 */ /**隐藏样式-modal确定按钮 */
.jee-hidden { .jee-hidden {
display: none !important; display: none !important;
} }
</style> </style>
<style lang="less" scoped></style> <style lang="less" scoped></style>

View File

@ -111,5 +111,34 @@
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
.jeecg-basic-table-form-container {
padding: 0;
.table-page-search-submitButtons {
display: block;
margin-bottom: 24px;
white-space: nowrap;
}
.query-group-cust {
min-width: 100px !important;
}
.query-group-split-cust {
width: 30px;
display: inline-block;
text-align: center
}
.ant-form-item:not(.ant-form-item-with-help) {
margin-bottom: 16px;
height: 32px;
}
:deep(.ant-picker),
:deep(.ant-input-number) {
width: 100%;
}
}
</style> </style>