机构加盟申请

This commit is contained in:
1378012178@qq.com 2025-06-09 14:46:36 +08:00
parent 345b51130f
commit a4ba10534c
10 changed files with 1249 additions and 0 deletions

View File

@ -0,0 +1,75 @@
<template>
<div class="section-divider">
<!-- 左侧灰色横线 -->
<!-- <div class="left-line"></div> -->
<img src="./section.svg" class="divider-icon" />
<!-- 标题文字 -->
<div class="divider-content">
<slot>{{ title }}</slot>
</div>
<!-- 右侧灰色横线 -->
<!-- <div class="right-line"></div> -->
</div>
</template>
<script>
export default {
name: "SectionDivider",
props: {
title: {
type: String,
default: "分组标题",
},
},
};
</script>
<style scoped>
.section-divider {
display: flex;
align-items: center;
margin: 5px 0 30px 20px;
}
/* 蓝色竖线(带圆角) */
.divider-line {
width: 4px;
height: 20px;
border-radius: 10px;
background-color: #1890ff;
margin-right: 10px;
}
/* 标题文字 */
.divider-content {
font-weight: bold;
font-size: 16px;
color: #333;
white-space: nowrap;
/* 防止文字换行影响横线对齐 */
}
/* SVG 图标样式 */
.divider-icon {
width: 18px;
/* 与原来蓝色竖线宽度一致 */
height: auto;
/* 与原来高度一致 */
margin-right: 6px;
/* 与文字的间距 */
}
/* 左侧灰色横线 */
.left-line {
width: 20px; /* 宽度20px */
height: 1px;
background-color: #ddd; /* 灰色 */
margin-right: 8px; /* 与蓝色竖线的间距 */
}
/* 右侧灰色横线 */
.right-line {
width: 60px; /* 宽度50px */
height: 1px;
background-color: #ddd; /* 灰色 */
margin-left: 8px; /* 与文字的间距 */
}
</style>

View File

@ -0,0 +1 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1749108734478" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="35558" xmlns:xlink="http://www.w3.org/1999/xlink" width="256" height="256"><path d="M153.6 337.92v563.2c0 15.36 20.48 25.6 30.72 15.36l317.44-225.28c5.12-5.12 15.36-5.12 25.6 0l312.32 225.28c15.36 10.24 30.72 0 30.72-15.36v-563.2c0-30.72-25.6-56.32-51.2-56.32H204.8c-25.6 0-51.2 25.6-51.2 56.32z m0-56.32M839.68 204.8H184.32c-15.36 0-30.72-15.36-30.72-30.72v-40.96c0-20.48 15.36-30.72 30.72-30.72h655.36c15.36 0 30.72 10.24 30.72 30.72v40.96c0 15.36-15.36 30.72-30.72 30.72z" p-id="35559" fill="#018FFB"></path></svg>

After

Width:  |  Height:  |  Size: 767 B

View File

@ -6,6 +6,9 @@ import AIcon from '/@/components/jeecg/AIcon.vue';
import { Button, JUploadButton } from './Button';
// 表单分栏标题组件
import SectionDivider from '/@/components/SectionDivider/SectionDivider.vue';
// 按需注册antd的组件
import {
// Need
@ -69,6 +72,8 @@ export function registerGlobComp(app: App) {
//仪表盘依赖Tinymce需要提前加载没办法按需加载了
app.component(Editor.name, Editor);
//表单分栏标题组件
app.component('SectionDivider',SectionDivider);
// update-begin--author:liaozhiyang---date:20240308---for【QQYUN-8241】Tinymce异步加载
// app.component(
// 'Tinymce',

View File

@ -0,0 +1,309 @@
<template>
<div class="terminal-container">
<div class="terminal-header">
<span>SSH终端</span>
<div>
<a-button @click="connect" type="primary" size="small">连接</a-button>
<a-button @click="disconnect" size="small" style="margin-left: 8px">断开</a-button>
</div>
</div>
<div class="terminal-body" ref="terminalBody">
<div v-for="(line, index) in outputLines" :key="index" class="terminal-line">
<span v-if="line.type === 'input'" class="input-prompt">$ </span>
<span :class="line.type">{{ line.text }}</span>
</div>
<div class="terminal-input-line">
<span class="input-prompt">$ </span>
<input
v-model="currentCommand"
@keyup.enter="executeCommand"
@keyup.up="historyUp"
@keyup.down="historyDown"
ref="commandInput"
class="terminal-input"
/>
</div>
</div>
<a-modal
v-model:visible="connectionModalVisible"
title="SSH连接配置"
@ok="handleConnect"
:ok-button-props="{ disabled: connecting }"
:cancel-button-props="{ disabled: connecting }"
>
<a-form :model="connectionForm" :rules="formRules" layout="vertical">
<a-form-item label="主机地址" name="host">
<a-input v-model:value="connectionForm.host" />
</a-form-item>
<a-form-item label="端口" name="port">
<a-input-number v-model:value="connectionForm.port" :min="1" :max="65535" />
</a-form-item>
<a-form-item label="用户名" name="username">
<a-input v-model:value="connectionForm.username" />
</a-form-item>
<a-form-item label="密码" name="password">
<a-input-password v-model:value="connectionForm.password" />
</a-form-item>
</a-form>
</a-modal>
</div>
</template>
<script lang="ts">
import { defineComponent, ref, nextTick, onMounted, onBeforeUnmount } from 'vue'
import { message } from 'ant-design-vue'
interface TerminalLine {
type: 'input' | 'output' | 'error' | 'system'
text: string
}
interface ConnectionForm {
host: string
port: number
username: string
password: string
}
export default defineComponent({
name: 'SshTerminal',
setup() {
const outputLines = ref<TerminalLine[]>([])
const currentCommand = ref('')
const commandHistory = ref<string[]>([])
const historyIndex = ref(-1)
const connectionModalVisible = ref(false)
const connecting = ref(false)
const connected = ref(false)
const socket = ref<WebSocket | null>(null)
const terminalBody = ref<HTMLElement | null>(null)
const commandInput = ref<HTMLInputElement | null>(null)
const connectionForm = ref<ConnectionForm>({
host: '',
port: 22,
username: '',
password: ''
})
const formRules = {
host: [{ required: true, message: '请输入主机地址' }],
port: [{ required: true, message: '请输入端口' }],
username: [{ required: true, message: '请输入用户名' }],
password: [{ required: true, message: '请输入密码' }]
}
const clientId = Math.random().toString(36).substring(2, 10)
const addOutput = (type: TerminalLine['type'], text: string) => {
outputLines.value.push({ type, text })
scrollToBottom()
}
const scrollToBottom = () => {
nextTick(() => {
if (terminalBody.value) {
terminalBody.value.scrollTop = terminalBody.value.scrollHeight
}
})
}
const connect = () => {
connectionModalVisible.value = true
}
const handleConnect = () => {
connecting.value = true
initWebSocket()
}
const initWebSocket = () => {
const wsUrl = `ws://${window.location.host}/jeecg-boot/ws/ssh/${clientId}`
socket.value = new WebSocket(wsUrl)
socket.value.onopen = () => {
const { host, port, username, password } = connectionForm.value
const connectMsg = `connect:${host}:${port}:${username}:${password}`
socket.value?.send(connectMsg)
connected.value = true
connecting.value = false
connectionModalVisible.value = false
addOutput('system', 'SSH连接已建立')
}
socket.value.onmessage = (event) => {
addOutput('output', event.data)
}
socket.value.onerror = (error) => {
addOutput('error', '连接错误: ' + error)
connecting.value = false
connected.value = false
}
socket.value.onclose = () => {
if (connected.value) {
addOutput('system', 'SSH连接已断开')
}
connected.value = false
connecting.value = false
}
}
const disconnect = () => {
if (connected.value && socket.value) {
socket.value.send('disconnect')
socket.value.close()
}
}
const executeCommand = () => {
if (!currentCommand.value.trim()) return
if (!connected.value) {
addOutput('system', '请先建立SSH连接')
return
}
//
commandHistory.value.push(currentCommand.value)
historyIndex.value = commandHistory.value.length
//
addOutput('input', currentCommand.value)
//
socket.value?.send(currentCommand.value)
currentCommand.value = ''
scrollToBottom()
}
const historyUp = () => {
if (commandHistory.value.length === 0) return
if (historyIndex.value > 0) {
historyIndex.value--
currentCommand.value = commandHistory.value[historyIndex.value]
}
}
const historyDown = () => {
if (historyIndex.value < commandHistory.value.length - 1) {
historyIndex.value++
currentCommand.value = commandHistory.value[historyIndex.value]
} else if (historyIndex.value === commandHistory.value.length - 1) {
historyIndex.value++
currentCommand.value = ''
}
}
const focusInput = () => {
nextTick(() => {
commandInput.value?.focus()
})
}
onMounted(() => {
focusInput()
})
onBeforeUnmount(() => {
if (socket.value) {
socket.value.close()
}
})
return {
outputLines,
currentCommand,
connectionModalVisible,
connecting,
connectionForm,
formRules,
terminalBody,
commandInput,
connect,
handleConnect,
disconnect,
executeCommand,
historyUp,
historyDown
}
}
})
</script>
<style scoped>
.terminal-container {
height: 100%;
display: flex;
flex-direction: column;
background-color: #1e1e1e;
color: #f0f0f0;
border-radius: 4px;
overflow: hidden;
}
.terminal-header {
padding: 8px 16px;
background-color: #333;
display: flex;
justify-content: space-between;
align-items: center;
border-bottom: 1px solid #444;
}
.terminal-body {
flex: 1;
padding: 8px;
overflow-y: auto;
font-family: 'Courier New', monospace;
font-size: 14px;
line-height: 1.5;
}
.terminal-line {
margin-bottom: 4px;
word-break: break-all;
white-space: pre-wrap;
}
.terminal-input-line {
display: flex;
align-items: center;
}
.input-prompt {
color: #4caf50;
margin-right: 8px;
}
.terminal-input {
flex: 1;
background: transparent;
border: none;
color: #fff;
font-family: 'Courier New', monospace;
font-size: 14px;
outline: none;
}
.output {
color: #f0f0f0;
}
.error {
color: #ff5252;
}
.input {
color: #bbdefb;
}
.system {
color: #ff9800;
}
</style>

View File

@ -0,0 +1,72 @@
import { defHttp } from '/@/utils/http/axios';
import { useMessage } from "/@/hooks/web/useMessage";
const { createConfirm } = useMessage();
enum Api {
list = '/orgapplyinfo/orgApplyInfo/list',
save='/orgapplyinfo/orgApplyInfo/add',
edit='/orgapplyinfo/orgApplyInfo/edit',
deleteOne = '/orgapplyinfo/orgApplyInfo/delete',
deleteBatch = '/orgapplyinfo/orgApplyInfo/deleteBatch',
importExcel = '/orgapplyinfo/orgApplyInfo/importExcel',
exportXls = '/orgapplyinfo/orgApplyInfo/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 });
}

View File

@ -0,0 +1,67 @@
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: 'status_dictText'
},
{
title: '咨询人姓名',
align: "center",
dataIndex: 'name'
},
{
title: '性别',
align: "center",
dataIndex: 'sex'
},
{
title: '联系电话',
align: "center",
dataIndex: 'tel'
},
{
title: '申请日期',
align: "center",
dataIndex: 'createTime'
},
{
title: '机构地址',
align: "center",
dataIndex: 'orgAddress'
},
{
title: '机构负责人电话',
align: "center",
dataIndex: 'orgLeaderPhone'
},
{
title: '机构房屋性质',
align: "center",
dataIndex: 'orgPropertyType'
},
{
title: '机构建筑面积',
align: "center",
dataIndex: 'orgBuildingArea'
},
];
// 高级查询数据
export const superQuerySchema = {
tel: {title: '联系电话',order: 2,view: 'text', type: 'string',},
status: {title: '状态 1审核中 2审核完成 3驳回 ',order: 3,view: 'list', type: 'string',dictCode: '',},
createTime: {title: '创建日期',order: 5,view: 'datetime', type: 'string',},
izEntry: {title: '机构是否入驻0否 1是(是否入驻过)',order: 7,view: 'list', type: 'string',dictCode: '',},
name: {title: '咨询人姓名',order: 8,view: 'text', type: 'string',},
sex: {title: '性别',order: 9,view: 'text', type: 'string',},
orgAddress: {title: '机构地址',order: 24,view: 'text', type: 'string',},
orgLeaderPhone: {title: '机构负责人电话',order: 27,view: 'text', type: 'string',},
orgPropertyType: {title: '机构房屋性质',order: 29,view: 'text', type: 'string',},
orgBuildingArea: {title: '机构建筑面积',order: 30,view: 'number', type: 'number',},
};

View File

@ -0,0 +1,272 @@
<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>
</template>
<!--操作栏-->
<template #action="{ record }">
<TableAction :actions="getTableAction(record)" />
</template>
<template v-slot:bodyCell="{ column, record, index, text }">
</template>
</BasicTable>
<!-- 表单区域 -->
<OrgApplyInfoModal ref="registerModal" @success="handleSuccess"></OrgApplyInfoModal>
</div>
</template>
<script lang="ts" name="orgapplyinfo-orgApplyInfo" setup>
import { ref, reactive } from 'vue';
import { BasicTable, useTable, TableAction } from '/@/components/Table';
import { useListPage } from '/@/hooks/system/useListPage';
import { columns, superQuerySchema } from './OrgApplyInfo.data';
import { list, deleteOne, batchDelete, getImportUrl, getExportUrl } from './OrgApplyInfo.api';
import { downloadFile } from '/@/utils/common/renderUtils';
import OrgApplyInfoModal from './components/OrgApplyInfoModal.vue'
import { useUserStore } from '/@/store/modules/user';
import JRangeNumber from "/@/components/Form/src/jeecg/components/JRangeNumber.vue";
import JInput from "/@/components/Form/src/jeecg/components/JInput.vue";
import { cloneDeep } from "lodash-es";
import JDictSelectTag from '/@/components/Form/src/jeecg/components/JDictSelectTag.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) => {
let rangerQuery = await setRangeQuery();
return Object.assign(params, rangerQuery);
},
},
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: handleDetail.bind(null, record),
},
{
label: '审批',
onClick: handleEdit.bind(null, record),
auth: 'orgapplyinfo:nu_org_apply_info:edit'
},
];
}
/**
* 查询
*/
function searchQuery() {
reload();
}
/**
* 重置
*/
function searchReset() {
formRef.value.resetFields();
selectedRowKeys.value = [];
//
reload();
}
let rangeField = 'orgBuildingArea,'
/**
* 设置范围查询条件
*/
async function setRangeQuery() {
let queryParamClone = cloneDeep(queryParam);
if (rangeField) {
let fieldsValue = rangeField.split(',');
fieldsValue.forEach(item => {
if (queryParamClone[item]) {
let range = queryParamClone[item];
queryParamClone[item + '_begin'] = range[0];
queryParamClone[item + '_end'] = range[1];
delete queryParamClone[item];
} else {
queryParamClone[item + '_begin'] = '';
queryParamClone[item + '_end'] = '';
}
})
}
return queryParamClone;
}
</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>

View File

@ -0,0 +1,359 @@
<template>
<a-spin :spinning="confirmLoading">
<JFormContainer :disabled="disabled">
<template #detail>
<a-form ref="formRef" class="antd-modal-form" :labelCol="labelCol" :wrapperCol="wrapperCol"
name="OrgApplyInfoForm">
<a-row>
<a-col :span="24">
<SectionDivider :title="'入驻审批'" />
</a-col>
<a-col :span="12">
<a-form-item label="审批" v-bind="validateInfos.status" id="OrgApplyInfoForm-status" name="status">
<j-dict-select-tag v-model:value="formData.status" dictCode="org_apply_status" placeholder="请选择审批结果"
allow-clear />
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="审核备注" v-bind="validateInfos.content" id="OrgApplyInfoForm-content" name="content">
<a-input v-model:value="formData.content" placeholder="请输入审核备注" allow-clear></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.name" id="OrgApplyInfoForm-name" name="name">
<a-input v-model:value="formData.name" placeholder="请输入咨询人姓名" allow-clear></a-input>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="联系电话" v-bind="validateInfos.tel" id="OrgApplyInfoForm-tel" name="tel">
<a-input v-model:value="formData.tel" placeholder="请输入联系电话" allow-clear></a-input>
</a-form-item>
</a-col>
<!-- <a-col :span="12">
<a-form-item label="微信名称" v-bind="validateInfos.wechatName" id="OrgApplyInfoForm-wechatName"
name="wechatName">
<a-input v-model:value="formData.wechatName" placeholder="请输入微信名称" allow-clear></a-input>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="微信id" v-bind="validateInfos.openId" id="OrgApplyInfoForm-openId" name="openId">
<a-input v-model:value="formData.openId" placeholder="请输入微信id" allow-clear></a-input>
</a-form-item>
</a-col> -->
<a-col :span="12">
<a-form-item label="申请日期" v-bind="validateInfos.createTime" id="OrgApplyInfoForm-createTime"
name="createTime">
<a-date-picker placeholder="请选择申请日期" v-model:value="formData.createTime" showTime
value-format="YYYY-MM-DD HH:mm:ss" style="width: 100%" allow-clear />
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="机构是否完成入驻" v-bind="validateInfos.izEntry" id="OrgApplyInfoForm-izEntry" name="izEntry">
<a-select v-model:value="formData.izEntry" placeholder="请选择机构是否入驻" allowClear>
<a-select-option value="0">未入驻</a-select-option>
<a-select-option value="1">已入驻</a-select-option>
</a-select>
</a-form-item>
</a-col>
<a-col :span="24">
<SectionDivider :title="'身份证'" />
</a-col>
<a-col :span="12">
<a-form-item label="性别" v-bind="validateInfos.sex" id="OrgApplyInfoForm-sex" name="sex">
<a-input v-model:value="formData.sex" placeholder="请输入性别" allow-clear></a-input>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="民族" v-bind="validateInfos.national" id="OrgApplyInfoForm-national" name="national">
<a-input v-model:value="formData.national" placeholder="请输入民族" allow-clear></a-input>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="出生日期" v-bind="validateInfos.birthDate" id="OrgApplyInfoForm-birthDate"
name="birthDate">
<a-date-picker placeholder="请选择出生日期" v-model:value="formData.birthDate" showTime
value-format="YYYY-MM-DD HH:mm:ss" style="width: 100%" allow-clear />
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="住址(身份证上)" v-bind="validateInfos.idCardAddress" id="OrgApplyInfoForm-idCardAddress"
name="idCardAddress">
<a-input v-model:value="formData.idCardAddress" placeholder="请输入住址(身份证上)" allow-clear></a-input>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="身份证号" v-bind="validateInfos.idCard" id="OrgApplyInfoForm-idCard" name="idCard">
<a-input v-model:value="formData.idCard" placeholder="请输入身份证号" allow-clear></a-input>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="签发机关" v-bind="validateInfos.issuingAuthority" id="OrgApplyInfoForm-issuingAuthority"
name="issuingAuthority">
<a-input v-model:value="formData.issuingAuthority" placeholder="请输入签发机关" allow-clear></a-input>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="有效开始日期" v-bind="validateInfos.startTime" id="OrgApplyInfoForm-startTime"
name="startTime">
<a-date-picker placeholder="请选择有效开始日期" v-model:value="formData.startTime" showTime
value-format="YYYY-MM-DD HH:mm:ss" style="width: 100%" allow-clear />
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="有效结束日期" v-bind="validateInfos.endTime" id="OrgApplyInfoForm-endTime" name="endTime">
<a-date-picker placeholder="请选择有效结束日期" v-model:value="formData.endTime" showTime
value-format="YYYY-MM-DD HH:mm:ss" style="width: 100%" allow-clear />
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="身份证正面" v-bind="validateInfos.cardZmPath" id="OrgApplyInfoForm-cardZmPath"
name="cardZmPath">
<a-input v-model:value="formData.cardZmPath" placeholder="请输入身份证正面" allow-clear></a-input>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="身份证反面" v-bind="validateInfos.cardFmPath" id="OrgApplyInfoForm-cardFmPath"
name="cardFmPath">
<a-input v-model:value="formData.cardFmPath" placeholder="请输入身份证反面" allow-clear></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.comBusinessLicense"
id="OrgApplyInfoForm-comBusinessLicense" name="comBusinessLicense">
<a-input v-model:value="formData.comBusinessLicense" placeholder="请输入营业执照照片" allow-clear></a-input>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="企业名称" v-bind="validateInfos.comName" id="OrgApplyInfoForm-comName" name="comName">
<a-input v-model:value="formData.comName" placeholder="请输入企业名称" allow-clear></a-input>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="企业注册地址" v-bind="validateInfos.comRegisterAddress"
id="OrgApplyInfoForm-comRegisterAddress" name="comRegisterAddress">
<a-input v-model:value="formData.comRegisterAddress" placeholder="请输入企业注册地址" allow-clear></a-input>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="企业信用代码" v-bind="validateInfos.comCreditCode" id="OrgApplyInfoForm-comCreditCode"
name="comCreditCode">
<a-input v-model:value="formData.comCreditCode" placeholder="请输入企业信用代码" allow-clear></a-input>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="企业法人" v-bind="validateInfos.comLegalPerson" id="OrgApplyInfoForm-comLegalPerson"
name="comLegalPerson">
<a-input v-model:value="formData.comLegalPerson" placeholder="请输入企业法人" allow-clear></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.orgAddress" id="OrgApplyInfoForm-orgAddress"
name="orgAddress">
<a-input v-model:value="formData.orgAddress" placeholder="请输入机构地址" allow-clear></a-input>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="机构负责人" v-bind="validateInfos.orgLeader" id="OrgApplyInfoForm-orgLeader"
name="orgLeader">
<a-input v-model:value="formData.orgLeader" placeholder="请输入机构负责人" allow-clear></a-input>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="机构负责人电话" v-bind="validateInfos.orgLeaderPhone" id="OrgApplyInfoForm-orgLeaderPhone"
name="orgLeaderPhone">
<a-input v-model:value="formData.orgLeaderPhone" placeholder="请输入机构负责人电话" allow-clear></a-input>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="机构楼宇牌号" v-bind="validateInfos.orgBuildingNumber"
id="OrgApplyInfoForm-orgBuildingNumber" name="orgBuildingNumber">
<a-input v-model:value="formData.orgBuildingNumber" placeholder="请输入机构楼宇牌号" allow-clear></a-input>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="机构房屋性质" v-bind="validateInfos.orgPropertyType" id="OrgApplyInfoForm-orgPropertyType"
name="orgPropertyType">
<a-input v-model:value="formData.orgPropertyType" placeholder="请输入机构房屋性质" allow-clear></a-input>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="机构建筑面积" v-bind="validateInfos.orgBuildingArea" id="OrgApplyInfoForm-orgBuildingArea"
name="orgBuildingArea">
<a-input-number v-model:value="formData.orgBuildingArea" placeholder="请输入机构建筑面积" style="width: 100%" />
</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 '../OrgApplyInfo.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: '',
openId: '',
wechatName: '',
tel: '',
status: '',
content: '',
createTime: '',
updateTime: '',
izEntry: '',
name: '',
sex: '',
national: '',
birthDate: '',
idCardAddress: '',
idCard: '',
issuingAuthority: '',
startTime: '',
endTime: '',
cardZmPath: '',
cardFmPath: '',
comBusinessLicense: '',
comName: '',
comRegisterAddress: '',
comCreditCode: '',
comLegalPerson: '',
orgAddress: '',
orgCoordinate: '',
orgLeader: '',
orgLeaderPhone: '',
orgBuildingNumber: '',
orgPropertyType: '',
orgBuildingArea: undefined,
});
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>

View File

@ -0,0 +1,76 @@
<template>
<j-modal :title="title" width="70vw" :visible="visible" @ok="handleOk" :okButtonProps="{ class: { 'jee-hidden': disableSubmit } }" @cancel="handleCancel" cancelText="关闭">
<OrgApplyInfoForm ref="registerForm" @ok="submitCallback" :formDisabled="disableSubmit" :formBpm="false"></OrgApplyInfoForm>
</j-modal>
</template>
<script lang="ts" setup>
import { ref, nextTick, defineExpose } from 'vue';
import OrgApplyInfoForm from './OrgApplyInfoForm.vue'
import JModal from '/@/components/Modal/src/JModal/JModal.vue';
const title = ref<string>('');
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>

View File

@ -0,0 +1,13 @@
<template>
<div>
<Terminal></Terminal>
</div>
</template>
<script lang="ts" name="ssh-sshservice" setup>
import Terminal from '/@/components/terminal/Terminal.vue'
</script>
<style lang="less" scoped></style>