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
07f52f64
Commit
07f52f64
authored
Dec 15, 2020
by
lichengming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加试验项目报告模板菜单
parent
0417f9ea
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
794 additions
and
101 deletions
+794
-101
soil-report.js
api/soil/soil-report.js
+2
-1
OriginalRecordView.vue
pages/soil-report-manage/report-make/OriginalRecordView.vue
+1
-0
SampleByMakeModal.vue
pages/soil-report-manage/report-make/SampleByMakeModal.vue
+1
-1
ReportInfoMake.vue
pages/soil-report-manage/report-make/tabs/ReportInfoMake.vue
+25
-98
SoilItemReportTemplate.vue
...nage/soil-item-report-template/SoilItemReportTemplate.vue
+253
-0
SoilReportEdit.vue
...eport-manage/soil-item-report-template/SoilReportEdit.vue
+328
-0
SoilReportTemplateEdit.vue
...nage/soil-item-report-template/SoilReportTemplateEdit.vue
+177
-0
CreateReport.vue
pages/soil-test-manage/test-input/item-tabs/CreateReport.vue
+1
-1
soil-routes.js
router/soil-routes.js
+6
-0
No files found.
api/soil/soil-report.js
View file @
07f52f64
...
...
@@ -18,5 +18,6 @@ export default {
getExcelOriginalRecord
:
data
=>
http
.
post
(
'soil/v1/original_record/get_excel_original_record?expId='
+
data
)
.
then
(
res
=>
res
)
.
then
(
res
=>
res
),
reportPage
:
data
=>
http
.
post
(
'soil/v1/report/page'
,
data
).
then
(
res
=>
res
)
}
pages/soil-report-manage/report-make/OriginalRecordView.vue
View file @
07f52f64
...
...
@@ -256,6 +256,7 @@ export default {
if
(
result
)
{
this
.
$Message
.
success
(
'报告成功生成'
)
this
.
_page
()
this
.
$emit
(
'on-result-change'
)
}
},
openTooltip
()
{
...
...
pages/soil-report-manage/report-make/SampleByMakeModal.vue
View file @
07f52f64
...
...
@@ -87,7 +87,7 @@ export default {
})
},
_report
()
{
this
.
$refs
.
reportTabs
.
_open
(
this
.
contractId
,
this
.
personal
)
this
.
$refs
.
reportTabs
.
_open
(
this
.
entrustId
)
},
_sample
()
{
console
.
log
(
this
.
entrustId
)
...
...
pages/soil-report-manage/report-make/tabs/ReportInfoMake.vue
View file @
07f52f64
...
...
@@ -82,7 +82,7 @@
<
script
>
import
global
from
'../../../../api/config'
import
http
from
'../../../../api/http'
import
{
soil
Tes
t
}
from
'../../../../api'
import
{
soil
Repor
t
}
from
'../../../../api'
/**
* 报告编制的-待办-报告台账
...
...
@@ -97,54 +97,7 @@ export default {
],
currentComponent
:
''
,
searchOpen
:
false
,
btn
:
[
{
type
:
'primary'
,
id
:
'food-report-make-submit-to-gc-platform-by-contract'
,
name
:
'推送至国抽平台'
},
{
type
:
'primary'
,
id
:
'food-report-make-submit'
,
name
:
'提交'
},
{
type
:
'primary'
,
id
:
'food-report-make-to-pdf'
,
name
:
'盖章'
,
componentName
:
'SignatureToPDF'
},
{
type
:
'primary'
,
id
:
'food-report-make-to-auditor'
,
name
:
'选择审核人'
,
componentName
:
'AssignPerson'
},
{
type
:
'primary'
,
id
:
'food-report-make-submit-to-issue'
,
name
:
'提交至报告签发'
},
{
type
:
'success'
,
id
:
'food-report-make-batch-create-report'
,
name
:
'重新生成'
,
componentName
:
'ReportTemplateModal'
},
{
type
:
'error'
,
id
:
'food-report-make-batch-del-report'
,
name
:
'删除'
},
{
id
:
'food-report-make-batch-down'
,
name
:
'下载'
},
{
id
:
'food-report-make-batch-achieve-by-contract'
,
name
:
'完成'
},
{
id
:
'food-report-make-batch-overdue-reason'
,
name
:
'记录报告超期原因'
,
componentName
:
'Reason'
},
{
id
:
'food-report-make-edit-report-aptitude'
,
name
:
'修改报告资质要求'
,
componentName
:
'EditReportAptitude'
}
],
btn
:
[{
id
:
'food-report-make-batch-down'
,
name
:
'下载'
}],
getPage
:
{},
pageColumns
:
[
{
title
:
'报告编号'
,
key
:
'reportSn'
,
width
:
180
,
fixed
:
'left'
},
...
...
@@ -173,57 +126,35 @@ export default {
selectIds
:
[],
selectData
:
[],
formObj
:
{
contractId
:
''
,
reportSn
:
''
,
sampleNum
:
''
,
sampleName
:
''
,
taskSource
:
''
,
detectType
:
''
,
reportDateBegin
:
''
,
reportDateEnd
:
''
,
notOkCount
:
''
,
personal
:
0
,
dataPushed
:
''
entrustId
:
''
},
dateList
:
[],
iconMsg
:
[
{
type
:
'ios-book'
,
id
:
''
,
name
:
'预览/编辑报告'
}
,
{
type
:
'ios-book'
,
id
:
''
,
name
:
'预览/编辑报告'
}
// {
// type: '
loop
',
// type: '
ios-document
',
// id: '',
// name: '
重新生成
',
// componentName: '
ReportTemplateModal
'
// name: '
项目台账
',
// componentName: '
ItemModalByReportMake
'
// },
{
type
:
'ios-document'
,
id
:
''
,
name
:
'项目台账'
,
componentName
:
'ItemModalByReportMake'
},
{
type
:
'ios-cloud-upload'
,
id
:
''
,
name
:
'上传'
,
componentName
:
'UploadByReport'
},
// {
// type: 'i
nformation-circle
d',
// type: 'i
os-cloud-uploa
d',
// id: '',
// name: '
历史版本
',
// componentName: '
HisRevision
'
// name: '
上传
',
// componentName: '
UploadByReport
'
// },
{
type
:
'cloud'
,
id
:
''
,
name
:
'附件'
,
componentName
:
'ReportFileManage'
},
{
type
:
'ios-clock'
,
id
:
''
,
name
:
'操作记录'
,
componentName
:
'FoodReportRecord'
}
//
{
//
type: 'cloud',
//
id: '',
//
name: '附件',
//
componentName: 'ReportFileManage'
//
},
//
{
//
type: 'ios-clock',
//
id: '',
//
name: '操作记录',
//
componentName: 'FoodReportRecord'
//
}
],
// 签发日期
issueDateTemp
:
''
,
...
...
@@ -380,19 +311,15 @@ export default {
break
}
},
_open
(
contractId
,
personal
)
{
_open
(
entrustId
)
{
this
.
formObj
=
this
.
$resetFields
(
this
.
formObj
)
this
.
formObj
.
contractId
=
contractId
this
.
dateList
=
[]
this
.
formObj
.
personal
=
personal
this
.
formObj
.
contractId
=
entrustId
this
.
showIssueModal
=
false
this
.
reportId
=
''
this
.
tempId
=
''
this
.
_page
()
},
_page
:
async
function
()
{
Object
.
assign
(
this
.
formObj
,
this
.
$refs
.
pageTable
.
_searchParams
())
const
result
=
await
soil
Test
.
pageExpTest
(
const
result
=
await
soil
Report
.
reportPage
(
this
.
$serializeForm
(
this
.
formObj
)
)
if
(
result
)
{
...
...
pages/soil-report-manage/soil-item-report-template/SoilItemReportTemplate.vue
0 → 100644
View file @
07f52f64
<
template
>
<div>
<!--内容-->
<div
class=
"layout-content-padding marginLeft-10"
>
<div
class=
"layout-content-main tree-position"
>
<div
class=
"position-right"
>
<Row>
<!--查询-->
<Col
span=
"24"
>
<Form
id=
"search-form"
v-show=
"searchOpen"
:label-width=
"80"
inline
onsubmit=
"return false"
>
<label
class=
"label-sign"
></label>
<Form-item
class=
"search-item"
label=
"模板名称:"
>
<Input
v-model=
"formObj.name"
@
on-enter=
"_formSearch"
name=
"name"
placeholder=
"请输入模板名称"
clearable
></Input>
<input
type=
"hidden"
name=
"classifyId"
>
</Form-item>
<Form-item
class=
"search-btn"
>
<Button
@
click=
"_formSearch"
type=
"primary"
>
搜索
</Button>
</Form-item>
</Form>
</Col>
<!--操作-->
<Col
span=
"24"
>
<btn-list
:msg=
"btn"
:open=
"searchOpen"
:show-search-btn=
"true"
@
on-result-change=
"_btnClick"
></btn-list>
</Col>
<!-- 表格 -->
<Col
span=
"24"
>
<PTVXETable
ref=
"pageTable"
:page-columns=
"pageColumns"
:get-page=
"getPage"
:opt-col-width=
"120"
:icon-msg=
"iconMsg"
@
on-result-change=
"_tableResultChange"
>
<vxe-table-column
v-for=
"item in pageColumns"
:key=
"item.key"
:field=
"item.key"
:title=
"item.title"
:min-width=
"item.width?item.width:200"
:fixed=
"item.fixed?item.fixed:undefined"
sortable
>
<template
slot-scope=
"scope"
>
<span>
{{
scope
.
row
[
item
.
key
]
}}
</span>
</
template
>
</vxe-table-column>
</PTVXETable>
</Col>
</Row>
</div>
</div>
</div>
<!-- 添加、编辑 -->
<SoilRecordTemplateEdit
ref=
"editModal"
@
on-result-change=
"_search"
></SoilRecordTemplateEdit>
<SoilRecordEdit
ref=
"reportEdit"
@
on-result-change=
"_search"
></SoilRecordEdit>
</div>
</template>
<
script
>
import
global
from
'../../../api/config'
import
{
soilAptitude
}
from
'../../../api'
import
SoilRecordTemplateEdit
from
'./SoilReportTemplateEdit'
import
SoilRecordEdit
from
'./SoilReportEdit'
export
default
{
components
:
{
SoilRecordTemplateEdit
,
SoilRecordEdit
},
data
()
{
return
{
pageColumns
:
[
{
title
:
'原始记录模板名称'
,
key
:
'alias'
},
{
title
:
'类别'
,
key
:
'classType'
},
{
title
:
'备注'
,
key
:
'remark'
}
],
formObj
:
{
name
:
undefined
},
iconMsg
:
[
{
type
:
'md-create'
,
id
:
''
,
name
:
'编辑'
},
{
type
:
'ios-book'
,
id
:
''
,
name
:
'预览/编辑'
},
// { type: 'ios-download', id: '', name: '下载' },
{
type
:
'md-remove-circle'
,
id
:
''
,
name
:
'删除'
}
],
getPage
:
{},
tableStyleObj
:
{},
btn
:
[
{
type
:
'success'
,
id
:
''
,
name
:
'添加'
},
{
type
:
'error'
,
id
:
''
,
name
:
'删除'
}
],
searchOpen
:
true
,
selectIds
:
[]
}
},
computed
:
{
// tableHeight: function() {
// if (this.searchOpen) {
// return this.$newTableHeight('search')
// } else {
// return this.$newTableHeight('noSearch')
// }
// }
},
mounted
()
{
// this._contHide()
// this._classTree()
this
.
_page
()
},
methods
:
{
_btnClick
(
msg
)
{
switch
(
msg
)
{
case
'添加'
:
this
.
_editModal
()
break
case
'删除'
:
this
.
_delAll
()
break
case
'search'
:
this
.
searchOpen
=
!
this
.
searchOpen
break
}
},
_refresh
()
{
// 刷新
this
.
id
=
''
this
.
name
=
''
this
.
_search
()
this
.
_classTree
()
},
_classData
(
result
,
msg
)
{
$
(
'input[name=classifyId]'
).
val
(
result
)
this
.
_formSearch
()
},
_classTree
()
{
this
.
$refs
.
classTree
.
_Ztree
()
},
_treeHide
()
{
// 左侧树隐藏
this
.
isTree
=
false
this
.
tableStyleObj
.
marginLeft
=
'15px'
},
_treeShow
()
{
this
.
isTree
=
true
this
.
tableStyleObj
.
marginLeft
=
'215px'
},
_iconClick
(
res
,
data
)
{
switch
(
res
)
{
case
'编辑'
:
this
.
_reportEdit
(
data
)
break
case
'下载'
:
this
.
_download
(
data
.
id
)
break
case
'预览/编辑'
:
this
.
_lookReport
(
data
)
break
case
'删除'
:
this
.
_deleteByIds
([
data
.
id
])
break
}
},
_lookReport
:
async
function
(
data
)
{
const
result
=
await
soilAptitude
.
originalTemplateGetById
(
data
.
id
)
if
(
result
)
{
this
.
_viewReport
(
result
)
}
},
_viewReport
(
data
)
{
// window.open(global.baseURL + '/print/v1/oos?key=' + objectKey+'&edit=true', '', 'height=' + (screen.availHeight - 50) + ',' +
// 'width=' + (screen.availWidth - 10) + ',top=0,left=0,toolbar=no,menubar=no,scrollbars=auto,resizeable=no,' +
// 'location=no,status=no')
if
(
data
)
{
this
.
$openWindowModeless
({
objectKey
:
data
.
objectKey
,
id
:
data
.
id
,
idType
:
11
,
isReport
:
4
})
}
},
_contHide
()
{
this
.
_page
()
},
_page
:
async
function
()
{
console
.
log
(
'page'
)
Object
.
assign
(
this
.
formObj
,
this
.
$refs
.
pageTable
.
_searchParams
())
const
result
=
await
soilAptitude
.
originalTemplatePage
(
this
.
formObj
)
if
(
result
)
{
this
.
$refs
.
pageTable
.
_hideLoading
()
this
.
getPage
=
result
}
// const result = await
// this.$refs.pageTable._page('search-form', 'SysFileTemplate/page')
},
_formSearch
()
{
this
.
$refs
.
pageTable
.
_pageChange
(
1
)
},
_editModal
()
{
this
.
$refs
.
editModal
.
_open
()
},
_reportEdit
(
data
)
{
this
.
$refs
.
reportEdit
.
_open
(
data
)
},
// 批量删除
_delAll
()
{
const
ids
=
this
.
selectIds
if
(
ids
.
length
===
0
)
{
this
.
$Message
.
warning
(
'请至少选择一条数据!'
)
}
else
{
this
.
_deleteByIds
(
ids
)
}
},
// 删除
_deleteByIds
(
ids
,
content
)
{
this
.
$Modal
.
confirm
({
title
:
'提示'
,
content
:
content
||
'确定删除该记录?'
,
onOk
:
()
=>
{
this
.
_delete
(
ids
)
}
})
},
_delete
:
async
function
(
ids
)
{
const
result
=
await
soilAptitude
.
originalTemplateDeleteById
(
ids
)
if
(
result
)
{
this
.
_formSearch
()
this
.
$Message
.
success
(
'删除成功!'
)
}
},
_download
(
id
)
{
this
.
$Modal
.
confirm
({
title
:
'提示'
,
content
:
'确定要下载?'
,
onOk
:
()
=>
{
window
.
open
(
global
.
baseURL
+
'/base/v1/file_template/download/'
+
id
,
'_blank'
)
}
})
},
_search
()
{
this
.
_page
()
},
_tableResultChange
(
msg
,
data
)
{
switch
(
msg
)
{
case
'page'
:
// this.getPage = this.$store.state.SysFileTemplate.page
break
case
'selectIds'
:
this
.
selectIds
=
data
break
case
'iconClick'
:
this
.
_iconClick
(
data
.
name
,
data
.
rowData
)
break
default
:
this
.
_page
()
}
}
}
}
</
script
>
pages/soil-report-manage/soil-item-report-template/SoilReportEdit.vue
0 → 100644
View file @
07f52f64
<
template
>
<div>
<Modal
v-model=
"showEditModal"
:mask-closable=
"false"
>
<p
slot=
"header"
>
{{
modalTitle
}}
</p>
<div
v-show=
"isLoad"
>
<Spin
fix
>
<Icon
type=
"load-c"
size=
18
class=
"file-spin-icon-load"
></Icon>
<div>
正在上传,请稍后...
</div>
</Spin>
</div>
<div>
<Form
id=
"edit-form"
ref=
"formObj"
:model=
"formObj"
:rules=
"ruleValidate"
:label-width=
"95"
inline
class=
"inputBox"
>
<Form-item
label=
"类别"
prop=
"classType"
style=
"width: 100%"
>
<!--
<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
label=
"原始记录名称"
prop=
"alias"
style=
"width: 100%"
>
<Input
v-model=
"formObj.alias"
name=
"alias"
placeholder=
"请输入原始记录名称"
></Input>
</Form-item>
<Form-item
label=
"备注"
prop=
"remark"
style=
"width: 100%"
>
<Input
v-model=
"formObj.remark"
name=
"remark"
placeholder=
"请输入备注"
></Input>
</Form-item>
<Form-item
label=
"样品开始行"
prop=
"sampleBeginRow"
class=
"width-48"
>
<el-input
v-model=
"formObj.sampleBeginRow"
@
keydown
.
native=
"channelInputLimit"
name=
"sampleBeginRow"
type=
"number"
onmousewheel=
"return false"
placeholder=
"请输入样品开始行"
/>
</Form-item>
<Form-item
label=
"样品开始列"
prop=
"sampleBeginCol"
class=
"width-48"
>
<el-input
v-model=
"formObj.sampleBeginCol"
@
keydown
.
native=
"channelInputLimit"
name=
"sampleBeginCol"
type=
"number"
onmousewheel=
"return false"
placeholder=
"请输入样品开始列"
/>
</Form-item>
<Form-item
label=
"样品合并数"
prop=
"sampleMergerNum"
class=
"width-48"
>
<el-input
v-model=
"formObj.sampleMergerNum"
@
keydown
.
native=
"channelInputLimit"
name=
"sampleMergerNum"
type=
"number"
onmousewheel=
"return false"
placeholder=
"请输入样品合并数"
/>
</Form-item>
<Form-item
label=
"模板样品数"
prop=
"templateSampleNum"
class=
"width-48"
>
<el-input
v-model=
"formObj.templateSampleNum"
@
keydown
.
native=
"channelInputLimit"
name=
"templateSampleNum"
type=
"number"
onmousewheel=
"return false"
placeholder=
"请输入模板样品数"
/>
</Form-item>
</Form>
</div>
<div
slot=
"footer"
class=
"btn-width clearfix"
>
<Button
@
click=
"_cancel"
style=
"margin-left: 8px;"
>
取消
</Button>
<Button
@
click=
"_ok"
type=
"primary"
style=
"margin-bottom: 0;float: right"
>
保存
</Button>
<!--
<label
style=
"margin-bottom: 0;float: right"
>
-->
<!--
<Upload-->
<!-- :action="action"-->
<!-- :on-success="_handelsuccess"-->
<!-- :before-upload="_beupload"-->
<!-- :on-progress="_handelprogress"-->
<!-- :on-format-error="_formatError"-->
<!-- :data="dataObj"-->
<!-- :with-credentials="true"-->
<!-- :show-upload-list="false"-->
<!-- :format="format"-->
<!-- >-->
<!--
<Button
:disabled=
"isDisable"
type=
"primary"
>
导入文件
</Button>
-->
<!--
</Upload>
-->
<!--
</label>
-->
</div>
</Modal>
<!--类别弹出树-->
<!--
<LmsTemplateClassifyZTree
ref=
"ztreeModal"
@
on-result-change=
"_ztree"
></LmsTemplateClassifyZTree>
-->
</div>
</
template
>
<
script
>
/**
* 添加编辑
*/
// import LmsTemplateClassifyZTree from '../lms-template-classify/LmsTemplateClassifyZTree.vue'
// import global from '../../../api/config'
import
{
soilAptitude
}
from
'../../../api'
const
defVal
=
{
alias
:
''
,
classType
:
''
,
remark
:
''
,
sampleBeginRow
:
''
,
sampleBeginCol
:
''
,
sampleMergerNum
:
''
,
templateSampleNum
:
''
,
classifyId
:
0
}
export
default
{
// components: { LmsTemplateClassifyZTree },
data
()
{
const
validatesampleBeginRow
=
(
rule
,
value
,
callback
)
=>
{
if
(
this
.
formObj
.
sampleBeginRow
===
''
)
{
callback
(
new
Error
(
'内容不能为空'
))
}
else
{
callback
()
}
}
const
validatesampleMergerNum
=
(
rule
,
value
,
callback
)
=>
{
if
(
this
.
formObj
.
sampleMergerNum
===
''
)
{
callback
(
new
Error
(
'内容不能为空'
))
}
else
{
callback
()
}
}
const
validatetemplateSampleNum
=
(
rule
,
value
,
callback
)
=>
{
if
(
this
.
formObj
.
templateSampleNum
===
''
)
{
callback
(
new
Error
(
'内容不能为空'
))
}
else
{
callback
()
}
}
const
validatesampleBeginCol
=
(
rule
,
value
,
callback
)
=>
{
if
(
this
.
formObj
.
sampleBeginCol
===
''
)
{
callback
(
new
Error
(
'内容不能为空'
))
}
else
{
callback
()
}
}
return
{
modalTitle
:
'编辑'
,
formObj
:
defVal
,
ruleValidate
:
{
alias
:
[
{
required
:
true
,
message
:
'模板名称不能为空'
,
trigger
:
'blur'
}
],
sampleBeginRow
:
[
{
required
:
true
,
validator
:
validatesampleBeginRow
,
message
:
'样品开始行不能为空'
,
trigger
:
'blur'
}
],
sampleBeginCol
:
[
{
required
:
true
,
validator
:
validatesampleBeginCol
,
message
:
'样品开始列不能为空'
,
trigger
:
'blur'
}
],
sampleMergerNum
:
[
{
required
:
true
,
validator
:
validatesampleMergerNum
,
message
:
'样品合并数不能为空'
,
trigger
:
'blur'
}
],
templateSampleNum
:
[
{
required
:
true
,
validator
:
validatetemplateSampleNum
,
message
:
'模板样品数不能为空'
,
trigger
:
'blur'
}
],
classType
:
[
{
required
:
true
,
message
:
'类别不能为空'
,
trigger
:
'blur'
}
]
},
typeList
:
[
{
value
:
'力学'
},
{
value
:
'物性'
}
],
id
:
''
,
showEditModal
:
false
,
dataObj
:
{
file
:
''
},
pname
:
''
,
action
:
''
,
isLoad
:
false
,
isDisable
:
true
,
format
:
[
'docx'
,
'xlsx'
,
'xls'
]
}
},
methods
:
{
_onKeyUp
()
{
if
(
this
.
formObj
.
alias
===
''
||
this
.
formObj
.
classType
===
''
)
{
this
.
isDisable
=
true
}
else
{
this
.
isDisable
=
false
this
.
action
=
global
.
baseURL
+
'/meter/v1/file_template/upload_template/?classType='
+
this
.
formObj
.
classType
+
'&alias='
+
this
.
formObj
.
alias
+
'&remark='
+
this
.
formObj
.
remark
}
},
channelInputLimit
(
e
)
{
const
key
=
e
.
key
// 不允许输入'e'和'.'
if
(
key
===
'e'
||
key
===
'.'
)
{
e
.
returnValue
=
false
return
false
}
return
true
},
_selectZtree
()
{
// this.$refs.ztreeModal._openZtree()
},
_cancel
()
{
this
.
showEditModal
=
false
},
_ok
()
{
this
.
$refs
.
formObj
.
validate
(
valid
=>
{
console
.
log
(
'valid'
,
valid
)
if
(
valid
)
{
this
.
_editOk
()
}
else
{
this
.
$Message
.
error
(
'请输入必填值'
)
}
})
},
_editOk
:
async
function
()
{
const
result
=
await
soilAptitude
.
originalTemplateEdit
({
id
:
this
.
id
,
formObj
:
this
.
formObj
})
if
(
result
)
{
this
.
$message
.
success
(
'编辑成功'
)
this
.
showEditModal
=
false
this
.
$emit
(
'on-result-change'
)
}
},
_open
(
data
)
{
console
.
log
(
data
)
this
.
showEditModal
=
true
this
.
isLoad
=
false
this
.
id
=
data
.
id
this
.
formObj
.
alias
=
data
.
alias
this
.
formObj
.
remark
=
data
.
remark
this
.
formObj
.
classType
=
data
.
classType
this
.
formObj
.
sampleBeginRow
=
data
.
sampleBeginRow
this
.
formObj
.
sampleBeginCol
=
data
.
sampleBeginCol
this
.
formObj
.
sampleMergerNum
=
data
.
sampleMergerNum
this
.
formObj
.
templateSampleNum
=
data
.
templateSampleNum
this
.
modalTitle
=
'编辑模板'
console
.
log
(
this
.
id
)
},
_beupload
(
file
)
{
this
.
dataObj
.
file
=
file
.
name
},
_handelprogress
(
event
,
file
,
fileList
)
{
this
.
isLoad
=
true
},
// _handelsuccess(response, file, fileList) {
// // 上传成功
// if (response.success) {
// this.isLoad = false
// this.$Message.success('上传成功!')
// this.$emit('on-result-change')
// this.showEditModal = false
// } else {
// this.isLoad = true
// this.$Message.error(response.msg)
// }
// },
_formatError
(
file
)
{
this
.
$Notice
.
error
({
title
:
'文件格式不正确'
,
duration
:
10
,
desc
:
'文件 '
+
file
.
name
+
' 格式不正确,请上传格式为 docx、xlsx、xls 的文件!'
})
},
_ztree
(
result
)
{
this
.
pname
=
''
if
(
result
===
undefined
)
{
this
.
formObj
.
classifyId
=
'0'
this
.
pname
=
''
}
else
{
this
.
formObj
.
classifyId
=
result
.
id
this
.
pname
=
result
.
name
}
// 判断必填项是否为空
}
}
}
</
script
>
<
style
scoped
>
.clearfix
:after
{
content
:
''
;
clear
:
both
;
display
:
block
;
}
.inputBox
>>>
input
::-webkit-outer-spin-button
,
input
::-webkit-inner-spin-button
{
-webkit-appearance
:
none
!important
;
}
.inputBox
>>>
input
[
type
=
'number'
]
{
-moz-appearance
:
textfield
!important
;
}
</
style
>
pages/soil-report-manage/soil-item-report-template/SoilReportTemplateEdit.vue
0 → 100644
View file @
07f52f64
<
template
>
<div>
<Modal
v-model=
"showEditModal"
:mask-closable=
"false"
>
<p
slot=
"header"
>
{{
modalTitle
}}
</p>
<div
v-show=
"isLoad"
>
<Spin
fix
>
<Icon
type=
"load-c"
size=
18
class=
"file-spin-icon-load"
></Icon>
<div>
正在上传,请稍后...
</div>
</Spin>
</div>
<div>
<Form
id=
"edit-form"
ref=
"formObj"
:model=
"formObj"
:rules=
"ruleValidate"
:label-width=
"95"
>
<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
label=
"原始记录名称"
prop=
"name"
>
<Input
v-model=
"formObj.name"
@
on-keyup=
"_onKeyUp"
name=
"name"
placeholder=
"请输入原始记录名称"
></Input>
</Form-item>
<Form-item
label=
"备注"
prop=
"remark"
>
<Input
v-model=
"formObj.remark"
@
on-keyup=
"_onKeyUp"
name=
"remark"
placeholder=
"请输入备注"
></Input>
</Form-item>
</Form>
</div>
<div
slot=
"footer"
class=
"btn-width clearfix"
>
<Button
@
click=
"_cancel"
style=
"margin-left: 8px;"
>
取消
</Button>
<label
style=
"margin-bottom: 0;float: right"
>
<Upload
:action=
"action"
:on-success=
"_handelsuccess"
:before-upload=
"_beupload"
:on-progress=
"_handelprogress"
:on-format-error=
"_formatError"
:data=
"dataObj"
:with-credentials=
"true"
:show-upload-list=
"false"
:format=
"format"
>
<Button
:disabled=
"isDisable"
type=
"primary"
>
导入文件
</Button>
</Upload>
</label>
</div>
</Modal>
<!--类别弹出树-->
<!--
<LmsTemplateClassifyZTree
ref=
"ztreeModal"
@
on-result-change=
"_ztree"
></LmsTemplateClassifyZTree>
-->
</div>
</
template
>
<
script
>
/**
* 添加编辑
*/
// import LmsTemplateClassifyZTree from '../lms-template-classify/LmsTemplateClassifyZTree.vue'
import
global
from
'../../../api/config'
const
defVal
=
{
name
:
''
,
remark
:
''
,
classType
:
''
,
classifyId
:
0
}
export
default
{
// components: { LmsTemplateClassifyZTree },
data
()
{
return
{
modalTitle
:
'添加'
,
formObj
:
defVal
,
ruleValidate
:
{
name
:
[{
required
:
true
,
message
:
'名称不能为空'
,
trigger
:
'blur'
}],
classType
:
[
{
required
:
true
,
message
:
'类别不能为空'
,
trigger
:
'blur'
}
]
},
typeList
:
[
{
value
:
'力学'
},
{
value
:
'物性'
}
],
showEditModal
:
false
,
dataObj
:
{
file
:
''
},
pname
:
''
,
action
:
''
,
isLoad
:
false
,
isDisable
:
true
,
format
:
[
'docx'
,
'xlsx'
,
'xls'
]
}
},
methods
:
{
_onKeyUp
()
{
if
(
this
.
formObj
.
name
===
''
||
this
.
formObj
.
classType
===
''
)
{
this
.
isDisable
=
true
}
else
{
this
.
isDisable
=
false
this
.
action
=
global
.
baseURL
+
'/soil/v1/original_template/upload_template/?name='
+
this
.
formObj
.
name
+
'&remark='
+
this
.
formObj
.
remark
+
'&classType='
+
this
.
formObj
.
classType
}
},
_selectZtree
()
{
// this.$refs.ztreeModal._openZtree()
},
_cancel
()
{
this
.
showEditModal
=
false
},
_open
()
{
this
.
showEditModal
=
true
this
.
isLoad
=
false
this
.
formObj
.
name
=
''
this
.
formObj
.
alias
=
''
this
.
formObj
.
remark
=
''
this
.
formObj
.
classType
=
''
this
.
modalTitle
=
'添加模板'
},
_beupload
(
file
)
{
this
.
dataObj
.
file
=
file
.
name
},
_handelprogress
(
event
,
file
,
fileList
)
{
this
.
isLoad
=
true
},
_handelsuccess
(
response
,
file
,
fileList
)
{
// 上传成功
if
(
response
.
success
)
{
this
.
isLoad
=
false
this
.
$Message
.
success
(
'上传成功!'
)
this
.
$emit
(
'on-result-change'
)
this
.
showEditModal
=
false
}
else
{
this
.
isLoad
=
true
this
.
$Message
.
error
(
response
.
msg
)
}
},
_formatError
(
file
)
{
this
.
$Notice
.
error
({
title
:
'文件格式不正确'
,
duration
:
10
,
desc
:
'文件 '
+
file
.
name
+
' 格式不正确,请上传格式为 docx、xlsx、xls 的文件!'
})
},
_ztree
(
result
)
{
this
.
pname
=
''
if
(
result
===
undefined
)
{
this
.
formObj
.
classifyId
=
'0'
this
.
pname
=
''
}
else
{
this
.
formObj
.
classifyId
=
result
.
id
this
.
pname
=
result
.
name
}
// 判断必填项是否为空
this
.
_onKeyUp
()
}
}
}
</
script
>
<
style
scoped
>
.clearfix
:after
{
content
:
''
;
clear
:
both
;
display
:
block
;
}
</
style
>
pages/soil-test-manage/test-input/item-tabs/CreateReport.vue
View file @
07f52f64
<
template
>
<div>
<Modal
v-model=
"showBatchModal"
:mask-closable=
"false"
width=
"900"
>
<Modal
v-model=
"showBatchModal"
v-drag
:mask-closable=
"false"
width=
"900"
>
<p
slot=
"header"
>
原始记录填写
</p>
...
...
router/soil-routes.js
View file @
07f52f64
...
...
@@ -35,6 +35,7 @@ import ClientLocationSearch from '../pages/soil-statistics/client_location/Clien
import
FoodReportManageIndex
from
'../pages/soil-report-manage/report-manage/FoodReportManageIndex'
import
DataConsult
from
'../pages/soil-test-manage/test-data-consult/DataConsult'
import
SoilRecordTemplate
from
'../pages/soil-record-template-manage/SoilRecordTemplate'
import
SoilItemReportTemplate
from
'../pages/soil-report-manage/soil-item-report-template/SoilItemReportTemplate'
import
Blank
from
'~/pages/blank'
export
default
[
{
...
...
@@ -182,6 +183,11 @@ export default [
path
:
'report_manage'
,
component
:
FoodReportManageIndex
,
meta
:
{
title
:
'报告档案'
}
},
{
path
:
'item_report'
,
component
:
SoilItemReportTemplate
,
meta
:
{
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