Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
template_move
Project
Project
Details
Activity
Releases
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
胡宝山
template_move
Commits
5d4df410
Commit
5d4df410
authored
Oct 15, 2024
by
ccc2wdd
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
设备查询界面
parent
d2d543b0
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
395 additions
and
4 deletions
+395
-4
query.js
src/api/query/query.js
+8
-0
header.vue
src/layout/components/header.vue
+2
-2
permission.js
src/store/modules/permission.js
+1
-1
deviceField.js
src/utils/device/deviceField.js
+48
-0
index.vue
src/views/query/index.vue
+335
-0
vue.config.js
vue.config.js
+1
-1
No files found.
src/api/query/query.js
0 → 100644
View file @
5d4df410
import
request
from
'@/utils/request'
// 查询仪器管理详细信息
export
function
getInsStrumentInfo
(
businessId
)
{
return
request
({
url
:
'/insstrumentinfo/detail/'
+
businessId
,
method
:
'get'
})
}
src/layout/components/header.vue
View file @
5d4df410
...
...
@@ -110,8 +110,8 @@ export default {
// })
// },
toggleSideBar
()
{
//
this.menuState = !this.menuState
this
.
$store
.
dispatch
(
'app/menuState'
,
t
ru
e
)
this
.
menuState
=
!
this
.
menuState
this
.
$store
.
dispatch
(
'app/menuState'
,
t
his
.
menuStat
e
)
},
async
logout
()
{
this
.
$confirm
(
'确定注销并退出系统吗?'
,
'提示'
,
{
...
...
src/store/modules/permission.js
View file @
5d4df410
...
...
@@ -4,7 +4,7 @@ import { getInfo } from '@/api/login'
import
Layout
from
'@/layout/index'
// pathList: 是要隐藏菜单的集合 system元素:一级菜单的路径(path)
const
pathList
=
[
'system'
,
'system/log'
,
'
production'
,
'equipment'
,
'process'
,
'/none2'
,
'sample'
,
'tlias'
,
'/test'
,
'/inspect'
,
'/controlPlatform/control'
,
'/template/planeGraph'
,
'/demoData/demoData1'
,
'/setup/test
'
]
const
pathList
=
[
'system'
,
'system/log'
,
'
asset'
,
'standard'
,
'professional'
,
'statistics
'
]
const
permission
=
{
state
:
{
...
...
src/utils/device/deviceField.js
0 → 100644
View file @
5d4df410
/** 设备管理及关联模块公共字段 */
const
deviceField
=
{
sureStatusList
:
[
{
dictValue
:
'1'
,
dictLabel
:
'已通过'
,
type
:
'success'
},
{
dictValue
:
'2'
,
dictLabel
:
'待审核'
,
type
:
'warning'
},
{
dictValue
:
'3'
,
dictLabel
:
'已驳回'
,
type
:
'danger'
}
],
insStatusList
:
[
{
dictValue
:
'1'
,
dictLabel
:
'正常'
,
type
:
'success'
},
{
dictValue
:
'2'
,
dictLabel
:
'维修'
,
type
:
'warning'
},
{
dictValue
:
'3'
,
dictLabel
:
'废弃'
,
type
:
'danger'
},
{
dictValue
:
'4'
,
dictLabel
:
'停用'
,
type
:
'info'
}
],
// 设备类型
insCategoryList
:
[
{
dictValue
:
'1'
,
dictLabel
:
'一般设备'
},
{
dictValue
:
'2'
,
dictLabel
:
'标准设备'
},
{
dictValue
:
'3'
,
dictLabel
:
'专业设备'
}
],
// 检定周期
zqList
:
[
{
dictValue
:
'1'
,
dictLabel
:
'1月'
},
{
dictValue
:
'2'
,
dictLabel
:
'3月'
},
{
dictValue
:
'3'
,
dictLabel
:
'6月'
},
{
dictValue
:
'4'
,
dictLabel
:
'12月'
}
],
// 检定方法
jdffList
:
[
{
dictValue
:
'1'
,
dictLabel
:
'内检'
},
{
dictValue
:
'2'
,
dictLabel
:
'外检'
}
],
sinsCategoryList
:
[
{
dictValue
:
'1'
,
dictLabel
:
'一般设备'
},
{
dictValue
:
'2'
,
dictLabel
:
'标准设备'
}
],
insLbList
:
[
{
dictValue
:
'2'
,
dictLabel
:
'B'
},
{
dictValue
:
'3'
,
dictLabel
:
'C'
}
],
insLbL
:
[{
dictValue
:
'1'
,
dictLabel
:
'A'
}],
zqDate
:
[
{
dictLabel
:
'1'
},
{
dictLabel
:
'3'
},
{
dictLabel
:
'6'
},
{
dictLabel
:
'12'
}
]
}
export
default
deviceField
src/views/query/index.vue
0 → 100644
View file @
5d4df410
<
template
>
<div
@
keyup
.
enter=
"handleQuery"
style=
"display: flex; flex-direction: column; height: 78vh;"
>
<el-form
ref=
"queryForm"
:model=
"queryParams"
:inline=
"true"
style=
"border-bottom: 1px solid #dcdcdc;"
>
<el-form-item
label=
"编号"
prop=
"insCode"
style=
"padding-left: 10px"
>
<el-input
v-model=
"queryParams.businessId"
placeholder=
"请输入编号"
clearable
autofocus
:maxlength=
"30"
size=
"small"
style=
"width: 120px;"
/>
<el-button
style=
"width: 75px;margin-left: 0"
:class=
"commonField.queryClass"
:type=
"commonField.typePrimary"
:icon=
"commonField.queryIcon"
:size=
"commonField.smallSize"
@
click=
"handleQuery"
>
查询
</el-button>
<el-button
style=
"width: 75px;margin-left: 0"
:class=
"commonField.resetClass"
:icon=
"commonField.resetIcon"
:size=
"commonField.smallSize"
@
click=
"resetQuery"
>
重置
</el-button>
</el-form-item>
<div
style=
"float: right"
/>
</el-form>
<div
class=
"scrollable-form"
>
<el-form
ref=
"formRef"
:model=
"form"
size=
"small"
label-width=
"90px"
style=
"flex: 1;"
>
<!-- 管理编号和仪器名称 -->
<el-row>
<el-form-item
label=
"管理:"
prop=
"insCode"
>
<span>
{{
form
.
insManage
}}
</span>
</el-form-item>
</el-row>
<el-row
:span=
"12"
>
<el-form-item
label=
"类型:"
prop=
"insType"
>
<template
v-for=
"dict in insTypeList"
>
{{
form
.
insType
===
dict
.
dictValue
?
dict
.
dictLabel
:
''
}}
</
template
>
</el-form-item>
</el-row>
<el-row
:span=
"12"
>
<el-form-item
label=
"管理编号:"
prop=
"insCode"
>
<span>
{{ form.insCode }}
</span>
</el-form-item>
</el-row>
<el-row
:span=
"12"
>
<el-form-item
label=
"所属部门:"
prop=
"deptName"
>
<span>
{{ form.deptName }}
</span>
</el-form-item>
</el-row>
<el-row
:span=
"12"
>
<el-form-item
label=
"投入日期:"
prop=
"insTrdate"
>
<span>
{{ form.insTrdate | transformDateByFormat('yyyy-MM-DD') }}
</span>
</el-form-item>
</el-row>
<el-row
:span=
"12"
>
<el-form-item
label=
"使用地点:"
prop=
"insAddress"
>
<span>
{{ form.insAddress }}
</span>
</el-form-item>
</el-row>
<el-row
:span=
"12"
>
<el-form-item
label=
"负责人:"
prop=
"insDd"
>
<span>
{{ form.insDd }}
</span>
</el-form-item>
</el-row>
<el-row
:span=
"12"
>
<el-form-item
label=
"仪器名称:"
prop=
"insName"
>
<span>
{{ form.insName }}
</span>
</el-form-item>
</el-row>
<el-row
:span=
"12"
>
<el-form-item
label=
"生产厂家:"
prop=
"insFactory"
>
<span>
{{ form.insFactory }}
</span>
</el-form-item>
</el-row>
<el-row
:span=
"12"
>
<el-form-item
label=
"型号:"
prop=
"insModel"
>
<span>
{{ form.insModel }}
</span>
</el-form-item>
</el-row>
<el-row
:span=
"12"
>
<el-form-item
label=
"出厂编号:"
prop=
"insFactoryCode"
>
<span>
{{ form.insFactoryCode }}
</span>
</el-form-item>
</el-row>
<el-row
:span=
"12"
>
<el-form-item
label=
"一般量程:"
prop=
"insLc"
>
<span>
{{ form.insLc }}
</span>
</el-form-item>
</el-row>
<el-row
:span=
"12"
>
<el-form-item
label=
"精度:"
prop=
"insAccuracy"
>
<span>
{{ form.insAccuracy }}
</span>
</el-form-item>
</el-row>
<el-row
:span=
"24"
>
<el-form-item
label=
"实物:"
prop=
"insImplementation"
>
<div
class=
"photo-wall"
v-if=
"fileFakeList.length > 0"
>
<el-carousel
height=
"150px"
style=
"width: 150px;"
indicator-position=
"none"
>
<el-carousel-item
v-for=
"(item, index) in fileFakeList"
>
<el-image
@
click=
"handlePreview(item)"
:key=
"index"
:src=
"item.url"
:teleported=
"true"
style=
"width: 150px; height: 150px;"
fit=
"cover"
/>
</el-carousel-item>
</el-carousel>
</div>
</el-form-item>
</el-row>
<el-row
:span=
"24"
>
<el-form-item
label=
"参照物:"
prop=
"file"
>
<div
class=
"photo-wall"
v-if=
"fileList.length > 0"
>
<el-carousel
height=
"150px"
style=
"width: 150px;"
indicator-position=
"none"
>
<el-carousel-item
v-for=
"(item, index) in fileList"
>
<el-image
@
click=
"handlePreview(item)"
:key=
"index"
:src=
"item.url"
z-index=
"2000"
style=
"width: 150px; height: 150px;"
fit=
"cover"
/>
</el-carousel-item>
</el-carousel>
</div>
</el-form-item>
</el-row>
<el-row
:span=
"12"
>
<el-form-item
label=
"检定方法:"
prop=
"insJdff"
>
<span>
<
template
v-for=
"dict in deviceField.jdffList"
>
{{
form
.
insJdff
===
dict
.
dictValue
?
dict
.
dictLabel
:
''
}}
</
template
>
</span>
</el-form-item>
</el-row>
<el-row
:span=
"12"
>
<el-form-item
label=
"检定周期:"
prop=
"insZq"
>
<span>
<
template
v-for=
"dict in deviceField.zqList"
>
{{
form
.
insZq
===
dict
.
dictValue
?
dict
.
dictLabel
:
''
}}
</
template
>
</span>
</el-form-item>
</el-row>
<el-row
:span=
"12"
>
<el-form-item
label=
"有效期:"
prop=
"insValidDate"
>
<span>
{{ form.insValidDate | transformDateByFormat('yyyy-MM-DD') }}
</span>
</el-form-item>
</el-row>
<el-row
:span=
"12"
>
<el-form-item
label=
"检定日期:"
prop=
"insJdrq"
>
<span>
{{ form.insJdrq | transformDateByFormat('yyyy-MM-DD') }}
</span>
</el-form-item>
</el-row>
<el-row
:span=
"24"
>
<el-form-item
label=
"等级:"
prop=
"insLb"
>
<span>
<
template
v-for=
"dict in deviceField.insLbList"
>
{{
form
.
insLb
===
dict
.
dictValue
?
dict
.
dictLabel
:
''
}}
</
template
>
</span>
</el-form-item>
</el-row>
<el-row
:span=
"24"
>
<el-form-item
label=
"备注:"
prop=
"remarks"
>
<span>
{{ form.remarks }}
</span>
</el-form-item>
</el-row>
<el-row
:span=
"12"
>
<el-form-item
label=
"创建人:"
prop=
"createBy"
>
<span>
{{ form.createUsername }}
</span>
</el-form-item>
</el-row>
<el-row
:span=
"12"
>
<el-form-item
label=
"创建时间:"
prop=
"createDate"
>
<span>
{{ form.createDate }}
</span>
</el-form-item>
</el-row>
</el-form>
</div>
<el-dialog
:visible
.
sync=
"dialogVisible"
:close-on-click-modal=
"true"
>
<img
width=
"100%"
:src=
"dialogImageUrl"
alt=
""
>
</el-dialog>
</div>
</template>
<
script
>
import
commonField
from
"@/utils/commonField"
;
import
{
getInsStrumentInfo
}
from
"@/api/query/query"
;
import
{
getDict
}
from
"@/api/system/dict/data"
;
import
deviceField
from
"@/utils/device/deviceField"
;
export
default
{
name
:
"index"
,
data
()
{
return
{
dialogVisible
:
false
,
dialogImageUrl
:
''
,
// 管理字典
insManageList
:
{},
// 类型字典
insTypeList
:
{},
// 参照物列表
fileList
:
[],
// 实物列表
fileFakeList
:
[],
// 查询参数
queryParams
:
{
businessId
:
''
,
},
// 表单参数
form
:
{
businessId
:
''
,
insCode
:
''
,
insType
:
''
,
insName
:
''
,
insFactoryCode
:
''
,
insCategory
:
''
,
insModel
:
''
,
insAccuracy
:
''
,
insFactory
:
''
,
insLc
:
''
,
insTrdate
:
''
,
insAddress
:
''
,
insDd
:
''
,
insLb
:
''
,
insZq
:
''
,
remarks
:
''
,
insJdff
:
''
,
insValidDate
:
''
,
insJdrq
:
''
,
insZsOssId
:
''
,
insStatus
:
''
,
insSureUser
:
''
,
insSureDate
:
''
,
insSureStatus
:
''
,
insSureRemark
:
''
,
insManage
:
''
,
insDeptId
:
''
,
deptName
:
''
,
createDate
:
''
,
createUsername
:
''
,
flag
:
'1'
}
}
},
computed
:
{
commonField
()
{
return
commonField
},
deviceField
()
{
return
deviceField
}
},
created
()
{
this
.
getInsManageList
()
this
.
getInsType
()
// 获取类型字典
},
methods
:
{
handlePreview
(
file
)
{
this
.
dialogImageUrl
=
file
.
url
this
.
dialogVisible
=
true
},
query
()
{
if
(
this
.
queryParams
.
businessId
===
''
)
{
return
}
getInsStrumentInfo
(
this
.
queryParams
.
businessId
).
then
(
response
=>
{
this
.
form
=
response
.
data
this
.
fileList
=
response
.
data
.
filelist
.
filter
(
fileItem
=>
{
return
fileItem
.
insFileType
===
'2'
})
this
.
fileList
.
forEach
(
fileItem
=>
{
fileItem
.
instrumentId
=
this
.
form
.
businessId
})
this
.
fileFakeList
=
response
.
data
.
filelist
.
filter
(
fileItem
=>
{
return
fileItem
.
insFileType
===
'1'
})
this
.
fileFakeList
.
forEach
(
fileItem
=>
{
fileItem
.
instrumentId
=
this
.
form
.
businessId
})
})
},
/** 查询按钮操作 */
handleQuery
()
{
this
.
query
()
// 列表查询
},
/** 重置按钮操作 */
resetQuery
()
{
this
.
queryParams
=
{
businessId
:
''
,
}
// 参照物列表
this
.
fileList
=
[]
// 实物列表
this
.
fileFakeList
=
[]
this
.
form
=
{}
},
// 获取管理字典
getInsManageList
()
{
getDict
(
'INS_MANAGE'
).
then
(
result
=>
{
this
.
insManageList
=
result
.
data
})
},
// 获取类型字典
getInsType
()
{
getDict
(
'INS_TYPE'
).
then
(
result
=>
{
this
.
insTypeList
=
result
.
data
})
},
}
}
</
script
>
<
style
scoped
>
.scrollable-form
{
overflow-y
:
auto
;
border
:
1px
solid
#dcdcdc
;
padding
:
10px
;
flex
:
1
;
}
</
style
>
vue.config.js
View file @
5d4df410
...
...
@@ -93,7 +93,7 @@ module.exports = {
// target: `http://49.232.167.247:20014/`, // 线上
// target: `http://192.168.1.30:8082/`,
target
:
`http://192.168.0.3:8092/`
,
// target: `http://localhost:80
89
/`,
// target: `http://localhost:80
92
/`,
// target: `http://49.232.167.247:20014/`,
// changeOrigin: true,
pathRewrite
:
{
...
...
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