Commit 97a23d68eceae7a6fb938ceac8abb7dccdb7e9e0
1 parent
8aec5d0c
Exists in
master
feat:新增项目填报的界面以及接口联调
Showing
5 changed files
with
319 additions
and
10 deletions
Show diff stats
... | ... | @@ -0,0 +1,28 @@ |
1 | +import request from '@/utils/request' | |
2 | +const portal = window.context.portal | |
3 | + | |
4 | +////后台管理预览VUE表单 | |
5 | +export function exportRecordData(data) { | |
6 | + return request({ | |
7 | + url: `${context.form}/wProjectLibraryInventory/v1/down?fProjectNo=${data.fProjectNo}&fProjectName=${data.fProjectName}&fProjectCategory=${data.fProjectCategory}&fProjectState=${data.fProjectState}&createTime=${data.createTime}&fProjectNature=${data.fProjectNature}&fBusinessScenarios=${data.fBusinessScenarios}&fBusinessModel=${data.fBusinessModel}&fProjectRating=${data.fProjectRating}&updateTime=${data.updateTime}`, | |
8 | + method: 'get', | |
9 | + responseType: 'arraybuffer', | |
10 | + }) | |
11 | +} | |
12 | + | |
13 | +// 获取表单的打印模板列表 | |
14 | +export function submitData(data) { | |
15 | + return request({ | |
16 | + url: `${context.form}/wProjectOperationRecord/v1/save`, | |
17 | + data, | |
18 | + method: 'post', | |
19 | + }) | |
20 | +} | |
21 | +// 获取处理记录的接口 | |
22 | +export function getProcessingRecord(data) { | |
23 | + return request({ | |
24 | + url: `${context.form}/form/customDialog/v1/getListData?alias=xmczjl&mapParam=`, | |
25 | + data, | |
26 | + method: 'post', | |
27 | + }) | |
28 | +} | ... | ... |
frontend/front/src/components/dataTemplate/TemplatePreview.vue
1 | 1 | <template> |
2 | - <ht-template-preview | |
3 | - :template-key="key" | |
4 | - :single="single" | |
5 | - :task-type="taskType" | |
6 | - :def-key="defKey" | |
7 | - :data-view="dataView" | |
8 | - :is-join-flow="isJoinFlow" | |
9 | - :table-height="tableHeight" | |
10 | - :parameterq-querys="querys" | |
11 | - ></ht-template-preview> | |
2 | + <div> | |
3 | + <ht-template-preview | |
4 | + ref="httemplate" | |
5 | + :template-key="key" | |
6 | + :single="single" | |
7 | + :task-type="taskType" | |
8 | + :def-key="defKey" | |
9 | + :data-view="dataView" | |
10 | + :is-join-flow="isJoinFlow" | |
11 | + :table-height="tableHeight" | |
12 | + :parameterq-querys="querys" | |
13 | + ></ht-template-preview> | |
14 | + <project-submission-dialog ref="projectSubmissionDialog" @handleRefresh="handleRefresh" ></project-submission-dialog> | |
15 | + <processing-record-dialog ref="processingRecordDialog" ></processing-record-dialog> | |
16 | + </div> | |
12 | 17 | </template> |
13 | 18 | |
14 | 19 | <script> |
20 | + import ProjectSubmissionDialog from "../dialog/projectSubmissionDialog"; | |
21 | + import ProcessingRecordDialog from "../dialog/processingRecordDialog"; | |
15 | 22 | export default { |
16 | 23 | name: 'TemplatePreview', |
24 | + components: {ProcessingRecordDialog, ProjectSubmissionDialog}, | |
17 | 25 | props: { |
18 | 26 | templateKey: { |
19 | 27 | type: String, |
... | ... | @@ -82,6 +90,16 @@ |
82 | 90 | } |
83 | 91 | return '' |
84 | 92 | }, |
93 | + showProjectSubmissionDialog(type,row){ | |
94 | + this.$refs.projectSubmissionDialog.open(type,row); | |
95 | + }, | |
96 | + showProcessingRecordDialog(row){ | |
97 | + this.$refs.processingRecordDialog.open(row); | |
98 | + }, | |
99 | + handleRefresh() { | |
100 | + console.log("this.$refs.httemplate",this.$refs.httemplate) | |
101 | + this.$refs.httemplate.init() | |
102 | + } | |
85 | 103 | }, |
86 | 104 | } |
87 | 105 | </script> | ... | ... |
frontend/front/src/components/dialog/processingRecordDialog.vue
0 → 100644
... | ... | @@ -0,0 +1,94 @@ |
1 | +<template> | |
2 | + <div> | |
3 | + <el-dialog title="处理记录" :visible.sync="dialogTableVisible" @close="handleClose"> | |
4 | + <el-table :data="gridData"> | |
5 | + <el-table-column type="index" property="date" label="序号" width="150"></el-table-column> | |
6 | + <el-table-column property="f_create_by" label="操作人" width="200"></el-table-column> | |
7 | + <el-table-column property="f_create_time" label="操作时间" width="200"></el-table-column> | |
8 | + <el-table-column property="f_event_type" label="事件类型" width="200"></el-table-column> | |
9 | + <el-table-column property="fProgressStatus" label="进展情况"></el-table-column> | |
10 | + </el-table> | |
11 | + <el-row> | |
12 | + <el-col :span="24" style="display: flex;justify-content: end;margin-top: 10px"> | |
13 | + <el-pagination | |
14 | + @size-change="handleSizeChange" | |
15 | + @current-change="handleCurrentChange" | |
16 | + :current-page="pageForm.page" | |
17 | + :page-sizes="[10, 20, 30, 40]" | |
18 | + :page-size="pageForm.size" | |
19 | + layout="total, sizes, prev, pager, next, jumper" | |
20 | + :total="pageForm.total"> | |
21 | + </el-pagination> | |
22 | + </el-col> | |
23 | + </el-row> | |
24 | + </el-dialog> | |
25 | + </div> | |
26 | +</template> | |
27 | + | |
28 | +<script> | |
29 | +import { getProcessingRecord } from '@/api/projectSubmission' | |
30 | +export default { | |
31 | + name: "processingRecordDialog", | |
32 | + data(){ | |
33 | + return { | |
34 | + dialogTableVisible:false, | |
35 | + gridData:[], | |
36 | + projectId:'', | |
37 | + pageForm:{ | |
38 | + page:1, | |
39 | + size:10, | |
40 | + total:0 | |
41 | + } | |
42 | + } | |
43 | + }, | |
44 | + mounted(){ | |
45 | + | |
46 | + }, | |
47 | + methods:{ | |
48 | + async getRecordData(){ | |
49 | + let params ={ | |
50 | + pageBean: { | |
51 | + page: 1, | |
52 | + pageSize: 10, | |
53 | + showTotal: true, | |
54 | + }, | |
55 | + querys: [ | |
56 | + { | |
57 | + property: "f_project_id", | |
58 | + value: this.projectId?this.projectId:'', | |
59 | + group: "advance", | |
60 | + relation: "AND", | |
61 | + operation: "EQUAL" | |
62 | + } | |
63 | + ] | |
64 | + } | |
65 | + await getProcessingRecord(params).then((res)=>{ | |
66 | + console.log('打印获取处理记录的res',res) | |
67 | + const { rows, total } = res; | |
68 | + this.gridData = rows; | |
69 | + this.pageForm.total = total; | |
70 | + }) | |
71 | + }, | |
72 | + open(row){ | |
73 | + this.dialogTableVisible = true; | |
74 | + this.projectId = row.id_; | |
75 | + this.getRecordData(); | |
76 | + }, | |
77 | + handleClose(){ | |
78 | + this.dialogTableVisible = false; | |
79 | + }, | |
80 | + handleSizeChange(val){ | |
81 | + this.pageForm.size = val; | |
82 | + this.getRecordData(); | |
83 | + }, | |
84 | + handleCurrentChange(val){ | |
85 | + this.pageForm.page = val; | |
86 | + this.getRecordData(); | |
87 | + } | |
88 | + } | |
89 | +} | |
90 | +</script> | |
91 | + | |
92 | +<style scoped> | |
93 | + | |
94 | +</style> | ... | ... |
frontend/front/src/components/dialog/projectSubmissionDialog.vue
0 → 100644
... | ... | @@ -0,0 +1,111 @@ |
1 | +<template> | |
2 | + <div> | |
3 | + <el-dialog | |
4 | + :title="dialogForm.title" | |
5 | + :visible.sync="dialogForm.dialogVisible" | |
6 | + width="30%" | |
7 | + @close="handleClose"> | |
8 | + <el-row> | |
9 | + <el-form :model="dialogForm" ref="dialogForm" :rules="rules"> | |
10 | + <el-form-item :label="dialogForm.label" prop="textarea"> | |
11 | + <el-input | |
12 | + type="textarea" | |
13 | + :autosize="{ minRows: 4, maxRows:5}" | |
14 | + placeholder="请输入内容" | |
15 | + v-model="dialogForm.textarea"> | |
16 | + </el-input> | |
17 | + </el-form-item> | |
18 | + </el-form> | |
19 | + </el-row> | |
20 | + <span slot="footer" class="dialog-footer"> | |
21 | + <el-button @click="handleClose">取 消</el-button> | |
22 | + <el-button type="primary" @click="handleSubmit('dialogForm')">确 定</el-button> | |
23 | + </span> | |
24 | + </el-dialog> | |
25 | + </div> | |
26 | +</template> | |
27 | + | |
28 | +<script> | |
29 | +import { submitData } from '@/api/projectSubmission' | |
30 | +export default { | |
31 | + name: "projectSubmissionDialog", | |
32 | + data(){ | |
33 | + return { | |
34 | + dialogForm:{ | |
35 | + dialogVisible:false, | |
36 | + title:'入库', | |
37 | + textarea:'', | |
38 | + label:'入库说明:', | |
39 | + fProjectId:'', | |
40 | + fEventType:'' | |
41 | + }, | |
42 | + rules:{ | |
43 | + textarea:[ | |
44 | + { required: true, message: '请填写入库说明', trigger: 'blur' } | |
45 | + ] | |
46 | + } | |
47 | + } | |
48 | + }, | |
49 | + methods:{ | |
50 | + open(type,row){ | |
51 | + console.log('打印type',type); | |
52 | + console.log('打印row',row); | |
53 | + this.dialogType = type; | |
54 | + this.dialogForm.fProjectId = row.id_; | |
55 | + this.dialogForm.dialogVisible = true; | |
56 | + switch (type){ | |
57 | + case 'rk': | |
58 | + this.dialogForm.title = '入库'; | |
59 | + this.dialogForm.label ='入库说明:'; | |
60 | + this.dialogForm.fEventType = 'ruku'; | |
61 | + break; | |
62 | + case 'zf': | |
63 | + this.dialogForm.label = '作废说明:'; | |
64 | + this.dialogForm.title = '作废'; | |
65 | + this.dialogForm.fEventType = 'zuofei'; | |
66 | + break; | |
67 | + case 'xmjz': | |
68 | + this.dialogForm.title = '项目进展'; | |
69 | + this.dialogForm.label ='本次项目进展说明:'; | |
70 | + this.dialogForm.fEventType = 'xiangmujinzhan'; | |
71 | + break; | |
72 | + case 'zf': | |
73 | + this.dialogForm.label = '出库说明:'; | |
74 | + this.dialogForm.title = '出库'; | |
75 | + this.dialogForm.fEventType = 'chuku'; | |
76 | + break; | |
77 | + } | |
78 | + }, | |
79 | + handleSubmit(formName){ | |
80 | + this.$refs[formName].validate(async (valid) => { | |
81 | + if (valid) { | |
82 | + let params ={ | |
83 | + fProjectId:this.dialogForm.fProjectId, | |
84 | + fEventType:this.dialogForm.fEventType, | |
85 | + fProgressStatus:this.dialogForm.textarea | |
86 | + } | |
87 | + await submitData(params).then((res)=>{ | |
88 | + console.log('打印res',res); | |
89 | + if(res.code == 200){ | |
90 | + this.$emit('handleRefresh'); | |
91 | + } | |
92 | + this.dialogForm.dialogVisible = false; | |
93 | + }) | |
94 | + | |
95 | + } else { | |
96 | + console.log('error submit!!'); | |
97 | + return false; | |
98 | + } | |
99 | + }); | |
100 | + }, | |
101 | + handleClose(){ | |
102 | + this.$refs.dialogForm.resetFields(); | |
103 | + this.dialogForm.dialogVisible = false; | |
104 | + }, | |
105 | + } | |
106 | +} | |
107 | +</script> | |
108 | + | |
109 | +<style scoped> | |
110 | + | |
111 | +</style> | ... | ... |
frontend/front/src/components/tableSlot/projectSubmission/exportRecord.vue
0 → 100644
... | ... | @@ -0,0 +1,58 @@ |
1 | +<template> | |
2 | + <div> | |
3 | + <el-button icon="el-icon-upload2" size="mini" @click="handleExport" :loading="loading">导出</el-button> | |
4 | + </div> | |
5 | +</template> | |
6 | + | |
7 | +<script> | |
8 | +import { exportRecordData } from '@/api/projectSubmission' | |
9 | +export default { | |
10 | + name: "exportRecord", | |
11 | + props:{ | |
12 | + searchForms:{ | |
13 | + type:Object | |
14 | + }, | |
15 | + selectRows: { | |
16 | + type: Object | |
17 | + } | |
18 | + }, | |
19 | + data(){ | |
20 | + return { | |
21 | + loading:false | |
22 | + } | |
23 | + }, | |
24 | + methods:{ | |
25 | + handleExport(){ | |
26 | + this.loading = true; | |
27 | + let params ={ | |
28 | + fProjectNo:this.searchForms.project_no?this.searchForms.project_no:'', | |
29 | + fProjectName:this.searchForms.project_name?this.searchForms.project_name:'', | |
30 | + fProjectCategory:this.searchForms.project_category?this.searchForms.project_category:'', | |
31 | + fProjectState:this.searchForms.project_state?this.searchForms.project_state:'', | |
32 | + createTime:this.searchForms.create_time?this.searchForms.create_time:'', | |
33 | + fProjectNature:this.searchForms.project_nature?this.searchForms.project_nature:'', | |
34 | + fBusinessScenarios:this.searchForms.business_scenarios?this.searchForms.business_scenarios:'', | |
35 | + fBusinessModel:this.searchForms.business_model?this.searchForms.business_model:'', | |
36 | + fProjectRating:this.searchForms.project_rating?this.searchForms.project_rating:'', | |
37 | + updateTime:this.searchForms.update_time?this.searchForms.update_time:'' | |
38 | + } | |
39 | + exportRecordData(params).then((res)=>{ | |
40 | + console.log('打印res',res); | |
41 | + let {data, headers} = res; | |
42 | + // 附件下载 | |
43 | + const blob = new Blob([data]); | |
44 | + // 附件下载 | |
45 | + const fileName = decodeURIComponent(headers['content-disposition'].split(';')[1].split('filename=')[1]); | |
46 | + saveAs(blob, fileName); | |
47 | + this.loading = false; | |
48 | + }) | |
49 | + console.log('打印this.rows',this.searchForms,this.selectRows) | |
50 | + | |
51 | + }, | |
52 | + } | |
53 | +} | |
54 | +</script> | |
55 | + | |
56 | +<style scoped> | |
57 | + | |
58 | +</style> | ... | ... |