parent
c16390ae2a
commit
ff455ec59c
|
@ -23,7 +23,7 @@
|
|||
|
||||
<!-- action -->
|
||||
<div :class="`${prefixCls}-action`">
|
||||
<AppSearch :class="`${prefixCls}-action__item `" v-if="getShowSearch" />
|
||||
<!-- <AppSearch :class="`${prefixCls}-action__item `" v-if="getShowSearch" /> -->
|
||||
|
||||
<ErrorAction v-if="getUseErrorHandle" :class="`${prefixCls}-action__item error-action`" />
|
||||
|
||||
|
@ -33,7 +33,7 @@
|
|||
|
||||
<LockScreen v-if="getUseLockPage" />
|
||||
|
||||
<AppLocalePicker v-if="getShowLocalePicker" :reload="true" :showText="false" :class="`${prefixCls}-action__item`" />
|
||||
<!-- <AppLocalePicker v-if="getShowLocalePicker" :reload="true" :showText="false" :class="`${prefixCls}-action__item`" /> -->
|
||||
|
||||
<UserDropDown :theme="getHeaderTheme" />
|
||||
|
||||
|
|
|
@ -0,0 +1,64 @@
|
|||
import {defHttp} from '/@/utils/http/axios';
|
||||
import { useMessage } from "/@/hooks/web/useMessage";
|
||||
|
||||
const { createConfirm } = useMessage();
|
||||
|
||||
enum Api {
|
||||
list = '/configSuppliersInfo/configSuppliersInfo/list',
|
||||
save='/configSuppliersInfo/configSuppliersInfo/add',
|
||||
edit='/configSuppliersInfo/configSuppliersInfo/edit',
|
||||
deleteOne = '/configSuppliersInfo/configSuppliersInfo/delete',
|
||||
deleteBatch = '/configSuppliersInfo/configSuppliersInfo/deleteBatch',
|
||||
importExcel = '/configSuppliersInfo/configSuppliersInfo/importExcel',
|
||||
exportXls = '/configSuppliersInfo/configSuppliersInfo/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});
|
||||
|
||||
/**
|
||||
* 删除单个
|
||||
*/
|
||||
export const deleteOne = (params,handleSuccess) => {
|
||||
return defHttp.delete({url: Api.deleteOne, params}, {joinParamsToUrl: true}).then(() => {
|
||||
handleSuccess();
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 批量删除
|
||||
* @param params
|
||||
*/
|
||||
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
|
||||
*/
|
||||
export const saveOrUpdate = (params, isUpdate) => {
|
||||
let url = isUpdate ? Api.edit : Api.save;
|
||||
return defHttp.post({url: url, params});
|
||||
}
|
|
@ -0,0 +1,192 @@
|
|||
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: 'suppliersName'
|
||||
},
|
||||
{
|
||||
title: '供应商性质',
|
||||
align:"center",
|
||||
dataIndex: 'suppliersNature_dictText'
|
||||
},
|
||||
{
|
||||
title: '供应商地址',
|
||||
align:"center",
|
||||
dataIndex: 'suppliersAddress'
|
||||
},
|
||||
{
|
||||
title: '负责人',
|
||||
align:"center",
|
||||
dataIndex: 'personInCharge'
|
||||
},
|
||||
{
|
||||
title: '联系电话',
|
||||
align:"center",
|
||||
dataIndex: 'contactNumber'
|
||||
},
|
||||
{
|
||||
title: '供应状态',
|
||||
align:"center",
|
||||
dataIndex: 'supplyState_dictText'
|
||||
},
|
||||
{
|
||||
title: '开户行',
|
||||
align:"center",
|
||||
dataIndex: 'openingBank'
|
||||
},
|
||||
{
|
||||
title: '开户行账号',
|
||||
align:"center",
|
||||
dataIndex: 'openingBankNo'
|
||||
},
|
||||
{
|
||||
title: '微信账号',
|
||||
align:"center",
|
||||
dataIndex: 'wechartId'
|
||||
},
|
||||
{
|
||||
title: '资质照片',
|
||||
align:"center",
|
||||
dataIndex: 'imgPath',
|
||||
customRender:render.renderImage,
|
||||
},
|
||||
];
|
||||
//查询数据
|
||||
export const searchFormSchema: FormSchema[] = [
|
||||
{
|
||||
label: "供应商名称",
|
||||
field: 'suppliersName',
|
||||
component: 'Input',
|
||||
//colProps: {span: 6},
|
||||
},
|
||||
{
|
||||
label: "负责人",
|
||||
field: 'personInCharge',
|
||||
component: 'Input',
|
||||
//colProps: {span: 6},
|
||||
},
|
||||
{
|
||||
label: "供应状态",
|
||||
field: 'supplyState',
|
||||
component: 'JSelectMultiple',
|
||||
componentProps:{
|
||||
dictCode:"supply_state"
|
||||
},
|
||||
//colProps: {span: 6},
|
||||
},
|
||||
];
|
||||
//表单数据
|
||||
export const formSchema: FormSchema[] = [
|
||||
{
|
||||
label: '供应商名称',
|
||||
field: 'suppliersName',
|
||||
component: 'Input',
|
||||
dynamicRules: ({model,schema}) => {
|
||||
return [
|
||||
{ required: true, message: '请输入供应商名称!'},
|
||||
];
|
||||
},
|
||||
},
|
||||
{
|
||||
label: '供应商性质',
|
||||
field: 'suppliersNature',
|
||||
component: 'JDictSelectTag',
|
||||
componentProps:{
|
||||
dictCode:"suppliers_nature",
|
||||
type: "radio"
|
||||
},
|
||||
},
|
||||
{
|
||||
label: '供应商地址',
|
||||
field: 'suppliersAddress',
|
||||
component: 'Input',
|
||||
},
|
||||
{
|
||||
label: '负责人',
|
||||
field: 'personInCharge',
|
||||
component: 'Input',
|
||||
},
|
||||
{
|
||||
label: '联系电话',
|
||||
field: 'contactNumber',
|
||||
component: 'Input',
|
||||
dynamicRules: ({model,schema}) => {
|
||||
return [
|
||||
{ required: true, message: '请输入联系电话!'},
|
||||
];
|
||||
},
|
||||
},
|
||||
{
|
||||
label: '供应状态',
|
||||
field: 'supplyState',
|
||||
component: 'JDictSelectTag',
|
||||
componentProps:{
|
||||
dictCode:"supply_state",
|
||||
type: "radio"
|
||||
},
|
||||
dynamicRules: ({model,schema}) => {
|
||||
return [
|
||||
{ required: true, message: '请输入供应状态!'},
|
||||
];
|
||||
},
|
||||
},
|
||||
{
|
||||
label: '开户行',
|
||||
field: 'openingBank',
|
||||
component: 'Input',
|
||||
},
|
||||
{
|
||||
label: '开户行账号',
|
||||
field: 'openingBankNo',
|
||||
component: 'Input',
|
||||
},
|
||||
{
|
||||
label: '微信账号',
|
||||
field: 'wechartId',
|
||||
component: 'Input',
|
||||
},
|
||||
{
|
||||
label: '资质照片',
|
||||
field: 'imgPath',
|
||||
component: 'JImageUpload',
|
||||
componentProps:{
|
||||
fileMax: 0
|
||||
},
|
||||
},
|
||||
// TODO 主键隐藏字段,目前写死为ID
|
||||
{
|
||||
label: '',
|
||||
field: 'id',
|
||||
component: 'Input',
|
||||
show: false
|
||||
},
|
||||
];
|
||||
|
||||
// 高级查询数据
|
||||
export const superQuerySchema = {
|
||||
suppliersName: {title: '供应商名称',order: 0,view: 'text', type: 'string',},
|
||||
suppliersNature: {title: '供应商性质',order: 1,view: 'radio', type: 'string',dictCode: 'suppliers_nature',},
|
||||
suppliersAddress: {title: '供应商地址',order: 2,view: 'text', type: 'string',},
|
||||
personInCharge: {title: '负责人',order: 3,view: 'text', type: 'string',},
|
||||
contactNumber: {title: '联系电话',order: 4,view: 'text', type: 'string',},
|
||||
supplyState: {title: '供应状态',order: 5,view: 'radio', type: 'string',dictCode: 'supply_state',},
|
||||
openingBank: {title: '开户行',order: 6,view: 'text', type: 'string',},
|
||||
openingBankNo: {title: '开户行账号',order: 7,view: 'text', type: 'string',},
|
||||
wechartId: {title: '微信账号',order: 8,view: 'text', type: 'string',},
|
||||
imgPath: {title: '资质照片',order: 9,view: 'image', type: 'string',},
|
||||
};
|
||||
|
||||
/**
|
||||
* 流程表单调用这个方法获取formSchema
|
||||
* @param param
|
||||
*/
|
||||
export function getBpmFormSchema(_formData): FormSchema[]{
|
||||
// 默认和原始表单保持一致 如果流程中配置了权限数据,这里需要单独处理formSchema
|
||||
return formSchema;
|
||||
}
|
|
@ -0,0 +1,189 @@
|
|||
<template>
|
||||
<div>
|
||||
<!--引用表格-->
|
||||
<BasicTable @register="registerTable" :rowSelection="rowSelection">
|
||||
<!--插槽:table标题-->
|
||||
<template #tableTitle>
|
||||
<a-button type="primary" v-auth="'configSuppliersInfo:config_suppliers_info:add'" @click="handleAdd" preIcon="ant-design:plus-outlined"> 新增</a-button>
|
||||
<a-button type="primary" v-auth="'configSuppliersInfo:config_suppliers_info:exportXls'" preIcon="ant-design:export-outlined" @click="onExportXls"> 导出</a-button>
|
||||
<j-upload-button type="primary" v-auth="'configSuppliersInfo:config_suppliers_info:importExcel'" preIcon="ant-design:import-outlined" @click="onImportXls">导入</j-upload-button>
|
||||
<a-dropdown v-if="selectedRowKeys.length > 0">
|
||||
<template #overlay>
|
||||
<a-menu>
|
||||
<a-menu-item key="1" @click="batchHandleDelete">
|
||||
<Icon icon="ant-design:delete-outlined"></Icon>
|
||||
删除
|
||||
</a-menu-item>
|
||||
</a-menu>
|
||||
</template>
|
||||
<a-button v-auth="'configSuppliersInfo:config_suppliers_info:deleteBatch'">批量操作
|
||||
<Icon icon="mdi:chevron-down"></Icon>
|
||||
</a-button>
|
||||
</a-dropdown>
|
||||
<!-- 高级查询 -->
|
||||
<super-query :config="superQueryConfig" @search="handleSuperQuery" />
|
||||
</template>
|
||||
<!--操作栏-->
|
||||
<template #action="{ record }">
|
||||
<TableAction :actions="getTableAction(record)" :dropDownActions="getDropDownAction(record)"/>
|
||||
</template>
|
||||
<!--字段回显插槽-->
|
||||
<template v-slot:bodyCell="{ column, record, index, text }">
|
||||
</template>
|
||||
</BasicTable>
|
||||
<!-- 表单区域 -->
|
||||
<ConfigSuppliersInfoModal @register="registerModal" @success="handleSuccess"></ConfigSuppliersInfoModal>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" name="configSuppliersInfo-configSuppliersInfo" setup>
|
||||
import {ref, reactive, computed, unref ,onMounted} from 'vue';
|
||||
import {BasicTable, useTable, TableAction} from '/@/components/Table';
|
||||
import {useModal} from '/@/components/Modal';
|
||||
import { useListPage } from '/@/hooks/system/useListPage'
|
||||
import ConfigSuppliersInfoModal from './components/ConfigSuppliersInfoModal.vue'
|
||||
import {columns, searchFormSchema, superQuerySchema} from './ConfigSuppliersInfo.data';
|
||||
import {list, deleteOne, batchDelete, getImportUrl,getExportUrl} from './ConfigSuppliersInfo.api';
|
||||
import { downloadFile } from '/@/utils/common/renderUtils';
|
||||
import { useUserStore } from '/@/store/modules/user';
|
||||
const queryParam = reactive<any>({});
|
||||
const checkedKeys = ref<Array<string | number>>([]);
|
||||
const userStore = useUserStore();
|
||||
//注册model
|
||||
const [registerModal, {openModal}] = useModal();
|
||||
//注册table数据
|
||||
const { prefixCls,tableContext,onExportXls,onImportXls } = useListPage({
|
||||
tableProps:{
|
||||
title: '供应商',
|
||||
api: list,
|
||||
columns,
|
||||
canResize:false,
|
||||
formConfig: {
|
||||
//labelWidth: 120,
|
||||
schemas: searchFormSchema,
|
||||
autoSubmitOnEnter:true,
|
||||
showAdvancedButton:true,
|
||||
fieldMapToNumber: [
|
||||
],
|
||||
fieldMapToTime: [
|
||||
],
|
||||
},
|
||||
actionColumn: {
|
||||
width: 120,
|
||||
fixed:'right'
|
||||
},
|
||||
beforeFetch: (params) => {
|
||||
return Object.assign(params, queryParam);
|
||||
},
|
||||
},
|
||||
exportConfig: {
|
||||
name:"供应商",
|
||||
url: getExportUrl,
|
||||
params: queryParam,
|
||||
},
|
||||
importConfig: {
|
||||
url: getImportUrl,
|
||||
success: handleSuccess
|
||||
},
|
||||
})
|
||||
|
||||
const [registerTable, {reload},{ rowSelection, selectedRowKeys }] = tableContext
|
||||
|
||||
// 高级查询配置
|
||||
const superQueryConfig = reactive(superQuerySchema);
|
||||
|
||||
/**
|
||||
* 高级查询事件
|
||||
*/
|
||||
function handleSuperQuery(params) {
|
||||
Object.keys(params).map((k) => {
|
||||
queryParam[k] = params[k];
|
||||
});
|
||||
reload();
|
||||
}
|
||||
/**
|
||||
* 新增事件
|
||||
*/
|
||||
function handleAdd() {
|
||||
openModal(true, {
|
||||
isUpdate: false,
|
||||
showFooter: true,
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 编辑事件
|
||||
*/
|
||||
function handleEdit(record: Recordable) {
|
||||
openModal(true, {
|
||||
record,
|
||||
isUpdate: true,
|
||||
showFooter: true,
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 详情
|
||||
*/
|
||||
function handleDetail(record: Recordable) {
|
||||
openModal(true, {
|
||||
record,
|
||||
isUpdate: true,
|
||||
showFooter: false,
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 删除事件
|
||||
*/
|
||||
async function handleDelete(record) {
|
||||
await deleteOne({id: record.id}, handleSuccess);
|
||||
}
|
||||
/**
|
||||
* 批量删除事件
|
||||
*/
|
||||
async function batchHandleDelete() {
|
||||
await batchDelete({ids: selectedRowKeys.value}, handleSuccess);
|
||||
}
|
||||
/**
|
||||
* 成功回调
|
||||
*/
|
||||
function handleSuccess() {
|
||||
(selectedRowKeys.value = []) && reload();
|
||||
}
|
||||
/**
|
||||
* 操作栏
|
||||
*/
|
||||
function getTableAction(record){
|
||||
return [
|
||||
{
|
||||
label: '编辑',
|
||||
onClick: handleEdit.bind(null, record),
|
||||
auth: 'configSuppliersInfo:config_suppliers_info:edit'
|
||||
}
|
||||
]
|
||||
}
|
||||
/**
|
||||
* 下拉操作栏
|
||||
*/
|
||||
function getDropDownAction(record){
|
||||
return [
|
||||
{
|
||||
label: '详情',
|
||||
onClick: handleDetail.bind(null, record),
|
||||
}, {
|
||||
label: '删除',
|
||||
popConfirm: {
|
||||
title: '是否确认删除',
|
||||
confirm: handleDelete.bind(null, record),
|
||||
placement: 'topLeft',
|
||||
},
|
||||
auth: 'configSuppliersInfo:config_suppliers_info:delete'
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
:deep(.ant-picker),:deep(.ant-input-number){
|
||||
width: 100%;
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,70 @@
|
|||
<template>
|
||||
<div style="min-height: 400px">
|
||||
<BasicForm @register="registerForm"></BasicForm>
|
||||
<div style="width: 100%;text-align: center" v-if="!formDisabled">
|
||||
<a-button @click="submitForm" pre-icon="ant-design:check" type="primary">提 交</a-button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import {BasicForm, useForm} from '/@/components/Form/index';
|
||||
import {computed, defineComponent} from 'vue';
|
||||
import {defHttp} from '/@/utils/http/axios';
|
||||
import { propTypes } from '/@/utils/propTypes';
|
||||
import {getBpmFormSchema} from '../ConfigSuppliersInfo.data';
|
||||
import {saveOrUpdate} from '../ConfigSuppliersInfo.api';
|
||||
|
||||
export default defineComponent({
|
||||
name: "ConfigSuppliersInfoForm",
|
||||
components:{
|
||||
BasicForm
|
||||
},
|
||||
props:{
|
||||
formData: propTypes.object.def({}),
|
||||
formBpm: propTypes.bool.def(true),
|
||||
},
|
||||
setup(props){
|
||||
const [registerForm, { setFieldsValue, setProps, getFieldsValue }] = useForm({
|
||||
labelWidth: 150,
|
||||
schemas: getBpmFormSchema(props.formData),
|
||||
showActionButtonGroup: false,
|
||||
baseColProps: {span: 24}
|
||||
});
|
||||
|
||||
const formDisabled = computed(()=>{
|
||||
if(props.formData.disabled === false){
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
});
|
||||
|
||||
let formData = {};
|
||||
const queryByIdUrl = '/configSuppliersInfo/configSuppliersInfo/queryById';
|
||||
async function initFormData(){
|
||||
let params = {id: props.formData.dataId};
|
||||
const data = await defHttp.get({url: queryByIdUrl, params});
|
||||
formData = {...data}
|
||||
//设置表单的值
|
||||
await setFieldsValue(formData);
|
||||
//默认是禁用
|
||||
await setProps({disabled: formDisabled.value})
|
||||
}
|
||||
|
||||
async function submitForm() {
|
||||
let data = getFieldsValue();
|
||||
let params = Object.assign({}, formData, data);
|
||||
console.log('表单数据', params)
|
||||
await saveOrUpdate(params, true)
|
||||
}
|
||||
|
||||
initFormData();
|
||||
|
||||
return {
|
||||
registerForm,
|
||||
formDisabled,
|
||||
submitForm,
|
||||
}
|
||||
}
|
||||
});
|
||||
</script>
|
|
@ -0,0 +1,76 @@
|
|||
<template>
|
||||
<BasicModal v-bind="$attrs" @register="registerModal" destroyOnClose :title="title" :width="800" @ok="handleSubmit">
|
||||
<BasicForm @register="registerForm" name="ConfigSuppliersInfoForm" />
|
||||
</BasicModal>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import {ref, computed, unref} from 'vue';
|
||||
import {BasicModal, useModalInner} from '/@/components/Modal';
|
||||
import {BasicForm, useForm} from '/@/components/Form/index';
|
||||
import {formSchema} from '../ConfigSuppliersInfo.data';
|
||||
import {saveOrUpdate} from '../ConfigSuppliersInfo.api';
|
||||
// Emits声明
|
||||
const emit = defineEmits(['register','success']);
|
||||
const isUpdate = ref(true);
|
||||
const isDetail = ref(false);
|
||||
//表单配置
|
||||
const [registerForm, { setProps,resetFields, setFieldsValue, validate, scrollToField }] = useForm({
|
||||
labelWidth: 150,
|
||||
schemas: formSchema,
|
||||
showActionButtonGroup: false,
|
||||
baseColProps: {span: 24}
|
||||
});
|
||||
//表单赋值
|
||||
const [registerModal, {setModalProps, closeModal}] = useModalInner(async (data) => {
|
||||
//重置表单
|
||||
await resetFields();
|
||||
setModalProps({confirmLoading: false,showCancelBtn:!!data?.showFooter,showOkBtn:!!data?.showFooter});
|
||||
isUpdate.value = !!data?.isUpdate;
|
||||
isDetail.value = !!data?.showFooter;
|
||||
if (unref(isUpdate)) {
|
||||
//表单赋值
|
||||
await setFieldsValue({
|
||||
...data.record,
|
||||
});
|
||||
}
|
||||
// 隐藏底部时禁用整个表单
|
||||
setProps({ disabled: !data?.showFooter })
|
||||
});
|
||||
//设置标题
|
||||
const title = computed(() => (!unref(isUpdate) ? '新增' : !unref(isDetail) ? '详情' : '编辑'));
|
||||
//表单提交事件
|
||||
async function handleSubmit(v) {
|
||||
try {
|
||||
let values = await validate();
|
||||
setModalProps({confirmLoading: true});
|
||||
//提交表单
|
||||
await saveOrUpdate(values, isUpdate.value);
|
||||
//关闭弹窗
|
||||
closeModal();
|
||||
//刷新列表
|
||||
emit('success');
|
||||
} catch ({ errorFields }) {
|
||||
if (errorFields) {
|
||||
const firstField = errorFields[0];
|
||||
if (firstField) {
|
||||
scrollToField(firstField.name, { behavior: 'smooth', block: 'center' });
|
||||
}
|
||||
}
|
||||
return Promise.reject(errorFields);
|
||||
} finally {
|
||||
setModalProps({confirmLoading: false});
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
/** 时间和数字输入框样式 */
|
||||
:deep(.ant-input-number) {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
:deep(.ant-calendar-picker) {
|
||||
width: 100%;
|
||||
}
|
||||
</style>
|
|
@ -7,8 +7,6 @@
|
|||
<a-button type="primary" preIcon="ant-design:import-outlined">导入</a-button>
|
||||
</a-upload>
|
||||
<a-button type="primary" preIcon="ant-design:export-outlined" @click="onExportXls">导出</a-button>
|
||||
<a-button type="primary" preIcon="ant-design:sync-outlined">同步企微?</a-button>
|
||||
<a-button type="primary" preIcon="ant-design:sync-outlined">同步钉钉?</a-button>
|
||||
<template v-if="checkedKeys.length > 0">
|
||||
<a-dropdown>
|
||||
<template #overlay>
|
||||
|
|
|
@ -27,9 +27,6 @@
|
|||
<div class="aui-flex-box" :class="activeIndex === 'accountLogin' ? 'activeNav on' : ''" @click="loginClick('accountLogin')"
|
||||
>{{ t('sys.login.signInFormTitle') }}
|
||||
</div>
|
||||
<div class="aui-flex-box" :class="activeIndex === 'phoneLogin' ? 'activeNav on' : ''" @click="loginClick('phoneLogin')"
|
||||
>{{ t('sys.login.mobileSignInFormTitle') }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="aui-form-box" style="height: 180px">
|
||||
<a-form ref="loginRef" :model="formData" v-if="activeIndex === 'accountLogin'" @keyup.enter.native="loginHandleClick">
|
||||
|
@ -56,33 +53,6 @@
|
|||
<img v-else style="margin-top: 2px; max-width: initial" :src="codeImg" @click="handleChangeCheckCode" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="aui-flex">
|
||||
<div class="aui-flex-box">
|
||||
<div class="aui-choice">
|
||||
<a-input class="fix-auto-fill" type="checkbox" v-model:value="rememberMe" />
|
||||
<span style="margin-left: 5px">{{ t('sys.login.rememberMe') }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="aui-forget">
|
||||
<a @click="forgetHandelClick"> {{ t('sys.login.forgetPassword') }}</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</a-form>
|
||||
<a-form v-else ref="phoneFormRef" :model="phoneFormData" @keyup.enter.native="loginHandleClick">
|
||||
<div class="aui-account phone">
|
||||
<div class="aui-inputClear phoneClear">
|
||||
<a-input class="fix-auto-fill" :placeholder="t('sys.login.mobile')" v-model:value="phoneFormData.mobile" />
|
||||
</div>
|
||||
<div class="aui-inputClear">
|
||||
<a-input class="fix-auto-fill" :maxlength="6" :placeholder="t('sys.login.smsCode')" v-model:value="phoneFormData.smscode" />
|
||||
<div v-if="showInterval" class="aui-code" @click="getLoginCode">
|
||||
<a>{{ t('component.countdown.normalText') }}</a>
|
||||
</div>
|
||||
<div v-else class="aui-code">
|
||||
<span class="aui-get-code code-shape">{{ t('component.countdown.sendText', [unref(timeRuning)]) }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</a-form>
|
||||
</div>
|
||||
|
@ -91,43 +61,11 @@
|
|||
<a-button :loading="loginLoading" class="aui-link-login" type="primary" @click="loginHandleClick">
|
||||
{{ t('sys.login.loginButton') }}</a-button>
|
||||
</div>
|
||||
<div class="aui-flex">
|
||||
<a class="aui-linek-code aui-flex-box" @click="codeHandleClick">{{ t('sys.login.qrSignInFormTitle') }}</a>
|
||||
</div>
|
||||
<div class="aui-flex">
|
||||
<a class="aui-linek-code aui-flex-box" @click="registerHandleClick">{{ t('sys.login.registerButton') }}</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<a-form @keyup.enter.native="loginHandleClick">
|
||||
<div class="aui-flex aui-third-text">
|
||||
<div class="aui-flex-box aui-third-border">
|
||||
<span>{{ t('sys.login.otherSignIn') }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="aui-flex" :class="`${prefixCls}-sign-in-way`">
|
||||
<div class="aui-flex-box">
|
||||
<div class="aui-third-login">
|
||||
<a title="github" @click="onThirdLogin('github')"><GithubFilled /></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="aui-flex-box">
|
||||
<div class="aui-third-login">
|
||||
<a title="企业微信" @click="onThirdLogin('wechat_enterprise')"><icon-font class="item-icon" type="icon-qiyeweixin3" /></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="aui-flex-box">
|
||||
<div class="aui-third-login">
|
||||
<a title="钉钉" @click="onThirdLogin('dingtalk')"><DingtalkCircleFilled /></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="aui-flex-box">
|
||||
<div class="aui-third-login">
|
||||
<a title="微信" @click="onThirdLogin('wechat_open')"><WechatFilled /></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</a-form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -279,10 +279,10 @@
|
|||
confirm: handleFrozen.bind(null, record, 1),
|
||||
},
|
||||
},
|
||||
{
|
||||
label: '代理人',
|
||||
onClick: handleAgentSettings.bind(null, record.username),
|
||||
},
|
||||
// {
|
||||
// label: '代理人',
|
||||
// onClick: handleAgentSettings.bind(null, record.username),
|
||||
// },
|
||||
];
|
||||
}
|
||||
|
||||
|
|
|
@ -29,11 +29,6 @@ export const columns: BasicColumn[] = [
|
|||
return render.renderDict(text, 'sex');
|
||||
},
|
||||
},
|
||||
{
|
||||
title: '生日',
|
||||
dataIndex: 'birthday',
|
||||
width: 100,
|
||||
},
|
||||
{
|
||||
title: '手机号',
|
||||
dataIndex: 'phone',
|
||||
|
@ -44,11 +39,6 @@ export const columns: BasicColumn[] = [
|
|||
width: 150,
|
||||
dataIndex: 'orgCodeTxt',
|
||||
},
|
||||
{
|
||||
title: '负责部门',
|
||||
width: 150,
|
||||
dataIndex: 'departIds_dictText',
|
||||
},
|
||||
{
|
||||
title: '状态',
|
||||
dataIndex: 'status_dictText',
|
||||
|
@ -189,6 +179,7 @@ export const formSchema: FormSchema[] = [
|
|||
componentProps: {
|
||||
labelKey: 'name',
|
||||
},
|
||||
ifShow: false,
|
||||
},
|
||||
{
|
||||
label: '角色',
|
||||
|
@ -245,6 +236,7 @@ export const formSchema: FormSchema[] = [
|
|||
valueField: 'id',
|
||||
immediate: false,
|
||||
},
|
||||
ifShow: false,
|
||||
},
|
||||
{
|
||||
label: '身份',
|
||||
|
@ -262,6 +254,7 @@ export const formSchema: FormSchema[] = [
|
|||
},
|
||||
};
|
||||
},
|
||||
ifShow: false,
|
||||
},
|
||||
{
|
||||
label: '负责部门',
|
||||
|
@ -270,7 +263,8 @@ export const formSchema: FormSchema[] = [
|
|||
componentProps: {
|
||||
mode: 'multiple',
|
||||
},
|
||||
ifShow: ({ values }) => values.userIdentity == 2,
|
||||
// ifShow: ({ values }) => values.userIdentity == 2,
|
||||
ifShow: false,
|
||||
},
|
||||
{
|
||||
label: '头像',
|
||||
|
@ -284,6 +278,7 @@ export const formSchema: FormSchema[] = [
|
|||
label: '生日',
|
||||
field: 'birthday',
|
||||
component: 'DatePicker',
|
||||
ifShow: false,
|
||||
},
|
||||
{
|
||||
label: '性别',
|
||||
|
@ -295,23 +290,11 @@ export const formSchema: FormSchema[] = [
|
|||
stringToNumber: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
label: '邮箱',
|
||||
field: 'email',
|
||||
component: 'Input',
|
||||
required: true,
|
||||
dynamicRules: ({ model, schema }) => {
|
||||
return [
|
||||
{ ...rules.duplicateCheckRule('sys_user', 'email', model, schema, true)[0], trigger: 'blur' },
|
||||
{ ...rules.rule('email', false)[0], trigger: 'blur' },
|
||||
];
|
||||
},
|
||||
},
|
||||
{
|
||||
label: '手机号码',
|
||||
field: 'phone',
|
||||
component: 'Input',
|
||||
required: true,
|
||||
required: false,
|
||||
dynamicRules: ({ model, schema }) => {
|
||||
return [
|
||||
{ ...rules.duplicateCheckRule('sys_user', 'phone', model, schema, true)[0], trigger: 'blur' },
|
||||
|
@ -319,12 +302,6 @@ export const formSchema: FormSchema[] = [
|
|||
];
|
||||
},
|
||||
},
|
||||
{
|
||||
label: '座机',
|
||||
field: 'telephone',
|
||||
component: 'Input',
|
||||
rules: [{ pattern: /^0\d{2,3}-[1-9]\d{6,7}$/, message: '请输入正确的座机号码' }],
|
||||
},
|
||||
{
|
||||
label: '工作流引擎',
|
||||
field: 'activitiSync',
|
||||
|
@ -335,6 +312,7 @@ export const formSchema: FormSchema[] = [
|
|||
type: 'radio',
|
||||
stringToNumber: true,
|
||||
},
|
||||
ifShow: false,
|
||||
},
|
||||
];
|
||||
|
||||
|
|
Loading…
Reference in New Issue