Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
patzn-cloud-web-back-soil
Overview
Overview
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
wangweidong
patzn-cloud-web-back-soil
Commits
f19c568f
Commit
f19c568f
authored
Jan 09, 2021
by
wangweidong
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/dev' into dev
# Conflicts: # api/soil/soil-statistics.js
parents
d612f605
9a9e741d
Show whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
990 additions
and
92 deletions
+990
-92
soil-statistics.js
api/soil/soil-statistics.js
+2
-1
soil-test.js
api/soil/soil-test.js
+11
-1
nuxt.config.js
nuxt.config.js
+0
-1
Instock.vue
pages/soil-alone-sample-instock/Instock.vue
+4
-5
SoilItemReportTemplate.vue
...nage/soil-item-report-template/SoilItemReportTemplate.vue
+18
-1
Preparation.vue
pages/soil-sample-manage/sample-preparation/Preparation.vue
+107
-33
PreparationOther.vue
...oil-sample-manage/sample-preparation/PreparationOther.vue
+387
-0
SelectPrinter.vue
...s/soil-sample-manage/sample-preparation/SelectPrinter.vue
+140
-0
ViewGdsData.vue
pages/soil-test-manage/test-input/ViewGdsData.vue
+62
-39
CreateBatchItemReport.vue
...est-manage/test-input/item-tabs/CreateBatchItemReport.vue
+159
-0
ItemLeftList.vue
pages/soil-test-manage/test-input/item-tabs/ItemLeftList.vue
+82
-2
ItemLeftList.vue
...k-manage/entrust-sample-manage/item-tabs/ItemLeftList.vue
+1
-1
ItemRightList.vue
...-manage/entrust-sample-manage/item-tabs/ItemRightList.vue
+12
-7
routes.js
router/routes.js
+5
-1
No files found.
api/soil/soil-statistics.js
View file @
f19c568f
...
...
@@ -78,5 +78,6 @@ export default {
pagePersonalTaskStatistics
:
data
=>
http
.
post
(
'soil/v1/statistics/page_personal_task_statistics'
,
data
)
.
then
(
res
=>
res
)
.
then
(
res
=>
res
),
_getLabel
:
data
=>
http
.
post
(
'/res/v1/label/page'
,
data
).
then
(
res
=>
res
)
}
api/soil/soil-test.js
View file @
f19c568f
...
...
@@ -48,7 +48,17 @@ export default {
.
post
(
'soil/v1/experiment/page_allot_by_exp_his'
,
data
)
.
then
(
res
=>
res
),
pageExperimentAllot
:
data
=>
http
.
post
(
'soil/v1/experiment/page_exp_allot'
,
data
).
then
(
res
=>
res
),
http
.
post
(
'soil/v1/experiment/page_exp_allot_bath'
,
data
).
then
(
res
=>
res
),
pageExperimentAllotBath
:
data
=>
https
.
post
(
'soil/v1/experiment/page_exp_allot_bath?page='
+
data
.
page
+
'&rows='
+
data
.
rows
,
JSON
.
stringify
(
data
.
obj
)
)
.
then
(
res
=>
res
),
pageExperimentAllotHis
:
data
=>
http
.
post
(
'soil/v1/experiment/page_exp_allot_his'
,
data
).
then
(
res
=>
res
),
pageTestByExp
:
data
=>
...
...
nuxt.config.js
View file @
f19c568f
...
...
@@ -19,7 +19,6 @@ module.exports = {
title
:
'土工试验LIMS'
,
meta
:
[
{
charset
:
'utf-8'
},
{
name
:
'viewport'
,
content
:
'width=device-width, initial-scale=1'
},
{
hid
:
'description'
,
name
:
'description'
,
content
:
pkg
.
description
}
],
script
:
[
...
...
pages/soil-alone-sample-instock/Instock.vue
View file @
f19c568f
...
...
@@ -4,11 +4,10 @@
<p
slot=
"header"
>
{{
modalTitle
}}
</p>
<div>
<Form
id=
"edit-form"
ref=
"formObj"
:model=
"formObj"
:rules=
"ruleValidate"
:label-width=
"100"
inline
>
<Form-item
label=
"库房号"
prop=
"storehouse"
style=
"width: 100%"
>
<Input
v-model=
"formObj.storehouse"
name=
"storehouse"
placeholder=
"请输入库房号"
style=
"width: 95%;"
/>
<span
@
click=
"_storageModel()"
style=
"font-size: 20px;color: #00b5ec"
>
+
</span>
<Form-item
@
click
.
native=
"_storageModel()"
label=
"库房号"
prop=
"storehouse"
style=
"width: 100%"
>
<Input
v-model=
"formObj.storehouse"
name=
"storehouse"
placeholder=
"请输入库房号"
/>
</Form-item>
<Form-item
label=
"架位号"
prop=
"shelfCode"
style=
"width: 100%"
>
<Form-item
@
click
.
native=
"_storageModel()"
label=
"架位号"
prop=
"shelfCode"
style=
"width: 100%"
>
<Input
v-model=
"formObj.shelfCode"
name=
"shelfCode"
placeholder=
"请输入架位号"
/>
</Form-item>
<Form-item
label=
"入库人"
prop=
"inStocker"
style=
"width: 100%"
>
...
...
@@ -99,7 +98,7 @@ export default {
}
],
ruleValidate
:
{
wa
rehouse
:
[
sto
rehouse
:
[
{
required
:
true
,
message
:
'库房号不能为空'
,
trigger
:
'blur'
}
]
},
...
...
pages/soil-report-manage/soil-item-report-template/SoilItemReportTemplate.vue
View file @
f19c568f
...
...
@@ -13,6 +13,14 @@
<Input
v-model=
"formObj.alias"
@
on-enter=
"_formSearch"
name=
"alias"
placeholder=
"请输入模板名称"
clearable
></Input>
<input
type=
"hidden"
name=
"classifyId"
>
</Form-item>
<Form-item
label=
"类别"
prop=
"classType"
>
<!--
<Input
v-model=
"formObj.classType"
@
on-keyup=
"_onKeyUp"
name=
"classType"
placeholder=
"请选择类别"
icon=
"plus-circled"
--
>
<!-- >
</Input>
-->
<el-select
v-model=
"formObj.classType"
placeholder=
"请选择类别"
size=
"small"
clearable
>
<el-option
:label=
"item.value"
:value=
"item.value"
v-for=
"(item,index) in typeList"
:key=
"index"
></el-option>
</el-select>
</Form-item>
<Form-item
class=
"search-btn"
>
<Button
@
click=
"_formSearch"
type=
"primary"
>
搜索
</Button>
</Form-item>
...
...
@@ -65,7 +73,8 @@ export default {
{
title
:
'备注'
,
key
:
'remark'
}
],
formObj
:
{
name
:
undefined
name
:
undefined
,
classType
:
undefined
},
iconMsg
:
[
{
type
:
'md-create'
,
id
:
''
,
name
:
'编辑'
},
...
...
@@ -79,6 +88,14 @@ export default {
{
type
:
'success'
,
id
:
''
,
name
:
'添加'
},
{
type
:
'error'
,
id
:
''
,
name
:
'删除'
}
],
typeList
:
[
{
value
:
'力学'
},
{
value
:
'物性'
}
],
searchOpen
:
true
,
selectIds
:
[]
}
...
...
pages/soil-sample-manage/sample-preparation/Preparation.vue
View file @
f19c568f
...
...
@@ -112,15 +112,17 @@
<!--下载插件-->
<downloadPlugin
ref=
"downloadPlugin"
/>
<SampleParpareBatchEdit
ref=
"batchEdit"
@
on-result-change=
"backData"
></SampleParpareBatchEdit>
<SelectPrinter
ref=
"selectPrint"
@
on-result-change=
"_printResult"
></SelectPrinter>
</div>
</template>
<
script
>
import
AutoComplete
from
'../../../components/base/AutoCompletes'
import
{
soilEntrust
,
soilSample
}
from
'../../../api'
import
{
soilEntrust
,
soilSample
,
soilStatistics
}
from
'../../../api'
import
{
getLodop
}
from
'../../../plugins/clodop/LodopFuncs'
// eslint-disable-next-line no-unused-vars
import
downloadPlugin
from
'../../../plugins/download/downloadPlugin'
import
SelectPrinter
from
'./SelectPrinter'
// eslint-disable-next-line no-unused-vars
import
SampleParpareBatchEdit
from
'./SampleParpareBatchEdit'
let
LODOP
...
...
@@ -128,7 +130,8 @@ export default {
components
:
{
AutoComplete
,
downloadPlugin
,
SampleParpareBatchEdit
SampleParpareBatchEdit
,
SelectPrinter
},
data
()
{
return
{
...
...
@@ -154,6 +157,7 @@ export default {
getPage
:
{
records
:
[]
},
labelCode
:
{},
currentIndex
:
-
1
,
selectData
:
[],
selectIds
:
[],
...
...
@@ -217,6 +221,14 @@ export default {
this
.
$forceUpdate
()
this
.
getPage
.
records
[
data
.
$rowIndex
].
printNum
=
data
.
row
.
printNum
},
_printResult
(
data
)
{
console
.
log
(
data
)
if
(
data
)
{
console
.
log
(
'data.printerVal'
)
this
.
printerVal
=
data
.
printerVal
this
.
_getLabelInfo
()
}
},
// 获取存储位置
_locationChange
(
msg
,
data
,
handleObj
)
{
this
.
currentRow
=
handleObj
...
...
@@ -441,11 +453,29 @@ export default {
break
}
},
_getLabelInfo
:
async
function
()
{
console
.
log
(
'this._getLabelInfo'
)
const
result
=
await
soilStatistics
.
_getLabel
(
this
.
$serializeForm
(
this
.
formObj
)
)
if
(
result
)
{
for
(
let
i
=
0
;
i
<
result
.
records
.
length
;
i
++
)
{
if
(
result
.
records
[
i
].
type
.
display
===
'打印上机标签'
)
{
this
.
labelCode
=
result
.
records
[
i
].
code
}
}
console
.
log
(
result
)
}
this
.
_printMessage
()
},
_btnClick
(
msg
)
{
switch
(
msg
)
{
case
'打印标签'
:
if
(
this
.
selectData
.
length
>
0
)
{
this
.
_printMessage
()
// this._goto()
this
.
$refs
.
selectPrint
.
_open
()
// this._getLabelInfo()
// this._printMessage()
}
else
{
this
.
$Message
.
warning
(
'请至少选择一条数据'
)
}
...
...
@@ -458,6 +488,13 @@ export default {
break
}
},
_goto
(
methodId
)
{
const
routeData
=
this
.
$router
.
resolve
({
path
:
'/blank/item_by_method'
,
query
:
{
id
:
123456
}
})
window
.
open
(
routeData
.
href
,
'_blank'
)
},
// 下载插件
_pluginDownload
()
{
this
.
$refs
.
downloadPlugin
.
_open
()
...
...
@@ -475,38 +512,75 @@ export default {
const
data
=
this
.
selectData
for
(
let
i
=
0
;
i
<
data
.
length
;
i
++
)
{
for
(
let
j
=
0
;
j
<
data
[
i
].
printNum
;
j
++
)
{
LODOP
.
PRINT_INITA
(
'0mm'
,
'0mm'
,
'60.01mm'
,
'40.01mm'
,
'打印控件功能演示_Lodop功能_打印图片3'
this
.
_printLabelOk
(
data
[
i
])
// LODOP.PRINT_INITA(
// '0mm',
// '0mm',
// '60.01mm',
// '40.01mm',
// '打印控件功能演示_Lodop功能_打印图片3'
// )
// LODOP.ADD_PRINT_BARCODE(
// '0.08mm',
// '18.39mm',
// '58.87mm',
// '24.74mm',
// 'QRCode',
// data[i].sampleCode + '-' + data[i].groupId
// )
// LODOP.ADD_PRINT_TEXT(
// 130,
// 13,
// 186,
// 20,
// this._formatDate(data[i].prepareDate)
// )
// LODOP.SET_PRINT_STYLEA(0, 'Alignment', 2)
// LODOP.ADD_PRINT_TEXT(113, 13, 187, 20, data[i].groupName)
// LODOP.SET_PRINT_STYLEA(0, 'Alignment', 2)
// LODOP.ADD_PRINT_TEXT(95, 12, 188, 20, data[i].sampleCode)
// LODOP.SET_PRINT_STYLEA(0, 'Alignment', 2)
//
// // LODOP.PRINT_DESIGN()
// LODOP.PRINT()
}
}
},
_printLabelOk
(
row
)
{
LODOP
.
PRINT_INITA
(
''
)
// 必须在设置打印机之前
// 返回的标签代码
// eslint-disable-next-line no-eval
eval
(
this
.
_replaceCodes
(
row
))
// 设置打印机
LODOP
.
SET_PRINTER_INDEX
(
this
.
printerVal
)
// 打开设计模式
// LODOP.PRINT_DESIGN()
LODOP
.
PRINT
()
},
_replaceCodes
(
row
)
{
// /g表示全局替换
let
result
=
this
.
labelCode
result
=
result
.
replace
(
/
\$
sampleCode
\$
/g
,
undefined
!==
row
.
sampleCode
?
row
.
sampleCode
:
''
)
LODOP
.
ADD_PRINT_BARCODE
(
'0.08mm'
,
'18.39mm'
,
'58.87mm'
,
'24.74mm'
,
'QRCode'
,
data
[
i
].
sampleCode
+
'-'
+
data
[
i
].
groupId
result
=
result
.
replace
(
/
\$
num
\$
/g
,
undefined
!==
row
.
num
?
row
.
num
:
''
)
result
=
result
.
replace
(
/
\$
resultDateTemp
\$
/g
,
row
.
resultDateTemp
)
result
=
result
.
replace
(
/
\$
groupName
\$
/g
,
undefined
!==
row
.
groupName
?
row
.
groupName
:
''
)
LODOP
.
ADD_PRINT_TEXT
(
130
,
13
,
186
,
20
,
this
.
_formatDate
(
data
[
i
].
prepareDate
)
// 检测项目
result
=
result
.
replace
(
/
\$
items
\$
/g
,
undefined
!==
row
.
specialItems
?
row
.
specialItems
:
''
)
LODOP
.
SET_PRINT_STYLEA
(
0
,
'Alignment'
,
2
)
LODOP
.
ADD_PRINT_TEXT
(
113
,
13
,
187
,
20
,
data
[
i
].
groupName
)
LODOP
.
SET_PRINT_STYLEA
(
0
,
'Alignment'
,
2
)
LODOP
.
ADD_PRINT_TEXT
(
95
,
12
,
188
,
20
,
data
[
i
].
sampleCode
)
LODOP
.
SET_PRINT_STYLEA
(
0
,
'Alignment'
,
2
)
// LODOP.PRINT_DESIGN()
LODOP
.
PRINT
()
}
}
// 二维码地址
result
=
result
.
replace
(
/
\$
qrCode
\$
/g
,
undefined
!==
row
.
qrCode
?
row
.
qrCode
:
''
)
return
result
},
// 时间戳转换方法 date:时间戳数字
_formatDate
(
time
)
{
...
...
pages/soil-sample-manage/sample-preparation/PreparationOther.vue
0 → 100644
View file @
f19c568f
<
template
>
<div>
<Row>
<!--操作-->
<!--内容-->
<Col
span=
"24"
>
<element-table
ref=
"pageTable"
:page-columns=
"pageColumns"
:table-height=
"tableHeight"
:get-page=
"getPage"
show-check-box
hide-page
@
on-result-change=
"_tableResultChange"
>
<el-table-column
v-for=
"item in pageColumns"
:key=
"item.key"
show-overflow-tooltip
sortable
:prop=
"item.key"
:label=
"item.title"
:align=
"item.align"
:width=
"item.width"
:min-width=
"200"
:fixed=
"item.fixed?item.fixed:undefined"
>
<template
slot-scope=
"scope"
>
<span
v-if=
"item.datetime"
>
{{
scope
.
row
[
item
.
key
]?
$dateformat
(
scope
.
row
[
item
.
key
],
'yyyy-mm-dd HH:MM'
):
''
}}
</span>
<span
v-else-if=
"item.key==='content'"
class=
"blue-color"
>
{{
scope
.
row
[
item
.
key
]?
scope
.
row
[
item
.
key
]:
''
}}
</span>
<span
v-else
>
{{
scope
.
row
[
item
.
key
]
}}
</span>
</
template
>
</el-table-column>
</element-table>
</Col>
</Row>
</div>
</template>
<
script
>
export
default
{
layout
:
'blank-layout'
,
components
:
{},
data
()
{
return
{
formId
:
''
,
showModal
:
false
,
wayData
:
new
Map
(),
formObj
:
{},
footerList
:
[],
list
:
[
{
name
:
'取消'
,
type
:
''
,
id
:
''
},
{
name
:
'制备完成'
,
type
:
'primary'
,
id
:
''
}
],
iconMsg
:
[
// { type: 'md-create', id: '', name: '批量赋值' },
// { type: 'md-trash', id: '', name: '删除' }
],
getPage
:
{
records
:
[]
},
labelCode
:
{},
currentIndex
:
-
1
,
selectData
:
[],
selectIds
:
[],
pageColumns
:
[
{
title
:
'试样编号'
,
key
:
'sampleCode'
,
width
:
130
},
{
title
:
'试样深度'
,
key
:
'sampleDepth'
,
width
:
130
},
{
title
:
'打印数量'
,
key
:
'printNum'
,
width
:
130
,
editCell
:
true
},
{
title
:
'检验科室'
,
key
:
'groupName'
,
width
:
130
},
// 暂时屏蔽
// {title: '打印份数', key: 'printNum', width: 110},
{
title
:
'制备类型'
,
key
:
'type'
,
width
:
130
},
{
title
:
'制备方式'
,
key
:
'prepareWay'
,
width
:
130
,
editCell
:
true
},
{
title
:
'制备数量'
,
key
:
'quantity'
,
width
:
150
,
editCell
:
true
},
{
title
:
'单位'
,
key
:
'unit'
,
width
:
110
,
editCell
:
true
},
{
title
:
'状态'
,
key
:
'status'
,
width
:
150
},
{
title
:
'保存方式'
,
key
:
'keepWay'
,
width
:
150
,
editCell
:
true
},
{
title
:
'保存容器'
,
key
:
'keepContainer'
,
width
:
150
,
editCell
:
true
},
{
title
:
'制备时间'
,
key
:
'prepareDate'
,
width
:
200
,
date
:
true
,
editCell
:
true
},
{
title
:
'制备人'
,
key
:
'preparer'
,
width
:
130
,
editCell
:
true
},
{
title
:
'备注'
,
key
:
'remark'
,
width
:
150
,
editCell
:
true
}
],
currentRow
:
{},
preparationWayData
:
[],
resultStateWayData
:
[],
saveWayData
:
[],
preparerList
:
[],
sampleIds
:
''
,
unitData
:
[],
locationList
:
[],
packList
:
[],
isAccurate
:
''
}
},
computed
:
{
tableHeight
:
function
()
{
return
this
.
$tableHeight
(
'tableModal'
)
}
},
mounted
()
{},
methods
:
{
// 获取存储位置
_locationChange
(
msg
,
data
,
handleObj
)
{
this
.
currentRow
=
handleObj
switch
(
msg
)
{
case
'select'
:
this
.
$set
(
this
.
currentRow
,
'storePlace'
,
data
)
break
case
'query'
:
this
.
$set
(
this
.
currentRow
,
'storePlace'
,
data
)
this
.
_getLocation
(
data
)
break
case
'focus'
:
this
.
_getLocation
()
break
}
},
_getLocation
(
data
)
{
const
obj
=
{}
if
(
data
)
{
obj
.
storePlace
=
data
}
this
.
$store
.
dispatch
(
'FoodSamplePreparation/getPositionList'
,
obj
)
.
then
(()
=>
{
this
.
locationList
=
this
.
$store
.
state
.
FoodSamplePreparation
.
list
})
},
// 单位
_unitChange
(
msg
,
data
,
handleObj
)
{
this
.
_handleRow
(
handleObj
)
switch
(
msg
)
{
case
'select'
:
this
.
currentRow
.
unit
=
data
break
case
'query'
:
this
.
currentRow
.
unit
=
data
break
}
},
// 多个参数查询
// _dicSearch: async function() {
// const data = ['制备方式', '保存方式', '保存容器']
// const result = await soilSample.getDictList(data)
// if (result) {
// this.keepWayList = result
// }
// },
backData
(
data
)
{
this
.
$forceUpdate
()
console
.
log
(
data
)
console
.
log
(
this
.
selectData
)
for
(
let
i
=
0
;
i
<
this
.
selectData
.
length
;
i
++
)
{
Object
.
assign
(
this
.
selectData
[
i
],
data
)
}
console
.
log
(
'合并后'
,
this
.
selectData
)
},
_preparationChange
(
msg
,
data
,
handleObj
)
{
console
.
log
(
'data'
,
data
)
this
.
_handleRow
(
handleObj
)
this
.
currentRow
.
prepareWay
=
data
},
_testItemChange
(
msg
,
data
,
handleObj
)
{
this
.
_handleRow
(
handleObj
)
this
.
currentRow
.
resultState
=
data
.
name
},
_saveChange
(
msg
,
data
,
handleObj
)
{
console
.
log
(
'data'
,
data
)
this
.
_handleRow
(
handleObj
)
this
.
currentRow
.
keepWay
=
data
},
_preparerChange
(
msg
,
data
,
handleObj
)
{
this
.
_handleRow
(
handleObj
)
this
.
currentRow
.
preparer
=
data
},
timeChange
(
data
)
{
console
.
log
(
data
)
this
.
$forceUpdate
()
this
.
currentRow
.
prepareDate
=
data
.
prepareDate
console
.
log
(
this
.
getPage
.
records
)
},
_packSaveChange
(
msg
,
data
,
handleObj
)
{
console
.
log
(
'data'
,
data
)
this
.
_handleRow
(
handleObj
)
this
.
currentRow
.
keepContainer
=
data
},
_open
(
sampleIds
)
{
this
.
sampleIds
=
sampleIds
this
.
showModal
=
true
this
.
getPage
.
records
=
[]
this
.
preparationWayData
=
[]
this
.
saveWayData
=
[]
this
.
packList
=
[]
this
.
unitData
=
[]
this
.
preparerList
=
[]
this
.
footerList
=
[]
for
(
let
i
=
0
;
i
<
this
.
list
.
length
;
i
++
)
{
if
(
this
.
$showBtn
(
this
.
list
[
i
].
id
))
{
this
.
footerList
.
push
(
this
.
list
[
i
])
}
}
},
_footerResult
(
name
)
{
switch
(
name
)
{
case
'取消'
:
this
.
_cancel
()
break
case
'仅流转微生物'
:
this
.
_changeMic
()
break
case
'制备完成'
:
this
.
_ok
()
break
}
},
_cancel
()
{
this
.
showModal
=
false
this
.
_hideLoading
()
},
_ok
()
{
this
.
$refs
.
pageTable
.
_showLoading
()
const
prepareList
=
[]
for
(
let
i
=
0
;
i
<
this
.
getPage
.
records
.
length
;
i
++
)
{
prepareList
.
push
(
this
.
getPage
.
records
[
i
])
}
if
(
prepareList
.
length
===
0
)
{
this
.
$Message
.
warning
(
'制备数据不能为空'
)
this
.
$refs
.
pageTable
.
_hideLoading
()
this
.
_hideLoading
()
return
false
}
this
.
save
({
prepareList
:
prepareList
})
},
_resultChange
(
msg
)
{
this
.
showModal
=
false
this
.
$Message
.
success
(
msg
)
this
.
$emit
(
'on-result-change'
)
this
.
_hideLoading
()
this
.
$refs
.
pageTable
.
_hideLoading
()
},
_hideLoading
()
{
this
.
$refs
.
footerModal
.
_hideLoading
()
},
_tableResultChange
(
msg
,
data
)
{
switch
(
msg
)
{
case
'page'
:
this
.
_page
()
break
case
'selectData'
:
this
.
selectData
=
data
const
selectIds
=
[]
for
(
let
i
=
0
;
i
<
data
.
length
;
i
++
)
{
selectIds
.
push
(
data
[
i
].
id
)
}
this
.
selectIds
=
selectIds
break
case
'iconClick'
:
this
.
_iconClick
(
data
.
name
,
data
.
rowData
,
data
.
componentName
,
data
.
rowIndex
)
break
}
},
_btnClick
(
msg
)
{
switch
(
msg
)
{
case
'打印标签'
:
if
(
this
.
selectData
.
length
>
0
)
{
this
.
_goto
()
// this._getLabelInfo()
// this._printMessage()
}
else
{
this
.
$Message
.
warning
(
'请至少选择一条数据'
)
}
break
case
'批量填写制备信息'
:
this
.
_writeInfo
()
break
case
'删除'
:
this
.
_deleteSelected
()
break
}
},
_goto
(
methodId
)
{
const
routeData
=
this
.
$router
.
resolve
({
path
:
'/blank/item_by_method'
,
query
:
{
id
:
123456
}
})
window
.
open
(
routeData
.
href
,
'_blank'
)
},
// 下载插件
_pluginDownload
()
{
this
.
$refs
.
downloadPlugin
.
_open
()
},
// 时间戳转换方法 date:时间戳数字
_selectStaff
()
{
this
.
$refs
.
userModal
.
_open
(
'preparationPerson'
)
},
_userData
(
data
)
{
// 选择人员返回数据
this
.
currentRow
.
preparationPerson
=
data
.
realname
this
.
currentRow
.
preparationPersonId
=
data
.
userId
},
// 批量赋值(这里用index判断,不用id是因为id有时候没有值,而且id不能随意赋值)
_copyPlan
(
data
)
{
const
ids
=
this
.
selectData
const
records
=
this
.
getPage
.
records
if
(
ids
.
length
===
0
)
{
this
.
$Message
.
warning
(
'请勾选数据进行赋值!'
)
}
else
{
for
(
let
i
=
0
;
i
<
ids
.
length
;
i
++
)
{
for
(
let
j
=
0
;
j
<
records
.
length
;
j
++
)
{
if
(
ids
[
i
].
currentIndex
===
records
[
j
].
currentIndex
)
{
this
.
_singleCopy
(
j
,
data
)
}
}
}
}
},
// 单独赋值信息
_singleCopy
(
j
,
data
)
{
const
tempData
=
{
preparationWay
:
data
.
preparationWay
,
resultQuantity
:
data
.
resultQuantity
?
data
.
resultQuantity
:
0
,
unit
:
data
.
unit
,
resultState
:
data
.
resultState
?
data
.
resultState
:
''
,
saveWay
:
data
.
saveWay
?
data
.
saveWay
:
''
,
pack
:
data
.
pack
?
data
.
pack
:
''
,
storePlace
:
data
.
storePlace
?
data
.
storePlace
:
''
,
printNum
:
data
.
printNum
?
data
.
printNum
:
1
,
remark
:
data
.
remark
?
data
.
remark
:
''
}
this
.
getPage
.
records
[
j
].
preparationWay
=
tempData
.
preparationWay
this
.
getPage
.
records
[
j
].
resultQuantity
=
tempData
.
resultQuantity
this
.
getPage
.
records
[
j
].
unit
=
tempData
.
unit
this
.
getPage
.
records
[
j
].
resultState
=
tempData
.
resultState
this
.
getPage
.
records
[
j
].
saveWay
=
tempData
.
saveWay
this
.
getPage
.
records
[
j
].
pack
=
tempData
.
pack
this
.
getPage
.
records
[
j
].
storePlace
=
tempData
.
storePlace
this
.
getPage
.
records
[
j
].
printNum
=
tempData
.
printNum
this
.
getPage
.
records
[
j
].
remark
=
tempData
.
remark
},
// 操作的序号
_handleRow
(
data
)
{
console
.
log
(
data
)
this
.
currentIndex
=
data
.
index
this
.
currentRow
=
data
.
row
},
_handleTimeRow
(
data
)
{
console
.
log
(
this
.
currentRow
)
this
.
currentRow
=
data
.
row
}
}
}
</
script
>
pages/soil-sample-manage/sample-preparation/SelectPrinter.vue
0 → 100644
View file @
f19c568f
<
template
>
<div>
<Modal
v-model=
"showModal"
:mask-closable=
"false"
class=
"zIndex-1100"
>
<p
slot=
"header"
>
{{
modalTitle
}}
</p>
<div>
<Alert
v-show=
"isPrinterDownload"
type=
"error"
><p
@
click=
"_download"
>
未安装打印控件,点此
<a>
下载
</a>
,安装完请刷新页面
</p></Alert>
<div
v-show=
"!isPrinterDownload"
>
<Form
ref=
"formObj"
:rules=
"ruleValidate"
:label-width=
"70"
onsubmit=
"return false"
>
<Form-item
label=
"打印机"
prop=
"printerVal"
>
<Select
v-model=
"printerVal"
@
on-change=
"_printChange"
name=
"printerVal"
placeholder=
"请选择打印机"
>
<Option
v-for=
"item in printList"
:value=
"item.value"
:key=
"item.value"
>
{{
item
.
name
}}
</Option>
</Select>
</Form-item>
</Form>
</div>
</div>
<div
slot=
"footer"
class=
"btn-width"
>
<modal-footer
ref=
"footerModal"
@
on-result-change=
"_footerResult"
:footer=
"footerList"
></modal-footer>
</div>
</Modal>
</div>
</
template
>
<
script
>
/**
* 选择打印机
*/
import
global
from
'../../../api/config'
import
{
getLodop
}
from
'../../../plugins/clodop/LodopFuncs'
let
LODOP
export
default
{
components
:
{},
data
()
{
const
validatePrinter
=
(
rule
,
value
,
callback
)
=>
{
if
(
this
.
printerVal
!==
null
)
{
callback
()
}
else
{
callback
(
new
Error
(
'请选择打印机~'
))
}
}
return
{
modalTitle
:
'选择打印机'
,
showModal
:
false
,
ruleValidate
:
{
printerVal
:
[
{
required
:
true
,
validator
:
validatePrinter
,
trigger
:
'change'
}
]
},
placeholder
:
''
,
footerList
:
[
{
id
:
''
,
name
:
'取消'
,
type
:
''
},
{
id
:
''
,
name
:
'确定'
,
type
:
'primary'
}
],
printList
:
[],
printerVal
:
null
,
type
:
''
,
isPrinterDownload
:
false
}
},
methods
:
{
// 获取打印机对象
_setPrinter
()
{
// 首先判断是否获取到打印机对象
if
(
undefined
===
LODOP
||
LODOP
===
'undefined'
)
{
LODOP
=
getLodop
()
}
// 其次判断是否安装打印机控件
if
(
undefined
===
LODOP
||
LODOP
===
'undefined'
)
{
this
.
isPrinterDownload
=
true
return
false
}
if
(
LODOP
.
GET_PRINTER_COUNT
()
===
0
)
{
this
.
$Message
.
warning
(
'系统未关联打印机,请确认....'
)
return
false
}
this
.
_createPrinterList
()
},
// 获取打印机列表
_createPrinterList
()
{
LODOP
=
getLodop
()
const
iPrinterCount
=
LODOP
.
GET_PRINTER_COUNT
()
const
printList
=
[]
for
(
let
i
=
0
;
i
<
iPrinterCount
;
i
++
)
{
printList
.
push
({
name
:
LODOP
.
GET_PRINTER_NAME
(
i
),
value
:
i
})
}
console
.
log
(
printList
)
this
.
printList
=
printList
if
(
this
.
printList
.
length
)
{
// 默认第一个打印机
this
.
printerVal
=
this
.
printList
[
0
].
value
}
},
_open
(
type
)
{
this
.
showModal
=
true
this
.
isPrinterDownload
=
false
this
.
type
=
type
// 打印标签还是自定义打印
this
.
_setPrinter
()
this
.
_createPrinterList
()
},
_printChange
(
data
)
{
this
.
printerVal
=
data
},
_footerResult
(
name
)
{
switch
(
name
)
{
case
'取消'
:
this
.
_cancel
()
break
case
'确定'
:
this
.
_ok
()
break
}
this
.
$refs
.
footerModal
.
_hideLoading
()
},
_cancel
()
{
this
.
showModal
=
false
},
_ok
()
{
this
.
$refs
.
formObj
.
validate
(
valid
=>
{
if
(
valid
)
{
this
.
$emit
(
'on-result-change'
,
{
printerVal
:
this
.
printerVal
,
type
:
this
.
type
})
this
.
showModal
=
false
}
else
{
this
.
$Message
.
error
(
'表单验证失败!'
)
}
})
},
// 下载打印机
_download
()
{
window
.
open
(
global
.
staticURL
+
'/clodop/CLodop_Setup_for_Win32NT.exe'
,
'_blank'
)
}
}
}
</
script
>
pages/soil-test-manage/test-input/ViewGdsData.vue
View file @
f19c568f
...
...
@@ -149,46 +149,69 @@ export default {
}
],
pageColumns
:
[
{
title
:
'阶段编号'
,
key
:
'stageNumber'
},
{
title
:
'试验开始后的时间'
,
key
:
'timeSinceStartOfTest'
},
{
title
:
'阶段开始后的时间'
,
key
:
'timeSinceStartOfStage'
},
{
title
:
'轴向位移(mm)'
,
key
:
'axialDisplacement'
},
{
title
:
'轴向载荷(kN)'
,
key
:
'axialLoad'
},
{
title
:
'水平位移(mm)'
,
key
:
'horizontalDisplacement'
},
{
title
:
'水平荷载(kN)'
,
key
:
'horizontalLoad'
},
{
title
:
'孔隙水压力(kPa)'
,
key
:
'poreWaterPressure'
},
{
title
:
'背压(kPa)'
,
key
:
'backPressure'
},
{
title
:
'回流量(mm3)'
,
key
:
'backVolume'
},
{
title
:
'未定义传感器1'
,
key
:
'undefinedTransducerOne'
},
{
title
:
'未定义传感器2'
,
key
:
'undefinedTransducerTwo'
},
{
title
:
'环剪切扭矩(Nm)'
,
key
:
'ringShearTorqueNm'
},
{
title
:
'环剪切角(degs)'
,
key
:
'ringShearTorqueDegs'
},
{
title
:
'下腔压力(kPa)'
,
key
:
'lowerChamberPr'
},
{
title
:
'下腔容积(mm3)'
,
key
:
'lowerChamberVol'
},
{
title
:
'轴向位移2(mm)'
,
key
:
'axialDisplacementTwo'
},
{
title
:
'水平位移2(mm)'
,
key
:
'horizontalDisplacementTwo'
},
{
title
:
'环向剪切荷载1(kN)'
,
key
:
'ringShearLoadOne'
},
{
title
:
'环向剪切荷载2(kN)'
,
key
:
'ringShearLoadTwo'
},
{
title
:
'轴向载荷2(kN)'
,
key
:
'axialLoadTwo'
},
{
title
:
'水平荷载2(kN)'
,
key
:
'horizontalLoadTwo'
},
{
title
:
'水平荷载3(kN)'
,
key
:
'horizontalLoadThree'
},
{
title
:
'轴向行程(mm)'
,
key
:
'axialStroke'
},
{
title
:
'水平行程(mm)'
,
key
:
'horizontalStroke'
},
{
title
:
'孔隙气压(kPa)'
,
key
:
'poreAirPressure'
},
{
title
:
'孔隙气压2(kPa)'
,
key
:
'poreAirPressureTwo'
},
{
title
:
'大气压力(kPa)'
,
key
:
'atmosphericPressure'
},
{
title
:
'背压差(kPa)'
,
key
:
'backToAirDifferential'
},
{
title
:
'围压'
,
key
:
'cellPressure'
},
{
title
:
'Stage Number'
,
key
:
'stageNumber'
},
{
title
:
'Time since start of test (s)'
,
key
:
'timeSinceStartOfTest'
},
{
title
:
'Time since start of stage (s)'
,
key
:
'timeSinceStartOfStage'
},
{
title
:
'Axial Displacement (mm)'
,
key
:
'axialDisplacement'
},
{
title
:
'Axial Load (kN)'
,
key
:
'axialLoad'
},
{
title
:
'Horizontal Displacement (mm)'
,
key
:
'horizontalDisplacement'
},
{
title
:
'Horizontal Load (kN)'
,
key
:
'horizontalLoad'
},
{
title
:
'Pore Water Pressure (kPa)'
,
key
:
'poreWaterPressure'
},
{
title
:
'Back Pressure (kPa)'
,
key
:
'backPressure'
},
{
title
:
'Back Volume (mm3)'
,
key
:
'backVolume'
},
{
title
:
'Undefined Transducer 1'
,
key
:
'undefinedTransducerOne'
},
{
title
:
'Undefined Transducer 2'
,
key
:
'undefinedTransducerTwo'
},
{
title
:
'Ring Shear Torque (Nm)'
,
key
:
'ringShearTorqueNm'
},
{
title
:
'Ring Shear Angle (degs)'
,
key
:
'ringShearTorqueDegs'
},
{
title
:
'Lower Chamber Pr (kPa)'
,
key
:
'lowerChamberPr'
},
{
title
:
'Lower Chamber Vol (mm3)'
,
key
:
'lowerChamberVol'
},
{
title
:
'Axial Displacement 2 (mm)'
,
key
:
'axialDisplacementTwo'
},
{
title
:
'Horizontal Displacement 2 (mm)'
,
key
:
'horizontalDisplacementTwo'
},
{
title
:
'Ring Shear Load 1 (kN)'
,
key
:
'ringShearLoadOne'
},
{
title
:
'Ring Shear Load 2 (kN)'
,
key
:
'ringShearLoadTwo'
},
{
title
:
'Axial Load 2 (kN)'
,
key
:
'axialLoadTwo'
},
{
title
:
'Horizontal Load 2 (kN)'
,
key
:
'horizontalLoadTwo'
},
{
title
:
'Horizontal Load 3 (kN)'
,
key
:
'horizontalLoadThree'
},
{
title
:
'Axial Stroke (mm)'
,
key
:
'axialStroke'
},
{
title
:
'Horizontal Stroke (mm)'
,
key
:
'horizontalStroke'
},
{
title
:
'Pore Air Pressure (kPa)'
,
key
:
'poreAirPressure'
},
{
title
:
'Pore Air Pressure 2 (kPa)'
,
key
:
'poreAirPressureTwo'
},
{
title
:
'Atmospheric Pressure (kPa)'
,
key
:
'atmosphericPressure'
},
{
title
:
'Back to Air differential (kPa)'
,
key
:
'backToAirDifferential'
},
{
title
:
'Cell Pressure (kPa)'
,
key
:
'cellPressure'
},
{
title
:
'Cell Volume (mm3)'
,
key
:
'cellVolume'
},
{
title
:
'孔隙风量(mm3)'
,
key
:
'poreAirVolume'
},
{
title
:
'轴向应变(%)'
,
key
:
'axialStrain'
},
{
title
:
'正应力(kPa)'
,
key
:
'normalStress'
},
{
title
:
'环剪机水平应变(%)或水平环位移(mm)'
,
key
:
'hsohrdfrsm'
},
{
title
:
'环剪机的水平应力(kPa)或剪切应力(kPa)'
,
key
:
'hsossfrsm'
},
{
title
:
'水平有效应力(kPa)'
,
key
:
'horizontalEffStress'
},
{
title
:
'有效面积(mm2)'
,
key
:
'effectiveArea'
},
{
title
:
'法向有效应力(kPa)'
,
key
:
'normalEffectiveStress'
},
{
title
:
'平均环向剪切荷载(kN)'
,
key
:
'averageRingShearLoad'
}
{
title
:
'Pore Air Volume (mm3)'
,
key
:
'poreAirVolume'
},
{
title
:
'Axial Strain (%)'
,
key
:
'axialStrain'
},
{
title
:
'Normal Stress (kPa)'
,
key
:
'normalStress'
},
{
title
:
'Horizontal Strain (%) or Horizontal Ring Displacement for Ring Shear Machine (mm)'
,
key
:
'hsohrdfrsm'
},
{
title
:
'Horizontal Stress (kPa) or Shear Stress for Ring Shear Machine (kPa)'
,
key
:
'hsossfrsm'
},
{
title
:
'Horizontal Eff Stress (kPa)'
,
key
:
'horizontalEffStress'
},
{
title
:
'Effective Area (mm2)'
,
key
:
'effectiveArea'
},
{
title
:
'Normal Effective Stress (kPa)'
,
key
:
'normalEffectiveStress'
},
{
title
:
'Average Ring Shear Load (kN)'
,
key
:
'averageRingShearLoad'
}
],
currentIndex
:
-
1
,
id
:
''
,
...
...
pages/soil-test-manage/test-input/item-tabs/CreateBatchItemReport.vue
0 → 100644
View file @
f19c568f
<
template
>
<div>
<Modal
v-model=
"showBatchModal"
v-drag
width=
"900"
>
<p
slot=
"header"
>
生成项目报告
</p>
<div>
<!--内容-->
<div
class=
"layout-content-padding"
>
<div
class=
"layout-content-main"
>
<Row>
<!--样品信息-->
<!--报告模板-->
<Col
span=
"24"
>
<ItemReportTemplate
ref=
"reportTemplate"
@
on-result-change=
"_templateResultChange"
></ItemReportTemplate>
</Col>
</Row>
</div>
</div>
</div>
<div
slot=
"footer"
>
<modal-footer
ref=
"footerModal"
:footer=
"footerBtn"
@
on-result-change=
"_footerResult"
></modal-footer>
</div>
</Modal>
<!--生成报告的进度条-->
</div>
</
template
>
<
script
>
import
ItemReportTemplate
from
'./ItemReportTemplate'
/**
* 样品列表--生成报告或者选择模板生成报告
*/
export
default
{
components
:
{
ItemReportTemplate
},
data
()
{
return
{
selectIds
:
[],
getPage
:
{
records
:
[]
},
showBatchModal
:
false
,
isLoading
:
false
,
footerBtn
:
[
{
type
:
''
,
id
:
''
,
name
:
'取消'
},
{
type
:
'primary'
,
id
:
''
,
name
:
'确定'
}
],
pageColumns
:
[
{
title
:
'样品名称'
,
key
:
'name'
,
width
:
160
},
{
title
:
'样品编号'
,
key
:
'code'
,
width
:
150
},
{
title
:
'证书编号'
,
key
:
'certificate'
,
width
:
150
}
],
reportModelId
:
''
,
backData
:
{},
// 样品数据
tableData
:
[],
// 签发日期
issueDateTemp
:
''
,
issueDate
:
''
,
showIssueModal
:
false
}
},
methods
:
{
_open
()
{
this
.
getPage
.
records
=
[]
this
.
backData
=
{}
this
.
showBatchModal
=
true
this
.
_reportTemplate
()
this
.
reportModelId
=
''
this
.
isLoading
=
false
},
// 报告模板
_reportTemplate
()
{
this
.
$refs
.
reportTemplate
.
_open
()
},
_footerResult
(
name
)
{
switch
(
name
)
{
case
'确定'
:
this
.
_ok
()
break
case
'取消'
:
this
.
showBatchModal
=
false
break
}
},
_templateResultChange
(
selectData
)
{
this
.
backData
=
selectData
[
0
]
},
_issueChange
(
data
)
{
if
(
data
)
{
this
.
issueDate
=
data
}
},
_hideLoading
()
{
this
.
$refs
.
footerModal
.
_hideLoading
()
},
_ok
()
{
this
.
$refs
.
footerModal
.
_hideLoading
()
if
(
!
this
.
backData
.
name
)
{
this
.
$Message
.
warning
(
'请选择一个原始记录模板!'
)
// this._hideLoading()
}
else
{
this
.
$emit
(
'on-result-change'
,
this
.
backData
)
this
.
showBatchModal
=
false
}
},
_issueCancel
()
{
this
.
showIssueModal
=
false
},
// 选择时间ok
_issueOk
()
{
this
.
isLoading
=
true
this
.
showIssueModal
=
false
this
.
_createOk
()
},
// 生成报告
_createOk
()
{
const
obj
=
[]
for
(
let
i
=
0
;
i
<
this
.
tableData
.
length
;
i
++
)
{
obj
.
push
({
sampleId
:
this
.
tableData
[
i
].
id
,
reportSn
:
this
.
tableData
[
i
].
reportSn
,
issueDate
:
this
.
issueDate
})
}
this
.
$layxLoading
(
true
,
'数据验证中'
)
const
validateObj
=
{
sampleReports
:
obj
,
reportModelId
:
this
.
reportModelId
}
// 先进行验证
this
.
$store
.
dispatch
(
'FoodSampleReport/createReportValidate'
,
validateObj
)
.
then
(()
=>
{
if
(
this
.
$store
.
state
.
FoodSampleReport
.
success
)
{
// 验证成功之后再建立连接,然后进行生成报告操作
// 建立websocket连接
const
currentTime
=
new
Date
().
getTime
()
this
.
$refs
.
progressModal
.
_open
(
this
.
tableData
.
length
,
currentTime
)
validateObj
.
seriesNo
=
currentTime
console
.
log
(
'生成报告的当前序列号,'
,
validateObj
.
seriesNo
)
this
.
$store
.
dispatch
(
'FoodSampleReport/createReport'
,
validateObj
)
.
then
(()
=>
{})
}
this
.
_hideLoading
()
this
.
isLoading
=
false
this
.
$layxLoading
(
false
)
})
},
_closeResult
()
{
this
.
showBatchModal
=
false
this
.
$emit
(
'on-result-change'
)
}
}
}
</
script
>
pages/soil-test-manage/test-input/item-tabs/ItemLeftList.vue
View file @
f19c568f
...
...
@@ -14,7 +14,7 @@
</Form>
</Col>
<Col
span=
"24"
>
<btn-list
@
on-result-change=
"_btnClick"
class=
"contHide"
style=
"margin-bottom: 6px;"
></btn-list>
<btn-list
@
on-result-change=
"_btnClick"
:msg=
"btn"
class=
"contHide"
style=
"margin-bottom: 6px;"
></btn-list>
</Col>
<!-- 表格 -->
<Col
span=
"24"
>
...
...
@@ -41,13 +41,15 @@
</Col>
</Row>
<CreateItemReport
ref=
"createModal"
@
on-result-change=
"_certificateSelectExcelBack"
></CreateItemReport>
<CreateBatchItemReport
ref=
"createBatchModal"
@
on-result-change=
"_templateBack"
></CreateBatchItemReport>
</div>
</template>
<
script
>
import
{
soilSample
,
soilTest
}
from
'../../../../api'
import
CreateItemReport
from
'./CreateItemReport'
import
CreateBatchItemReport
from
'./CreateBatchItemReport'
export
default
{
components
:
{
CreateItemReport
},
components
:
{
CreateItemReport
,
CreateBatchItemReport
},
data
()
{
return
{
currentComponent
:
''
,
...
...
@@ -58,7 +60,14 @@ export default {
name
:
undefined
,
entrustId
:
undefined
},
formObjBatchSample
:
{
obj
:
{
entrustId
:
''
,
nameList
:
[]
}
},
sampleIds
:
[],
batchSampleIds
:
[],
itemName
:
''
,
tableName
:
'food-task-assign-item-left'
,
// 用户自己选中的列
...
...
@@ -70,6 +79,13 @@ export default {
],
getPage
:
{},
iconMsg
:
[{
type
:
'ios-book'
,
id
:
''
,
name
:
'生成项目报告'
}],
btn
:
[
{
type
:
'success'
,
id
:
''
,
name
:
'生成项目报告'
}
],
id
:
''
,
selectId
:
''
,
pageColumns
:
[{
title
:
'检测项目'
,
key
:
'name'
,
width
:
120
}]
...
...
@@ -150,6 +166,10 @@ export default {
},
_btnClick
(
msg
)
{
switch
(
msg
)
{
case
'生成项目报告'
:
// this.$emit('on-result-change', data)
this
.
_itemReportMakeBatch
()
break
case
'自动分配'
:
this
.
_autoAssign
()
break
...
...
@@ -165,12 +185,43 @@ export default {
}
})
},
_itemReportMakeBatch
()
{
if
(
this
.
selectDataName
.
length
>
0
)
{
// this.itemName = data.name
this
.
_searchBatchSampleId
(
this
.
id
,
this
.
selectDataName
)
// this.selectId = data.id
this
.
$refs
.
createBatchModal
.
_open
()
}
else
{
this
.
$Message
.
warning
(
'请至少选择一条数据'
)
}
},
_itemReportMake
(
data
)
{
this
.
itemName
=
data
.
name
this
.
_searchSampleId
(
this
.
id
,
data
.
name
)
// this.selectId = data.id
this
.
$refs
.
createModal
.
_open
()
},
_searchBatchSampleId
:
async
function
(
id
,
name
)
{
Object
.
assign
(
this
.
formObjBatchSample
,
this
.
$refs
.
pageTable
.
_searchParams
()
)
this
.
formObjBatchSample
.
obj
.
entrustId
=
id
this
.
formObjBatchSample
.
obj
.
nameList
=
name
const
result
=
await
soilTest
.
pageExperimentTestBath
(
this
.
$serializeForm
(
this
.
formObjBatchSample
)
)
if
(
result
)
{
this
.
batchSampleIds
=
[]
for
(
let
i
=
0
;
i
<
result
.
records
.
length
;
i
++
)
{
this
.
batchSampleIds
.
push
(
result
.
records
[
i
].
id
)
}
console
.
log
(
'右侧样品id'
,
this
.
batchSampleIds
)
this
.
$refs
.
pageTable
.
_hideLoading
()
}
else
{
this
.
$refs
.
pageTable
.
_hideLoading
()
}
},
_searchSampleId
:
async
function
(
id
,
name
)
{
Object
.
assign
(
this
.
formObjSample
,
this
.
$refs
.
pageTable
.
_searchParams
())
this
.
formObjSample
.
entrustId
=
id
...
...
@@ -188,6 +239,14 @@ export default {
console
.
log
(
'右侧样品id'
,
this
.
sampleIds
)
}
},
_templateBack
(
data
)
{
if
(
data
)
{
this
.
$refs
.
pageTable
.
_showLoading
()
this
.
_makeBatchCodeExcel
(
data
)
}
else
{
this
.
$refs
.
pageTable
.
_hideLoading
()
}
},
_certificateSelectExcelBack
(
data
)
{
if
(
data
)
{
this
.
$refs
.
pageTable
.
_showLoading
()
...
...
@@ -196,6 +255,27 @@ export default {
this
.
$refs
.
pageTable
.
_hideLoading
()
}
},
_makeBatchCodeExcel
:
async
function
(
data
)
{
const
result
=
await
soilSample
.
saveExcelExpReport
({
entrustId
:
this
.
id
,
expName
:
this
.
selectDataName
.
join
(
','
),
ids
:
this
.
batchSampleIds
.
join
(
','
),
templateId
:
data
.
id
})
if
(
result
)
{
// await this._page()
if
(
result
===
null
||
result
===
undefined
)
{
this
.
$Message
.
warning
(
'证书编制失败,请联系管理员!'
)
this
.
$refs
.
pageTable
.
_hideLoading
()
return
false
}
else
{
this
.
$refs
.
pageTable
.
_hideLoading
()
this
.
_viewReport
(
result
)
}
}
else
{
this
.
$refs
.
pageTable
.
_hideLoading
()
}
},
_makeCodeExcel
:
async
function
(
data
)
{
const
result
=
await
soilSample
.
saveExcelExpReport
({
entrustId
:
this
.
id
,
...
...
pages/soil-test-manage/test-task-manage/entrust-sample-manage/item-tabs/ItemLeftList.vue
View file @
f19c568f
...
...
@@ -20,7 +20,7 @@
<Col
span=
"24"
>
<PTVXETable
ref=
"pageTable"
:page-columns=
"pageColumns"
:table-name=
"tableName"
:table-height=
"tableHeight"
:get-page=
"getPage"
:is-radio=
"true"
select-data
hide-checkbox
@
on-result-change=
"_tableResultChange"
>
:get-page=
"getPage"
select-data
@
on-result-change=
"_tableResultChange"
>
<vxe-table-column
v-for=
"item in userColumns.length > 0 ?userColumns:pageColumns"
:key=
"item.key"
...
...
pages/soil-test-manage/test-task-manage/entrust-sample-manage/item-tabs/ItemRightList.vue
View file @
f19c568f
...
...
@@ -6,7 +6,7 @@
<Form
id=
"task-assign-item-right"
:label-width=
"70"
inline
onsubmit=
"return false"
>
<label
class=
"label-sign"
></label>
<Form-item
class=
"search-item"
label=
"试样编号:"
>
<Input
v-model=
"formObj.sampleCode"
@
on-enter=
"_formSearch"
placeholder=
"请输入试样编号"
clearable
></Input>
<Input
v-model=
"formObj.
obj.
sampleCode"
@
on-enter=
"_formSearch"
placeholder=
"请输入试样编号"
clearable
></Input>
</Form-item>
<Form-item
class=
"search-btn"
>
<Button
@
click=
"_formSearch"
type=
"primary"
>
搜索
</Button>
...
...
@@ -67,7 +67,11 @@ export default {
name
:
''
,
testMethod
:
''
,
testBasis
:
''
,
obj
:
{
nameList
:
[],
entrustId
:
undefined
,
sampleCode
:
undefined
}
},
entrustId
:
''
,
// 用户自己选中的列
...
...
@@ -355,17 +359,18 @@ export default {
return
obj
},
_page
:
async
function
()
{
const
saveName
=
this
.
leftSelectData
.
name
const
saveMethod
=
this
.
leftSelectData
.
testMethod
const
saveName
=
[]
for
(
let
i
=
0
;
i
<
this
.
leftSelectData
.
length
;
i
++
)
{
saveName
.
push
(
this
.
leftSelectData
[
i
].
name
)
}
// for (let i = 0; i
<
this
.
leftSelectData
.
length
;
i
++
)
{
// saveName.push(this.leftSelectData[i].name)
// saveMethod.push(this.leftSelectData[i].testMethod)
// }
Object
.
assign
(
this
.
formObj
,
this
.
$refs
.
pageTable
.
_searchParams
())
this
.
formObj
.
entrustId
=
this
.
entrustId
this
.
formObj
.
name
=
saveName
this
.
formObj
.
testMethod
=
saveMethod
const
result
=
await
soilTest
.
pageExperimentAllot
(
this
.
formObj
.
obj
.
entrustId
=
this
.
entrustId
this
.
formObj
.
obj
.
nameList
=
saveName
const
result
=
await
soilTest
.
pageExperimentAllotBath
(
this
.
$serializeForm
(
this
.
formObj
)
)
if
(
result
)
{
...
...
router/routes.js
View file @
f19c568f
...
...
@@ -2,10 +2,10 @@
* 地址路由
*/
import
Lock
from
'../pages/Lock.vue'
// 锁屏
import
workbench
from
'../pages/soil-sample-manage/sample-preparation/PreparationOther'
import
Index
from
'~/pages/index'
import
Blank
from
'~/pages/blank'
import
SoilRouters
from
'~/router/soil-routes'
export
default
[
{
path
:
'/lock'
,
name
:
'Lock'
,
component
:
Lock
,
meta
:
{
allowBack
:
false
}
},
{
...
...
@@ -25,5 +25,9 @@ export default [
children
:
SoilRouters
,
meta
:
{
title
:
'土工试验LIMS'
}
},
{
path
:
'/blank/item_by_method'
,
component
:
workbench
},
{
path
:
'*'
,
redirect
:
'/'
}
]
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