vue2-client 1.15.64 → 1.15.66

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,97 +1,97 @@
1
- <template>
2
- <a-card :bordered="false">
3
- <x-form-table
4
- title="工作日志"
5
- ref="xFormTable"
6
- :queryParamsName="queryParamsName"
7
- :fixedAddForm="fixedAddForm"
8
- :fixed-query-form="fixedQueryForm"
9
- @afterSubmit="Submit"
10
- @action="toDetail"
11
- >
12
- </x-form-table>
13
- <!-- 抽屉 -->
14
- <a-drawer
15
- :visible="visible"
16
- width="40vw"
17
- placement="right"
18
- title="查看附件"
19
- @close="visible = false, previewFileVisible=false"
20
- >
21
- <div>
22
- <file-item :files="fileList" @preview="handlePreviewFile"/>
23
- </div>
24
- <!-- 文件预览 -->
25
- <a-modal v-model="previewFileVisible" :footer="null" :dialog-style="{ top: '20px' }" width="80%" :z-index="1001">
26
- <file-preview :path="filePath"/>
27
- </a-modal>
28
- </a-drawer>
29
- </a-card>
30
- </template>
31
-
32
- <script>
33
- import XFormTable from '@vue2-client/base-client/components/common/XFormTable/XFormTable'
34
- import { runLogic } from 'vue2-client/src/services/api/common'
35
- import fileItem from '@vue2-client/components/FileImageItem/FileItem.vue'
36
- import FilePreview from '@vue2-client/components/FilePreview/FilePreview.vue'
37
- import { mapState } from 'vuex'
38
- export default {
39
- name: '工作日志',
40
- components: {
41
- XFormTable,
42
- fileItem,
43
- FilePreview
44
- },
45
- props: {
46
- workflowId: {
47
- type: String,
48
- default: ''
49
- },
50
- details: {
51
- type: Object,
52
- required: true
53
- }
54
- },
55
- computed: {
56
- ...mapState('account', { currUser: 'user' }),
57
- },
58
- data () {
59
- return {
60
- // 查询配置文件名
61
- queryParamsName: 'worklogCRUD',
62
- visible: false,
63
- previewFileVisible: false,
64
- filePath: '',
65
- fileList: [],
66
- fixedQueryForm: {},
67
- fixedAddForm: {}
68
- }
69
- },
70
- mounted () {
71
- this.init()
72
- },
73
- methods: {
74
- init () {
75
- this.fixedQueryForm = { w_f_workflow_id: this.workflowId }
76
- this.fixedAddForm = { w_defname: this.details.f_sub_state }
77
- this.$refs.xFormTable.refreshTable(true)
78
- },
79
- toDetail (record, id) {
80
- runLogic('getfiles', { id: id, f_table_name: 't_work_log' }, 'af-apply').then(res => {
81
- this.fileList = res
82
- this.visible = true
83
- })
84
- },
85
- handlePreviewFile (url) {
86
- this.filePath = url
87
- this.previewFileVisible = true
88
- },
89
- Submit (record) {
90
- record.form.id = record.id
91
- record.form.f_workflow_id = this.workflowId
92
- runLogic('updataworklogfiles', record, 'af-apply')
93
- this.$refs.xFormTable.refreshTable(true)
94
- }
95
- }
96
- }
97
- </script>
1
+ <template>
2
+ <a-card :bordered="false">
3
+ <x-form-table
4
+ title="工作日志"
5
+ ref="xFormTable"
6
+ :queryParamsName="queryParamsName"
7
+ :fixedAddForm="fixedAddForm"
8
+ :fixed-query-form="fixedQueryForm"
9
+ @afterSubmit="Submit"
10
+ @action="toDetail"
11
+ >
12
+ </x-form-table>
13
+ <!-- 抽屉 -->
14
+ <a-drawer
15
+ :visible="visible"
16
+ width="40vw"
17
+ placement="right"
18
+ title="查看附件"
19
+ @close="visible = false, previewFileVisible=false"
20
+ >
21
+ <div>
22
+ <file-item :files="fileList" @preview="handlePreviewFile"/>
23
+ </div>
24
+ <!-- 文件预览 -->
25
+ <a-modal v-model="previewFileVisible" :footer="null" :dialog-style="{ top: '20px' }" width="80%" :z-index="1001">
26
+ <file-preview :path="filePath"/>
27
+ </a-modal>
28
+ </a-drawer>
29
+ </a-card>
30
+ </template>
31
+
32
+ <script>
33
+ import XFormTable from '@vue2-client/base-client/components/common/XFormTable/XFormTable'
34
+ import { runLogic } from '@vue2-client/services/api/common'
35
+ import fileItem from '@vue2-client/components/FileImageItem/FileItem.vue'
36
+ import FilePreview from '@vue2-client/components/FilePreview/FilePreview.vue'
37
+ import { mapState } from 'vuex'
38
+ export default {
39
+ name: '工作日志',
40
+ components: {
41
+ XFormTable,
42
+ fileItem,
43
+ FilePreview
44
+ },
45
+ props: {
46
+ workflowId: {
47
+ type: String,
48
+ default: ''
49
+ },
50
+ details: {
51
+ type: Object,
52
+ required: true
53
+ }
54
+ },
55
+ computed: {
56
+ ...mapState('account', { currUser: 'user' }),
57
+ },
58
+ data () {
59
+ return {
60
+ // 查询配置文件名
61
+ queryParamsName: 'worklogCRUD',
62
+ visible: false,
63
+ previewFileVisible: false,
64
+ filePath: '',
65
+ fileList: [],
66
+ fixedQueryForm: {},
67
+ fixedAddForm: {}
68
+ }
69
+ },
70
+ mounted () {
71
+ this.init()
72
+ },
73
+ methods: {
74
+ init () {
75
+ this.fixedQueryForm = { w_f_workflow_id: this.workflowId }
76
+ this.fixedAddForm = { w_defname: this.details.f_sub_state }
77
+ this.$refs.xFormTable.refreshTable(true)
78
+ },
79
+ toDetail (record, id) {
80
+ runLogic('getfiles', { id: id, f_table_name: 't_work_log' }, 'af-apply').then(res => {
81
+ this.fileList = res
82
+ this.visible = true
83
+ })
84
+ },
85
+ handlePreviewFile (url) {
86
+ this.filePath = url
87
+ this.previewFileVisible = true
88
+ },
89
+ Submit (record) {
90
+ record.form.id = record.id
91
+ record.form.f_workflow_id = this.workflowId
92
+ runLogic('updataworklogfiles', record, 'af-apply')
93
+ this.$refs.xFormTable.refreshTable(true)
94
+ }
95
+ }
96
+ }
97
+ </script>