ljlong_2630 1 year ago
parent
commit
b34e7deea4
  1. 4
      src/components/BasicForm/src/BasicForm.vue
  2. 24
      src/components/Dialog/src/Dialog.vue
  3. 52
      src/views/eam/basic/deviceMaintenance/deviceMaintenance.data.ts
  4. 50
      src/views/eam/basic/inspection/inspection.data.ts
  5. 50
      src/views/eam/basic/item/item.data.ts
  6. 4
      src/views/eam/basic/location/index.vue
  7. 50
      src/views/eam/basic/location/location.data.ts
  8. 5
      src/views/eam/basic/locationArea/index.vue
  9. 50
      src/views/eam/basic/locationArea/locationArea.data.ts
  10. 51
      src/views/eam/basic/moldMaintenance/moldMaintenance.data.ts
  11. 44
      src/views/eam/basic/supplier/index.vue
  12. 50
      src/views/eam/basic/supplier/supplier.data.ts
  13. 13
      src/views/eam/item/countRecord/countRecord.data.ts
  14. 44
      src/views/eam/item/itemApplyMain/itemApplyMain.data.ts
  15. 6
      src/views/eam/item/itemMaintenance/itemMaintenance.data.ts
  16. 3
      src/views/home/echarts-data.ts
  17. 10
      src/views/login/components/LoginForm.vue

4
src/components/BasicForm/src/BasicForm.vue

@ -4,12 +4,12 @@
v-model="dialogVisible" v-model="dialogVisible"
:width="isBusiness ? '60%' : '40%'" :width="isBusiness ? '60%' : '40%'"
:close-on-click-modal="false" :close-on-click-modal="false"
:vLoading="formLoading"
> >
<div <div
style="max-height: 60vh;overflow-y: auto;"> style="max-height: 60vh;overflow-y: auto;">
<Form <Form
ref="formRef" ref="formRef"
v-loading="formLoading"
:rules="rules" :rules="rules"
:schema="formSchema" :schema="formSchema"
:is-col="true" :is-col="true"
@ -456,7 +456,7 @@ const submitForm = async () => {
const data = unref(formRef)?.formModel const data = unref(formRef)?.formModel
emit('success', formType.value, data) emit('success', formType.value, data)
} finally { } finally {
formLoading.value = false // formLoading.value = false
} }
} }
} }

24
src/components/Dialog/src/Dialog.vue

@ -11,7 +11,8 @@ const props = defineProps({
fullscreen: propTypes.bool.def(true), fullscreen: propTypes.bool.def(true),
width: propTypes.oneOfType([String, Number]).def('40%'), width: propTypes.oneOfType([String, Number]).def('40%'),
scroll: propTypes.bool.def(false), // maxHeight scroll: propTypes.bool.def(false), // maxHeight
maxHeight: propTypes.oneOfType([String, Number]).def('400px') maxHeight: propTypes.oneOfType([String, Number]).def('400px'),
vLoading:propTypes.bool.def(false)
}) })
const getBindValue = computed(() => { const getBindValue = computed(() => {
@ -34,6 +35,22 @@ const toggleFull = () => {
const dialogHeight = ref(isNumber(props.maxHeight) ? `${props.maxHeight}px` : props.maxHeight) const dialogHeight = ref(isNumber(props.maxHeight) ? `${props.maxHeight}px` : props.maxHeight)
let demo = null
watch(
() => props.vLoading,
async (val: boolean) => {
await nextTick()
if (val) {
initDialog()
} else {
if (demo !== null) demo.close()
}
},
{
immediate: true
}
)
watch( watch(
() => isFullscreen.value, () => isFullscreen.value,
async (val: boolean) => { async (val: boolean) => {
@ -55,6 +72,10 @@ const dialogStyle = computed(() => {
height: unref(dialogHeight) height: unref(dialogHeight)
} }
}) })
const initDialog = () => {
// el-loadingsvg使
demo = ElLoading.service({ target: '.loading', text: '加载中...', background: 'rgba(246, 246, 246, 0.8)' })
}
</script> </script>
<template> <template>
@ -68,6 +89,7 @@ const dialogStyle = computed(() => {
draggable draggable
class="com-dialog" class="com-dialog"
:show-close="false" :show-close="false"
custom-class="loading"
> >
<template #header="{ close }"> <template #header="{ close }">
<div class="relative h-54px flex items-center justify-between pl-15px pr-15px"> <div class="relative h-54px flex items-center justify-between pl-15px pr-15px">

52
src/views/eam/basic/deviceMaintenance/deviceMaintenance.data.ts

@ -135,6 +135,7 @@ export const DeviceMaintenance = useCrudSchemas(reactive<CrudSchema[]>([
component: 'InputNumber', component: 'InputNumber',
componentProps: { componentProps: {
min: 1, min: 1,
max: 100,
precision: 0 precision: 0
} }
}, },
@ -155,32 +156,31 @@ export const DeviceMaintenance = useCrudSchemas(reactive<CrudSchema[]>([
} }
}, },
}, },
// {
{ // label: '是否可用',
label: '是否可用', // field: 'available',
field: 'available', // dictType: DICT_TYPE.TRUE_FALSE,
dictType: DICT_TYPE.TRUE_FALSE, // dictClass: 'string',
dictClass: 'string', // isSearch: false,
isSearch: false, // isTable: true,
isTable: true, // sort: 'custom',
sort: 'custom', // table: {
table: { // width: 150
width: 150 // },
}, // tableForm: {
tableForm: { // type: 'Select',
type: 'Select', // inactiveValue: 'FALSE',
inactiveValue: 'FALSE', // disabled: true
disabled: true // },
}, // form: {
form: { // component: 'Switch',
component: 'Switch', // value: 'TRUE',
value: 'TRUE', // componentProps: {
componentProps: { // inactiveValue: 'FALSE',
inactiveValue: 'FALSE', // activeValue: 'TRUE'
activeValue: 'TRUE' // }
} // }
} // },
},
{ {
label: '创建时间', label: '创建时间',
field: 'createTime', field: 'createTime',

50
src/views/eam/basic/inspection/inspection.data.ts

@ -119,31 +119,31 @@ export const DeviceMoldItems = useCrudSchemas(reactive<CrudSchema[]>([
isSearch: true, isSearch: true,
}, },
{ // {
label: '是否可用', // label: '是否可用',
field: 'available', // field: 'available',
dictType: DICT_TYPE.TRUE_FALSE, // dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string', // dictClass: 'string',
isSearch: false, // isSearch: false,
isTable: true, // isTable: true,
sort: 'custom', // sort: 'custom',
table: { // table: {
width: 150 // width: 150
}, // },
tableForm: { // tableForm: {
type: 'Select', // type: 'Select',
inactiveValue: 'FALSE', // inactiveValue: 'FALSE',
disabled: true // disabled: true
}, // },
form: { // form: {
component: 'Switch', // component: 'Switch',
value: 'TRUE', // value: 'TRUE',
componentProps: { // componentProps: {
inactiveValue: 'FALSE', // inactiveValue: 'FALSE',
activeValue: 'TRUE' // activeValue: 'TRUE'
} // }
} // }
}, // },
{ {
label: '创建时间', label: '创建时间',
field: 'createTime', field: 'createTime',

50
src/views/eam/basic/item/item.data.ts

@ -234,31 +234,31 @@ export const Item = useCrudSchemas(reactive<CrudSchema[]>([
} }
} }
}, },
{ // {
label: '是否可用', // label: '是否可用',
field: 'available', // field: 'available',
dictType: DICT_TYPE.TRUE_FALSE, // dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string', // dictClass: 'string',
isSearch: false, // isSearch: false,
isTable: true, // isTable: true,
sort: 'custom', // sort: 'custom',
table: { // table: {
width: 150 // width: 150
}, // },
tableForm: { // tableForm: {
type: 'Select', // type: 'Select',
inactiveValue: 'FALSE', // inactiveValue: 'FALSE',
disabled: true // disabled: true
}, // },
form: { // form: {
component: 'Switch', // component: 'Switch',
value: 'TRUE', // value: 'TRUE',
componentProps: { // componentProps: {
inactiveValue: 'FALSE', // inactiveValue: 'FALSE',
activeValue: 'TRUE' // activeValue: 'TRUE'
} // }
} // }
}, // },
{ {
label: '创建时间', label: '创建时间',
field: 'createTime', field: 'createTime',

4
src/views/eam/basic/location/index.vue

@ -151,6 +151,7 @@
} }
if (data.activeTime == 0) data.activeTime = null; if (data.activeTime == 0) data.activeTime = null;
if (data.expireTime == 0) data.expireTime = null; if (data.expireTime == 0) data.expireTime = null;
try {
if (formType === 'create') { if (formType === 'create') {
await LocationApi.createLocation(data) await LocationApi.createLocation(data)
message.success(t('common.createSuccess')) message.success(t('common.createSuccess'))
@ -160,6 +161,9 @@
} }
basicFormRef.value.dialogVisible = false basicFormRef.value.dialogVisible = false
getList() getList()
} finally {
basicFormRef.value.formLoading = false
}
} }
/** 详情操作 */ /** 详情操作 */

50
src/views/eam/basic/location/location.data.ts

@ -97,31 +97,31 @@ export const Location = useCrudSchemas(reactive<CrudSchema[]>([
} }
} }
}, },
{ // {
label: '是否可用', // label: '是否可用',
field: 'available', // field: 'available',
dictType: DICT_TYPE.TRUE_FALSE, // dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string', // dictClass: 'string',
isSearch: false, // isSearch: false,
isTable: true, // isTable: true,
sort: 'custom', // sort: 'custom',
table: { // table: {
width: 150 // width: 150
}, // },
tableForm: { // tableForm: {
type: 'Select', // type: 'Select',
inactiveValue: 'FALSE', // inactiveValue: 'FALSE',
disabled: true // disabled: true
}, // },
form: { // form: {
component: 'Switch', // component: 'Switch',
value: 'TRUE', // value: 'TRUE',
componentProps: { // componentProps: {
inactiveValue: 'FALSE', // inactiveValue: 'FALSE',
activeValue: 'TRUE' // activeValue: 'TRUE'
} // }
} // }
}, // },
{ {
label: '创建时间', label: '创建时间',
field: 'createTime', field: 'createTime',

5
src/views/eam/basic/locationArea/index.vue

@ -143,6 +143,7 @@
} }
if (data.activeTime == 0) data.activeTime = null; if (data.activeTime == 0) data.activeTime = null;
if (data.expireTime == 0) data.expireTime = null; if (data.expireTime == 0) data.expireTime = null;
try {
if (formType === 'create') { if (formType === 'create') {
await LocationAreaApi.createLocationArea(data) await LocationAreaApi.createLocationArea(data)
message.success(t('common.createSuccess')) message.success(t('common.createSuccess'))
@ -152,6 +153,10 @@
} }
basicFormRef.value.dialogVisible = false basicFormRef.value.dialogVisible = false
getList() getList()
} finally {
basicFormRef.value.formLoading = false
}
} }
// //

50
src/views/eam/basic/locationArea/locationArea.data.ts

@ -43,31 +43,31 @@ export const LocationArea = useCrudSchemas(reactive<CrudSchema[]>([
component: 'Select' component: 'Select'
}, },
}, },
{ // {
label: '是否可用', // label: '是否可用',
field: 'available', // field: 'available',
dictType: DICT_TYPE.TRUE_FALSE, // dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string', // dictClass: 'string',
isSearch: false, // isSearch: false,
isTable: true, // isTable: true,
sort: 'custom', // sort: 'custom',
table: { // table: {
width: 150 // width: 150
}, // },
tableForm: { // tableForm: {
type: 'Select', // type: 'Select',
inactiveValue: 'FALSE', // inactiveValue: 'FALSE',
disabled: true // disabled: true
}, // },
form: { // form: {
component: 'Switch', // component: 'Switch',
value: 'TRUE', // value: 'TRUE',
componentProps: { // componentProps: {
inactiveValue: 'FALSE', // inactiveValue: 'FALSE',
activeValue: 'TRUE' // activeValue: 'TRUE'
} // }
} // }
}, // },
{ {
label: '创建时间', label: '创建时间',
field: 'createTime', field: 'createTime',

51
src/views/eam/basic/moldMaintenance/moldMaintenance.data.ts

@ -134,6 +134,7 @@ export const MoldMaintenance = useCrudSchemas(reactive<CrudSchema[]>([
component: 'InputNumber', component: 'InputNumber',
componentProps: { componentProps: {
min: 1, min: 1,
max: 100,
precision: 0 precision: 0
} }
}, },
@ -154,31 +155,31 @@ export const MoldMaintenance = useCrudSchemas(reactive<CrudSchema[]>([
} }
}, },
}, },
{ // {
label: '是否可用', // label: '是否可用',
field: 'available', // field: 'available',
dictType: DICT_TYPE.TRUE_FALSE, // dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string', // dictClass: 'string',
isSearch: false, // isSearch: false,
isTable: true, // isTable: true,
sort: 'custom', // sort: 'custom',
table: { // table: {
width: 150 // width: 150
}, // },
tableForm: { // tableForm: {
type: 'Select', // type: 'Select',
inactiveValue: 'FALSE', // inactiveValue: 'FALSE',
disabled: true // disabled: true
}, // },
form: { // form: {
component: 'Switch', // component: 'Switch',
value: 'TRUE', // value: 'TRUE',
componentProps: { // componentProps: {
inactiveValue: 'FALSE', // inactiveValue: 'FALSE',
activeValue: 'TRUE' // activeValue: 'TRUE'
} // }
} // }
}, // },
{ {
label: '创建时间', label: '创建时间',
field: 'createTime', field: 'createTime',

44
src/views/eam/basic/supplier/index.vue

@ -5,28 +5,15 @@
</ContentWrap> </ContentWrap>
<!-- 列表头部 --> <!-- 列表头部 -->
<TableHead <TableHead :HeadButttondata="HeadButttondata" @button-base-click="buttonBaseClick" :routeName="routeName"
:HeadButttondata="HeadButttondata" @updataTableColumns="updataTableColumns" @searchFormClick="searchFormClick" :allSchemas="Supplier.allSchemas" />
@button-base-click="buttonBaseClick"
:routeName="routeName"
@updataTableColumns="updataTableColumns"
@searchFormClick="searchFormClick"
:allSchemas="Supplier.allSchemas"
/>
<!-- 列表 --> <!-- 列表 -->
<ContentWrap> <ContentWrap>
<Table <Table :columns="tableColumns" :data="tableObject.tableList" :loading="tableObject.loading" :pagination="{
:columns="tableColumns"
:data="tableObject.tableList"
:loading="tableObject.loading"
:pagination="{
total: tableObject.total total: tableObject.total
}" }" v-model:pageSize="tableObject.pageSize" v-model:currentPage="tableObject.currentPage"
v-model:pageSize="tableObject.pageSize" v-model:sort="tableObject.sort">
v-model:currentPage="tableObject.currentPage"
v-model:sort="tableObject.sort"
>
<template #code="{row}"> <template #code="{row}">
<el-button type="primary" link @click="openDetail(row, '代码', row.code)"> <el-button type="primary" link @click="openDetail(row, '代码', row.code)">
<span>{{ row.code }}</span> <span>{{ row.code }}</span>
@ -39,22 +26,16 @@
</ContentWrap> </ContentWrap>
<!-- 表单弹窗添加/修改 --> <!-- 表单弹窗添加/修改 -->
<BasicForm <BasicForm ref="basicFormRef" @success="formsSuccess" :rules="SupplierRules" :formAllSchemas="Supplier.allSchemas"
ref="basicFormRef" :apiUpdate="SupplierApi.updateSupplier" :apiCreate="SupplierApi.createSupplier"
@success="formsSuccess" @searchTableSuccess="searchTableSuccess" :isBusiness="false" />
:rules="SupplierRules"
:formAllSchemas="Supplier.allSchemas"
:apiUpdate="SupplierApi.updateSupplier"
:apiCreate="SupplierApi.createSupplier"
@searchTableSuccess="searchTableSuccess"
:isBusiness="false"
/>
<!-- 详情 --> <!-- 详情 -->
<Detail ref="detailRef" :isBasic="true" :allSchemas="Supplier.allSchemas" /> <Detail ref="detailRef" :isBasic="true" :allSchemas="Supplier.allSchemas" />
<!-- 导入 --> <!-- 导入 -->
<ImportForm ref="importFormRef" url="/eam/supplier/import" :importTemplateData="importTemplateData" @success="importSuccess" /> <ImportForm ref="importFormRef" url="/eam/supplier/import" :importTemplateData="importTemplateData"
@success="importSuccess" />
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
@ -162,6 +143,7 @@ const formsSuccess = async (formType,data) => {
} }
if (data.activeTime == 0) data.activeTime = null; if (data.activeTime == 0) data.activeTime = null;
if (data.expireTime == 0) data.expireTime = null; if (data.expireTime == 0) data.expireTime = null;
try {
if (formType === 'create') { if (formType === 'create') {
await SupplierApi.createSupplier(data) await SupplierApi.createSupplier(data)
message.success(t('common.createSuccess')) message.success(t('common.createSuccess'))
@ -171,6 +153,9 @@ const formsSuccess = async (formType,data) => {
} }
basicFormRef.value.dialogVisible = false basicFormRef.value.dialogVisible = false
getList() getList()
} finally {
basicFormRef.value.formLoading = false
}
} }
/** 详情操作 */ /** 详情操作 */
@ -221,5 +206,4 @@ const searchFormClick = (searchData) => {
onMounted(async () => { onMounted(async () => {
getList() getList()
}) })
</script> </script>

50
src/views/eam/basic/supplier/supplier.data.ts

@ -53,31 +53,31 @@ export const Supplier = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom', sort: 'custom',
isSearch: false, isSearch: false,
}, },
{ // {
label: '状态', // label: '状态',
field: 'available', // field: 'available',
dictType: DICT_TYPE.TRUE_FALSE, // dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string', // dictClass: 'string',
isSearch: false, // isSearch: false,
isTable: true, // isTable: true,
sort: 'custom', // sort: 'custom',
table: { // table: {
width: 150 // width: 150
}, // },
tableForm: { // tableForm: {
type: 'Select', // type: 'Select',
inactiveValue: 'FALSE', // inactiveValue: 'FALSE',
disabled: true // disabled: true
}, // },
form: { // form: {
component: 'Switch', // component: 'Switch',
value: 'TRUE', // value: 'TRUE',
componentProps: { // componentProps: {
inactiveValue: 'FALSE', // inactiveValue: 'FALSE',
activeValue: 'TRUE' // activeValue: 'TRUE'
} // }
} // }
}, // },
{ {
label: '创建时间', label: '创建时间',
field: 'createTime', field: 'createTime',

13
src/views/eam/item/countRecord/countRecord.data.ts

@ -29,6 +29,17 @@ export const CountRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
fixed: 'left' fixed: 'left'
}, },
}, },
{
label: '计划编号',
field: 'requestNumber',
sort: 'custom',
isForm: false,
isSearch: true,
table: {
width: 180,
fixed: 'left'
},
},
{ {
label: '名称', label: '名称',
field: 'name', field: 'name',
@ -116,6 +127,8 @@ export const CountRecordDetail = useCrudSchemas(reactive<CrudSchema[]>([
}, },
}, },
{ {
label: '库位编号', label: '库位编号',
field: 'locationNumber', field: 'locationNumber',

44
src/views/eam/item/itemApplyMain/itemApplyMain.data.ts

@ -172,8 +172,6 @@ export const ItemApplyDetail = useCrudSchemas(reactive<CrudSchema[]>([
disabled: false disabled: false
} }
}, },
{ {
label: '设备/模具编号', label: '设备/模具编号',
field: 'deviceNumber', field: 'deviceNumber',
@ -260,27 +258,27 @@ export const ItemApplyDetail = useCrudSchemas(reactive<CrudSchema[]>([
precision: 2 precision: 2
} }
}, },
{ // {
label: '是否账内库', // label: '是否账内库',
field: 'isInAccount', // field: 'isInAccount',
sort: 'custom', // sort: 'custom',
dictType: DICT_TYPE.TRUE_FALSE, // dictType: DICT_TYPE.TRUE_FALSE,
dictClass: 'string', // dictClass: 'string',
isSearch: true, // isSearch: true,
isTable: true, // isTable: true,
table: { // table: {
width: 150 // width: 150
}, // },
tableForm: { // tableForm: {
type: 'Select', // type: 'Select',
disabled: true // disabled: true
}, // },
form: { // form: {
componentProps: { // componentProps: {
disabled: true, // disabled: true,
} // }
}, // },
}, // },
{ {
label: '是否可用', label: '是否可用',
field: 'available', field: 'available',

6
src/views/eam/item/itemMaintenance/itemMaintenance.data.ts

@ -68,7 +68,11 @@ export const ItemMaintenance = useCrudSchemas(reactive<CrudSchema[]>([
}, },
isForm: false, isForm: false,
}, },
{
label: '维修原因',
field: 'reasons',
sort: 'custom',
},
{ {
label: '是否可用', label: '是否可用',
field: 'available', field: 'available',

3
src/views/home/echarts-data.ts

@ -5,8 +5,7 @@ const { t } = useI18n()
export const lineOptions: EChartsOption = { export const lineOptions: EChartsOption = {
xAxis: { xAxis: {
data: [ 1, 2, 3,4,5,6,7,8,9,10,11,12 data: [ 1, 2, 3,4,5,6,7,8,9,10,11,12],
],
boundaryGap: false, boundaryGap: false,
axisTick: { axisTick: {
show: false show: false

10
src/views/login/components/LoginForm.vue

@ -7,12 +7,12 @@
<LoginFormTitle style="width: 100%" /> <LoginFormTitle style="width: 100%" />
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="24" style="padding-right: 10px; padding-left: 10px"> <!-- <el-col :span="24" style="padding-right: 10px; padding-left: 10px">
<el-form-item v-if="loginData.tenantEnable === 'true'" prop="tenantName"> <el-form-item v-if="loginData.tenantEnable === 'true'" prop="tenantName">
<el-input v-model="loginData.loginForm.tenantName" :placeholder="t('login.tenantNamePlaceholder')" <el-input v-model="loginData.loginForm.tenantName" :placeholder="t('login.tenantNamePlaceholder')"
:prefix-icon="iconHouse" link type="primary" /> :prefix-icon="iconHouse" link type="primary" />
</el-form-item> </el-form-item>
</el-col> </el-col> -->
<el-col :span="24" style="padding-right: 10px; padding-left: 10px"> <el-col :span="24" style="padding-right: 10px; padding-left: 10px">
<el-form-item prop="username"> <el-form-item prop="username">
<el-input v-model="loginData.loginForm.username" :placeholder="t('login.usernamePlaceholder')" <el-input v-model="loginData.loginForm.username" :placeholder="t('login.usernamePlaceholder')"
@ -119,9 +119,9 @@ const loginData = reactive({
captchaEnable: import.meta.env.VITE_APP_CAPTCHA_ENABLE, captchaEnable: import.meta.env.VITE_APP_CAPTCHA_ENABLE,
tenantEnable: import.meta.env.VITE_APP_TENANT_ENABLE, tenantEnable: import.meta.env.VITE_APP_TENANT_ENABLE,
loginForm: { loginForm: {
tenantName: '闻荫源码', tenantName: '',
username: 'admin', username: '',
password: '123456', password: '',
captchaVerification: '', captchaVerification: '',
rememberMe: false, rememberMe: false,
code: '', code: '',

Loading…
Cancel
Save