doctor-admin-components 1.0.13-pro.1 → 1.0.14-beta.2
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.
- package/README.md +10 -2
- package/package.json +1 -1
- package/packages/index.js +16 -0
- package/packages/src/api/biz/bizContract.js +1005 -0
- package/packages/src/api/biz/bizFileInfo.js +16 -0
- package/packages/src/api/biz/bizInvoice.js +1 -1
- package/packages/src/api/biz/bizShipment.js +38 -0
- package/packages/src/assets/images/click-show-table.png +0 -0
- package/packages/src/assets/images/more.png +0 -0
- package/packages/src/assets/images/pdf-new.png +0 -0
- package/packages/src/components/DictTag/index.vue +12 -2
- package/packages/src/components/FileUpload/contract-drag-new.vue +100 -11
- package/packages/src/i18n/en/message.json +305 -0
- package/packages/src/i18n/index.js +38 -0
- package/packages/src/i18n/zh-CN/message.json +305 -0
- package/packages/src/index.js +24 -1
- package/packages/src/utils/MycommonUtil.js +12 -0
- package/packages/src/utils/index.js +35 -0
- package/packages/src/views/biz/bizFileInfo/PAYMENT_VOUCHER(/"payment_voucher/", /"/344/273/230/346/254/276/345/207/255/350/257/201.ini" +222 -0
- package/packages/src/views/biz/bizFileInfo/contract copy.vue +1711 -0
- package/packages/src/views/biz/bizFileInfo/contract.vue +1783 -986
- package/packages/src/views/biz/bizFileInfo/contractFile/BillOfLadingNoTab.vue +114 -0
- package/packages/src/views/biz/bizFileInfo/contractFile/ContentTitle.vue +102 -0
- package/packages/src/views/biz/bizFileInfo/contractFile/IMGPreviewCheckBox.vue +308 -0
- package/packages/src/views/biz/bizFileInfo/contractFile/Progress.vue +85 -0
- package/packages/src/views/biz/bizFileInfo/contractFile/ProgressDetail.vue +123 -0
- package/packages/src/views/biz/bizFileInfo/contractFile/SectionSlot.vue +83 -0
- package/packages/src/views/biz/bizFileInfo/contractFile/ShowAndHide.vue +178 -0
- package/packages/src/views/biz/bizFileInfo/fileShow copy.vue +321 -0
- package/packages/src/views/biz/bizFileInfo/fileShow.vue +143 -47
- package/packages/src/views/biz/bizFileInfo/fileShowClaim.vue +1 -1
- package/packages/src/views/biz/bizShipment/add.vue +166 -28
- package/packages/src/views/biz/bizShipment/referenceAlert.vue +168 -0
- package/packages/src/views/biz/contractTracing/billInfo.vue +64 -40
- package/packages/src/views/biz/contractTracing/companyBanks.vue +228 -0
- package/packages/src/views/biz/contractTracing/contractInfo.vue +1 -1
- package/packages/src/views/biz/contractTracing/contractPdf.vue +10 -5
- package/packages/src/views/biz/contractTracing/contractSummary.vue +31 -19
- package/packages/src/views/biz/contractTracing/contractTracingDetail copy.vue +107 -0
- package/packages/src/views/biz/contractTracing/contractTracingDetail.vue +281 -31
- package/packages/src/views/biz/contractTracing/editBill.vue +22 -9
- package/packages/src/views/biz/contractTracing/purchaseInvoiceUpload.vue +153 -7
- package/packages/src/views/biz/contractTracing/shipmentPurchaseAmount.vue +14 -0
- package/packages/src/views/biz/contractTracing/subCompanyDialog.vue +8 -2
- package/packages/src/views/components/RegionPicker/Distpicker.vue +459 -0
- package/packages/src/views/components/RegionPicker/districts.js +4641 -0
- package/packages/src/views/test.vue +3 -3
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
* @Author: zhangpengwei@1338418459736990.onaliyun.com zhangpengwei@1338418459736990.onaliyun.com
|
|
3
|
+
* @Date: 2024-02-22 11:04:36
|
|
4
|
+
* @LastEditors: zhangpengwei@1338418459736990.onaliyun.com zhangpengwei@1338418459736990.onaliyun.com
|
|
5
|
+
* @LastEditTime: 2024-06-05 13:48:22
|
|
6
|
+
* @FilePath: /doctor-admin-components 公共组件/packages/src/views/biz/bizFileInfo/contractFile/Process.vue
|
|
7
|
+
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
|
8
|
+
-->
|
|
9
|
+
<template>
|
|
10
|
+
<div class="progress" :style="{backgroundColor:info.bgcolor}">
|
|
11
|
+
<el-row>
|
|
12
|
+
<el-col :span="info.hidden ? 13: 8">
|
|
13
|
+
<div class="progress-left">
|
|
14
|
+
<img class="progress-img" :src="info.img" alt="">
|
|
15
|
+
<div class="progress-text">{{ info.text}}</div>
|
|
16
|
+
</div>
|
|
17
|
+
</el-col>
|
|
18
|
+
<el-col :span="info.hidden ? 11 : 16">
|
|
19
|
+
<div class="progress-info"
|
|
20
|
+
:style="{background:`linear-gradient(to right,${info.bgcolor} 0%, ${info.bgcolor} ${rate}%, #fff ${rate}%, #fff 100%)`}"
|
|
21
|
+
>
|
|
22
|
+
<div class="progress-info-text">
|
|
23
|
+
<div v-if="info.textArr && info.textArr.length" class="progress-info-item" v-for="(textItem, key) in info.textArr" :key="key">
|
|
24
|
+
{{textItem}}
|
|
25
|
+
</div>
|
|
26
|
+
</div>
|
|
27
|
+
</div>
|
|
28
|
+
</el-col>
|
|
29
|
+
</el-row>
|
|
30
|
+
<div v-if="!info.hidden" class="progress-rate">{{ $t('contractDetail.progress') }} {{ rate }}%</div>
|
|
31
|
+
</div>
|
|
32
|
+
</template>
|
|
33
|
+
|
|
34
|
+
<script>
|
|
35
|
+
export default {
|
|
36
|
+
name: 'DoctorAdminComponentsProgressDetail',
|
|
37
|
+
props: {
|
|
38
|
+
infoPro: {
|
|
39
|
+
type: Object,
|
|
40
|
+
default: () => {
|
|
41
|
+
return {};
|
|
42
|
+
},
|
|
43
|
+
},
|
|
44
|
+
},
|
|
45
|
+
data() {
|
|
46
|
+
return {
|
|
47
|
+
info:{},
|
|
48
|
+
rate:0
|
|
49
|
+
};
|
|
50
|
+
},
|
|
51
|
+
|
|
52
|
+
mounted() {
|
|
53
|
+
},
|
|
54
|
+
|
|
55
|
+
methods: {
|
|
56
|
+
|
|
57
|
+
},
|
|
58
|
+
watch: {
|
|
59
|
+
infoPro: {
|
|
60
|
+
handler (val) {
|
|
61
|
+
this.info = val;
|
|
62
|
+
this.rate = +val.rate;
|
|
63
|
+
},
|
|
64
|
+
deep: true,
|
|
65
|
+
immediate: true
|
|
66
|
+
},
|
|
67
|
+
}
|
|
68
|
+
};
|
|
69
|
+
</script>
|
|
70
|
+
|
|
71
|
+
<style lang="scss" scoped>
|
|
72
|
+
.progress {
|
|
73
|
+
min-width: 85px;
|
|
74
|
+
min-height: 150px;
|
|
75
|
+
padding:5px;
|
|
76
|
+
box-sizing: border-box;
|
|
77
|
+
position:relative;
|
|
78
|
+
.progress-left {
|
|
79
|
+
min-height:150px;
|
|
80
|
+
display: flex;
|
|
81
|
+
align-items: center;
|
|
82
|
+
//justify-content: center;
|
|
83
|
+
margin-left:120px;
|
|
84
|
+
.progress-img {
|
|
85
|
+
width: 36px;
|
|
86
|
+
height: 36px;
|
|
87
|
+
background: #FFFFFF;
|
|
88
|
+
border-radius: 50%;
|
|
89
|
+
}
|
|
90
|
+
.progress-text {
|
|
91
|
+
font-size: 33px;
|
|
92
|
+
margin-left:30px;
|
|
93
|
+
font-weight: normal;
|
|
94
|
+
color: #fff;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
.progress-rate {
|
|
98
|
+
position: absolute;
|
|
99
|
+
top:15px;
|
|
100
|
+
right:20px;
|
|
101
|
+
font-size: 18px;
|
|
102
|
+
font-weight: 600;
|
|
103
|
+
color: #231F20;
|
|
104
|
+
}
|
|
105
|
+
.progress-info {
|
|
106
|
+
min-height:150px;
|
|
107
|
+
overflow:hidden;
|
|
108
|
+
.progress-info-item {
|
|
109
|
+
margin-top:8px;
|
|
110
|
+
overflow:hidden;
|
|
111
|
+
}
|
|
112
|
+
.progress-info-text {
|
|
113
|
+
min-height:150px;
|
|
114
|
+
padding-left:10px;
|
|
115
|
+
display:flex;
|
|
116
|
+
flex-direction: column;
|
|
117
|
+
justify-content: center;
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
|
|
122
|
+
}
|
|
123
|
+
</style>
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
* @Author: zhangpengwei@1338418459736990.onaliyun.com zhangpengwei@1338418459736990.onaliyun.com
|
|
3
|
+
* @Date: 2024-02-22 13:50:20
|
|
4
|
+
* @LastEditors: zhangpengwei@1338418459736990.onaliyun.com zhangpengwei@1338418459736990.onaliyun.com
|
|
5
|
+
* @LastEditTime: 2024-02-22 14:59:52
|
|
6
|
+
* @FilePath: /doctor-admin-components 公共组件/packages/src/views/biz/bizFileInfo/contractFile/SectionSlot.vue
|
|
7
|
+
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
|
8
|
+
-->
|
|
9
|
+
<template>
|
|
10
|
+
<div>
|
|
11
|
+
<div>
|
|
12
|
+
<slot name="header"></slot>
|
|
13
|
+
</div>
|
|
14
|
+
<div class="slot-content-root" :style="{backgroundColor:info.bgcolor}">
|
|
15
|
+
<div :style="open ? 'height:max-content' : 'height:0;overflow:hidden'">
|
|
16
|
+
<slot name="content"></slot>
|
|
17
|
+
</div>
|
|
18
|
+
<div class="arrow" @click="open = !open">
|
|
19
|
+
<i v-if="open" class="el-icon-arrow-up"></i>
|
|
20
|
+
<i v-else class="el-icon-arrow-down"></i>
|
|
21
|
+
</div>
|
|
22
|
+
</div>
|
|
23
|
+
|
|
24
|
+
</div>
|
|
25
|
+
</template>
|
|
26
|
+
|
|
27
|
+
<script>
|
|
28
|
+
export default {
|
|
29
|
+
name: 'DoctorAdminComponentsSectionSlot',
|
|
30
|
+
props: {
|
|
31
|
+
infoPro: {
|
|
32
|
+
type: Object,
|
|
33
|
+
default: () => {
|
|
34
|
+
return {};
|
|
35
|
+
},
|
|
36
|
+
},
|
|
37
|
+
},
|
|
38
|
+
data() {
|
|
39
|
+
return {
|
|
40
|
+
open:false
|
|
41
|
+
};
|
|
42
|
+
},
|
|
43
|
+
|
|
44
|
+
mounted() {
|
|
45
|
+
|
|
46
|
+
},
|
|
47
|
+
|
|
48
|
+
methods: {
|
|
49
|
+
|
|
50
|
+
},
|
|
51
|
+
watch: {
|
|
52
|
+
infoPro: {
|
|
53
|
+
handler (val) {
|
|
54
|
+
this.info = val;
|
|
55
|
+
},
|
|
56
|
+
deep: true,
|
|
57
|
+
immediate: true
|
|
58
|
+
},
|
|
59
|
+
}
|
|
60
|
+
};
|
|
61
|
+
</script>
|
|
62
|
+
|
|
63
|
+
<style lang="scss" scoped>
|
|
64
|
+
|
|
65
|
+
.slot-content-root {
|
|
66
|
+
padding-bottom:25px;
|
|
67
|
+
background-color: #fff;
|
|
68
|
+
position: relative;
|
|
69
|
+
.arrow {
|
|
70
|
+
position:absolute;
|
|
71
|
+
bottom:0;
|
|
72
|
+
text-align: center;
|
|
73
|
+
width:100%;
|
|
74
|
+
color:#fff;
|
|
75
|
+
cursor: pointer;
|
|
76
|
+
i {
|
|
77
|
+
font-size: 24px;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
</style>
|
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
* @Author: zhangpengwei@1338418459736990.onaliyun.com zhangpengwei@1338418459736990.onaliyun.com
|
|
3
|
+
* @Date: 2024-02-26 10:03:01
|
|
4
|
+
* @LastEditors: zhangpengwei@1338418459736990.onaliyun.com zhangpengwei@1338418459736990.onaliyun.com
|
|
5
|
+
* @LastEditTime: 2024-04-10 19:59:13
|
|
6
|
+
* @FilePath: /doctor-admin-components 公共组件/packages/src/views/biz/bizFileInfo/IMGPreviewCheckBox.vue
|
|
7
|
+
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
|
8
|
+
-->
|
|
9
|
+
<template>
|
|
10
|
+
<div class="img-preview-root">
|
|
11
|
+
<div class="img-preview" :style="open ? 'height:max-content' : {'height':heightStr}">
|
|
12
|
+
<slot></slot>
|
|
13
|
+
<div class="billOfLadingNo-more" @click.stop="openFun" v-if="imgList && imgList.length > HideAmount" :style="{'height':heightStr}">
|
|
14
|
+
<i v-if="open" class="el-icon-caret-top icon-more"></i>
|
|
15
|
+
<i v-else class="el-icon-caret-bottom icon-more"></i>
|
|
16
|
+
</div>
|
|
17
|
+
</div>
|
|
18
|
+
</div>
|
|
19
|
+
</template>
|
|
20
|
+
|
|
21
|
+
<script>
|
|
22
|
+
|
|
23
|
+
export default {
|
|
24
|
+
name: 'ShowAndHide',
|
|
25
|
+
props: {
|
|
26
|
+
dataInfoArr: {
|
|
27
|
+
type: Array,
|
|
28
|
+
default: () => []
|
|
29
|
+
},
|
|
30
|
+
heightStr: {
|
|
31
|
+
type: String,
|
|
32
|
+
default: '110px'
|
|
33
|
+
},
|
|
34
|
+
HideAmount: {
|
|
35
|
+
type: Number,
|
|
36
|
+
default: 4
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
data() {
|
|
40
|
+
return {
|
|
41
|
+
open: false,
|
|
42
|
+
imgList: []
|
|
43
|
+
};
|
|
44
|
+
},
|
|
45
|
+
|
|
46
|
+
mounted() {
|
|
47
|
+
|
|
48
|
+
},
|
|
49
|
+
|
|
50
|
+
methods: {
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
// 文件名称
|
|
55
|
+
extractFileName() {
|
|
56
|
+
return 'loading photos-' + this.info.containerNo + '/container ' + this.info?.containerId + '/ Dated ' + this.$moment(new Date().getTime()).format('YYYY-MM-DD')
|
|
57
|
+
},
|
|
58
|
+
/**
|
|
59
|
+
* @description: 下载一个文件
|
|
60
|
+
* @param {*} file
|
|
61
|
+
* @return {*}
|
|
62
|
+
*/
|
|
63
|
+
downloadSingleFile(file) {
|
|
64
|
+
this.loadingInstance = Loading.service({
|
|
65
|
+
text: this.$t('contractDetail.loading'),
|
|
66
|
+
spinner: 'el-icon-loading',
|
|
67
|
+
background: 'rgba(0, 0, 0, 0.7)',
|
|
68
|
+
});
|
|
69
|
+
// 从URL中提取文件名
|
|
70
|
+
const fileName = this.extractFileName();
|
|
71
|
+
// 如果是zip文件,重新命名为当前时间戳,否则使用原文件名
|
|
72
|
+
const newName = /\.zip$/i.test(fileName) ? fileName + '.zip' : fileName;
|
|
73
|
+
saveAs(file.url, newName);
|
|
74
|
+
this.loadingInstance.close();
|
|
75
|
+
},
|
|
76
|
+
|
|
77
|
+
openFun () {
|
|
78
|
+
this.open = !this.open
|
|
79
|
+
},
|
|
80
|
+
},
|
|
81
|
+
watch: {
|
|
82
|
+
dataInfoArr: {
|
|
83
|
+
handler(val) {
|
|
84
|
+
if(val.length) {
|
|
85
|
+
this.imgList = val;
|
|
86
|
+
}
|
|
87
|
+
},
|
|
88
|
+
deep: true,
|
|
89
|
+
immediate: true
|
|
90
|
+
}
|
|
91
|
+
},
|
|
92
|
+
computed: {
|
|
93
|
+
},
|
|
94
|
+
beforeDestroy() {
|
|
95
|
+
this.loadingInstance = null
|
|
96
|
+
clearTimeout(this.timer)
|
|
97
|
+
}
|
|
98
|
+
};
|
|
99
|
+
</script>
|
|
100
|
+
|
|
101
|
+
<style lang="scss" scoped>
|
|
102
|
+
.img-preview {
|
|
103
|
+
display:flex;
|
|
104
|
+
flex-wrap: wrap;
|
|
105
|
+
padding-right:40px;
|
|
106
|
+
height:110px;
|
|
107
|
+
overflow:hidden;
|
|
108
|
+
position: relative;
|
|
109
|
+
width:100%;
|
|
110
|
+
.img-block {
|
|
111
|
+
position: relative;
|
|
112
|
+
margin:0 15px 15px 0;
|
|
113
|
+
background-color: #666;
|
|
114
|
+
}
|
|
115
|
+
.fold-wrap {
|
|
116
|
+
position: absolute;
|
|
117
|
+
right: 0;
|
|
118
|
+
width: 80px;
|
|
119
|
+
height: 100%;
|
|
120
|
+
display: flex;
|
|
121
|
+
justify-content: center;
|
|
122
|
+
align-items: center;
|
|
123
|
+
.el-button {
|
|
124
|
+
margin-bottom: 20px;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
.checkbox-size {
|
|
130
|
+
position:absolute;
|
|
131
|
+
left:0;
|
|
132
|
+
width:18px;
|
|
133
|
+
height:18px;
|
|
134
|
+
}
|
|
135
|
+
.download-icon {
|
|
136
|
+
position: absolute;
|
|
137
|
+
bottom:2px;
|
|
138
|
+
right:0;
|
|
139
|
+
background-color: #fff;
|
|
140
|
+
cursor: pointer;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
.billOfLadingNo-more {
|
|
144
|
+
width:20px;
|
|
145
|
+
height:100px;
|
|
146
|
+
position:absolute;
|
|
147
|
+
right:0;
|
|
148
|
+
top:0;
|
|
149
|
+
background-color: #999;
|
|
150
|
+
text-align: center;
|
|
151
|
+
.icon-more {
|
|
152
|
+
position: absolute;
|
|
153
|
+
top: 50%;
|
|
154
|
+
left:50%;
|
|
155
|
+
transform: translate(-50%, -50%);
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
.img-preview-root {
|
|
160
|
+
position: relative;
|
|
161
|
+
.batch-download {
|
|
162
|
+
position: absolute;
|
|
163
|
+
top: -41px;
|
|
164
|
+
left: 620px;
|
|
165
|
+
min-width: 80px;
|
|
166
|
+
width:max-content;
|
|
167
|
+
padding:0 10px;
|
|
168
|
+
height: 22px;
|
|
169
|
+
line-height: 22px;
|
|
170
|
+
text-align: center;
|
|
171
|
+
border-radius: 10px;
|
|
172
|
+
background-color: #54B8FF;
|
|
173
|
+
cursor: pointer;
|
|
174
|
+
font-size:12px;
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
</style>
|
|
@@ -0,0 +1,321 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="file-info" v-if="fileInfo.url">
|
|
3
|
+
<div class="main">
|
|
4
|
+
<el-checkbox v-if="!this.hiddenOperation" label="" @change="handleCheck">
|
|
5
|
+
</el-checkbox>
|
|
6
|
+
<div class="area">
|
|
7
|
+
<div class="area-info">
|
|
8
|
+
<div class="area-pdf" v-if="fileInfo.ext == '.pdf'"></div>
|
|
9
|
+
<el-image
|
|
10
|
+
style="width: 54px; height: 54px"
|
|
11
|
+
:src="fileInfo.url"
|
|
12
|
+
fit="contain"
|
|
13
|
+
:preview-src-list="[fileInfo.url]"
|
|
14
|
+
v-else-if="isImage(fileInfo.ext)"
|
|
15
|
+
></el-image>
|
|
16
|
+
<div class="area-file" v-else></div>
|
|
17
|
+
<el-button
|
|
18
|
+
type="text"
|
|
19
|
+
size="mini"
|
|
20
|
+
class="ml5"
|
|
21
|
+
@click="openFile(fileInfo.url)"
|
|
22
|
+
>{{ $t("contractDetail.preview") }}</el-button
|
|
23
|
+
>
|
|
24
|
+
<el-button type="text" size="mini" @click="handleDownload">
|
|
25
|
+
{{ $t("contractDetail.download") }}
|
|
26
|
+
</el-button>
|
|
27
|
+
</div>
|
|
28
|
+
<div v-if="!this.hiddenOperation">
|
|
29
|
+
<el-dropdown trigger="click" @command="handleCommand">
|
|
30
|
+
<span class="el-dropdown-link">
|
|
31
|
+
{{ fileInfo.fileName }}
|
|
32
|
+
<i class="el-icon-arrow-down el-icon--right"></i>
|
|
33
|
+
</span>
|
|
34
|
+
<el-dropdown-menu slot="dropdown">
|
|
35
|
+
<el-dropdown-item command="delete">{{
|
|
36
|
+
$t("contractDetail.delete")
|
|
37
|
+
}}</el-dropdown-item>
|
|
38
|
+
<el-dropdown-item command="rename">重命名</el-dropdown-item>
|
|
39
|
+
<el-dropdown-item command="deleteAndUpload">
|
|
40
|
+
{{ $t("contractDetail.deleteAndUpload") }}
|
|
41
|
+
</el-dropdown-item>
|
|
42
|
+
</el-dropdown-menu>
|
|
43
|
+
</el-dropdown>
|
|
44
|
+
</div>
|
|
45
|
+
<div v-else style="width:120px;word-break:break-all">
|
|
46
|
+
{{ fileInfo.fileName }}
|
|
47
|
+
</div>
|
|
48
|
+
</div>
|
|
49
|
+
</div>
|
|
50
|
+
|
|
51
|
+
<!-- 添加或修改文件信息对话框 -->
|
|
52
|
+
<el-dialog :title="title" :visible.sync="open" width="550px" append-to-body>
|
|
53
|
+
<el-form ref="form" :model="form" label-width="100px">
|
|
54
|
+
<el-form-item :label="$t('contractDetail.fileNmae')" prop="fileName">
|
|
55
|
+
<el-input v-model="form.fileName" placeholder="请输入文件名" />
|
|
56
|
+
</el-form-item>
|
|
57
|
+
</el-form>
|
|
58
|
+
<div slot="footer" class="dialog-footer">
|
|
59
|
+
<el-button type="primary" @click="submitForm">{{
|
|
60
|
+
$t("button.confirm")
|
|
61
|
+
}}</el-button>
|
|
62
|
+
<el-button @click="cancel">{{ $t("button.cancel") }}</el-button>
|
|
63
|
+
</div>
|
|
64
|
+
</el-dialog>
|
|
65
|
+
|
|
66
|
+
<!-- 上传文件信息对话框 -->
|
|
67
|
+
<el-dialog
|
|
68
|
+
:title="title"
|
|
69
|
+
:visible.sync="uploadOpen"
|
|
70
|
+
width="550px"
|
|
71
|
+
append-to-body
|
|
72
|
+
>
|
|
73
|
+
<el-form ref="form" :model="uploadForm" label-width="100px">
|
|
74
|
+
<file-upload v-model="uploadForm.fileInfoList"> </file-upload>
|
|
75
|
+
</el-form>
|
|
76
|
+
<div slot="footer" class="dialog-footer">
|
|
77
|
+
<el-button type="primary" @click="submitUploadForm">{{
|
|
78
|
+
$t("button.confirm")
|
|
79
|
+
}}</el-button>
|
|
80
|
+
<el-button @click="cancel">{{ $t("button.cancel") }}</el-button>
|
|
81
|
+
</div>
|
|
82
|
+
</el-dialog>
|
|
83
|
+
</div>
|
|
84
|
+
</template>
|
|
85
|
+
<script>
|
|
86
|
+
import { downloadFile } from "../../../utils/request";
|
|
87
|
+
import {
|
|
88
|
+
getBizFileInfo,
|
|
89
|
+
delBizFileInfo,
|
|
90
|
+
addBizFileInfo,
|
|
91
|
+
updateBizFileInfo,
|
|
92
|
+
} from "../../../api/biz/bizFileInfo";
|
|
93
|
+
export default {
|
|
94
|
+
name: "FileShow",
|
|
95
|
+
props: {
|
|
96
|
+
// 文件信息
|
|
97
|
+
fileInfo: {
|
|
98
|
+
type: Object,
|
|
99
|
+
default: () => {
|
|
100
|
+
return {
|
|
101
|
+
url: "",
|
|
102
|
+
fileName: "",
|
|
103
|
+
ext: "",
|
|
104
|
+
};
|
|
105
|
+
},
|
|
106
|
+
},
|
|
107
|
+
//是否隐藏操作
|
|
108
|
+
hiddenOperation: {
|
|
109
|
+
type: Boolean,
|
|
110
|
+
default: false,
|
|
111
|
+
},
|
|
112
|
+
},
|
|
113
|
+
data() {
|
|
114
|
+
return {
|
|
115
|
+
checkedIds: [],
|
|
116
|
+
//是否显示上传弹出层
|
|
117
|
+
uploadOpen: false,
|
|
118
|
+
// 是否显示弹出层
|
|
119
|
+
open: false,
|
|
120
|
+
// 弹出层标题
|
|
121
|
+
title: "",
|
|
122
|
+
// 表单参数
|
|
123
|
+
form: {},
|
|
124
|
+
//上传表单
|
|
125
|
+
uploadForm: {},
|
|
126
|
+
};
|
|
127
|
+
},
|
|
128
|
+
computed: {
|
|
129
|
+
fileId() {
|
|
130
|
+
return this.fileInfo.fileId;
|
|
131
|
+
},
|
|
132
|
+
},
|
|
133
|
+
methods: {
|
|
134
|
+
// 取消按钮
|
|
135
|
+
cancel() {
|
|
136
|
+
this.open = false;
|
|
137
|
+
this.uploadOpen = false;
|
|
138
|
+
this.reset();
|
|
139
|
+
},
|
|
140
|
+
// 表单重置
|
|
141
|
+
reset() {
|
|
142
|
+
this.form = {
|
|
143
|
+
fileId: null,
|
|
144
|
+
linkId: null,
|
|
145
|
+
linkType: null,
|
|
146
|
+
fileName: null,
|
|
147
|
+
fileType: null,
|
|
148
|
+
url: null,
|
|
149
|
+
createTime: null,
|
|
150
|
+
ext: null,
|
|
151
|
+
};
|
|
152
|
+
this.uploadForm = {
|
|
153
|
+
fileId: null,
|
|
154
|
+
linkId: null,
|
|
155
|
+
linkType: null,
|
|
156
|
+
fileName: null,
|
|
157
|
+
fileType: null,
|
|
158
|
+
url: null,
|
|
159
|
+
createTime: null,
|
|
160
|
+
ext: null,
|
|
161
|
+
fileInfoList: [],
|
|
162
|
+
};
|
|
163
|
+
this.resetForm("form");
|
|
164
|
+
},
|
|
165
|
+
/** 提交按钮 */
|
|
166
|
+
submitForm() {
|
|
167
|
+
this.$refs["form"].validate((valid) => {
|
|
168
|
+
if (valid) {
|
|
169
|
+
if (this.form.fileId != null) {
|
|
170
|
+
updateBizFileInfo(this.form).then((response) => {
|
|
171
|
+
this.$modal.msgSuccess("修改成功");
|
|
172
|
+
this.open = false;
|
|
173
|
+
this.$emit("refresh");
|
|
174
|
+
});
|
|
175
|
+
} else {
|
|
176
|
+
addBizFileInfo(this.form).then((response) => {
|
|
177
|
+
this.$modal.msgSuccess("新增成功");
|
|
178
|
+
this.open = false;
|
|
179
|
+
this.$emit("refresh");
|
|
180
|
+
});
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
});
|
|
184
|
+
},
|
|
185
|
+
/** 修改按钮操作 */
|
|
186
|
+
handleUpdate(row) {
|
|
187
|
+
this.reset();
|
|
188
|
+
const fileId = row.fileId || this.ids;
|
|
189
|
+
getBizFileInfo(fileId).then((response) => {
|
|
190
|
+
this.form = response.data;
|
|
191
|
+
this.open = true;
|
|
192
|
+
this.title = "修改文件信息";
|
|
193
|
+
});
|
|
194
|
+
},
|
|
195
|
+
/** 删除按钮操作 */
|
|
196
|
+
handleDelete(row) {
|
|
197
|
+
const fileIds = row.fileId || this.ids;
|
|
198
|
+
this.$modal
|
|
199
|
+
.confirm("是否确认删除该文件?")
|
|
200
|
+
.then(function () {
|
|
201
|
+
return delBizFileInfo(fileIds);
|
|
202
|
+
})
|
|
203
|
+
.then(() => {
|
|
204
|
+
this.$emit("refresh");
|
|
205
|
+
this.$modal.msgSuccess("删除成功");
|
|
206
|
+
})
|
|
207
|
+
.catch(() => {});
|
|
208
|
+
},
|
|
209
|
+
submitUploadForm() {
|
|
210
|
+
console.log(this.uploadForm);
|
|
211
|
+
addBizFileInfo(this.uploadForm).then((response) => {
|
|
212
|
+
this.$modal.msgSuccess("上传成功");
|
|
213
|
+
this.uploadOpen = false;
|
|
214
|
+
this.$emit("refresh");
|
|
215
|
+
});
|
|
216
|
+
},
|
|
217
|
+
handleDeleteAndUpload(row) {
|
|
218
|
+
const fileId = row.fileId;
|
|
219
|
+
this.$modal
|
|
220
|
+
.confirm("是否确认删除该文件并重新上传?")
|
|
221
|
+
.then(function () {
|
|
222
|
+
return delBizFileInfo(fileId);
|
|
223
|
+
})
|
|
224
|
+
.then(() => {
|
|
225
|
+
this.$modal.msgSuccess("删除成功");
|
|
226
|
+
this.reset();
|
|
227
|
+
this.uploadOpen = true;
|
|
228
|
+
this.uploadForm = {
|
|
229
|
+
linkId: row.linkId,
|
|
230
|
+
linkType: row.linkType,
|
|
231
|
+
fileType: row.fileType,
|
|
232
|
+
};
|
|
233
|
+
this.title = "上传文件";
|
|
234
|
+
})
|
|
235
|
+
.catch(() => {});
|
|
236
|
+
},
|
|
237
|
+
handleCommand(command) {
|
|
238
|
+
switch (command) {
|
|
239
|
+
case "delete":
|
|
240
|
+
this.handleDelete(this.fileInfo);
|
|
241
|
+
break;
|
|
242
|
+
case "rename":
|
|
243
|
+
this.handleUpdate(this.fileInfo);
|
|
244
|
+
break;
|
|
245
|
+
case "deleteAndUpload":
|
|
246
|
+
this.handleDeleteAndUpload(this.fileInfo);
|
|
247
|
+
break;
|
|
248
|
+
default:
|
|
249
|
+
break;
|
|
250
|
+
}
|
|
251
|
+
},
|
|
252
|
+
isImage(ext) {
|
|
253
|
+
return [".jpg", ".jpeg", ".png", ".gif"].includes(ext);
|
|
254
|
+
},
|
|
255
|
+
/** 下载文件 */
|
|
256
|
+
handleDownload() {
|
|
257
|
+
// this.download(this.fileInfo.url, {}, this.fileInfo.fileName);
|
|
258
|
+
downloadFile(this.fileInfo.url, this.fileInfo.fileName);
|
|
259
|
+
},
|
|
260
|
+
openFile(url) {
|
|
261
|
+
window.open(url);
|
|
262
|
+
},
|
|
263
|
+
handleCheck(val) {
|
|
264
|
+
if (val) {
|
|
265
|
+
this.$emit("checked", this.fileInfo);
|
|
266
|
+
} else {
|
|
267
|
+
this.$emit("uncheck", this.fileInfo.fileId);
|
|
268
|
+
}
|
|
269
|
+
},
|
|
270
|
+
},
|
|
271
|
+
};
|
|
272
|
+
</script>
|
|
273
|
+
<style lang="scss" scoped>
|
|
274
|
+
.file-info {
|
|
275
|
+
width: 160px;
|
|
276
|
+
display: flex;
|
|
277
|
+
// border: 1px solid red;
|
|
278
|
+
.main {
|
|
279
|
+
display: flex;
|
|
280
|
+
.area {
|
|
281
|
+
margin-left: 5px;
|
|
282
|
+
width: 100%;
|
|
283
|
+
height: 100%;
|
|
284
|
+
display: block;
|
|
285
|
+
.area-info {
|
|
286
|
+
display: flex;
|
|
287
|
+
.area-pdf {
|
|
288
|
+
width: 38px;
|
|
289
|
+
height: 46px;
|
|
290
|
+
background: url("../../../assets/images/pdf.png") no-repeat center;
|
|
291
|
+
background-size: contain;
|
|
292
|
+
}
|
|
293
|
+
.area-file {
|
|
294
|
+
width: 38px;
|
|
295
|
+
height: 46px;
|
|
296
|
+
background: url("../../../assets/images/file.png") no-repeat center;
|
|
297
|
+
background-size: contain;
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
}
|
|
301
|
+
.filename {
|
|
302
|
+
width: 140px;
|
|
303
|
+
margin-top: 10px;
|
|
304
|
+
font-size: 14px;
|
|
305
|
+
color: #333;
|
|
306
|
+
text-align: left;
|
|
307
|
+
word-wrap: break-word;
|
|
308
|
+
}
|
|
309
|
+
}
|
|
310
|
+
::v-deep .el-dropdown {
|
|
311
|
+
}
|
|
312
|
+
.el-dropdown-link {
|
|
313
|
+
cursor: pointer;
|
|
314
|
+
color: #409eff;
|
|
315
|
+
word-break: break-word;
|
|
316
|
+
}
|
|
317
|
+
.el-icon-arrow-down {
|
|
318
|
+
font-size: 12px;
|
|
319
|
+
}
|
|
320
|
+
}
|
|
321
|
+
</style>
|