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
52c97148
Commit
52c97148
authored
Oct 22, 2020
by
lichengming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改了报告编制
parent
31582de9
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
190 additions
and
4 deletions
+190
-4
soil-sample.js
api/soil/soil-sample.js
+4
-1
UploadByReport.vue
pages/soil-report-manage/report-make/UploadByReport.vue
+114
-0
ReportMakeByEntrust.vue
...il-report-manage/report-make/tabs/ReportMakeByEntrust.vue
+72
-3
No files found.
api/soil/soil-sample.js
View file @
52c97148
...
...
@@ -88,5 +88,8 @@ export default {
getReport
:
data
=>
http
.
get
(
'soil/v1/report/get_report_'
+
data
).
then
(
res
=>
res
),
getToken
:
data
=>
http
.
get
(
'/print/url/get_access_token'
,
data
).
then
(
res
=>
res
)
http
.
get
(
'/print/url/get_access_token'
,
data
).
then
(
res
=>
res
),
// 报告编制提交至报告审核
reportMakeSubmit
:
data
=>
http
.
post
(
'soil/v1/entrust/report_make_submit?ids='
+
data
).
then
(
res
=>
res
)
}
pages/soil-report-manage/report-make/UploadByReport.vue
0 → 100644
View file @
52c97148
<
template
>
<div>
<Modal
v-model=
"showSubmitModal"
>
<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>
<Alert
type=
"warning"
show-icon
>
请填写修改信息,例:xxx由xxx修改为xxx,多条填写时以‘;’分隔!
</Alert>
<Input
v-model=
"remark"
:autosize=
"
{minRows: 3,maxRows: 5}" @on-keyup="_blurChange"
type="textarea" placeholder="请输入内容">
</Input>
<div
style=
"margin-top:10px"
>
<Form
:label-width=
"80"
onsubmit=
"return false"
>
<Form-item
label=
"报告名称:"
>
<Input
v-model=
"reportName"
@
on-blur=
"_action"
placeholder=
"请输入报告名称"
/>
</Form-item>
</Form>
</div>
<div
slot=
"footer"
class=
"btn-width"
>
<Button
@
click=
"_cancel"
style=
"margin-left: 310px;float: left;"
>
取消
</Button>
<label
style=
"margin-bottom: 0"
>
<Upload
:action=
"action"
:on-success=
"_handelsuccess"
:before-upload=
"_beupload"
:on-progress=
"_handelprogress"
:data=
"dataObj"
:with-credentials=
"true"
:show-upload-list=
"false"
>
<Button
:disabled=
"isDisable"
type=
"primary"
>
上传
</Button>
</Upload>
</label>
</div>
</Modal>
</div>
</
template
>
<
script
>
/**
* 上传报告-----报告台账上传报告
*/
import
global
from
'../../../api/config'
export
default
{
components
:
{},
data
()
{
return
{
ids
:
[],
// 合同ids
modalTitle
:
'上传报告'
,
showSubmitModal
:
false
,
isLoad
:
false
,
action
:
''
,
dataObj
:
{
file
:
''
},
remark
:
''
,
reportId
:
0
,
isDisable
:
true
,
isReport
:
false
,
// 是否有过报告,
reportName
:
''
}
},
methods
:
{
_open
(
reportId
)
{
this
.
showSubmitModal
=
true
this
.
isLoad
=
false
this
.
reportId
=
reportId
this
.
reportName
=
''
this
.
remark
=
''
},
_blurChange
()
{
if
(
this
.
remark
!==
''
)
{
this
.
_action
()
this
.
isDisable
=
false
}
else
{
this
.
isDisable
=
true
}
},
_action
()
{
this
.
action
=
global
.
baseURL
+
'/soil/v1/report/upload/'
+
this
.
reportId
+
'?reason='
+
this
.
remark
+
'&reportName='
+
this
.
reportName
},
_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
.
showSubmitModal
=
false
}
else
{
this
.
isLoad
=
false
this
.
$Message
.
error
(
response
.
msg
)
}
},
_cancel
()
{
this
.
showSubmitModal
=
false
}
}
}
</
script
>
pages/soil-report-manage/report-make/tabs/ReportMakeByEntrust.vue
View file @
52c97148
...
...
@@ -44,7 +44,7 @@
:tableHeight=
"tableHeight"
:getPage=
"getPage"
:iconMsg=
"iconMsg"
@
on-result-change=
"_tableResultChange"
:rows=
"100"
>
@
on-result-change=
"_tableResultChange"
:rows=
"100"
select-data
>
<vxe-table-column
v-for=
"item in pageColumns"
:key=
"item.key"
...
...
@@ -82,6 +82,7 @@
<Operation
ref=
"operation"
></Operation>
<FileManage
ref=
"FileManage"
></FileManage>
<OriginalRecordView
ref=
"originalRecordView"
></OriginalRecordView>
<UploadByReport
ref=
"uploadReport"
@
on-result-change=
"_page"
></UploadByReport>
</div>
</template>
<
script
>
...
...
@@ -89,8 +90,14 @@ import { soilSample, soilStatistics } from '../../../../api'
import
SampleByMakeModal
from
'../SampleByMakeModal'
import
Operation
from
'../../../../components/operation/Operation'
import
OriginalRecordView
from
'../OriginalRecordView'
import
UploadByReport
from
'../UploadByReport'
export
default
{
components
:
{
SampleByMakeModal
,
Operation
,
OriginalRecordView
},
components
:
{
SampleByMakeModal
,
Operation
,
OriginalRecordView
,
UploadByReport
},
data
()
{
return
{
typeList
:
[{
name
:
'企业'
,
value
:
0
},
{
name
:
'政府'
,
value
:
1
}],
...
...
@@ -107,7 +114,7 @@ export default {
{
title
:
'委托编号'
,
key
:
'entrustCode'
,
width
:
180
},
{
title
:
'报告编号'
,
key
:
'reportCode'
,
width
:
180
},
{
title
:
'水深'
,
key
:
'waterDepth'
,
width
:
180
},
{
title
:
'报告是否编制'
,
key
:
'reported'
,
width
:
180
},
{
title
:
'报告是否
已
编制'
,
key
:
'reported'
,
width
:
180
},
{
title
:
'状态'
,
key
:
'status'
,
width
:
110
,
status
:
true
},
{
title
:
'委托日期'
,
key
:
'entrustDate'
,
width
:
180
,
date
:
true
},
{
title
:
'进度'
,
key
:
'progress'
,
width
:
110
,
status
:
true
},
...
...
@@ -126,6 +133,16 @@ export default {
name
:
'查看原始记录'
},
{
type
:
'ios-cloud-upload'
,
id
:
''
,
name
:
'上传报告'
},
{
type
:
'md-image'
,
id
:
''
,
name
:
'预览报告'
},
{
type
:
'ios-book'
,
id
:
''
,
name
:
'编辑报告'
...
...
@@ -148,11 +165,17 @@ export default {
btn
:
[
{
type
:
'primary'
,
id
:
''
,
name
:
'提交'
},
{
type
:
'primary'
,
id
:
'food-report-make-maintain-info'
,
name
:
'信息维护'
}
],
selectIds
:
[],
selectData
:
[],
personal
:
0
}
},
...
...
@@ -197,11 +220,41 @@ export default {
case
'信息维护'
:
this
.
_maintainInfo
()
break
case
'提交'
:
this
.
_submitToCheck
()
break
case
'search'
:
this
.
searchOpen
=
!
this
.
searchOpen
break
}
},
_submitToCheck
()
{
if
(
this
.
selectIds
.
length
===
0
)
{
this
.
$Message
.
warning
(
'请至少选择一条数据'
)
}
else
{
console
.
log
(
this
.
selectData
)
for
(
let
i
=
0
;
i
<
this
.
selectIds
.
length
;
i
++
)
{
if
(
this
.
selectData
[
i
].
reported
!==
'是'
)
{
this
.
$Message
.
warning
(
'报告未编制'
)
}
else
{
this
.
$Modal
.
confirm
({
title
:
'提示'
,
content
:
'确定提交这'
+
this
.
selectIds
.
length
+
'条数据?'
,
onOk
:
()
=>
{
this
.
_submitReportOk
()
}
})
}
}
}
},
_submitReportOk
:
async
function
()
{
const
result
=
await
soilSample
.
reportMakeSubmit
(
this
.
selectIds
.
join
(
','
))
if
(
result
)
{
this
.
$Message
.
success
(
'提交成功'
)
this
.
_page
()
}
},
// 信息维护
_maintainInfo
()
{
if
(
this
.
selectIds
.
length
===
0
)
{
...
...
@@ -223,6 +276,12 @@ export default {
case
'查看原始记录'
:
this
.
$refs
.
originalRecordView
.
_open
(
data
.
id
)
break
case
'上传报告'
:
this
.
_uploadReport
(
data
.
id
)
break
case
'预览报告'
:
this
.
_viewReport
(
data
.
id
)
break
case
'编辑报告'
:
this
.
_viewReport
(
data
.
id
)
break
...
...
@@ -238,6 +297,9 @@ export default {
}
})
},
_uploadReport
(
id
)
{
this
.
$refs
.
uploadReport
.
_open
(
id
)
},
_viewReport
:
async
function
(
id
)
{
const
result
=
await
soilSample
.
getReport
(
id
)
if
(
result
)
{
...
...
@@ -265,6 +327,13 @@ export default {
case
'selectIds'
:
this
.
selectIds
=
data
break
case
'selectData'
:
this
.
selectData
=
data
this
.
selectIds
=
[]
for
(
let
i
=
0
;
i
<
this
.
selectData
.
length
;
i
++
)
{
this
.
selectIds
.
push
(
this
.
selectData
[
i
].
id
)
}
break
case
'iconClick'
:
this
.
_iconClick
(
data
.
name
,
data
.
rowData
,
data
.
componentName
)
break
...
...
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