Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
M
mes-pad
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ximai
mes-pad
Commits
0ff98e92
Commit
0ff98e92
authored
Feb 05, 2024
by
528360026@qq.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复横屏样式错乱问题
parent
1706f442
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
98 additions
and
87 deletions
+98
-87
config.js
common/config.js
+2
-1
Dict.js
common/dict/Dict.js
+64
-57
DictMeta.js
common/dict/DictMeta.js
+22
-20
manifest.json
manifest.json
+1
-1
index.vue
pages/index/index.vue
+4
-3
index.vue
pages/mes/qc/index.vue
+5
-5
No files found.
common/config.js
View file @
0ff98e92
...
...
@@ -23,6 +23,7 @@ const config = {
// 设置后台接口服务的基础地址
//config.baseUrl = 'http://localhost:8080';
//config.baseUrl = "http://101.43.244.58:8080/";
config
.
baseUrl
=
"/api"
;
//config.baseUrl = "/api";
config
.
baseUrl
=
"http://101.200.162.168:8080"
;
export
default
config
;
\ No newline at end of file
common/dict/Dict.js
View file @
0ff98e92
import
Vue
from
'vue'
import
{
mergeRecursive
}
from
"@/utils/ruoyi"
;
import
{
mergeRecursive
}
from
"@/utils/ruoyi"
;
import
DictMeta
from
'./DictMeta'
import
DictData
from
'./DictData'
const
DEFAULT_DICT_OPTIONS
=
{
types
:
[],
types
:
[],
}
/**
...
...
@@ -14,45 +16,47 @@ const DEFAULT_DICT_OPTIONS = {
* @property {Array.<DictMeta>} _dictMetas 字典元数据数组
*/
export
default
class
Dict
{
constructor
()
{
this
.
owner
=
null
this
.
label
=
{}
this
.
type
=
{}
}
constructor
()
{
this
.
owner
=
null
this
.
label
=
{}
this
.
type
=
{}
}
init
(
options
)
{
if
(
options
instanceof
Array
)
{
options
=
{
types
:
options
}
}
const
opts
=
mergeRecursive
(
DEFAULT_DICT_OPTIONS
,
options
)
if
(
opts
.
types
===
undefined
)
{
throw
new
Error
(
'need dict types'
)
}
const
ps
=
[]
this
.
_dictMetas
=
opts
.
types
.
map
(
t
=>
DictMeta
.
parse
(
t
))
this
.
_dictMetas
.
forEach
(
dictMeta
=>
{
const
type
=
dictMeta
.
type
Vue
.
set
(
this
.
label
,
type
,
{})
Vue
.
set
(
this
.
type
,
type
,
[])
if
(
dictMeta
.
lazy
)
{
return
}
ps
.
push
(
loadDict
(
this
,
dictMeta
))
})
return
Promise
.
all
(
ps
)
}
init
(
options
)
{
if
(
options
instanceof
Array
)
{
options
=
{
types
:
options
}
}
const
opts
=
mergeRecursive
(
DEFAULT_DICT_OPTIONS
,
options
)
if
(
opts
.
types
===
undefined
)
{
throw
new
Error
(
'need dict types'
)
}
const
ps
=
[]
this
.
_dictMetas
=
opts
.
types
.
map
(
t
=>
DictMeta
.
parse
(
t
))
this
.
_dictMetas
.
forEach
(
dictMeta
=>
{
const
type
=
dictMeta
.
type
Vue
.
set
(
this
.
label
,
type
,
{})
Vue
.
set
(
this
.
type
,
type
,
[])
if
(
dictMeta
.
lazy
)
{
return
}
ps
.
push
(
loadDict
(
this
,
dictMeta
))
})
return
Promise
.
all
(
ps
)
}
/**
* 重新加载字典
* @param {String} type 字典类型
*/
reloadDict
(
type
)
{
const
dictMeta
=
this
.
_dictMetas
.
find
(
e
=>
e
.
type
===
type
)
if
(
dictMeta
===
undefined
)
{
return
Promise
.
reject
(
`the dict meta of
${
type
}
was not found`
)
}
return
loadDict
(
this
,
dictMeta
)
}
/**
* 重新加载字典
* @param {String} type 字典类型
*/
reloadDict
(
type
)
{
const
dictMeta
=
this
.
_dictMetas
.
find
(
e
=>
e
.
type
===
type
)
if
(
dictMeta
===
undefined
)
{
return
Promise
.
reject
(
`the dict meta of
${
type
}
was not found`
)
}
return
loadDict
(
this
,
dictMeta
)
}
}
/**
...
...
@@ -62,21 +66,24 @@ export default class Dict {
* @returns {Promise}
*/
function
loadDict
(
dict
,
dictMeta
)
{
return
dictMeta
.
request
(
dictMeta
)
.
then
(
response
=>
{
const
type
=
dictMeta
.
type
let
dicts
=
dictMeta
.
responseConverter
(
response
,
dictMeta
)
if
(
!
(
dicts
instanceof
Array
))
{
console
.
error
(
'the return of responseConverter must be Array.<DictData>'
)
dicts
=
[]
}
else
if
(
dicts
.
filter
(
d
=>
d
instanceof
DictData
).
length
!==
dicts
.
length
)
{
console
.
error
(
'the type of elements in dicts must be DictData'
)
dicts
=
[]
}
dict
.
type
[
type
].
splice
(
0
,
Number
.
MAX_SAFE_INTEGER
,
...
dicts
)
dicts
.
forEach
(
d
=>
{
Vue
.
set
(
dict
.
label
[
type
],
d
.
value
,
d
.
label
)
})
return
dicts
})
}
return
dictMeta
.
request
(
dictMeta
)
.
then
(
response
=>
{
const
type
=
dictMeta
.
type
let
dicts
=
dictMeta
.
responseConverter
(
response
,
dictMeta
)
// #ifdef H5
if
(
!
(
dicts
instanceof
Array
))
{
console
.
error
(
'the return of responseConverter must be Array.<DictData>'
)
dicts
=
[]
}
else
// #endif
if
(
dicts
.
filter
(
d
=>
d
instanceof
DictData
).
length
!==
dicts
.
length
)
{
console
.
error
(
'the type of elements in dicts must be DictData'
)
dicts
=
[]
}
dict
.
type
[
type
].
splice
(
0
,
Number
.
MAX_SAFE_INTEGER
,
...
dicts
)
dicts
.
forEach
(
d
=>
{
Vue
.
set
(
dict
.
label
[
type
],
d
.
value
,
d
.
label
)
})
return
dicts
})
}
\ No newline at end of file
common/dict/DictMeta.js
View file @
0ff98e92
import
{
mergeRecursive
}
from
"@/utils/ruoyi"
;
import
{
mergeRecursive
}
from
"@/utils/ruoyi"
;
import
DictOptions
from
'./DictOptions'
/**
...
...
@@ -9,14 +11,14 @@ import DictOptions from './DictOptions'
* @property {String} value 值字段
*/
export
default
class
DictMeta
{
constructor
(
options
)
{
this
.
type
=
options
.
type
this
.
request
=
options
.
request
,
this
.
responseConverter
=
options
.
responseConverter
this
.
labelField
=
options
.
labelField
this
.
valueField
=
options
.
valueField
this
.
lazy
=
options
.
lazy
===
true
}
constructor
(
options
)
{
this
.
type
=
options
.
type
this
.
request
=
options
.
request
,
this
.
responseConverter
=
options
.
responseConverter
this
.
labelField
=
options
.
labelField
this
.
valueField
=
options
.
valueField
this
.
lazy
=
options
.
lazy
===
true
}
}
...
...
@@ -25,14 +27,14 @@ export default class DictMeta {
* @param {Object} options
* @returns {DictMeta}
*/
DictMeta
.
parse
=
function
(
options
)
{
let
opts
=
null
if
(
typeof
options
===
'string'
)
{
opts
=
DictOptions
.
metas
[
options
]
||
{}
opts
.
type
=
options
}
else
if
(
typeof
options
===
'object'
)
{
opts
=
options
}
opts
=
mergeRecursive
(
DictOptions
.
metas
[
'*'
],
opts
)
return
new
DictMeta
(
opts
)
}
DictMeta
.
parse
=
function
(
options
)
{
let
opts
=
null
if
(
typeof
options
===
'string'
)
{
opts
=
DictOptions
.
metas
[
options
]
||
{}
opts
.
type
=
options
}
else
if
(
typeof
options
===
'object'
)
{
opts
=
options
}
opts
=
mergeRecursive
(
DictOptions
.
metas
[
'*'
],
opts
)
return
new
DictMeta
(
opts
)
}
\ No newline at end of file
manifest.json
View file @
0ff98e92
{
"name"
:
"ktg-mes-pad"
,
"appid"
:
"__UNI__
86F3F47
"
,
"appid"
:
"__UNI__
5750C3E
"
,
"description"
:
"MES-PAD"
,
"versionName"
:
"1.0.0"
,
"versionCode"
:
"100"
,
...
...
pages/index/index.vue
View file @
0ff98e92
<
template
>
<view
class=
"common-container"
>
<view
class=
"header"
>
<image
mode=
"widthFix"
class=
"header-logo"
s
rc=
"@
/static/logo.png"
></image>
<image
mode=
"widthFix"
class=
"header-logo"
s
tyle=
"width: 110px;margin: 10px auto;display: block;"
src=
"
/static/logo.png"
></image>
<TabHeader></TabHeader>
<view
class=
"setting-body"
@
click=
"handleUserTaped"
>
...
...
@@ -15,7 +15,7 @@
<QcContent
v-else-if=
"tabIndex ==='QC'"
></QcContent>
<ProContent
v-if=
"tabIndex === 'DV'"
></ProContent>
</view>
<u-modal
width=
"
1680rpx
"
v-model=
"showWorkstationFlag"
:showConfirmButton=
"false"
:showCancelButton=
"true"
<u-modal
width=
"
90%
"
v-model=
"showWorkstationFlag"
:showConfirmButton=
"false"
:showCancelButton=
"true"
title=
"请选择工作站"
content=
"操作内容"
>
<!--
<u-tabs
:list=
"processList"
:is-scroll=
"true"
:current=
"currentFlag"
name=
"processName"
@
change=
"getWorkstationList"
>
...
...
@@ -200,7 +200,8 @@ export default {
height
:
inherit
;
.header-logo
{
width
:
90%
;
width
:
200
rpx
;
height
:
auto
;
margin
:
40
rpx
auto
;
display
:
block
;
}
...
...
pages/mes/qc/index.vue
View file @
0ff98e92
...
...
@@ -3,13 +3,13 @@
<view
class=
"button-bar"
>
<view
class=
"button-frame"
@
click=
"addQC('QCMSG')"
>
<view
class=
"shortcut-icon icon-color01"
>
<im
g
class=
"icon-button"
:src=
"require('@/static/icons/png/pro.png')"
alt=
""
>
<im
age
class=
"icon-button"
src=
"/static/icons/png/pro.png"
/
>
</view>
<view
class=
"grid-text"
>
检查通知
</view>
</view>
<view
class=
"button-frame"
v-for=
"qcType in dict.type.mes_ipqc_type"
@
click=
"addQC(qcType.value )"
>
<view
class=
"shortcut-icon icon-color01"
>
<im
g
class=
"icon-button"
:src=
"require('@/static/icons/png/pro.png')"
alt=
""
>
<im
age
class=
"icon-button"
src=
"/static/icons/png/pro.png"
/
>
</view>
<view
class=
"grid-text"
>
{{
qcType
.
label
}}
</view>
</view>
...
...
@@ -74,7 +74,7 @@
</view>
</view>
<u-modal
width=
"
1800rpx
"
v-model=
"qcModalFlag"
:showConfirmButton=
true
:showCancelButton=
"true"
<u-modal
width=
"
90%
"
v-model=
"qcModalFlag"
:showConfirmButton=
true
:showCancelButton=
"true"
title=
"请填写检验单"
content=
"操作内容"
>
<u-form
ref=
"qcForm"
label-width=
"70px"
>
...
...
@@ -177,7 +177,7 @@
</scroll-view>
</u-modal>
<u-modal
width=
"
760px
"
v-model=
"qcMsgVisible"
:showConfirmButton=
false
:showCancelButton=
"true"
<u-modal
width=
"
80%
"
v-model=
"qcMsgVisible"
:showConfirmButton=
false
:showCancelButton=
"true"
title=
"检验通知"
content=
"操作内容"
>
<uni-table
class=
"line-table"
border
stripe
:loading=
"loading"
emptyText=
"未查询到数据"
>
<uni-tr>
...
...
@@ -216,7 +216,7 @@
</u-form>
</u-modal>
<u-modal
width=
"
600px
"
v-model=
"deffectModalFlag"
@
confirm=
"subQcdeffect"
@
cancel=
"getTemplateLineList"
<u-modal
width=
"
80%
"
v-model=
"deffectModalFlag"
@
confirm=
"subQcdeffect"
@
cancel=
"getTemplateLineList"
confirm-text=
"提交"
:showConfirmButton=
true
:showCancelButton=
true
title=
"缺陷登记"
>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment