添加绑定机构护理单元查看日志功能
This commit is contained in:
parent
b5d24efeae
commit
fc25437dc3
|
@ -0,0 +1,72 @@
|
|||
import { defHttp } from '/@/utils/http/axios';
|
||||
import { useMessage } from "/@/hooks/web/useMessage";
|
||||
|
||||
const { createConfirm } = useMessage();
|
||||
|
||||
enum Api {
|
||||
list = '/nuEmployeesAdvisoryInfo/nuEmployeesAdvisoryInfo/list',
|
||||
save='/nuEmployeesAdvisoryInfo/nuEmployeesAdvisoryInfo/add',
|
||||
edit='/nuEmployeesAdvisoryInfo/nuEmployeesAdvisoryInfo/edit',
|
||||
deleteOne = '/nuEmployeesAdvisoryInfo/nuEmployeesAdvisoryInfo/delete',
|
||||
deleteBatch = '/nuEmployeesAdvisoryInfo/nuEmployeesAdvisoryInfo/deleteBatch',
|
||||
importExcel = '/nuEmployeesAdvisoryInfo/nuEmployeesAdvisoryInfo/importExcel',
|
||||
exportXls = '/nuEmployeesAdvisoryInfo/nuEmployeesAdvisoryInfo/exportXls',
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出api
|
||||
* @param params
|
||||
*/
|
||||
export const getExportUrl = Api.exportXls;
|
||||
|
||||
/**
|
||||
* 导入api
|
||||
*/
|
||||
export const getImportUrl = Api.importExcel;
|
||||
|
||||
/**
|
||||
* 列表接口
|
||||
* @param params
|
||||
*/
|
||||
export const list = (params) => defHttp.get({ url: Api.list, params });
|
||||
|
||||
/**
|
||||
* 删除单个
|
||||
* @param params
|
||||
* @param handleSuccess
|
||||
*/
|
||||
export const deleteOne = (params,handleSuccess) => {
|
||||
return defHttp.delete({url: Api.deleteOne, params}, {joinParamsToUrl: true}).then(() => {
|
||||
handleSuccess();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
* @param params
|
||||
* @param handleSuccess
|
||||
*/
|
||||
export const batchDelete = (params, handleSuccess) => {
|
||||
createConfirm({
|
||||
iconType: 'warning',
|
||||
title: '确认删除',
|
||||
content: '是否删除选中数据',
|
||||
okText: '确认',
|
||||
cancelText: '取消',
|
||||
onOk: () => {
|
||||
return defHttp.delete({url: Api.deleteBatch, data: params}, {joinParamsToUrl: true}).then(() => {
|
||||
handleSuccess();
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存或者更新
|
||||
* @param params
|
||||
* @param isUpdate
|
||||
*/
|
||||
export const saveOrUpdate = (params, isUpdate) => {
|
||||
let url = isUpdate ? Api.edit : Api.save;
|
||||
return defHttp.post({ url: url, params }, { isTransformResponse: false });
|
||||
}
|
|
@ -0,0 +1,248 @@
|
|||
import {BasicColumn} from '/@/components/Table';
|
||||
import {FormSchema} from '/@/components/Table';
|
||||
import { rules} from '/@/utils/helper/validator';
|
||||
import { render } from '/@/utils/common/renderUtils';
|
||||
import { getWeekMonthQuarterYear } from '/@/utils';
|
||||
import {JVxeTypes, JVxeColumn, JVxeTableInstance} from '/@/components/jeecg/JVxeTable/types'
|
||||
//列表数据
|
||||
export const columns: BasicColumn[] = [
|
||||
{
|
||||
title: '联系电话',
|
||||
align: "center",
|
||||
dataIndex: 'tel'
|
||||
},
|
||||
{
|
||||
title: '状态',
|
||||
align: "center",
|
||||
dataIndex: 'status',
|
||||
},
|
||||
{
|
||||
title: '审核备注',
|
||||
align: "center",
|
||||
dataIndex: 'content',
|
||||
defaultHidden: true,
|
||||
},
|
||||
{
|
||||
title: '机构是否入驻',
|
||||
align: "center",
|
||||
dataIndex: 'izEntry'
|
||||
},
|
||||
{
|
||||
title: '咨询人姓名',
|
||||
align: "center",
|
||||
dataIndex: 'name'
|
||||
},
|
||||
{
|
||||
title: '性别',
|
||||
align: "center",
|
||||
dataIndex: 'sex'
|
||||
},
|
||||
{
|
||||
title: '民族',
|
||||
align: "center",
|
||||
dataIndex: 'national',
|
||||
defaultHidden: true,
|
||||
},
|
||||
{
|
||||
title: '出生日期',
|
||||
align: "center",
|
||||
dataIndex: 'birthDate',
|
||||
customRender:({text}) =>{
|
||||
text = !text ? "" : (text.length > 10 ? text.substr(0,10) : text);
|
||||
return text;
|
||||
},
|
||||
defaultHidden: true,
|
||||
},
|
||||
{
|
||||
title: '住址',
|
||||
align: "center",
|
||||
dataIndex: 'idCardAddress',
|
||||
defaultHidden: true,
|
||||
},
|
||||
{
|
||||
title: '身份证号',
|
||||
align: "center",
|
||||
dataIndex: 'idCard'
|
||||
},
|
||||
{
|
||||
title: '签发机关',
|
||||
align: "center",
|
||||
dataIndex: 'issuingAuthority',
|
||||
defaultHidden: true,
|
||||
},
|
||||
{
|
||||
title: '有效开始日期',
|
||||
align: "center",
|
||||
dataIndex: 'startTime',
|
||||
customRender:({text}) =>{
|
||||
text = !text ? "" : (text.length > 10 ? text.substr(0,10) : text);
|
||||
return text;
|
||||
},
|
||||
defaultHidden: true,
|
||||
},
|
||||
{
|
||||
title: '有效结束日期',
|
||||
align: "center",
|
||||
dataIndex: 'endTime',
|
||||
customRender:({text}) =>{
|
||||
text = !text ? "" : (text.length > 10 ? text.substr(0,10) : text);
|
||||
return text;
|
||||
},
|
||||
defaultHidden: true,
|
||||
},
|
||||
{
|
||||
title: '身份证正面',
|
||||
align: "center",
|
||||
dataIndex: 'cardZmPath',
|
||||
customRender: render.renderImage,
|
||||
defaultHidden: true,
|
||||
},
|
||||
{
|
||||
title: '身份证反面',
|
||||
align: "center",
|
||||
dataIndex: 'cardFmPath',
|
||||
customRender: render.renderImage,
|
||||
defaultHidden: true,
|
||||
},
|
||||
{
|
||||
title: '婚否',
|
||||
align: "center",
|
||||
dataIndex: 'maritalStatus',
|
||||
defaultHidden: true,
|
||||
},
|
||||
{
|
||||
title: '身高',
|
||||
align: "center",
|
||||
dataIndex: 'height',
|
||||
defaultHidden: true,
|
||||
},
|
||||
{
|
||||
title: '体重',
|
||||
align: "center",
|
||||
dataIndex: 'weight',
|
||||
defaultHidden: true,
|
||||
},
|
||||
{
|
||||
title: '健康状况',
|
||||
align: "center",
|
||||
dataIndex: 'healthStatus'
|
||||
},
|
||||
{
|
||||
title: '政治面貌',
|
||||
align: "center",
|
||||
dataIndex: 'politicalAppearance',
|
||||
defaultHidden: true,
|
||||
},
|
||||
{
|
||||
title: '紧急联系人姓名',
|
||||
align: "center",
|
||||
dataIndex: 'contactName'
|
||||
},
|
||||
{
|
||||
title: '紧急联系人电话',
|
||||
align: "center",
|
||||
dataIndex: 'contactTel'
|
||||
},
|
||||
{
|
||||
title: '紧急联系人与本人关系',
|
||||
align: "center",
|
||||
dataIndex: 'contactRelationship',
|
||||
defaultHidden: true,
|
||||
},
|
||||
{
|
||||
title: '户口性质',
|
||||
align: "center",
|
||||
dataIndex: 'hukouType',
|
||||
defaultHidden: true,
|
||||
},
|
||||
{
|
||||
title: '银行卡正面',
|
||||
align: "center",
|
||||
dataIndex: 'bankZmPath',
|
||||
customRender: render.renderImage,
|
||||
defaultHidden: true,
|
||||
},
|
||||
{
|
||||
title: '银行卡反面',
|
||||
align: "center",
|
||||
dataIndex: 'bankFmPath',
|
||||
customRender: render.renderImage,
|
||||
defaultHidden: true,
|
||||
},
|
||||
{
|
||||
title: '开户行',
|
||||
align: "center",
|
||||
dataIndex: 'openingBank',
|
||||
defaultHidden: true,
|
||||
},
|
||||
{
|
||||
title: '银行卡号',
|
||||
align: "center",
|
||||
dataIndex: 'bankCard',
|
||||
defaultHidden: true,
|
||||
},
|
||||
{
|
||||
title: '健康证正面',
|
||||
align: "center",
|
||||
dataIndex: 'healthZmPath',
|
||||
customRender: render.renderImage,
|
||||
defaultHidden: true,
|
||||
},
|
||||
{
|
||||
title: '健康证反面',
|
||||
align: "center",
|
||||
dataIndex: 'healthFmPath',
|
||||
customRender: render.renderImage,
|
||||
defaultHidden: true,
|
||||
},
|
||||
{
|
||||
title: '资质证(可多张)',
|
||||
align: "center",
|
||||
dataIndex: 'qualificationPath',
|
||||
customRender: render.renderImage,
|
||||
defaultHidden: true,
|
||||
},
|
||||
{
|
||||
title: '无犯罪正面',
|
||||
align: "center",
|
||||
dataIndex: 'noCrimeCertificate',
|
||||
customRender: render.renderImage,
|
||||
defaultHidden: true,
|
||||
},
|
||||
];
|
||||
|
||||
// 高级查询数据
|
||||
export const superQuerySchema = {
|
||||
tel: {title: '联系电话',order: 0,view: 'text', type: 'string',},
|
||||
status: {title: '状态',order: 1,view: 'text', type: 'string',},
|
||||
content: {title: '审核备注',order: 2,view: 'text', type: 'string',},
|
||||
izEntry: {title: '机构是否入驻',order: 3,view: 'text', type: 'string',},
|
||||
name: {title: '咨询人姓名',order: 4,view: 'text', type: 'string',},
|
||||
sex: {title: '性别',order: 5,view: 'text', type: 'string',},
|
||||
national: {title: '民族',order: 6,view: 'text', type: 'string',},
|
||||
birthDate: {title: '出生日期',order: 7,view: 'date', type: 'string',},
|
||||
idCardAddress: {title: '住址',order: 8,view: 'text', type: 'string',},
|
||||
idCard: {title: '身份证号',order: 9,view: 'text', type: 'string',},
|
||||
issuingAuthority: {title: '签发机关',order: 10,view: 'text', type: 'string',},
|
||||
startTime: {title: '有效开始日期',order: 11,view: 'date', type: 'string',},
|
||||
endTime: {title: '有效结束日期',order: 12,view: 'date', type: 'string',},
|
||||
cardZmPath: {title: '身份证正面',order: 13,view: 'image', type: 'string',},
|
||||
cardFmPath: {title: '身份证反面',order: 14,view: 'image', type: 'string',},
|
||||
maritalStatus: {title: '婚否',order: 15,view: 'text', type: 'string',},
|
||||
height: {title: '身高',order: 16,view: 'text', type: 'string',},
|
||||
weight: {title: '体重',order: 17,view: 'text', type: 'string',},
|
||||
healthStatus: {title: '健康状况',order: 18,view: 'text', type: 'string',},
|
||||
politicalAppearance: {title: '政治面貌',order: 19,view: 'text', type: 'string',},
|
||||
contactName: {title: '紧急联系人姓名',order: 20,view: 'text', type: 'string',},
|
||||
contactTel: {title: '紧急联系人电话',order: 21,view: 'text', type: 'string',},
|
||||
contactRelationship: {title: '紧急联系人与本人关系',order: 22,view: 'text', type: 'string',},
|
||||
hukouType: {title: '户口性质',order: 23,view: 'text', type: 'string',},
|
||||
bankZmPath: {title: '银行卡正面',order: 24,view: 'image', type: 'string',},
|
||||
bankFmPath: {title: '银行卡反面',order: 25,view: 'image', type: 'string',},
|
||||
openingBank: {title: '开户行',order: 26,view: 'text', type: 'string',},
|
||||
bankCard: {title: '银行卡号',order: 27,view: 'text', type: 'string',},
|
||||
healthZmPath: {title: '健康证正面',order: 28,view: 'image', type: 'string',},
|
||||
healthFmPath: {title: '健康证反面',order: 29,view: 'image', type: 'string',},
|
||||
qualificationPath: {title: '资质证(可多张)',order: 30,view: 'image', type: 'string',},
|
||||
noCrimeCertificate: {title: '无犯罪正面',order: 31,view: 'image', type: 'string',},
|
||||
};
|
|
@ -0,0 +1,257 @@
|
|||
<template>
|
||||
<div class="p-2">
|
||||
<!--查询区域-->
|
||||
<div class="jeecg-basic-table-form-container">
|
||||
<a-form ref="formRef" @keyup.enter.native="searchQuery" :model="queryParam" :label-col="labelCol" :wrapper-col="wrapperCol">
|
||||
<a-row :gutter="24">
|
||||
<a-col :lg="6">
|
||||
<a-form-item name="name">
|
||||
<template #label><span title="姓名">姓名</span></template>
|
||||
<JInput v-model:value="queryParam.name" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :lg="6">
|
||||
<a-form-item name="tel">
|
||||
<template #label><span title="联系电话">联系电话</span></template>
|
||||
<JInput v-model:value="queryParam.tel" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :lg="6">
|
||||
<a-form-item name="status">
|
||||
<template #label><span title="审批状态">审批状态</span></template>
|
||||
<j-dict-select-tag type="list" v-model:value="queryParam.status" dictCode="org_apply_status"
|
||||
placeholder="请选择审批状态" allow-clear />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :lg="6">
|
||||
<a-form-item name="orgBuildingArea">
|
||||
<template #label><span title="建筑面积">建筑面积</span></template>
|
||||
<JRangeNumber v-model:value="queryParam.orgBuildingArea" class="query-group-cust"></JRangeNumber>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :xl="6" :lg="7" :md="8" :sm="24">
|
||||
<span style="float: left; overflow: hidden" class="table-page-search-submitButtons">
|
||||
<a-col :lg="6">
|
||||
<a-button type="primary" preIcon="ant-design:search-outlined" @click="searchQuery">查询</a-button>
|
||||
<a-button type="primary" preIcon="ant-design:reload-outlined" @click="searchReset"
|
||||
style="margin-left: 8px">重置</a-button>
|
||||
</a-col>
|
||||
</span>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-form>
|
||||
</div>
|
||||
<!--引用表格-->
|
||||
<BasicTable @register="registerTable" >
|
||||
<!--插槽:table标题-->
|
||||
<template #tableTitle>
|
||||
<a-button type="primary" @click="handleAdd" preIcon="ant-design:plus-outlined"> 新增</a-button>
|
||||
</template>
|
||||
<!--操作栏-->
|
||||
<template #action="{ record }">
|
||||
<TableAction :actions="getTableAction(record)" />
|
||||
</template>
|
||||
<template v-slot:bodyCell="{ column, record, index, text }">
|
||||
</template>
|
||||
</BasicTable>
|
||||
<!-- 表单区域 -->
|
||||
<NuEmployeesAdvisoryInfoModal ref="registerModal" @success="handleSuccess"></NuEmployeesAdvisoryInfoModal>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" name="nuEmployeesAdvisoryInfo-nuEmployeesAdvisoryInfo" setup>
|
||||
import { ref, reactive } from 'vue';
|
||||
import { BasicTable, useTable, TableAction } from '/@/components/Table';
|
||||
import { useListPage } from '/@/hooks/system/useListPage';
|
||||
import { columns, superQuerySchema } from './NuEmployeesAdvisoryInfo.data';
|
||||
import { list, deleteOne, batchDelete, getImportUrl, getExportUrl } from './NuEmployeesAdvisoryInfo.api';
|
||||
import { downloadFile } from '/@/utils/common/renderUtils';
|
||||
import NuEmployeesAdvisoryInfoModal from './components/NuEmployeesAdvisoryInfoModal.vue'
|
||||
import { useUserStore } from '/@/store/modules/user';
|
||||
import JInput from "/@/components/Form/src/jeecg/components/JInput.vue";
|
||||
|
||||
const formRef = ref();
|
||||
const queryParam = reactive<any>({});
|
||||
const toggleSearchStatus = ref<boolean>(false);
|
||||
const registerModal = ref();
|
||||
const userStore = useUserStore();
|
||||
//注册table数据
|
||||
const { prefixCls, tableContext, onExportXls, onImportXls } = useListPage({
|
||||
tableProps: {
|
||||
title: '员工咨询信息',
|
||||
api: list,
|
||||
columns,
|
||||
canResize:false,
|
||||
useSearchForm: false,
|
||||
actionColumn: {
|
||||
width: 120,
|
||||
fixed: 'right',
|
||||
},
|
||||
beforeFetch: async (params) => {
|
||||
return Object.assign(params, queryParam);
|
||||
},
|
||||
},
|
||||
exportConfig: {
|
||||
name: "员工咨询信息",
|
||||
url: getExportUrl,
|
||||
params: queryParam,
|
||||
},
|
||||
importConfig: {
|
||||
url: getImportUrl,
|
||||
success: handleSuccess
|
||||
},
|
||||
});
|
||||
const [registerTable, { reload, collapseAll, updateTableDataRecord, findTableDataRecord, getDataSource }, { rowSelection, selectedRowKeys }] = tableContext;
|
||||
const labelCol = reactive({
|
||||
xs:24,
|
||||
sm:4,
|
||||
xl:6,
|
||||
xxl:4
|
||||
});
|
||||
const wrapperCol = reactive({
|
||||
xs: 24,
|
||||
sm: 20,
|
||||
});
|
||||
|
||||
// 高级查询配置
|
||||
const superQueryConfig = reactive(superQuerySchema);
|
||||
|
||||
/**
|
||||
* 高级查询事件
|
||||
*/
|
||||
function handleSuperQuery(params) {
|
||||
Object.keys(params).map((k) => {
|
||||
queryParam[k] = params[k];
|
||||
});
|
||||
searchQuery();
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增事件
|
||||
*/
|
||||
function handleAdd() {
|
||||
registerModal.value.disableSubmit = false;
|
||||
registerModal.value.add();
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑事件
|
||||
*/
|
||||
function handleEdit(record: Recordable) {
|
||||
registerModal.value.disableSubmit = false;
|
||||
registerModal.value.edit(record);
|
||||
}
|
||||
|
||||
/**
|
||||
* 详情
|
||||
*/
|
||||
function handleDetail(record: Recordable) {
|
||||
registerModal.value.disableSubmit = true;
|
||||
registerModal.value.edit(record);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除事件
|
||||
*/
|
||||
async function handleDelete(record) {
|
||||
await deleteOne({ id: record.id }, handleSuccess);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除事件
|
||||
*/
|
||||
async function batchHandleDelete() {
|
||||
await batchDelete({ ids: selectedRowKeys.value }, handleSuccess);
|
||||
}
|
||||
|
||||
/**
|
||||
* 成功回调
|
||||
*/
|
||||
function handleSuccess() {
|
||||
(selectedRowKeys.value = []) && reload();
|
||||
}
|
||||
|
||||
/**
|
||||
* 操作栏
|
||||
*/
|
||||
function getTableAction(record) {
|
||||
return [
|
||||
{
|
||||
label: '审批',
|
||||
onClick: handleEdit.bind(null, record),
|
||||
ifShow: record.status == '0' || record.status == null
|
||||
},
|
||||
{
|
||||
label: '详情',
|
||||
onClick: handleDetail.bind(null, record),
|
||||
}
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* 下拉操作栏
|
||||
*/
|
||||
function getDropDownAction(record) {
|
||||
return [
|
||||
{
|
||||
label: '详情',
|
||||
onClick: handleDetail.bind(null, record),
|
||||
}, {
|
||||
label: '删除',
|
||||
popConfirm: {
|
||||
title: '是否确认删除',
|
||||
confirm: handleDelete.bind(null, record),
|
||||
placement: 'topLeft',
|
||||
},
|
||||
auth: 'nuEmployeesAdvisoryInfo:nu_employees_advisory_info:delete'
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询
|
||||
*/
|
||||
function searchQuery() {
|
||||
reload();
|
||||
}
|
||||
|
||||
/**
|
||||
* 重置
|
||||
*/
|
||||
function searchReset() {
|
||||
formRef.value.resetFields();
|
||||
selectedRowKeys.value = [];
|
||||
//刷新数据
|
||||
reload();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
<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>
|
|
@ -0,0 +1,330 @@
|
|||
<template>
|
||||
<a-spin :spinning="confirmLoading">
|
||||
<JFormContainer :disabled="disabled">
|
||||
<template #detail>
|
||||
<a-form ref="formRef" class="antd-modal-form" :labelCol="labelCol" :wrapperCol="wrapperCol" name="NuEmployeesAdvisoryInfoForm">
|
||||
<a-row>
|
||||
<a-col :span="24">
|
||||
<SectionDivider :title="'基本信息'" />
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="身份证正面" v-bind="validateInfos.cardZmPath" id="NuEmployeesAdvisoryInfoForm-cardZmPath" name="cardZmPath">
|
||||
<j-image-upload :fileMax="1" text="无" v-model:value="formData.cardZmPath" disabled ></j-image-upload>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="身份证反面" v-bind="validateInfos.cardFmPath" id="NuEmployeesAdvisoryInfoForm-cardFmPath" name="cardFmPath">
|
||||
<j-image-upload :fileMax="1" text="无" v-model:value="formData.cardFmPath" disabled ></j-image-upload>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="咨询人姓名" v-bind="validateInfos.name" id="NuEmployeesAdvisoryInfoForm-name" name="name">
|
||||
<a-input v-model:value="formData.name" placeholder="请输入咨询人姓名" allow-clear disabled ></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="性别" v-bind="validateInfos.sex" id="NuEmployeesAdvisoryInfoForm-sex" name="sex">
|
||||
<a-input v-model:value="formData.sex" placeholder="请输入性别" allow-clear disabled ></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="民族" v-bind="validateInfos.national" id="NuEmployeesAdvisoryInfoForm-national" name="national">
|
||||
<a-input v-model:value="formData.national" placeholder="请输入民族" allow-clear disabled ></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="出生日期" v-bind="validateInfos.birthDate" id="NuEmployeesAdvisoryInfoForm-birthDate" name="birthDate">
|
||||
<a-date-picker placeholder="请选择出生日期" v-model:value="formData.birthDate" disabled value-format="YYYY-MM-DD" style="width: 100%" allow-clear />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="住址" v-bind="validateInfos.idCardAddress" id="NuEmployeesAdvisoryInfoForm-idCardAddress" name="idCardAddress">
|
||||
<a-input v-model:value="formData.idCardAddress" placeholder="请输入住址" allow-clear disabled ></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="身份证号" v-bind="validateInfos.idCard" id="NuEmployeesAdvisoryInfoForm-idCard" name="idCard">
|
||||
<a-input v-model:value="formData.idCard" placeholder="请输入身份证号" allow-clear disabled ></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="签发机关" v-bind="validateInfos.issuingAuthority" id="NuEmployeesAdvisoryInfoForm-issuingAuthority" name="issuingAuthority">
|
||||
<a-input v-model:value="formData.issuingAuthority" placeholder="请输入签发机关" allow-clear disabled ></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="有效开始日期" v-bind="validateInfos.startTime" id="NuEmployeesAdvisoryInfoForm-startTime" name="startTime">
|
||||
<a-date-picker placeholder="请选择有效开始日期" v-model:value="formData.startTime" disabled value-format="YYYY-MM-DD" style="width: 100%" allow-clear />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="有效结束日期" v-bind="validateInfos.endTime" id="NuEmployeesAdvisoryInfoForm-endTime" name="endTime">
|
||||
<a-date-picker placeholder="请选择有效结束日期" v-model:value="formData.endTime" disabled value-format="YYYY-MM-DD" style="width: 100%" allow-clear />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="联系电话" v-bind="validateInfos.tel" id="NuEmployeesAdvisoryInfoForm-tel" name="tel">
|
||||
<a-input v-model:value="formData.tel" placeholder="请输入联系电话" allow-clear disabled ></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<SectionDivider :title="'其他信息'" />
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="婚否" v-bind="validateInfos.maritalStatus" id="NuEmployeesAdvisoryInfoForm-maritalStatus" name="maritalStatus">
|
||||
<a-input v-model:value="formData.maritalStatus" placeholder="请输入婚否" allow-clear disabled ></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="身高" v-bind="validateInfos.height" id="NuEmployeesAdvisoryInfoForm-height" name="height">
|
||||
<a-input v-model:value="formData.height" placeholder="请输入身高" allow-clear disabled ></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="体重" v-bind="validateInfos.weight" id="NuEmployeesAdvisoryInfoForm-weight" name="weight">
|
||||
<a-input v-model:value="formData.weight" placeholder="请输入体重" allow-clear disabled ></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="健康状况" v-bind="validateInfos.healthStatus" id="NuEmployeesAdvisoryInfoForm-healthStatus" name="healthStatus">
|
||||
<a-input v-model:value="formData.healthStatus" placeholder="请输入健康状况" allow-clear disabled ></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="政治面貌" v-bind="validateInfos.politicalAppearance" id="NuEmployeesAdvisoryInfoForm-politicalAppearance" name="politicalAppearance">
|
||||
<a-input v-model:value="formData.politicalAppearance" placeholder="请输入政治面貌" allow-clear disabled ></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="户口性质" v-bind="validateInfos.hukouType" id="NuEmployeesAdvisoryInfoForm-hukouType" name="hukouType">
|
||||
<a-input v-model:value="formData.hukouType" placeholder="请输入户口性质" allow-clear disabled ></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
|
||||
<a-col :span="24">
|
||||
<SectionDivider :title="'联系人信息'" />
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="紧急联系人姓名" v-bind="validateInfos.contactName" id="NuEmployeesAdvisoryInfoForm-contactName" name="contactName">
|
||||
<a-input v-model:value="formData.contactName" placeholder="请输入紧急联系人姓名" allow-clear disabled ></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="紧急联系人电话" v-bind="validateInfos.contactTel" id="NuEmployeesAdvisoryInfoForm-contactTel" name="contactTel">
|
||||
<a-input v-model:value="formData.contactTel" placeholder="请输入紧急联系人电话" allow-clear disabled ></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="与本人关系" v-bind="validateInfos.contactRelationship" id="NuEmployeesAdvisoryInfoForm-contactRelationship" name="contactRelationship">
|
||||
<a-input v-model:value="formData.contactRelationship" placeholder="请输入紧急联系人与本人关系" allow-clear disabled ></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<SectionDivider :title="'银行卡信息'" />
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="银行卡正面" v-bind="validateInfos.bankZmPath" id="NuEmployeesAdvisoryInfoForm-bankZmPath" name="bankZmPath">
|
||||
<j-image-upload :fileMax="1" text="无" v-model:value="formData.bankZmPath" disabled ></j-image-upload>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="银行卡反面" v-bind="validateInfos.bankFmPath" id="NuEmployeesAdvisoryInfoForm-bankFmPath" name="bankFmPath">
|
||||
<j-image-upload :fileMax="1" text="无" v-model:value="formData.bankFmPath" disabled ></j-image-upload>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="开户行" v-bind="validateInfos.openingBank" id="NuEmployeesAdvisoryInfoForm-openingBank" name="openingBank">
|
||||
<a-input v-model:value="formData.openingBank" placeholder="请输入开户行" allow-clear disabled ></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="银行卡号" v-bind="validateInfos.bankCard" id="NuEmployeesAdvisoryInfoForm-bankCard" name="bankCard">
|
||||
<a-input v-model:value="formData.bankCard" placeholder="请输入银行卡号" allow-clear disabled ></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<SectionDivider :title="'证件信息'" />
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="健康证正面" v-bind="validateInfos.healthZmPath" id="NuEmployeesAdvisoryInfoForm-healthZmPath" name="healthZmPath">
|
||||
<j-image-upload :fileMax="1" text="无" v-model:value="formData.healthZmPath" disabled ></j-image-upload>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="健康证反面" v-bind="validateInfos.healthFmPath" id="NuEmployeesAdvisoryInfoForm-healthFmPath" name="healthFmPath">
|
||||
<j-image-upload :fileMax="1" text="无" v-model:value="formData.healthFmPath" disabled ></j-image-upload>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="资质证" v-bind="validateInfos.qualificationPath" id="NuEmployeesAdvisoryInfoForm-qualificationPath" name="qualificationPath">
|
||||
<j-image-upload :fileMax="0" text="无" v-model:value="formData.qualificationPath" disabled ></j-image-upload>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="无犯罪正面" v-bind="validateInfos.noCrimeCertificate" id="NuEmployeesAdvisoryInfoForm-noCrimeCertificate" name="noCrimeCertificate">
|
||||
<j-image-upload :fileMax="1" text="无" v-model:value="formData.noCrimeCertificate" disabled ></j-image-upload>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-form>
|
||||
</template>
|
||||
</JFormContainer>
|
||||
</a-spin>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { ref, reactive, defineExpose, nextTick, defineProps, computed, onMounted } from 'vue';
|
||||
import { defHttp } from '/@/utils/http/axios';
|
||||
import { useMessage } from '/@/hooks/web/useMessage';
|
||||
import JImageUpload from '/@/components/Form/src/jeecg/components/JImageUpload.vue';
|
||||
import { getValueType } from '/@/utils';
|
||||
import { saveOrUpdate } from '../NuEmployeesAdvisoryInfo.api';
|
||||
import { Form } from 'ant-design-vue';
|
||||
import JFormContainer from '/@/components/Form/src/container/JFormContainer.vue';
|
||||
const props = defineProps({
|
||||
formDisabled: { type: Boolean, default: false },
|
||||
formData: { type: Object, default: () => ({})},
|
||||
formBpm: { type: Boolean, default: true }
|
||||
});
|
||||
const formRef = ref();
|
||||
const useForm = Form.useForm;
|
||||
const emit = defineEmits(['register', 'ok']);
|
||||
const formData = reactive<Record<string, any>>({
|
||||
id: '',
|
||||
tel: '',
|
||||
name: '',
|
||||
sex: '',
|
||||
national: '',
|
||||
birthDate: '',
|
||||
idCardAddress: '',
|
||||
idCard: '',
|
||||
issuingAuthority: '',
|
||||
startTime: '',
|
||||
endTime: '',
|
||||
cardZmPath: '',
|
||||
cardFmPath: '',
|
||||
maritalStatus: '',
|
||||
height: '',
|
||||
weight: '',
|
||||
healthStatus: '',
|
||||
politicalAppearance: '',
|
||||
contactName: '',
|
||||
contactTel: '',
|
||||
contactRelationship: '',
|
||||
hukouType: '',
|
||||
bankZmPath: '',
|
||||
bankFmPath: '',
|
||||
openingBank: '',
|
||||
bankCard: '',
|
||||
healthZmPath: '',
|
||||
healthFmPath: '',
|
||||
qualificationPath: '',
|
||||
noCrimeCertificate: '',
|
||||
});
|
||||
const { createMessage } = useMessage();
|
||||
const labelCol = ref<any>({ xs: { span: 24 }, sm: { span: 8 } });
|
||||
const wrapperCol = ref<any>({ xs: { span: 24 }, sm: { span: 12 } });
|
||||
const confirmLoading = ref<boolean>(false);
|
||||
//表单验证
|
||||
const validatorRules = reactive({
|
||||
});
|
||||
const { resetFields, validate, validateInfos } = useForm(formData, validatorRules, { immediate: false });
|
||||
|
||||
// 表单禁用
|
||||
const disabled = computed(()=>{
|
||||
if(props.formBpm === true){
|
||||
if(props.formData.disabled === false){
|
||||
return false;
|
||||
}else{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return props.formDisabled;
|
||||
});
|
||||
|
||||
|
||||
/**
|
||||
* 新增
|
||||
*/
|
||||
function add() {
|
||||
edit({});
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*/
|
||||
function edit(record) {
|
||||
nextTick(() => {
|
||||
resetFields();
|
||||
const tmpData = {};
|
||||
Object.keys(formData).forEach((key) => {
|
||||
if(record.hasOwnProperty(key)){
|
||||
tmpData[key] = record[key]
|
||||
}
|
||||
})
|
||||
//赋值
|
||||
Object.assign(formData, tmpData);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 提交数据
|
||||
*/
|
||||
async function submitForm() {
|
||||
try {
|
||||
// 触发表单验证
|
||||
await validate();
|
||||
} catch ({ errorFields }) {
|
||||
if (errorFields) {
|
||||
const firstField = errorFields[0];
|
||||
if (firstField) {
|
||||
formRef.value.scrollToField(firstField.name, { behavior: 'smooth', block: 'center' });
|
||||
}
|
||||
}
|
||||
return Promise.reject(errorFields);
|
||||
}
|
||||
confirmLoading.value = true;
|
||||
const isUpdate = ref<boolean>(false);
|
||||
//时间格式化
|
||||
let model = formData;
|
||||
if (model.id) {
|
||||
isUpdate.value = true;
|
||||
}
|
||||
//循环数据
|
||||
for (let data in model) {
|
||||
//如果该数据是数组并且是字符串类型
|
||||
if (model[data] instanceof Array) {
|
||||
let valueType = getValueType(formRef.value.getProps, data);
|
||||
//如果是字符串类型的需要变成以逗号分割的字符串
|
||||
if (valueType === 'string') {
|
||||
model[data] = model[data].join(',');
|
||||
}
|
||||
}
|
||||
}
|
||||
await saveOrUpdate(model, isUpdate.value)
|
||||
.then((res) => {
|
||||
if (res.success) {
|
||||
createMessage.success(res.message);
|
||||
emit('ok');
|
||||
} else {
|
||||
createMessage.warning(res.message);
|
||||
}
|
||||
})
|
||||
.finally(() => {
|
||||
confirmLoading.value = false;
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
defineExpose({
|
||||
add,
|
||||
edit,
|
||||
submitForm,
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.antd-modal-form {
|
||||
padding: 14px;
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,77 @@
|
|||
<template>
|
||||
<j-modal :title="title" :width="width" :visible="visible" @ok="handleOk" :okButtonProps="{ class: { 'jee-hidden': disableSubmit } }" @cancel="handleCancel" cancelText="关闭">
|
||||
<NuEmployeesAdvisoryInfoForm ref="registerForm" @ok="submitCallback" :formDisabled="disableSubmit" :formBpm="false"></NuEmployeesAdvisoryInfoForm>
|
||||
</j-modal>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { ref, nextTick, defineExpose } from 'vue';
|
||||
import NuEmployeesAdvisoryInfoForm from './NuEmployeesAdvisoryInfoForm.vue'
|
||||
import JModal from '/@/components/Modal/src/JModal/JModal.vue';
|
||||
|
||||
const title = ref<string>('');
|
||||
const width = ref<string>('70vw');
|
||||
const visible = ref<boolean>(false);
|
||||
const disableSubmit = ref<boolean>(false);
|
||||
const registerForm = ref();
|
||||
const emit = defineEmits(['register', 'success']);
|
||||
|
||||
/**
|
||||
* 新增
|
||||
*/
|
||||
function add() {
|
||||
title.value = '新增';
|
||||
visible.value = true;
|
||||
nextTick(() => {
|
||||
registerForm.value.add();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
* @param record
|
||||
*/
|
||||
function edit(record) {
|
||||
title.value = disableSubmit.value ? '详情' : '编辑';
|
||||
visible.value = true;
|
||||
nextTick(() => {
|
||||
registerForm.value.edit(record);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 确定按钮点击事件
|
||||
*/
|
||||
function handleOk() {
|
||||
registerForm.value.submitForm();
|
||||
}
|
||||
|
||||
/**
|
||||
* form保存回调事件
|
||||
*/
|
||||
function submitCallback() {
|
||||
handleCancel();
|
||||
emit('success');
|
||||
}
|
||||
|
||||
/**
|
||||
* 取消按钮回调事件
|
||||
*/
|
||||
function handleCancel() {
|
||||
visible.value = false;
|
||||
}
|
||||
|
||||
defineExpose({
|
||||
add,
|
||||
edit,
|
||||
disableSubmit,
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="less">
|
||||
/**隐藏样式-modal确定按钮 */
|
||||
.jee-hidden {
|
||||
display: none !important;
|
||||
}
|
||||
</style>
|
||||
<style lang="less" scoped></style>
|
|
@ -0,0 +1,92 @@
|
|||
<template>
|
||||
<div class="p-2">
|
||||
<a-tabs v-model:activeKey="activeKey" type="card" @change="handleChange">
|
||||
<a-tab-pane key="9" tab="清零">
|
||||
<NuIotTqApiRequestLogList ref="nuIotTqApiRequestLogListModal9"></NuIotTqApiRequestLogList>
|
||||
</a-tab-pane>
|
||||
<a-tab-pane key="3" tab="抄表" force-render>
|
||||
<NuIotTqApiRequestLogList ref="nuIotTqApiRequestLogListModal3"></NuIotTqApiRequestLogList>
|
||||
</a-tab-pane>
|
||||
<a-tab-pane key="10" tab="电表拉闸" force-render>
|
||||
<NuIotTqApiRequestLogList ref="nuIotTqApiRequestLogListModal10"></NuIotTqApiRequestLogList>
|
||||
</a-tab-pane>
|
||||
<a-tab-pane key="11" tab="电表合闸" force-render>
|
||||
<NuIotTqApiRequestLogList ref="nuIotTqApiRequestLogListModal11"></NuIotTqApiRequestLogList>
|
||||
</a-tab-pane>
|
||||
</a-tabs>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" name="departUtils-sysDepart" setup>
|
||||
import { ref, reactive } from 'vue';
|
||||
|
||||
import NuIotTqApiRequestLogList from '/@/views/iot/tq/nuIotTqApiRequestLog/NuIotTqApiRequestLogList.vue';
|
||||
|
||||
const activeKey= ref('9');
|
||||
const dbsbInfo = ref<any>({});
|
||||
const nuIotTqApiRequestLogListModal9 = ref();
|
||||
const nuIotTqApiRequestLogListModal3 = ref();
|
||||
const nuIotTqApiRequestLogListModal10 = ref();
|
||||
const nuIotTqApiRequestLogListModal11 = ref();
|
||||
function initLog(record){
|
||||
activeKey.value = "9";
|
||||
getDataList(activeKey.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'){
|
||||
nuIotTqApiRequestLogListModal9.value.init(params);
|
||||
}else if(type == '3'){
|
||||
nuIotTqApiRequestLogListModal3.value.init(params);
|
||||
}else if(type == '10'){
|
||||
nuIotTqApiRequestLogListModal10.value.init(params);
|
||||
}else if(type == '11'){
|
||||
nuIotTqApiRequestLogListModal11.value.init(params);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function handleChange(key) {
|
||||
console.log("🚀 ~ handleChange ~ key:", key)
|
||||
activeKey.value = key;
|
||||
getDataList(key, dbsbInfo.value);
|
||||
}
|
||||
|
||||
defineExpose({
|
||||
initLog,
|
||||
});
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
<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>
|
|
@ -0,0 +1,66 @@
|
|||
<template>
|
||||
<j-modal :title="title" width="70%" :visible="visible" @ok="handleOk" :okButtonProps="{ class: { 'jee-hidden': disableSubmit } }" @cancel="handleCancel" cancelText="关闭">
|
||||
<DepartUtilsList ref="registerForm" @ok="submitCallback" :formDisabled="disableSubmit" :formBpm="false"></DepartUtilsList>
|
||||
</j-modal>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { ref, nextTick, defineExpose } from 'vue';
|
||||
import DepartUtilsList from './ApiLogList.vue'
|
||||
import JModal from '/@/components/Modal/src/JModal/JModal.vue';
|
||||
|
||||
const title = ref<string>('');
|
||||
const width = ref<number>(800);
|
||||
const visible = ref<boolean>(false);
|
||||
const disableSubmit = ref<boolean>(false);
|
||||
const registerForm = ref();
|
||||
const emit = defineEmits(['register', 'success']);
|
||||
|
||||
|
||||
/**
|
||||
* 日志
|
||||
* @param record
|
||||
*/
|
||||
function showApiLog(record) {
|
||||
title.value = '日志';
|
||||
visible.value = true;
|
||||
nextTick(() => {
|
||||
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,
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="less">
|
||||
/**隐藏样式-modal确定按钮 */
|
||||
.jee-hidden {
|
||||
display: none !important;
|
||||
}
|
||||
</style>
|
||||
<style lang="less" scoped></style>
|
|
@ -11,6 +11,14 @@
|
|||
<template v-if="column.dataIndex === 'address'">
|
||||
<a @click="showApiLog(record)"> {{record.address}} </a>
|
||||
</template>
|
||||
<template v-if="column.dataIndex === 'departName'">
|
||||
<span v-if="!record.departName"><a @click="handlePzjg(record)"> 未配置 </a></span>
|
||||
<span v-else><a @click="handlePzjg(record)"> {{record.departName}} </a></span>
|
||||
</template>
|
||||
<template v-if="column.dataIndex === 'nuName'">
|
||||
<span v-if="!record.nuName"><a @click="handlePzhldy(record)"> 未配置 </a></span>
|
||||
<span v-else><a @click="handlePzhldy(record)"> {{record.nuName}} </a></span>
|
||||
</template>
|
||||
<template v-if="column.dataIndex === 'relayState'">
|
||||
<span v-if="record.relayState ==='1'" style="color:green">
|
||||
合闸
|
||||
|
@ -44,6 +52,9 @@
|
|||
<TableAction :actions="getTableAction(record)"/>
|
||||
</template>
|
||||
</BasicTable>
|
||||
<DepartUtilsList ref="departUtilsModal" @success="handleParams"></DepartUtilsList>
|
||||
<HldyUtilsModal ref="hldyUtilsModal" @success="handleHldyParams" ></HldyUtilsModal>
|
||||
<ApiLogModal ref="apiLogModal"></ApiLogModal>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
@ -57,7 +68,15 @@
|
|||
import { columns, searchFormSchema } from './electricity.data';
|
||||
import {useModal} from "@/components/Modal";
|
||||
|
||||
import DepartUtilsList from "@/views/utils/departUtils/DepartUtilsModal.vue";
|
||||
import HldyUtilsModal from "@/views/utils/nuUtils/HldyUtilsModal.vue";
|
||||
import ApiLogModal from "@/views/iot/tq/electricity/apilog/ApiLogModal.vue";
|
||||
import { defHttp } from '/@/utils/http/axios';
|
||||
|
||||
const queryParam = reactive<any>({});
|
||||
const departUtilsModal = ref();
|
||||
const apiLogModal = ref();
|
||||
const hldyUtilsModal = ref();
|
||||
//注册model
|
||||
const [registerModal, {openModal}] = useModal();
|
||||
//注册table数据
|
||||
|
@ -79,7 +98,7 @@
|
|||
],
|
||||
},
|
||||
actionColumn: {
|
||||
width: 200,
|
||||
width: 240,
|
||||
fixed:'right'
|
||||
},
|
||||
beforeFetch: (params) => {
|
||||
|
@ -97,6 +116,28 @@
|
|||
(selectedRowKeys.value = []) && reload();
|
||||
}
|
||||
|
||||
function handleParams(params){
|
||||
console.log("🚀 ~ handleParams ~ params:", params)
|
||||
defHttp.post({
|
||||
url: "/iot/tq/electricityMeter/edit",
|
||||
params:params.value
|
||||
}).then(res=>{
|
||||
console.log("🚀 ~ getTableAction ~ res:", res)
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
function handleHldyParams(params){
|
||||
console.log("🚀 ~ handleParams ~ params:", params)
|
||||
defHttp.post({
|
||||
url: "/iot/tq/electricityMeter/edit",
|
||||
params:params.value
|
||||
}).then(res=>{
|
||||
console.log("🚀 ~ getTableAction ~ res:", res)
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 操作栏
|
||||
*/
|
||||
|
@ -121,10 +162,18 @@
|
|||
confirm: handleReset.bind(null, record),
|
||||
placement: 'topLeft',
|
||||
},
|
||||
}
|
||||
},
|
||||
]
|
||||
}
|
||||
|
||||
/**
|
||||
* 配置机构信息
|
||||
*/
|
||||
function handlePzjg(record: Recordable){
|
||||
departUtilsModal.value.disableSubmit = false;
|
||||
departUtilsModal.value.edit(record);
|
||||
}
|
||||
|
||||
// 抄电表
|
||||
async function handleRead(record: Recordable) {
|
||||
const params = {
|
||||
|
@ -200,8 +249,22 @@
|
|||
reload();
|
||||
}
|
||||
|
||||
/**
|
||||
* 查看api日志
|
||||
*/
|
||||
function showApiLog(record){
|
||||
console.log(record);
|
||||
apiLogModal.value.disableSubmit = true;
|
||||
apiLogModal.value.showApiLog(record);
|
||||
}
|
||||
/**
|
||||
* 配置护理单元
|
||||
*/
|
||||
function handlePzhldy(record){
|
||||
console.log("🚀 ~ handlePzhldy ~ record:", record)
|
||||
hldyUtilsModal.value.disableSubmit = true;
|
||||
hldyUtilsModal.value.edit(record);
|
||||
|
||||
}
|
||||
|
||||
</script>
|
||||
|
|
|
@ -0,0 +1,72 @@
|
|||
import { defHttp } from '/@/utils/http/axios';
|
||||
import { useMessage } from "/@/hooks/web/useMessage";
|
||||
|
||||
const { createConfirm } = useMessage();
|
||||
|
||||
enum Api {
|
||||
list = '/nuIotTqApiRequestLog/nuIotTqApiRequestLog/list',
|
||||
save='/nuIotTqApiRequestLog/nuIotTqApiRequestLog/add',
|
||||
edit='/nuIotTqApiRequestLog/nuIotTqApiRequestLog/edit',
|
||||
deleteOne = '/nuIotTqApiRequestLog/nuIotTqApiRequestLog/delete',
|
||||
deleteBatch = '/nuIotTqApiRequestLog/nuIotTqApiRequestLog/deleteBatch',
|
||||
importExcel = '/nuIotTqApiRequestLog/nuIotTqApiRequestLog/importExcel',
|
||||
exportXls = '/nuIotTqApiRequestLog/nuIotTqApiRequestLog/exportXls',
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出api
|
||||
* @param params
|
||||
*/
|
||||
export const getExportUrl = Api.exportXls;
|
||||
|
||||
/**
|
||||
* 导入api
|
||||
*/
|
||||
export const getImportUrl = Api.importExcel;
|
||||
|
||||
/**
|
||||
* 列表接口
|
||||
* @param params
|
||||
*/
|
||||
export const list = (params) => defHttp.get({ url: Api.list, params });
|
||||
|
||||
/**
|
||||
* 删除单个
|
||||
* @param params
|
||||
* @param handleSuccess
|
||||
*/
|
||||
export const deleteOne = (params,handleSuccess) => {
|
||||
return defHttp.delete({url: Api.deleteOne, params}, {joinParamsToUrl: true}).then(() => {
|
||||
handleSuccess();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
* @param params
|
||||
* @param handleSuccess
|
||||
*/
|
||||
export const batchDelete = (params, handleSuccess) => {
|
||||
createConfirm({
|
||||
iconType: 'warning',
|
||||
title: '确认删除',
|
||||
content: '是否删除选中数据',
|
||||
okText: '确认',
|
||||
cancelText: '取消',
|
||||
onOk: () => {
|
||||
return defHttp.delete({url: Api.deleteBatch, data: params}, {joinParamsToUrl: true}).then(() => {
|
||||
handleSuccess();
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存或者更新
|
||||
* @param params
|
||||
* @param isUpdate
|
||||
*/
|
||||
export const saveOrUpdate = (params, isUpdate) => {
|
||||
let url = isUpdate ? Api.edit : Api.save;
|
||||
return defHttp.post({ url: url, params }, { isTransformResponse: false });
|
||||
}
|
|
@ -0,0 +1,72 @@
|
|||
import {BasicColumn} from '/@/components/Table';
|
||||
import {FormSchema} from '/@/components/Table';
|
||||
import { rules} from '/@/utils/helper/validator';
|
||||
import { render } from '/@/utils/common/renderUtils';
|
||||
import { getWeekMonthQuarterYear } from '/@/utils';
|
||||
//列表数据
|
||||
export const columns: BasicColumn[] = [
|
||||
{
|
||||
title: '表号',
|
||||
align: "center",
|
||||
dataIndex: 'address'
|
||||
},
|
||||
{
|
||||
title: '类型',
|
||||
align: "center",
|
||||
dataIndex: 'type_dictText'
|
||||
},
|
||||
{
|
||||
title: '请求时的值',
|
||||
align: "center",
|
||||
dataIndex: 'requestValue'
|
||||
},
|
||||
{
|
||||
title: '请求时间',
|
||||
align: "center",
|
||||
dataIndex: 'requestTime'
|
||||
},
|
||||
{
|
||||
title: '请求状态',
|
||||
align: "center",
|
||||
dataIndex: 'requestStatus_dictText'
|
||||
},
|
||||
{
|
||||
title: '请求描述',
|
||||
align: "center",
|
||||
dataIndex: 'requestRemark'
|
||||
},
|
||||
{
|
||||
title: '反馈值',
|
||||
align: "center",
|
||||
dataIndex: 'resolveValue'
|
||||
},
|
||||
{
|
||||
title: '反馈时间',
|
||||
align: "center",
|
||||
dataIndex: 'resolveTime'
|
||||
},
|
||||
{
|
||||
title: '反馈状态',
|
||||
align: "center",
|
||||
dataIndex: 'resolveStatus_dictText'
|
||||
},
|
||||
{
|
||||
title: '反馈描述',
|
||||
align: "center",
|
||||
dataIndex: 'resolveRemark'
|
||||
},
|
||||
];
|
||||
|
||||
// 高级查询数据
|
||||
export const superQuerySchema = {
|
||||
address: {title: '表号',order: 0,view: 'text', type: 'string',},
|
||||
type: {title: '类型',order: 1,view: 'list', type: 'string',dictCode: 'dbsb_type',},
|
||||
requestValue: {title: '请求时的值',order: 2,view: 'text', type: 'string',},
|
||||
requestTime: {title: '请求时间',order: 3,view: 'text', type: 'string',},
|
||||
requestStatus: {title: '请求状态',order: 4,view: 'list', type: 'string',dictCode: '',},
|
||||
requestRemark: {title: '请求描述',order: 5,view: 'text', type: 'string',},
|
||||
resolveValue: {title: '反馈值',order: 6,view: 'text', type: 'string',},
|
||||
resolveTime: {title: '反馈时间',order: 7,view: 'text', type: 'string',},
|
||||
resolveStatus: {title: '反馈状态',order: 8,view: 'list', type: 'string',dictCode: 'dbsb_status',},
|
||||
resolveRemark: {title: '反馈描述',order: 9,view: 'text', type: 'string',},
|
||||
};
|
|
@ -0,0 +1,250 @@
|
|||
<template>
|
||||
<div class="p-2">
|
||||
<!--查询区域-->
|
||||
<div class="jeecg-basic-table-form-container">
|
||||
<a-form ref="formRef" @keyup.enter.native="searchQuery" :model="queryParam" :label-col="labelCol" :wrapper-col="wrapperCol">
|
||||
<a-row :gutter="24">
|
||||
<a-col :lg="6">
|
||||
<a-form-item name="requestStatus">
|
||||
<template #label><span title="请求状态">请求状态</span></template>
|
||||
<j-select-multiple placeholder="请选择请求状态" v-model:value="queryParam.requestStatus" dictCode="dbsb_status" allow-clear />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :lg="6">
|
||||
<a-form-item name="resolveStatus">
|
||||
<template #label><span title="反馈状态">反馈状态</span></template>
|
||||
<j-select-multiple placeholder="请选择反馈状态" v-model:value="queryParam.resolveStatus" dictCode="dbsb_status" allow-clear />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :xl="6" :lg="7" :md="8" :sm="24">
|
||||
<span style="float: left; overflow: hidden" class="table-page-search-submitButtons">
|
||||
<a-col :lg="6">
|
||||
<a-button type="primary" preIcon="ant-design:search-outlined" @click="searchQuery">查询</a-button>
|
||||
<a-button type="primary" preIcon="ant-design:reload-outlined" @click="searchReset" style="margin-left: 8px">重置</a-button>
|
||||
</a-col>
|
||||
</span>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-form>
|
||||
</div>
|
||||
<!--引用表格-->
|
||||
<BasicTable @register="registerTable">
|
||||
<!--插槽:table标题-->
|
||||
<template #tableTitle>
|
||||
</template>
|
||||
<!--操作栏-->
|
||||
<template #action="{ record }">
|
||||
<TableAction :actions="getTableAction(record)" :dropDownActions="getDropDownAction(record)"/>
|
||||
</template>
|
||||
<template v-slot:bodyCell="{ column, record, index, text }">
|
||||
</template>
|
||||
</BasicTable>
|
||||
<!-- 表单区域 -->
|
||||
<NuIotTqApiRequestLogModal ref="registerModal" @success="handleSuccess"></NuIotTqApiRequestLogModal>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" name="nuIotTqApiRequestLog-nuIotTqApiRequestLog" setup>
|
||||
import { ref, reactive } from 'vue';
|
||||
import { BasicTable, useTable, TableAction } from '/@/components/Table';
|
||||
import { useListPage } from '/@/hooks/system/useListPage';
|
||||
import { columns, superQuerySchema } from './NuIotTqApiRequestLog.data';
|
||||
import { list, deleteOne, batchDelete, getImportUrl, getExportUrl } from './NuIotTqApiRequestLog.api';
|
||||
import { downloadFile } from '/@/utils/common/renderUtils';
|
||||
import NuIotTqApiRequestLogModal from './components/NuIotTqApiRequestLogModal.vue'
|
||||
import { useUserStore } from '/@/store/modules/user';
|
||||
import JDictSelectTag from '/@/components/Form/src/jeecg/components/JDictSelectTag.vue';
|
||||
import JSelectMultiple from '/@/components/Form/src/jeecg/components/JSelectMultiple.vue';
|
||||
|
||||
const formRef = ref();
|
||||
const queryParam = reactive<any>({});
|
||||
const toggleSearchStatus = ref<boolean>(false);
|
||||
const registerModal = ref();
|
||||
const userStore = useUserStore();
|
||||
//注册table数据
|
||||
const { prefixCls, tableContext, onExportXls, onImportXls } = useListPage({
|
||||
tableProps: {
|
||||
title: 'api请求日志',
|
||||
api: list,
|
||||
columns,
|
||||
canResize:false,
|
||||
useSearchForm: false,
|
||||
immediate: false,
|
||||
showActionColumn: false,
|
||||
actionColumn: {
|
||||
width: 120,
|
||||
fixed: 'right',
|
||||
},
|
||||
beforeFetch: async (params) => {
|
||||
return Object.assign(params, queryParam);
|
||||
},
|
||||
},
|
||||
exportConfig: {
|
||||
name: "api请求日志",
|
||||
url: getExportUrl,
|
||||
params: queryParam,
|
||||
},
|
||||
importConfig: {
|
||||
url: getImportUrl,
|
||||
success: handleSuccess
|
||||
},
|
||||
});
|
||||
const [registerTable, { reload, collapseAll, updateTableDataRecord, findTableDataRecord, getDataSource }, { rowSelection, selectedRowKeys }] = tableContext;
|
||||
const labelCol = reactive({
|
||||
xs:24,
|
||||
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();
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增事件
|
||||
*/
|
||||
function handleAdd() {
|
||||
registerModal.value.disableSubmit = false;
|
||||
registerModal.value.add();
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑事件
|
||||
*/
|
||||
function handleEdit(record: Recordable) {
|
||||
registerModal.value.disableSubmit = false;
|
||||
registerModal.value.edit(record);
|
||||
}
|
||||
|
||||
/**
|
||||
* 详情
|
||||
*/
|
||||
function handleDetail(record: Recordable) {
|
||||
registerModal.value.disableSubmit = true;
|
||||
registerModal.value.edit(record);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除事件
|
||||
*/
|
||||
async function handleDelete(record) {
|
||||
await deleteOne({ id: record.id }, handleSuccess);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除事件
|
||||
*/
|
||||
async function batchHandleDelete() {
|
||||
await batchDelete({ ids: selectedRowKeys.value }, handleSuccess);
|
||||
}
|
||||
|
||||
/**
|
||||
* 成功回调
|
||||
*/
|
||||
function handleSuccess() {
|
||||
(selectedRowKeys.value = []) && reload();
|
||||
}
|
||||
|
||||
/**
|
||||
* 操作栏
|
||||
*/
|
||||
function getTableAction(record) {
|
||||
return [
|
||||
{
|
||||
label: '编辑',
|
||||
onClick: handleEdit.bind(null, record),
|
||||
auth: 'nuIotTqApiRequestLog:nu_iot_tq_api_request_log:edit'
|
||||
},
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* 下拉操作栏
|
||||
*/
|
||||
function getDropDownAction(record) {
|
||||
return [
|
||||
{
|
||||
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() {
|
||||
reload();
|
||||
}
|
||||
|
||||
/**
|
||||
* 重置
|
||||
*/
|
||||
function searchReset() {
|
||||
formRef.value.resetFields();
|
||||
selectedRowKeys.value = [];
|
||||
//刷新数据
|
||||
reload();
|
||||
}
|
||||
|
||||
function init(record) {
|
||||
console.log("🚀 ~ init ~ record:", record)
|
||||
queryParam.cid = record.cid;
|
||||
queryParam.type = record.type;
|
||||
reload();
|
||||
}
|
||||
|
||||
defineExpose({
|
||||
init,
|
||||
});
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
<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>
|
|
@ -0,0 +1,200 @@
|
|||
<template>
|
||||
<a-spin :spinning="confirmLoading">
|
||||
<JFormContainer :disabled="disabled">
|
||||
<template #detail>
|
||||
<a-form ref="formRef" class="antd-modal-form" :labelCol="labelCol" :wrapperCol="wrapperCol" name="NuIotTqApiRequestLogForm">
|
||||
<a-row>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="表号" v-bind="validateInfos.address" id="NuIotTqApiRequestLogForm-address" name="address">
|
||||
<a-input v-model:value="formData.address" placeholder="请输入表号" allow-clear ></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="类型" v-bind="validateInfos.type" id="NuIotTqApiRequestLogForm-type" name="type">
|
||||
<j-dict-select-tag v-model:value="formData.type" dictCode="dbsb_type" placeholder="请选择类型" allow-clear />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="请求时的值" v-bind="validateInfos.requestValue" id="NuIotTqApiRequestLogForm-requestValue" name="requestValue">
|
||||
<a-input v-model:value="formData.requestValue" placeholder="请输入请求时的值" allow-clear ></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="请求时间" v-bind="validateInfos.requestTime" id="NuIotTqApiRequestLogForm-requestTime" name="requestTime">
|
||||
<a-input v-model:value="formData.requestTime" placeholder="请输入请求时间" allow-clear ></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="请求状态" v-bind="validateInfos.requestStatus" id="NuIotTqApiRequestLogForm-requestStatus" name="requestStatus">
|
||||
<j-dict-select-tag v-model:value="formData.requestStatus" dictCode="" placeholder="请选择请求状态" allow-clear />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="请求描述" v-bind="validateInfos.requestRemark" id="NuIotTqApiRequestLogForm-requestRemark" name="requestRemark">
|
||||
<a-input v-model:value="formData.requestRemark" placeholder="请输入请求描述" allow-clear ></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="反馈值" v-bind="validateInfos.resolveValue" id="NuIotTqApiRequestLogForm-resolveValue" name="resolveValue">
|
||||
<a-input v-model:value="formData.resolveValue" placeholder="请输入反馈值" allow-clear ></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="反馈时间" v-bind="validateInfos.resolveTime" id="NuIotTqApiRequestLogForm-resolveTime" name="resolveTime">
|
||||
<a-input v-model:value="formData.resolveTime" placeholder="请输入反馈时间" allow-clear ></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="反馈状态" v-bind="validateInfos.resolveStatus" id="NuIotTqApiRequestLogForm-resolveStatus" name="resolveStatus">
|
||||
<j-dict-select-tag v-model:value="formData.resolveStatus" dictCode="dbsb_status" placeholder="请选择反馈状态" allow-clear />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="反馈描述" v-bind="validateInfos.resolveRemark" id="NuIotTqApiRequestLogForm-resolveRemark" name="resolveRemark">
|
||||
<a-input v-model:value="formData.resolveRemark" placeholder="请输入反馈描述" allow-clear ></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-form>
|
||||
</template>
|
||||
</JFormContainer>
|
||||
</a-spin>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { ref, reactive, defineExpose, nextTick, defineProps, computed, onMounted } from 'vue';
|
||||
import { defHttp } from '/@/utils/http/axios';
|
||||
import { useMessage } from '/@/hooks/web/useMessage';
|
||||
import JDictSelectTag from '/@/components/Form/src/jeecg/components/JDictSelectTag.vue';
|
||||
import { getValueType } from '/@/utils';
|
||||
import { saveOrUpdate } from '../NuIotTqApiRequestLog.api';
|
||||
import { Form } from 'ant-design-vue';
|
||||
import JFormContainer from '/@/components/Form/src/container/JFormContainer.vue';
|
||||
const props = defineProps({
|
||||
formDisabled: { type: Boolean, default: false },
|
||||
formData: { type: Object, default: () => ({})},
|
||||
formBpm: { type: Boolean, default: true }
|
||||
});
|
||||
const formRef = ref();
|
||||
const useForm = Form.useForm;
|
||||
const emit = defineEmits(['register', 'ok']);
|
||||
const formData = reactive<Record<string, any>>({
|
||||
id: '',
|
||||
address: '',
|
||||
type: '',
|
||||
requestValue: '',
|
||||
requestTime: '',
|
||||
requestStatus: '',
|
||||
requestRemark: '',
|
||||
resolveValue: '',
|
||||
resolveTime: '',
|
||||
resolveStatus: '',
|
||||
resolveRemark: '',
|
||||
});
|
||||
const { createMessage } = useMessage();
|
||||
const labelCol = ref<any>({ xs: { span: 24 }, sm: { span: 5 } });
|
||||
const wrapperCol = ref<any>({ xs: { span: 24 }, sm: { span: 16 } });
|
||||
const confirmLoading = ref<boolean>(false);
|
||||
//表单验证
|
||||
const validatorRules = reactive({
|
||||
});
|
||||
const { resetFields, validate, validateInfos } = useForm(formData, validatorRules, { immediate: false });
|
||||
|
||||
// 表单禁用
|
||||
const disabled = computed(()=>{
|
||||
if(props.formBpm === true){
|
||||
if(props.formData.disabled === false){
|
||||
return false;
|
||||
}else{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return props.formDisabled;
|
||||
});
|
||||
|
||||
|
||||
/**
|
||||
* 新增
|
||||
*/
|
||||
function add() {
|
||||
edit({});
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*/
|
||||
function edit(record) {
|
||||
nextTick(() => {
|
||||
resetFields();
|
||||
const tmpData = {};
|
||||
Object.keys(formData).forEach((key) => {
|
||||
if(record.hasOwnProperty(key)){
|
||||
tmpData[key] = record[key]
|
||||
}
|
||||
})
|
||||
//赋值
|
||||
Object.assign(formData, tmpData);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 提交数据
|
||||
*/
|
||||
async function submitForm() {
|
||||
try {
|
||||
// 触发表单验证
|
||||
await validate();
|
||||
} catch ({ errorFields }) {
|
||||
if (errorFields) {
|
||||
const firstField = errorFields[0];
|
||||
if (firstField) {
|
||||
formRef.value.scrollToField(firstField.name, { behavior: 'smooth', block: 'center' });
|
||||
}
|
||||
}
|
||||
return Promise.reject(errorFields);
|
||||
}
|
||||
confirmLoading.value = true;
|
||||
const isUpdate = ref<boolean>(false);
|
||||
//时间格式化
|
||||
let model = formData;
|
||||
if (model.id) {
|
||||
isUpdate.value = true;
|
||||
}
|
||||
//循环数据
|
||||
for (let data in model) {
|
||||
//如果该数据是数组并且是字符串类型
|
||||
if (model[data] instanceof Array) {
|
||||
let valueType = getValueType(formRef.value.getProps, data);
|
||||
//如果是字符串类型的需要变成以逗号分割的字符串
|
||||
if (valueType === 'string') {
|
||||
model[data] = model[data].join(',');
|
||||
}
|
||||
}
|
||||
}
|
||||
await saveOrUpdate(model, isUpdate.value)
|
||||
.then((res) => {
|
||||
if (res.success) {
|
||||
createMessage.success(res.message);
|
||||
emit('ok');
|
||||
} else {
|
||||
createMessage.warning(res.message);
|
||||
}
|
||||
})
|
||||
.finally(() => {
|
||||
confirmLoading.value = false;
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
defineExpose({
|
||||
add,
|
||||
edit,
|
||||
submitForm,
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.antd-modal-form {
|
||||
padding: 14px;
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,77 @@
|
|||
<template>
|
||||
<j-modal :title="title" :width="width" :visible="visible" @ok="handleOk" :okButtonProps="{ class: { 'jee-hidden': disableSubmit } }" @cancel="handleCancel" cancelText="关闭">
|
||||
<NuIotTqApiRequestLogForm ref="registerForm" @ok="submitCallback" :formDisabled="disableSubmit" :formBpm="false"></NuIotTqApiRequestLogForm>
|
||||
</j-modal>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { ref, nextTick, defineExpose } from 'vue';
|
||||
import NuIotTqApiRequestLogForm from './NuIotTqApiRequestLogForm.vue'
|
||||
import JModal from '/@/components/Modal/src/JModal/JModal.vue';
|
||||
|
||||
const title = ref<string>('');
|
||||
const width = ref<number>(800);
|
||||
const visible = ref<boolean>(false);
|
||||
const disableSubmit = ref<boolean>(false);
|
||||
const registerForm = ref();
|
||||
const emit = defineEmits(['register', 'success']);
|
||||
|
||||
/**
|
||||
* 新增
|
||||
*/
|
||||
function add() {
|
||||
title.value = '新增';
|
||||
visible.value = true;
|
||||
nextTick(() => {
|
||||
registerForm.value.add();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
* @param record
|
||||
*/
|
||||
function edit(record) {
|
||||
title.value = disableSubmit.value ? '详情' : '编辑';
|
||||
visible.value = true;
|
||||
nextTick(() => {
|
||||
registerForm.value.edit(record);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 确定按钮点击事件
|
||||
*/
|
||||
function handleOk() {
|
||||
registerForm.value.submitForm();
|
||||
}
|
||||
|
||||
/**
|
||||
* form保存回调事件
|
||||
*/
|
||||
function submitCallback() {
|
||||
handleCancel();
|
||||
emit('success');
|
||||
}
|
||||
|
||||
/**
|
||||
* 取消按钮回调事件
|
||||
*/
|
||||
function handleCancel() {
|
||||
visible.value = false;
|
||||
}
|
||||
|
||||
defineExpose({
|
||||
add,
|
||||
edit,
|
||||
disableSubmit,
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="less">
|
||||
/**隐藏样式-modal确定按钮 */
|
||||
.jee-hidden {
|
||||
display: none !important;
|
||||
}
|
||||
</style>
|
||||
<style lang="less" scoped></style>
|
|
@ -0,0 +1,72 @@
|
|||
import { defHttp } from '/@/utils/http/axios';
|
||||
import { useMessage } from "/@/hooks/web/useMessage";
|
||||
|
||||
const { createConfirm } = useMessage();
|
||||
|
||||
enum Api {
|
||||
list = '/sys/sysDepart/getDepartServerUrl',
|
||||
save='/sys/sysDepart/add',
|
||||
edit='/sys/sysDepart/edit',
|
||||
deleteOne = '/sys/sysDepart/delete',
|
||||
deleteBatch = '/sys/sysDepart/deleteBatch',
|
||||
importExcel = '/sys/sysDepart/importExcel',
|
||||
exportXls = '/sys/sysDepart/exportXls',
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出api
|
||||
* @param params
|
||||
*/
|
||||
export const getExportUrl = Api.exportXls;
|
||||
|
||||
/**
|
||||
* 导入api
|
||||
*/
|
||||
export const getImportUrl = Api.importExcel;
|
||||
|
||||
/**
|
||||
* 列表接口
|
||||
* @param params
|
||||
*/
|
||||
export const list = (params) => defHttp.get({ url: Api.list, params });
|
||||
|
||||
/**
|
||||
* 删除单个
|
||||
* @param params
|
||||
* @param handleSuccess
|
||||
*/
|
||||
export const deleteOne = (params,handleSuccess) => {
|
||||
return defHttp.delete({url: Api.deleteOne, params}, {joinParamsToUrl: true}).then(() => {
|
||||
handleSuccess();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
* @param params
|
||||
* @param handleSuccess
|
||||
*/
|
||||
export const batchDelete = (params, handleSuccess) => {
|
||||
createConfirm({
|
||||
iconType: 'warning',
|
||||
title: '确认删除',
|
||||
content: '是否删除选中数据',
|
||||
okText: '确认',
|
||||
cancelText: '取消',
|
||||
onOk: () => {
|
||||
return defHttp.delete({url: Api.deleteBatch, data: params}, {joinParamsToUrl: true}).then(() => {
|
||||
handleSuccess();
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存或者更新
|
||||
* @param params
|
||||
* @param isUpdate
|
||||
*/
|
||||
export const saveOrUpdate = (params, isUpdate) => {
|
||||
let url = isUpdate ? Api.edit : Api.save;
|
||||
return defHttp.post({ url: url, params }, { isTransformResponse: false });
|
||||
}
|
|
@ -0,0 +1,60 @@
|
|||
import {BasicColumn} from '/@/components/Table';
|
||||
import {FormSchema} from '/@/components/Table';
|
||||
import { rules} from '/@/utils/helper/validator';
|
||||
import { render } from '/@/utils/common/renderUtils';
|
||||
import { getWeekMonthQuarterYear } from '/@/utils';
|
||||
//列表数据
|
||||
export const columns: BasicColumn[] = [
|
||||
{
|
||||
title: '机构/部门名称',
|
||||
align: "center",
|
||||
dataIndex: 'departName'
|
||||
},
|
||||
{
|
||||
title: '机构编码',
|
||||
align: "center",
|
||||
dataIndex: 'orgCode'
|
||||
},
|
||||
{
|
||||
title: '运营开始时间',
|
||||
align: "center",
|
||||
dataIndex: 'operationStartTime'
|
||||
},
|
||||
{
|
||||
title: '运营到期时间',
|
||||
align: "center",
|
||||
dataIndex: 'operationEndTime'
|
||||
},
|
||||
];
|
||||
|
||||
// 高级查询数据
|
||||
export const superQuerySchema = {
|
||||
parentId: {title: '父机构ID',order: 0,view: 'text', type: 'string',},
|
||||
departName: {title: '机构/部门名称',order: 1,view: 'text', type: 'string',},
|
||||
departNameEn: {title: '英文名',order: 2,view: 'text', type: 'string',},
|
||||
departNameAbbr: {title: '缩写',order: 3,view: 'text', type: 'string',},
|
||||
departOrder: {title: '排序',order: 4,view: 'number', type: 'number',},
|
||||
description: {title: '描述',order: 5,view: 'text', type: 'string',},
|
||||
orgCategory: {title: '机构类别 1机构,2区域',order: 6,view: 'text', type: 'string',},
|
||||
orgType: {title: '机构类型 1一级部门 2子部门',order: 7,view: 'text', type: 'string',},
|
||||
orgCode: {title: '机构编码',order: 8,view: 'text', type: 'string',},
|
||||
platType: {title: '机构对应平台类型 是否是试验机构(数据字典iz_test_site) ',order: 9,view: 'text', type: 'string',},
|
||||
operationStartTime: {title: '运营开始时间',order: 10,view: 'datetime', type: 'string',},
|
||||
operationEndTime: {title: '运营到期时间',order: 11,view: 'datetime', type: 'string',},
|
||||
contractStartTime: {title: '合同开始时间',order: 12,view: 'datetime', type: 'string',},
|
||||
contractEndTime: {title: '合同到期时间',order: 13,view: 'datetime', type: 'string',},
|
||||
mobile: {title: '手机号',order: 14,view: 'text', type: 'string',},
|
||||
fax: {title: '传真',order: 15,view: 'text', type: 'string',},
|
||||
address: {title: '地址',order: 16,view: 'text', type: 'string',},
|
||||
memo: {title: '备注',order: 17,view: 'text', type: 'string',},
|
||||
status: {title: '状态(1启用,0不启用)',order: 18,view: 'text', type: 'string',},
|
||||
qywxIdentifier: {title: '对接企业微信的ID',order: 20,view: 'text', type: 'string',},
|
||||
dingIdentifier: {title: '对接钉钉部门的ID',order: 21,view: 'text', type: 'string',},
|
||||
tenantId: {title: '租户ID',order: 22,view: 'number', type: 'number',},
|
||||
izLeaf: {title: '是否有叶子节点: 1是0否',order: 23,view: 'number', type: 'number',},
|
||||
serverUrl: {title: '服务器后台接口地址',order: 24,view: 'text', type: 'string',},
|
||||
picUrl: {title: '机构图片',order: 25,view: 'text', type: 'string',},
|
||||
province: {title: '省份 sys_category.id',order: 26,view: 'text', type: 'string',},
|
||||
city: {title: '城市 sys_category.id',order: 27,view: 'text', type: 'string',},
|
||||
district: {title: '区域 sys_category.id',order: 28,view: 'text', type: 'string',},
|
||||
};
|
|
@ -0,0 +1,181 @@
|
|||
<template>
|
||||
<div class="p-2">
|
||||
<!--查询区域-->
|
||||
<div class="jeecg-basic-table-form-container">
|
||||
<a-form ref="formRef" @keyup.enter.native="searchQuery" :model="queryParam" :label-col="labelCol" :wrapper-col="wrapperCol">
|
||||
<a-row :gutter="24">
|
||||
</a-row>
|
||||
</a-form>
|
||||
</div>
|
||||
<!--引用表格-->
|
||||
<BasicTable @register="registerTable" >
|
||||
<!--插槽:table标题-->
|
||||
<template #tableTitle>
|
||||
</template>
|
||||
<!--操作栏-->
|
||||
<template #action="{ record }">
|
||||
<TableAction :actions="getTableAction(record)" />
|
||||
</template>
|
||||
<template v-slot:bodyCell="{ column, record, index, text }">
|
||||
</template>
|
||||
</BasicTable>
|
||||
<!-- 表单区域 -->
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" name="departUtils-sysDepart" setup>
|
||||
import { ref, reactive } from 'vue';
|
||||
import { BasicTable, useTable, TableAction } from '/@/components/Table';
|
||||
import { useListPage } from '/@/hooks/system/useListPage';
|
||||
import { columns, superQuerySchema } from './DepartUtils.data';
|
||||
import { list, deleteOne, batchDelete, getImportUrl, getExportUrl } from './DepartUtils.api';
|
||||
import { downloadFile } from '/@/utils/common/renderUtils';
|
||||
import SysDepartModal from './components/SysDepartModal.vue'
|
||||
import { useUserStore } from '/@/store/modules/user';
|
||||
import { e } from 'unocss';
|
||||
|
||||
const formRef = ref();
|
||||
const queryParam = reactive<any>({});
|
||||
const toggleSearchStatus = ref<boolean>(false);
|
||||
const departInfo = ref<any>({});
|
||||
const userStore = useUserStore();
|
||||
const emit = defineEmits(['register', 'ok']);
|
||||
//注册table数据
|
||||
const { prefixCls, tableContext, onExportXls, onImportXls } = useListPage({
|
||||
tableProps: {
|
||||
title: 'sys_depart',
|
||||
api: list,
|
||||
columns,
|
||||
canResize:false,
|
||||
useSearchForm: false,
|
||||
actionColumn: {
|
||||
width: 120,
|
||||
fixed: 'right',
|
||||
},
|
||||
beforeFetch: async (params) => {
|
||||
return Object.assign(params, queryParam);
|
||||
},
|
||||
},
|
||||
exportConfig: {
|
||||
name: "sys_depart",
|
||||
url: getExportUrl,
|
||||
params: queryParam,
|
||||
},
|
||||
importConfig: {
|
||||
url: getImportUrl,
|
||||
success: handleSuccess
|
||||
},
|
||||
});
|
||||
const [registerTable, { reload, collapseAll, updateTableDataRecord, findTableDataRecord, getDataSource }, { rowSelection, selectedRowKeys }] = tableContext;
|
||||
const labelCol = reactive({
|
||||
xs:24,
|
||||
sm:4,
|
||||
xl:6,
|
||||
xxl:4
|
||||
});
|
||||
const wrapperCol = reactive({
|
||||
xs: 24,
|
||||
sm: 20,
|
||||
});
|
||||
|
||||
// 高级查询配置
|
||||
const superQueryConfig = reactive(superQuerySchema);
|
||||
|
||||
function edit(record) {
|
||||
console.log("🚀 ~ edit ~ record:", record)
|
||||
departInfo.value = record;
|
||||
}
|
||||
/**
|
||||
* 高级查询事件
|
||||
*/
|
||||
function handleSuperQuery(params) {
|
||||
Object.keys(params).map((k) => {
|
||||
queryParam[k] = params[k];
|
||||
});
|
||||
searchQuery();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 编辑事件
|
||||
*/
|
||||
function handleEdit(record: Recordable) {
|
||||
console.log("🚀 ~ handleEdit ~ record:", record)
|
||||
departInfo.value.departId = record.id;
|
||||
departInfo.value.departName = record.departName;
|
||||
departInfo.value.departServerUrl = record.orgCode;
|
||||
console.log("🚀 ~ handleEdit ~ departInfo.value:", departInfo.value)
|
||||
emit("ok",departInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 成功回调
|
||||
*/
|
||||
function handleSuccess() {
|
||||
(selectedRowKeys.value = []) && reload();
|
||||
}
|
||||
|
||||
/**
|
||||
* 操作栏
|
||||
*/
|
||||
function getTableAction(record) {
|
||||
return [
|
||||
{
|
||||
label: '选择',
|
||||
onClick: handleEdit.bind(null, record),
|
||||
},
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 查询
|
||||
*/
|
||||
function searchQuery() {
|
||||
reload();
|
||||
}
|
||||
|
||||
/**
|
||||
* 重置
|
||||
*/
|
||||
function searchReset() {
|
||||
formRef.value.resetFields();
|
||||
selectedRowKeys.value = [];
|
||||
//刷新数据
|
||||
reload();
|
||||
}
|
||||
|
||||
|
||||
|
||||
defineExpose({
|
||||
edit,
|
||||
});
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
<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>
|
|
@ -0,0 +1,66 @@
|
|||
<template>
|
||||
<j-modal :title="title" :width="width" :visible="visible" @ok="handleOk" :okButtonProps="{ class: { 'jee-hidden': disableSubmit } }" @cancel="handleCancel" cancelText="关闭">
|
||||
<DepartUtilsList ref="registerForm" @ok="submitCallback" :formDisabled="disableSubmit" :formBpm="false"></DepartUtilsList>
|
||||
</j-modal>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { ref, nextTick, defineExpose } from 'vue';
|
||||
import DepartUtilsList from './DepartUtilsList.vue'
|
||||
import JModal from '/@/components/Modal/src/JModal/JModal.vue';
|
||||
|
||||
const title = ref<string>('');
|
||||
const width = ref<number>(800);
|
||||
const visible = ref<boolean>(false);
|
||||
const disableSubmit = ref<boolean>(false);
|
||||
const registerForm = ref();
|
||||
const emit = defineEmits(['register', 'success']);
|
||||
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
* @param record
|
||||
*/
|
||||
function edit(record) {
|
||||
title.value = disableSubmit.value ? '详情' : '编辑';
|
||||
visible.value = true;
|
||||
nextTick(() => {
|
||||
registerForm.value.edit(record);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 确定按钮点击事件
|
||||
*/
|
||||
function handleOk() {
|
||||
registerForm.value.submitForm();
|
||||
}
|
||||
|
||||
/**
|
||||
* form保存回调事件
|
||||
*/
|
||||
function submitCallback(params) {
|
||||
handleCancel();
|
||||
emit('success',params);
|
||||
}
|
||||
|
||||
/**
|
||||
* 取消按钮回调事件
|
||||
*/
|
||||
function handleCancel() {
|
||||
visible.value = false;
|
||||
}
|
||||
|
||||
defineExpose({
|
||||
edit,
|
||||
disableSubmit,
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="less">
|
||||
/**隐藏样式-modal确定按钮 */
|
||||
.jee-hidden {
|
||||
display: none !important;
|
||||
}
|
||||
</style>
|
||||
<style lang="less" scoped></style>
|
|
@ -0,0 +1,15 @@
|
|||
import { defHttp } from '/@/utils/http/axios';
|
||||
import { useMessage } from "/@/hooks/web/useMessage";
|
||||
|
||||
const { createConfirm } = useMessage();
|
||||
|
||||
enum Api {
|
||||
list = '/iot/cameraInfo/getNuBaseList',
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表接口
|
||||
* @param params
|
||||
*/
|
||||
export const list = (params) => defHttp.get({ url: Api.list, params });
|
||||
|
|
@ -0,0 +1,55 @@
|
|||
import {BasicColumn} from '/@/components/Table';
|
||||
import {FormSchema} from '/@/components/Table';
|
||||
import { rules} from '/@/utils/helper/validator';
|
||||
import { render } from '/@/utils/common/renderUtils';
|
||||
import { getWeekMonthQuarterYear } from '/@/utils';
|
||||
//列表数据
|
||||
export const columns: BasicColumn[] = [
|
||||
{
|
||||
title: '护理单元名称',
|
||||
align: "center",
|
||||
dataIndex: 'nuName'
|
||||
},
|
||||
{
|
||||
title: '编码',
|
||||
align: "center",
|
||||
dataIndex: 'code'
|
||||
},
|
||||
{
|
||||
title: '创建时间',
|
||||
align: "center",
|
||||
dataIndex: 'createTime'
|
||||
},
|
||||
];
|
||||
|
||||
// 高级查询数据
|
||||
export const superQuerySchema = {
|
||||
parentId: {title: '父机构ID',order: 0,view: 'text', type: 'string',},
|
||||
departName: {title: '机构/部门名称',order: 1,view: 'text', type: 'string',},
|
||||
departNameEn: {title: '英文名',order: 2,view: 'text', type: 'string',},
|
||||
departNameAbbr: {title: '缩写',order: 3,view: 'text', type: 'string',},
|
||||
departOrder: {title: '排序',order: 4,view: 'number', type: 'number',},
|
||||
description: {title: '描述',order: 5,view: 'text', type: 'string',},
|
||||
orgCategory: {title: '机构类别 1机构,2区域',order: 6,view: 'text', type: 'string',},
|
||||
orgType: {title: '机构类型 1一级部门 2子部门',order: 7,view: 'text', type: 'string',},
|
||||
orgCode: {title: '机构编码',order: 8,view: 'text', type: 'string',},
|
||||
platType: {title: '机构对应平台类型 是否是试验机构(数据字典iz_test_site) ',order: 9,view: 'text', type: 'string',},
|
||||
operationStartTime: {title: '运营开始时间',order: 10,view: 'datetime', type: 'string',},
|
||||
operationEndTime: {title: '运营到期时间',order: 11,view: 'datetime', type: 'string',},
|
||||
contractStartTime: {title: '合同开始时间',order: 12,view: 'datetime', type: 'string',},
|
||||
contractEndTime: {title: '合同到期时间',order: 13,view: 'datetime', type: 'string',},
|
||||
mobile: {title: '手机号',order: 14,view: 'text', type: 'string',},
|
||||
fax: {title: '传真',order: 15,view: 'text', type: 'string',},
|
||||
address: {title: '地址',order: 16,view: 'text', type: 'string',},
|
||||
memo: {title: '备注',order: 17,view: 'text', type: 'string',},
|
||||
status: {title: '状态(1启用,0不启用)',order: 18,view: 'text', type: 'string',},
|
||||
qywxIdentifier: {title: '对接企业微信的ID',order: 20,view: 'text', type: 'string',},
|
||||
dingIdentifier: {title: '对接钉钉部门的ID',order: 21,view: 'text', type: 'string',},
|
||||
tenantId: {title: '租户ID',order: 22,view: 'number', type: 'number',},
|
||||
izLeaf: {title: '是否有叶子节点: 1是0否',order: 23,view: 'number', type: 'number',},
|
||||
serverUrl: {title: '服务器后台接口地址',order: 24,view: 'text', type: 'string',},
|
||||
picUrl: {title: '机构图片',order: 25,view: 'text', type: 'string',},
|
||||
province: {title: '省份 sys_category.id',order: 26,view: 'text', type: 'string',},
|
||||
city: {title: '城市 sys_category.id',order: 27,view: 'text', type: 'string',},
|
||||
district: {title: '区域 sys_category.id',order: 28,view: 'text', type: 'string',},
|
||||
};
|
|
@ -0,0 +1,174 @@
|
|||
<template>
|
||||
<div class="p-2">
|
||||
<!--查询区域-->
|
||||
<div class="jeecg-basic-table-form-container">
|
||||
<a-form ref="formRef" @keyup.enter.native="searchQuery" :model="queryParam" :label-col="labelCol" :wrapper-col="wrapperCol">
|
||||
<a-row :gutter="24">
|
||||
</a-row>
|
||||
</a-form>
|
||||
</div>
|
||||
<!--引用表格-->
|
||||
<BasicTable @register="registerTable" >
|
||||
<!--插槽:table标题-->
|
||||
<template #tableTitle>
|
||||
</template>
|
||||
<!--操作栏-->
|
||||
<template #action="{ record }">
|
||||
<TableAction :actions="getTableAction(record)" />
|
||||
</template>
|
||||
<template v-slot:bodyCell="{ column, record, index, text }">
|
||||
</template>
|
||||
</BasicTable>
|
||||
<!-- 表单区域 -->
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" name="departUtils-sysDepart" setup>
|
||||
import { ref, reactive } from 'vue';
|
||||
import { BasicTable, useTable, TableAction } from '/@/components/Table';
|
||||
import { useListPage } from '/@/hooks/system/useListPage';
|
||||
import { columns, superQuerySchema } from './HldyUtils.data';
|
||||
import { list } from './HldyUtils.api';
|
||||
import { downloadFile } from '/@/utils/common/renderUtils';
|
||||
import SysDepartModal from './components/SysDepartModal.vue'
|
||||
import { useUserStore } from '/@/store/modules/user';
|
||||
import { e } from 'unocss';
|
||||
|
||||
const formRef = ref();
|
||||
const queryParam = reactive<any>({});
|
||||
const toggleSearchStatus = ref<boolean>(false);
|
||||
const departInfo = ref<any>({});
|
||||
const userStore = useUserStore();
|
||||
const emit = defineEmits(['register', 'ok']);
|
||||
//注册table数据
|
||||
const { prefixCls, tableContext, onExportXls, onImportXls } = useListPage({
|
||||
tableProps: {
|
||||
title: 'sys_depart',
|
||||
api: list,
|
||||
columns,
|
||||
canResize:false,
|
||||
useSearchForm: false,
|
||||
immediate: false,
|
||||
actionColumn: {
|
||||
width: 120,
|
||||
fixed: 'right',
|
||||
},
|
||||
beforeFetch: async (params) => {
|
||||
return Object.assign(params, queryParam);
|
||||
},
|
||||
},
|
||||
});
|
||||
const [registerTable, { reload, collapseAll, updateTableDataRecord, findTableDataRecord, getDataSource }, { rowSelection, selectedRowKeys }] = tableContext;
|
||||
const labelCol = reactive({
|
||||
xs:24,
|
||||
sm:4,
|
||||
xl:6,
|
||||
xxl:4
|
||||
});
|
||||
const wrapperCol = reactive({
|
||||
xs: 24,
|
||||
sm: 20,
|
||||
});
|
||||
|
||||
// 高级查询配置
|
||||
const superQueryConfig = reactive(superQuerySchema);
|
||||
|
||||
/**
|
||||
* 高级查询事件
|
||||
*/
|
||||
function handleSuperQuery(params) {
|
||||
Object.keys(params).map((k) => {
|
||||
queryParam[k] = params[k];
|
||||
});
|
||||
searchQuery();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 编辑事件
|
||||
*/
|
||||
function handleEdit(record: Recordable) {
|
||||
console.log("🚀 ~ handleEdit ~ record:", record)
|
||||
departInfo.value.nuId = record.id;
|
||||
departInfo.value.nuName = record.nuName;
|
||||
console.log("🚀 ~ handleEdit ~ departInfo.value:", departInfo.value)
|
||||
emit("ok",departInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 成功回调
|
||||
*/
|
||||
function handleSuccess() {
|
||||
(selectedRowKeys.value = []) && reload();
|
||||
}
|
||||
|
||||
/**
|
||||
* 操作栏
|
||||
*/
|
||||
function getTableAction(record) {
|
||||
return [
|
||||
{
|
||||
label: '选择',
|
||||
onClick: handleEdit.bind(null, record),
|
||||
},
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 查询
|
||||
*/
|
||||
function searchQuery() {
|
||||
reload();
|
||||
}
|
||||
|
||||
/**
|
||||
* 重置
|
||||
*/
|
||||
function searchReset() {
|
||||
formRef.value.resetFields();
|
||||
selectedRowKeys.value = [];
|
||||
//刷新数据
|
||||
reload();
|
||||
}
|
||||
|
||||
|
||||
function edit(record) {
|
||||
console.log("🚀 ~ edit ~ record:", record.departServerUrl)
|
||||
departInfo.value = record;
|
||||
queryParam.sysOrgCode = record.departServerUrl;
|
||||
reload();
|
||||
}
|
||||
|
||||
defineExpose({
|
||||
edit,
|
||||
});
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
<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>
|
|
@ -0,0 +1,66 @@
|
|||
<template>
|
||||
<j-modal :title="title" :width="width" :visible="visible" @ok="handleOk" :okButtonProps="{ class: { 'jee-hidden': disableSubmit } }" @cancel="handleCancel" cancelText="关闭">
|
||||
<DepartUtilsList ref="registerForm" @ok="submitCallback" :formDisabled="disableSubmit" :formBpm="false"></DepartUtilsList>
|
||||
</j-modal>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { ref, nextTick, defineExpose } from 'vue';
|
||||
import DepartUtilsList from './HldyUtilsList.vue'
|
||||
import JModal from '/@/components/Modal/src/JModal/JModal.vue';
|
||||
|
||||
const title = ref<string>('');
|
||||
const width = ref<number>(800);
|
||||
const visible = ref<boolean>(false);
|
||||
const disableSubmit = ref<boolean>(false);
|
||||
const registerForm = ref();
|
||||
const emit = defineEmits(['register', 'success']);
|
||||
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
* @param record
|
||||
*/
|
||||
function edit(record) {
|
||||
title.value = disableSubmit.value ? '详情' : '编辑';
|
||||
visible.value = true;
|
||||
nextTick(() => {
|
||||
registerForm.value.edit(record);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 确定按钮点击事件
|
||||
*/
|
||||
function handleOk() {
|
||||
registerForm.value.submitForm();
|
||||
}
|
||||
|
||||
/**
|
||||
* form保存回调事件
|
||||
*/
|
||||
function submitCallback(params) {
|
||||
handleCancel();
|
||||
emit('success',params);
|
||||
}
|
||||
|
||||
/**
|
||||
* 取消按钮回调事件
|
||||
*/
|
||||
function handleCancel() {
|
||||
visible.value = false;
|
||||
}
|
||||
|
||||
defineExpose({
|
||||
edit,
|
||||
disableSubmit,
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="less">
|
||||
/**隐藏样式-modal确定按钮 */
|
||||
.jee-hidden {
|
||||
display: none !important;
|
||||
}
|
||||
</style>
|
||||
<style lang="less" scoped></style>
|
Loading…
Reference in New Issue