新增查看页面

This commit is contained in:
2026-01-10 17:47:44 +08:00
parent 1174e19038
commit 363d889cb2
41 changed files with 2786 additions and 145 deletions

View File

@@ -24,6 +24,7 @@
</a>
</template>
</BasicTable>
<ViewForm @register="registerViewModal" @success="handleSuccess" />
<InputForm @register="registerModal" @success="handleSuccess" />
<FormImport @register="registerImportModal" @success="handleSuccess" />
</div>
@@ -41,6 +42,7 @@
import { bizCitiesDelete, bizCitiesListData } from '@jeesite/biz/api/biz/cities';
import { useModal } from '@jeesite/core/components/Modal';
import { FormProps } from '@jeesite/core/components/Form';
import ViewForm from './view.vue';
import InputForm from './form.vue';
import FormImport from './formImport.vue';
@@ -217,6 +219,11 @@
auth: 'biz:cities:edit',
ifShow: record.dataStatus == '0'
},
{
icon: 'simple-line-icons:eye',
title: t('查看'),
onClick: viewForm.bind(this, { id: record.id }),
},
],
};
@@ -255,8 +262,14 @@
loading.value = false;
}
const [registerViewModal, { openModal: openViewModal }] = useModal();
function viewForm(record: Recordable) {
openViewModal(true, record);
}
const [registerImportModal, { openModal: importModal }] = useModal();
function handleImport() {
importModal(true, {});
}

View File

@@ -0,0 +1,124 @@
<!--
* Copyright (c) 2013-Now http://jeesite.com All rights reserved.
* No deletion without permission, or be held responsible to law.
* @author gaoxq
-->
<template>
<BasicModal
v-bind="$attrs"
:showFooter="true"
:showOkBtn="false"
@register="registerModal"
width="60%"
>
<template #title>
<Icon :icon="getTitle.icon" class="m-1 pr-1" />
<span> {{ getTitle.value }} </span>
</template>
<BasicForm @register="registerForm" />
</BasicModal>
</template>
<script lang="ts" setup name="ViewsBizCitiesForm">
import { ref, unref, computed } from 'vue';
import { useI18n } from '@jeesite/core/hooks/web/useI18n';
import { useMessage } from '@jeesite/core/hooks/web/useMessage';
import { router } from '@jeesite/core/router';
import { Icon } from '@jeesite/core/components/Icon';
import { BasicForm, FormSchema, useForm } from '@jeesite/core/components/Form';
import { BasicModal, useModalInner } from '@jeesite/core/components/Modal';
import { BizCities, bizCitiesSave, bizCitiesForm } from '@jeesite/biz/api/biz/cities';
const emit = defineEmits(['success', 'register']);
const { t } = useI18n('biz.cities');
const { showMessage } = useMessage();
const { meta } = unref(router.currentRoute);
const record = ref<BizCities>({} as BizCities);
const getTitle = computed(() => ({
icon: meta.icon || 'i-ant-design:book-outlined',
value: t('查看市区信息'),
}));
const inputFormSchemas: FormSchema<BizCities>[] = [
{
label: t('省份名称'),
field: 'provinceCode',
fieldLabel: 'provinceName',
component: 'ListSelect',
componentProps: {
selectType: 'bizProvSelect',
},
dynamicDisabled: true,
colProps: { md: 24, lg: 24 },
},
{
label: t('市区编码'),
field: 'cityCode',
component: 'Input',
componentProps: {
maxlength: 24,
},
dynamicDisabled: true,
colProps: { md: 24, lg: 24 },
},
{
label: t('市区名称'),
field: 'cityName',
component: 'Input',
componentProps: {
maxlength: 125,
},
dynamicDisabled: true,
colProps: { md: 24, lg: 24 },
},
{
label: t('市区区号'),
field: 'areaCode',
component: 'Input',
componentProps: {
maxlength: 12,
},
dynamicDisabled: true,
colProps: { md: 24, lg: 24 },
},
{
label: t('市区级别'),
field: 'areaType',
component: 'Select',
componentProps: {
dictType: 'area_type',
allowClear: true,
},
dynamicDisabled: true,
colProps: { md: 24, lg: 24 },
},
{
label: t('数据状态'),
field: 'dataStatus',
component: 'Select',
componentProps: {
dictType: 'ustatus',
allowClear: true,
},
dynamicDisabled: true,
colProps: { md: 24, lg: 24 },
},
];
const [registerForm, { resetFields, setFieldsValue, validate }] = useForm<BizCities>({
labelWidth: 120,
schemas: inputFormSchemas,
baseColProps: { md: 24, lg: 12 },
});
const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data) => {
setModalProps({ loading: true });
await resetFields();
const res = await bizCitiesForm(data);
record.value = (res.bizCities || {}) as BizCities;
record.value.__t = new Date().getTime();
await setFieldsValue(record.value);
setModalProps({ loading: false });
});
</script>

View File

@@ -24,6 +24,7 @@
</a>
</template>
</BasicTable>
<ViewForm @register="registerViewModal" @success="handleSuccess" />
<InputForm @register="registerModal" @success="handleSuccess" />
<FormImport @register="registerImportModal" @success="handleSuccess" />
</div>
@@ -41,6 +42,7 @@
import { bizCompanyDelete, bizCompanyListData } from '@jeesite/biz/api/biz/company';
import { useModal } from '@jeesite/core/components/Modal';
import { FormProps } from '@jeesite/core/components/Form';
import ViewForm from './view.vue';
import InputForm from './form.vue';
import FormImport from './formImport.vue';
@@ -208,6 +210,11 @@
auth: 'biz:company:edit',
ifShow: record.compStatus == '0'
},
{
icon: 'simple-line-icons:eye',
title: t('查看'),
onClick: viewForm.bind(this, { companyId: record.companyId }),
},
],
};
@@ -246,8 +253,14 @@
loading.value = false;
}
const [registerViewModal, { openModal: openViewModal }] = useModal();
function viewForm(record: Recordable) {
openViewModal(true, record);
}
const [registerImportModal, { openModal: importModal }] = useModal();
function handleImport() {
importModal(true, {});
}

View File

@@ -0,0 +1,135 @@
<!--
* Copyright (c) 2013-Now http://jeesite.com All rights reserved.
* No deletion without permission, or be held responsible to law.
* @author gaoxq
-->
<template>
<BasicModal
v-bind="$attrs"
:showFooter="true"
:showOkBtn="false"
@register="registerModal"
width="60%"
>
<template #title>
<Icon :icon="getTitle.icon" class="m-1 pr-1" />
<span> {{ getTitle.value }} </span>
</template>
<BasicForm @register="registerForm" />
</BasicModal>
</template>
<script lang="ts" setup name="ViewsBizCompanyForm">
import { ref, unref, computed } from 'vue';
import { useI18n } from '@jeesite/core/hooks/web/useI18n';
import { useMessage } from '@jeesite/core/hooks/web/useMessage';
import { router } from '@jeesite/core/router';
import { Icon } from '@jeesite/core/components/Icon';
import { BasicForm, FormSchema, useForm } from '@jeesite/core/components/Form';
import { BasicModal, useModalInner } from '@jeesite/core/components/Modal';
import { BizCompany, bizCompanySave, bizCompanyForm } from '@jeesite/biz/api/biz/company';
const emit = defineEmits(['success', 'register']);
const { t } = useI18n('biz.company');
const { showMessage } = useMessage();
const { meta } = unref(router.currentRoute);
const record = ref<BizCompany>({} as BizCompany);
const getTitle = computed(() => ({
icon: meta.icon || 'i-ant-design:book-outlined',
value: t('查看公司信息'),
}));
const inputFormSchemas: FormSchema<BizCompany>[] = [
{
label: t('公司名称'),
field: 'companyName',
component: 'Input',
componentProps: {
maxlength: 100,
},
dynamicDisabled: true,
colProps: { md: 24, lg: 24 },
},
{
label: t('公司地址'),
field: 'address',
component: 'Input',
componentProps: {
maxlength: 255,
},
colProps: { md: 24, lg: 24 },
dynamicDisabled: true,
},
{
label: t('联系人员'),
field: 'contactPerson',
component: 'Input',
componentProps: {
maxlength: 100,
},
dynamicDisabled: true,
},
{
label: t('联系电话'),
field: 'phoneNumber',
component: 'Input',
componentProps: {
maxlength: 20,
},
dynamicDisabled: true,
},
{
label: t('电子邮箱'),
field: 'email',
component: 'Input',
componentProps: {
maxlength: 100,
},
dynamicDisabled: true,
},
{
label: t('公司状态'),
field: 'compStatus',
component: 'Select',
componentProps: {
dictType: 'ustatus',
allowClear: true,
},
dynamicDisabled: true,
},
{
label: t('官方网址'),
field: 'websiteUrl',
component: 'Input',
componentProps: {
maxlength: 255,
},
colProps: { md: 24, lg: 24 },
dynamicDisabled: true,
},
{
label: t('备注说明'),
field: 'remarks',
component: 'InputTextArea',
colProps: { md: 24, lg: 24 },
dynamicDisabled: true,
},
];
const [registerForm, { resetFields, setFieldsValue, validate }] = useForm<BizCompany>({
labelWidth: 120,
schemas: inputFormSchemas,
baseColProps: { md: 24, lg: 12 },
});
const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data) => {
setModalProps({ loading: true });
await resetFields();
const res = await bizCompanyForm(data);
record.value = (res.bizCompany || {}) as BizCompany;
record.value.__t = new Date().getTime();
await setFieldsValue(record.value);
setModalProps({ loading: false });
});
</script>

View File

@@ -24,6 +24,7 @@
</a>
</template>
</BasicTable>
<ViewForm @register="registerViewModal" @success="handleSuccess" />
<InputForm @register="registerModal" @success="handleSuccess" />
<FormImport @register="registerImportModal" @success="handleSuccess" />
</div>
@@ -41,6 +42,7 @@
import { bizDbConfigDelete, bizDbConfigListData } from '@jeesite/biz/api/biz/dbConfig';
import { useModal } from '@jeesite/core/components/Modal';
import { FormProps } from '@jeesite/core/components/Form';
import ViewForm from './view.vue';
import InputForm from './form.vue';
import FormImport from './formImport.vue';
@@ -228,6 +230,11 @@
auth: 'biz:dbConfig:edit',
ifShow: record.isEnabled == '0'
},
{
icon: 'simple-line-icons:eye',
title: t('查看'),
onClick: viewForm.bind(this, { id: record.id }),
},
],
};
@@ -266,6 +273,12 @@
loading.value = false;
}
const [registerViewModal, { openModal: openViewModal }] = useModal();
function viewForm(record: Recordable) {
openViewModal(true, record);
}
const [registerImportModal, { openModal: importModal }] = useModal();
function handleImport() {

View File

@@ -0,0 +1,143 @@
<!--
* Copyright (c) 2013-Now http://jeesite.com All rights reserved.
* No deletion without permission, or be held responsible to law.
* @author gaoxq
-->
<template>
<BasicModal
v-bind="$attrs"
:showFooter="true"
:showOkBtn="false"
@register="registerModal"
width="60%"
>
<template #title>
<Icon :icon="getTitle.icon" class="m-1 pr-1" />
<span> {{ getTitle.value }} </span>
</template>
<BasicForm @register="registerForm" />
</BasicModal>
</template>
<script lang="ts" setup name="ViewsBizDbConfigForm">
import { ref, unref, computed } from 'vue';
import { useI18n } from '@jeesite/core/hooks/web/useI18n';
import { useMessage } from '@jeesite/core/hooks/web/useMessage';
import { router } from '@jeesite/core/router';
import { Icon } from '@jeesite/core/components/Icon';
import { BasicForm, FormSchema, useForm } from '@jeesite/core/components/Form';
import { BasicModal, useModalInner } from '@jeesite/core/components/Modal';
import { BizDbConfig, bizDbConfigSave, bizDbConfigForm } from '@jeesite/biz/api/biz/dbConfig';
import { formatToDateTime } from '@jeesite/core/utils/dateUtil';
const emit = defineEmits(['success', 'register']);
const { t } = useI18n('biz.dbConfig');
const { showMessage } = useMessage();
const { meta } = unref(router.currentRoute);
const record = ref<BizDbConfig>({} as BizDbConfig);
const getTitle = computed(() => ({
icon: meta.icon || 'i-ant-design:book-outlined',
value: t('查看连接信息'),
}));
const inputFormSchemas: FormSchema<BizDbConfig>[] = [
{
label: t('数据库名称'),
field: 'dbName',
component: 'Input',
componentProps: {
maxlength: 128,
},
dynamicDisabled: true,
},
{
label: t('数据库类型'),
field: 'dbType',
component: 'Select',
componentProps: {
dictType: 'db_type',
allowClear: true,
},
dynamicDisabled: true,
},
{
label: t('数据库IP'),
field: 'dbIp',
component: 'Input',
componentProps: {
maxlength: 64,
},
dynamicDisabled: true,
},
{
label: t('数据库端口'),
field: 'dbPort',
component: 'InputNumber',
componentProps: {
maxlength: 10,
},
dynamicDisabled: true,
},
{
label: t('数据库账号'),
field: 'dbUsername',
component: 'Input',
componentProps: {
maxlength: 128,
},
dynamicDisabled: true,
},
{
label: t('数据库密码'),
field: 'dbPassword',
component: 'Input',
componentProps: {
maxlength: 256,
},
dynamicDisabled: true,
},
{
label: t('数据库描述'),
field: 'description',
component: 'InputTextArea',
colProps: { md: 24, lg: 24 },
dynamicDisabled: true,
},
{
label: t('是否启用'),
field: 'isEnabled',
component: 'Select',
componentProps: {
dictType: 'is_active',
allowClear: true,
},
dynamicDisabled: true,
},
{
label: t('schema名称'),
field: 'dbSchemaName',
component: 'Input',
componentProps: {
maxlength: 52,
},
dynamicDisabled: true,
},
];
const [registerForm, { resetFields, setFieldsValue, validate }] = useForm<BizDbConfig>({
labelWidth: 120,
schemas: inputFormSchemas,
baseColProps: { md: 24, lg: 12 },
});
const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data) => {
setModalProps({ loading: true });
await resetFields();
const res = await bizDbConfigForm(data);
record.value = (res.bizDbConfig || {}) as BizDbConfig;
record.value.__t = new Date().getTime();
await setFieldsValue(record.value);
setModalProps({ loading: false });
});
</script>

View File

@@ -19,6 +19,7 @@
</a-button>
</template>
</BasicTable>
<ViewForm @register="registerViewModal" @success="handleSuccess" />
<InputForm @register="registerModal" @success="handleSuccess" />
<FormImport @register="registerImportModal" @success="handleSuccess" />
</div>
@@ -36,6 +37,7 @@
import { bizExecScriptDelete, bizExecScriptRunexec, bizExecScriptListData } from '@jeesite/biz/api/biz/execScript';
import { useModal } from '@jeesite/core/components/Modal';
import { FormProps } from '@jeesite/core/components/Form';
import ViewForm from './view.vue';
import InputForm from './form.vue';
import FormImport from './formImport.vue';
@@ -179,6 +181,11 @@
},
auth: 'biz:execScript:edit',
},
{
icon: 'simple-line-icons:eye',
title: t('查看'),
onClick: viewForm.bind(this, { id: record.id }),
},
],
};
@@ -216,6 +223,12 @@
});
loading.value = false;
}
const [registerViewModal, { openModal: openViewModal }] = useModal();
function viewForm(record: Recordable) {
openViewModal(true, record);
}
const [registerImportModal, { openModal: importModal }] = useModal();

View File

@@ -0,0 +1,116 @@
<!--
* Copyright (c) 2013-Now http://jeesite.com All rights reserved.
* No deletion without permission, or be held responsible to law.
* @author gaoxq
-->
<template>
<BasicModal
v-bind="$attrs"
:showFooter="true"
:showOkBtn="false"
@register="registerModal"
width="70%"
>
<template #title>
<Icon :icon="getTitle.icon" class="m-1 pr-1" />
<span> {{ getTitle.value }} </span>
</template>
<BasicForm @register="registerForm" >
<template #remarks>
<div
v-html="record?.scriptText"
style="border: 1px solid #dcdcdc; max-height: 300px; overflow-y: auto; line-height: 1.8; white-space: pre-wrap; padding: 8px; border-radius: 4px;"
/>
</template>
</BasicForm>
</BasicModal>
</template>
<script lang="ts" setup name="ViewsBizExecScriptForm">
import { ref, unref, computed } from 'vue';
import { useI18n } from '@jeesite/core/hooks/web/useI18n';
import { useMessage } from '@jeesite/core/hooks/web/useMessage';
import { router } from '@jeesite/core/router';
import { Icon } from '@jeesite/core/components/Icon';
import { BasicForm, FormSchema, useForm } from '@jeesite/core/components/Form';
import { BasicModal, useModalInner } from '@jeesite/core/components/Modal';
import { BizExecScript, bizExecScriptSave, bizExecScriptForm } from '@jeesite/biz/api/biz/execScript';
const emit = defineEmits(['success', 'register']);
const { t } = useI18n('biz.execScript');
const { showMessage } = useMessage();
const { meta } = unref(router.currentRoute);
const record = ref<BizExecScript>({} as BizExecScript);
const getTitle = computed(() => ({
icon: meta.icon || 'i-ant-design:book-outlined',
value: t('查看脚本信息'),
}));
const inputFormSchemas: FormSchema<BizExecScript>[] = [
{
label: t('脚本名称'),
field: 'scriptName',
component: 'Input',
componentProps: {
maxlength: 152,
},
colProps: { md: 24, lg: 24 },
dynamicDisabled: true,
},
{
label: t('数据库名称'),
field: 'dbId',
fieldLabel: 'dbName',
component: 'ListSelect',
componentProps: {
selectType: 'bizDbSelect',
},
dynamicDisabled: true,
},
{
label: t('数据状态'),
field: 'dataStatus',
component: 'Select',
componentProps: {
dictType: 'ustatus',
allowClear: true,
},
dynamicDisabled: true,
},
{
label: t('脚本描述'),
field: 'scriptDesc',
component: 'InputTextArea',
componentProps: {
maxlength: 152,
},
colProps: { md: 24, lg: 24 },
dynamicDisabled: true,
},
{
label: t('脚本内容'),
field: 'scriptText',
component: 'InputTextArea',
colProps: { md: 24, lg: 24 },
slot: 'remarks',
dynamicDisabled: true,
},
];
const [registerForm, { resetFields, setFieldsValue, validate }] = useForm<BizExecScript>({
labelWidth: 120,
schemas: inputFormSchemas,
baseColProps: { md: 24, lg: 12 },
});
const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data) => {
setModalProps({ loading: true });
await resetFields();
const res = await bizExecScriptForm(data);
record.value = (res.bizExecScript || {}) as BizExecScript;
record.value.__t = new Date().getTime();
await setFieldsValue(record.value);
setModalProps({ loading: false });
});
</script>

View File

@@ -66,7 +66,7 @@
{
label: t('登录密码'),
field: 'sshPassword',
component: 'Input',
component: 'InputPassword',
componentProps: {
maxlength: 255,
},

View File

@@ -24,6 +24,7 @@
</a>
</template>
</BasicTable>
<ViewForm @register="registerViewModal" @success="handleSuccess" />
<InputForm @register="registerModal" @success="handleSuccess" />
<FormImport @register="registerImportModal" @success="handleSuccess" />
</div>
@@ -41,6 +42,7 @@
import { bizMonitorAccountDelete, bizMonitorAccountListData } from '@jeesite/biz/api/biz/monitorAccount';
import { useModal } from '@jeesite/core/components/Modal';
import { FormProps } from '@jeesite/core/components/Form';
import ViewForm from './view.vue';
import InputForm from './form.vue';
import FormImport from './formImport.vue';
@@ -119,7 +121,7 @@
dataIndex: 'createTime',
key: 'a.create_time',
sorter: true,
width: 230,
width: 180,
align: 'left',
fixed: 'left',
},
@@ -220,6 +222,11 @@
auth: 'biz:monitorAccount:edit',
ifShow: record.ustatus == '0'
},
{
icon: 'simple-line-icons:eye',
title: t('查看'),
onClick: viewForm.bind(this, { accountId: record.accountId }),
},
],
};
@@ -257,7 +264,13 @@
});
loading.value = false;
}
const [registerViewModal, { openModal: openViewModal }] = useModal();
function viewForm(record: Recordable) {
openViewModal(true, record);
}
const [registerImportModal, { openModal: importModal }] = useModal();
function handleImport() {

View File

@@ -0,0 +1,135 @@
<!--
* Copyright (c) 2013-Now http://jeesite.com All rights reserved.
* No deletion without permission, or be held responsible to law.
* @author gaoxq
-->
<template>
<BasicModal
v-bind="$attrs"
:showFooter="true"
:showOkBtn="false"
@register="registerModal"
width="60%"
>
<template #title>
<Icon :icon="getTitle.icon" class="m-1 pr-1" />
<span> {{ getTitle.value }} </span>
</template>
<BasicForm @register="registerForm" />
</BasicModal>
</template>
<script lang="ts" setup name="ViewsBizMonitorAccountForm">
import { ref, unref, computed } from 'vue';
import { useI18n } from '@jeesite/core/hooks/web/useI18n';
import { useMessage } from '@jeesite/core/hooks/web/useMessage';
import { router } from '@jeesite/core/router';
import { Icon } from '@jeesite/core/components/Icon';
import { BasicForm, FormSchema, useForm } from '@jeesite/core/components/Form';
import { BasicModal, useModalInner } from '@jeesite/core/components/Modal';
import { BizMonitorAccount, bizMonitorAccountSave, bizMonitorAccountForm } from '@jeesite/biz/api/biz/monitorAccount';
import { formatToDateTime } from '@jeesite/core/utils/dateUtil';
const emit = defineEmits(['success', 'register']);
const { t } = useI18n('biz.monitorAccount');
const { showMessage } = useMessage();
const { meta } = unref(router.currentRoute);
const record = ref<BizMonitorAccount>({} as BizMonitorAccount);
const getTitle = computed(() => ({
icon: meta.icon || 'i-ant-design:book-outlined',
value: t('查看账号信息'),
}));
const inputFormSchemas: FormSchema<BizMonitorAccount>[] = [
{
label: t('主机名称'),
field: 'hostId',
fieldLabel: 'hostname',
component: 'ListSelect',
componentProps: {
selectType: 'bizHostSelect',
},
dynamicDisabled: true,
colProps: { md: 24, lg: 24 },
},
{
label: t('登录账号'),
field: 'sshUsername',
component: 'Input',
componentProps: {
maxlength: 50,
},
dynamicDisabled: true,
},
{
label: t('登录密码'),
field: 'sshPassword',
component: 'Input',
componentProps: {
maxlength: 255,
},
dynamicDisabled: true,
},
{
label: t('登录端口'),
field: 'sshPort',
component: 'InputNumber',
componentProps: {
maxlength: 9,
},
dynamicDisabled: true,
},
{
label: t('初始目录'),
field: 'initialPath',
component: 'Input',
componentProps: {
maxlength: 500,
},
dynamicDisabled: true,
},
{
label: t('超时时间'),
field: 'timeoutSeconds',
component: 'InputNumber',
componentProps: {
maxlength: 9,
},
dynamicDisabled: true,
},
{
label: t('账号状态'),
field: 'ustatus',
component: 'Select',
componentProps: {
dictType: 'ustatus ',
allowClear: true,
},
dynamicDisabled: true,
},
{
label: t('备注信息'),
field: 'remark',
component: 'InputTextArea',
colProps: { md: 24, lg: 24 },
dynamicDisabled: true,
},
];
const [registerForm, { resetFields, setFieldsValue, validate }] = useForm<BizMonitorAccount>({
labelWidth: 120,
schemas: inputFormSchemas,
baseColProps: { md: 24, lg: 12 },
});
const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data) => {
setModalProps({ loading: true });
await resetFields();
const res = await bizMonitorAccountForm(data);
record.value = (res.bizMonitorAccount || {}) as BizMonitorAccount;
record.value.__t = new Date().getTime();
await setFieldsValue(record.value);
setModalProps({ loading: false });
});
</script>

View File

@@ -24,6 +24,7 @@
</a>
</template>
</BasicTable>
<ViewForm @register="registerViewModal" @success="handleSuccess" />
<InputForm @register="registerModal" @success="handleSuccess" />
<FormImport @register="registerImportModal" @success="handleSuccess" />
</div>
@@ -41,6 +42,7 @@
import { bizMonitorHostDelete, bizMonitorHostListData } from '@jeesite/biz/api/biz/monitorHost';
import { useModal } from '@jeesite/core/components/Modal';
import { FormProps } from '@jeesite/core/components/Form';
import ViewForm from './view.vue';
import InputForm from './form.vue';
import FormImport from './formImport.vue';
@@ -287,6 +289,11 @@
auth: 'biz:monitorHost:edit',
ifShow: record.ustatus == '0'
},
{
icon: 'simple-line-icons:eye',
title: t('查看'),
onClick: viewForm.bind(this, { hostId: record.hostId }),
},
],
};
@@ -324,6 +331,12 @@
});
loading.value = false;
}
const [registerViewModal, { openModal: openViewModal }] = useModal();
function viewForm(record: Recordable) {
openViewModal(true, record);
}
const [registerImportModal, { openModal: importModal }] = useModal();

View File

@@ -0,0 +1,164 @@
<!--
* Copyright (c) 2013-Now http://jeesite.com All rights reserved.
* No deletion without permission, or be held responsible to law.
* @author gaoxq
-->
<template>
<BasicModal
v-bind="$attrs"
:showFooter="true"
:showOkBtn="false"
@register="registerModal"
width="60%"
>
<template #title>
<Icon :icon="getTitle.icon" class="m-1 pr-1" />
<span> {{ getTitle.value }} </span>
</template>
<BasicForm @register="registerForm" />
</BasicModal>
</template>
<script lang="ts" setup name="ViewsBizMonitorHostForm">
import { ref, unref, computed } from 'vue';
import { useI18n } from '@jeesite/core/hooks/web/useI18n';
import { useMessage } from '@jeesite/core/hooks/web/useMessage';
import { router } from '@jeesite/core/router';
import { Icon } from '@jeesite/core/components/Icon';
import { BasicForm, FormSchema, useForm } from '@jeesite/core/components/Form';
import { BasicModal, useModalInner } from '@jeesite/core/components/Modal';
import { BizMonitorHost, bizMonitorHostSave, bizMonitorHostForm } from '@jeesite/biz/api/biz/monitorHost';
import { formatToDateTime } from '@jeesite/core/utils/dateUtil';
const emit = defineEmits(['success', 'register']);
const { t } = useI18n('biz.monitorHost');
const { showMessage } = useMessage();
const { meta } = unref(router.currentRoute);
const record = ref<BizMonitorHost>({} as BizMonitorHost);
const getTitle = computed(() => ({
icon: meta.icon || 'i-ant-design:book-outlined',
value: t('查看主机信息'),
}));
const inputFormSchemas: FormSchema<BizMonitorHost>[] = [
{
label: t('主机名称'),
field: 'hostname',
component: 'Input',
componentProps: {
maxlength: 100,
},
dynamicDisabled: true,
},
{
label: t('IP地址'),
field: 'ipAddress',
component: 'Input',
componentProps: {
maxlength: 45,
},
dynamicDisabled: true,
},
{
label: t('主机类型'),
field: 'hostType',
component: 'Select',
componentProps: {
dictType: 'host_type',
allowClear: true,
},
dynamicDisabled: true,
},
{
label: t('操作系统'),
field: 'hostOs',
component: 'Select',
componentProps: {
dictType: 'host_os',
allowClear: true,
},
dynamicDisabled: true,
},
{
label: t('运行状态'),
field: 'ustatus',
component: 'Select',
componentProps: {
dictType: 'host_status',
allowClear: true,
},
dynamicDisabled: true,
},
{
label: t('物理位置'),
field: 'locationName',
component: 'Input',
componentProps: {
maxlength: 200,
},
dynamicDisabled: true,
},
{
label: t('地址类型'),
field: 'locationType',
component: 'Select',
componentProps: {
dictType: 'location_type',
allowClear: true,
},
dynamicDisabled: true,
},
{
label: t('管理人员'),
field: 'adminUser',
fieldLabel: 'employeeName',
component: 'ListSelect',
componentProps: {
selectType: 'bizEmpSelect',
},
dynamicDisabled: true,
},
{
label: t('联系方式'),
field: 'otherContact',
component: 'Input',
componentProps: {
maxlength: 100,
},
dynamicDisabled: true,
},
{
label: t('失效日期'),
field: 'expiryDate',
component: 'DatePicker',
componentProps: {
format: 'YYYY-MM-DD HH:mm',
showTime: { format: 'HH:mm' },
},
dynamicDisabled: true,
},
{
label: t('备注信息'),
field: 'remark',
component: 'InputTextArea',
colProps: { md: 24, lg: 24 },
},
];
const [registerForm, { resetFields, setFieldsValue, validate }] = useForm<BizMonitorHost>({
labelWidth: 120,
schemas: inputFormSchemas,
baseColProps: { md: 24, lg: 12 },
});
const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data) => {
setModalProps({ loading: true });
await resetFields();
const res = await bizMonitorHostForm(data);
record.value = (res.bizMonitorHost || {}) as BizMonitorHost;
record.value.__t = new Date().getTime();
await setFieldsValue(record.value);
setModalProps({ loading: false });
});
</script>

View File

@@ -27,6 +27,7 @@
<img :src="record.avatar" style="width: 20px; height: 20px; object-fit: cover; border-radius: 50%; display: inline-block; vertical-align: middle;" />
</template>
</BasicTable>
<ViewForm @register="registerViewModal" @success="handleSuccess" />
<InputForm @register="registerModal" @success="handleSuccess" />
<FormImport @register="registerImportModal" @success="handleSuccess" />
</div>
@@ -44,6 +45,7 @@
import { bizListItemDelete, bizListItemRelease, bizListItemListData } from '@jeesite/biz/api/biz/listItem';
import { useModal } from '@jeesite/core/components/Modal';
import { FormProps } from '@jeesite/core/components/Form';
import ViewForm from './view.vue';
import InputForm from './form.vue';
import FormImport from './formImport.vue';
import { useUserStore } from '@jeesite/core/store/modules/user';
@@ -270,6 +272,11 @@
auth: 'biz:listItem:edit',
ifShow: record.ustatus == '0'
},
{
icon: 'simple-line-icons:eye',
title: t('查看'),
onClick: viewForm.bind(this, { id: record.id }),
},
],
};
@@ -314,6 +321,12 @@
loading.value = false;
}
const [registerViewModal, { openModal: openViewModal }] = useModal();
function viewForm(record: Recordable) {
openViewModal(true, record);
}
const [registerImportModal, { openModal: importModal }] = useModal();
function handleImport() {

View File

@@ -0,0 +1,167 @@
<!--
* Copyright (c) 2013-Now http://jeesite.com All rights reserved.
* No deletion without permission, or be held responsible to law.
* @author gaoxq
-->
<template>
<BasicModal
v-bind="$attrs"
:showFooter="true"
:showOkBtn="false"
@register="registerModal"
width="60%"
>
<template #title>
<Icon :icon="getTitle.icon" class="m-1 pr-1" />
<span> {{ getTitle.value }} </span>
</template>
<BasicForm @register="registerForm" />
</BasicModal>
</template>
<script lang="ts" setup name="ViewsBizListItemForm">
import { ref, unref, computed } from 'vue';
import { useI18n } from '@jeesite/core/hooks/web/useI18n';
import { useMessage } from '@jeesite/core/hooks/web/useMessage';
import { router } from '@jeesite/core/router';
import { Icon } from '@jeesite/core/components/Icon';
import { BasicForm, FormSchema, useForm } from '@jeesite/core/components/Form';
import { BasicModal, useModalInner } from '@jeesite/core/components/Modal';
import { BizListItem, bizListItemSave, bizListItemForm } from '@jeesite/biz/api/biz/listItem';
import { formatToDateTime } from '@jeesite/core/utils/dateUtil';
const emit = defineEmits(['success', 'register']);
const { t } = useI18n('biz.listItem');
const { showMessage } = useMessage();
const { meta } = unref(router.currentRoute);
const ustatus = ref<string>('0');
const types = ref<string>('');
const record = ref<BizListItem>({} as BizListItem);
const getTitle = computed(() => ({
icon: meta.icon || 'i-ant-design:book-outlined',
value: t('查看通知信息'),
}));
const inputFormSchemas: FormSchema<BizListItem>[] = [
{
label: t('通知标题'),
field: 'title',
component: 'Input',
componentProps: {
maxlength: 512,
},
required: true,
colProps: { md: 24, lg: 24 },
dynamicDisabled: true,
},
{
label: t('到期时间'),
field: 'datetime',
component: 'DatePicker',
componentProps: {
format: 'YYYY-MM-DD HH:mm',
showTime: { format: 'HH:mm' },
},
dynamicDisabled: true,
},
{
label: t('所属类型'),
field: 'type',
component: 'Select',
componentProps: {
dictType: 'msg_type',
allowClear: true,
onChange: (value: string) => {
types.value = value
}
},
dynamicDisabled: true,
},
{
label: t('通知人员'),
field: 'loginUser',
fieldLabel: 'userName',
component: 'ListSelect',
componentProps: {
selectType: 'userSelect',
},
ifShow: () => ['2', '3'].includes(types.value),
dynamicDisabled: true,
colProps: { md: 24, lg: 24 },
},
{
label: t('是否关闭'),
field: 'clickClose',
defaultValue: ustatus.value,
component: 'Select',
componentProps: {
dictType: 'is_open',
allowClear: true,
},
dynamicDisabled: true,
},
{
label: t('是否删除'),
field: 'titleDelete',
defaultValue: ustatus.value,
component: 'Select',
componentProps: {
dictType: 'is_open',
allowClear: true,
},
dynamicDisabled: true,
},
{
label: t('内容信息'),
field: 'description',
component: 'InputTextArea',
dynamicDisabled: true,
colProps: { md: 24, lg: 24 },
},
];
const [registerForm, { resetFields, setFieldsValue, validate }] = useForm<BizListItem>({
labelWidth: 120,
schemas: inputFormSchemas,
baseColProps: { md: 24, lg: 12 },
});
const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data) => {
setModalProps({ loading: true });
await resetFields();
const res = await bizListItemForm(data);
record.value = (res.bizListItem || {}) as BizListItem;
record.value.__t = new Date().getTime();
types.value = record.value.type || '';
await setFieldsValue(record.value);
setModalProps({ loading: false });
});
async function handleSubmit() {
try {
const orgData = await validate();
const data = {
... orgData,
updateTime: formatToDateTime(new Date()) ,
}
setModalProps({ confirmLoading: true });
const params: any = {
isNewRecord: record.value.isNewRecord,
id: record.value.id || data.id,
};
// console.log('submit', params, data, record);
const res = await bizListItemSave(params, data);
showMessage(res.message);
setTimeout(closeModal);
emit('success', data);
} catch (error: any) {
if (error && error.errorFields) {
showMessage(error.message || t('common.validateError'));
}
console.log('error', error);
} finally {
setModalProps({ confirmLoading: false });
}
}
</script>

View File

@@ -19,6 +19,7 @@
</a-button>
</template>
</BasicTable>
<ViewForm @register="registerViewModal" @success="handleSuccess" />
<InputForm @register="registerModal" @success="handleSuccess" />
<FormImport @register="registerImportModal" @success="handleSuccess" />
</div>
@@ -36,6 +37,7 @@
import { bizMeetingInfoDelete, bizMeetingInfoListData } from '@jeesite/biz/api/biz/meetingInfo';
import { useModal } from '@jeesite/core/components/Modal';
import { FormProps } from '@jeesite/core/components/Form';
import ViewForm from './view.vue';
import InputForm from './form.vue';
import FormImport from './formImport.vue';
@@ -235,6 +237,11 @@
},
auth: 'biz:meetingInfo:edit',
},
{
icon: 'simple-line-icons:eye',
title: t('查看'),
onClick: viewForm.bind(this, { id: record.id }),
},
],
};
@@ -279,8 +286,14 @@
loading.value = false;
}
const [registerViewModal, { openModal: openViewModal }] = useModal();
function viewForm(record: Recordable) {
openViewModal(true, record);
}
const [registerImportModal, { openModal: importModal }] = useModal();
function handleImport() {
importModal(true, {});
}

View File

@@ -0,0 +1,184 @@
<!--
* Copyright (c) 2013-Now http://jeesite.com All rights reserved.
* No deletion without permission, or be held responsible to law.
* @author gaoxq
-->
<template>
<BasicModal
v-bind="$attrs"
:showFooter="true"
:showOkBtn="false"
@register="registerModal"
width="70%"
>
<template #title>
<Icon :icon="getTitle.icon" class="m-1 pr-1" />
<span> {{ getTitle.value }} </span>
</template>
<BasicForm @register="registerForm" >
<template #remarks>
<div
v-html="record?.meetingContent"
style="border: 1px solid #dcdcdc; max-height: 300px; overflow-y: auto; line-height: 1.8; white-space: pre-wrap; padding: 8px; border-radius: 4px;"
>
</div>
</template>
</BasicForm>
</BasicModal>
</template>
<script lang="ts" setup name="ViewsBizMeetingInfoForm">
import { ref, unref, computed } from 'vue';
import { useI18n } from '@jeesite/core/hooks/web/useI18n';
import { useMessage } from '@jeesite/core/hooks/web/useMessage';
import { router } from '@jeesite/core/router';
import { Icon } from '@jeesite/core/components/Icon';
import { BasicForm, FormSchema, useForm } from '@jeesite/core/components/Form';
import { BasicModal, useModalInner } from '@jeesite/core/components/Modal';
import { BizMeetingInfo, bizMeetingInfoSave, bizMeetingInfoForm } from '@jeesite/biz/api/biz/meetingInfo';
import { formatToDateTime } from '@jeesite/core/utils/dateUtil';
const emit = defineEmits(['success', 'register']);
const { t } = useI18n('biz.meetingInfo');
const { showMessage } = useMessage();
const { meta } = unref(router.currentRoute);
const record = ref<BizMeetingInfo>({} as BizMeetingInfo);
const WfTimestamp = () => {
return `WF_AM${Date.now()}`;
};
const getTitle = computed(() => ({
icon: meta.icon || 'i-ant-design:book-outlined',
value: t('查看会议信息'),
}));
const inputFormSchemas: FormSchema<BizMeetingInfo>[] = [
{
label: t('会议标题'),
field: 'title',
component: 'Input',
componentProps: {
maxlength: 255,
},
dynamicDisabled: true,
},
{
label: t('会议编号'),
field: 'meetingCode',
component: 'Input',
componentProps: {
maxlength: 64,
},
dynamicDisabled: true,
},
{
label: t('会议地点'),
field: 'meetingLocation',
component: 'Input',
componentProps: {
maxlength: 255,
},
dynamicDisabled: true,
colProps: { md: 24, lg: 24 },
},
{
label: t('本部人员'),
field: 'meetingUser',
component: 'Input',
componentProps: {
maxlength: 1000,
},
dynamicDisabled: true,
colProps: { md: 24, lg: 24 },
},
{
label: t('其他人员'),
field: 'otherUser',
component: 'Input',
componentProps: {
maxlength: 1000,
},
dynamicDisabled: true,
colProps: { md: 24, lg: 24 },
},
{
label: t('会议类型'),
field: 'meetingType',
component: 'Select',
componentProps: {
dictType: 'meeting_type',
allowClear: true,
},
dynamicDisabled: true,
},
{
label: t('会议状态'),
field: 'ustatus',
component: 'Select',
componentProps: {
dictType: 'meeting_status',
allowClear: true,
},
dynamicDisabled: true,
},
{
label: t('开始时间'),
field: 'startTime',
component: 'DatePicker',
componentProps: {
format: 'YYYY-MM-DD HH:mm',
showTime: { format: 'HH:mm' },
},
dynamicDisabled: true,
},
{
label: t('结束时间'),
field: 'endTime',
component: 'DatePicker',
componentProps: {
format: 'YYYY-MM-DD HH:mm',
showTime: { format: 'HH:mm' },
},
dynamicDisabled: true,
},
{
label: t('会议内容'),
field: 'meetingContent',
component: 'InputTextArea',
dynamicDisabled: true,
colProps: { md: 24, lg: 24 },
slot: 'remarks',
},
{
label: t('补充说明'),
field: 'remark',
component: 'InputTextArea',
componentProps: {
maxlength: 500,
},
dynamicDisabled: true,
colProps: { md: 24, lg: 24 },
},
];
const [registerForm, { resetFields, setFieldsValue, validate }] = useForm<BizMeetingInfo>({
labelWidth: 120,
schemas: inputFormSchemas,
baseColProps: { md: 24, lg: 12 },
});
const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data) => {
setModalProps({ loading: true });
await resetFields();
const res = await bizMeetingInfoForm(data);
record.value = (res.bizMeetingInfo || {}) as BizMeetingInfo;
record.value.__t = new Date().getTime();
if (record.value.isNewRecord) {
record.value.meetingCode = WfTimestamp();
}
await setFieldsValue(record.value);
setModalProps({ loading: false });
});
</script>

View File

@@ -24,6 +24,7 @@
</a>
</template>
</BasicTable>
<ViewForm @register="registerViewModal" @success="handleSuccess" />
<InputForm @register="registerModal" @success="handleSuccess" />
<FormImport @register="registerImportModal" @success="handleSuccess" />
</div>
@@ -43,6 +44,7 @@
import { bizProvinceListAll } from '@jeesite/biz/api/biz/province';
import { useModal } from '@jeesite/core/components/Modal';
import { FormProps } from '@jeesite/core/components/Form';
import ViewForm from './view.vue';
import InputForm from './form.vue';
import FormImport from './formImport.vue';
@@ -280,6 +282,11 @@
auth: 'biz:municipalities:edit',
ifShow: record.dataStatus == '0'
},
{
icon: 'simple-line-icons:eye',
title: t('查看'),
onClick: viewForm.bind(this, { id: record.id }),
},
],
};
@@ -318,6 +325,12 @@
loading.value = false;
}
const [registerViewModal, { openModal: openViewModal }] = useModal();
function viewForm(record: Recordable) {
openViewModal(true, record);
}
const [registerImportModal, { openModal: importModal }] = useModal();
function handleImport() {

View File

@@ -0,0 +1,159 @@
<!--
* Copyright (c) 2013-Now http://jeesite.com All rights reserved.
* No deletion without permission, or be held responsible to law.
* @author gaoxq
-->
<template>
<BasicModal
v-bind="$attrs"
:showFooter="true"
:showOkBtn="false"
@register="registerModal"
width="60%"
>
<template #title>
<Icon :icon="getTitle.icon" class="m-1 pr-1" />
<span> {{ getTitle.value }} </span>
</template>
<BasicForm @register="registerForm" />
</BasicModal>
</template>
<script lang="ts" setup name="ViewsBizMunicipalitiesForm">
import { ref, unref, computed } from 'vue';
import { useI18n } from '@jeesite/core/hooks/web/useI18n';
import { useMessage } from '@jeesite/core/hooks/web/useMessage';
import { router } from '@jeesite/core/router';
import { Icon } from '@jeesite/core/components/Icon';
import { BasicForm, FormSchema, useForm } from '@jeesite/core/components/Form';
import { BasicModal, useModalInner } from '@jeesite/core/components/Modal';
import { bizCitiesListAll } from '@jeesite/biz/api/biz/cities';
import { bizProvinceListAll } from '@jeesite/biz/api/biz/province';
import { BizMunicipalities, bizMunicipalitiesSave, bizMunicipalitiesForm } from '@jeesite/biz/api/biz/municipalities';
import { formatToDateTime } from '@jeesite/core/utils/dateUtil';
const emit = defineEmits(['success', 'register']);
const { t } = useI18n('biz.municipalities');
const { showMessage } = useMessage();
const { meta } = unref(router.currentRoute);
const record = ref<BizMunicipalities>({} as BizMunicipalities);
const provListParams = ref<Recordable>({ provinceCode: '' });
const getTitle = computed(() => ({
icon: meta.icon || 'i-ant-design:book-outlined',
value: t('查看地市信息'),
}));
const inputFormSchemas: FormSchema<BizMunicipalities>[] = [
{
label: t('省份名称'),
field: 'provinceCode',
component: 'Select',
componentProps: {
api: bizProvinceListAll,
params: {},
fieldNames: { label: 'provinceName', value: 'provinceCode' },
immediate: true,
allowClear: true,
onChange: (value: string) => {
provListParams.value.provinceCode = value;
},
},
dynamicDisabled: true,
colProps: { md: 24, lg: 24 },
},
{
label: t('市区名称'),
field: 'cityCode',
component: 'Select',
componentProps: {
api: bizCitiesListAll,
params: provListParams.value,
fieldNames: { label: 'cityName', value: 'cityCode' },
allowClear: true,
},
dynamicDisabled: true,
},
{
label: t('数据状态'),
field: 'dataStatus',
component: 'Select',
componentProps: {
dictType: 'ustatus',
allowClear: true,
},
dynamicDisabled: true,
},
{
label: t('县区名称'),
field: 'countyName',
component: 'Input',
componentProps: {
maxlength: 65,
},
dynamicDisabled: true,
},
{
label: t('县区编码'),
field: 'countyCode',
component: 'Input',
componentProps: {
maxlength: 24,
},
dynamicDisabled: true,
},
{
label: t('街道名称'),
field: 'townName',
component: 'Input',
componentProps: {
maxlength: 125,
},
dynamicDisabled: true,
},
{
label: t('街道编号'),
field: 'townCode',
component: 'Input',
componentProps: {
maxlength: 32,
},
dynamicDisabled: true,
},
{
label: t('社区名称'),
field: 'villageName',
component: 'Input',
componentProps: {
maxlength: 125,
},
dynamicDisabled: true,
},
{
label: t('社区编号'),
field: 'villageCode',
component: 'Input',
componentProps: {
maxlength: 32,
},
dynamicDisabled: true,
},
];
const [registerForm, { resetFields, setFieldsValue, validate }] = useForm<BizMunicipalities>({
labelWidth: 120,
schemas: inputFormSchemas,
baseColProps: { md: 24, lg: 12 },
});
const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data) => {
setModalProps({ loading: true });
await resetFields();
const res = await bizMunicipalitiesForm(data);
record.value = (res.bizMunicipalities || {}) as BizMunicipalities;
record.value.__t = new Date().getTime();
await setFieldsValue(record.value);
setModalProps({ loading: false });
});
</script>

View File

@@ -24,6 +24,7 @@
</a>
</template>
</BasicTable>
<ViewForm @register="registerViewModal" @success="handleSuccess" />
<InputForm @register="registerModal" @success="handleSuccess" />
<FormImport @register="registerImportModal" @success="handleSuccess" />
</div>
@@ -41,6 +42,7 @@
import { bizProjectInfoDelete, bizProjectInfoListData } from '@jeesite/biz/api/biz/projectInfo';
import { useModal } from '@jeesite/core/components/Modal';
import { FormProps } from '@jeesite/core/components/Form';
import ViewForm from './view.vue';
import InputForm from './form.vue';
import FormImport from './formImport.vue';
@@ -217,6 +219,11 @@
auth: 'biz:projectInfo:edit',
ifShow: record.projectStatus == '9'
},
{
icon: 'simple-line-icons:eye',
title: t('查看'),
onClick: viewForm.bind(this, { projectId: record.projectId }),
},
],
};
@@ -255,8 +262,14 @@
loading.value = false;
}
const [registerImportModal, { openModal: importModal }] = useModal();
const [registerViewModal, { openModal: openViewModal }] = useModal();
function viewForm(record: Recordable) {
openViewModal(true, record);
}
const [registerImportModal, { openModal: importModal }] = useModal();
function handleImport() {
importModal(true, {});
}

View File

@@ -0,0 +1,148 @@
<!--
* Copyright (c) 2013-Now http://jeesite.com All rights reserved.
* No deletion without permission, or be held responsible to law.
* @author gaoxq
-->
<template>
<BasicModal
v-bind="$attrs"
:showFooter="true"
:showOkBtn="false"
@register="registerModal"
width="60%"
>
<template #title>
<Icon :icon="getTitle.icon" class="m-1 pr-1" />
<span> {{ getTitle.value }} </span>
</template>
<BasicForm @register="registerForm" />
</BasicModal>
</template>
<script lang="ts" setup name="ViewsBizProjectInfoForm">
import { ref, unref, computed } from 'vue';
import { useI18n } from '@jeesite/core/hooks/web/useI18n';
import { useMessage } from '@jeesite/core/hooks/web/useMessage';
import { router } from '@jeesite/core/router';
import { Icon } from '@jeesite/core/components/Icon';
import { BasicForm, FormSchema, useForm } from '@jeesite/core/components/Form';
import { BasicModal, useModalInner } from '@jeesite/core/components/Modal';
import { BizProjectInfo, bizProjectInfoSave, bizProjectInfoForm } from '@jeesite/biz/api/biz/projectInfo';
const emit = defineEmits(['success', 'register']);
const { t } = useI18n('biz.projectInfo');
const { showMessage } = useMessage();
const { meta } = unref(router.currentRoute);
const record = ref<BizProjectInfo>({} as BizProjectInfo);
const getTitle = computed(() => ({
icon: meta.icon || 'i-ant-design:book-outlined',
value: t('查看项目信息'),
}));
const inputFormSchemas: FormSchema<BizProjectInfo>[] = [
{
label: t('项目名称'),
field: 'projectName',
component: 'Input',
componentProps: {
maxlength: 100,
},
dynamicDisabled: true,
colProps: { md: 24, lg: 24 },
},
{
label: t('项目编码'),
field: 'projectCode',
component: 'Input',
componentProps: {
maxlength: 52,
},
dynamicDisabled: true,
colProps: { md: 24, lg: 24 },
},
{
label: t('开始日期'),
field: 'startDate',
component: 'DatePicker',
componentProps: {
format: 'YYYY-MM-DD HH:mm',
showTime: { format: 'HH:mm' },
},
dynamicDisabled: true,
},
{
label: t('项目状态'),
field: 'projectStatus',
component: 'Select',
componentProps: {
dictType: 'project_status',
allowClear: true,
},
dynamicDisabled: true,
},
{
label: t('所属人员'),
field: 'employeeId',
fieldLabel: 'employeeName',
component: 'ListSelect',
componentProps: {
selectType: 'bizEmpSelect',
},
dynamicDisabled: true,
},
{
label: t('项目类型'),
field: 'projectType',
component: 'Select',
componentProps: {
dictType: 'project_type',
allowClear: true,
},
dynamicDisabled: true,
},
{
label: t('预计结束日期'),
field: 'endDate',
component: 'DatePicker',
componentProps: {
format: 'YYYY-MM-DD HH:mm',
showTime: { format: 'HH:mm' },
},
dynamicDisabled: true,
},
{
label: t('实际结束日期'),
field: 'actualEndDate',
component: 'DatePicker',
componentProps: {
format: 'YYYY-MM-DD HH:mm',
showTime: { format: 'HH:mm' },
},
dynamicDisabled: true,
},
{
label: t('项目描述'),
field: 'projectDesc',
component: 'InputTextArea',
colProps: { md: 24, lg: 24 },
dynamicDisabled: true,
},
];
const [registerForm, { resetFields, setFieldsValue, validate }] = useForm<BizProjectInfo>({
labelWidth: 120,
schemas: inputFormSchemas,
baseColProps: { md: 24, lg: 12 },
});
const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data) => {
setModalProps({ loading: true });
await resetFields();
const res = await bizProjectInfoForm(data);
record.value = (res.bizProjectInfo || {}) as BizProjectInfo;
record.value.__t = new Date().getTime();
await setFieldsValue(record.value);
setModalProps({ loading: false });
});
</script>

View File

@@ -24,6 +24,7 @@
</a>
</template>
</BasicTable>
<ViewForm @register="registerViewModal" @success="handleSuccess" />
<InputForm @register="registerModal" @success="handleSuccess" />
<FormImport @register="registerImportModal" @success="handleSuccess" />
</div>
@@ -41,6 +42,7 @@
import { bizProjectReportDelete, bizProjectReportListData } from '@jeesite/biz/api/biz/projectReport';
import { useModal } from '@jeesite/core/components/Modal';
import { FormProps } from '@jeesite/core/components/Form';
import ViewForm from './view.vue';
import InputForm from './form.vue';
import FormImport from './formImport.vue';
@@ -229,6 +231,11 @@
auth: 'biz:projectReport:edit',
ifShow: record.approvalStatus == '0'
},
{
icon: 'simple-line-icons:eye',
title: t('查看'),
onClick: viewForm.bind(this, { reportId: record.reportId }),
},
],
};
@@ -267,8 +274,14 @@
loading.value = false;
}
const [registerImportModal, { openModal: importModal }] = useModal();
const [registerViewModal, { openModal: openViewModal }] = useModal();
function viewForm(record: Recordable) {
openViewModal(true, record);
}
const [registerImportModal, { openModal: importModal }] = useModal();
function handleImport() {
importModal(true, {});
}

View File

@@ -0,0 +1,158 @@
<!--
* Copyright (c) 2013-Now http://jeesite.com All rights reserved.
* No deletion without permission, or be held responsible to law.
* @author gaoxq
-->
<template>
<BasicModal
v-bind="$attrs"
:showFooter="true"
:showOkBtn="false"
@register="registerModal"
width="60%"
>
<template #title>
<Icon :icon="getTitle.icon" class="m-1 pr-1" />
<span> {{ getTitle.value }} </span>
</template>
<BasicForm @register="registerForm" />
</BasicModal>
</template>
<script lang="ts" setup name="ViewsBizProjectReportForm">
import { ref, unref, computed } from 'vue';
import { useI18n } from '@jeesite/core/hooks/web/useI18n';
import { useMessage } from '@jeesite/core/hooks/web/useMessage';
import { router } from '@jeesite/core/router';
import { Icon } from '@jeesite/core/components/Icon';
import { BasicForm, FormSchema, useForm } from '@jeesite/core/components/Form';
import { BasicModal, useModalInner } from '@jeesite/core/components/Modal';
import { BizProjectReport, bizProjectReportSave, bizProjectReportForm } from '@jeesite/biz/api/biz/projectReport';
const emit = defineEmits(['success', 'register']);
const { t } = useI18n('biz.projectReport');
const { showMessage } = useMessage();
const { meta } = unref(router.currentRoute);
const record = ref<BizProjectReport>({} as BizProjectReport);
const getTitle = computed(() => ({
icon: meta.icon || 'i-ant-design:book-outlined',
value: t('查看汇报信息'),
}));
const inputFormSchemas: FormSchema<BizProjectReport>[] = [
{
label: t('汇报主题'),
field: 'workTitle',
component: 'Input',
componentProps: {
maxlength: 52,
},
dynamicDisabled: true,
colProps: { md: 24, lg: 24 },
},
{
label: t('汇报周期'),
field: 'reportCycle',
component: 'Select',
componentProps: {
dictType: 'report_cycle',
allowClear: true,
},
dynamicDisabled: true,
},
{
label: t('提交时间'),
field: 'reportTime',
component: 'DatePicker',
componentProps: {
format: 'YYYY-MM-DD HH:mm',
showTime: { format: 'HH:mm' },
},
dynamicDisabled: true,
},
{
label: t('项目名称'),
field: 'projectId',
fieldLabel: 'projectName',
component: 'ListSelect',
componentProps: {
selectType: 'bizProjectSelect',
},
dynamicDisabled: true,
},
{
label: t('汇报人员'),
field: 'employeeId',
fieldLabel: 'employeeName',
component: 'ListSelect',
componentProps: {
selectType: 'bizEmpSelect',
},
dynamicDisabled: true,
},
{
label: t('本期内容'),
field: 'workContent',
component: 'InputTextArea',
dynamicDisabled: true,
colProps: { md: 24, lg: 24 },
},
{
label: t('项目进度'),
field: 'progressPercent',
component: 'InputNumber',
componentProps: {
maxlength: 12,
},
dynamicDisabled: true,
},
{
label: t('汇报状态'),
field: 'approvalStatus',
component: 'Select',
componentProps: {
dictType: 'approval_status',
allowClear: true,
},
dynamicDisabled: true,
},
{
label: t('存在问题'),
field: 'problemDesc',
component: 'InputTextArea',
colProps: { md: 24, lg: 24 },
dynamicDisabled: true,
},
{
label: t('解决方案'),
field: 'solutionPlan',
component: 'InputTextArea',
colProps: { md: 24, lg: 24 },
dynamicDisabled: true,
},
{
label: t('下期计划'),
field: 'nextPlan',
component: 'InputTextArea',
colProps: { md: 24, lg: 24 },
dynamicDisabled: true,
},
];
const [registerForm, { resetFields, setFieldsValue, validate }] = useForm<BizProjectReport>({
labelWidth: 120,
schemas: inputFormSchemas,
baseColProps: { md: 24, lg: 12 },
});
const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data) => {
setModalProps({ loading: true });
await resetFields();
const res = await bizProjectReportForm(data);
record.value = (res.bizProjectReport || {}) as BizProjectReport;
record.value.__t = new Date().getTime();
await setFieldsValue(record.value);
setModalProps({ loading: false });
});
</script>

View File

@@ -16,7 +16,15 @@
<Icon :icon="getTitle.icon" class="m-1 pr-1" />
<span> {{ getTitle.value }} </span>
</template>
<BasicForm @register="registerForm" />
<BasicForm @register="registerForm" >
<template #remarks="{ model, field }">
<WangEditor
v-model:value="model[field]"
:bizKey="record.id"
:height="300"
/>
</template>
</BasicForm>
</BasicModal>
</template>
<script lang="ts" setup name="ViewsBizProjectRequirementsForm">
@@ -25,6 +33,7 @@
import { useMessage } from '@jeesite/core/hooks/web/useMessage';
import { router } from '@jeesite/core/router';
import { Icon } from '@jeesite/core/components/Icon';
import { WangEditor } from '@jeesite/core/components/WangEditor';
import { BasicForm, FormSchema, useForm } from '@jeesite/core/components/Form';
import { BasicModal, useModalInner } from '@jeesite/core/components/Modal';
import { BizProjectRequirements, bizProjectRequirementsSave, bizProjectRequirementsForm } from '@jeesite/biz/api/biz/projectRequirements';
@@ -95,6 +104,8 @@
label: t('需求描述'),
field: 'requirementDescription',
component: 'InputTextArea',
required: true,
slot: 'remarks',
colProps: { md: 24, lg: 24 },
},
{

View File

@@ -24,6 +24,7 @@
</a>
</template>
</BasicTable>
<ViewForm @register="registerViewModal" @success="handleSuccess" />
<InputForm @register="registerModal" @success="handleSuccess" />
<FormImport @register="registerImportModal" @success="handleSuccess" />
</div>
@@ -41,6 +42,7 @@
import { bizProjectRequirementsDelete, bizProjectRequirementsListData } from '@jeesite/biz/api/biz/projectRequirements';
import { useModal } from '@jeesite/core/components/Modal';
import { FormProps } from '@jeesite/core/components/Form';
import ViewForm from './view.vue';
import InputForm from './form.vue';
import FormImport from './formImport.vue';
@@ -212,14 +214,6 @@
width: 130,
align: 'left',
},
{
title: t('需求描述'),
dataIndex: 'requirementDescription',
key: 'a.requirement_description',
sorter: true,
width: 130,
align: 'left',
},
{
title: t('开始时间'),
dataIndex: 'startTime',
@@ -293,6 +287,11 @@
auth: 'biz:projectRequirements:edit',
ifShow: record.requirementsStatus == 'PDC'
},
{
icon: 'simple-line-icons:eye',
title: t('查看'),
onClick: viewForm.bind(this, { requirementId: record.requirementId }),
},
],
};
@@ -316,7 +315,7 @@
});
const [registerModal, { openModal }] = useModal();
function handleForm(record: Recordable) {
openModal(true, record);
}
@@ -331,8 +330,14 @@
loading.value = false;
}
const [registerImportModal, { openModal: importModal }] = useModal();
const [registerViewModal, { openModal: openViewModal }] = useModal();
function viewForm(record: Recordable) {
openViewModal(true, record);
}
const [registerImportModal, { openModal: importModal }] = useModal();
function handleImport() {
importModal(true, {});
}

View File

@@ -0,0 +1,176 @@
<!--
* Copyright (c) 2013-Now http://jeesite.com All rights reserved.
* No deletion without permission, or be held responsible to law.
* @author gaoxq
-->
<template>
<BasicModal
v-bind="$attrs"
:showFooter="true"
:showOkBtn="false"
@register="registerModal"
width="60%"
>
<template #title>
<Icon :icon="getTitle.icon" class="m-1 pr-1" />
<span> {{ getTitle.value }} </span>
</template>
<BasicForm @register="registerForm" >
<template #remarks>
<div
v-html="record?.requirementDescription"
style="border: 1px solid #dcdcdc; max-height: 300px; overflow-y: auto; line-height: 1.8; white-space: pre-wrap; padding: 8px; border-radius: 4px;"
/>
</template>
</BasicForm>
</BasicModal>
</template>
<script lang="ts" setup name="ViewsBizProjectRequirementsForm">
import { ref, unref, computed } from 'vue';
import { useI18n } from '@jeesite/core/hooks/web/useI18n';
import { useMessage } from '@jeesite/core/hooks/web/useMessage';
import { router } from '@jeesite/core/router';
import { Icon } from '@jeesite/core/components/Icon';
import { BasicForm, FormSchema, useForm } from '@jeesite/core/components/Form';
import { BasicModal, useModalInner } from '@jeesite/core/components/Modal';
import { BizProjectRequirements, bizProjectRequirementsSave, bizProjectRequirementsForm } from '@jeesite/biz/api/biz/projectRequirements';
import { formatToDateTime } from '@jeesite/core/utils/dateUtil';
const emit = defineEmits(['success', 'register']);
const { t } = useI18n('biz.projectRequirements');
const { showMessage } = useMessage();
const { meta } = unref(router.currentRoute);
const record = ref<BizProjectRequirements>({} as BizProjectRequirements);
const getTitle = computed(() => ({
icon: meta.icon || 'i-ant-design:book-outlined',
value: t('查看需求信息'),
}));
const inputFormSchemas: FormSchema<BizProjectRequirements>[] = [
{
label: t('需求名称'),
field: 'requirementName',
component: 'Input',
componentProps: {
maxlength: 52,
},
dynamicDisabled: true,
colProps: { md: 24, lg: 24 },
},
{
label: t('需求编号'),
field: 'requirementCode',
component: 'Input',
componentProps: {
maxlength: 24,
},
dynamicDisabled: true,
},
{
label: t('区域名称'),
field: 'areaCode',
fieldLabel: 'provinceName',
component: 'ListSelect',
componentProps: {
selectType: 'bizProvSelect',
},
dynamicDisabled: true,
},
{
label: t('项目名称'),
field: 'projectId',
fieldLabel: 'projectName',
component: 'ListSelect',
componentProps: {
selectType: 'bizProjectSelect',
},
dynamicDisabled: true,
},
{
label: t('需求用户'),
field: 'employeeId',
fieldLabel: 'employeeName',
component: 'ListSelect',
componentProps: {
selectType: 'bizEmpSelect',
},
dynamicDisabled: true,
},
{
label: t('需求描述'),
field: 'requirementDescription',
component: 'InputTextArea',
dynamicDisabled: true,
slot: 'remarks',
colProps: { md: 24, lg: 24 },
},
{
label: t('优先等级'),
field: 'priority',
component: 'Select',
componentProps: {
dictType: 'priority',
allowClear: true,
},
dynamicDisabled: true,
},
{
label: t('需求状态'),
field: 'requirementsStatus',
component: 'Select',
componentProps: {
dictType: 'requirements_status',
allowClear: true,
},
dynamicDisabled: true,
},
{
label: t('开始时间'),
field: 'startTime',
component: 'DatePicker',
componentProps: {
format: 'YYYY-MM-DD HH:mm',
showTime: { format: 'HH:mm' },
},
dynamicDisabled: true,
},
{
label: t('结束时间'),
field: 'endTime',
component: 'DatePicker',
componentProps: {
format: 'YYYY-MM-DD HH:mm',
showTime: { format: 'HH:mm' },
},
dynamicDisabled: true,
},
{
label: t('需求备注'),
field: 'remark',
component: 'InputTextArea',
componentProps: {
maxlength: 100,
},
dynamicDisabled: true,
colProps: { md: 24, lg: 24 },
},
];
const [registerForm, { resetFields, setFieldsValue, validate }] = useForm<BizProjectRequirements>({
labelWidth: 120,
schemas: inputFormSchemas,
baseColProps: { md: 24, lg: 12 },
});
const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data) => {
setModalProps({ loading: true });
await resetFields();
const res = await bizProjectRequirementsForm(data);
record.value = (res.bizProjectRequirements || {}) as BizProjectRequirements;
record.value.__t = new Date().getTime();
await setFieldsValue(record.value);
setModalProps({ loading: false });
});
</script>

View File

@@ -24,6 +24,7 @@
</a>
</template>
</BasicTable>
<ViewForm @register="registerViewModal" @success="handleSuccess" />
<InputForm @register="registerModal" @success="handleSuccess" />
<FormImport @register="registerImportModal" @success="handleSuccess" />
</div>
@@ -41,6 +42,7 @@
import { bizProvinceDelete, bizProvinceListData } from '@jeesite/biz/api/biz/province';
import { useModal } from '@jeesite/core/components/Modal';
import { FormProps } from '@jeesite/core/components/Form';
import ViewForm from './view.vue';
import InputForm from './form.vue';
import FormImport from './formImport.vue';
@@ -197,6 +199,11 @@
auth: 'biz:province:edit',
ifShow: record.dataStatus == '0'
},
{
icon: 'simple-line-icons:eye',
title: t('查看'),
onClick: viewForm.bind(this, { id: record.id }),
},
],
};
@@ -235,8 +242,14 @@
loading.value = false;
}
const [registerImportModal, { openModal: importModal }] = useModal();
const [registerViewModal, { openModal: openViewModal }] = useModal();
function viewForm(record: Recordable) {
openViewModal(true, record);
}
const [registerImportModal, { openModal: importModal }] = useModal();
function handleImport() {
importModal(true, {});
}

View File

@@ -0,0 +1,123 @@
<!--
* Copyright (c) 2013-Now http://jeesite.com All rights reserved.
* No deletion without permission, or be held responsible to law.
* @author gaoxq
-->
<template>
<BasicModal
v-bind="$attrs"
:showFooter="true"
:showOkBtn="false"
@register="registerModal"
width="60%"
>
<template #title>
<Icon :icon="getTitle.icon" class="m-1 pr-1" />
<span> {{ getTitle.value }} </span>
</template>
<BasicForm @register="registerForm" />
</BasicModal>
</template>
<script lang="ts" setup name="ViewsBizProvinceForm">
import { ref, unref, computed } from 'vue';
import { useI18n } from '@jeesite/core/hooks/web/useI18n';
import { useMessage } from '@jeesite/core/hooks/web/useMessage';
import { router } from '@jeesite/core/router';
import { Icon } from '@jeesite/core/components/Icon';
import { BasicForm, FormSchema, useForm } from '@jeesite/core/components/Form';
import { BasicModal, useModalInner } from '@jeesite/core/components/Modal';
import { BizProvince, bizProvinceSave, bizProvinceForm } from '@jeesite/biz/api/biz/province';
const emit = defineEmits(['success', 'register']);
const { t } = useI18n('biz.province');
const { showMessage } = useMessage();
const { meta } = unref(router.currentRoute);
const record = ref<BizProvince>({} as BizProvince);
const getTitle = computed(() => ({
icon: meta.icon || 'i-ant-design:book-outlined',
value: t('查看省份信息'),
}));
const inputFormSchemas: FormSchema<BizProvince>[] = [
{
label: t('省份名称'),
field: 'provinceName',
component: 'Input',
componentProps: {
maxlength: 52,
},
dynamicDisabled: true,
colProps: { md: 24, lg: 24 },
},
{
label: t('省份编码'),
field: 'provinceCode',
component: 'Input',
componentProps: {
maxlength: 12,
},
dynamicDisabled: true,
colProps: { md: 24, lg: 24 },
},
{
label: t('请求地址'),
field: 'urlAddr',
component: 'Input',
componentProps: {
maxlength: 125,
},
colProps: { md: 24, lg: 24 },
dynamicDisabled: true,
},
{
label: t('省份序号'),
field: 'sorting',
component: 'InputNumber',
componentProps: {
maxlength: 9,
},
dynamicDisabled: true,
colProps: { md: 24, lg: 24 },
},
{
label: t('请求状态'),
field: 'reqCode',
component: 'Select',
componentProps: {
dictType: 'req_code',
allowClear: true,
},
colProps: { md: 24, lg: 24 },
dynamicDisabled: true,
},
{
label: t('数据状态'),
field: 'dataStatus',
component: 'Select',
componentProps: {
dictType: 'ustatus',
allowClear: true,
},
dynamicDisabled: true,
colProps: { md: 24, lg: 24 },
},
];
const [registerForm, { resetFields, setFieldsValue, validate }] = useForm<BizProvince>({
labelWidth: 120,
schemas: inputFormSchemas,
baseColProps: { md: 24, lg: 12 },
});
const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data) => {
setModalProps({ loading: true });
await resetFields();
const res = await bizProvinceForm(data);
record.value = (res.bizProvince || {}) as BizProvince;
record.value.__t = new Date().getTime();
await setFieldsValue(record.value);
setModalProps({ loading: false });
});
</script>

View File

@@ -49,6 +49,7 @@
componentProps: {
maxlength: 50,
},
required: true,
},
{
label: t('员工编号'),
@@ -57,6 +58,7 @@
componentProps: {
maxlength: 50,
},
required: true,
},
{
label: t('电子邮件'),
@@ -81,6 +83,7 @@
componentProps: {
dictType: 'sys_user_sex',
},
required: true,
},
{
label: t('员工职位'),
@@ -89,6 +92,7 @@
componentProps: {
maxlength: 50,
},
required: true,
},
{
label: t('入职日期'),
@@ -98,6 +102,7 @@
format: 'YYYY-MM-DD',
showTime: false,
},
required: true,
},
{
label: t('员工状态'),
@@ -107,6 +112,7 @@
dictType: 'ustatus',
allowClear: true,
},
required: true,
},
];

View File

@@ -24,6 +24,7 @@
</a>
</template>
</BasicTable>
<ViewForm @register="registerViewModal" @success="handleSuccess" />
<InputForm @register="registerModal" @success="handleSuccess" />
<FormImport @register="registerImportModal" @success="handleSuccess" />
</div>
@@ -41,6 +42,7 @@
import { bizResumeEmployeeDelete, bizResumeEmployeeListData } from '@jeesite/biz/api/biz/resumeEmployee';
import { useModal } from '@jeesite/core/components/Modal';
import { FormProps } from '@jeesite/core/components/Form';
import ViewForm from './view.vue';
import InputForm from './form.vue';
import FormImport from './formImport.vue';
@@ -213,6 +215,11 @@
auth: 'biz:resumeEmployee:edit',
ifShow: record.employeeStatus == '0'
},
{
icon: 'simple-line-icons:eye',
title: t('查看'),
onClick: viewForm.bind(this, { employeeId: record.employeeId }),
},
],
};
@@ -251,8 +258,14 @@
loading.value = false;
}
const [registerViewModal, { openModal: openViewModal }] = useModal();
function viewForm(record: Recordable) {
openViewModal(true, record);
}
const [registerImportModal, { openModal: importModal }] = useModal();
function handleImport() {
importModal(true, {});
}

View File

@@ -0,0 +1,158 @@
<!--
* Copyright (c) 2013-Now http://jeesite.com All rights reserved.
* No deletion without permission, or be held responsible to law.
* @author gaoxq
-->
<template>
<BasicModal
v-bind="$attrs"
:showFooter="true"
:showOkBtn="false"
@register="registerModal"
width="60%"
>
<template #title>
<Icon :icon="getTitle.icon" class="m-1 pr-1" />
<span> {{ getTitle.value }} </span>
</template>
<BasicForm @register="registerForm" />
</BasicModal>
</template>
<script lang="ts" setup name="ViewsBizResumeEmployeeForm">
import { ref, unref, computed } from 'vue';
import { useI18n } from '@jeesite/core/hooks/web/useI18n';
import { useMessage } from '@jeesite/core/hooks/web/useMessage';
import { router } from '@jeesite/core/router';
import { Icon } from '@jeesite/core/components/Icon';
import { BasicForm, FormSchema, useForm } from '@jeesite/core/components/Form';
import { BasicModal, useModalInner } from '@jeesite/core/components/Modal';
import { BizResumeEmployee, bizResumeEmployeeSave, bizResumeEmployeeForm } from '@jeesite/biz/api/biz/resumeEmployee';
const emit = defineEmits(['success', 'register']);
const { t } = useI18n('biz.resumeEmployee');
const { showMessage } = useMessage();
const { meta } = unref(router.currentRoute);
const record = ref<BizResumeEmployee>({} as BizResumeEmployee);
const getTitle = computed(() => ({
icon: meta.icon || 'i-ant-design:book-outlined',
value: t('查看员工信息'),
}));
const inputFormSchemas: FormSchema<BizResumeEmployee>[] = [
{
label: t('员工姓名'),
field: 'employeeName',
component: 'Input',
componentProps: {
maxlength: 50,
},
dynamicDisabled: true,
},
{
label: t('员工编号'),
field: 'employeeCode',
component: 'Input',
componentProps: {
maxlength: 50,
},
dynamicDisabled: true,
},
{
label: t('电子邮件'),
field: 'email',
component: 'Input',
componentProps: {
maxlength: 50,
},
dynamicDisabled: true,
},
{
label: t('移动电话'),
field: 'phoneNumber',
component: 'Input',
componentProps: {
maxlength: 50,
},
dynamicDisabled: true,
},
{
label: t('员工性别'),
field: 'sex',
component: 'RadioGroup',
componentProps: {
dictType: 'sys_user_sex',
},
dynamicDisabled: true,
},
{
label: t('员工职位'),
field: 'employeePosition',
component: 'Input',
componentProps: {
maxlength: 50,
},
dynamicDisabled: true,
},
{
label: t('入职日期'),
field: 'hireDate',
component: 'DatePicker',
componentProps: {
format: 'YYYY-MM-DD',
showTime: false,
},
dynamicDisabled: true,
},
{
label: t('员工状态'),
field: 'employeeStatus',
component: 'Select',
componentProps: {
dictType: 'ustatus',
allowClear: true,
},
dynamicDisabled: true,
},
];
const [registerForm, { resetFields, setFieldsValue, validate }] = useForm<BizResumeEmployee>({
labelWidth: 120,
schemas: inputFormSchemas,
baseColProps: { md: 24, lg: 12 },
});
const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data) => {
setModalProps({ loading: true });
await resetFields();
const res = await bizResumeEmployeeForm(data);
record.value = (res.bizResumeEmployee || {}) as BizResumeEmployee;
record.value.__t = new Date().getTime();
await setFieldsValue(record.value);
setModalProps({ loading: false });
});
async function handleSubmit() {
try {
const data = await validate();
setModalProps({ confirmLoading: true });
const params: any = {
isNewRecord: record.value.isNewRecord,
employeeId: record.value.employeeId || data.employeeId,
};
// console.log('submit', params, data, record);
const res = await bizResumeEmployeeSave(params, data);
showMessage(res.message);
setTimeout(closeModal);
emit('success', data);
} catch (error: any) {
if (error && error.errorFields) {
showMessage(error.message || t('common.validateError'));
}
console.log('error', error);
} finally {
setModalProps({ confirmLoading: false });
}
}
</script>

View File

@@ -1,103 +0,0 @@
<!--
* Copyright (c) 2013-Now http://jeesite.com All rights reserved.
* No deletion without permission, or be held responsible to law.
* @author gaoxq
-->
<template>
<BasicModal
v-bind="$attrs"
:title="t('导入邮件信息')"
:okText="t('导入')"
@register="registerModal"
@ok="handleSubmit"
:minHeight="120"
:width="400"
>
<Upload accept=".xls,.xlsx" :file-list="fileList" :before-upload="beforeUpload" @remove="handleRemove">
<a-button> <Icon icon="ant-design:upload-outlined" /> {{ t('选择文件') }} </a-button>
<span class="ml-4">{{ uploadInfo }}</span>
</Upload>
<div class="ml-4 mt-4">
{{ t('提示仅允许导入“xls”或“xlsx”格式文件') }}
</div>
<div class="mt-4">
<a-button @click="handleDownloadTemplate()" type="text">
<Icon icon="i-fa:file-excel-o" />
{{ t('下载模板') }}
</a-button>
</div>
</BasicModal>
</template>
<script lang="ts" setup>
import { ref } from 'vue';
import { Upload } from 'ant-design-vue';
import { useI18n } from '@jeesite/core/hooks/web/useI18n';
import { useMessage } from '@jeesite/core/hooks/web/useMessage';
import { useGlobSetting } from '@jeesite/core/hooks/setting';
import { downloadByUrl } from '@jeesite/core/utils/file/download';
import { Icon } from '@jeesite/core/components/Icon';
import { BasicModal, useModalInner } from '@jeesite/core/components/Modal';
import { bizMailAccountImportData } from '@jeesite/biz/api/biz/mailAccount';
import { FileType } from 'ant-design-vue/es/upload/interface';
import { AxiosProgressEvent } from 'axios';
const emit = defineEmits(['success', 'register']);
const { t } = useI18n('biz.mailAccount');
const { showMessage, showMessageModal } = useMessage();
const fileList = ref<FileType[]>([]);
const uploadInfo = ref('');
const beforeUpload = (file: FileType) => {
fileList.value = [file];
return false;
};
const handleRemove = () => {
fileList.value = [];
};
const [registerModal, { setModalProps, closeModal }] = useModalInner(() => {
fileList.value = [];
uploadInfo.value = '';
});
async function handleDownloadTemplate() {
const { ctxAdminPath } = useGlobSetting();
downloadByUrl({ url: ctxAdminPath + '/biz/mailAccount/importTemplate' });
}
function onUploadProgress(progressEvent: AxiosProgressEvent) {
const complete = ((progressEvent.loaded / (progressEvent.total || 1)) * 100) | 0;
if (complete != 100) {
uploadInfo.value = t('正在导入,请稍候') + ' ' + complete + '%...';
} else {
uploadInfo.value = '';
}
}
async function handleSubmit() {
try {
if (fileList.value.length == 0) {
showMessage(t('请选择要导入的数据文件'));
return;
}
setModalProps({ confirmLoading: true });
const params = {
file: fileList.value[0],
};
const { data } = await bizMailAccountImportData(params, onUploadProgress);
showMessageModal({ content: data.message });
setTimeout(closeModal);
emit('success');
} catch (error: any) {
if (error && error.errorFields) {
showMessage(error.message || t('common.validateError'));
}
console.log('error', error);
} finally {
setModalProps({ confirmLoading: false });
}
}
</script>

View File

@@ -11,9 +11,6 @@
<span> {{ getTitle.value }} </span>
</template>
<template #toolbar>
<a-button type="default" :loading="loading" @click="handleExport()">
<Icon icon="i-ant-design:download-outlined" /> {{ t('导出') }}
</a-button>
<a-button type="primary" @click="handleForm({})" v-auth="'biz:mailAccount:edit'">
<Icon icon="i-fluent:add-12-filled" /> {{ t('新增') }}
</a-button>
@@ -24,8 +21,8 @@
</a>
</template>
</BasicTable>
<ViewForm @register="registerViewModal" @success="handleSuccess" />
<InputForm @register="registerModal" @success="handleSuccess" />
<FormImport @register="registerImportModal" @success="handleSuccess" />
</div>
</template>
<script lang="ts" setup name="ViewsBizMailAccountList">
@@ -41,8 +38,8 @@
import { bizMailAccountDelete, bizMailAccountListData, bizMailReceived } from '@jeesite/biz/api/biz/mailAccount';
import { useModal } from '@jeesite/core/components/Modal';
import { FormProps } from '@jeesite/core/components/Form';
import ViewForm from './view.vue';
import InputForm from './form.vue';
import FormImport from './formImport.vue';
const { t } = useI18n('biz.mailAccount');
const { showMessage } = useMessage();
@@ -248,6 +245,11 @@
},
ifShow: record.ustatus == '1'
},
{
icon: 'simple-line-icons:eye',
title: t('查看'),
onClick: viewForm.bind(this, { id: record.id }),
},
],
};
@@ -276,20 +278,10 @@
openModal(true, record);
}
async function handleExport() {
loading.value = true;
const { ctxAdminPath } = useGlobSetting();
await downloadByUrl({
url: ctxAdminPath + '/biz/mailAccount/exportData',
params: getForm().getFieldsValue(),
});
loading.value = false;
}
const [registerImportModal, { openModal: importModal }] = useModal();
function handleImport() {
importModal(true, {});
const [registerViewModal, { openModal: openViewModal }] = useModal();
function viewForm(record: Recordable) {
openViewModal(true, record);
}
async function handleDelete(record: Recordable) {

View File

@@ -0,0 +1,164 @@
<!--
* Copyright (c) 2013-Now http://jeesite.com All rights reserved.
* No deletion without permission, or be held responsible to law.
* @author gaoxq
-->
<template>
<BasicModal
v-bind="$attrs"
:showFooter="true"
:showOkBtn="false"
@register="registerModal"
width="70%"
>
<template #title>
<Icon :icon="getTitle.icon" class="m-1 pr-1" />
<span> {{ getTitle.value }} </span>
</template>
<BasicForm @register="registerForm" />
</BasicModal>
</template>
<script lang="ts" setup name="ViewsBizMailAccountForm">
import { ref, unref, computed } from 'vue';
import { useI18n } from '@jeesite/core/hooks/web/useI18n';
import { useMessage } from '@jeesite/core/hooks/web/useMessage';
import { router } from '@jeesite/core/router';
import { Icon } from '@jeesite/core/components/Icon';
import { BasicForm, FormSchema, useForm } from '@jeesite/core/components/Form';
import { BasicModal, useModalInner } from '@jeesite/core/components/Modal';
import { BizMailAccount, bizMailAccountSave, bizMailAccountForm } from '@jeesite/biz/api/biz/mailAccount';
import { formatToDateTime } from '@jeesite/core/utils/dateUtil';
const emit = defineEmits(['success', 'register']);
const { t } = useI18n('biz.mailAccount');
const { showMessage } = useMessage();
const { meta } = unref(router.currentRoute);
const record = ref<BizMailAccount>({} as BizMailAccount);
const getTitle = computed(() => ({
icon: meta.icon || 'i-ant-design:book-outlined',
value: t('查看邮件信息'),
}));
const inputFormSchemas: FormSchema<BizMailAccount>[] = [
{
label: t('配置名称'),
field: 'accountName',
component: 'Input',
componentProps: {
maxlength: 255,
},
dynamicDisabled: true,
colProps: { md: 24, lg: 24 },
},
{
label: t('SMTP服务'),
field: 'host',
component: 'Input',
componentProps: {
maxlength: 255,
},
dynamicDisabled: true,
},
{
label: t('SMTP端口'),
field: 'smtpPort',
component: 'InputNumber',
componentProps: {
maxlength: 9,
},
dynamicDisabled: true,
},
{
label: t('IMAP服务'),
field: 'imapHost',
component: 'Input',
componentProps: {
maxlength: 255,
},
dynamicDisabled: true,
},
{
label: t('IMAP端口'),
field: 'imapPort',
component: 'InputNumber',
componentProps: {
maxlength: 9,
},
dynamicDisabled: true,
},
{
label: t('用户名称'),
field: 'username',
component: 'Input',
componentProps: {
maxlength: 255,
},
dynamicDisabled: true,
},
{
label: t('用户密码'),
field: 'password',
component: 'Input',
componentProps: {
maxlength: 255,
},
dynamicDisabled: true,
},
{
label: t('发件地址'),
field: 'fromAddress',
component: 'Input',
componentProps: {
maxlength: 255,
},
dynamicDisabled: true,
},
{
label: t('启用SSL'),
field: 'sslEnable',
component: 'Select',
componentProps: {
dictType: 'is_enable',
allowClear: true,
},
dynamicDisabled: true,
},
{
label: t('备注'),
field: 'remark',
component: 'Input',
componentProps: {
maxlength: 500,
},
dynamicDisabled: true,
},
{
label: t('状态'),
field: 'ustatus',
component: 'Select',
componentProps: {
dictType: 'ustatus',
allowClear: true,
},
dynamicDisabled: true,
},
];
const [registerForm, { resetFields, setFieldsValue, validate }] = useForm<BizMailAccount>({
labelWidth: 120,
schemas: inputFormSchemas,
baseColProps: { md: 24, lg: 12 },
});
const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data) => {
setModalProps({ loading: true });
await resetFields();
const res = await bizMailAccountForm(data);
record.value = (res.bizMailAccount || {}) as BizMailAccount;
record.value.__t = new Date().getTime();
await setFieldsValue(record.value);
setModalProps({ loading: false });
});
</script>

View File

@@ -24,6 +24,7 @@
<img :src="record.iconClass" style="width: 30px; height: 24px; object-fit: contain;" />
</template>
</BasicTable>
<ViewForm @register="registerViewModal" @success="handleSuccess" />
<InputForm @register="registerModal" @success="handleSuccess" />
</div>
</template>
@@ -38,6 +39,7 @@
import { bizQuickLoginDelete, bizQuickLoginListData } from '@jeesite/biz/api/biz/quickLogin';
import { useModal } from '@jeesite/core/components/Modal';
import { FormProps } from '@jeesite/core/components/Form';
import ViewForm from './view.vue';
import InputForm from './form.vue';
const { t } = useI18n('biz.quickLogin');
@@ -196,6 +198,11 @@
},
auth: 'biz:quickLogin:edit',
},
{
icon: 'simple-line-icons:eye',
title: t('查看'),
onClick: viewForm.bind(this, { id: record.id }),
},
],
};
@@ -217,6 +224,12 @@
record.value = (res.bizQuickLogin || {}) as BizQuickLogin;
await getForm().setFieldsValue(record.value);
});
const [registerViewModal, { openModal: openViewModal }] = useModal();
function viewForm(record: Recordable) {
openViewModal(true, record);
}
const [registerModal, { openModal }] = useModal();

View File

@@ -0,0 +1,146 @@
<!--
* Copyright (c) 2013-Now http://jeesite.com All rights reserved.
* No deletion without permission, or be held responsible to law.
* @author gaoxq
-->
<template>
<BasicModal
v-bind="$attrs"
:showFooter="true"
:showOkBtn="false"
@register="registerModal"
width="60%"
>
<template #title>
<Icon :icon="getTitle.icon" class="m-1 pr-1" />
<span> {{ getTitle.value }} </span>
</template>
<BasicForm @register="registerForm" />
</BasicModal>
</template>
<script lang="ts" setup name="ViewsBizQuickLoginForm">
import { ref, unref, computed } from 'vue';
import { useI18n } from '@jeesite/core/hooks/web/useI18n';
import { useMessage } from '@jeesite/core/hooks/web/useMessage';
import { router } from '@jeesite/core/router';
import { Icon } from '@jeesite/core/components/Icon';
import { BasicForm, FormSchema, useForm } from '@jeesite/core/components/Form';
import { BasicModal, useModalInner } from '@jeesite/core/components/Modal';
import { BizQuickLogin, bizQuickLoginSave, bizQuickLoginForm } from '@jeesite/biz/api/biz/quickLogin';
import { formatToDateTime } from '@jeesite/core/utils/dateUtil';
const emit = defineEmits(['success', 'register']);
const { t } = useI18n('biz.quickLogin');
const { showMessage } = useMessage();
const { meta } = unref(router.currentRoute);
const record = ref<BizQuickLogin>({} as BizQuickLogin);
const getTitle = computed(() => ({
icon: meta.icon || 'i-ant-design:book-outlined',
value: t('查看系统信息'),
}));
const inputFormSchemas: FormSchema<BizQuickLogin>[] = [
{
label: t('系统名称'),
field: 'systemName',
component: 'Input',
componentProps: {
maxlength: 100,
},
dynamicDisabled: true,
},
{
label: t('系统类型'),
field: 'systemType',
component: 'Select',
componentProps: {
dictType: 'system_type',
allowClear: true,
},
dynamicDisabled: true,
},
{
label: t('首页地址'),
field: 'homepageUrl',
component: 'Input',
componentProps: {
maxlength: 255,
},
dynamicDisabled: true,
colProps: { md: 24, lg: 24 },
},
{
label: t('图标地址'),
field: 'iconClass',
component: 'Input',
componentProps: {
maxlength: 225,
},
dynamicDisabled: true,
},
{
label: t('图标颜色'),
field: 'iconColor',
component: 'Input',
componentProps: {
maxlength: 20,
},
dynamicDisabled: true,
},
{
label: t('排序序号'),
field: 'sortOrder',
component: 'InputNumber',
componentProps: {
maxlength: 10,
},
dynamicDisabled: true,
},
{
label: t('背景颜色'),
field: 'bgColor',
component: 'Input',
componentProps: {
maxlength: 52,
},
dynamicDisabled: true,
},
{
label: t('遮罩颜色'),
field: 'maskColor',
component: 'Input',
componentProps: {
maxlength: 52,
},
dynamicDisabled: true,
},
{
label: t('是否启用'),
field: 'isEnabled',
component: 'Select',
componentProps: {
dictType: 'ustatus',
allowClear: true,
},
dynamicDisabled: true,
},
];
const [registerForm, { resetFields, setFieldsValue, validate }] = useForm<BizQuickLogin>({
labelWidth: 120,
schemas: inputFormSchemas,
baseColProps: { md: 24, lg: 12 },
});
const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data) => {
setModalProps({ loading: true });
await resetFields();
const res = await bizQuickLoginForm(data);
record.value = (res.bizQuickLogin || {}) as BizQuickLogin;
record.value.__t = new Date().getTime();
await setFieldsValue(record.value);
setModalProps({ loading: false });
});
</script>

View File

@@ -102,7 +102,7 @@
{
label: t('登录密码'),
field: 'webPassword',
component: 'Input',
component: 'InputPassword',
componentProps: {
maxlength: 255,
},

View File

@@ -24,6 +24,7 @@
</a>
</template>
</BasicTable>
<ViewForm @register="registerViewModal" @success="handleSuccess" />
<InputForm @register="registerModal" @success="handleSuccess" />
<FormImport @register="registerImportModal" @success="handleSuccess" />
</div>
@@ -41,6 +42,7 @@
import { bizWebsiteStorageDelete, bizWebsiteStorageListData } from '@jeesite/biz/api/biz/websiteStorage';
import { useModal } from '@jeesite/core/components/Modal';
import { FormProps } from '@jeesite/core/components/Form';
import ViewForm from './view.vue';
import InputForm from './form.vue';
import FormImport from './formImport.vue';
import { useUserStore } from '@jeesite/core/store/modules/user';
@@ -230,6 +232,11 @@
auth: 'biz:websiteStorage:edit',
ifShow: record.storageStatus == '0'
},
{
icon: 'simple-line-icons:eye',
title: t('查看'),
onClick: viewForm.bind(this, { websiteId: record.websiteId }),
},
],
};
@@ -271,6 +278,12 @@
loading.value = false;
}
const [registerViewModal, { openModal: openViewModal }] = useModal();
function viewForm(record: Recordable) {
openViewModal(true, record);
}
const [registerImportModal, { openModal: importModal }] = useModal();
function handleImport() {

View File

@@ -0,0 +1,135 @@
<!--
* Copyright (c) 2013-Now http://jeesite.com All rights reserved.
* No deletion without permission, or be held responsible to law.
* @author gaoxq
-->
<template>
<BasicModal
v-bind="$attrs"
:showFooter="true"
:showOkBtn="false"
@register="registerModal"
width="60%"
>
<template #title>
<Icon :icon="getTitle.icon" class="m-1 pr-1" />
<span> {{ getTitle.value }} </span>
</template>
<BasicForm @register="registerForm" />
</BasicModal>
</template>
<script lang="ts" setup name="ViewsBizWebsiteStorageForm">
import { ref, unref, computed } from 'vue';
import { useI18n } from '@jeesite/core/hooks/web/useI18n';
import { useMessage } from '@jeesite/core/hooks/web/useMessage';
import { router } from '@jeesite/core/router';
import { Icon } from '@jeesite/core/components/Icon';
import { BasicForm, FormSchema, useForm } from '@jeesite/core/components/Form';
import { BasicModal, useModalInner } from '@jeesite/core/components/Modal';
import { BizWebsiteStorage, bizWebsiteStorageSave, bizWebsiteStorageForm } from '@jeesite/biz/api/biz/websiteStorage';
const emit = defineEmits(['success', 'register']);
const { t } = useI18n('biz.websiteStorage');
const { showMessage } = useMessage();
const { meta } = unref(router.currentRoute);
const record = ref<BizWebsiteStorage>({} as BizWebsiteStorage);
const getTitle = computed(() => ({
icon: meta.icon || 'i-ant-design:book-outlined',
value: t('查看网站信息'),
}));
const inputFormSchemas: FormSchema<BizWebsiteStorage>[] = [
{
label: t('所属公司'),
field: 'companyId',
fieldLabel: 'companyName',
component: 'ListSelect',
componentProps: {
selectType: 'bizCompSelect',
},
dynamicDisabled: true,
},
{
label: t('网站名称'),
field: 'websiteName',
component: 'Input',
componentProps: {
maxlength: 100,
},
dynamicDisabled: true,
},
{
label: t('网站地址'),
field: 'websiteUrl',
component: 'Input',
componentProps: {
maxlength: 255,
},
colProps: { md: 24, lg: 24 },
dynamicDisabled: true,
},
{
label: t('所属人员'),
field: 'employeeId',
fieldLabel: 'employeeName',
component: 'ListSelect',
componentProps: {
selectType: 'bizEmpSelect',
},
dynamicDisabled: true,
},
{
label: t('网站状态'),
field: 'storageStatus',
component: 'Select',
componentProps: {
dictType: 'ustatus ',
allowClear: true,
},
dynamicDisabled: true,
},
{
label: t('登录账号'),
field: 'webAccount',
component: 'Input',
componentProps: {
maxlength: 100,
},
dynamicDisabled: true,
},
{
label: t('登录密码'),
field: 'webPassword',
component: 'Input',
componentProps: {
maxlength: 255,
},
dynamicDisabled: true,
},
{
label: t('备注说明'),
field: 'remarks',
component: 'InputTextArea',
dynamicDisabled: true,
colProps: { md: 24, lg: 24 },
},
];
const [registerForm, { resetFields, setFieldsValue, validate }] = useForm<BizWebsiteStorage>({
labelWidth: 120,
schemas: inputFormSchemas,
baseColProps: { md: 24, lg: 12 },
});
const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data) => {
setModalProps({ loading: true });
await resetFields();
const res = await bizWebsiteStorageForm(data);
record.value = (res.bizWebsiteStorage || {}) as BizWebsiteStorage;
record.value.__t = new Date().getTime();
await setFieldsValue(record.value);
setModalProps({ loading: false });
});
</script>