@toolspack/ttd-common 0.2.1 → 0.2.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.
@@ -0,0 +1,220 @@
1
+ /* 改变主题色变量 */
2
+ $--color-primary: #336FFF;
3
+ $--color-text-primary: #222222 !default;
4
+ $--color-text-regular: #606266 !default;
5
+ $--color-text-secondary: #909399 !default;
6
+ // $--color-text-placeholder: #C9C9C9 !default;
7
+ $--color-text-placeholder: #cccccc !default;
8
+ $--input-focus-border: #3388FF;
9
+ $--border-color-base: #ccc !default;
10
+
11
+ /* 改变 icon 字体路径变量,必需 */
12
+ $--font-path: '~element-ui/lib/theme-chalk/fonts';
13
+
14
+ $--input-color: $--color-text-primary !default;
15
+ $--input-border-color: $--border-color-base !default;
16
+
17
+
18
+ .el-form-item__label {
19
+ color: #666666;
20
+ }
21
+
22
+ /* 产品创设, 为了使label和title的间距 减小 */
23
+ .el-form--label-top .el-form-item__label {
24
+ padding: 0 0 3px 0;
25
+ }
26
+
27
+ .el-form--inline .el-form-item {
28
+ margin-right: 16px;
29
+ }
30
+
31
+ .el-radio__input.is-checked+.el-radio__label {
32
+ color: inherit
33
+ }
34
+
35
+
36
+ /* 为了使MessageBox 的按钮 变大 (element-ui 使用small) */
37
+ .el-message-box {
38
+ .el-message-box__btns {
39
+ .el-button {
40
+ padding: 12px 23px
41
+ }
42
+ }
43
+ }
44
+
45
+ .el-checkbox__input.is-disabled.is-checked {
46
+ .el-checkbox__inner::after {
47
+ border-color: #336FFF;
48
+ }
49
+ }
50
+
51
+ .el-checkbox.no-label {
52
+ .el-checkbox__label {
53
+ display: none;
54
+ }
55
+ }
56
+
57
+ .el-radio {
58
+ .el-radio__inner {
59
+ width: 20px;
60
+ height: 20px;
61
+
62
+ &:after {
63
+ width: 10px;
64
+ height: 10px
65
+ }
66
+ }
67
+
68
+ .el-radio__input.is-checked:not(.is-disabled) {
69
+ .el-radio__inner {
70
+ background: #fff;
71
+ }
72
+
73
+ .el-radio__inner:after {
74
+ background: #336FFF;
75
+ }
76
+ }
77
+ }
78
+
79
+ /* 修改按钮组的圆角 */
80
+ .el-radio-group {
81
+
82
+ // .el-radio-button:first-child {
83
+ // .el-radio-button__inner {
84
+ // border-radius: 22px 0 0 22px
85
+ // }
86
+ // }
87
+
88
+ // .el-radio-button:last-child {
89
+ // .el-radio-button__inner {
90
+ // border-radius: 0 22px 22px 0
91
+ // }
92
+ // }
93
+ }
94
+
95
+ .el-dialog {
96
+ /* 为了不让继承 容器元素的值 (page-bottom) */
97
+ text-align: left;
98
+ line-height: initial;
99
+ border-radius: 10px;
100
+
101
+ .el-dialog__header {
102
+ padding: 30px 30px 10px 30px
103
+ }
104
+
105
+ .el-dialog__body {
106
+ padding: 10px 30px 20px 30px
107
+ }
108
+
109
+ .el-dialog__footer {
110
+ border-radius: 0 0 10px 10px;
111
+ }
112
+ }
113
+
114
+ .el-message-box {
115
+ height: 300px;
116
+ width: 400px;
117
+ position: relative;
118
+ color: #222;
119
+
120
+ .el-message-box__content {
121
+ font-size: 16px;
122
+ color: #222;
123
+ position: absolute;
124
+ top: 40%;
125
+ transform: translate(0, -40%);
126
+ left: 0;
127
+ right: 0;
128
+ }
129
+
130
+ .el-message-box__btns {
131
+ position: absolute;
132
+ left: 0;
133
+ right: 0;
134
+ bottom: 0;
135
+ padding: 15px 30px;
136
+ background: #F5F5F5;
137
+ }
138
+ }
139
+
140
+ .messageMaxWith {
141
+ max-width: 300px;
142
+
143
+ .el-message__content {
144
+ line-height: 1.5em;
145
+ }
146
+ }
147
+
148
+ .el-upload--picture-card,
149
+ .el-upload-list--picture-card .el-upload-list__item {
150
+ width: 120px;
151
+ height: 120px;
152
+ text-align: center;
153
+ }
154
+
155
+ .el-upload--picture-card {
156
+ line-height: 120px;
157
+
158
+ .el-icon-plus {
159
+ font-size: 36px;
160
+ }
161
+ }
162
+
163
+ .avatar-uploade {
164
+ overflow: hidden;
165
+
166
+ .avatar-uploade-img {
167
+ width: 120px;
168
+ height: 120px;
169
+ }
170
+ }
171
+
172
+
173
+ .plyr--audio .plyr__control.plyr__tab-focus, .plyr--audio .plyr__control:hover, .plyr--audio .plyr__control[aria-expanded=true] {
174
+ background: $--color-primary !important;
175
+ }
176
+ .plyr--full-ui input[type=range] {
177
+ color: $--color-primary !important;
178
+ }
179
+
180
+ .el-alert--primary.is-light {
181
+ color: $--color-primary !important;
182
+ background-color: rgba(51, 111, 255, 0.1);
183
+ }
184
+
185
+ .alert-reset {
186
+ .el-alert__icon{
187
+ width: 16px;
188
+ font-size: 20px;
189
+ align-self: flex-start;
190
+ }
191
+ .el-alert__title {
192
+ font-size: 16px;
193
+ font-weight: 600;
194
+ }
195
+ .el-alert__description {
196
+ font-size: 14px;
197
+ line-height: 22px;
198
+ word-break: break-word;
199
+ }
200
+ }
201
+
202
+ .alert-reset.el-alert--error {
203
+ .el-alert__description {
204
+ color: #9E9494;
205
+ }
206
+ }
207
+
208
+ // 自定义el-tab样式
209
+ .custom-tab .el-tabs__item {
210
+ padding: 14px 0 0 0;
211
+ width: 184px;
212
+ height: 56px;
213
+ line-height: 24px;
214
+ font-size: 16px;
215
+ font-weight: 600;
216
+ text-align: center;
217
+ }
218
+ .custom-tab .el-tabs__header {
219
+ margin: 0 0 24px;
220
+ }
@@ -0,0 +1,59 @@
1
+ /* input 和 button 的样式控制 */
2
+
3
+
4
+ .gray-btn {
5
+ color: #222222;
6
+ border-color: #cccccc;
7
+
8
+ &:hover {
9
+ color: #38f;
10
+ border-color: #38f;
11
+ background-color: #fff;
12
+ }
13
+
14
+ &:active {
15
+ color: #fff;
16
+ background-color: #38f;
17
+ border-color: #38f;
18
+ }
19
+
20
+ &:disabled {
21
+ color: #ccc;
22
+ background-color: #F5F5F5;
23
+ border: 1px solid #E0E0E0;
24
+ }
25
+ }
26
+
27
+ .el-button--danger {
28
+ border-color: #FF3838;
29
+ background: #ffffff;
30
+ color: #FF3838;
31
+
32
+ &:hover {
33
+ color: #FF0511;
34
+ }
35
+ }
36
+
37
+
38
+ .el-input__inner {
39
+ border-radius: 2px;
40
+ padding: 0 10px;
41
+
42
+ }
43
+
44
+ .el-input__inner::-ms-reveal {
45
+ display: none;
46
+ }
47
+
48
+
49
+ .el-form-item.is-success .el-input__inner,
50
+ .el-form-item.is-success .el-input__inner:focus,
51
+ .el-form-item.is-success .el-textarea__inner,
52
+ .el-form-item.is-success .el-textarea__inner:focus {
53
+ border-color: #E0E0E0
54
+ }
55
+
56
+ .el-input.is-disabled .el-input__inner {
57
+ border: 1px solid #E0E0E0;
58
+ color: #CCCCCC;
59
+ }
@@ -0,0 +1,14 @@
1
+ <template>
2
+ <div>
3
+ <div>这是一个基础模板</div>
4
+ </div>
5
+ </template>
6
+ <script>
7
+ export default {
8
+ data() {
9
+ return {}
10
+ },
11
+ created() {},
12
+ methods: {},
13
+ }
14
+ </script>
@@ -0,0 +1,180 @@
1
+ <template>
2
+ <div class="main-wrapper flex">
3
+ <div class="flex-item">
4
+ <div class="page-title">
5
+ <span class="back-btn" @click="$router.go(-1)">
6
+ <i class="return"></i>
7
+ </span>
8
+ <span>标签配置</span>
9
+ </div>
10
+ <div class="page-content">
11
+ <div class="content-main">
12
+ <div class="border-line">
13
+ <div class="body-con">
14
+ <div class="contract-con">
15
+ <div class="title-con" style="position: relative">
16
+ <div style="text-align: center">
17
+ <switch-page @page="page = $event" :numPages="numPages"></switch-page>
18
+ </div>
19
+ </div>
20
+ <div class="pdf-box">
21
+ <pdf-view
22
+ :pdfurl="fileUrl.url"
23
+ :showPages="false"
24
+ :border="true"
25
+ :scale="1.5"
26
+ :page="page"
27
+ @size="onSize"
28
+ @numPages="numPages = $event"
29
+ >
30
+ <ttd-label-make
31
+ :labelViewData="labelContent"
32
+ :labelCurrent="itemObj"
33
+ :page="page"
34
+ @getLabelData="getLabelData"
35
+ :labelView="labelView"
36
+ >
37
+ <el-form-item class="remark-wrapper" label="是否换222行" prop="isMultiline">
38
+ <el-select v-model="formData.isMultiline">
39
+ <el-option label="单行" :value="0"></el-option>
40
+ <el-option label="多行" :value="1"></el-option>
41
+ </el-select>
42
+ </el-form-item>
43
+ <el-form-item class="remark-wrapper" label="是否换33行" prop="isMultiline">
44
+ <el-select v-model="formData.isMultiline">
45
+ <el-option label="单行" :value="0"></el-option>
46
+ <el-option label="多行" :value="1"></el-option>
47
+ </el-select>
48
+ </el-form-item>
49
+ </ttd-label-make>
50
+ </pdf-view>
51
+ </div>
52
+ </div>
53
+ <div class="label-done">
54
+ <ttd-label-operate
55
+ :showSelectLabel="false"
56
+ isConsign
57
+ :operateConfig="operateConfig"
58
+ :labelData="labelData"
59
+ @getSignItem="getSignItem"
60
+ @setLabelView="labelView=$event"
61
+ >
62
+ <search-label @emit-label="getSignItem" />
63
+ </ttd-label-operate>
64
+ </div>
65
+ </div>
66
+ </div>
67
+ </div>
68
+ </div>
69
+ </div>
70
+ <div class="page-bottom">
71
+ <el-button @click="onCancel" style="width: 120px;">返 回</el-button>
72
+ <el-button @click="onSubmit" type="primary" style="width: 120px;">提 交</el-button>
73
+ </div>
74
+ </div>
75
+ </template>
76
+
77
+ <script>
78
+
79
+ import { labelsManager, labelsInvestor } from './labels';
80
+
81
+ export default {
82
+ data() {
83
+ return {
84
+ typeId: this.$route.query.id,
85
+ modelInfo: {},
86
+ fileUrl: {},
87
+ itemObj: null,
88
+ currentView: '',
89
+ page: 1,
90
+ numPages: 0,
91
+ textLabelList: [],
92
+ inputNameList: [],
93
+ labelData: [], // 将要提交的所有标签数据
94
+ labelView: 0,
95
+ labelContent: [],
96
+
97
+ sureBack: false,
98
+ operateConfig: [],
99
+ viewport: null,
100
+ formData: {},
101
+ };
102
+ },
103
+ created() {
104
+ this.getModelDetail()
105
+ },
106
+ methods: {
107
+ async onCancel() {
108
+ await this.$confirm('您确定不保留本次配置结果?', '提示')
109
+ this.$router.go(-1);
110
+ },
111
+ getLabelData(labelData) {
112
+ this.labelData = labelData;
113
+ this.itemObj = null
114
+ },
115
+
116
+ getSignItem(type) {
117
+ console.log('getSignItem=', type)
118
+ this.itemObj = type;
119
+ },
120
+ onSize(viewport, page) {
121
+ this.viewport = viewport
122
+ console.log('viewport', viewport)
123
+ console.log('page', page)
124
+ },
125
+
126
+ getModelDetail() {
127
+ this.fileUrl.url = 'https://wsp.totodi.com/visit/totodi-other/20210617-c71f4fc934ba4fb68d053e6960021c75-otocol.pdf?expireDataTime=1637835905131';
128
+ this.operateConfig = [labelsManager, labelsInvestor]
129
+ },
130
+
131
+ onSubmit() {
132
+ if (this.hasLabel()) {
133
+ const labelDetails = [];
134
+ const signDetails = [];
135
+ this.labelData.forEach((element) => {
136
+ const { xAxis, yAxis } = element
137
+ // const xLocation = Math.round(xAxis / 1.5)
138
+ // ttd-label-make 里计算的左边已经加了 标签高度
139
+ // const yLocation = Math.round((this.viewport.height - yAxis) / 1.5)
140
+ if (element.shape === 2 || element.shape === 4) {
141
+ signDetails.push(
142
+ {
143
+ ...element,
144
+ signLocationType: 3, // 签章定位方式:1:关键字定位 3:坐标 5:骑缝章
145
+ locationPage: element.pageIndex, // 页码(签章定位方式。)
146
+ xLocation: xAxis, // x坐标
147
+ yLocation: yAxis, // y坐标
148
+ stampType: element.sealTag || element.stampType,
149
+ },
150
+ )
151
+ } else {
152
+ // 合并标签的 是妥妥递做的,合章(待证书)是cfca做的,
153
+ // cfca 是以左下角为原点
154
+ labelDetails.push(
155
+ {
156
+ ...element,
157
+ aliasName: element.labelAlias, // 标记域描述(对应文本标签的标签)
158
+ labelType: 1, // 标记类型。1:text
159
+ isMust: '1', // 0非必填,1必填
160
+ labelContent: null, // 扩展内容。labelType为1,5可不填写
161
+ isMultiline: 0, // 是否换行 1--是 0--否
162
+ },
163
+ )
164
+ }
165
+ });
166
+ console.log(JSON.stringify(labelDetails), JSON.stringify(signDetails))
167
+ } else {
168
+ this.$alert(
169
+ '根据模板配置的签约方,尚有未完成配置的印章或签名标签,请完成配置后提交',
170
+ '提示',
171
+ );
172
+ }
173
+ },
174
+ },
175
+ };
176
+ </script>
177
+
178
+ <style lang="less">
179
+ @import "./MakelLabel.less";
180
+ </style>
@@ -0,0 +1,162 @@
1
+ .index {
2
+ overflow: hidden;
3
+ padding-bottom: 20px;
4
+ }
5
+
6
+ .input-list {
7
+ float: left;
8
+ margin-left: 40px;
9
+ }
10
+
11
+ .input-list>div {
12
+ margin-bottom: 40px;
13
+ }
14
+
15
+ .title {
16
+ height: 50px;
17
+ line-height: 50px;
18
+ border-bottom: 1px solid #ccc;
19
+ }
20
+
21
+ .title h4 {
22
+ float: left;
23
+ }
24
+
25
+ .title i {
26
+ float: right;
27
+ }
28
+
29
+ .border-line {
30
+ margin-top: 16px;
31
+ }
32
+
33
+ .body-con {
34
+ overflow: hidden;
35
+ min-width: 1260px;
36
+ display: table-row;
37
+ }
38
+
39
+ .title-con {
40
+ padding: 0 20px;
41
+ font-size: 14px;
42
+ text-align: left;
43
+ line-height: 50px;
44
+ border-bottom: 1px solid #ccc;
45
+ display: table-cell;
46
+ vertical-align: top;
47
+ }
48
+
49
+ .contract-con {
50
+ min-width: 800px;
51
+ font-size: 16px;
52
+ text-align: center;
53
+ border: 1px solid #ccc;
54
+ box-sizing: border-box;
55
+ margin-right: 20px;
56
+ }
57
+
58
+ .label-done {
59
+ margin-left: 16px;
60
+ display: table-cell;
61
+ vertical-align: top;
62
+ }
63
+
64
+ .label-list {
65
+ margin: 10px auto;
66
+ padding: 10px 0;
67
+ text-align: center;
68
+ width: 300px;
69
+ border: 1px solid #ccc;
70
+ }
71
+
72
+ .label-list .label-item {
73
+ margin-bottom: 20px;
74
+ }
75
+
76
+ .label-list .label-item .btn {
77
+ width: 240px;
78
+ }
79
+
80
+ .input-width {
81
+ width: 200px;
82
+ }
83
+
84
+ .label-write {
85
+ padding: 20px 0px;
86
+ border-top: 1px dashed #ccc;
87
+ }
88
+
89
+ .foot-submit {
90
+ text-align: center;
91
+ }
92
+
93
+ .gongzhang {
94
+ margin: auto;
95
+ width: 150px;
96
+ height: 150px;
97
+ border-radius: 50%;
98
+ overflow: hidden;
99
+ }
100
+
101
+ .gongzhang img {
102
+ width: 100%;
103
+ height: 100%;
104
+ }
105
+
106
+ .label-name {
107
+ margin-top: 10px;
108
+ color: #20a0ff;
109
+ font-size: 14px;
110
+ }
111
+
112
+ .pdf-box {
113
+ position: relative;
114
+ display: inline-block;
115
+ }
116
+
117
+ .pdf-box .tag {
118
+ position: absolute;
119
+ z-index: 999;
120
+ top: 0;
121
+ display: none;
122
+ }
123
+
124
+ .allSign {
125
+ margin-bottom: 20px;
126
+ }
127
+
128
+ .view-btn {
129
+ width: 40px;
130
+ height: 20px;
131
+ background: none;
132
+ font-size: 12px !important;
133
+ border: 1px solid #3d82f7;
134
+ text-align: center;
135
+ line-height: 20px;
136
+ font-size: 14px;
137
+ border-radius: 2px;
138
+ padding: 0;
139
+ color: #3d82f7;
140
+ float: right;
141
+ cursor: pointer;
142
+ outline: none;
143
+ }
144
+
145
+ /*.pdf-box:hover .tag {*/
146
+ /*display: block !important;*/
147
+ /*}*/
148
+
149
+ .close {
150
+ width: 20px;
151
+ height: 20px;
152
+ border-radius: 50%;
153
+ position: absolute;
154
+ top: -10px;
155
+ right: -10px;
156
+ background: coral;
157
+ color: #fff;
158
+ transform: rotateZ(45deg);
159
+ text-align: center;
160
+ line-height: 20px;
161
+ cursor: pointer;
162
+ }
@@ -0,0 +1,48 @@
1
+ // 标签类型 http://192.168.88.120:200/index.php?s=/25&page_id=721
2
+ export const labelsManager = {
3
+ typeName: '募集机构印章标签',
4
+ typeSeal: [
5
+ {
6
+ name: '募集机构章签章',
7
+ type: 29,
8
+ shape: 2,
9
+ stampType: 1,
10
+ },
11
+ {
12
+ name: '募集机构法人章签章',
13
+ type: 31,
14
+ stampType: 2,
15
+ shape: 2,
16
+ },
17
+ {
18
+ name: '募集机构业务或合同章',
19
+ type: 33,
20
+ stampType: 3,
21
+ shape: 2,
22
+ },
23
+ {
24
+ name: '募集机文本',
25
+ type: 1,
26
+ stampType: 3,
27
+ shape: 1,
28
+ },
29
+ ],
30
+ }
31
+
32
+ export const labelsInvestor = {
33
+ typeName: '投资者印章标签',
34
+ typeSeal: [{
35
+ name: '投资机构签章',
36
+ labelAlias: 'customerSign',
37
+ stampType: 'ORG_SEAL',
38
+ type: 7,
39
+ shape: 2,
40
+ }, {
41
+ name: '机构投资者法人章',
42
+ labelAlias: 'customerSign',
43
+ stampType: 'ORG_LEGAL_SEAL',
44
+ shape: 4,
45
+ type: 37,
46
+ }],
47
+ }
48
+ export default labelsManager