unify-external-plugin-platform 0.0.2 → 0.0.3-1
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/.browserslistrc +3 -3
- package/README.md +52 -49
- package/babel.config.js +5 -5
- package/dist/demo.html +1 -0
- package/dist/external-plugin.common.js +89107 -0
- package/dist/external-plugin.css +1 -0
- package/dist/external-plugin.umd.js +89118 -0
- package/dist/external-plugin.umd.min.js +24 -0
- package/dist/fonts/element-icons.f1a45d74.ttf +0 -0
- package/dist/fonts/element-icons.ff18efd1.woff +0 -0
- package/dist/img/idcardbg1.1f8e1fc6.gif +0 -0
- package/dist/img/idcardbg2.2e47b05f.gif +0 -0
- package/package.json +39 -37
- package/tsconfig.json +42 -41
- package/vue.config.js +8 -4
- package/docs/.vuepress/config.js +0 -46
- package/docs/.vuepress/public/logo.png +0 -0
- package/docs/README.md +0 -15
- package/docs/guide/changelog.md +0 -1
- package/docs/guide/installation.md +0 -10
- package/docs/guide/quickstart.md +0 -26
- package/docs/plugin/README.md +0 -1
- package/docs/plugin/empty.md +0 -1
- package/packages/id-card-reader-demo/index.ts +0 -9
- package/packages/id-card-reader-demo/src/id-card-reader-demo.vue +0 -142
- package/packages/index.js +0 -29
- package/packages/scanner-high-camera-jieyu/index.ts +0 -14
- package/packages/scanner-high-camera-jieyu/src/component/scanner-high-camera-component.vue +0 -292
- package/packages/scanner-high-camera-jieyu/src/scanner-high-camera-jieyu.vue +0 -174
- package/packages/zs-empty/index.ts +0 -9
- package/packages/zs-empty/src/assets/images/img_blank_empty.png +0 -0
- package/packages/zs-empty/src/zs-empty.vue +0 -42
- package/public/favicon.ico +0 -0
- package/public/img/icons/android-chrome-192x192.png +0 -0
- package/public/img/icons/android-chrome-512x512.png +0 -0
- package/public/img/icons/android-chrome-maskable-192x192.png +0 -0
- package/public/img/icons/android-chrome-maskable-512x512.png +0 -0
- package/public/img/icons/apple-touch-icon-120x120.png +0 -0
- package/public/img/icons/apple-touch-icon-152x152.png +0 -0
- package/public/img/icons/apple-touch-icon-180x180.png +0 -0
- package/public/img/icons/apple-touch-icon-60x60.png +0 -0
- package/public/img/icons/apple-touch-icon-76x76.png +0 -0
- package/public/img/icons/apple-touch-icon.png +0 -0
- package/public/img/icons/favicon-16x16.png +0 -0
- package/public/img/icons/favicon-32x32.png +0 -0
- package/public/img/icons/msapplication-icon-144x144.png +0 -0
- package/public/img/icons/mstile-150x150.png +0 -0
- package/public/img/icons/safari-pinned-tab.svg +0 -3
- package/public/index.html +0 -23
- package/public/robots.txt +0 -2
- package/src/App.vue +0 -15
- package/src/assets/images/reg-developing.png +0 -0
- package/src/assets/logo.png +0 -0
- package/src/components/404.vue +0 -17
- package/src/components/HelloWorld.vue +0 -61
- package/src/main.ts +0 -22
- package/src/registerServiceWorker.ts +0 -32
- package/src/router/id-card-reader/id-card-reader.ts +0 -19
- package/src/router/index.ts +0 -46
- package/src/router/scan/scan.ts +0 -19
- package/src/shims-tsx.d.ts +0 -11
- package/src/shims-vue.d.ts +0 -4
- package/src/store/index.ts +0 -17
- package/src/views/AboutView.vue +0 -5
- package/src/views/HomeView.vue +0 -109
- package/src/views/id-card-reader/id-card-reader-page.vue +0 -139
- package/src/views/id-card-reader/model/conatant/id-card-form-attr.ts +0 -31
- package/src/views/id-card-reader/model/vo/id-card.ts +0 -44
- package/src/views/layout/home-layout.vue +0 -72
- package/src/views/layout/model/menu-data.ts +0 -29
- package/src/views/scan/scan-page.vue +0 -56
- /package/{packages/scanner-high-camera-jieyu/images/img_blank_empty.png → dist/img/img_blank_empty.92ddadbb.png} +0 -0
@@ -1,61 +0,0 @@
|
|
1
|
-
<template>
|
2
|
-
<div class="hello">
|
3
|
-
<h1>{{ msg }}</h1>
|
4
|
-
<p>
|
5
|
-
For a guide and recipes on how to configure / customize this project,<br>
|
6
|
-
check out the
|
7
|
-
<a href="https://cli.vuejs.org" target="_blank" rel="noopener">vue-cli documentation</a>.
|
8
|
-
</p>
|
9
|
-
<h3>Installed CLI Plugins</h3>
|
10
|
-
<ul>
|
11
|
-
<li><a href="https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue/cli-plugin-babel" target="_blank" rel="noopener">babel</a></li>
|
12
|
-
<li><a href="https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue/cli-plugin-pwa" target="_blank" rel="noopener">pwa</a></li>
|
13
|
-
<li><a href="https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue/cli-plugin-router" target="_blank" rel="noopener">router</a></li>
|
14
|
-
<li><a href="https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue/cli-plugin-vuex" target="_blank" rel="noopener">vuex</a></li>
|
15
|
-
<li><a href="https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue/cli-plugin-typescript" target="_blank" rel="noopener">typescript</a></li>
|
16
|
-
</ul>
|
17
|
-
<h3>Essential Links</h3>
|
18
|
-
<ul>
|
19
|
-
<li><a href="https://vuejs.org" target="_blank" rel="noopener">Core Docs</a></li>
|
20
|
-
<li><a href="https://forum.vuejs.org" target="_blank" rel="noopener">Forum</a></li>
|
21
|
-
<li><a href="https://chat.vuejs.org" target="_blank" rel="noopener">Community Chat</a></li>
|
22
|
-
<li><a href="https://twitter.com/vuejs" target="_blank" rel="noopener">Twitter</a></li>
|
23
|
-
<li><a href="https://news.vuejs.org" target="_blank" rel="noopener">News</a></li>
|
24
|
-
</ul>
|
25
|
-
<h3>Ecosystem</h3>
|
26
|
-
<ul>
|
27
|
-
<li><a href="https://router.vuejs.org" target="_blank" rel="noopener">vue-router</a></li>
|
28
|
-
<li><a href="https://vuex.vuejs.org" target="_blank" rel="noopener">vuex</a></li>
|
29
|
-
<li><a href="https://github.com/vuejs/vue-devtools#vue-devtools" target="_blank" rel="noopener">vue-devtools</a></li>
|
30
|
-
<li><a href="https://vue-loader.vuejs.org" target="_blank" rel="noopener">vue-loader</a></li>
|
31
|
-
<li><a href="https://github.com/vuejs/awesome-vue" target="_blank" rel="noopener">awesome-vue</a></li>
|
32
|
-
</ul>
|
33
|
-
</div>
|
34
|
-
</template>
|
35
|
-
|
36
|
-
<script lang="ts">
|
37
|
-
import { Component, Prop, Vue } from 'vue-property-decorator';
|
38
|
-
|
39
|
-
@Component
|
40
|
-
export default class HelloWorld extends Vue {
|
41
|
-
@Prop() private msg!: string;
|
42
|
-
}
|
43
|
-
</script>
|
44
|
-
|
45
|
-
<!-- Add "scoped" attribute to limit CSS to this component only -->
|
46
|
-
<style scoped lang="scss">
|
47
|
-
h3 {
|
48
|
-
margin: 40px 0 0;
|
49
|
-
}
|
50
|
-
ul {
|
51
|
-
list-style-type: none;
|
52
|
-
padding: 0;
|
53
|
-
}
|
54
|
-
li {
|
55
|
-
display: inline-block;
|
56
|
-
margin: 0 10px;
|
57
|
-
}
|
58
|
-
a {
|
59
|
-
color: #42b983;
|
60
|
-
}
|
61
|
-
</style>
|
package/src/main.ts
DELETED
@@ -1,22 +0,0 @@
|
|
1
|
-
import Vue from 'vue'
|
2
|
-
import App from './App.vue'
|
3
|
-
import './registerServiceWorker'
|
4
|
-
import router from './router'
|
5
|
-
import store from './store'
|
6
|
-
import ElementUI from 'element-ui';
|
7
|
-
import 'element-ui/lib/theme-chalk/index.css';
|
8
|
-
|
9
|
-
// Unify-plugin为自定义组件库名称
|
10
|
-
// @ts-ignore
|
11
|
-
import ExternalPlugin from '../packages'
|
12
|
-
|
13
|
-
|
14
|
-
Vue.use(ElementUI); // 暂时完整引入
|
15
|
-
Vue.use(ExternalPlugin); // 暂时完整引入
|
16
|
-
Vue.config.productionTip = false
|
17
|
-
|
18
|
-
new Vue({
|
19
|
-
router,
|
20
|
-
store,
|
21
|
-
render: h => h(App)
|
22
|
-
}).$mount('#app')
|
@@ -1,32 +0,0 @@
|
|
1
|
-
/* eslint-disable no-console */
|
2
|
-
|
3
|
-
import { register } from 'register-service-worker'
|
4
|
-
|
5
|
-
if (process.env.NODE_ENV === 'production') {
|
6
|
-
register(`${process.env.BASE_URL}service-worker.js`, {
|
7
|
-
ready () {
|
8
|
-
console.log(
|
9
|
-
'App is being served from cache by a service worker.\n' +
|
10
|
-
'For more details, visit https://goo.gl/AFskqB'
|
11
|
-
)
|
12
|
-
},
|
13
|
-
registered () {
|
14
|
-
console.log('Service worker has been registered.')
|
15
|
-
},
|
16
|
-
cached () {
|
17
|
-
console.log('Content has been cached for offline use.')
|
18
|
-
},
|
19
|
-
updatefound () {
|
20
|
-
console.log('New content is downloading.')
|
21
|
-
},
|
22
|
-
updated () {
|
23
|
-
console.log('New content is available; please refresh.')
|
24
|
-
},
|
25
|
-
offline () {
|
26
|
-
console.log('No internet connection found. App is running in offline mode.')
|
27
|
-
},
|
28
|
-
error (error) {
|
29
|
-
console.error('Error during service worker registration:', error)
|
30
|
-
}
|
31
|
-
})
|
32
|
-
}
|
@@ -1,19 +0,0 @@
|
|
1
|
-
/**
|
2
|
-
* @author: lvcy
|
3
|
-
* @date: 2022-12-30
|
4
|
-
* @description:id-card-reader
|
5
|
-
*/
|
6
|
-
import {RouteConfig} from "vue-router";
|
7
|
-
|
8
|
-
const IdCardReaderRouterList: RouteConfig[] = [
|
9
|
-
{
|
10
|
-
path: 'id-card-reader',
|
11
|
-
name: 'id-card-reader-page',
|
12
|
-
meta: {
|
13
|
-
title: '身份证读卡器',
|
14
|
-
},
|
15
|
-
component: () => import('@/views/id-card-reader/id-card-reader-page.vue')
|
16
|
-
},
|
17
|
-
]
|
18
|
-
|
19
|
-
export default IdCardReaderRouterList;
|
package/src/router/index.ts
DELETED
@@ -1,46 +0,0 @@
|
|
1
|
-
import Vue from 'vue'
|
2
|
-
import VueRouter, { RouteConfig } from 'vue-router'
|
3
|
-
import HomeView from '../views/HomeView.vue'
|
4
|
-
import IdCardReaderRouterList from "@/router/id-card-reader/id-card-reader";
|
5
|
-
import ScanRouterList from "@/router/scan/scan";
|
6
|
-
|
7
|
-
Vue.use(VueRouter)
|
8
|
-
|
9
|
-
const routes: Array<RouteConfig> = [
|
10
|
-
{
|
11
|
-
path: '/',
|
12
|
-
redirect: '/home',
|
13
|
-
},
|
14
|
-
{
|
15
|
-
path: '/home',
|
16
|
-
name: 'home-layout',
|
17
|
-
component: () => import(/* webpackChunkName: "about" */ '../views/layout/home-layout.vue'),
|
18
|
-
children: [
|
19
|
-
...IdCardReaderRouterList,
|
20
|
-
...ScanRouterList,
|
21
|
-
{ path: '404', meta: { title: '统一对外插件平台', errorPage: true }, component: () => import('@/components/404.vue') },
|
22
|
-
{ path: '**', redirect: '404' },
|
23
|
-
]
|
24
|
-
},
|
25
|
-
...[
|
26
|
-
...IdCardReaderRouterList,
|
27
|
-
...ScanRouterList
|
28
|
-
].map(item => ({
|
29
|
-
...item,
|
30
|
-
path: `/${item.path}`
|
31
|
-
})),
|
32
|
-
{
|
33
|
-
path: '/about',
|
34
|
-
name: 'about',
|
35
|
-
// route level code-splitting
|
36
|
-
// this generates a separate chunk (about.[hash].js) for this route
|
37
|
-
// which is lazy-loaded when the route is visited.
|
38
|
-
component: () => import(/* webpackChunkName: "about" */ '../views/AboutView.vue')
|
39
|
-
}
|
40
|
-
]
|
41
|
-
|
42
|
-
const router = new VueRouter({
|
43
|
-
routes
|
44
|
-
})
|
45
|
-
|
46
|
-
export default router
|
package/src/router/scan/scan.ts
DELETED
@@ -1,19 +0,0 @@
|
|
1
|
-
/**
|
2
|
-
* @author: lvcy
|
3
|
-
* @date: 2023-02-07
|
4
|
-
* @description:scan
|
5
|
-
*/
|
6
|
-
import {RouteConfig} from "vue-router";
|
7
|
-
|
8
|
-
const ScanRouterList: RouteConfig[] = [
|
9
|
-
{
|
10
|
-
path: 'scan',
|
11
|
-
name: 'scan-page',
|
12
|
-
meta: {
|
13
|
-
title: '扫描设备',
|
14
|
-
},
|
15
|
-
component: () => import('@/views/scan/scan-page.vue')
|
16
|
-
},
|
17
|
-
]
|
18
|
-
|
19
|
-
export default ScanRouterList;
|
package/src/shims-tsx.d.ts
DELETED
package/src/shims-vue.d.ts
DELETED
package/src/store/index.ts
DELETED
package/src/views/AboutView.vue
DELETED
package/src/views/HomeView.vue
DELETED
@@ -1,109 +0,0 @@
|
|
1
|
-
<template>
|
2
|
-
<div class="home">
|
3
|
-
<!-- <z-s-empty empty-tip="没有数据组件"></z-s-empty>-->
|
4
|
-
<id-card-reader-demo
|
5
|
-
type="text"
|
6
|
-
tip="身份证读卡器"
|
7
|
-
@click="handleAction"
|
8
|
-
></id-card-reader-demo>
|
9
|
-
<id-card-reader-demo
|
10
|
-
type="primary"
|
11
|
-
@click="handleAction"
|
12
|
-
>身份证读卡器</id-card-reader-demo>
|
13
|
-
|
14
|
-
|
15
|
-
<el-input
|
16
|
-
style="width: 160px;"
|
17
|
-
placeholder="请输入内容"
|
18
|
-
v-model="idCardData.info.name">
|
19
|
-
<template slot="suffix">
|
20
|
-
<id-card-reader-demo
|
21
|
-
type="text"
|
22
|
-
tip="身份证读卡器"
|
23
|
-
@click="handleAction"
|
24
|
-
></id-card-reader-demo>
|
25
|
-
</template>
|
26
|
-
</el-input>
|
27
|
-
|
28
|
-
<el-button type="default" @click="resetData">重置</el-button>
|
29
|
-
|
30
|
-
<div class="" v-if="idCardData.headImage">
|
31
|
-
<p>姓名: {{ idCardData.info.name }}</p>
|
32
|
-
<p>性别: {{ idCardData.info.sex }}</p>
|
33
|
-
<p>民族: {{ idCardData.info.nation }}</p>
|
34
|
-
<p>出生日期: {{ idCardData.info.birthday }}</p>
|
35
|
-
<p>地址: {{ idCardData.info.address }}</p>
|
36
|
-
<p>证件号码: {{ idCardData.info.cardId }}</p>
|
37
|
-
<p>签发机关: {{ idCardData.info.police }}</p>
|
38
|
-
<p>有效期开始: {{ idCardData.info.validStart }}</p>
|
39
|
-
<p>有效期结束: {{ idCardData.info.validEnd }}</p>
|
40
|
-
<img :src="idCardData.headImage" style="width: 120px;border: 1px solid #cccccc">
|
41
|
-
</div>
|
42
|
-
</div>
|
43
|
-
</template>
|
44
|
-
|
45
|
-
<script lang="ts">
|
46
|
-
import { Component, Vue } from 'vue-property-decorator';
|
47
|
-
import HelloWorld from '@/components/HelloWorld.vue'; // @ is an alias to /examples
|
48
|
-
/**
|
49
|
-
* 身份证信息
|
50
|
-
*
|
51
|
-
*/
|
52
|
-
export interface IDCard {
|
53
|
-
/** 身份证信息 */
|
54
|
-
info: IDCardInfo;
|
55
|
-
/** 身份证照片 */
|
56
|
-
headImage?: string;
|
57
|
-
}
|
58
|
-
|
59
|
-
/**
|
60
|
-
* 身份证详细信息
|
61
|
-
*
|
62
|
-
*/
|
63
|
-
export interface IDCardInfo {
|
64
|
-
/** 姓名 */
|
65
|
-
name: string;
|
66
|
-
/** 性别 */
|
67
|
-
sex: string;
|
68
|
-
/** 民族 */
|
69
|
-
nation: string;
|
70
|
-
/** 出生日期 */
|
71
|
-
birthday: string;
|
72
|
-
/** 地址 */
|
73
|
-
address: string;
|
74
|
-
/** 证件号码 */
|
75
|
-
cardId: string;
|
76
|
-
/** 签发机关 */
|
77
|
-
police?: string;
|
78
|
-
/** 有效期开始 */
|
79
|
-
validStart?: any;
|
80
|
-
/** 有效期结束 */
|
81
|
-
validEnd?: any;
|
82
|
-
/** 性别编码 */
|
83
|
-
sexCode?: string;
|
84
|
-
/** 民族编码 */
|
85
|
-
nationCode?: string;
|
86
|
-
}
|
87
|
-
|
88
|
-
@Component({
|
89
|
-
components: {
|
90
|
-
HelloWorld,
|
91
|
-
},
|
92
|
-
})
|
93
|
-
export default class HomeView extends Vue {
|
94
|
-
|
95
|
-
idCardData: IDCard = {info: {}} as IDCard;
|
96
|
-
|
97
|
-
handleAction(data: IDCard) {
|
98
|
-
this.idCardData = data;
|
99
|
-
}
|
100
|
-
|
101
|
-
resetData() {
|
102
|
-
this.idCardData = {info: {}} as IDCard;
|
103
|
-
}
|
104
|
-
}
|
105
|
-
</script>
|
106
|
-
|
107
|
-
<style lang="scss">
|
108
|
-
|
109
|
-
</style>
|
@@ -1,139 +0,0 @@
|
|
1
|
-
<!--
|
2
|
-
- @author: lvcy
|
3
|
-
- @date: 2022-12-30
|
4
|
-
- @description:id-card-reader-page
|
5
|
-
-->
|
6
|
-
<template>
|
7
|
-
<div class="id-card-reader-page">
|
8
|
-
<h2>身份证读卡器</h2>
|
9
|
-
<div class="id-card-reader-content">
|
10
|
-
<div class="form-content">
|
11
|
-
<el-form ref="form" :model="idCardData" label-width="100px">
|
12
|
-
<el-form-item label="机器型号">
|
13
|
-
<el-select v-model="readerType" placeholder="请选择机器型号" style="width: 100%">
|
14
|
-
<el-option
|
15
|
-
v-for="item in selectOptions"
|
16
|
-
:key="item.value"
|
17
|
-
:label="item.label"
|
18
|
-
:value="item.value">
|
19
|
-
</el-option>
|
20
|
-
</el-select>
|
21
|
-
</el-form-item>
|
22
|
-
<template
|
23
|
-
v-for="item in formItemList"
|
24
|
-
>
|
25
|
-
<el-col :span="item.span || 12" :key="item.name">
|
26
|
-
<el-form-item
|
27
|
-
v-if="item.type === 'other'"
|
28
|
-
:label="item.label"
|
29
|
-
:placeholder="'请输入'+item.label"
|
30
|
-
>
|
31
|
-
<el-input v-model="idCardData.info[item.name]">
|
32
|
-
<template slot="suffix">
|
33
|
-
<id-card-reader-demo
|
34
|
-
v-if="readerType === idCardReaderType.Demo"
|
35
|
-
type="text"
|
36
|
-
tip="身份证读卡器"
|
37
|
-
@click="handleAction"
|
38
|
-
></id-card-reader-demo>
|
39
|
-
</template>
|
40
|
-
</el-input>
|
41
|
-
</el-form-item>
|
42
|
-
<el-form-item
|
43
|
-
v-else
|
44
|
-
:key="item.name"
|
45
|
-
:label="item.label"
|
46
|
-
:placeholder="'请输入'+item.label"
|
47
|
-
>
|
48
|
-
<el-input v-model="idCardData.info[item.name]"></el-input>
|
49
|
-
</el-form-item>
|
50
|
-
</el-col>
|
51
|
-
</template>
|
52
|
-
</el-form>
|
53
|
-
</div>
|
54
|
-
<div class="image-content">
|
55
|
-
<img :src="idCardData.headImage" v-if="idCardData.headImage">
|
56
|
-
<span v-else>
|
57
|
-
<i class="el-icon-user-solid"></i>
|
58
|
-
</span>
|
59
|
-
|
60
|
-
</div>
|
61
|
-
</div>
|
62
|
-
<div class="action-content" style="text-align: right">
|
63
|
-
<!-- 测试 -->
|
64
|
-
<id-card-reader-demo
|
65
|
-
v-if="readerType === idCardReaderType.Demo"
|
66
|
-
type="primary"
|
67
|
-
@click="handleAction"
|
68
|
-
>身份证读卡器</id-card-reader-demo>
|
69
|
-
<!-- 普天 -->
|
70
|
-
<!-- 精伦 -->
|
71
|
-
<el-button type="default" @click="resetData">重置</el-button>
|
72
|
-
</div>
|
73
|
-
|
74
|
-
</div>
|
75
|
-
</template>
|
76
|
-
|
77
|
-
<script lang="ts">
|
78
|
-
|
79
|
-
import {Component, Vue} from "vue-property-decorator";
|
80
|
-
import {IDCard} from "@/views/id-card-reader/model/vo/id-card";
|
81
|
-
import {
|
82
|
-
IdCardFormItemList,
|
83
|
-
IdCardReaderType,
|
84
|
-
IdCardReaderTypeOptions
|
85
|
-
} from "@/views/id-card-reader/model/conatant/id-card-form-attr";
|
86
|
-
|
87
|
-
@Component({
|
88
|
-
name: "id-card-reader-page"
|
89
|
-
})
|
90
|
-
export default class IdCardReaderPage extends Vue {
|
91
|
-
idCardData: IDCard = {info: {}} as IDCard;
|
92
|
-
|
93
|
-
formItemList = IdCardFormItemList;
|
94
|
-
|
95
|
-
readerType = '';
|
96
|
-
|
97
|
-
selectOptions = IdCardReaderTypeOptions;
|
98
|
-
|
99
|
-
idCardReaderType = IdCardReaderType;
|
100
|
-
|
101
|
-
|
102
|
-
handleAction(data: IDCard) {
|
103
|
-
this.idCardData = data;
|
104
|
-
}
|
105
|
-
|
106
|
-
resetData() {
|
107
|
-
this.idCardData = {info: {}} as IDCard;
|
108
|
-
}
|
109
|
-
}
|
110
|
-
</script>
|
111
|
-
|
112
|
-
<style scoped lang="scss">
|
113
|
-
.id-card-reader-page {
|
114
|
-
.id-card-reader-content {
|
115
|
-
display: flex;
|
116
|
-
margin-top: 20px;
|
117
|
-
.form-content {
|
118
|
-
width: 800px;
|
119
|
-
}
|
120
|
-
.image-content {
|
121
|
-
margin-left: 15px;
|
122
|
-
img,
|
123
|
-
span {
|
124
|
-
display: inline-block;
|
125
|
-
width: 120px;
|
126
|
-
border: 1px solid #cccccc;
|
127
|
-
text-align: center;
|
128
|
-
}
|
129
|
-
i {
|
130
|
-
font-size: 100px;
|
131
|
-
margin: 20px 0;
|
132
|
-
}
|
133
|
-
}
|
134
|
-
}
|
135
|
-
.action-content {
|
136
|
-
width: 800px;
|
137
|
-
}
|
138
|
-
}
|
139
|
-
</style>
|
@@ -1,31 +0,0 @@
|
|
1
|
-
/**
|
2
|
-
* @author: lvcy
|
3
|
-
* @date: 2022-12-30
|
4
|
-
* @description:id-card-form-attr
|
5
|
-
*/
|
6
|
-
|
7
|
-
export enum IdCardReaderType {
|
8
|
-
Demo = 'demo',
|
9
|
-
PuTian = 'putian',
|
10
|
-
JingLun = 'jinglun'
|
11
|
-
}
|
12
|
-
|
13
|
-
export const IdCardReaderTypeOptions = [
|
14
|
-
{ label: '测试', value: IdCardReaderType.Demo },
|
15
|
-
{ label: '普天', value: IdCardReaderType.PuTian },
|
16
|
-
{ label: '精伦', value: IdCardReaderType.JingLun},
|
17
|
-
]
|
18
|
-
|
19
|
-
export const IdCardFormItemList = [
|
20
|
-
{ name: 'name', label: '姓名', type: 'other' },
|
21
|
-
{ name: 'cardId', label: '证件号码', },
|
22
|
-
{ name: 'sex', label: '性别', },
|
23
|
-
{ name: 'nation', label: '民族', },
|
24
|
-
{ name: 'birthday', label: '出生日期', },
|
25
|
-
{ name: 'police', label: '签发机关', },
|
26
|
-
{ name: 'validStart', label: '有效期开始', },
|
27
|
-
{ name: 'validEnd', label: '有效期结束', },
|
28
|
-
{ name: 'sexCode', label: '性别编码', },
|
29
|
-
{ name: 'nationCode', label: '民族编码', },
|
30
|
-
{ name: 'address', label: '地址', span: 24},
|
31
|
-
]
|
@@ -1,44 +0,0 @@
|
|
1
|
-
/**
|
2
|
-
* @author: lvcy
|
3
|
-
* @date: 2022-12-30
|
4
|
-
* @description:id-card
|
5
|
-
*/
|
6
|
-
/**
|
7
|
-
* 身份证信息
|
8
|
-
*
|
9
|
-
*/
|
10
|
-
export interface IDCard {
|
11
|
-
/** 身份证信息 */
|
12
|
-
info: IDCardInfo;
|
13
|
-
/** 身份证照片 */
|
14
|
-
headImage?: string;
|
15
|
-
}
|
16
|
-
|
17
|
-
/**
|
18
|
-
* 身份证详细信息
|
19
|
-
*
|
20
|
-
*/
|
21
|
-
export interface IDCardInfo {
|
22
|
-
/** 姓名 */
|
23
|
-
name: string;
|
24
|
-
/** 性别 */
|
25
|
-
sex: string;
|
26
|
-
/** 民族 */
|
27
|
-
nation: string;
|
28
|
-
/** 出生日期 */
|
29
|
-
birthday: string;
|
30
|
-
/** 地址 */
|
31
|
-
address: string;
|
32
|
-
/** 证件号码 */
|
33
|
-
cardId: string;
|
34
|
-
/** 签发机关 */
|
35
|
-
police?: string;
|
36
|
-
/** 有效期开始 */
|
37
|
-
validStart?: any;
|
38
|
-
/** 有效期结束 */
|
39
|
-
validEnd?: any;
|
40
|
-
/** 性别编码 */
|
41
|
-
sexCode?: string;
|
42
|
-
/** 民族编码 */
|
43
|
-
nationCode?: string;
|
44
|
-
}
|
@@ -1,72 +0,0 @@
|
|
1
|
-
<!--
|
2
|
-
- @author: lvcy
|
3
|
-
- @date: 2022-12-30
|
4
|
-
- @description:home-layout
|
5
|
-
-->
|
6
|
-
<template>
|
7
|
-
<el-container
|
8
|
-
class="home-layout"
|
9
|
-
>
|
10
|
-
<el-header>
|
11
|
-
<h2>统一对外插件平台Demo</h2>
|
12
|
-
</el-header>
|
13
|
-
<el-container>
|
14
|
-
<el-aside width="200px">
|
15
|
-
|
16
|
-
<el-menu
|
17
|
-
:default-active="activeIndex"
|
18
|
-
:default-openeds="openedMenuList"
|
19
|
-
class="el-menu-vertical-demo"
|
20
|
-
@select="handleSelectMenu"
|
21
|
-
>
|
22
|
-
<template v-for="menu in menuList">
|
23
|
-
<el-menu-item
|
24
|
-
:key="menu.index"
|
25
|
-
:index="menu.index">
|
26
|
-
<template slot="title">
|
27
|
-
<i :class="menu.icon"></i>
|
28
|
-
<span>{{ menu.title }}</span>
|
29
|
-
</template>
|
30
|
-
</el-menu-item>
|
31
|
-
</template>
|
32
|
-
</el-menu>
|
33
|
-
</el-aside>
|
34
|
-
<el-main>
|
35
|
-
<router-view/>
|
36
|
-
</el-main>
|
37
|
-
</el-container>
|
38
|
-
</el-container>
|
39
|
-
</template>
|
40
|
-
|
41
|
-
<script lang="ts">
|
42
|
-
import {Component, Vue} from "vue-property-decorator";
|
43
|
-
import {MenuDataList} from "@/views/layout/model/menu-data";
|
44
|
-
|
45
|
-
@Component({
|
46
|
-
name: "home-layout"
|
47
|
-
})
|
48
|
-
export default class HomeLayout extends Vue {
|
49
|
-
|
50
|
-
openedMenuList = [MenuDataList?.[0]?.index ?? '']
|
51
|
-
|
52
|
-
activeIndex = 'id-card-reader'
|
53
|
-
menuList = MenuDataList
|
54
|
-
|
55
|
-
created() {
|
56
|
-
this.$router.push(`/home/id-card-reader`)
|
57
|
-
}
|
58
|
-
|
59
|
-
handleSelectMenu(path: string) {
|
60
|
-
this.$router.push(`/home/${path}`)
|
61
|
-
}
|
62
|
-
}
|
63
|
-
</script>
|
64
|
-
|
65
|
-
<style lang="scss">
|
66
|
-
.home-layout {
|
67
|
-
height: 100%;
|
68
|
-
.el-main {
|
69
|
-
padding: 0 8px;
|
70
|
-
}
|
71
|
-
}
|
72
|
-
</style>
|
@@ -1,29 +0,0 @@
|
|
1
|
-
/**
|
2
|
-
* @author: lvcy
|
3
|
-
* @date: 2022-12-30
|
4
|
-
* @description:menu-data
|
5
|
-
*/
|
6
|
-
|
7
|
-
export interface MenuItemBase {
|
8
|
-
index: string,
|
9
|
-
title: string,
|
10
|
-
icon: string,
|
11
|
-
}
|
12
|
-
|
13
|
-
export interface MenuItem<T = any> extends MenuItemBase {
|
14
|
-
children?: MenuItem<T>[];
|
15
|
-
data?: T
|
16
|
-
}
|
17
|
-
|
18
|
-
export const MenuDataList: MenuItem[] = [
|
19
|
-
{
|
20
|
-
index: 'id-card-reader',
|
21
|
-
title: '身份证读卡器',
|
22
|
-
icon: 'el-icon-postcard',
|
23
|
-
},
|
24
|
-
{
|
25
|
-
index: 'scan',
|
26
|
-
title: '扫描设备',
|
27
|
-
icon: 'el-icon-picture-outline',
|
28
|
-
}
|
29
|
-
]
|