From d2e4ac01e289a37feb59e5eda1cce2c02262dd7c Mon Sep 17 00:00:00 2001 From: zhang_li <2235006734@qqq.com> Date: Mon, 5 Feb 2024 17:01:43 +0800 Subject: [PATCH 1/7] =?UTF-8?q?=E8=AE=BE=E5=A4=87=E5=8F=B0=E8=B4=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Detail/src/DetailDeviceLedger.vue | 203 +++++++++--------- src/components/UploadFile/src/UploadFile.vue | 4 +- .../deviceAccounts/deviceAccounts.data.ts | 22 +- src/views/eam/device/deviceAccounts/index.vue | 31 +-- 4 files changed, 111 insertions(+), 149 deletions(-) diff --git a/src/components/Detail/src/DetailDeviceLedger.vue b/src/components/Detail/src/DetailDeviceLedger.vue index c16e5ee..dc74c8e 100644 --- a/src/components/Detail/src/DetailDeviceLedger.vue +++ b/src/components/Detail/src/DetailDeviceLedger.vue @@ -25,7 +25,7 @@ /> - +
@@ -39,37 +39,30 @@ @searchFormClick="searchFormClick" :allSchemas="detailAllSchemas" /> - -
-
+ + + + + 点击修改
- - - - 点击修改 - - +
+ + + + + + + + + 点击修改 +
{} defineOptions({ name: 'Detail' }) @@ -295,33 +290,12 @@ const props = defineProps({ required: false, default: false }, - // 详情上传图片 - upImageRules: { - type: Array, - required: false, - default: null - }, - imageFormAllSchemas: { - type: Object, - required: true, - default: null - }, // 详情上传文件 upFileRules: { type: Array, required: false, default: null }, - fileFormAllSchemas: { - type: Object, - required: true, - default: null - }, - subIndex: { - type: String, - required: false, - default: 'A' - }, // 获取图片详情方法 getImageApi: { type: Function, @@ -333,21 +307,24 @@ const props = defineProps({ type: Function, required: false, default: null - }, + } +}) +const imageFormData = ref({ + filePathList: [] +}) +const fileFormData = ref({ + filePathList: [] }) -const subIndex = ref(props.subIndex) +const subIndex = ref('A') const isShowDrawer = ref(false) const detailLoading = ref(false) const tabsList = ref(JSON.parse(JSON.stringify(props.tabs ? props.tabs : ''))) const subTabsList = ref(JSON.parse(JSON.stringify(props.subTabs ? props.subTabs : ''))) -const imageFormSchemas = ref(props.imageFormAllSchemas?.formSchema) -const fileFormSchemas = ref(props.fileFormAllSchemas?.formSchema) -console.log('imageFormSchemas', imageFormSchemas.value) // Tabs当前选择 const current = ref(0) -const imageParmas=ref({ +const imageParmas = ref({ funcCode: 'device_mould_picture', //获取图片详情参数 fileBusiType: '' //获取图片详情参数 }) @@ -355,17 +332,24 @@ const change = (item, index) => { current.value = index if (item.prop == 'Image') { imageParmas.value.funcCode = 'device_mould_picture' + imageParmas.value.fileBusiType = '' + getImage() } else if (item.prop == 'Word') { - imageParmas.value.funcCode = 'device_mould_attachment' - } else{ - imageParmas.value.funcCode = '' + imageParmas.value.funcCode = 'device_mould_attachment' + imageParmas.value.fileBusiType = 'A' + subIndex.value = 'A' + formKey.value += 1 + getImage() + } else { + imageParmas.value.funcCode = '' + imageParmas.value.fileBusiType = '' } emit('changeTabs', item) } //主表所需的参数 const masterParmas = ref({ - number: '' ,//主表id + number: '' //主表id }) // 列表头部按钮 @@ -376,12 +360,12 @@ const buttondata = ref() const detailData = ref() const titleNameRef = ref() const titleValueRef = ref() -const tabsKay =ref(0)//刷新tabs组件key值 +const tabsKay = ref(0) //刷新tabs组件key值 const openDetail = async (row: any, titleName: any, titleValue: any, tableName: any) => { titleNameRef.value = titleName titleValueRef.value = titleValue current.value = 0 - tabsKay.value+=1 + tabsKay.value += 1 // 加载明细列表 if (!props.isBasic || (props.isBasic && props.tabsExtend)) { // 设置主表id @@ -394,11 +378,13 @@ const openDetail = async (row: any, titleName: any, titleValue: any, tableName: } } isShowDrawer.value = true + + imageParmas.value.funcCode = 'device_mould_picture' + if (row) { - console.log(row) detailLoading.value = true try { - await getImage() + await getImage() detailData.value = row // 判断详情新增按钮是否显示 if (routeName.value.indexOf('Job') > -1) { @@ -470,19 +456,24 @@ const openDetail = async (row: any, titleName: any, titleValue: any, tableName: defineExpose({ openDetail }) // 提供 open 方法,用于打开弹窗 // 获取图片详情 -const getImage=()=>{ - props.getImageApi({ - number:masterParmas.value.number, - funcCode:imageParmas.value.funcCode, - fileBusiType:imageParmas.value.fileBusiType - }).then((res)=>{ - console.log(res) - nextTick(() => { - imageFormRef.value.setValues({ - filePathList:res - }) +const formKey = ref(0) +const getImage = () => { + props + .getImageApi({ + number: masterParmas.value.number, + funcCode: imageParmas.value.funcCode, + fileBusiType: imageParmas.value.fileBusiType + }) + .then((res) => { + nextTick(() => { + if (imageParmas.value.funcCode == 'device_mould_picture') { + imageFormData.value.filePathList = res + } else { + fileFormData.value.filePathList = res + formKey.value += 1 + } }) - }) + }) } const tableObjectRef = ref() @@ -588,8 +579,7 @@ const emit = defineEmits([ 'detailOpenForm', 'tableFormButton', 'openImage', - 'subTabsChick', - 'uploadFile' + 'subTabsChick' ]) /** 删除按钮操作 */ const handleDelete = async (id: number) => { @@ -640,17 +630,18 @@ const openImage = (item) => { } const imageFormRef = ref() // 上传图片 -const uploadImage =async () => { - const elForm = unref(imageFormRef)?.getElFormRef() - // 校验表单 - if (!elForm) return - const valid = await elForm.validate() - if (!valid) return +const uploadImage = async () => { + // const elForm = unref(imageFormRef)?.getElFormRef() + // // 校验表单 + // if (!elForm) return + // const valid = await elForm.validate() + // if (!valid) return + imageFormData let data = { - number:masterParmas.value.number, - filePathList: imageFormRef.value.formModel.filePathList.map((item) => item.url), + number: masterParmas.value.number, + filePathList: imageFormData.value.filePathList.map((item) => item.url), funcCode: imageParmas.value.funcCode, - fileBusiType: imageParmas.value.fileBusiType ? imageParmas.value.fileBusiType : '' + fileBusiType: imageParmas.value.fileBusiType ? imageParmas.value.fileBusiType : '' } props.uploadImage(data).then((res) => { message.success('修改成功') @@ -659,23 +650,29 @@ const uploadImage =async () => { } // 选择二级tabs const fileFormRef = ref() -const handleTabsChange=(e)=>{ - emit('subTabsChick',e) +const handleTabsChange = (e) => { + imageParmas.value.fileBusiType = e + getImage() } // 上传文件 -const uploadFile=async(index)=>{ - let _lists = fileFormRef.value?.map(v => unref(v)?.getElFormRef()) - const elForm = _lists[index] - // 校验表单 - if (!elForm) return - const valid = await elForm.validate() - if (!valid) return - console.log(fileFormRef.value.formModel) - emit( - 'uploadFile', - masterParmas.value.number, - fileFormRef.value.formModel.filePathList.map((item) => item.url) - ) +const uploadFile = async () => { + console.log(fileFormData.value.filePathList) + // const elForm = unref(fileFormRef)?.getElFormRef() + // // 校验表单 + // if (!elForm) return + // const valid = await elForm.validate() + // if (!valid) return + // console.log(fileFormRef.value?.formModel.filePathList) + let data = { + number: masterParmas.value.number, + filePathList: fileFormData.value.filePathList.map((item) => item.url), + funcCode: imageParmas.value.funcCode, + fileBusiType: imageParmas.value.fileBusiType ? imageParmas.value.fileBusiType : '' + } + props.uploadImage(data).then((res) => { + message.success('修改成功') + getImage() + }) } //监视属性 watch( diff --git a/src/components/UploadFile/src/UploadFile.vue b/src/components/UploadFile/src/UploadFile.vue index 8db435b..464a54a 100644 --- a/src/components/UploadFile/src/UploadFile.vue +++ b/src/components/UploadFile/src/UploadFile.vue @@ -69,6 +69,7 @@ const props = defineProps({ const valueRef = ref(props.modelValue) const uploadRef = ref() const uploadList = ref([]) +console.log('88',props.modelValue) const fileList = props.modelValue && props.modelValue.length > 0 ? ref(props.modelValue) : ref([]) const uploadNumber = ref(0) const uploadHeaders = ref({ @@ -116,7 +117,7 @@ const handleFileSuccess: UploadProps['onSuccess'] = (res: any): void => { fileList.value = fileList.value.concat(uploadList.value) uploadList.value = [] uploadNumber.value = 0 - emit('update:modelValue', listToString(fileList.value)) + emit('update:modelValue', fileList.value) } } // 文件数超出提示 @@ -137,6 +138,7 @@ const handleRemove = (file) => { } const handlePreview: UploadProps['onPreview'] = (uploadFile) => { console.log(uploadFile) + window.open(uploadFile.url) } // 对象转成指定字符串分隔 const listToString = (list: UploadUserFile[], separator?: string) => { diff --git a/src/views/eam/device/deviceAccounts/deviceAccounts.data.ts b/src/views/eam/device/deviceAccounts/deviceAccounts.data.ts index e9df4c0..0c43812 100644 --- a/src/views/eam/device/deviceAccounts/deviceAccounts.data.ts +++ b/src/views/eam/device/deviceAccounts/deviceAccounts.data.ts @@ -157,21 +157,7 @@ export const UpImage = useCrudSchemas(reactive([ } }, ])) -// 表单校验 -export const UpFileRules = reactive({ - filePath: [required], -}) -export const UploadFile = useCrudSchemas(reactive([ - { - label: '上传文件', - field: 'filePathList', - sort: 'custom', - isForm: true, - form:{ - component:'UploadFile', - componentProps:{ - limit:10 - } - } - }, -])) \ No newline at end of file +// // 表单校验 +// export const UpFileRules = reactive({ +// filePath: [required], +// }) diff --git a/src/views/eam/device/deviceAccounts/index.vue b/src/views/eam/device/deviceAccounts/index.vue index b159b0e..d2d8019 100644 --- a/src/views/eam/device/deviceAccounts/index.vue +++ b/src/views/eam/device/deviceAccounts/index.vue @@ -68,12 +68,6 @@ :apiPage="apiPage" :tabsExtend="tabsExtend" :tableObjectExtend="tableObjectExtend" - :imageFormAllSchemas="UpImage.allSchemas" - :upImageRules="UpImageRules" - :fileFormAllSchemas="UploadFile.allSchemas" - :upFileRules="UpFileRules" - @subTabsChick="subTabsChick" - @uploadFile="uploadFile" :getImageApi="uploadApi.getImage" :uploadImage="uploadApi.uploadImage" /> @@ -92,10 +86,7 @@ import download from '@/utils/download' import { DeviceAccounts, DeviceAccountsRules, - UpImage, - UpImageRules, - UploadFile, - UpFileRules + UpImage } from './deviceAccounts.data' import { Item } from '@/views/eam/basic/item/item.data' import * as ItemApi from '@/api/eam/basic/item' @@ -321,6 +312,7 @@ const changeTabs = (item) => { // apiPage.value = deviceRepairApi.getDeviceRepairPage // detailAllSchemas.value = DeviceRepair.allSchemas } else if (item.prop == 'DeviceReportRecord') { + console.log(item.prop) tabsExtend.value = 3 apiPage.value = deviceRepairApi.getDeviceRepairPage detailAllSchemas.value = DeviceRepair.allSchemas @@ -346,23 +338,8 @@ const changeTabs = (item) => { } ] } -// 二级切换事件 -const fileBusiType = ref() -const subTabsChick = (e) => { - fileBusiType.value = e -} -// 上传文件 -const uploadFile = (number, filePath) => { - let data = { - number, - filePathList: filePath, - funcCode: funcCode.value, - fileBusiType: fileBusiType.value ? fileBusiType.value : '' - } - uploadApi.uploadImage(data).then((res) => { - console.log(res) - }) -} + + /** 初始化 **/ onMounted(async () => { getList() From ac3354e1e78d1720c4503ae3a25d3f791602a388 Mon Sep 17 00:00:00 2001 From: zhang_li <2235006734@qqq.com> Date: Mon, 5 Feb 2024 17:03:47 +0800 Subject: [PATCH 2/7] =?UTF-8?q?=E8=AE=BE=E5=A4=87=E5=8F=B0=E8=B4=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/eam/device/deviceAccounts/index.vue | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/views/eam/device/deviceAccounts/index.vue b/src/views/eam/device/deviceAccounts/index.vue index d2d8019..8921fc5 100644 --- a/src/views/eam/device/deviceAccounts/index.vue +++ b/src/views/eam/device/deviceAccounts/index.vue @@ -312,9 +312,8 @@ const changeTabs = (item) => { // apiPage.value = deviceRepairApi.getDeviceRepairPage // detailAllSchemas.value = DeviceRepair.allSchemas } else if (item.prop == 'DeviceReportRecord') { - console.log(item.prop) tabsExtend.value = 3 - apiPage.value = deviceRepairApi.getDeviceRepairPage + apiPage.value = deviceRepairApi.getDeviceRepairPage detailAllSchemas.value = DeviceRepair.allSchemas } else if (item.prop == 'RepairRecord') { tabsExtend.value = 3 From 2475b5ace1bc68217124352bae83d3eafab13cac Mon Sep 17 00:00:00 2001 From: yejiaxing <591141169@qq.com> Date: Mon, 5 Feb 2024 17:07:44 +0800 Subject: [PATCH 3/7] =?UTF-8?q?BUG=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/eam/item/itemApplyMain/index.ts | 8 +- src/utils/disposition/defaultButtons.ts | 13 +++ .../applicationRecordMain.data.ts | 98 +++++++++++++++---- .../eam/item/applicationRecord/index.vue | 9 +- src/views/eam/item/itemApplyMain/index.vue | 28 +++++- .../item/itemApplyMain/itemApplyMain.data.ts | 80 ++++++++++++++- 6 files changed, 203 insertions(+), 33 deletions(-) diff --git a/src/api/eam/item/itemApplyMain/index.ts b/src/api/eam/item/itemApplyMain/index.ts index fd0e19e..af82f15 100644 --- a/src/api/eam/item/itemApplyMain/index.ts +++ b/src/api/eam/item/itemApplyMain/index.ts @@ -46,6 +46,12 @@ export const deleteItemApplyMain = async (id: number) => { return await request.delete({ url: `/eam/item-apply-main/delete?id=` + id }) } +// 撤销备件申领记录主 +export const backoutItemApplyMain = async (id: number) => { + return await request.get({ url: `/eam/item-apply-main/backout?id=` + id }) +} + + // 导出备件申领记录主 Excel export const exportItemApplyMain = async (params) => { return await request.download({ url: `/eam/item-apply-main/export-excel`, params }) @@ -54,4 +60,4 @@ export const exportItemApplyMain = async (params) => { // 下载用户导入模板 export const importTemplate = () => { return request.download({ url: '/eam/item-apply-main/get-import-template' }) -} \ No newline at end of file +} diff --git a/src/utils/disposition/defaultButtons.ts b/src/utils/disposition/defaultButtons.ts index d387ee0..e8fc2d0 100644 --- a/src/utils/disposition/defaultButtons.ts +++ b/src/utils/disposition/defaultButtons.ts @@ -801,6 +801,19 @@ export function backoutBtn(option:any) { }) } +// 主列表-撤销 +export function approveBtn(option:any) { + return __defaultBtnOption(option,{ + label: '审批', + name: 'approve', + hide: false, + type: 'danger', + color: '', + link: true, // 文本展现按钮 + hasPermi: '' + }) +} + // 主列表-接单 export function acceptOrderBtn(option:any) { return __defaultBtnOption(option,{ diff --git a/src/views/eam/item/applicationRecord/applicationRecordMain.data.ts b/src/views/eam/item/applicationRecord/applicationRecordMain.data.ts index 77ded41..c83aa89 100644 --- a/src/views/eam/item/applicationRecord/applicationRecordMain.data.ts +++ b/src/views/eam/item/applicationRecord/applicationRecordMain.data.ts @@ -1,7 +1,8 @@ import type { CrudSchema } from '@/hooks/web/useCrudSchemas' import { dateFormatter } from '@/utils/formatTime' -import { Item } from '@/views/eam/basic/item/item.data' -import * as ItemApi from '@/api/eam/basic/item' +import { ItemAccounts } from '@/views/eam/item/itemAccounts/itemAccounts.data' +import * as ItemAccountsApi from '@/api/eam/item/itemAccounts' +import * as DeviceMoldItemsApi from '@/api/eam/basic/deviceMaintenance' import { validateHanset, validateEmail } from '@/utils/validator' const { t } = useI18n() // 国际化 @@ -47,28 +48,19 @@ export const ApplicationRecordMain = useCrudSchemas(reactive([ sort: 'custom', }, { - label: '是否可用', - field: 'available', - dictType: DICT_TYPE.TRUE_FALSE, + label: '状态', + field: 'status', + sort: 'custom', + dictType: DICT_TYPE.ITEM_APPLY_STATUS, dictClass: 'string', - isSearch: false, + isSearch: true, isTable: true, - sort: 'custom', table: { width: 150 }, tableForm: { type: 'Select', - inactiveValue: 'FALSE', disabled: true - }, - form: { - component: 'Switch', - value: 'TRUE', - componentProps: { - inactiveValue: 'FALSE', - activeValue: 'TRUE' - } } }, { @@ -96,6 +88,30 @@ export const ApplicationRecordMainRules = reactive({ ], }) +export const DeviceMOLD = useCrudSchemas(reactive([ + { + label: '编号', + field: 'number', + sort: 'custom', + isForm: false, + table: { + width: 180, + fixed: 'left' + }, + }, + { + label: '名称', + field: 'name', + sort: 'custom', + }, + { + label: '规格型号', + field: 'specification', + sort: 'custom', + }, + +])) + /** * @returns {Array} 备件申请子表 */ @@ -110,8 +126,8 @@ export const ApplicationRecordDetail = useCrudSchemas(reactive([ searchListPlaceholder: '请选择备件编号', searchField: 'number', searchTitle: '库区信息', - searchAllSchemas: Item.allSchemas, // 查询弹窗所需类 - searchPage: ItemApi.getItemPage, // 查询弹窗所需分页方法 + searchAllSchemas: ItemAccounts.allSchemas, // 查询弹窗所需类 + searchPage: ItemAccountsApi.getItemAccountsPage, // 查询弹窗所需分页方法 searchCondition: [{ key: 'available', value: 'TRUE', @@ -121,7 +137,49 @@ export const ApplicationRecordDetail = useCrudSchemas(reactive([ }, }, { - label: '数量', + label: '类型', + field: 'type', + sort: 'custom', + dictType: DICT_TYPE.DEVICE_MOLD_TYPE, + dictClass: 'string', + isSearch: true, + isTable: true, + table: { + width: 150 + }, + tableForm: { + type: 'Select', + disabled: false + } + }, + + + { + label: '设备/模具编号', + field: 'deviceNumber', + sort: 'custom', + isSearch: true, + tableForm: { + isInpuFocusShow: true, + searchListPlaceholder: '请选择单号', + searchField: 'number', + searchTitle: '单号信息', + searchAllSchemas: DeviceMOLD.allSchemas, // 查询弹窗所需类 + searchPage: DeviceMoldItemsApi.getNumber, // 查询弹窗所需分页方法 + searchCondition: [{ + key: 'available', + value: "TRUE", + isMainValue: false + }, { + key: 'type', + value: "type", + isMainValue: true + } + ] + }, + }, + { + label: '申领数量', field: 'qty', sort: 'custom', table: { @@ -160,6 +218,8 @@ export const ApplicationRecordDetail = useCrudSchemas(reactive([ precision: 6 } }, + + { label: '是否可用', field: 'available', diff --git a/src/views/eam/item/applicationRecord/index.vue b/src/views/eam/item/applicationRecord/index.vue index 10eede7..c67f0d5 100644 --- a/src/views/eam/item/applicationRecord/index.vue +++ b/src/views/eam/item/applicationRecord/index.vue @@ -163,8 +163,9 @@ // 列表-操作按钮 const butttondata = (row) => { return [ - defaultButtons.mainListEditBtn(null), // 编辑 - defaultButtons.mainListDeleteBtn(null), // 删除 + defaultButtons.approveBtn({ hide: isShowMainButton(row, ['0']) }), // 撤回 + // defaultButtons.mainListEditBtn(null), // 编辑 + // defaultButtons.mainListDeleteBtn(null), // 删除 ] } @@ -172,6 +173,8 @@ const buttonTableClick = async (val, row) => { if (val == 'edit') { // 编辑 openForm('update', row) + }else if (val == 'approve') { // 删除 + // handleDelete(row.id) } else if (val == 'delete') { // 删除 handleDelete(row.id) } @@ -287,4 +290,4 @@ getList() importTemplateData.templateUrl = await ApplicationRecordMainApi.importTemplate() }) - \ No newline at end of file + diff --git a/src/views/eam/item/itemApplyMain/index.vue b/src/views/eam/item/itemApplyMain/index.vue index 2d9cc59..bb1ec5c 100644 --- a/src/views/eam/item/itemApplyMain/index.vue +++ b/src/views/eam/item/itemApplyMain/index.vue @@ -75,8 +75,9 @@ if (type == 'tableForm') { // 明细查询页赋值 row[formField] = val[0][searchField] - row['itemNumber'] = val[0]['number'] + row['itemNumber'] = val[0]['itemNumber'] row['isRadeIn'] = val[0]['isRadeIn'] + row['currentQty'] = val[0]['qty'] row['available'] = val[0]['available'] } else { const setV = {} @@ -158,9 +159,9 @@ // 列表-操作按钮 const butttondata = (row) => { return [ - defaultButtons.mainListOrderCloBtn({ hide: isShowMainButton(row, ['0']) }), // 关闭 - defaultButtons.mainListEditBtn(null), // 编辑 - defaultButtons.mainListDeleteBtn(null), // 删除 + defaultButtons.backoutBtn({ hide: isShowMainButton(row, ['0']) }), // 撤回 + // defaultButtons.mainListEditBtn(null), // 编辑 + // defaultButtons.mainListDeleteBtn(null), // 删除 ] } @@ -168,11 +169,28 @@ const buttonTableClick = async (val, row) => { if (val == 'edit') { // 编辑 openForm('update', row) - } else if (val == 'delete') { // 删除 + } + else if (val == 'backout') { // 提交审批 + backout(row.id) + } + else if (val == 'delete') { // 删除 handleDelete(row.id) } } + /** 撤销按钮操作 */ + const backout = async (id : number) => { + try { + // 撤销的二次确认 + await message.confirm('是否撤销所选中数据?') + // 发起撤销 + await ItemApplyMainApi.backoutItemApplyMain(id) + message.success(t('撤销成功!')) + // 刷新列表 + await getList() + } catch { } + } + /** 添加/修改操作 */ const formRef = ref() const openForm = async (type : string, row ?: number) => { diff --git a/src/views/eam/item/itemApplyMain/itemApplyMain.data.ts b/src/views/eam/item/itemApplyMain/itemApplyMain.data.ts index d2036bf..7e290e1 100644 --- a/src/views/eam/item/itemApplyMain/itemApplyMain.data.ts +++ b/src/views/eam/item/itemApplyMain/itemApplyMain.data.ts @@ -1,7 +1,8 @@ import type { CrudSchema } from '@/hooks/web/useCrudSchemas' import { dateFormatter } from '@/utils/formatTime' -import { Item } from '@/views/eam/basic/item/item.data' -import * as ItemApi from '@/api/eam/basic/item' +import { ItemAccounts } from '@/views/eam/item/itemAccounts/itemAccounts.data' +import * as ItemAccountsApi from '@/api/eam/item/itemAccounts' +import * as DeviceMoldItemsApi from '@/api/eam/basic/deviceMaintenance' import { validateHanset, validateEmail } from '@/utils/validator' const { t } = useI18n() // 国际化 @@ -87,6 +88,31 @@ export const ItemApplyMainRules = reactive({ ], }) + +export const DeviceMOLD = useCrudSchemas(reactive([ + { + label: '编号', + field: 'number', + sort: 'custom', + isForm: false, + table: { + width: 180, + fixed: 'left' + }, + }, + { + label: '名称', + field: 'name', + sort: 'custom', + }, + { + label: '规格型号', + field: 'specification', + sort: 'custom', + }, + +])) + /** * @returns {Array} 备件申请子表 */ @@ -101,8 +127,8 @@ export const ItemApplyDetail = useCrudSchemas(reactive([ searchListPlaceholder: '请选择备件编号', searchField: 'number', searchTitle: '库区信息', - searchAllSchemas: Item.allSchemas, // 查询弹窗所需类 - searchPage: ItemApi.getItemPage, // 查询弹窗所需分页方法 + searchAllSchemas: ItemAccounts.allSchemas, // 查询弹窗所需类 + searchPage: ItemAccountsApi.getItemAccountsPage, // 查询弹窗所需分页方法 searchCondition: [{ key: 'available', value: 'TRUE', @@ -112,7 +138,49 @@ export const ItemApplyDetail = useCrudSchemas(reactive([ }, }, { - label: '数量', + label: '类型', + field: 'type', + sort: 'custom', + dictType: DICT_TYPE.DEVICE_MOLD_TYPE, + dictClass: 'string', + isSearch: true, + isTable: true, + table: { + width: 150 + }, + tableForm: { + type: 'Select', + disabled: false + } + }, + + + { + label: '设备/模具编号', + field: 'deviceNumber', + sort: 'custom', + isSearch: true, + tableForm: { + isInpuFocusShow: true, + searchListPlaceholder: '请选择单号', + searchField: 'number', + searchTitle: '单号信息', + searchAllSchemas: DeviceMOLD.allSchemas, // 查询弹窗所需类 + searchPage: DeviceMoldItemsApi.getNumber, // 查询弹窗所需分页方法 + searchCondition: [{ + key: 'available', + value: "TRUE", + isMainValue: false + }, { + key: 'type', + value: "type", + isMainValue: true + } + ] + }, + }, + { + label: '申领数量', field: 'qty', sort: 'custom', table: { @@ -151,6 +219,8 @@ export const ItemApplyDetail = useCrudSchemas(reactive([ precision: 6 } }, + + { label: '是否可用', field: 'available', From 1063ca66c35aae563982acec842627c5797bb352 Mon Sep 17 00:00:00 2001 From: liuchen <23082234@qq.com> Date: Tue, 6 Feb 2024 08:58:03 +0800 Subject: [PATCH 4/7] =?UTF-8?q?=E5=A2=9E=E5=8A=A0dockerfile?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.production | 6 ++--- .env.test | 10 ++++---- Dockerfile | 7 ++++++ nginx.conf | 61 +++++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 76 insertions(+), 8 deletions(-) create mode 100644 Dockerfile create mode 100644 nginx.conf diff --git a/.env.production b/.env.production index e439126..3baf54e 100644 --- a/.env.production +++ b/.env.production @@ -28,10 +28,10 @@ VITE_SOURCEMAP=false VITE_BASE_PATH=/ # 输出路径 -VITE_OUT_DIR=dist-test +VITE_OUT_DIR=eam # 自定义接口路径 -VITE_INTERFACE_URL='http://dev.ccwin-in.com:25110/magic/web/index.html' +VITE_INTERFACE_URL='http://10.62.193.15:25110/magic/web/index.html' # 积木报表请求路径 -VITE_JMREPORT_BASE_URL='http://dev.ccwin-in.com:25110' +VITE_JMREPORT_BASE_URL='http://10.62.193.15:25110' diff --git a/.env.test b/.env.test index 84edcdf..f8d316c 100644 --- a/.env.test +++ b/.env.test @@ -4,10 +4,10 @@ NODE_ENV=test VITE_DEV=false # 请求路径 -VITE_BASE_URL='http://dev.ccwin-in.com:25100/api' +VITE_BASE_URL='http://dev.ccwin-in.com:25200/api' # 上传路径 -VITE_UPLOAD_URL='http://dev.ccwin-in.com:25100/api/admin-api/infra/file/upload' +VITE_UPLOAD_URL='http://dev.ccwin-in.com:25200/api/admin-api/infra/file/upload' # 接口前缀 VITE_API_BASEPATH= @@ -28,10 +28,10 @@ VITE_SOURCEMAP=false VITE_BASE_PATH=/ # 输出路径 -VITE_OUT_DIR=dist-test +VITE_OUT_DIR=eam # 自定义接口路径 -VITE_INTERFACE_URL='http://dev.ccwin-in.com:25110/magic/web/index.html' +VITE_INTERFACE_URL='http://dev.ccwin-in.com:25210/magic/web/index.html' # 积木报表请求路径 -VITE_JMREPORT_BASE_URL='http://dev.ccwin-in.com:25110' +VITE_JMREPORT_BASE_URL='http://dev.ccwin-in.com:25210' diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..ed98c22 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,7 @@ +# 设置基础镜像 +FROM nginx:WIN-1.25.3 + +WORKDIR /opt/eam +COPY nginx.conf /usr/local/nginx/conf/nginx.conf +# 将dist文件中的内容复制到 /opt/eam 这个目录下面 +COPY eam/ /opt/eam diff --git a/nginx.conf b/nginx.conf new file mode 100644 index 0000000..1e179e1 --- /dev/null +++ b/nginx.conf @@ -0,0 +1,61 @@ +user root; +worker_processes 2; + +events { + worker_connections 1024; +} + +http { + include mime.types; + charset utf-8,gbk; + default_type application/octet-stream; + log_format main '$remote_addr - $remote_user [$time_local] "$request" ' + '$status $body_bytes_sent "$http_referer" ' + '"$http_user_agent" "$http_x_forwarded_for" "$request_time $upstream_response_time"'; + + proxy_cache_path /opt/nginx_cache/ levels=1:2 keys_zone=my_zone:10m inactive=300s max_size=5g; + access_log logs/access.log main; + sendfile on; + #tcp_nopush on; + keepalive_timeout 600s; + client_max_body_size 200m; + gzip on; + gzip_min_length 10k; + gzip_comp_level 9; + gzip_buffers 4 16k; + gzip_types text/plain application/javascript text/css application/xml text/javascript image/jpeg image/gif image/png; + gzip_vary on; + gzip_disable "MSIE [1-6]\."; + upstream eam { + server localhost:25210 weight=10 max_fails=3 fail_timeout=10s; + } + server { + listen 25200; + server_name_in_redirect off; + server_name dev.ccwin-in.com; + location /api/ { + proxy_pass http://eam/; + proxy_next_upstream http_500 http_502 http_503 http_504 error timeout invalid_header; + proxy_set_header X-Forwared-For $proxy_add_x_forwarded_for; + proxy_set_header Host $http_host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $http_x_forwarded_for; + } + location /profile/ { + proxy_cache my_zone; + proxy_cache_valid 200 304 12h; + proxy_cache_key $host$uri$is_args$args; + alias /opt/profile/; + index index.html index.htm; + } + location / { + proxy_cache my_zone; + proxy_cache_valid 200 304 12h; + proxy_cache_key $host$uri$is_args$args; + try_files $uri $uri/ /index.html; + root /opt/eam; + index index.html index.htm; + } + } +} + From 8c8b15453e35af68e14b1a9f2bfe29a6e0ea1cee Mon Sep 17 00:00:00 2001 From: zhang_li <2235006734@qqq.com> Date: Tue, 6 Feb 2024 11:24:12 +0800 Subject: [PATCH 5/7] =?UTF-8?q?=E7=BB=B4=E4=BF=AE=E5=B7=A5=E5=8D=95bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/eam/device/deviceMaintenanceMain/index.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/views/eam/device/deviceMaintenanceMain/index.vue b/src/views/eam/device/deviceMaintenanceMain/index.vue index 5905a94..d0c0164 100644 --- a/src/views/eam/device/deviceMaintenanceMain/index.vue +++ b/src/views/eam/device/deviceMaintenanceMain/index.vue @@ -128,7 +128,7 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row) => nextTick(() => { if (type == 'tableForm') { // 明细查询页赋值 - if (formField == 'itemNumbers') { + if (formField == 'itemNumbers1') { let str = '' val.forEach((element) => { str += element.name + ':' + element.qty + ',' From 8ac8b71e7dca2fedfcd81cd50d24ec3cbbab1b26 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E8=96=AA=E5=90=8D?= <942005050@qq.com> Date: Tue, 6 Feb 2024 11:25:03 +0800 Subject: [PATCH 6/7] =?UTF-8?q?=E5=A4=A7=E5=B0=8F=E5=86=99=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/router/modules/remaining.ts | 18 +- src/views/Home/Index copy.vue | 381 --------------- src/views/Home/Index.vue | 14 - src/views/Home/Index2.vue | 319 ------------ src/views/Home/components/material.vue | 336 ------------- src/views/Home/components/produce.vue | 286 ----------- src/views/Home/components/product.vue | 313 ------------ src/views/Home/components/supplierIndex.vue | 452 ------------------ src/views/Home/echarts-data.ts | 286 ----------- src/views/Home/types.ts | 55 --- src/views/Login/Login.vue | 104 ---- src/views/Login/components/LoginForm.vue | 278 ----------- src/views/Login/components/LoginFormTitle.vue | 26 - src/views/Login/components/MobileForm.vue | 225 --------- src/views/Login/components/QrCodeForm.vue | 30 -- src/views/Login/components/RegisterForm.vue | 142 ------ src/views/Login/components/SSOLogin.vue | 199 -------- src/views/Login/components/index.ts | 8 - src/views/Login/components/useLogin.ts | 42 -- src/views/Profile/Index.vue | 64 --- src/views/Profile/components/BasicInfo.vue | 92 ---- src/views/Profile/components/ProfileUser.vue | 99 ---- src/views/Profile/components/ResetPwd.vue | 73 --- src/views/Profile/components/UserAvatar.vue | 39 -- src/views/Profile/components/UserSocial.vue | 94 ---- src/views/Profile/components/index.ts | 7 - src/views/Redirect/Redirect.vue | 28 -- src/views/error/403.vue | 8 - src/views/error/404.vue | 7 - src/views/error/500.vue | 7 - .../infra/apiAccessLog/ApiAccessLogDetail.vue | 67 --- src/views/infra/apiAccessLog/index.vue | 167 ------- .../infra/apiErrorLog/ApiErrorLogDetail.vue | 81 ---- src/views/infra/apiErrorLog/index.vue | 249 ---------- src/views/infra/build/index.vue | 143 ------ src/views/infra/codegen/PreviewCode.vue | 222 --------- .../codegen/components/BasicInfoForm.vue | 87 ---- .../codegen/components/ColumInfoForm.vue | 153 ------ .../codegen/components/GenerateInfoForm.vue | 391 --------------- src/views/infra/codegen/components/index.ts | 4 - src/views/infra/codegen/editTable.vue | 83 ---- src/views/infra/codegen/importTable.vue | 151 ------ src/views/infra/codegen/index.vue | 258 ---------- src/views/infra/config/ConfigForm.vue | 131 ----- src/views/infra/config/index.vue | 169 ------- src/views/infra/customInterface/index.vue | 21 - .../dataSourceConfig/DataSourceConfigForm.vue | 111 ----- src/views/infra/dataSourceConfig/index.vue | 87 ---- src/views/infra/dbDoc/index.vue | 57 --- src/views/infra/druid/index.vue | 25 - src/views/infra/file/FileForm.vue | 104 ---- src/views/infra/file/index.vue | 164 ------- src/views/infra/fileConfig/FileConfigForm.vue | 195 -------- src/views/infra/fileConfig/index.vue | 168 ------- src/views/infra/job/JobDetail.vue | 73 --- src/views/infra/job/JobForm.vue | 131 ----- src/views/infra/job/index.vue | 255 ---------- src/views/infra/job/logger/JobLogDetail.vue | 59 --- src/views/infra/job/logger/index.vue | 196 -------- src/views/infra/redis/index.vue | 266 ----------- src/views/infra/server/index.vue | 28 -- src/views/infra/skywalking/index.vue | 25 - src/views/infra/swagger/index.vue | 26 - src/views/infra/testDemo/index.vue | 4 - src/views/infra/webSocket/index.vue | 118 ----- 65 files changed, 9 insertions(+), 8492 deletions(-) delete mode 100644 src/views/Home/Index copy.vue delete mode 100644 src/views/Home/Index.vue delete mode 100644 src/views/Home/Index2.vue delete mode 100644 src/views/Home/components/material.vue delete mode 100644 src/views/Home/components/produce.vue delete mode 100644 src/views/Home/components/product.vue delete mode 100644 src/views/Home/components/supplierIndex.vue delete mode 100644 src/views/Home/echarts-data.ts delete mode 100644 src/views/Home/types.ts delete mode 100644 src/views/Login/Login.vue delete mode 100644 src/views/Login/components/LoginForm.vue delete mode 100644 src/views/Login/components/LoginFormTitle.vue delete mode 100644 src/views/Login/components/MobileForm.vue delete mode 100644 src/views/Login/components/QrCodeForm.vue delete mode 100644 src/views/Login/components/RegisterForm.vue delete mode 100644 src/views/Login/components/SSOLogin.vue delete mode 100644 src/views/Login/components/index.ts delete mode 100644 src/views/Login/components/useLogin.ts delete mode 100644 src/views/Profile/Index.vue delete mode 100644 src/views/Profile/components/BasicInfo.vue delete mode 100644 src/views/Profile/components/ProfileUser.vue delete mode 100644 src/views/Profile/components/ResetPwd.vue delete mode 100644 src/views/Profile/components/UserAvatar.vue delete mode 100644 src/views/Profile/components/UserSocial.vue delete mode 100644 src/views/Profile/components/index.ts delete mode 100644 src/views/Redirect/Redirect.vue delete mode 100644 src/views/error/403.vue delete mode 100644 src/views/error/404.vue delete mode 100644 src/views/error/500.vue delete mode 100644 src/views/infra/apiAccessLog/ApiAccessLogDetail.vue delete mode 100644 src/views/infra/apiAccessLog/index.vue delete mode 100644 src/views/infra/apiErrorLog/ApiErrorLogDetail.vue delete mode 100644 src/views/infra/apiErrorLog/index.vue delete mode 100644 src/views/infra/build/index.vue delete mode 100644 src/views/infra/codegen/PreviewCode.vue delete mode 100644 src/views/infra/codegen/components/BasicInfoForm.vue delete mode 100644 src/views/infra/codegen/components/ColumInfoForm.vue delete mode 100644 src/views/infra/codegen/components/GenerateInfoForm.vue delete mode 100644 src/views/infra/codegen/components/index.ts delete mode 100644 src/views/infra/codegen/editTable.vue delete mode 100644 src/views/infra/codegen/importTable.vue delete mode 100644 src/views/infra/codegen/index.vue delete mode 100644 src/views/infra/config/ConfigForm.vue delete mode 100644 src/views/infra/config/index.vue delete mode 100644 src/views/infra/customInterface/index.vue delete mode 100644 src/views/infra/dataSourceConfig/DataSourceConfigForm.vue delete mode 100644 src/views/infra/dataSourceConfig/index.vue delete mode 100644 src/views/infra/dbDoc/index.vue delete mode 100644 src/views/infra/druid/index.vue delete mode 100644 src/views/infra/file/FileForm.vue delete mode 100644 src/views/infra/file/index.vue delete mode 100644 src/views/infra/fileConfig/FileConfigForm.vue delete mode 100644 src/views/infra/fileConfig/index.vue delete mode 100644 src/views/infra/job/JobDetail.vue delete mode 100644 src/views/infra/job/JobForm.vue delete mode 100644 src/views/infra/job/index.vue delete mode 100644 src/views/infra/job/logger/JobLogDetail.vue delete mode 100644 src/views/infra/job/logger/index.vue delete mode 100644 src/views/infra/redis/index.vue delete mode 100644 src/views/infra/server/index.vue delete mode 100644 src/views/infra/skywalking/index.vue delete mode 100644 src/views/infra/swagger/index.vue delete mode 100644 src/views/infra/testDemo/index.vue delete mode 100644 src/views/infra/webSocket/index.vue diff --git a/src/router/modules/remaining.ts b/src/router/modules/remaining.ts index 2bdf987..54d3980 100644 --- a/src/router/modules/remaining.ts +++ b/src/router/modules/remaining.ts @@ -41,7 +41,7 @@ const remainingRouter: AppRouteRecordRaw[] = [ { path: '/redirect/:path(.*)', name: 'Redirect', - component: () => import('@/views/Redirect/Redirect.vue'), + component: () => import('@/views/redirect/redirect.vue'), meta: {} } ], @@ -59,7 +59,7 @@ const remainingRouter: AppRouteRecordRaw[] = [ children: [ { path: 'index', - component: () => import('@/views/Home/Index.vue'), + component: () => import('@/views/home/index.vue'), name: 'Index', meta: { title: t('router.home'), @@ -80,7 +80,7 @@ const remainingRouter: AppRouteRecordRaw[] = [ children: [ { path: 'profile', - component: () => import('@/views/Profile/Index.vue'), + component: () => import('@/views/profile/index.vue'), name: 'Profile', meta: { canTo: true, @@ -139,7 +139,7 @@ const remainingRouter: AppRouteRecordRaw[] = [ children: [ { path: 'edit', - component: () => import('@/views/infra/codegen/EditTable.vue'), + component: () => import('@/views/infra/codegen/editTable.vue'), name: 'InfraCodegenEditTable', meta: { noCache: true, @@ -177,7 +177,7 @@ const remainingRouter: AppRouteRecordRaw[] = [ }, { path: '/login', - component: () => import('@/views/Login/Login.vue'), + component: () => import('@/views/login/login.vue'), name: 'Login', meta: { hidden: true, @@ -187,7 +187,7 @@ const remainingRouter: AppRouteRecordRaw[] = [ }, { path: '/sso', - component: () => import('@/views/Login/Login.vue'), + component: () => import('@/views/login/login.vue'), name: 'SSOLogin', meta: { hidden: true, @@ -197,7 +197,7 @@ const remainingRouter: AppRouteRecordRaw[] = [ }, { path: '/403', - component: () => import('@/views/Error/403.vue'), + component: () => import('@/views/error/403.vue'), name: 'NoAccess', meta: { hidden: true, @@ -207,7 +207,7 @@ const remainingRouter: AppRouteRecordRaw[] = [ }, { path: '/404', - component: () => import('@/views/Error/404.vue'), + component: () => import('@/views/error/404.vue'), name: 'NoFound', meta: { hidden: true, @@ -217,7 +217,7 @@ const remainingRouter: AppRouteRecordRaw[] = [ }, { path: '/500', - component: () => import('@/views/Error/500.vue'), + component: () => import('@/views/error/500.vue'), name: 'Error', meta: { hidden: true, diff --git a/src/views/Home/Index copy.vue b/src/views/Home/Index copy.vue deleted file mode 100644 index 121ec6a..0000000 --- a/src/views/Home/Index copy.vue +++ /dev/null @@ -1,381 +0,0 @@ - - diff --git a/src/views/Home/Index.vue b/src/views/Home/Index.vue deleted file mode 100644 index 1cc81ac..0000000 --- a/src/views/Home/Index.vue +++ /dev/null @@ -1,14 +0,0 @@ - - diff --git a/src/views/Home/Index2.vue b/src/views/Home/Index2.vue deleted file mode 100644 index c9429ab..0000000 --- a/src/views/Home/Index2.vue +++ /dev/null @@ -1,319 +0,0 @@ - - - - diff --git a/src/views/Home/components/material.vue b/src/views/Home/components/material.vue deleted file mode 100644 index 83aadaa..0000000 --- a/src/views/Home/components/material.vue +++ /dev/null @@ -1,336 +0,0 @@ - - - - diff --git a/src/views/Home/components/produce.vue b/src/views/Home/components/produce.vue deleted file mode 100644 index c289ec0..0000000 --- a/src/views/Home/components/produce.vue +++ /dev/null @@ -1,286 +0,0 @@ - - - - diff --git a/src/views/Home/components/product.vue b/src/views/Home/components/product.vue deleted file mode 100644 index 5124d9c..0000000 --- a/src/views/Home/components/product.vue +++ /dev/null @@ -1,313 +0,0 @@ - - - - diff --git a/src/views/Home/components/supplierIndex.vue b/src/views/Home/components/supplierIndex.vue deleted file mode 100644 index 7610f97..0000000 --- a/src/views/Home/components/supplierIndex.vue +++ /dev/null @@ -1,452 +0,0 @@ - - - - diff --git a/src/views/Home/echarts-data.ts b/src/views/Home/echarts-data.ts deleted file mode 100644 index 15c7b4a..0000000 --- a/src/views/Home/echarts-data.ts +++ /dev/null @@ -1,286 +0,0 @@ -import { EChartsOption } from 'echarts' - -const { t } = useI18n() - -export const lineOptions: EChartsOption = { - - xAxis: { - data: [ 1, 2, 3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30 - ], - boundaryGap: false, - axisTick: { - show: false - } - }, - grid: { - left: 20, - right: 20, - bottom: 20, - top: 50, - containLabel: true - }, - tooltip: { - trigger: 'axis', - axisPointer: { - type: 'cross' - }, - padding: [5, 10] - }, - yAxis: { - axisTick: { - show: false - } - }, - legend: { - data: ['销售','哈哈'], - top: 20 - }, - series: [ - { - name: '销售', - smooth: true, - type: 'line', - data: [100, 120, 161, 134, 105, 160, 165, 114, 163, 185, 118, 123], - animationDuration: 2800, - animationEasing: 'cubicInOut' - }, - { - name: '哈哈', - smooth: true, - type: 'line', - itemStyle: {}, - data: [120, 82, 91, 154, 162, 140, 145, 250, 134, 56, 99, 123], - animationDuration: 2800, - animationEasing: 'quadraticOut' - } - ] -} - -export const pieOptions: EChartsOption = { - // title: { - // text: t('analysis.userAccessSource'), - // left: 'center' - // }, - tooltip: { - trigger: 'item', - formatter: '{a}
{b} : {c} ({d}%)' - }, - legend: { - orient: 'vertical', - left: 'left', - top:20, - data: [ - t('analysis.directAccess'), - t('analysis.mailMarketing'), - t('analysis.allianceAdvertising'), - t('analysis.videoAdvertising'), - t('analysis.searchEngines') - ] - }, - series: [ - { - name: t('analysis.userAccessSource'), - type: 'pie', - radius: '55%', - center: ['50%', '60%'], - data: [ - { value: 335, name: t('analysis.directAccess') }, - { value: 310, name: t('analysis.mailMarketing') }, - { value: 234, name: t('analysis.allianceAdvertising') }, - { value: 135, name: t('analysis.videoAdvertising') }, - { value: 1548, name: t('analysis.searchEngines') } - ] - } - ] -} - -export const barOptions: EChartsOption = { - title: { - text: '', - left: 'center' - }, - tooltip: { - trigger: 'axis', - axisPointer: { - type: 'shadow' - } - }, - grid: { - left: 50, - right: 20, - bottom: 20 - }, - xAxis: { - type: 'category', - data: [], - axisTick: { - alignWithLabel: true - } - }, - yAxis: { - type: 'value' - }, - series: [ - { - name: t('analysis.activeQuantity'), - data: [], - type: 'bar' - } - ] -} - -export const radarOption: EChartsOption = { - legend: { - data: [t('workplace.personal'), t('workplace.team')] - }, - radar: { - // shape: 'circle', - indicator: [ - { name: t('workplace.quote'), max: 65 }, - { name: t('workplace.contribution'), max: 160 }, - { name: t('workplace.hot'), max: 300 }, - { name: t('workplace.yield'), max: 130 }, - { name: t('workplace.follow'), max: 100 } - ] - }, - series: [ - { - name: `xxx${t('workplace.index')}`, - type: 'radar', - data: [ - { - value: [42, 30, 20, 35, 80], - name: t('workplace.personal') - }, - { - value: [50, 140, 290, 100, 90], - name: t('workplace.team') - } - ] - } - ] -} - -export const wordOptions = { - series: [ - { - type: 'wordCloud', - gridSize: 2, - sizeRange: [12, 50], - rotationRange: [-90, 90], - shape: 'pentagon', - width: 600, - height: 400, - drawOutOfBound: true, - textStyle: { - color: function () { - return ( - 'rgb(' + - [ - Math.round(Math.random() * 160), - Math.round(Math.random() * 160), - Math.round(Math.random() * 160) - ].join(',') + - ')' - ) - } - }, - emphasis: { - textStyle: { - shadowBlur: 10, - shadowColor: '#333' - } - }, - data: [ - { - name: 'Sam S Club', - value: 10000, - textStyle: { - color: 'black' - }, - emphasis: { - textStyle: { - color: 'red' - } - } - }, - { - name: 'Macys', - value: 6181 - }, - { - name: 'Amy Schumer', - value: 4386 - }, - { - name: 'Jurassic World', - value: 4055 - }, - { - name: 'Charter Communications', - value: 2467 - }, - { - name: 'Chick Fil A', - value: 2244 - }, - { - name: 'Planet Fitness', - value: 1898 - }, - { - name: 'Pitch Perfect', - value: 1484 - }, - { - name: 'Express', - value: 1112 - }, - { - name: 'Home', - value: 965 - }, - { - name: 'Johnny Depp', - value: 847 - }, - { - name: 'Lena Dunham', - value: 582 - }, - { - name: 'Lewis Hamilton', - value: 555 - }, - { - name: 'KXAN', - value: 550 - }, - { - name: 'Mary Ellen Mark', - value: 462 - }, - { - name: 'Farrah Abraham', - value: 366 - }, - { - name: 'Rita Ora', - value: 360 - }, - { - name: 'Serena Williams', - value: 282 - }, - { - name: 'NCAA baseball tournament', - value: 273 - }, - { - name: 'Point Break', - value: 265 - } - ] - } - ] -} diff --git a/src/views/Home/types.ts b/src/views/Home/types.ts deleted file mode 100644 index e6313d3..0000000 --- a/src/views/Home/types.ts +++ /dev/null @@ -1,55 +0,0 @@ -export type WorkplaceTotal = { - project: number - access: number - todo: number -} - -export type Project = { - name: string - icon: string - message: string - personal: string - time: Date | number | string -} - -export type Notice = { - title: string - type: string - keys: string[] - date: Date | number | string -} - -export type Shortcut = { - name: string - icon: string - url: string -} - -export type RadarData = { - personal: number - team: number - max: number - name: string -} -export type AnalysisTotalTypes = { - users: number - messages: number - moneys: number - shoppings: number -} - -export type UserAccessSource = { - value: number - name: string -} - -export type WeeklyUserActivity = { - value: number - name: string -} - -export type MonthlySales = { - name: string - estimate: number - actual: number -} diff --git a/src/views/Login/Login.vue b/src/views/Login/Login.vue deleted file mode 100644 index a0025ab..0000000 --- a/src/views/Login/Login.vue +++ /dev/null @@ -1,104 +0,0 @@ - - - - diff --git a/src/views/Login/components/LoginForm.vue b/src/views/Login/components/LoginForm.vue deleted file mode 100644 index 9499f49..0000000 --- a/src/views/Login/components/LoginForm.vue +++ /dev/null @@ -1,278 +0,0 @@ - - - - diff --git a/src/views/Login/components/LoginFormTitle.vue b/src/views/Login/components/LoginFormTitle.vue deleted file mode 100644 index cdf4fac..0000000 --- a/src/views/Login/components/LoginFormTitle.vue +++ /dev/null @@ -1,26 +0,0 @@ - - diff --git a/src/views/Login/components/MobileForm.vue b/src/views/Login/components/MobileForm.vue deleted file mode 100644 index ebb36b8..0000000 --- a/src/views/Login/components/MobileForm.vue +++ /dev/null @@ -1,225 +0,0 @@ - - - - diff --git a/src/views/Login/components/QrCodeForm.vue b/src/views/Login/components/QrCodeForm.vue deleted file mode 100644 index 31d2845..0000000 --- a/src/views/Login/components/QrCodeForm.vue +++ /dev/null @@ -1,30 +0,0 @@ - - diff --git a/src/views/Login/components/RegisterForm.vue b/src/views/Login/components/RegisterForm.vue deleted file mode 100644 index 23b3bd4..0000000 --- a/src/views/Login/components/RegisterForm.vue +++ /dev/null @@ -1,142 +0,0 @@ - - diff --git a/src/views/Login/components/SSOLogin.vue b/src/views/Login/components/SSOLogin.vue deleted file mode 100644 index f31ab0e..0000000 --- a/src/views/Login/components/SSOLogin.vue +++ /dev/null @@ -1,199 +0,0 @@ - - diff --git a/src/views/Login/components/index.ts b/src/views/Login/components/index.ts deleted file mode 100644 index 204ad73..0000000 --- a/src/views/Login/components/index.ts +++ /dev/null @@ -1,8 +0,0 @@ -import LoginForm from './LoginForm.vue' -import MobileForm from './MobileForm.vue' -import LoginFormTitle from './LoginFormTitle.vue' -import RegisterForm from './RegisterForm.vue' -import QrCodeForm from './QrCodeForm.vue' -import SSOLoginVue from './SSOLogin.vue' - -export { LoginForm, MobileForm, LoginFormTitle, RegisterForm, QrCodeForm, SSOLoginVue } diff --git a/src/views/Login/components/useLogin.ts b/src/views/Login/components/useLogin.ts deleted file mode 100644 index b4a02f8..0000000 --- a/src/views/Login/components/useLogin.ts +++ /dev/null @@ -1,42 +0,0 @@ -import { Ref } from 'vue' - -export enum LoginStateEnum { - LOGIN, - REGISTER, - RESET_PASSWORD, - MOBILE, - QR_CODE, - SSO -} - -const currentState = ref(LoginStateEnum.LOGIN) - -export function useLoginState() { - function setLoginState(state: LoginStateEnum) { - currentState.value = state - } - const getLoginState = computed(() => currentState.value) - - function handleBackLogin() { - setLoginState(LoginStateEnum.LOGIN) - } - - return { - setLoginState, - getLoginState, - handleBackLogin - } -} - -export function useFormValid(formRef: Ref) { - async function validForm() { - const form = unref(formRef) - if (!form) return - const data = await form.validate() - return data as T - } - - return { - validForm - } -} diff --git a/src/views/Profile/Index.vue b/src/views/Profile/Index.vue deleted file mode 100644 index e813f04..0000000 --- a/src/views/Profile/Index.vue +++ /dev/null @@ -1,64 +0,0 @@ - - - diff --git a/src/views/Profile/components/BasicInfo.vue b/src/views/Profile/components/BasicInfo.vue deleted file mode 100644 index e2189b1..0000000 --- a/src/views/Profile/components/BasicInfo.vue +++ /dev/null @@ -1,92 +0,0 @@ - - diff --git a/src/views/Profile/components/ProfileUser.vue b/src/views/Profile/components/ProfileUser.vue deleted file mode 100644 index b493499..0000000 --- a/src/views/Profile/components/ProfileUser.vue +++ /dev/null @@ -1,99 +0,0 @@ - - - - diff --git a/src/views/Profile/components/ResetPwd.vue b/src/views/Profile/components/ResetPwd.vue deleted file mode 100644 index 477be91..0000000 --- a/src/views/Profile/components/ResetPwd.vue +++ /dev/null @@ -1,73 +0,0 @@ - - diff --git a/src/views/Profile/components/UserAvatar.vue b/src/views/Profile/components/UserAvatar.vue deleted file mode 100644 index c20168f..0000000 --- a/src/views/Profile/components/UserAvatar.vue +++ /dev/null @@ -1,39 +0,0 @@ - - - - diff --git a/src/views/Profile/components/UserSocial.vue b/src/views/Profile/components/UserSocial.vue deleted file mode 100644 index 2f021ab..0000000 --- a/src/views/Profile/components/UserSocial.vue +++ /dev/null @@ -1,94 +0,0 @@ - - diff --git a/src/views/Profile/components/index.ts b/src/views/Profile/components/index.ts deleted file mode 100644 index 9e1883c..0000000 --- a/src/views/Profile/components/index.ts +++ /dev/null @@ -1,7 +0,0 @@ -import BasicInfo from './BasicInfo.vue' -import ProfileUser from './ProfileUser.vue' -import ResetPwd from './ResetPwd.vue' -import UserAvatarVue from './UserAvatar.vue' -import UserSocial from './UserSocial.vue' - -export { BasicInfo, ProfileUser, ResetPwd, UserAvatarVue, UserSocial } diff --git a/src/views/Redirect/Redirect.vue b/src/views/Redirect/Redirect.vue deleted file mode 100644 index f7717ce..0000000 --- a/src/views/Redirect/Redirect.vue +++ /dev/null @@ -1,28 +0,0 @@ - - diff --git a/src/views/error/403.vue b/src/views/error/403.vue deleted file mode 100644 index a3ec487..0000000 --- a/src/views/error/403.vue +++ /dev/null @@ -1,8 +0,0 @@ - - diff --git a/src/views/error/404.vue b/src/views/error/404.vue deleted file mode 100644 index f6a08de..0000000 --- a/src/views/error/404.vue +++ /dev/null @@ -1,7 +0,0 @@ - - diff --git a/src/views/error/500.vue b/src/views/error/500.vue deleted file mode 100644 index 998487d..0000000 --- a/src/views/error/500.vue +++ /dev/null @@ -1,7 +0,0 @@ - - diff --git a/src/views/infra/apiAccessLog/ApiAccessLogDetail.vue b/src/views/infra/apiAccessLog/ApiAccessLogDetail.vue deleted file mode 100644 index 43a34dc..0000000 --- a/src/views/infra/apiAccessLog/ApiAccessLogDetail.vue +++ /dev/null @@ -1,67 +0,0 @@ - - - diff --git a/src/views/infra/apiAccessLog/index.vue b/src/views/infra/apiAccessLog/index.vue deleted file mode 100644 index 245f433..0000000 --- a/src/views/infra/apiAccessLog/index.vue +++ /dev/null @@ -1,167 +0,0 @@ - - diff --git a/src/views/infra/apiErrorLog/ApiErrorLogDetail.vue b/src/views/infra/apiErrorLog/ApiErrorLogDetail.vue deleted file mode 100644 index 7340ca8..0000000 --- a/src/views/infra/apiErrorLog/ApiErrorLogDetail.vue +++ /dev/null @@ -1,81 +0,0 @@ - - diff --git a/src/views/infra/apiErrorLog/index.vue b/src/views/infra/apiErrorLog/index.vue deleted file mode 100644 index 6836755..0000000 --- a/src/views/infra/apiErrorLog/index.vue +++ /dev/null @@ -1,249 +0,0 @@ - - - diff --git a/src/views/infra/build/index.vue b/src/views/infra/build/index.vue deleted file mode 100644 index 11bfc99..0000000 --- a/src/views/infra/build/index.vue +++ /dev/null @@ -1,143 +0,0 @@ - - diff --git a/src/views/infra/codegen/PreviewCode.vue b/src/views/infra/codegen/PreviewCode.vue deleted file mode 100644 index b04775e..0000000 --- a/src/views/infra/codegen/PreviewCode.vue +++ /dev/null @@ -1,222 +0,0 @@ - - - diff --git a/src/views/infra/codegen/components/BasicInfoForm.vue b/src/views/infra/codegen/components/BasicInfoForm.vue deleted file mode 100644 index 1859300..0000000 --- a/src/views/infra/codegen/components/BasicInfoForm.vue +++ /dev/null @@ -1,87 +0,0 @@ - - diff --git a/src/views/infra/codegen/components/ColumInfoForm.vue b/src/views/infra/codegen/components/ColumInfoForm.vue deleted file mode 100644 index 737c2e2..0000000 --- a/src/views/infra/codegen/components/ColumInfoForm.vue +++ /dev/null @@ -1,153 +0,0 @@ - - diff --git a/src/views/infra/codegen/components/GenerateInfoForm.vue b/src/views/infra/codegen/components/GenerateInfoForm.vue deleted file mode 100644 index 744edfe..0000000 --- a/src/views/infra/codegen/components/GenerateInfoForm.vue +++ /dev/null @@ -1,391 +0,0 @@ - - diff --git a/src/views/infra/codegen/components/index.ts b/src/views/infra/codegen/components/index.ts deleted file mode 100644 index 1634a76..0000000 --- a/src/views/infra/codegen/components/index.ts +++ /dev/null @@ -1,4 +0,0 @@ -import BasicInfoForm from './BasicInfoForm.vue' -import ColumInfoForm from './ColumInfoForm.vue' -import GenerateInfoForm from './GenerateInfoForm.vue' -export { BasicInfoForm, ColumInfoForm, GenerateInfoForm } diff --git a/src/views/infra/codegen/editTable.vue b/src/views/infra/codegen/editTable.vue deleted file mode 100644 index 9c4e765..0000000 --- a/src/views/infra/codegen/editTable.vue +++ /dev/null @@ -1,83 +0,0 @@ - - diff --git a/src/views/infra/codegen/importTable.vue b/src/views/infra/codegen/importTable.vue deleted file mode 100644 index 6cd4610..0000000 --- a/src/views/infra/codegen/importTable.vue +++ /dev/null @@ -1,151 +0,0 @@ - - diff --git a/src/views/infra/codegen/index.vue b/src/views/infra/codegen/index.vue deleted file mode 100644 index 4f99ce8..0000000 --- a/src/views/infra/codegen/index.vue +++ /dev/null @@ -1,258 +0,0 @@ - - diff --git a/src/views/infra/config/ConfigForm.vue b/src/views/infra/config/ConfigForm.vue deleted file mode 100644 index 19b5bf1..0000000 --- a/src/views/infra/config/ConfigForm.vue +++ /dev/null @@ -1,131 +0,0 @@ - - diff --git a/src/views/infra/config/index.vue b/src/views/infra/config/index.vue deleted file mode 100644 index 85b4fc9..0000000 --- a/src/views/infra/config/index.vue +++ /dev/null @@ -1,169 +0,0 @@ - - diff --git a/src/views/infra/customInterface/index.vue b/src/views/infra/customInterface/index.vue deleted file mode 100644 index 9359223..0000000 --- a/src/views/infra/customInterface/index.vue +++ /dev/null @@ -1,21 +0,0 @@ -