ljlong_2630 10 months ago
parent
commit
9c93cfae0a
  1. 6
      .env.production
  2. 10
      .env.test
  3. 7
      Dockerfile
  4. 61
      nginx.conf
  5. 6
      src/api/eam/item/itemApplyMain/index.ts
  6. 203
      src/components/Detail/src/DetailDeviceLedger.vue
  7. 4
      src/components/UploadFile/src/UploadFile.vue
  8. 18
      src/router/modules/remaining.ts
  9. 13
      src/utils/disposition/defaultButtons.ts
  10. 22
      src/views/eam/device/deviceAccounts/deviceAccounts.data.ts
  11. 32
      src/views/eam/device/deviceAccounts/index.vue
  12. 2
      src/views/eam/device/deviceMaintenanceMain/index.vue
  13. 98
      src/views/eam/item/applicationRecord/applicationRecordMain.data.ts
  14. 7
      src/views/eam/item/applicationRecord/index.vue
  15. 28
      src/views/eam/item/itemApplyMain/index.vue
  16. 80
      src/views/eam/item/itemApplyMain/itemApplyMain.data.ts
  17. 0
      src/views/home/Index copy.vue
  18. 0
      src/views/home/Index2.vue
  19. 0
      src/views/home/components/material.vue
  20. 0
      src/views/home/components/produce.vue
  21. 0
      src/views/home/components/product.vue
  22. 0
      src/views/home/components/supplierIndex.vue
  23. 0
      src/views/home/echarts-data.ts
  24. 0
      src/views/home/index.vue
  25. 0
      src/views/home/types.ts
  26. 0
      src/views/login/components/LoginForm.vue
  27. 0
      src/views/login/components/LoginFormTitle.vue
  28. 0
      src/views/login/components/MobileForm.vue
  29. 0
      src/views/login/components/QrCodeForm.vue
  30. 0
      src/views/login/components/RegisterForm.vue
  31. 0
      src/views/login/components/SSOLogin.vue
  32. 0
      src/views/login/components/index.ts
  33. 0
      src/views/login/components/useLogin.ts
  34. 0
      src/views/login/login.vue
  35. 0
      src/views/profile/components/BasicInfo.vue
  36. 0
      src/views/profile/components/ProfileUser.vue
  37. 0
      src/views/profile/components/ResetPwd.vue
  38. 0
      src/views/profile/components/UserAvatar.vue
  39. 0
      src/views/profile/components/UserSocial.vue
  40. 0
      src/views/profile/components/index.ts
  41. 0
      src/views/profile/index.vue
  42. 0
      src/views/redirect/redirect.vue

6
.env.production

@ -28,10 +28,10 @@ VITE_SOURCEMAP=false
VITE_BASE_PATH=/ 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'

10
.env.test

@ -4,10 +4,10 @@ NODE_ENV=test
VITE_DEV=false 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= VITE_API_BASEPATH=
@ -28,10 +28,10 @@ VITE_SOURCEMAP=false
VITE_BASE_PATH=/ 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'

7
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

61
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;
}
}
}

6
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 }) 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 // 导出备件申领记录主 Excel
export const exportItemApplyMain = async (params) => { export const exportItemApplyMain = async (params) => {
return await request.download({ url: `/eam/item-apply-main/export-excel`, params }) return await request.download({ url: `/eam/item-apply-main/export-excel`, params })

203
src/components/Detail/src/DetailDeviceLedger.vue

@ -25,7 +25,7 @@
/> />
</ContentWrap> </ContentWrap>
<Tabs :tabsList="tabsList" :current="current" @change="change" :key="tabsKay"/> <Tabs :tabsList="tabsList" :current="current" @change="change" :key="tabsKay" />
<div class="flex"> <div class="flex">
<!-- 详情 --> <!-- 详情 -->
<ContentWrap class="w-[100%]"> <ContentWrap class="w-[100%]">
@ -39,37 +39,30 @@
@searchFormClick="searchFormClick" @searchFormClick="searchFormClick"
:allSchemas="detailAllSchemas" :allSchemas="detailAllSchemas"
/> />
<!-- 默认单表展现 -->
<!-- <Descriptions
v-if="isBasic && !tabsExtend"
:data="detailData"
:schema="allSchemas.detailSchema"
:columns="2"
/> -->
<div v-if="isBasic && tabsExtend == 1"> <div v-if="isBasic && tabsExtend == 1">
<Form <el-form ref="imageFormRef" :model="imageFormData" :key="formKey">
ref="imageFormRef" <el-form-item label="文件上传">
:rules="upImageRules" <UploadImgs v-model="imageFormData.filePathList" />
:schema="imageFormSchemas" </el-form-item>
/> </el-form>
<el-button type="primary" @click="uploadImage">点击修改</el-button> <el-button type="primary" @click="uploadImage">点击修改</el-button>
</div> </div>
<el-tabs type="border-card" class="demo-tabs" v-model="subIndex" v-if="isBasic && tabsExtend == 2" @tab-change="handleTabsChange"> <div v-if="isBasic && tabsExtend == 2">
<el-tab-pane <el-tabs class="demo-tabs" v-model="imageParmas.fileBusiType" @tab-change="handleTabsChange">
v-for="(item,index) in subTabsList" <el-tab-pane
:key="item.value" v-for="item in subTabsList"
:label="item.label" :key="item.value"
:name="item.value" :label="item.label"
> :name="item.value"
<Form />
:ref="'fileFormRef'" </el-tabs>
:rules="upFileRules" <el-form ref="fileFormRef" :model="fileFormData" :key="formKey">
:schema="fileFormSchemas" <el-form-item label="文件上传">
:is-col="true" <UploadFile v-model="fileFormData.filePathList" :limit="20" />
/> </el-form-item>
<el-button type="primary" @click="uploadFile(index)">点击修改</el-button> </el-form>
</el-tab-pane> <el-button type="primary" @click="uploadFile">点击修改</el-button>
</el-tabs> </div>
<!-- 单表切换tabs 展现table --> <!-- 单表切换tabs 展现table -->
<Table <Table
v-if="isBasic && tabsExtend == 3" v-if="isBasic && tabsExtend == 3"
@ -157,9 +150,11 @@ import * as defaultButtons from '@/utils/disposition/defaultButtons'
import BasicForm from '@/components/BasicForm/src/BasicForm.vue' import BasicForm from '@/components/BasicForm/src/BasicForm.vue'
import TableHead from '@/components/TableHead/src/TableHead.vue' import TableHead from '@/components/TableHead/src/TableHead.vue'
import DetailTable from '@/components/DetailTable/src/DetailTable.vue' import DetailTable from '@/components/DetailTable/src/DetailTable.vue'
import { getCurrentInstance} from 'vue' import { getCurrentInstance } from 'vue'
import { get } from 'http' import { get } from 'http'
import { findIndex } from '@/utils'
const { proxy } = getCurrentInstance() const { proxy } = getCurrentInstance()
const changeFile = () => {}
defineOptions({ name: 'Detail' }) defineOptions({ name: 'Detail' })
@ -295,33 +290,12 @@ const props = defineProps({
required: false, required: false,
default: false default: false
}, },
//
upImageRules: {
type: Array,
required: false,
default: null
},
imageFormAllSchemas: {
type: Object,
required: true,
default: null
},
// //
upFileRules: { upFileRules: {
type: Array, type: Array,
required: false, required: false,
default: null default: null
}, },
fileFormAllSchemas: {
type: Object,
required: true,
default: null
},
subIndex: {
type: String,
required: false,
default: 'A'
},
// //
getImageApi: { getImageApi: {
type: Function, type: Function,
@ -333,21 +307,24 @@ const props = defineProps({
type: Function, type: Function,
required: false, required: false,
default: null default: null
}, }
}) })
const subIndex = ref(props.subIndex) const imageFormData = ref({
filePathList: []
})
const fileFormData = ref({
filePathList: []
})
const subIndex = ref('A')
const isShowDrawer = ref(false) const isShowDrawer = ref(false)
const detailLoading = ref(false) const detailLoading = ref(false)
const tabsList = ref(JSON.parse(JSON.stringify(props.tabs ? props.tabs : ''))) const tabsList = ref(JSON.parse(JSON.stringify(props.tabs ? props.tabs : '')))
const subTabsList = ref(JSON.parse(JSON.stringify(props.subTabs ? props.subTabs : ''))) 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 // Tabs
const current = ref(0) const current = ref(0)
const imageParmas=ref({ const imageParmas = ref({
funcCode: 'device_mould_picture', // funcCode: 'device_mould_picture', //
fileBusiType: '' // fileBusiType: '' //
}) })
@ -355,17 +332,24 @@ const change = (item, index) => {
current.value = index current.value = index
if (item.prop == 'Image') { if (item.prop == 'Image') {
imageParmas.value.funcCode = 'device_mould_picture' imageParmas.value.funcCode = 'device_mould_picture'
imageParmas.value.fileBusiType = ''
getImage()
} else if (item.prop == 'Word') { } else if (item.prop == 'Word') {
imageParmas.value.funcCode = 'device_mould_attachment' imageParmas.value.funcCode = 'device_mould_attachment'
} else{ imageParmas.value.fileBusiType = 'A'
imageParmas.value.funcCode = '' subIndex.value = 'A'
formKey.value += 1
getImage()
} else {
imageParmas.value.funcCode = ''
imageParmas.value.fileBusiType = ''
} }
emit('changeTabs', item) emit('changeTabs', item)
} }
// //
const masterParmas = ref({ const masterParmas = ref({
number: '' ,//id number: '' //id
}) })
// //
@ -376,12 +360,12 @@ const buttondata = ref()
const detailData = ref() const detailData = ref()
const titleNameRef = ref() const titleNameRef = ref()
const titleValueRef = ref() const titleValueRef = ref()
const tabsKay =ref(0)//tabskey const tabsKay = ref(0) //tabskey
const openDetail = async (row: any, titleName: any, titleValue: any, tableName: any) => { const openDetail = async (row: any, titleName: any, titleValue: any, tableName: any) => {
titleNameRef.value = titleName titleNameRef.value = titleName
titleValueRef.value = titleValue titleValueRef.value = titleValue
current.value = 0 current.value = 0
tabsKay.value+=1 tabsKay.value += 1
// //
if (!props.isBasic || (props.isBasic && props.tabsExtend)) { if (!props.isBasic || (props.isBasic && props.tabsExtend)) {
// id // id
@ -394,11 +378,13 @@ const openDetail = async (row: any, titleName: any, titleValue: any, tableName:
} }
} }
isShowDrawer.value = true isShowDrawer.value = true
imageParmas.value.funcCode = 'device_mould_picture'
if (row) { if (row) {
console.log(row)
detailLoading.value = true detailLoading.value = true
try { try {
await getImage() await getImage()
detailData.value = row detailData.value = row
// //
if (routeName.value.indexOf('Job') > -1) { if (routeName.value.indexOf('Job') > -1) {
@ -470,19 +456,24 @@ const openDetail = async (row: any, titleName: any, titleValue: any, tableName:
defineExpose({ openDetail }) // open defineExpose({ openDetail }) // open
// //
const getImage=()=>{ const formKey = ref(0)
props.getImageApi({ const getImage = () => {
number:masterParmas.value.number, props
funcCode:imageParmas.value.funcCode, .getImageApi({
fileBusiType:imageParmas.value.fileBusiType number: masterParmas.value.number,
}).then((res)=>{ funcCode: imageParmas.value.funcCode,
console.log(res) fileBusiType: imageParmas.value.fileBusiType
nextTick(() => { })
imageFormRef.value.setValues({ .then((res) => {
filePathList:res nextTick(() => {
}) if (imageParmas.value.funcCode == 'device_mould_picture') {
imageFormData.value.filePathList = res
} else {
fileFormData.value.filePathList = res
formKey.value += 1
}
}) })
}) })
} }
const tableObjectRef = ref() const tableObjectRef = ref()
@ -588,8 +579,7 @@ const emit = defineEmits([
'detailOpenForm', 'detailOpenForm',
'tableFormButton', 'tableFormButton',
'openImage', 'openImage',
'subTabsChick', 'subTabsChick'
'uploadFile'
]) ])
/** 删除按钮操作 */ /** 删除按钮操作 */
const handleDelete = async (id: number) => { const handleDelete = async (id: number) => {
@ -640,17 +630,18 @@ const openImage = (item) => {
} }
const imageFormRef = ref() const imageFormRef = ref()
// //
const uploadImage =async () => { const uploadImage = async () => {
const elForm = unref(imageFormRef)?.getElFormRef() // const elForm = unref(imageFormRef)?.getElFormRef()
// // //
if (!elForm) return // if (!elForm) return
const valid = await elForm.validate() // const valid = await elForm.validate()
if (!valid) return // if (!valid) return
imageFormData
let data = { let data = {
number:masterParmas.value.number, number: masterParmas.value.number,
filePathList: imageFormRef.value.formModel.filePathList.map((item) => item.url), filePathList: imageFormData.value.filePathList.map((item) => item.url),
funcCode: imageParmas.value.funcCode, funcCode: imageParmas.value.funcCode,
fileBusiType: imageParmas.value.fileBusiType ? imageParmas.value.fileBusiType : '' fileBusiType: imageParmas.value.fileBusiType ? imageParmas.value.fileBusiType : ''
} }
props.uploadImage(data).then((res) => { props.uploadImage(data).then((res) => {
message.success('修改成功') message.success('修改成功')
@ -659,23 +650,29 @@ const uploadImage =async () => {
} }
// tabs // tabs
const fileFormRef = ref() const fileFormRef = ref()
const handleTabsChange=(e)=>{ const handleTabsChange = (e) => {
emit('subTabsChick',e) imageParmas.value.fileBusiType = e
getImage()
} }
// //
const uploadFile=async(index)=>{ const uploadFile = async () => {
let _lists = fileFormRef.value?.map(v => unref(v)?.getElFormRef()) console.log(fileFormData.value.filePathList)
const elForm = _lists[index] // const elForm = unref(fileFormRef)?.getElFormRef()
// // //
if (!elForm) return // if (!elForm) return
const valid = await elForm.validate() // const valid = await elForm.validate()
if (!valid) return // if (!valid) return
console.log(fileFormRef.value.formModel) // console.log(fileFormRef.value?.formModel.filePathList)
emit( let data = {
'uploadFile', number: masterParmas.value.number,
masterParmas.value.number, filePathList: fileFormData.value.filePathList.map((item) => item.url),
fileFormRef.value.formModel.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( watch(

4
src/components/UploadFile/src/UploadFile.vue

@ -69,6 +69,7 @@ const props = defineProps({
const valueRef = ref(props.modelValue) const valueRef = ref(props.modelValue)
const uploadRef = ref<UploadInstance>() const uploadRef = ref<UploadInstance>()
const uploadList = ref<UploadUserFile[]>([]) const uploadList = ref<UploadUserFile[]>([])
console.log('88',props.modelValue)
const fileList = props.modelValue && props.modelValue.length > 0 ? ref<UploadUserFile[]>(props.modelValue) : ref<UploadUserFile[]>([]) const fileList = props.modelValue && props.modelValue.length > 0 ? ref<UploadUserFile[]>(props.modelValue) : ref<UploadUserFile[]>([])
const uploadNumber = ref<number>(0) const uploadNumber = ref<number>(0)
const uploadHeaders = ref({ const uploadHeaders = ref({
@ -116,7 +117,7 @@ const handleFileSuccess: UploadProps['onSuccess'] = (res: any): void => {
fileList.value = fileList.value.concat(uploadList.value) fileList.value = fileList.value.concat(uploadList.value)
uploadList.value = [] uploadList.value = []
uploadNumber.value = 0 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) => { const handlePreview: UploadProps['onPreview'] = (uploadFile) => {
console.log(uploadFile) console.log(uploadFile)
window.open(uploadFile.url)
} }
// //
const listToString = (list: UploadUserFile[], separator?: string) => { const listToString = (list: UploadUserFile[], separator?: string) => {

18
src/router/modules/remaining.ts

@ -41,7 +41,7 @@ const remainingRouter: AppRouteRecordRaw[] = [
{ {
path: '/redirect/:path(.*)', path: '/redirect/:path(.*)',
name: 'Redirect', name: 'Redirect',
component: () => import('@/views/Redirect/Redirect.vue'), component: () => import('@/views/redirect/redirect.vue'),
meta: {} meta: {}
} }
], ],
@ -59,7 +59,7 @@ const remainingRouter: AppRouteRecordRaw[] = [
children: [ children: [
{ {
path: 'index', path: 'index',
component: () => import('@/views/Home/Index.vue'), component: () => import('@/views/home/index.vue'),
name: 'Index', name: 'Index',
meta: { meta: {
title: t('router.home'), title: t('router.home'),
@ -80,7 +80,7 @@ const remainingRouter: AppRouteRecordRaw[] = [
children: [ children: [
{ {
path: 'profile', path: 'profile',
component: () => import('@/views/Profile/Index.vue'), component: () => import('@/views/profile/index.vue'),
name: 'Profile', name: 'Profile',
meta: { meta: {
canTo: true, canTo: true,
@ -139,7 +139,7 @@ const remainingRouter: AppRouteRecordRaw[] = [
children: [ children: [
{ {
path: 'edit', path: 'edit',
component: () => import('@/views/infra/codegen/EditTable.vue'), component: () => import('@/views/infra/codegen/editTable.vue'),
name: 'InfraCodegenEditTable', name: 'InfraCodegenEditTable',
meta: { meta: {
noCache: true, noCache: true,
@ -177,7 +177,7 @@ const remainingRouter: AppRouteRecordRaw[] = [
}, },
{ {
path: '/login', path: '/login',
component: () => import('@/views/Login/Login.vue'), component: () => import('@/views/login/login.vue'),
name: 'Login', name: 'Login',
meta: { meta: {
hidden: true, hidden: true,
@ -187,7 +187,7 @@ const remainingRouter: AppRouteRecordRaw[] = [
}, },
{ {
path: '/sso', path: '/sso',
component: () => import('@/views/Login/Login.vue'), component: () => import('@/views/login/login.vue'),
name: 'SSOLogin', name: 'SSOLogin',
meta: { meta: {
hidden: true, hidden: true,
@ -197,7 +197,7 @@ const remainingRouter: AppRouteRecordRaw[] = [
}, },
{ {
path: '/403', path: '/403',
component: () => import('@/views/Error/403.vue'), component: () => import('@/views/error/403.vue'),
name: 'NoAccess', name: 'NoAccess',
meta: { meta: {
hidden: true, hidden: true,
@ -207,7 +207,7 @@ const remainingRouter: AppRouteRecordRaw[] = [
}, },
{ {
path: '/404', path: '/404',
component: () => import('@/views/Error/404.vue'), component: () => import('@/views/error/404.vue'),
name: 'NoFound', name: 'NoFound',
meta: { meta: {
hidden: true, hidden: true,
@ -217,7 +217,7 @@ const remainingRouter: AppRouteRecordRaw[] = [
}, },
{ {
path: '/500', path: '/500',
component: () => import('@/views/Error/500.vue'), component: () => import('@/views/error/500.vue'),
name: 'Error', name: 'Error',
meta: { meta: {
hidden: true, hidden: true,

13
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) { export function acceptOrderBtn(option:any) {
return __defaultBtnOption(option,{ return __defaultBtnOption(option,{

22
src/views/eam/device/deviceAccounts/deviceAccounts.data.ts

@ -157,21 +157,7 @@ export const UpImage = useCrudSchemas(reactive<CrudSchema[]>([
} }
}, },
])) ]))
// 表单校验 // // 表单校验
export const UpFileRules = reactive({ // export const UpFileRules = reactive({
filePath: [required], // filePath: [required],
}) // })
export const UploadFile = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '上传文件',
field: 'filePathList',
sort: 'custom',
isForm: true,
form:{
component:'UploadFile',
componentProps:{
limit:10
}
}
},
]))

32
src/views/eam/device/deviceAccounts/index.vue

@ -68,12 +68,6 @@
:apiPage="apiPage" :apiPage="apiPage"
:tabsExtend="tabsExtend" :tabsExtend="tabsExtend"
:tableObjectExtend="tableObjectExtend" :tableObjectExtend="tableObjectExtend"
:imageFormAllSchemas="UpImage.allSchemas"
:upImageRules="UpImageRules"
:fileFormAllSchemas="UploadFile.allSchemas"
:upFileRules="UpFileRules"
@subTabsChick="subTabsChick"
@uploadFile="uploadFile"
:getImageApi="uploadApi.getImage" :getImageApi="uploadApi.getImage"
:uploadImage="uploadApi.uploadImage" :uploadImage="uploadApi.uploadImage"
/> />
@ -92,10 +86,7 @@ import download from '@/utils/download'
import { import {
DeviceAccounts, DeviceAccounts,
DeviceAccountsRules, DeviceAccountsRules,
UpImage, UpImage
UpImageRules,
UploadFile,
UpFileRules
} from './deviceAccounts.data' } from './deviceAccounts.data'
import { Item } from '@/views/eam/basic/item/item.data' import { Item } from '@/views/eam/basic/item/item.data'
import * as ItemApi from '@/api/eam/basic/item' import * as ItemApi from '@/api/eam/basic/item'
@ -322,7 +313,7 @@ const changeTabs = (item) => {
// detailAllSchemas.value = DeviceRepair.allSchemas // detailAllSchemas.value = DeviceRepair.allSchemas
} else if (item.prop == 'DeviceReportRecord') { } else if (item.prop == 'DeviceReportRecord') {
tabsExtend.value = 3 tabsExtend.value = 3
apiPage.value = deviceRepairApi.getDeviceRepairPage apiPage.value = deviceRepairApi.getDeviceRepairPage
detailAllSchemas.value = DeviceRepair.allSchemas detailAllSchemas.value = DeviceRepair.allSchemas
} else if (item.prop == 'RepairRecord') { } else if (item.prop == 'RepairRecord') {
tabsExtend.value = 3 tabsExtend.value = 3
@ -346,23 +337,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 () => { onMounted(async () => {
getList() getList()

2
src/views/eam/device/deviceMaintenanceMain/index.vue

@ -128,7 +128,7 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row) =>
nextTick(() => { nextTick(() => {
if (type == 'tableForm') { if (type == 'tableForm') {
// //
if (formField == 'itemNumbers') { if (formField == 'itemNumbers1') {
let str = '' let str = ''
val.forEach((element) => { val.forEach((element) => {
str += element.name + ':' + element.qty + ',' str += element.name + ':' + element.qty + ','

98
src/views/eam/item/applicationRecord/applicationRecordMain.data.ts

@ -1,7 +1,8 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas' import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter } from '@/utils/formatTime' import { dateFormatter } from '@/utils/formatTime'
import { Item } from '@/views/eam/basic/item/item.data' import { ItemAccounts } from '@/views/eam/item/itemAccounts/itemAccounts.data'
import * as ItemApi from '@/api/eam/basic/item' import * as ItemAccountsApi from '@/api/eam/item/itemAccounts'
import * as DeviceMoldItemsApi from '@/api/eam/basic/deviceMaintenance'
import { validateHanset, validateEmail } from '@/utils/validator' import { validateHanset, validateEmail } from '@/utils/validator'
const { t } = useI18n() // 国际化 const { t } = useI18n() // 国际化
@ -47,28 +48,19 @@ export const ApplicationRecordMain = useCrudSchemas(reactive<CrudSchema[]>([
sort: 'custom', sort: 'custom',
}, },
{ {
label: '是否可用', label: '状态',
field: 'available', field: 'status',
dictType: DICT_TYPE.TRUE_FALSE, sort: 'custom',
dictType: DICT_TYPE.ITEM_APPLY_STATUS,
dictClass: 'string', dictClass: 'string',
isSearch: false, isSearch: true,
isTable: true, isTable: true,
sort: 'custom',
table: { table: {
width: 150 width: 150
}, },
tableForm: { tableForm: {
type: 'Select', type: 'Select',
inactiveValue: 'FALSE',
disabled: true 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<CrudSchema[]>([
{
label: '编号',
field: 'number',
sort: 'custom',
isForm: false,
table: {
width: 180,
fixed: 'left'
},
},
{
label: '名称',
field: 'name',
sort: 'custom',
},
{
label: '规格型号',
field: 'specification',
sort: 'custom',
},
]))
/** /**
* @returns {Array} * @returns {Array}
*/ */
@ -110,8 +126,8 @@ export const ApplicationRecordDetail = useCrudSchemas(reactive<CrudSchema[]>([
searchListPlaceholder: '请选择备件编号', searchListPlaceholder: '请选择备件编号',
searchField: 'number', searchField: 'number',
searchTitle: '库区信息', searchTitle: '库区信息',
searchAllSchemas: Item.allSchemas, // 查询弹窗所需类 searchAllSchemas: ItemAccounts.allSchemas, // 查询弹窗所需类
searchPage: ItemApi.getItemPage, // 查询弹窗所需分页方法 searchPage: ItemAccountsApi.getItemAccountsPage, // 查询弹窗所需分页方法
searchCondition: [{ searchCondition: [{
key: 'available', key: 'available',
value: 'TRUE', value: 'TRUE',
@ -121,7 +137,49 @@ export const ApplicationRecordDetail = useCrudSchemas(reactive<CrudSchema[]>([
}, },
}, },
{ {
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', field: 'qty',
sort: 'custom', sort: 'custom',
table: { table: {
@ -160,6 +218,8 @@ export const ApplicationRecordDetail = useCrudSchemas(reactive<CrudSchema[]>([
precision: 6 precision: 6
} }
}, },
{ {
label: '是否可用', label: '是否可用',
field: 'available', field: 'available',

7
src/views/eam/item/applicationRecord/index.vue

@ -163,8 +163,9 @@
// - // -
const butttondata = (row) => { const butttondata = (row) => {
return [ return [
defaultButtons.mainListEditBtn(null), // defaultButtons.approveBtn({ hide: isShowMainButton(row, ['0']) }), //
defaultButtons.mainListDeleteBtn(null), // // defaultButtons.mainListEditBtn(null), //
// defaultButtons.mainListDeleteBtn(null), //
] ]
} }
@ -172,6 +173,8 @@
const buttonTableClick = async (val, row) => { const buttonTableClick = async (val, row) => {
if (val == 'edit') { // if (val == 'edit') { //
openForm('update', row) openForm('update', row)
}else if (val == 'approve') { //
// handleDelete(row.id)
} else if (val == 'delete') { // } else if (val == 'delete') { //
handleDelete(row.id) handleDelete(row.id)
} }

28
src/views/eam/item/itemApplyMain/index.vue

@ -75,8 +75,9 @@
if (type == 'tableForm') { if (type == 'tableForm') {
// //
row[formField] = val[0][searchField] row[formField] = val[0][searchField]
row['itemNumber'] = val[0]['number'] row['itemNumber'] = val[0]['itemNumber']
row['isRadeIn'] = val[0]['isRadeIn'] row['isRadeIn'] = val[0]['isRadeIn']
row['currentQty'] = val[0]['qty']
row['available'] = val[0]['available'] row['available'] = val[0]['available']
} else { } else {
const setV = {} const setV = {}
@ -158,9 +159,9 @@
// - // -
const butttondata = (row) => { const butttondata = (row) => {
return [ return [
defaultButtons.mainListOrderCloBtn({ hide: isShowMainButton(row, ['0']) }), // defaultButtons.backoutBtn({ hide: isShowMainButton(row, ['0']) }), //
defaultButtons.mainListEditBtn(null), // // defaultButtons.mainListEditBtn(null), //
defaultButtons.mainListDeleteBtn(null), // // defaultButtons.mainListDeleteBtn(null), //
] ]
} }
@ -168,11 +169,28 @@
const buttonTableClick = async (val, row) => { const buttonTableClick = async (val, row) => {
if (val == 'edit') { // if (val == 'edit') { //
openForm('update', row) openForm('update', row)
} else if (val == 'delete') { // }
else if (val == 'backout') { //
backout(row.id)
}
else if (val == 'delete') { //
handleDelete(row.id) 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 formRef = ref()
const openForm = async (type : string, row ?: number) => { const openForm = async (type : string, row ?: number) => {

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

@ -1,7 +1,8 @@
import type { CrudSchema } from '@/hooks/web/useCrudSchemas' import type { CrudSchema } from '@/hooks/web/useCrudSchemas'
import { dateFormatter } from '@/utils/formatTime' import { dateFormatter } from '@/utils/formatTime'
import { Item } from '@/views/eam/basic/item/item.data' import { ItemAccounts } from '@/views/eam/item/itemAccounts/itemAccounts.data'
import * as ItemApi from '@/api/eam/basic/item' import * as ItemAccountsApi from '@/api/eam/item/itemAccounts'
import * as DeviceMoldItemsApi from '@/api/eam/basic/deviceMaintenance'
import { validateHanset, validateEmail } from '@/utils/validator' import { validateHanset, validateEmail } from '@/utils/validator'
const { t } = useI18n() // 国际化 const { t } = useI18n() // 国际化
@ -87,6 +88,31 @@ export const ItemApplyMainRules = reactive({
], ],
}) })
export const DeviceMOLD = useCrudSchemas(reactive<CrudSchema[]>([
{
label: '编号',
field: 'number',
sort: 'custom',
isForm: false,
table: {
width: 180,
fixed: 'left'
},
},
{
label: '名称',
field: 'name',
sort: 'custom',
},
{
label: '规格型号',
field: 'specification',
sort: 'custom',
},
]))
/** /**
* @returns {Array} * @returns {Array}
*/ */
@ -101,8 +127,8 @@ export const ItemApplyDetail = useCrudSchemas(reactive<CrudSchema[]>([
searchListPlaceholder: '请选择备件编号', searchListPlaceholder: '请选择备件编号',
searchField: 'number', searchField: 'number',
searchTitle: '库区信息', searchTitle: '库区信息',
searchAllSchemas: Item.allSchemas, // 查询弹窗所需类 searchAllSchemas: ItemAccounts.allSchemas, // 查询弹窗所需类
searchPage: ItemApi.getItemPage, // 查询弹窗所需分页方法 searchPage: ItemAccountsApi.getItemAccountsPage, // 查询弹窗所需分页方法
searchCondition: [{ searchCondition: [{
key: 'available', key: 'available',
value: 'TRUE', value: 'TRUE',
@ -112,7 +138,49 @@ export const ItemApplyDetail = useCrudSchemas(reactive<CrudSchema[]>([
}, },
}, },
{ {
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', field: 'qty',
sort: 'custom', sort: 'custom',
table: { table: {
@ -151,6 +219,8 @@ export const ItemApplyDetail = useCrudSchemas(reactive<CrudSchema[]>([
precision: 6 precision: 6
} }
}, },
{ {
label: '是否可用', label: '是否可用',
field: 'available', field: 'available',

0
src/views/Home/Index copy.vue → src/views/home/Index copy.vue

0
src/views/Home/Index2.vue → src/views/home/Index2.vue

0
src/views/Home/components/material.vue → src/views/home/components/material.vue

0
src/views/Home/components/produce.vue → src/views/home/components/produce.vue

0
src/views/Home/components/product.vue → src/views/home/components/product.vue

0
src/views/Home/components/supplierIndex.vue → src/views/home/components/supplierIndex.vue

0
src/views/Home/echarts-data.ts → src/views/home/echarts-data.ts

0
src/views/Home/Index.vue → src/views/home/index.vue

0
src/views/Home/types.ts → src/views/home/types.ts

0
src/views/Login/components/LoginForm.vue → src/views/login/components/LoginForm.vue

0
src/views/Login/components/LoginFormTitle.vue → src/views/login/components/LoginFormTitle.vue

0
src/views/Login/components/MobileForm.vue → src/views/login/components/MobileForm.vue

0
src/views/Login/components/QrCodeForm.vue → src/views/login/components/QrCodeForm.vue

0
src/views/Login/components/RegisterForm.vue → src/views/login/components/RegisterForm.vue

0
src/views/Login/components/SSOLogin.vue → src/views/login/components/SSOLogin.vue

0
src/views/Login/components/index.ts → src/views/login/components/index.ts

0
src/views/Login/components/useLogin.ts → src/views/login/components/useLogin.ts

0
src/views/Login/Login.vue → src/views/login/login.vue

0
src/views/Profile/components/BasicInfo.vue → src/views/profile/components/BasicInfo.vue

0
src/views/Profile/components/ProfileUser.vue → src/views/profile/components/ProfileUser.vue

0
src/views/Profile/components/ResetPwd.vue → src/views/profile/components/ResetPwd.vue

0
src/views/Profile/components/UserAvatar.vue → src/views/profile/components/UserAvatar.vue

0
src/views/Profile/components/UserSocial.vue → src/views/profile/components/UserSocial.vue

0
src/views/Profile/components/index.ts → src/views/profile/components/index.ts

0
src/views/Profile/Index.vue → src/views/profile/index.vue

0
src/views/Redirect/Redirect.vue → src/views/redirect/redirect.vue

Loading…
Cancel
Save