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
ba9651fc
Commit
ba9651fc
authored
Dec 15, 2020
by
wangweidong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
土工试验Lims
parent
3623d1ee
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
196 additions
and
68 deletions
+196
-68
soil-aptitude.js
api/soil/soil-aptitude.js
+9
-1
ConfigTemplate.vue
...eport-manage/soil-item-report-template/ConfigTemplate.vue
+162
-0
ConfigTemplateEdit.vue
...t-manage/soil-item-report-template/ConfigTemplateEdit.vue
+0
-0
SoilItemReportTemplate.vue
...nage/soil-item-report-template/SoilItemReportTemplate.vue
+10
-2
SoilReportEdit.vue
...eport-manage/soil-item-report-template/SoilReportEdit.vue
+15
-65
No files found.
api/soil/soil-aptitude.js
View file @
ba9651fc
...
@@ -63,5 +63,13 @@ export default {
...
@@ -63,5 +63,13 @@ export default {
.
put
(
'soil/v1/exp_report_template/'
+
data
.
id
,
data
.
formObj
)
.
put
(
'soil/v1/exp_report_template/'
+
data
.
id
,
data
.
formObj
)
.
then
(
res
=>
res
),
.
then
(
res
=>
res
),
expReportTemplateDelete
:
data
=>
expReportTemplateDelete
:
data
=>
http
.
delete
(
'soil/v1/exp_report_template/?ids='
+
data
).
then
(
res
=>
res
)
http
.
delete
(
'soil/v1/exp_report_template/?ids='
+
data
).
then
(
res
=>
res
),
pageTemplateConfig
:
data
=>
http
.
post
(
'soil/v1/exp_report_template_config/page'
,
data
).
then
(
res
=>
res
),
saveReportTemplateConfig
:
data
=>
http
.
post
(
'soil/v1/exp_report_template_config/'
,
data
).
then
(
res
=>
res
),
deleteReportTemplateConfig
:
data
=>
http
.
delete
(
'soil/v1/exp_report_template_config/?ids='
+
data
)
.
then
(
res
=>
res
)
}
}
pages/soil-report-manage/soil-item-report-template/ConfigTemplate.vue
0 → 100644
View file @
ba9651fc
<
template
>
<div>
<Modal
v-model=
"showModal"
width=
"1000"
class=
"modal-footer-none"
>
<div
slot=
"header"
>
{{
modalTitle
}}
</div>
<div>
<Form
id=
"index-right-form"
:label-width=
"80"
inline
onsubmit=
"return false"
>
<label
class=
"label-sign"
></label>
<Form-item
class=
"search-item"
label=
"属性名称:"
>
<Input
v-model=
"formObj.attributeName"
@
on-enter=
"_formSearch"
placeholder=
"请输入属性名称"
clearable
/>
</Form-item>
<Form-item
class=
"search-btn"
>
<Button
@
click=
"_formSearch"
type=
"primary"
>
搜索
</Button>
</Form-item>
</Form>
<btn-list
:msg=
"btn"
@
on-result-change=
"_btnClick"
class=
"contHide"
style=
"margin-bottom: 10px;"
/>
<PTVXETable
ref=
"pageTable"
:tableHeight=
"tableHeight"
@
on-result-change=
"_tableResultChange"
:getPage=
"getPage"
:iconMsg=
"iconMsg"
>
<vxe-table-column
:field=
"item.key"
:title=
"item.title"
:min-width=
"item.width?item.width:200"
:fixed=
"item.fixed?item.fixed:undefined"
v-for=
"item in pageColumns"
:key=
"item.key"
>
<template
slot-scope=
"scope"
>
<span
v-if=
"item.key==='defaulted'"
>
{{
scope
.
row
[
item
.
key
]?
'是'
:
'否'
}}
</span>
<span
v-else
>
{{
scope
.
row
[
item
.
key
]
}}
</span>
</
template
>
</vxe-table-column>
</PTVXETable>
</div>
</Modal>
<ConfigTemplateEdit
ref=
"indexEdit"
@
on-result-change=
"_page"
></ConfigTemplateEdit>
</div>
</template>
<
script
>
import
{
soilAptitude
}
from
'../../../api'
import
ConfigTemplateEdit
from
'./ConfigTemplateEdit'
export
default
{
components
:
{
ConfigTemplateEdit
},
data
()
{
return
{
id
:
''
,
modalTitle
:
''
,
showModal
:
false
,
btn
:
[
{
type
:
'success'
,
id
:
''
,
name
:
'添加配置'
},
{
type
:
'error'
,
id
:
''
,
name
:
'删除'
}
],
tableHeight
:
document
.
documentElement
.
clientHeight
-
180
,
pageColumns
:
[
{
title
:
'属性名称'
,
key
:
'attributeName'
},
{
title
:
'属性'
,
key
:
'dataAttribute'
,
width
:
120
},
{
title
:
'列位置'
,
key
:
'columnPlace'
,
width
:
120
},
{
title
:
'合并开始列'
,
key
:
'mergeBegin'
,
width
:
120
},
{
title
:
'合并结束列'
,
key
:
'mergeEnd'
,
width
:
120
}
],
getPage
:
{},
iconMsg
:
[{
type
:
'md-create'
,
id
:
''
,
name
:
'编辑'
}],
selectIds
:
[],
formObj
:
{
attributeName
:
undefined
,
templateId
:
undefined
},
// 资质信息
aptitudeItemInfo
:
{}
}
},
methods
:
{
_open
(
data
)
{
console
.
log
(
data
)
this
.
aptitudeItemInfo
=
data
this
.
formObj
=
this
.
$resetFields
(
this
.
formObj
)
this
.
formObj
.
templateId
=
data
.
id
this
.
id
=
data
.
id
this
.
modalTitle
=
data
.
name
+
' 指标管理'
this
.
showModal
=
true
this
.
_page
()
},
_page
:
async
function
()
{
Object
.
assign
(
this
.
formObj
,
this
.
$refs
.
pageTable
.
_searchParams
())
const
result
=
await
soilAptitude
.
pageTemplateConfig
(
this
.
formObj
)
if
(
result
)
{
console
.
log
(
result
)
this
.
getPage
=
result
this
.
$refs
.
pageTable
.
_hideLoading
()
}
},
_formSearch
()
{
this
.
$refs
.
pageTable
.
_pageChange
(
1
)
},
_tableResultChange
(
msg
,
data
)
{
switch
(
msg
)
{
case
'page'
:
break
case
'selectIds'
:
this
.
selectIds
=
data
break
case
'iconClick'
:
this
.
_iconClick
(
data
.
name
,
data
.
rowData
)
break
case
'changeSize'
:
this
.
_page
()
break
}
},
_iconClick
(
res
,
data
)
{
switch
(
res
)
{
case
'编辑'
:
this
.
_editModal
(
true
,
data
)
break
}
},
_editModal
(
edit
,
data
)
{
if
(
edit
)
{
this
.
_getById
(
data
)
}
else
{
this
.
$refs
.
indexEdit
.
_open
(
this
.
id
,
''
)
}
},
_getById
:
async
function
(
data
)
{
const
result
=
await
soilAptitude
.
expItemGetById
(
data
.
id
)
console
.
log
(
result
)
if
(
result
)
{
this
.
$refs
.
indexEdit
.
_open
(
''
,
result
)
}
},
_btnClick
(
msg
)
{
switch
(
msg
)
{
case
'添加配置'
:
this
.
_editModal
(
false
)
break
case
'删除'
:
this
.
_deleteByIds
()
break
}
},
_deleteByIds
()
{
if
(
this
.
selectIds
.
length
===
0
)
{
// this.$msgTip('warning')
this
.
$message
.
warning
(
'请至少选择一条记录'
)
}
else
{
this
.
$Modal
.
confirm
({
title
:
'提示'
,
content
:
'确定删除 '
+
this
.
selectIds
.
length
+
' 条记录?'
,
onOk
:
()
=>
{
this
.
_delOk
(
this
.
selectIds
)
}
})
}
},
_delOk
:
async
function
(
ids
)
{
const
result
=
await
soilAptitude
.
deleteReportTemplateConfig
(
ids
)
if
(
result
)
{
this
.
$message
.
success
(
'删除成功'
)
this
.
_page
()
}
}
}
}
</
script
>
pages/soil-report-manage/soil-item-report-template/ConfigTemplateEdit.vue
0 → 100644
View file @
ba9651fc
This diff is collapsed.
Click to expand it.
pages/soil-report-manage/soil-item-report-template/SoilItemReportTemplate.vue
View file @
ba9651fc
...
@@ -46,6 +46,7 @@
...
@@ -46,6 +46,7 @@
<!-- 添加、编辑 -->
<!-- 添加、编辑 -->
<SoilRecordTemplateEdit
ref=
"editModal"
@
on-result-change=
"_search"
></SoilRecordTemplateEdit>
<SoilRecordTemplateEdit
ref=
"editModal"
@
on-result-change=
"_search"
></SoilRecordTemplateEdit>
<SoilRecordEdit
ref=
"reportEdit"
@
on-result-change=
"_search"
></SoilRecordEdit>
<SoilRecordEdit
ref=
"reportEdit"
@
on-result-change=
"_search"
></SoilRecordEdit>
<ConfigTemplate
ref=
"configTemplateModal"
@
on-result-change=
"_page"
></ConfigTemplate>
</div>
</div>
</template>
</template>
<
script
>
<
script
>
...
@@ -53,8 +54,9 @@ import global from '../../../api/config'
...
@@ -53,8 +54,9 @@ import global from '../../../api/config'
import
{
soilAptitude
}
from
'../../../api'
import
{
soilAptitude
}
from
'../../../api'
import
SoilRecordTemplateEdit
from
'./SoilReportTemplateEdit'
import
SoilRecordTemplateEdit
from
'./SoilReportTemplateEdit'
import
SoilRecordEdit
from
'./SoilReportEdit'
import
SoilRecordEdit
from
'./SoilReportEdit'
import
ConfigTemplate
from
'./ConfigTemplate'
export
default
{
export
default
{
components
:
{
SoilRecordTemplateEdit
,
SoilRecordEdit
},
components
:
{
SoilRecordTemplateEdit
,
SoilRecordEdit
,
ConfigTemplate
},
data
()
{
data
()
{
return
{
return
{
pageColumns
:
[
pageColumns
:
[
...
@@ -67,8 +69,8 @@ export default {
...
@@ -67,8 +69,8 @@ export default {
},
},
iconMsg
:
[
iconMsg
:
[
{
type
:
'md-create'
,
id
:
''
,
name
:
'编辑'
},
{
type
:
'md-create'
,
id
:
''
,
name
:
'编辑'
},
{
type
:
'ios-build-outline'
,
id
:
''
,
name
:
'配置'
},
{
type
:
'ios-book'
,
id
:
''
,
name
:
'预览/编辑'
},
{
type
:
'ios-book'
,
id
:
''
,
name
:
'预览/编辑'
},
// { type: 'ios-download', id: '', name: '下载' },
{
type
:
'md-remove-circle'
,
id
:
''
,
name
:
'删除'
}
{
type
:
'md-remove-circle'
,
id
:
''
,
name
:
'删除'
}
],
],
getPage
:
{},
getPage
:
{},
...
@@ -137,6 +139,9 @@ export default {
...
@@ -137,6 +139,9 @@ export default {
case
'编辑'
:
case
'编辑'
:
this
.
_reportEdit
(
data
)
this
.
_reportEdit
(
data
)
break
break
case
'配置'
:
this
.
_configData
(
data
)
break
case
'下载'
:
case
'下载'
:
this
.
_download
(
data
.
id
)
this
.
_download
(
data
.
id
)
break
break
...
@@ -194,6 +199,9 @@ export default {
...
@@ -194,6 +199,9 @@ export default {
_reportEdit
(
data
)
{
_reportEdit
(
data
)
{
this
.
$refs
.
reportEdit
.
_open
(
data
)
this
.
$refs
.
reportEdit
.
_open
(
data
)
},
},
_configData
(
data
)
{
this
.
$refs
.
configTemplateModal
.
_open
(
data
)
},
// 批量删除
// 批量删除
_delAll
()
{
_delAll
()
{
const
ids
=
this
.
selectIds
const
ids
=
this
.
selectIds
...
...
pages/soil-report-manage/soil-item-report-template/SoilReportEdit.vue
View file @
ba9651fc
...
@@ -11,8 +11,6 @@
...
@@ -11,8 +11,6 @@
<div>
<div>
<Form
id=
"edit-form"
ref=
"formObj"
:model=
"formObj"
:rules=
"ruleValidate"
:label-width=
"95"
inline
class=
"inputBox"
>
<Form
id=
"edit-form"
ref=
"formObj"
:model=
"formObj"
:rules=
"ruleValidate"
:label-width=
"95"
inline
class=
"inputBox"
>
<Form-item
label=
"类别"
prop=
"classType"
style=
"width: 100%"
>
<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-select
v-model=
"formObj.classType"
placeholder=
"请选择类别"
size=
"small"
clearable
>
<el-option
:label=
"item.value"
:value=
"item.value"
v-for=
"(item,index) in typeList"
<el-option
:label=
"item.value"
:value=
"item.value"
v-for=
"(item,index) in typeList"
:key=
"index"
></el-option>
:key=
"index"
></el-option>
...
@@ -34,24 +32,24 @@
...
@@ -34,24 +32,24 @@
placeholder=
"请输入样品开始行"
placeholder=
"请输入样品开始行"
/>
/>
</Form-item>
</Form-item>
<Form-item
label=
"
样品开始列"
prop=
"sampleBeginCol
"
class=
"width-48"
>
<Form-item
label=
"
数据占用行"
prop=
"dataTotalRow
"
class=
"width-48"
>
<el-input
<el-input
v-model=
"formObj.
sampleBeginCol
"
v-model=
"formObj.
dataTotalRow
"
@
keydown
.
native=
"channelInputLimit"
@
keydown
.
native=
"channelInputLimit"
name=
"sampleBeginCol"
name=
"sampleBeginCol"
type=
"number"
type=
"number"
onmousewheel=
"return false"
onmousewheel=
"return false"
placeholder=
"请输入
样品开始列
"
placeholder=
"请输入
数据占用行
"
/>
/>
</Form-item>
</Form-item>
<Form-item
label=
"
样品合并数"
prop=
"sampleMergerNum
"
class=
"width-48"
>
<Form-item
label=
"
总列数"
prop=
"totalColumn
"
class=
"width-48"
>
<el-input
<el-input
v-model=
"formObj.
sampleMergerNum
"
v-model=
"formObj.
totalColumn
"
@
keydown
.
native=
"channelInputLimit"
@
keydown
.
native=
"channelInputLimit"
name=
"sampleMergerNum"
name=
"sampleMergerNum"
type=
"number"
type=
"number"
onmousewheel=
"return false"
onmousewheel=
"return false"
placeholder=
"请输入
样品合并
数"
placeholder=
"请输入
总列
数"
/>
/>
</Form-item>
</Form-item>
<Form-item
label=
"模板样品数"
prop=
"templateSampleNum"
class=
"width-48"
>
<Form-item
label=
"模板样品数"
prop=
"templateSampleNum"
class=
"width-48"
>
...
@@ -69,48 +67,30 @@
...
@@ -69,48 +67,30 @@
<div
slot=
"footer"
class=
"btn-width clearfix"
>
<div
slot=
"footer"
class=
"btn-width clearfix"
>
<Button
@
click=
"_cancel"
style=
"margin-left: 8px;"
>
取消
</Button>
<Button
@
click=
"_cancel"
style=
"margin-left: 8px;"
>
取消
</Button>
<Button
@
click=
"_ok"
type=
"primary"
style=
"margin-bottom: 0;float: right"
>
保存
</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>
</div>
</Modal>
</Modal>
<!--类别弹出树-->
<!--
<LmsTemplateClassifyZTree
ref=
"ztreeModal"
@
on-result-change=
"_ztree"
></LmsTemplateClassifyZTree>
-->
</div>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
/**
/**
* 添加编辑
* 添加编辑
*/
*/
// import LmsTemplateClassifyZTree from '../lms-template-classify/LmsTemplateClassifyZTree.vue'
// import global from '../../../api/config'
import
{
soilAptitude
}
from
'../../../api'
import
{
soilAptitude
}
from
'../../../api'
const
defVal
=
{
const
defVal
=
{
alias
:
''
,
alias
:
undefined
,
classType
:
''
,
classType
:
undefined
,
remark
:
''
,
dataTotalRow
:
undefined
,
sampleBeginRow
:
''
,
totalColumn
:
undefined
,
sampleBeginCol
:
''
,
remark
:
undefined
,
sampleMergerNum
:
''
,
sampleBeginRow
:
undefined
,
templateSampleNum
:
''
,
sampleBeginCol
:
undefined
,
sampleMergerNum
:
undefined
,
templateSampleNum
:
undefined
,
classifyId
:
0
classifyId
:
0
}
}
export
default
{
export
default
{
// components: { LmsTemplateClassifyZTree },
data
()
{
data
()
{
const
validatesampleBeginRow
=
(
rule
,
value
,
callback
)
=>
{
const
validatesampleBeginRow
=
(
rule
,
value
,
callback
)
=>
{
if
(
this
.
formObj
.
sampleBeginRow
===
''
)
{
if
(
this
.
formObj
.
sampleBeginRow
===
''
)
{
...
@@ -119,13 +99,6 @@ export default {
...
@@ -119,13 +99,6 @@ export default {
callback
()
callback
()
}
}
}
}
const
validatesampleMergerNum
=
(
rule
,
value
,
callback
)
=>
{
if
(
this
.
formObj
.
sampleMergerNum
===
''
)
{
callback
(
new
Error
(
'内容不能为空'
))
}
else
{
callback
()
}
}
const
validatetemplateSampleNum
=
(
rule
,
value
,
callback
)
=>
{
const
validatetemplateSampleNum
=
(
rule
,
value
,
callback
)
=>
{
if
(
this
.
formObj
.
templateSampleNum
===
''
)
{
if
(
this
.
formObj
.
templateSampleNum
===
''
)
{
callback
(
new
Error
(
'内容不能为空'
))
callback
(
new
Error
(
'内容不能为空'
))
...
@@ -133,13 +106,6 @@ export default {
...
@@ -133,13 +106,6 @@ export default {
callback
()
callback
()
}
}
}
}
const
validatesampleBeginCol
=
(
rule
,
value
,
callback
)
=>
{
if
(
this
.
formObj
.
sampleBeginCol
===
''
)
{
callback
(
new
Error
(
'内容不能为空'
))
}
else
{
callback
()
}
}
return
{
return
{
modalTitle
:
'编辑'
,
modalTitle
:
'编辑'
,
formObj
:
defVal
,
formObj
:
defVal
,
...
@@ -155,22 +121,6 @@ export default {
...
@@ -155,22 +121,6 @@ export default {
trigger
:
'blur'
trigger
:
'blur'
}
}
],
],
sampleBeginCol
:
[
{
required
:
true
,
validator
:
validatesampleBeginCol
,
message
:
'样品开始列不能为空'
,
trigger
:
'blur'
}
],
sampleMergerNum
:
[
{
required
:
true
,
validator
:
validatesampleMergerNum
,
message
:
'样品合并数不能为空'
,
trigger
:
'blur'
}
],
templateSampleNum
:
[
templateSampleNum
:
[
{
{
required
:
true
,
required
:
true
,
...
...
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