@toolspack/ttd-common 0.2.0 → 0.2.3
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/.eslintrc.js +1 -0
- package/README.md +16 -2
- package/lib/ttd-common.common.js +257 -252
- package/lib/ttd-common.umd.js +257 -252
- package/lib/ttd-common.umd.min.js +4 -4
- package/package.json +7 -4
- package/src/App.vue +2 -0
- package/src/main.js +9 -0
- package/src/packages/cfca/CfcaPdf.vue +2 -1
- package/src/packages/index.js +1 -1
- package/src/packages/label-list/LabelOperate.vue +3 -3
- package/src/packages/make-label/LabelMake.vue +2 -2
- package/src/packages/pdf-view/PdfView.vue +6 -2
- package/src/packages/ukey/Ukey.vue +1 -1
- package/src/router/route.js +18 -0
- package/src/styles/base.scss +3 -0
- package/src/styles/common.less +729 -0
- package/src/styles/common.scss +22 -0
- package/src/styles/components/atomic.less +430 -0
- package/src/styles/components/button.scss +62 -0
- package/src/styles/components/el-pagination.scss +21 -0
- package/src/styles/components/file-group.scss +4 -0
- package/src/styles/components/input.scss +19 -0
- package/src/styles/components/message.scss +54 -0
- package/src/styles/components/reset.scss +8 -0
- package/src/styles/components/table.scss +35 -0
- package/src/styles/element-variables.scss +220 -0
- package/src/styles/input.less +59 -0
- package/src/views/About.vue +14 -0
- package/src/views/MakeLabel.vue +178 -0
- package/src/views/MakelLabel.less +162 -0
- package/src/views/labels.js +48 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@toolspack/ttd-common",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.3",
|
|
4
4
|
"private": false,
|
|
5
5
|
"main": "lib/ttd-common.umd.min.js",
|
|
6
6
|
"scripts": {
|
|
@@ -18,7 +18,10 @@
|
|
|
18
18
|
"less": "^3.8.1",
|
|
19
19
|
"less-loader": "^4.1.0",
|
|
20
20
|
"pdfjs-dist": "^2.2.228",
|
|
21
|
-
"
|
|
21
|
+
"node-sass": "^4.14.1",
|
|
22
|
+
"sass-loader": "^10.1.0",
|
|
23
|
+
"vue": "^2.6.11",
|
|
24
|
+
"vue-router": "^3.5.3"
|
|
22
25
|
},
|
|
23
26
|
"devDependencies": {
|
|
24
27
|
"@vue/cli-plugin-babel": "~4.5.0",
|
|
@@ -28,10 +31,10 @@
|
|
|
28
31
|
"babel-eslint": "^10.1.0",
|
|
29
32
|
"babel-preset-es2015": "^6.24.1",
|
|
30
33
|
"eslint": "^6.7.2",
|
|
31
|
-
"vue-template-compiler": "^2.6.11",
|
|
32
34
|
"eslint-plugin-import": "^2.22.1",
|
|
33
35
|
"eslint-plugin-node": "^11.1.0",
|
|
34
36
|
"eslint-plugin-promise": "^4.2.1",
|
|
35
|
-
"eslint-plugin-vue": "^6.2.2"
|
|
37
|
+
"eslint-plugin-vue": "^6.2.2",
|
|
38
|
+
"vue-template-compiler": "^2.6.11"
|
|
36
39
|
}
|
|
37
40
|
}
|
package/src/App.vue
CHANGED
package/src/main.js
CHANGED
|
@@ -6,6 +6,14 @@ import vkUI from './packages/index'
|
|
|
6
6
|
|
|
7
7
|
import hevueImgPreview from './packages/img-view' // 引入
|
|
8
8
|
|
|
9
|
+
import router from './router/route'
|
|
10
|
+
|
|
11
|
+
// import './styles/element-variables.scss'
|
|
12
|
+
// import './styles/common.less'
|
|
13
|
+
// import './styles/common.scss'
|
|
14
|
+
|
|
15
|
+
import 'element-ui/lib/theme-chalk/index.css';
|
|
16
|
+
|
|
9
17
|
Vue.config.productionTip = false;
|
|
10
18
|
// import 'babel-polyfill'
|
|
11
19
|
Vue.use(hevueImgPreview)
|
|
@@ -15,5 +23,6 @@ Vue.use(vkUI) // 注册
|
|
|
15
23
|
Vue.use(EUI, { zIndex: 3000 })
|
|
16
24
|
|
|
17
25
|
new Vue({
|
|
26
|
+
router,
|
|
18
27
|
render: (h) => h(App),
|
|
19
28
|
}).$mount('#app');
|
|
@@ -375,6 +375,7 @@ export default {
|
|
|
375
375
|
console.log('OnClickPoint--', `nPageNo=${nPageNo}, x=${x}, y=${y}`);
|
|
376
376
|
try {
|
|
377
377
|
this.PDFCtrl.SignFile_KeyImage(nPageNo, x, y);
|
|
378
|
+
this.$emit('cfca-point', nPageNo, x, y)
|
|
378
379
|
} catch (e) {
|
|
379
380
|
const LastErrorDesc = this.PDFCtrl.GetLastErrorDesc();
|
|
380
381
|
alert(LastErrorDesc);
|
|
@@ -505,7 +506,7 @@ export default {
|
|
|
505
506
|
lacotionX = Number(item.X) + 47
|
|
506
507
|
lacotionY = Number(item.height) - Number(item.Y) - 47
|
|
507
508
|
} else {
|
|
508
|
-
// 于静
|
|
509
|
+
// 于静 的 签章标签,是未经处理的(无需Y轴颠倒),所以处理方式,和江湖的不一样,
|
|
509
510
|
lacotionX = Number(item.X) + 47
|
|
510
511
|
lacotionY = Number(item.Y) - 47
|
|
511
512
|
}
|
package/src/packages/index.js
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
class="el-menu-vertical-demo title-con"
|
|
7
7
|
menu-trigger="click"
|
|
8
8
|
>
|
|
9
|
-
<template v-for="(item, index) in
|
|
9
|
+
<template v-for="(item, index) in operateConfig">
|
|
10
10
|
<el-submenu :index="''+index" :key="index">
|
|
11
11
|
<template slot="title">
|
|
12
12
|
<span>{{item.typeName}}</span>
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
export default {
|
|
37
37
|
name: 'TtdLabelOperate',
|
|
38
38
|
props: {
|
|
39
|
-
|
|
39
|
+
operateConfig: {
|
|
40
40
|
// 可以打的标签
|
|
41
41
|
type: [Array],
|
|
42
42
|
default: () => [],
|
|
@@ -58,7 +58,7 @@ export default {
|
|
|
58
58
|
},
|
|
59
59
|
};
|
|
60
60
|
</script>
|
|
61
|
-
<style lang="less">
|
|
61
|
+
<style lang="less" scoped>
|
|
62
62
|
.label-done-area {
|
|
63
63
|
.label-group {
|
|
64
64
|
.el-submenu__title {
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
<div v-if="item.labelType===1 && issize" v-size="handlerResize" class="resize-tag"></div>
|
|
29
29
|
</labelItem>
|
|
30
30
|
</template>
|
|
31
|
-
<LabelProterty ref="proterty" @change="onChange"
|
|
31
|
+
<LabelProterty ref="proterty" @change="onChange"></LabelProterty>
|
|
32
32
|
</div>
|
|
33
33
|
</template>
|
|
34
34
|
<script>
|
|
@@ -435,7 +435,7 @@ export default {
|
|
|
435
435
|
/* *
|
|
436
436
|
前端使用的坐标系统为,左上角为零点, 后台合标签使用的是左下角为零点;
|
|
437
437
|
所以X坐标不变,Y坐标的需要计算(页面高度- y 再加上 标签的高度 )
|
|
438
|
-
后端忽略了
|
|
438
|
+
后端忽略了 标签的高度,所以我给他修复一下 yAxis= Y坐标 + 标签高度
|
|
439
439
|
文本标签不做修改
|
|
440
440
|
*/
|
|
441
441
|
let yAxis = ''
|
|
@@ -177,7 +177,11 @@ export default {
|
|
|
177
177
|
// console.log('-----encodeURI------', url)
|
|
178
178
|
// }
|
|
179
179
|
console.log('----PdfView---', url)
|
|
180
|
-
PDFJS.getDocument(
|
|
180
|
+
PDFJS.getDocument({
|
|
181
|
+
url: encodeURI(url),
|
|
182
|
+
cMapUrl: 'https://unpkg.com/pdfjs-dist@2.2.228/cmaps/',
|
|
183
|
+
cMapPacked: true,
|
|
184
|
+
}).promise.then((pdfDoc_) => {
|
|
181
185
|
// 初始化pdf
|
|
182
186
|
if (this.pdfDoc) {
|
|
183
187
|
console.log('pdfDocument is ready destroy,,')
|
|
@@ -185,7 +189,7 @@ export default {
|
|
|
185
189
|
}
|
|
186
190
|
this.pdfDoc = pdfDoc_
|
|
187
191
|
this.page_count = pdfDoc_.numPages
|
|
188
|
-
console.log('this.page_count
|
|
192
|
+
console.log('this.page_count 22.37', this.page_count)
|
|
189
193
|
this.$emit('numPages', pdfDoc_.numPages)
|
|
190
194
|
this.renderPage(this.pageNum)
|
|
191
195
|
})/* .catch((err) => {
|
|
@@ -98,7 +98,7 @@ export default {
|
|
|
98
98
|
}
|
|
99
99
|
return bSelectCertResult
|
|
100
100
|
} catch (e) {
|
|
101
|
-
console.log('SelectCertificateOnClick', e)
|
|
101
|
+
console.log('SelectCertificateOnClick catch', e)
|
|
102
102
|
const errorDescE = this.CryptoAgent.GetLastErrorDesc();
|
|
103
103
|
alert(`${errorDescE }/error`);
|
|
104
104
|
return false
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import Vue from 'vue'
|
|
2
|
+
import VueRouter from 'vue-router';
|
|
3
|
+
|
|
4
|
+
import MakeLabel from '../views/MakeLabel.vue'
|
|
5
|
+
import About from '../views/About.vue'
|
|
6
|
+
|
|
7
|
+
const routes = [{
|
|
8
|
+
path: '/about',
|
|
9
|
+
component: About,
|
|
10
|
+
}, {
|
|
11
|
+
path: '/test',
|
|
12
|
+
component: MakeLabel,
|
|
13
|
+
}]
|
|
14
|
+
Vue.use(VueRouter)
|
|
15
|
+
export default new VueRouter({
|
|
16
|
+
mode: 'history',
|
|
17
|
+
routes,
|
|
18
|
+
})
|