├── static ├── .gitkeep └── js │ ├── area.json │ └── states.json ├── .gitattributes ├── test └── unit │ ├── setup.js │ ├── .eslintrc │ ├── specs │ └── HelloWorld.spec.js │ └── jest.conf.js ├── src ├── assets │ └── logo.png ├── config │ └── menuConfig.js ├── store │ └── index.js ├── router │ └── index.js ├── formConfig │ ├── table_100108.js │ ├── table_100601.js │ ├── table_100015.js │ ├── table_100021.js │ ├── table_100012.js │ ├── main.js │ ├── table_100907.js │ ├── table_100007.js │ ├── handle │ │ └── handle.js │ ├── table_100016.js │ ├── example.js │ └── table_110101.js ├── formTemplate │ ├── statement.js │ ├── quill-editor.js │ ├── jump-select.js │ ├── example2.js │ ├── applicant.js │ ├── change-reason.js │ ├── checkbox-common.js │ ├── offset-reason-100904.js │ ├── correction-content.js │ ├── Upload.js │ ├── state-matters-100012.js │ ├── formComponents │ │ └── OffsetContent.vue │ ├── example1.js │ ├── priority.js │ └── change-content-100016.js ├── main.js ├── App.vue ├── const │ └── myAxios.js ├── components │ └── FormCreate.vue └── lib │ └── form-create.min.js ├── config ├── prod.env.js ├── test.env.js ├── dev.env.js └── index.js ├── .gitignore ├── index.html ├── README.md └── package.json /static/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | -------------------------------------------------------------------------------- /test/unit/setup.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | 3 | Vue.config.productionTip = false 4 | -------------------------------------------------------------------------------- /src/assets/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HeyMrLin/fc-demo/HEAD/src/assets/logo.png -------------------------------------------------------------------------------- /config/prod.env.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | module.exports = { 3 | NODE_ENV: '"production"' 4 | } 5 | -------------------------------------------------------------------------------- /src/config/menuConfig.js: -------------------------------------------------------------------------------- 1 | export default [ 2 | {router: '/', menu: 'FormCreate'}, 3 | ] 4 | -------------------------------------------------------------------------------- /test/unit/.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "env": { 3 | "jest": true 4 | }, 5 | "globals": { 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /config/test.env.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | const merge = require('webpack-merge') 3 | const devEnv = require('./dev.env') 4 | 5 | module.exports = merge(devEnv, { 6 | NODE_ENV: '"testing"' 7 | }) 8 | -------------------------------------------------------------------------------- /config/dev.env.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | const merge = require('webpack-merge') 3 | const prodEnv = require('./prod.env') 4 | 5 | module.exports = merge(prodEnv, { 6 | NODE_ENV: '"development"' 7 | }) 8 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules/ 3 | /dist/ 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | /test/unit/coverage/ 8 | 9 | # Editor directories and files 10 | .idea 11 | .vscode 12 | *.suo 13 | *.ntvs* 14 | *.njsproj 15 | *.sln 16 | -------------------------------------------------------------------------------- /src/store/index.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import Vuex from 'vuex' 3 | Vue.use(Vuex) 4 | const store = new Vuex.Store({ 5 | state: { 6 | count: 0 7 | }, 8 | mutations: { 9 | increment(state) { 10 | state.count++ 11 | } 12 | } 13 | }) 14 | export default store 15 | -------------------------------------------------------------------------------- /src/router/index.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import Router from 'vue-router' 3 | import FormCreate from '@/components/FormCreate' 4 | 5 | 6 | Vue.use(Router) 7 | 8 | export default new Router({ 9 | routes: [ 10 | { 11 | path: '/', 12 | name: 'FormCreate', 13 | component: FormCreate 14 | }, 15 | ] 16 | }) 17 | -------------------------------------------------------------------------------- /src/formConfig/table_100108.js: -------------------------------------------------------------------------------- 1 | // 其它证明文件 2 | import {vm as upload_vm} from '../formTemplate/Upload' 3 | 4 | let rule = [ 5 | { 6 | type: "input",title: "申请人",field: "patmber",value: "", 7 | }, 8 | upload_vm({label:"图片",url:"/url",tip:"",type:"picture"}), 9 | 10 | ] 11 | const content = { 12 | rule // rule字段名称不能更改 13 | } 14 | 15 | export default content 16 | -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | vue-element-demo 8 | 9 | 10 |
11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /test/unit/specs/HelloWorld.spec.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import HelloWorld from '@/components/HelloWorld' 3 | 4 | describe('HelloWorld.vue', () => { 5 | it('should render correct contents', () => { 6 | const Constructor = Vue.extend(HelloWorld) 7 | const vm = new Constructor().$mount() 8 | expect(vm.$el.querySelector('.hello h1').textContent) 9 | .toEqual('Welcome to Your Vue.js App') 10 | }) 11 | }) 12 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ![avatar](http://jeekweb.pro/picture/fromCreate.gif) 2 | #### 2020-12-14 3 | + 项目需求,包放`npm`上了,`batch-create-form`。 4 | #### 2019-03-13 5 | + 上一个版本基于`form-create@1.4.6`,并且修改过源码,从今天开始将版本升级,使用`form-create@1.6+`。 6 | + 更新最近项目中新增的一些功能,包括富文本编辑器等组件的使用。 7 | 8 | #### 2018-12-17 9 | + 此demo基于[form-create](https://github.com/xaboy/form-create),感谢[大佬](https://github.com/xaboy)开源 10 | + 代码还有很多需要完善的地方,感谢指正。 11 | + [demo链接](http://fc.jeekweb.pro) 12 | -------------------------------------------------------------------------------- /src/formTemplate/statement.js: -------------------------------------------------------------------------------- 1 | // 声明 2 | const template = ` 3 |
4 | 5 | 6 | 署名申请人为代表人 7 |
8 | `; 9 | 10 | const options = { 11 | data(){ 12 | return { 13 | extendData:{ 14 | deputy_applicant:"", 15 | }, 16 | } 17 | }, 18 | }; 19 | const vm = { 20 | custom: true, 21 | vm: options, 22 | template: template, 23 | label: '声明', 24 | field: 'statement_vm', 25 | } 26 | export {vm} -------------------------------------------------------------------------------- /src/formTemplate/quill-editor.js: -------------------------------------------------------------------------------- 1 | // 声明 2 | let count = 0; 3 | const uniqueId = () => ++count; 4 | 5 | function vm(field = 'pronounce', label = '陈述意见') { 6 | const template = ``; 7 | const options = { 8 | data() { 9 | return { 10 | extendData: { 11 | [field]: "", 12 | }, 13 | } 14 | }, 15 | }; 16 | return { 17 | custom: true, 18 | vm: options, 19 | template: template, 20 | label: label, 21 | field: "__tmp" + uniqueId(), 22 | } 23 | } 24 | 25 | export {vm} 26 | -------------------------------------------------------------------------------- /test/unit/jest.conf.js: -------------------------------------------------------------------------------- 1 | const path = require('path') 2 | 3 | module.exports = { 4 | rootDir: path.resolve(__dirname, '../../'), 5 | moduleFileExtensions: [ 6 | 'js', 7 | 'json', 8 | 'vue' 9 | ], 10 | moduleNameMapper: { 11 | '^@/(.*)$': '/src/$1' 12 | }, 13 | transform: { 14 | '^.+\\.js$': '/node_modules/babel-jest', 15 | '.*\\.(vue)$': '/node_modules/vue-jest' 16 | }, 17 | snapshotSerializers: ['/node_modules/jest-serializer-vue'], 18 | setupFiles: ['/test/unit/setup'], 19 | mapCoverage: true, 20 | coverageDirectory: '/test/unit/coverage', 21 | collectCoverageFrom: [ 22 | 'src/**/*.{js,vue}', 23 | '!src/main.js', 24 | '!src/router/index.js', 25 | '!**/node_modules/**' 26 | ] 27 | } 28 | -------------------------------------------------------------------------------- /src/formTemplate/jump-select.js: -------------------------------------------------------------------------------- 1 | /* 2 | * 暂时不需要 3 | * 没办法动态配置url, 4 | * 只能在配置表中写死 5 | * */ 6 | import JumpSelect from '@/components/form/JumpSelect' 7 | let count = 0; 8 | const uniqueId = () => ++count; 9 | function vm(type,field,label) { 10 | const template = ` 11 | 12 | `; 13 | const options = { 14 | data() { 15 | return { 16 | extendData: { 17 | [field]: "", 18 | }, 19 | type: type, 20 | } 21 | }, 22 | components: { 23 | JumpSelect, 24 | } 25 | }; 26 | return { 27 | custom: true, 28 | vm: options, 29 | template: template, 30 | label: label, 31 | field: "__tmp"+uniqueId(), 32 | }; 33 | } 34 | export {vm} -------------------------------------------------------------------------------- /src/main.js: -------------------------------------------------------------------------------- 1 | // The Vue build version to load with the `import` command 2 | // (runtime-only or standalone) has been set in webpack.base.conf with an alias. 3 | import Vue from 'vue' 4 | import ElementUI from 'element-ui' 5 | import 'element-ui/lib/theme-chalk/index.css' 6 | import App from './App' 7 | import router from './router' 8 | import store from './store' 9 | import Mock from "mockjs" 10 | import formCreate from "form-create/element" 11 | import MyAxios from '@/const/MyAxios' 12 | import VueQuillEditor from 'vue-quill-editor' 13 | import 'quill/dist/quill.core.css' 14 | import 'quill/dist/quill.snow.css' 15 | import 'quill/dist/quill.bubble.css' 16 | 17 | Vue.use(ElementUI) 18 | Vue.use(formCreate) 19 | Vue.use(VueQuillEditor) 20 | Vue.use(MyAxios) 21 | Vue.config.productionTip = false 22 | Vue.prototype.$Mock = Mock; 23 | // Vue.prototype.$FCreate = formCreate; 24 | /* eslint-disable no-new */ 25 | new Vue({ 26 | el: '#app', 27 | router, 28 | store, 29 | components: { 30 | App 31 | }, 32 | template: '' 33 | }) 34 | -------------------------------------------------------------------------------- /src/formTemplate/example2.js: -------------------------------------------------------------------------------- 1 | /* 2 | * 自定义组件中可以使用其它子组件 3 | * */ 4 | import JumpSelect from '@/components/form/JumpSelect' 5 | 6 | let count = 0; 7 | const uniqueId = () => ++count; 8 | 9 | /* 10 | * 将vm定义为方法 11 | * 参数自定义 12 | * 所以模板的灵活性会提高 13 | * */ 14 | function vm(type,field,label) { 15 | const template = ` 16 | 17 | `; 18 | const options = { 19 | data() { 20 | return { 21 | /* 22 | * 必须!所有需要返回给后端的字段都要放在extendData对象中 23 | * */ 24 | extendData: { 25 | [field]: "", 26 | }, 27 | type: type, 28 | } 29 | }, 30 | components: { 31 | JumpSelect, 32 | } 33 | }; 34 | return { 35 | /* 36 | * 同example1 37 | * */ 38 | custom: true, 39 | vm: options, 40 | template: template, 41 | label: label, 42 | field: "__tmp"+uniqueId(), 43 | }; 44 | } 45 | export {vm} -------------------------------------------------------------------------------- /src/formTemplate/applicant.js: -------------------------------------------------------------------------------- 1 | // 请求人 2 | function vm(label) { 3 | const template = ` 4 |
5 | 专利权人 6 | 利害关系人 7 |
如果是利害关系人,且专利实施许可合同已经在国家知识产权局备案,请注明备案号:
8 |
9 | `; 10 | const options = { 11 | data() { 12 | return { 13 | extendData: { 14 | applicant_type_patentee: false, 15 | applicant_type_interested_party: false, 16 | applicant:"", 17 | contract_number:"" 18 | }, 19 | } 20 | }, 21 | }; 22 | return { 23 | custom: true, 24 | vm: options, 25 | template: template, 26 | label: label, 27 | field: "__applicant", 28 | }; 29 | } 30 | export {vm} -------------------------------------------------------------------------------- /src/formConfig/table_100601.js: -------------------------------------------------------------------------------- 1 | import {vm as quill_editor_vm} from '../formTemplate/quill-editor' 2 | let rule = [ 3 | { 4 | type: "input", title: "专利号", field: "patenfewat_number", value: "", 5 | props: { 6 | "type": "text", 7 | }, 8 | }, 9 | { 10 | type: "input", title: "申请日", field: "applicafewation_day", value: "", 11 | props: { 12 | "type": "text", 13 | }, 14 | }, 15 | { 16 | type: "input", title: "发明名称", field: "infewaventor", value: "", 17 | props: { 18 | "type": "text", 19 | }, 20 | }, 21 | { 22 | type: "select", title: "申请人", field: "applifewacation", value: [], 23 | props: { 24 | multiple: true, 25 | filterable: true, 26 | }, 27 | options: [ 28 | {"value": 104, "label": "权利要求书"}, 29 | {"value": 105, "label": "说明书"}, 30 | {"value": 106, "label": "说明书附图"}, 31 | ], 32 | }, 33 | quill_editor_vm() 34 | ]; 35 | 36 | const content = { 37 | rule, 38 | } 39 | export default content 40 | -------------------------------------------------------------------------------- /src/formConfig/table_100015.js: -------------------------------------------------------------------------------- 1 | // 更正错误请求书 2 | import {vm as correction_content_vm} from '../formTemplate/correction-content' 3 | 4 | let rule = [ 5 | { 6 | type: "input", title: "申请号", field: "patent_nufwamber", value: "", 7 | }, 8 | { 9 | type: "input", title: "发明创造名称", field: "tifwatle", value: "", 10 | }, 11 | { 12 | type: "input", title: "申请人/权利人", field: "apfwaplicants", value: "", 13 | }, 14 | { 15 | type: "select", title: "代理机构", field: "agefewancy", value: "",request: true, url: "", 16 | }, 17 | { 18 | type: "select", title: "附件", field: "attacfwahments", value: "",request: true, url: "", 19 | }, 20 | { 21 | type: "span", title: "备案", field: "recofewards", value: "", 22 | col:{ 23 | span:4 24 | } 25 | }, 26 | { 27 | type: "input", title: "备案文件名称", field: "filenfewaame", value: "", 28 | col:{ 29 | span:10 30 | } 31 | }, 32 | { 33 | type: "input", title: "备案文件编号", field: "ffewaileno", value: "", 34 | col:{ 35 | span:10 36 | } 37 | }, 38 | correction_content_vm(), 39 | ] 40 | 41 | const content = { 42 | rule 43 | } 44 | 45 | export default content 46 | -------------------------------------------------------------------------------- /src/formTemplate/change-reason.js: -------------------------------------------------------------------------------- 1 | // 变更原因 2 | let count = 0; 3 | const uniqueId = () => ++count; 4 | function vm(label) { 5 | const template = ` 6 | 7 | 针对 8 | 9 | 日发出的 10 | 11 | (发文序号 12 | 13 | )进行补正 14 | 15 | `; 16 | const options = { 17 | data() { 18 | return { 19 | extendData: { 20 | amendment_notice:false, 21 | notice_date:"", 22 | notice_name:"", 23 | notice_serial:"", 24 | }, 25 | } 26 | }, 27 | }; 28 | return { 29 | custom: true, 30 | vm: options, 31 | template: template, 32 | label: label, 33 | field: "__cr"+uniqueId(), 34 | }; 35 | } 36 | export {vm} -------------------------------------------------------------------------------- /src/formConfig/table_100021.js: -------------------------------------------------------------------------------- 1 | // 专利代理委托书(中英文) 2 | import {vm as upload_vm} from '../formTemplate/Upload' 3 | 4 | const proceeding = [ 5 | {value:1,label:"代为办理专利申请或专利在专利权有效期内的全部事务"}, 6 | {value:2,label:"代为办理实用新型专利检索报告"}, 7 | {value:3,label:"代为办理专利权评价报告"}, 8 | ] 9 | let rule = [ 10 | { 11 | type: "select", title: "委托人", field: "applics", value: "", request: true, url: "", 12 | }, 13 | { 14 | type: "input", title: "委托人英文名称", field: "sgtrs", value: "", 15 | }, 16 | { 17 | type: "select", title: "委托事项", field: "poagrsype", value: "", 18 | options:proceeding 19 | }, 20 | { 21 | type:"select",title:"代理机构",field:"aggresengresgcy",value:[], 22 | props: { 23 | multiple: true, 24 | filterable: true, 25 | }, 26 | request: true, 27 | url: "", 28 | 29 | }, 30 | { 31 | type:"select",title:"代理人",field:"agresgregents",value:[], 32 | props: { 33 | multiple: true, 34 | filterable: true, 35 | "multiple-limit":2, 36 | }, 37 | request: true, 38 | url: "", 39 | 40 | }, 41 | upload_vm({label:"委托书扫描件",url:"/url",tip:"上传专利委托书",type:"file"}), 42 | ] 43 | 44 | 45 | const content = { 46 | rule 47 | } 48 | 49 | export default content 50 | -------------------------------------------------------------------------------- /src/formConfig/table_100012.js: -------------------------------------------------------------------------------- 1 | // 意见陈述书 2 | import {vm as state_matters_vm} from '../formTemplate/state-matters-100012' 3 | import {vm as quill_editor_vm} from '../formTemplate/quill-editor' 4 | let rule = [ 5 | { 6 | type: "input", title: "申请号", field: "patentgres_number", value: "", 7 | }, 8 | { 9 | type: "input", title: "发明名称", field: "titgresgrle", value: "", 10 | }, 11 | { 12 | type: "select", title: "申请人", field: "apfewaplicants", value: "", 13 | options: [], 14 | }, 15 | { 16 | type: "select", title: "代理", field: "agefewancy", value: "", 17 | options: [], 18 | }, 19 | state_matters_vm("陈述事项"), 20 | { 21 | type: "select", title: "附件", field: "attachfewaments", value: "", request: true, url: "", 22 | }, 23 | { 24 | type: "span", title: "备案", field: "recfewaords", value: "", 25 | col:{ 26 | span:4 27 | } 28 | }, 29 | { 30 | type: "input", title: "文件名称", field: "filefewaname", value: "", 31 | col:{ 32 | span:10 33 | } 34 | }, 35 | { 36 | type: "input", title: "文件编号", field: "filferaeno", value: "", 37 | col:{ 38 | span:10 39 | } 40 | }, 41 | quill_editor_vm("opinion","陈述意见") 42 | ] 43 | 44 | const content = { 45 | rule, 46 | }; 47 | export default content -------------------------------------------------------------------------------- /src/formConfig/main.js: -------------------------------------------------------------------------------- 1 | import {handleLayout} from './handle/handle' 2 | import table_100601 from './table_100601' 3 | import table_110101 from './table_110101' 4 | import table_100007 from './table_100007' 5 | import table_100907 from './table_100907' 6 | import table_100015 from './table_100015' 7 | import table_100016 from './table_100016' 8 | import table_100012 from './table_100012' 9 | import table_100021 from './table_100021' 10 | import table_100108 from './table_100108' 11 | 12 | 13 | /* 14 | * 如需自定义单个form的布局,则需像表单100009那样使用,并指定isLayout = true 15 | * */ 16 | 17 | 18 | const config = new Map([ 19 | [100108,{obj:table_100108,name:"其它证明文件"}], 20 | [100021,{obj:table_100021,name:"专利代理委托书(中英文)"}], 21 | [100012,{obj:table_100012,name:"意见陈述书"}], 22 | [100016,{obj:table_100016,name:"著录项目变更申报书"}], 23 | [100015,{obj:table_100015,name:"更正错误请求书"}], 24 | [100601,{obj:table_100601,name:"放弃专利权声明"}], 25 | // [100009,{obj:handleLayout(table_100009,{labelWidth:"140px", span:24}),name:"延长期限请求书",isLayout:true}], 26 | [110101,{obj:table_110101,name:"发明专利请求书"}], 27 | [100007,{obj:table_100007,name:"专利代理委托书"}], 28 | [100907,{obj:table_100907,name:"复审程序授权委托书"}], 29 | ]); 30 | 31 | 32 | const layout = {labelWidth:"120px", span:24}; 33 | [...config.values()].forEach((item)=>{ 34 | if(!item.isLayout){ 35 | handleLayout(item.obj,layout); 36 | } 37 | }); 38 | export default config 39 | -------------------------------------------------------------------------------- /src/formConfig/table_100907.js: -------------------------------------------------------------------------------- 1 | // 复审程序授权委托书 2 | let rule = [ 3 | { 4 | type: "input", title: "专利号", field: "patent_number", value: "", 5 | col: { 6 | span: 12 7 | } 8 | }, 9 | { 10 | type: "input", title: "案件编号", field: "board_number", value: "", 11 | attrs:{ 12 | placeholder:"请输入复审委案件编号", 13 | }, 14 | col: { 15 | span: 12 16 | } 17 | }, 18 | { 19 | type: "input", title: "发明创造名称", field: "title", value: "", 20 | }, 21 | { 22 | type: "input", title: "复审请求人(委托人)", field: "applicants", value: "", 23 | }, 24 | { 25 | type: "input", title: "被委托人", field: "agency", value: "", 26 | attrs:{ 27 | placeholder:"请输入代理机构" 28 | } 29 | }, 30 | { 31 | type: "input", title: "", field: "agents", value: "", 32 | attrs:{ 33 | placeholder:"请输入代理人" 34 | } 35 | }, 36 | { 37 | type: "input", title: "委托权限", field: "agent_one_previlege", value: "", 38 | attrs:{ 39 | placeholder:"请输入第一代理人的代理权限" 40 | } 41 | }, 42 | { 43 | type: "input", title: "", field: "agent_two_previlege", value: "", 44 | attrs:{ 45 | placeholder:"请输入第二代理人的代理权限" 46 | } 47 | }, 48 | // TODO 少个上传文件 49 | ] 50 | 51 | const content = { 52 | rule 53 | } 54 | 55 | export default content -------------------------------------------------------------------------------- /src/formConfig/table_100007.js: -------------------------------------------------------------------------------- 1 | // 专利代理委托书 2 | import {handleSingle} from "./handle/handle"; 3 | 4 | let rule = [ 5 | { 6 | type:"checkbox",title:"声明",field:"poa_declaration",value:[], 7 | options:[ 8 | {value:1,label:"声明填写的专利代理委托信息与专利代理委托书扫描件是一致的"} 9 | ], 10 | }, 11 | { 12 | type:"input",title:"发明创造名称",field:"title",value:"", 13 | }, 14 | { 15 | type:"input",title:"申请号/专利号",field:"patent_number",value:"", 16 | }, 17 | { 18 | type:"select",title:"委托人",field:"applicants",value:[], 19 | props: { 20 | multiple: true, 21 | filterable: true, 22 | }, 23 | request: true, 24 | url: "", 25 | 26 | }, 27 | { 28 | type:"checkbox",title:"委托类型",field:"poa_application",value:[], 29 | options:[ 30 | {value:0,label:"代为办理专利申请或专利在专利权有效期内的全部事务"}, 31 | {value:1,label:"代为办理专利权评价报告或者实用新型专利检索报告"}, 32 | ], 33 | event:{ 34 | change: handleSingle, 35 | } 36 | }, 37 | { 38 | type:"select",title:"代理机构",field:"agency",value:[], 39 | props: { 40 | multiple: true, 41 | filterable: true, 42 | }, 43 | request: true, 44 | url: "", 45 | 46 | }, 47 | { 48 | type:"select",title:"代理人",field:"agents",value:[], 49 | props: { 50 | multiple: true, 51 | filterable: true, 52 | "multiple-limit":2, 53 | }, 54 | request: true, 55 | url: "", 56 | 57 | }, 58 | ] 59 | const content = { 60 | rule // rule字段名称不能更改 61 | } 62 | 63 | export default content 64 | -------------------------------------------------------------------------------- /src/formTemplate/checkbox-common.js: -------------------------------------------------------------------------------- 1 | import {handleSingle} from "../formConfig/handle/handle"; 2 | 3 | let count = 0; 4 | const uniqueId = () => ++count; 5 | let defaultCol = { 6 | labelWidth:"0px", 7 | }; 8 | function vm(field, formItemLabel = "", func = "", col = {},hasCustomClass = true) { 9 | let checkbox = ""; 10 | let extendData = {}; 11 | for (let key in field) { 12 | if (field.hasOwnProperty(key)) { 13 | checkbox += `${field[key]}`; 14 | extendData[key] = false; 15 | } 16 | } 17 | let template = `${checkbox}`; 18 | 19 | const options = { 20 | data() { 21 | return { 22 | extendData, 23 | group: [], 24 | hasCustomClass, 25 | } 26 | }, 27 | methods: { 28 | changeGroup: !func ? handleSingle : func, 29 | }, 30 | watch: { 31 | group: function (val) { 32 | if (func)return 33 | for (let key in this.extendData) { 34 | if (this.extendData.hasOwnProperty(key)) { 35 | this.extendData[key] = key !== val[0] ? false : true; 36 | } 37 | } 38 | } 39 | } 40 | }; 41 | return { 42 | custom: true, 43 | vm: options, 44 | template: template, 45 | label: formItemLabel, 46 | field: "__checkbox" + uniqueId(), 47 | col:Object.keys(col).length !== 0 ? col : defaultCol, 48 | } 49 | } 50 | 51 | export {vm} 52 | -------------------------------------------------------------------------------- /src/formConfig/handle/handle.js: -------------------------------------------------------------------------------- 1 | let temp = []; 2 | 3 | function handlePlaceholder (rules) { 4 | let type; 5 | let title; 6 | rules.forEach((rule) => { 7 | type = rule.type 8 | title = rule.title 9 | if (rule.attrs && !rule.attrs.placeholder) { 10 | rule.attrs.placeholder = set(type, title) 11 | } else if (!rule.attrs) { 12 | rule.attrs = {} 13 | rule.attrs.placeholder = set(type, title) 14 | } 15 | }) 16 | function set (type, title) { 17 | let result 18 | if (type === 'input') { 19 | result = `请输入${title}` 20 | } else { 21 | result = `请选择${title}` 22 | } 23 | return result 24 | } 25 | return rules 26 | } 27 | 28 | 29 | function handleLayout (obj,custom) { // typeof custom === Object 30 | let rules = obj.rule; 31 | rules.forEach((rule)=>{ 32 | if(!rule.col){ 33 | rule.col = custom; 34 | }else { 35 | coverAttribute(rule.col,custom); 36 | } 37 | }) 38 | return obj 39 | } 40 | function coverAttribute (source,target) { 41 | const keys = Object.keys(source); 42 | for (let key in target){ 43 | if (target.hasOwnProperty(key)){ 44 | if(keys.indexOf(key) === -1){ 45 | source[key] = target[key]; 46 | } 47 | } 48 | } 49 | } 50 | 51 | const handleSingle = function (arr) { 52 | if (arr.length === 1){ 53 | temp = [...arr].toString(); 54 | }else if(arr.length>1){ 55 | let index = arr.indexOf(temp); 56 | arr.splice(index,1); 57 | temp = [...arr].toString(); 58 | } 59 | } 60 | 61 | const checkboxFunc = function (val) { 62 | if(val){ 63 | Object.keys(this.extendData).forEach((item)=>{ 64 | this.extendData[item] = false; 65 | }) 66 | val.forEach((item)=>{ 67 | this.extendData[item] = true; 68 | }) 69 | } 70 | } 71 | 72 | export {handlePlaceholder,handleLayout,handleSingle,checkboxFunc} -------------------------------------------------------------------------------- /src/formConfig/table_100016.js: -------------------------------------------------------------------------------- 1 | // 著录项目变更申报书 2 | import {vm as change_reason_vm} from '../formTemplate/change-reason' 3 | import {vm as change_content_vm} from '../formTemplate/change-content-100016' 4 | 5 | const attachments = [{value: 1, label: '双方当事人签章的权利转移协议书'}, {value: 2, label: '全体权利人同意转让的证明材料'}, {value: 3, label: '全体权利人同意赠与的证明材料'}, { 6 | value: 4, 7 | label: '双方当事人签字或盖章的说明变更理由的证明文件' 8 | }, {value: 5, label: '上级主管部门或当地工商行政管理部门出具的变更名称的证明文件'}, {value: 6, label: '户籍管理部门出具的更改姓名的证明文件'}, { 9 | value: 7, 10 | label: '公证机关证明继承人合法地位的公证书' 11 | }, {value: 8, label: '地方知识产权管理部门的调解书'}, {value: 9, label: '人民法院的判决书或者调解书'}, {value: 10, label: '国务院商务主管部门出具的证明文件'}, { 12 | value: 11, 13 | label: '变更后申请人或者专利权人的专利代理委托书' 14 | }, {value: 12, label: '公证材料'}, {value: 13, label: '其他附件'}] 15 | let rule = [ 16 | { 17 | type: "input", title: "申请号", field: "patent_numbfewaer", value: "", 18 | }, 19 | { 20 | type: "input", title: "发明创造名称", field: "patefewant_title", value: "", 21 | }, 22 | { 23 | type: "select", title: "申请人", field: "applicanfewats", value: "", request: true, url: "", 24 | }, 25 | { 26 | type: "span", title: "变更后提交人", field: "placfewaeholder", value: "", 27 | col: { 28 | span: 4 29 | } 30 | }, 31 | { 32 | type: "input", title: "用户代码", field: "efs_cfewaode", value: "", 33 | col: { 34 | span: 10 35 | }, 36 | attrs: { 37 | placeholder: "输入电子申请用户代码" 38 | } 39 | }, 40 | { 41 | type: "input", title: "用户名称", field: "efs_nfewaame", value: "", 42 | col: { 43 | span: 10 44 | }, 45 | attrs: { 46 | placeholder: "输入电子申请用户名称" 47 | } 48 | }, 49 | { 50 | type: "select", title: "代理机构", field: "agefewancy", value: "", request: true, url: "", 51 | }, 52 | change_reason_vm("变更原因"), 53 | change_content_vm(), 54 | { 55 | type: "select", title: "附件", field: "attafewachments", value: [], options:[], 56 | props:{ 57 | multiple: true, 58 | filterable: true, 59 | }, 60 | }, 61 | ] 62 | 63 | 64 | const content = { 65 | rule 66 | } 67 | 68 | export default content 69 | -------------------------------------------------------------------------------- /src/formTemplate/offset-reason-100904.js: -------------------------------------------------------------------------------- 1 | import {handleSingle} from '../formConfig/handle/handle' 2 | const template = ` 3 | 4 | 5 | 根据专利法实施细则第60条第3款的规定 6 | 7 | 8 | 根据专利法实施细则第66条第4款的规定 9 | 10 | 11 | 针对 12 | 13 | 日发出的 14 | 15 | (发文序号 16 | 17 | )进行补正 18 | 19 | 20 | `; 21 | 22 | const options = { 23 | data(){ 24 | return { 25 | extendData:{ 26 | amendment_reason_article60:false, 27 | tab100904amendment_reason_article66:false, 28 | amendment_reason_notice:false, 29 | notice_serial:"", 30 | notice_name:"", 31 | notice_date:"", 32 | }, 33 | group:[], 34 | checkboxKey:["amendment_reason_article60","tab100904amendment_reason_article66","amendment_reason_notice"], 35 | } 36 | }, 37 | methods:{ 38 | changeGroup:handleSingle, 39 | }, 40 | watch: { 41 | group: function (val) { 42 | for (let key in this.extendData) { 43 | if (this.extendData.hasOwnProperty(key)) { 44 | if(this.checkboxKey.indexOf(key) !== -1){ 45 | this.extendData[key] = key !== val[0] ? false : true; 46 | } 47 | } 48 | } 49 | } 50 | } 51 | }; 52 | 53 | const vm = { 54 | custom:true, 55 | vm:options, 56 | template:template, 57 | label:"补正原因", 58 | field:"offset_reason_vm", 59 | } 60 | 61 | export {vm} -------------------------------------------------------------------------------- /src/formTemplate/correction-content.js: -------------------------------------------------------------------------------- 1 | function vm(type, field, label) { 2 | const template = ` 3 |
4 | 增行 5 | 减行 6 | 7 | 文件名称 8 | 更正项目 9 | 文件中的位置 10 | 更正前 11 | 更正后 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 |
21 | `; 22 | const options = { 23 | data() { 24 | return { 25 | // extendData: { 26 | // amendments: [], 27 | // }, 28 | amendments: [ 29 | { 30 | filename: "", 31 | item: "", 32 | position: "", 33 | before: "", 34 | after: "", 35 | } 36 | ], 37 | } 38 | }, 39 | computed: { 40 | extendData: function () { 41 | return {amendments: this.amendments}; 42 | } 43 | }, 44 | methods:{ 45 | addLine(){ 46 | let obj = { 47 | filename: "", 48 | item: "", 49 | position: "", 50 | before: "", 51 | after: "", 52 | }; 53 | this.amendments.push(obj); 54 | }, 55 | minusLine(){ 56 | this.amendments.length!==0?this.amendments.pop():""; 57 | }, 58 | }, 59 | }; 60 | return { 61 | custom: true, 62 | vm: options, 63 | template: template, 64 | label: "更正内容", 65 | field: "__cc", 66 | }; 67 | } 68 | 69 | export {vm} -------------------------------------------------------------------------------- /config/index.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | // Template version: 1.3.1 3 | // see http://vuejs-templates.github.io/webpack for documentation. 4 | 5 | const path = require('path') 6 | 7 | module.exports = { 8 | dev: { 9 | 10 | // Paths 11 | assetsSubDirectory: 'static', 12 | assetsPublicPath: '/', 13 | proxyTable: {}, 14 | 15 | // Various Dev Server settings 16 | host: 'localhost', // can be overwritten by process.env.HOST 17 | port: 8081, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined 18 | autoOpenBrowser: false, 19 | errorOverlay: true, 20 | notifyOnErrors: true, 21 | poll: false, // https://webpack.js.org/configuration/dev-server/#devserver-watchoptions- 22 | 23 | // Use Eslint Loader? 24 | // If true, your code will be linted during bundling and 25 | // linting errors and warnings will be shown in the console. 26 | useEslint: false, 27 | // If true, eslint errors and warnings will also be shown in the error overlay 28 | // in the browser. 29 | showEslintErrorsInOverlay: false, 30 | 31 | /** 32 | * Source Maps 33 | */ 34 | 35 | // https://webpack.js.org/configuration/devtool/#development 36 | devtool: 'cheap-module-source-map', 37 | 38 | // If you have problems debugging vue-files in devtools, 39 | // set this to false - it *may* help 40 | // https://vue-loader.vuejs.org/en/options.html#cachebusting 41 | cacheBusting: true, 42 | 43 | cssSourceMap: true 44 | }, 45 | 46 | build: { 47 | // Template for index.html 48 | index: path.resolve(__dirname, '../dist/index.html'), 49 | 50 | // Paths 51 | assetsRoot: path.resolve(__dirname, '../dist'), 52 | assetsSubDirectory: 'static', 53 | assetsPublicPath: './', 54 | 55 | /** 56 | * Source Maps 57 | */ 58 | 59 | productionSourceMap: true, 60 | // https://webpack.js.org/configuration/devtool/#production 61 | devtool: '#source-map', 62 | 63 | // Gzip off by default as many popular static hosts such as 64 | // Surge or Netlify already gzip all static assets for you. 65 | // Before setting to `true`, make sure to: 66 | // npm install --save-dev compression-webpack-plugin 67 | productionGzip: false, 68 | productionGzipExtensions: ['js', 'css'], 69 | 70 | // Run the build command with an extra argument to 71 | // View the bundle analyzer report after build finishes: 72 | // `npm run build --report` 73 | // Set to `true` or `false` to always turn it on or off 74 | bundleAnalyzerReport: process.env.npm_config_report 75 | } 76 | } 77 | -------------------------------------------------------------------------------- /src/formTemplate/Upload.js: -------------------------------------------------------------------------------- 1 | // 著录项目变更申报书 附件 2 | const defaultProps = { 3 | handlePreview:()=>{}, 4 | handleRemove:()=>{}, 5 | beforeRemove:()=>{}, 6 | handleExceed:()=>{}, 7 | }; 8 | function vm({label,url,props = {},tip="",type = "picture"}) { 9 | const template = ` 10 |
11 | 25 | 38 |
39 | 40 | `; 41 | const options = { 42 | data() { 43 | return { 44 | extendData: { 45 | 46 | }, 47 | fileList:[{url:'http://img1.touxiang.cn/uploads/20131030/30-075657_191.jpg'}], 48 | action:url, 49 | dialogImageUrl:"", 50 | dialogVisible:false, 51 | type:type 52 | } 53 | }, 54 | methods:{ 55 | submitUpload() { 56 | this.$refs.upload.submit(); 57 | }, 58 | handlePreview:props.handlePreview?props.handlePreview:defaultProps.handlePreview, 59 | handleRemove:props.handleRemove?props.handleRemove:defaultProps.handleRemove, 60 | beforeRemove:props.beforeRemove?props.beforeRemove:defaultProps.beforeRemove, 61 | handleExceed:props.handleExceed?props.handleExceed:defaultProps.handleExceed, 62 | handlePictureCardPreview(file){ 63 | this.dialogImageUrl = file.url; 64 | this.dialogVisible = true; 65 | }, 66 | }, 67 | }; 68 | return { 69 | custom: true, 70 | vm: options, 71 | template: template, 72 | label: label, 73 | field: "__upload", 74 | }; 75 | } 76 | export {vm} -------------------------------------------------------------------------------- /src/formTemplate/state-matters-100012.js: -------------------------------------------------------------------------------- 1 | // 陈述事项 2 | import {handleSingle} from '../formConfig/handle/handle' 3 | 4 | function vm(label) { 5 | const template = ` 6 | 7 | 针对国家知识产权局于发出的(发文序号)陈述意见 8 | 针对国家知识产权局于发出的(发文序号)陈述意见 9 | 主动提出修改(根据专利法实话细则第51条第1、2款的规定) 10 | 其他事宜 11 | 12 | `; 13 | const options = { 14 | data() { 15 | return { 16 | extendData: { 17 | notice:false, 18 | notice_supplemental:false, 19 | active_amendment:false, 20 | reply_to_other:false, 21 | notice_date:"", 22 | notice_date_supplemental:"", 23 | notice_name:"", 24 | notice_name_supplemental:"", 25 | notice_serial:"", 26 | notice_serial_supplemental:"", 27 | 28 | }, 29 | group:[], 30 | checkboxKey:["notice","notice_supplemental","active_amendment","reply_to_other"], 31 | } 32 | }, 33 | methods:{ 34 | changeGroup:handleSingle 35 | }, 36 | watch: { 37 | group: function (val) { 38 | for (let key in this.extendData) { 39 | if (this.extendData.hasOwnProperty(key)) { 40 | if(this.checkboxKey.indexOf(key) !== -1){ 41 | this.extendData[key] = key !== val[0] ? false : true; 42 | } 43 | } 44 | } 45 | } 46 | } 47 | }; 48 | return { 49 | custom: true, 50 | vm: options, 51 | template: template, 52 | label: label, 53 | field: "__sm", 54 | }; 55 | } 56 | export {vm} -------------------------------------------------------------------------------- /src/App.vue: -------------------------------------------------------------------------------- 1 | 34 | 35 | 55 | 56 | 101 | -------------------------------------------------------------------------------- /src/formTemplate/formComponents/OffsetContent.vue: -------------------------------------------------------------------------------- 1 | 28 | 29 | 82 | 83 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "demo", 3 | "version": "1.0.0", 4 | "description": "A Vue.js project", 5 | "author": "linxi ", 6 | "private": true, 7 | "scripts": { 8 | "dev": "webpack-dev-server --inline --progress --config build/webpack.dev.conf.js", 9 | "start": "npm run dev", 10 | "unit": "jest --config test/unit/jest.conf.js --coverage", 11 | "e2e": "node test/e2e/runner.js", 12 | "test": "npm run unit && npm run e2e", 13 | "lint": "eslint --ext .js,.vue src test/unit test/e2e/specs", 14 | "build": "node build/build.js" 15 | }, 16 | "dependencies": { 17 | "axios": "^0.18.0", 18 | "element-ui": "^2.4.11", 19 | "form-create": "^1.6.0", 20 | "iview": "^3.3.0", 21 | "mockjs": "^1.0.1-beta3", 22 | "vue": "^2.5.2", 23 | "vue-quill-editor": "^3.0.6", 24 | "vue-router": "^3.0.1", 25 | "vuex": "^3.0.1" 26 | }, 27 | "devDependencies": { 28 | "autoprefixer": "^7.1.2", 29 | "babel-core": "^6.22.1", 30 | "babel-eslint": "^8.2.1", 31 | "babel-helper-vue-jsx-merge-props": "^2.0.3", 32 | "babel-jest": "^21.0.2", 33 | "babel-loader": "^7.1.1", 34 | "babel-plugin-dynamic-import-node": "^1.2.0", 35 | "babel-plugin-syntax-jsx": "^6.18.0", 36 | "babel-plugin-transform-es2015-modules-commonjs": "^6.26.0", 37 | "babel-plugin-transform-runtime": "^6.22.0", 38 | "babel-plugin-transform-vue-jsx": "^3.5.0", 39 | "babel-preset-env": "^1.3.2", 40 | "babel-preset-stage-2": "^6.22.0", 41 | "babel-register": "^6.22.0", 42 | "chalk": "^2.0.1", 43 | "chromedriver": "^2.27.2", 44 | "copy-webpack-plugin": "^4.0.1", 45 | "cross-spawn": "^5.0.1", 46 | "css-loader": "^0.28.0", 47 | "eslint": "^4.15.0", 48 | "eslint-config-standard": "^10.2.1", 49 | "eslint-friendly-formatter": "^3.0.0", 50 | "eslint-loader": "^1.7.1", 51 | "eslint-plugin-import": "^2.7.0", 52 | "eslint-plugin-node": "^5.2.0", 53 | "eslint-plugin-promise": "^3.4.0", 54 | "eslint-plugin-standard": "^3.0.1", 55 | "eslint-plugin-vue": "^4.0.0", 56 | "extract-text-webpack-plugin": "^3.0.0", 57 | "file-loader": "^1.1.4", 58 | "friendly-errors-webpack-plugin": "^1.6.1", 59 | "html-webpack-plugin": "^2.30.1", 60 | "jest": "^22.0.4", 61 | "jest-serializer-vue": "^0.3.0", 62 | "nightwatch": "^0.9.12", 63 | "node-notifier": "^5.1.2", 64 | "optimize-css-assets-webpack-plugin": "^3.2.0", 65 | "ora": "^1.2.0", 66 | "portfinder": "^1.0.13", 67 | "postcss-import": "^11.0.0", 68 | "postcss-loader": "^2.0.8", 69 | "postcss-url": "^7.2.1", 70 | "rimraf": "^2.6.0", 71 | "selenium-server": "^3.0.1", 72 | "semver": "^5.3.0", 73 | "shelljs": "^0.7.6", 74 | "uglifyjs-webpack-plugin": "^1.1.1", 75 | "url-loader": "^0.5.8", 76 | "vue-jest": "^1.0.2", 77 | "vue-loader": "^13.3.0", 78 | "vue-style-loader": "^3.0.1", 79 | "vue-template-compiler": "^2.5.2", 80 | "webpack": "^3.6.0", 81 | "webpack-bundle-analyzer": "^2.9.0", 82 | "webpack-dev-server": "^2.9.1", 83 | "webpack-merge": "^4.1.0" 84 | }, 85 | "engines": { 86 | "node": ">= 6.0.0", 87 | "npm": ">= 3.0.0" 88 | }, 89 | "browserslist": [ 90 | "> 1%", 91 | "last 2 versions", 92 | "not ie <= 8" 93 | ] 94 | } 95 | -------------------------------------------------------------------------------- /src/const/myAxios.js: -------------------------------------------------------------------------------- 1 | export default { 2 | install (Vue, options) { 3 | Vue.prototype.$axiosGet = axiosGet; 4 | Vue.prototype.$axiosDelete = axiosDelete; 5 | Vue.prototype.$axiosPost = axiosPost; 6 | Vue.prototype.$axiosPut = axiosPut; 7 | } 8 | } 9 | 10 | //------------------默认配置项start------------------------- 11 | 12 | const URLDEFAULT = ''; 13 | 14 | const dd = {}; 15 | 16 | const successFunc = function (d, t) {} 17 | 18 | const errorFunc = function (d, t) { 19 | if(d.info) { 20 | t.$message({message: d.info, type: 'warning'}); 21 | }else { 22 | t.$message({message: '网络错误!', type: 'warning'}); 23 | } 24 | } 25 | 26 | const catchFunct = function (err, t) { 27 | console.log(err); 28 | t.$message({message: '网络错误!', type: 'error'}); 29 | } 30 | 31 | const completeFunc = function (d, t) {} 32 | //------------------默认配置项end------------------------- 33 | 34 | function axiosGet ({url=URLDEFAULT, data=dd, success=_=>{successFunc(_, this)}, error=_=>{errorFunc(_, this)}, catchFunc=_=>{catchFunct(_, this)}, complete=_=>{completeFunc(_, this)} }) { 35 | 36 | 37 | const res = this.$axios.get(url, { params: data }); 38 | res 39 | .then(response=>{ 40 | const d = response.data; 41 | if(d.status == -1) { 42 | window.location.href = '/login'; 43 | return false; 44 | // console.log(url); 45 | } 46 | d.status > 0 ? success(d) : error(d); 47 | 48 | complete(d); 49 | 50 | }) 51 | .catch(err=>{ 52 | catchFunc(err); 53 | complete(err); 54 | }); 55 | 56 | return res; 57 | } 58 | function axiosDelete({ url=URLDEFAULT, data=dd, success=_=>{successFunc(_, this)}, error=_=>{errorFunc(_, this)}, catchFunc=_=>{catchFunct(_, this)}, complete=_=>{completeFunc(_, this)} }) { 59 | 60 | 61 | const res = this.$axios.delete(url, { params: data }); 62 | res 63 | .then(response=>{ 64 | const d = response.data; 65 | d.status > 0 ? success(d) : error(d); 66 | 67 | complete(d); 68 | }) 69 | .catch(err=>{ 70 | catchFunc(err); 71 | complete(err); 72 | }); 73 | 74 | return res; 75 | } 76 | 77 | function axiosPost ({ url=URLDEFAULT, data=dd, success=_=>{successFunc(_, this)}, error=_=>{errorFunc(_, this)}, catchFunc=_=>{catchFunct(_, this)}, complete=_=>{completeFunc(_, this)} }) { 78 | 79 | 80 | const res = this.$axios.post(url, data); 81 | res 82 | .then(response=>{ 83 | const d = response.data; 84 | d.status > 0 ? success(d) : error(d); 85 | 86 | complete(d); 87 | }) 88 | .catch(error=>{ 89 | catchFunc(error); 90 | complete(error); 91 | }); 92 | 93 | return res; 94 | } 95 | 96 | function axiosPut ({ url=URLDEFAULT, data=dd, success=_=>{successFunc(_, this)}, error=_=>{errorFunc(_, this)}, catchFunc=_=>{catchFunct(_, this)}, complete=_=>{completeFunc(_, this)} }) { 97 | 98 | 99 | const res = this.$axios.put(url, data); 100 | res 101 | .then(response=>{ 102 | const d = response.data; 103 | d.status > 0 ? success(d) : error(d); 104 | 105 | complete(d); 106 | }) 107 | .catch((d)=>{ 108 | catchFunc(d); 109 | complete(d); 110 | }); 111 | 112 | return res; 113 | } -------------------------------------------------------------------------------- /src/formTemplate/example1.js: -------------------------------------------------------------------------------- 1 | /* 2 | * 自定义组件中可以使用其它子组件 3 | * */ 4 | import OffsetContent from './formComponents/OffsetContent' 5 | /* 6 | * template为组件模板 7 | * 和.vue文件中的template一样 8 | * 暂时还没想到优化的方法 9 | * */ 10 | const template = ` 11 |
12 | 13 | 17 | 18 | 22 | 23 | 27 | 28 | 32 | 33 | 36 | 40 | 41 | 42 | 新增 43 | 44 | 45 | 46 | 47 |
48 | `; 49 | 50 | /* 51 | * options为生成vue实例的选项 52 | * */ 53 | const options = { 54 | data(){ 55 | return { 56 | isVisible:false, 57 | /* 58 | * 必须!所有需要返回给后端的字段都要放在extendData对象中 59 | * */ 60 | extendData:{ 61 | tableData:[], 62 | }, 63 | rowData:{}, 64 | type:"add", 65 | index:null, 66 | } 67 | }, 68 | methods:{ 69 | handleDelete(index,rows){ 70 | rows.splice(index, 1); 71 | }, 72 | handleEdit(row,index){ 73 | this.type = "edit"; 74 | this.index = index; 75 | this.rowData = row; 76 | this.controlDialog("block"); 77 | }, 78 | add(){ 79 | this.index = null; 80 | this.type = "add"; 81 | this.$refs.addOffset?this.$refs.addOffset.clear():""; 82 | this.controlDialog("block"); 83 | }, 84 | save(val){ 85 | if(this.type === "edit"){ 86 | for (let key in val){ 87 | if(val.hasOwnProperty(key)){ 88 | this.extendData.tableData[this.index][key] = val[key]; 89 | } 90 | } 91 | }else { 92 | this.extendData.tableData.push(val); 93 | } 94 | this.controlDialog('none'); 95 | }, 96 | controlDialog(c){ 97 | this.isVisible = c === "block"?true:false; 98 | const parent = document.getElementsByClassName("offset_dialog")[0].parentNode; 99 | parent.style.display = c; 100 | }, 101 | }, 102 | components:{ 103 | OffsetContent 104 | }, 105 | }; 106 | /* 107 | * vm为主要输出内容 108 | * */ 109 | const vm = { 110 | custom:true, // 必填,说明为自定义组件 111 | vm:options, // 必填 112 | template:template, // 必填 113 | label:"补正内容", // 选填,为form-item的label 114 | field:"offset_content_vm", // 必填,此处虽为必填,但是字段是没有用的,只是源码会报错,后续会更改源码 115 | }; 116 | export {vm} -------------------------------------------------------------------------------- /src/formTemplate/priority.js: -------------------------------------------------------------------------------- 1 | /* 2 | * 优先权 3 | * */ 4 | import axios from 'axios' 5 | 6 | const template = ` 7 |
8 | 9 | 10 | 11 | 17 | 18 | 19 | 20 | 新增 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 保存 45 | 取消 46 | 47 | 48 | 49 |
50 | ` 51 | 52 | const options = { 53 | data () { 54 | return { 55 | extendData: { 56 | priority: [], 57 | }, 58 | priority_copy:[], 59 | priority_options: [], 60 | options: [], 61 | isVisible: false, 62 | form: { 63 | area: '', 64 | id: '', 65 | date: '', 66 | } 67 | } 68 | }, 69 | computed: {}, 70 | methods: { 71 | add () { 72 | this.controlDialog('block') 73 | const url = '/static/js/area.json' 74 | axios.get(url).then(response=>{ 75 | this.options = eval(`${response.data}`); 76 | }) 77 | }, 78 | save () { 79 | let label = `[${this.form.area}]${this.form.id}-${this.form.date}` 80 | let value = this.form.id 81 | this.verifyValue(value) ? this.priority_options.push({label: label, value: value}) : '' 82 | if(!this.priority_copy.includes(value)){ 83 | this.priority_copy.push(value); 84 | this.extendData.priority.push(Object.assign(this.form,{name:label})); 85 | } 86 | this.controlDialog('none') 87 | }, 88 | verifyValue (value) { 89 | let bool = true 90 | this.priority_options.forEach((item) => { 91 | if (item.value === value) { 92 | bool = false 93 | } 94 | }) 95 | return bool 96 | }, 97 | cancel () { 98 | this.controlDialog('none') 99 | }, 100 | controlDialog (c) { 101 | this.isVisible = c === 'block' ? true : false 102 | const parent = document.getElementsByClassName('priority_dialog')[0].parentNode 103 | parent.style.display = c 104 | }, 105 | }, 106 | } 107 | 108 | const vm = { 109 | custom: true, 110 | vm: options, 111 | template: template, 112 | label: '优先权', 113 | field: 'priority_vm', 114 | } 115 | 116 | export {vm} 117 | -------------------------------------------------------------------------------- /src/formConfig/example.js: -------------------------------------------------------------------------------- 1 | /* 2 | * handle中是一些处理表单生成规则的公共方法 3 | * 如没用到handleSingle可不引用 4 | * */ 5 | import {handleSingle} from "./handle/handle"; 6 | 7 | /* 8 | * statement和JumpSelect为自定义组件示例 9 | * 如没用到handleSingle可不引用 10 | * */ 11 | import {vm as statement} from '../formTemplate/statement' 12 | import {vm as JumpSelect} from '../formTemplate/jump-select' 13 | 14 | /* 15 | * 规则变量为Array类型 16 | * 变量名为rule 17 | * 下列注释中的E为:同Element UI 18 | * */ 19 | 20 | let rule = [ 21 | /* 22 | * text类型 23 | * */ 24 | { 25 | type: "span", 26 | title: "根据专利法第34条的规定,请求早日公布下列发明专利申请", 27 | field: "placeholder", 28 | col: { 29 | labelWidth:"100%", 30 | }, 31 | }, 32 | /* 33 | * input类型 34 | * */ 35 | { 36 | type: "input", // 必填,文本框的类型 37 | /* 38 | * title,非必填 39 | * 该字段为form-item的label 40 | * 为空的情况下labelWidth依然有效 41 | * 可用在一些需要占用两行的form-item上 42 | * */ 43 | title: "申请人", 44 | field: "applicant", // 必填,该字段为传给后端的数据的字段,在rule数组中必须唯一 45 | value: "", // 必填,field字段的值,需要指定数据类型(多选的select为[]) 46 | /* 47 | * col对象为form-item的布局,可不填 48 | * 全局有默认值,labelPosition为"left" 49 | * 如需针对单个完整表单,则需在main.js中针对单个文件制定规则 50 | * 如需自定义单个form-item则只针对labelWidth和span 51 | * */ 52 | col: { 53 | labelWidth: "", // E 54 | labelPosition: "", // E 55 | span: "", // E 中的:span 56 | }, 57 | /* 58 | * attrs为普通的 HTML 特性 59 | * 详情请看vue渲染函数 60 | * 其中placeholder有默认值, 61 | * input类型的默认值为——请输入+title 62 | * select类型的默认值为——请选择+title 63 | * 如需自定义请填写 64 | * */ 65 | attrs: { 66 | placeholder: "请输入申请人xxx" 67 | }, 68 | /* 69 | * 表单验证规则 70 | * 同Element UI 71 | * 暂不支持自定义组件的验证 72 | * */ 73 | validate: [ 74 | {required: true, message: '请输入申请人', trigger: 'blur'} 75 | ] 76 | }, 77 | /* 78 | * select类型 79 | * */ 80 | { 81 | type: "select", // 必填 82 | title: "", // 同上 83 | field: "", // 同上 84 | value: "", // 同上 85 | /* 86 | * props 同Element UI中的Select Attributes 87 | * */ 88 | props: { 89 | multiple: true, 90 | disabled: true, 91 | filterable: true, 92 | /**...**/ 93 | }, 94 | request: true, // 如select的options为后端获取,则需指定request: true 95 | url: "", // 如select的options为后端获取,则需指定url,参数会在组件中集中处理 96 | /* 97 | * 如无需从后端获取则需指定options 98 | * */ 99 | options: [ 100 | {'value': 104, 'label': '权利要求书'}, 101 | {'value': 105, 'label': '说明书'}, 102 | {'value': 106, 'label': '说明书附图'}, 103 | ], 104 | }, 105 | /* 106 | * checkbox类型 107 | * */ 108 | { 109 | type: "checkbox", // 必填 110 | title: "", // 同上 111 | field: "", // 同上 112 | value: "", // 同上 113 | /* 114 | * options为CheckBox的选项 115 | * */ 116 | options: [ 117 | {value: 1, label: '第一个'}, 118 | {value: 2, label: '第二个'} 119 | ], 120 | /* 121 | * event为CheckBox绑定的事件 122 | * */ 123 | event: { 124 | /* 125 | * 如只需单选,则使用handleSingle方法 126 | * 如需自定义,则在该配置的.js文件中自定义 127 | * */ 128 | change: handleSingle, 129 | } 130 | }, 131 | /* 132 | * 自定义组件 133 | * 详情在formTemplate文件夹中example1.js 134 | * 主要用在一些不规则的CheckBox和需要将form-item变异成其它组件的场景 135 | * 自定义组件在rule中的位置就是它在form中的位置 136 | * */ 137 | statement, 138 | /* 139 | * 带参数的自定义组件 140 | * 具体参数自定义 141 | * 详情在formTemplate文件夹中example2.js 142 | * 使用场景:当子组件中有大量公共部分可以使用时 143 | * */ 144 | JumpSelect(...arg), 145 | ]; 146 | 147 | /* 148 | * content为输出对象 149 | * 指定为对象是因为可能会拓展方法 150 | * */ 151 | const content = { 152 | rule // rule字段名称不能更改 153 | } 154 | 155 | export default content -------------------------------------------------------------------------------- /src/formConfig/table_110101.js: -------------------------------------------------------------------------------- 1 | //发明专利请求书 2 | import {vm as statement} from '../formTemplate/statement' 3 | import {vm as priority} from '../formTemplate/priority' 4 | import {vm as checkbox_common_vm} from '../formTemplate/checkbox-common' 5 | import {handleSingle} from './handle/handle' 6 | 7 | const address = [ 8 | {detail: 'ABC-高级生物技术中心', address: '意大利', value: 'ABC'}, 9 | {detail: 'ATCC-美国典型培养物保藏中心', address: '美国', value: 'ATCC'}, 10 | ] 11 | const novelty_claims = { 12 | novelty_exception_exhibition:"已在中国政府主办或承认的国际展览会上首次展出", 13 | novelty_exception_published:"已在规定的学术会议或技术会议上首次发表", 14 | novelty_exception_leakage:"他人未经申请人同意而泄露其内容", 15 | } 16 | function handleLinkage(checked) { 17 | address.forEach((item) => { 18 | if (item.value === checked) { 19 | content.rule.forEach((i) => { 20 | if (i.field === "address") { 21 | i.value = item.address; 22 | } 23 | }) 24 | } 25 | }) 26 | } 27 | 28 | let rule = [ 29 | { 30 | type: 'input', title: '发明名称', field: 'title', value: '', 31 | }, 32 | { 33 | type: 'select', title: '发明人', field: 'inventors', value: [], 34 | props: { 35 | multiple: true, 36 | filterable: true, 37 | }, 38 | request: true, 39 | url: '/test', 40 | }, 41 | { 42 | type: 'select', title: '申请人', field: 'applicants', value: [], 43 | props: { 44 | multiple: true, 45 | filterable: true, 46 | }, 47 | request: true, 48 | url: '/test', 49 | }, 50 | statement, 51 | { 52 | type: 'select', title: '联系人', field: 'contact', value: [], 53 | props: { 54 | multiple: true, 55 | filterable: true, 56 | }, 57 | request: true, 58 | url: '/test', 59 | }, 60 | { 61 | type: 'select', title: '代理机构', field: 'agency', value: [], 62 | request: true, 63 | url: '/test', 64 | props: { 65 | multiple: true, 66 | filterable: true, 67 | }, 68 | }, 69 | { 70 | type: 'select', title: '代理人', field: 'agents', value: [], 71 | request: true, 72 | url: '/test', 73 | props: { 74 | multiple: true, 75 | filterable: true, 76 | }, 77 | }, 78 | checkbox_common_vm({poa_declaration:"声明已经与申请人签订了专利代理委托书且本表中的信息与委托书中相应信息一致"},"代理声明","",{labelWidth:"120px"}), 79 | { 80 | type: 'select', title: '总委托书编号', field: 'poa', value: [], 81 | props: { 82 | multiple: true, 83 | filterable: true, 84 | }, 85 | attrs: { 86 | placeholder: '请选择总委托书编号(如果有)' 87 | }, 88 | request: true, 89 | url: '/test', 90 | }, 91 | priority, 92 | { 93 | type: 'input', title: '权利要求项数', field: 'claims_count', value: '', 94 | }, 95 | { 96 | type: 'input', title: '摘要附图图号', field: 'abstract_figure', value: '', 97 | }, 98 | { 99 | type: 'input', title: '分案申请', field: 'division_number', value: '', 100 | col: { 101 | span: 12, 102 | }, 103 | }, 104 | { 105 | type: 'input', title: '', field: 'division_division_number', value: '', 106 | attrs: { 107 | placeholder: '针对的分案申请' 108 | }, 109 | col: { 110 | span: 6, 111 | labelWidth: '0', 112 | }, 113 | }, 114 | { 115 | type: 'DatePicker', title: '', field: 'division_apd', value: "", 116 | col: { 117 | span: 6, 118 | labelWidth: '0', 119 | }, 120 | }, 121 | checkbox_common_vm({bio_alive:"是否存活"},"生物材料样品","",{labelWidth:"120px"}), 122 | { 123 | type: 'select', title: '', field: 'bio_deposit_center', value: '', 124 | props: { 125 | multiple: false, 126 | filterable: true, 127 | }, 128 | options: [ 129 | {'value': 'ABC', 'label': 'ABC-高级生物技术中心'}, 130 | {'value': 'ATCC', 'label': 'ATCC-美国典型培养物保藏中心'}, 131 | ], 132 | event: { 133 | change: handleLinkage, 134 | }, 135 | attrs: { 136 | placeholder: '请选择生物保藏机构' 137 | }, 138 | col: { 139 | span: 14, 140 | labelWidth: '110px', 141 | }, 142 | }, 143 | { 144 | type: 'input', title: '', field: 'bio_desposit_address', value: '', 145 | attrs: { 146 | placeholder: '请输入地址' 147 | }, 148 | col: { 149 | span: 10, 150 | labelWidth: '0', 151 | }, 152 | }, 153 | { 154 | type: 'DatePicker', title: '', field: 'bio_deposit_date', value: "", 155 | attrs: { 156 | placeholder: '请输入保藏日期' 157 | }, 158 | col: { 159 | span: 14, 160 | labelWidth: '110px', 161 | }, 162 | }, 163 | { 164 | type: 'input', title: '', field: 'bio_deposit_number', value: '', 165 | attrs: { 166 | placeholder: '请输入保藏编号' 167 | }, 168 | col: { 169 | span: 5, 170 | labelWidth: '0', 171 | }, 172 | }, 173 | { 174 | type: 'input', title: '', field: 'bio_deposit_species', value: '', 175 | attrs: { 176 | placeholder: '请输入分类命名' 177 | }, 178 | col: { 179 | span: 5, 180 | labelWidth: '0', 181 | }, 182 | }, 183 | checkbox_common_vm({squence_table:"本申请涉及核苷酸或氨基酸序列表"},"序列表","",{labelWidth:"120px"}), 184 | checkbox_common_vm({inheritance:"本专利申请涉及的发明创造是依赖于遗传资源完成的"},"遗传资源","",{labelWidth:"120px"}), 185 | checkbox_common_vm({is_utility:"声明本申请人对同样的发明创造在申请本发明专利的同日申请了实用新型专利"},"同日申请","",{labelWidth:"120px"}), 186 | checkbox_common_vm({prepubic:"请求早日公布该专利申请"},"提前公布","",{labelWidth:"120px"}), 187 | checkbox_common_vm(novelty_claims,"不丧失新颖性声明","",{labelWidth:"120px"}), 188 | checkbox_common_vm({subs_exam:"同时提出实质审查请求"},"实质审查","",{labelWidth:"120px"}), 189 | checkbox_common_vm({confidential_exam:"向国外申请专利保密审查请求"},"保密审查","",{labelWidth:"120px"}), 190 | // TODO 附件要配置 191 | { 192 | type: 'select', title: '附件(非必填)', field: 'attachments', value: [], 193 | props: { 194 | multiple: true, 195 | filterable: true, 196 | }, 197 | options: [ 198 | {'value': 104, 'label': '权利要求书'}, 199 | {'value': 105, 'label': '说明书'}, 200 | {'value': 106, 'label': '说明书附图'}, 201 | ], 202 | }, 203 | { 204 | type: 'input', title: '证明文件备案号', field: 'document_number', value: [], 205 | attrs: { 206 | placeholder: '请选择总委托书编号(如果有)' 207 | }, 208 | request: true, 209 | url: '/test', 210 | }, 211 | ]; 212 | const content = { 213 | rule 214 | } 215 | 216 | export default content 217 | -------------------------------------------------------------------------------- /static/js/area.json: -------------------------------------------------------------------------------- 1 | [{id:"CN",name:"中国[CN]",value:"中国"},{id:"PCT",name:"PCT",value:"PCT"},{id:"Madrid",name:"马德里[Madrid]",value:"马德里"},{id:"HK",name:"中国香港[HK]",value:"中国香港"},{id:"TW",name:"中国台湾[TW]",value:"中国台湾"},{id:"MO",name:"澳门[MO]",value:"澳门"},{id:"JP",name:"日本[JP]",value:"日本"},{id:"US",name:"美国[US]",value:"美国"},{id:"KR",name:"韩国[KR]",value:"韩国"},{id:"GB",name:"英国[GB]",value:"英国"},{id:"FR",name:"法国[FR]",value:"法国"},{id:"DE",name:"德国[DE]",value:"德国"},{id:"AU",name:"澳大利亚[AU]",value:"澳大利亚"},{id:"NZ",name:"新西兰[NZ]",value:"新西兰"},{id:"AF",name:"阿富汗[AF]",value:"阿富汗"},{id:"AR",name:"阿根廷[AR]",value:"阿根廷"},{id:"JM",name:"牙买加[JM]",value:"牙买加"},{id:"JO",name:"约旦[JO]",value:"约旦"},{id:"KZ",name:"哈萨克斯坦[KZ]",value:"哈萨克斯坦"},{id:"KE",name:"肯尼亚[KE]",value:"肯尼亚"},{id:"KI",name:"基里巴斯[KI]",value:"基里巴斯"},{id:"KW",name:"科威特[KW]",value:"科威特"},{id:"KG",name:"吉尔吉斯斯坦[KG]",value:"吉尔吉斯斯坦"},{id:"LA",name:"老挝[LA]",value:"老挝"},{id:"AM",name:"亚美尼亚[AM]",value:"亚美尼亚"},{id:"LV",name:"拉托维亚[LV]",value:"拉托维亚"},{id:"LB",name:"黎巴嫩[LB]",value:"黎巴嫩"},{id:"LS",name:"莱索托[LS]",value:"莱索托"},{id:"LR",name:"利比里亚[LR]",value:"利比里亚"},{id:"LY",name:"利比亚[LY]",value:"利比亚"},{id:"LI",name:"列支敦士登[LI]",value:"列支敦士登"},{id:"LT",name:"立陶宛[LT]",value:"立陶宛"},{id:"LU",name:"卢森堡[LU]",value:"卢森堡"},{id:"AW",name:"阿鲁巴岛[AW]",value:"阿鲁巴岛"},{id:"MG",name:"马达加斯加[MG]",value:"马达加斯加"},{id:"MW",name:"马拉维[MW]",value:"马拉维"},{id:"MY",name:"马来西亚[MY]",value:"马来西亚"},{id:"MV",name:"马尔代夫[MV]",value:"马尔代夫"},{id:"ML",name:"马里[ML]",value:"马里"},{id:"MT",name:"马耳他[MT]",value:"马耳他"},{id:"MR",name:"毛里塔尼亚[MR]",value:"毛里塔尼亚"},{id:"MU",name:"毛里求斯[MU]",value:"毛里求斯"},{id:"MX",name:"墨西哥[MX]",value:"墨西哥"},{id:"MC",name:"摩纳哥[MC]",value:"摩纳哥"},{id:"MN",name:"蒙古[MN]",value:"蒙古"},{id:"MS",name:"蒙特塞拉特[MS]",value:"蒙特塞拉特"},{id:"MA",name:"摩洛哥[MA]",value:"摩洛哥"},{id:"MZ",name:"莫桑比克[MZ]",value:"莫桑比克"},{id:"MM",name:"缅甸[MM]",value:"缅甸"},{id:"NA",name:"纳米比亚[NA]",value:"纳米比亚"},{id:"NR",name:"瑙鲁[NR]",value:"瑙鲁"},{id:"NP",name:"尼泊尔[NP]",value:"尼泊尔"},{id:"NL",name:"荷兰[NL]",value:"荷兰"},{id:"AT",name:"奥地利[AT]",value:"奥地利"},{id:"AN",name:"荷属安的列斯[AN]",value:"荷属安的列斯"},{id:"NI",name:"尼加拉瓜[NI]",value:"尼加拉瓜"},{id:"NE",name:"尼日尔[NE]",value:"尼日尔"},{id:"NG",name:"尼日利亚[NG]",value:"尼日利亚"},{id:"MP",name:"北马里亚纳[MP]",value:"北马里亚纳"},{id:"NO",name:"挪威[NO]",value:"挪威"},{id:"OM",name:"阿曼[OM]",value:"阿曼"},{id:"PK",name:"巴基斯坦[PK]",value:"巴基斯坦"},{id:"PW",name:"帕劳群岛[PW]",value:"帕劳群岛"},{id:"AZ",name:"阿塞拜疆[AZ]",value:"阿塞拜疆"},{id:"PA",name:"巴拿马[PA]",value:"巴拿马"},{id:"PG",name:"巴布亚新几内亚[PG]",value:"巴布亚新几内亚"},{id:"PY",name:"巴拉圭[PY]",value:"巴拉圭"},{id:"PE",name:"秘鲁[PE]",value:"秘鲁"},{id:"PH",name:"菲律宾[PH]",value:"菲律宾"},{id:"PL",name:"波兰[PL]",value:"波兰"},{id:"PT",name:"葡萄牙[PT]",value:"葡萄牙"},{id:"QA",name:"卡塔尔[QA]",value:"卡塔尔"},{id:"MD",name:"摩尔多瓦[MD]",value:"摩尔多瓦"},{id:"BS",name:"巴哈马群岛[BS]",value:"巴哈马群岛"},{id:"RO",name:"罗马尼亚[RO]",value:"罗马尼亚"},{id:"RU",name:"俄罗斯联邦[RU]",value:"俄罗斯联邦"},{id:"RW",name:"卢旺达[RW]",value:"卢旺达"},{id:"SH",name:"圣赫勒拿[SH]",value:"圣赫勒拿"},{id:"KN",name:"圣基茨和尼维斯[KN]",value:"圣基茨和尼维斯"},{id:"LC",name:"圣卢西亚[LC]",value:"圣卢西亚"},{id:"VC",name:"圣文森特和格林纳丁斯[VC]",value:"圣文森特和格林纳丁斯"},{id:"WS",name:"萨摩亚[WS]",value:"萨摩亚"},{id:"SM",name:"圣马力诺[SM]",value:"圣马力诺"},{id:"ST",name:"圣多美和普林西比[ST]",value:"圣多美和普林西比"},{id:"BH",name:"巴林岛[BH]",value:"巴林岛"},{id:"SA",name:"沙特阿拉伯[SA]",value:"沙特阿拉伯"},{id:"SN",name:"塞内加尔[SN]",value:"塞内加尔"},{id:"SC",name:"塞舌尔[SC]",value:"塞舌尔"},{id:"SL",name:"塞拉利昂[SL]",value:"塞拉利昂"},{id:"SG",name:"新加坡[SG]",value:"新加坡"},{id:"SK",name:"斯洛伐克[SK]",value:"斯洛伐克"},{id:"SI",name:"斯洛文尼亚[SI]",value:"斯洛文尼亚"},{id:"SB",name:"所罗门群岛[SB]",value:"所罗门群岛"},{id:"SO",name:"索马里[SO]",value:"索马里"},{id:"ZA",name:"南非[ZA]",value:"南非"},{id:"BD",name:"孟加拉[BD]",value:"孟加拉"},{id:"GS",name:"南乔治亚岛河南桑德韦奇岛[GS]",value:"南乔治亚岛河南桑德韦奇岛"},{id:"ES",name:"西班牙[ES]",value:"西班牙"},{id:"LK",name:"斯里兰卡[LK]",value:"斯里兰卡"},{id:"SD",name:"苏丹[SD]",value:"苏丹"},{id:"SR",name:"苏里南[SR]",value:"苏里南"},{id:"SZ",name:"斯威士兰[SZ]",value:"斯威士兰"},{id:"SE",name:"瑞典[SE]",value:"瑞典"},{id:"CH",name:"瑞士[CH]",value:"瑞士"},{id:"SY ",name:"叙利亚[SY ]",value:"叙利亚"},{id:"BB",name:"巴巴多斯[BB]",value:"巴巴多斯"},{id:"TJ",name:"塔吉克斯坦[TJ]",value:"塔吉克斯坦"},{id:"TH",name:"泰国[TH]",value:"泰国"},{id:"MK",name:"马其顿[MK]",value:"马其顿"},{id:"TG",name:"多哥[TG]",value:"多哥"},{id:"TO",name:"汤加[TO]",value:"汤加"},{id:"TT",name:"特立尼达和多巴哥[TT]",value:"特立尼达和多巴哥"},{id:"TN",name:"突尼斯[TN]",value:"突尼斯"},{id:"TR",name:"土耳其[TR]",value:"土耳其"},{id:"BY",name:"白俄罗斯[BY]",value:"白俄罗斯"},{id:"TM",name:"土库曼斯坦[TM]",value:"土库曼斯坦"},{id:"TC",name:"特克斯和凯科斯群岛[TC]",value:"特克斯和凯科斯群岛"},{id:"TV",name:"图瓦卢[TV]",value:"图瓦卢"},{id:"UG",name:"乌干达[UG]",value:"乌干达"},{id:"UA",name:"乌克兰[UA]",value:"乌克兰"},{id:"AE",name:"阿联酋[AE]",value:"阿联酋"},{id:"TZ",name:"坦桑尼亚[TZ]",value:"坦桑尼亚"},{id:"UY",name:"乌拉圭[UY]",value:"乌拉圭"},{id:"BE",name:"比利时[BE]",value:"比利时"},{id:"UZ",name:"乌兹别克斯坦[UZ]",value:"乌兹别克斯坦"},{id:"VU",name:"瓦努阿图[VU]",value:"瓦努阿图"},{id:"VE",name:"委内瑞拉[VE]",value:"委内瑞拉"},{id:"VN",name:"越南[VN]",value:"越南"},{id:"VG",name:"维尔京群岛[VG]",value:"维尔京群岛"},{id:"EH",name:"西撒哈拉[EH]",value:"西撒哈拉"},{id:"YE",name:"也门[YE]",value:"也门"},{id:"YU",name:"南斯拉夫[YU]",value:"南斯拉夫"},{id:"ZM",name:"赞比亚[ZM]",value:"赞比亚"},{id:"BZ",name:"伯利兹[BZ]",value:"伯利兹"},{id:"ZW",name:"津巴布韦[ZW]",value:"津巴布韦"},{id:"BJ",name:"贝宁[BJ]",value:"贝宁"},{id:"BM",name:"百慕大群岛[BM]",value:"百慕大群岛"},{id:"BT",name:"不丹[BT]",value:"不丹"},{id:"BO",name:"玻利维亚[BO]",value:"玻利维亚"},{id:"BA",name:"波斯尼亚和黑赛哥维那[BA]",value:"波斯尼亚和黑赛哥维那"},{id:"BW",name:"博茨瓦纳[BW]",value:"博茨瓦纳"},{id:"BV",name:"布维岛[BV]",value:"布维岛"},{id:"ARIPO",name:"AP非洲工业产权组织[ARIPO]",value:"AP非洲工业产权组织"},{id:"BR",name:"巴西[BR]",value:"巴西"},{id:"BN",name:"文莱达鲁萨兰国[BN]",value:"文莱达鲁萨兰国"},{id:"BG",name:"保加利亚[BG]",value:"保加利亚"},{id:"BF",name:"布基纳法索[BF]",value:"布基纳法索"},{id:"BI",name:"布隆迪[BI]",value:"布隆迪"},{id:"KH",name:"柬埔寨[KH]",value:"柬埔寨"},{id:"CM",name:"喀麦隆[CM]",value:"喀麦隆"},{id:"CA",name:"加拿大[CA]",value:"加拿大"},{id:"CV",name:"佛得角[CV]",value:"佛得角"},{id:"KY",name:"开曼群岛[KY]",value:"开曼群岛"},{id:"AL",name:"阿尔巴尼亚[AL]",value:"阿尔巴尼亚"},{id:"CF",name:"中非[CF]",value:"中非"},{id:"TD",name:"乍得[TD]",value:"中非"},{id:"CL",name:"智利[CL]",value:"智利"},{id:"CO",name:"哥伦比亚[CO]",value:"哥伦比亚"},{id:"KM",name:"科摩罗[KM]",value:"科摩罗"},{id:"CG",name:"刚果共和国[CG]",value:"刚果共和国"},{id:"CK",name:"库克群岛[CK]",value:"库克群岛"},{id:"CR",name:"哥斯达黎加[CR]",value:"哥斯达黎加"},{id:"CI",name:"科特迪瓦[CI]",value:"科特迪瓦"},{id:"DZ",name:"阿尔及利亚[DZ]",value:"阿尔及利亚"},{id:"HR",name:"克罗地亚[HR]",value:"克罗地亚"},{id:"CU",name:"古巴[CU]",value:"古巴"},{id:"CY",name:"塞浦路斯[CY]",value:"塞浦路斯"},{id:"CZ",name:"捷克[CZ]",value:"捷克"},{id:"KP",name:"朝鲜[KP]",value:"朝鲜"},{id:"DK",name:"丹麦[DK]",value:"丹麦"},{id:"DJ",name:"吉布提[DJ]",value:"吉布提"},{id:"DM",name:"多米尼克[DM]",value:"多米尼克"},{id:"DO",name:"多米尼加共和国[DO]",value:"多米尼加共和国"},{id:"TP",name:"东帝汶[TP]",value:"东帝汶"},{id:"AD",name:"安道尔[AD]",value:"安道尔"},{id:"EC",name:"厄瓜多尔[EC]",value:"厄瓜多尔"},{id:"EG",name:"埃及[EG]",value:"埃及"},{id:"SV",name:"萨尔瓦多[SV]",value:"萨尔瓦多"},{id:"GQ",name:"赤道几内亚[GQ]",value:"赤道几内亚"},{id:"ER",name:"厄立特里亚[ER]",value:"厄立特里亚"},{id:"EE",name:"爱沙尼亚[EE]",value:"爱沙尼亚"},{id:"ET",name:"埃塞尔比亚[ET]",value:"埃塞尔比亚"},{id:"EP",name:"欧洲专利局[EP]",value:"欧洲专利局"},{id:"FK",name:"福克兰群岛(马尔维纳斯群岛)[FK]",value:"福克兰群岛(马尔维纳斯群岛)"},{id:"FO",name:"法罗群岛[FO]",value:"法罗群岛"},{id:"AO",name:"安哥拉[AO]",value:"安哥拉"},{id:"FJ",name:"斐济[FJ]",value:"斐济"},{id:"FI",name:"芬兰[FI]",value:"芬兰"},{id:"GA",name:"加蓬[GA]",value:"加蓬"},{id:"GM",name:"冈比亚[GM]",value:"冈比亚"},{id:"GE",name:"格鲁吉亚[GE]",value:"格鲁吉亚"},{id:"GH",name:"加纳[GH]",value:"加纳"},{id:"GI",name:"直布罗陀[GI]",value:"直布罗陀"},{id:"GR",name:"希腊[GR]",value:"希腊"},{id:"AI",name:"安圭拉岛[AI]",value:"安圭拉岛"},{id:"GL",name:"格陵兰[GL]",value:"格陵兰"},{id:"GD",name:"格林纳达[GD]",value:"格林纳达"},{id:"GT",name:"危地马拉[GT]",value:"危地马拉"},{id:"GN",name:"几内亚[GN]",value:"几内亚"},{id:"GW",name:"几内亚比绍[GW]",value:"几内亚比绍"},{id:"GY",name:"圭亚那[GY]",value:"圭亚那"},{id:"HT",name:"海地[HT]",value:"海地"},{id:"VA",name:"梵蒂冈[VA]",value:"梵蒂冈"},{id:"HN",name:"洪都拉斯[HN]",value:"洪都拉斯"},{id:"AG",name:"安提瓜和巴布达[AG]",value:"安提瓜和巴布达"},{id:"HU",name:"匈牙利[HU]",value:"匈牙利"},{id:"IS",name:"冰岛[IS]",value:"冰岛"},{id:"IN",name:"印度[IN]",value:"印度"},{id:"ID",name:"印度尼西亚[ID]",value:"印度尼西亚"},{id:"IR",name:"伊朗[IR]",value:"伊朗"},{id:"IQ",name:"伊拉克[IQ]",value:"伊拉克"},{id:"IE",name:"爱尔兰[IE]",value:"爱尔兰"},{id:"IL",name:"以色列[IL]",value:"以色列"},{id:"IT",name:"意大利[IT]",value:"意大利"},{id:"WIPO",name:"世界知识产权组织国际局[WIPO]",value:"世界知识产权组织国际局"},{id:"OAPI",name:"非洲知识产权组织[OAPI]",value:"非洲知识产权组织"}]; -------------------------------------------------------------------------------- /static/js/states.json: -------------------------------------------------------------------------------- 1 | [ {zipcode:110000,name:'北京市',child:[{zipcode:"110101",name:"东城区"},{zipcode:"110102",name:"西城区"},{zipcode:"110103",name:"崇文区"},{zipcode:"110104",name:"宣武区"},{zipcode:"110105",name:"朝阳区"},{zipcode:"110106",name:"丰台区"},{zipcode:"110107",name:"石景山区"},{zipcode:"110108",name:"海淀区"},{zipcode:"110109",name:"门头沟区"},{zipcode:"110111",name:"房山区"},{zipcode:"110112",name:"通州区"},{zipcode:"110113",name:"顺义区"},{zipcode:"110114",name:"昌平区"},{zipcode:"110115",name:"大兴区"},{zipcode:"110116",name:"怀柔区"},{zipcode:"110117",name:"平谷区"},{zipcode:"110228",name:"密云县"},{zipcode:"110229",name:"延庆县"}]},{zipcode:440000,name:'广东省',child:[{zipcode:"440300",name:"深圳市"},{zipcode:"440100",name:"广州市"},{zipcode:"440200",name:"韶关市"},{zipcode:"440400",name:"珠海市"},{zipcode:"440500",name:"汕头市"},{zipcode:"440600",name:"佛山市"},{zipcode:"440700",name:"江门市"},{zipcode:"440800",name:"湛江市"},{zipcode:"440900",name:"茂名市"},{zipcode:"441200",name:"肇庆市"},{zipcode:"441300",name:"惠州市"},{zipcode:"441400",name:"梅州市"},{zipcode:"441500",name:"汕尾市"},{zipcode:"441600",name:"河源市"},{zipcode:"441700",name:"阳江市"},{zipcode:"441800",name:"清远市"},{zipcode:"441900",name:"东莞市"},{zipcode:"442000",name:"中山市"},{zipcode:"445100",name:"潮州市"},{zipcode:"445200",name:"揭阳市"},{zipcode:"445300",name:"云浮市"}]},{zipcode:310000,name:'上海市',child:[{zipcode:"310101",name:"黄浦区"},{zipcode:"310103",name:"卢湾区"},{zipcode:"310104",name:"徐汇区"},{zipcode:"310105",name:"长宁区"},{zipcode:"310106",name:"静安区"},{zipcode:"310107",name:"普陀区"},{zipcode:"310108",name:"闸北区"},{zipcode:"310109",name:"虹口区"},{zipcode:"310110",name:"杨浦区"},{zipcode:"310112",name:"闵行区"},{zipcode:"310113",name:"宝山区"},{zipcode:"310114",name:"嘉定区"},{zipcode:"310115",name:"浦东新区"},{zipcode:"310116",name:"金山区"},{zipcode:"310117",name:"松江区"},{zipcode:"310118",name:"青浦区"},{zipcode:"310119",name:"南汇区"},{zipcode:"310120",name:"奉贤区"},{zipcode:"310130",name:"崇明县"}]},{zipcode:120000,name:'天津市',child:[{zipcode:"120101",name:"和平区"},{zipcode:"120102",name:"河东区"},{zipcode:"120103",name:"河西区"},{zipcode:"120104",name:"南开区"},{zipcode:"120105",name:"河北区"},{zipcode:"120106",name:"红桥区"},{zipcode:"120107",name:"塘沽区"},{zipcode:"120108",name:"汉沽区"},{zipcode:"120109",name:"大港区"},{zipcode:"120110",name:"东丽区"},{zipcode:"120111",name:"西青区"},{zipcode:"120112",name:"津南区"},{zipcode:"120113",name:"北辰区"},{zipcode:"120114",name:"武青区"},{zipcode:"120115",name:"宝坻区"},{zipcode:"120116",name:"滨海新区"},{zipcode:"120221",name:"宁河县"},{zipcode:"120223",name:"静海县"},{zipcode:"120225",name:"蓟县"}]},{zipcode:500000,name:'重庆市',child:[{zipcode:"500101",name:"万州区"},{zipcode:"500102",name:"涪陵区"},{zipcode:"500103",name:"渝中区"},{zipcode:"500104",name:"大渡口区"},{zipcode:"500105",name:"江北区"},{zipcode:"500106",name:"沙坪坝区"},{zipcode:"500107",name:"九龙坡区"},{zipcode:"500108",name:"南岸区"},{zipcode:"500109",name:"北碚区"},{zipcode:"500110",name:"万盛区"},{zipcode:"500111",name:"双桥区"},{zipcode:"500112",name:"渝北区"},{zipcode:"500113",name:"巴南区"},{zipcode:"500114",name:"黔江区"},{zipcode:"500115",name:"长寿区"},{zipcode:"500222",name:"綦江县"},{zipcode:"500223",name:"潼南县"},{zipcode:"500224",name:"铜梁县"},{zipcode:"500225",name:"大足县"},{zipcode:"500226",name:"荣昌县"},{zipcode:"500227",name:"壁山县"},{zipcode:"500228",name:"梁平县"},{zipcode:"500229",name:"城口县"},{zipcode:"500230",name:"丰都县"},{zipcode:"500231",name:"垫江县"},{zipcode:"500232",name:"武隆县"},{zipcode:"500233",name:"忠县"},{zipcode:"500234",name:"开县"},{zipcode:"500235",name:"云阳县"},{zipcode:"500236",name:"奉节县"},{zipcode:"500237",name:"巫山县"},{zipcode:"500238",name:"巫溪县"},{zipcode:"500240",name:"石柱土家自治县"},{zipcode:"500241",name:"秀山土家族苗族自治县"},{zipcode:"500242",name:"酉阳土家族苗族自治县"},{zipcode:"500243",name:"彭水苗族土家族自治县"}]},{zipcode:130000,name:'河北省',child:[{zipcode:"130100",name:"石家庄市"},{zipcode:"130200",name:"唐山市"},{zipcode:"130300",name:"秦皇岛市"},{zipcode:"130400",name:"邯郸市"},{zipcode:"130500",name:"邢台市"},{zipcode:"130600",name:"保定市"},{zipcode:"130700",name:"张家口市"},{zipcode:"130800",name:"承德市"},{zipcode:"130900",name:"沧州市"},{zipcode:"131000",name:"廊坊市"},{zipcode:"131100",name:"衡水市"}]},{zipcode:140000,name:'山西省',child:[{zipcode:"140100",name:"太原市"},{zipcode:"140200",name:"大同市"},{zipcode:"140300",name:"阳泉市"},{zipcode:"140400",name:"长治市"},{zipcode:"140500",name:"晋城市"},{zipcode:"140600",name:"朔州市"},{zipcode:"140700",name:"晋中市"},{zipcode:"140800",name:"运城市"},{zipcode:"140900",name:"忻州市"},{zipcode:"141000",name:"临汾市"},{zipcode:"141100",name:"吕梁市"}]},{zipcode:210000,name:'辽宁省',child:[{zipcode:"210100",name:"沈阳市"},{zipcode:"210200",name:"大连市"},{zipcode:"210300",name:"鞍山市"},{zipcode:"210400",name:"抚顺市"},{zipcode:"210500",name:"本溪市"},{zipcode:"210600",name:"丹东市"},{zipcode:"210700",name:"锦州市"},{zipcode:"210800",name:"营口市"},{zipcode:"210900",name:"阜新市"},{zipcode:"211000",name:"辽阳市"},{zipcode:"211100",name:"盘锦市"},{zipcode:"211200",name:"铁岭市"},{zipcode:"211300",name:"朝阳市"},{zipcode:"211400",name:"葫芦岛市"}]}, 2 | {zipcode:220000,name:'吉林省',child:[{zipcode:"220100",name:"长春市"},{zipcode:"220200",name:"吉林市"},{zipcode:"220300",name:"四平市"},{zipcode:"220400",name:"辽源市"},{zipcode:"220500",name:"通化市"},{zipcode:"220600",name:"白山市"},{zipcode:"220700",name:"松原市"},{zipcode:"220800",name:"白城市"},{zipcode:"222400",name:"延边朝鲜族自治州"}]},{zipcode:230000,name:'黑龙江省',child:[{zipcode:"230100",name:"哈尔滨市"},{zipcode:"230200",name:"齐齐哈尔市"},{zipcode:"230300",name:"鸡西市"},{zipcode:"230400",name:"鹤岗市"},{zipcode:"230500",name:"双鸭山市"},{zipcode:"230600",name:"大庆市"},{zipcode:"230700",name:"伊春市"},{zipcode:"230800",name:"佳木斯市"},{zipcode:"230900",name:"七台河市"},{zipcode:"231000",name:"牡丹江市"},{zipcode:"231100",name:"黑河市"},{zipcode:"231200",name:"绥化市"},{zipcode:"232700",name:"大兴安岭地区"}]},{zipcode:320000,name:'江苏省',child:[{zipcode:"320100",name:"南京市"},{zipcode:"320200",name:"无锡市"},{zipcode:"320300",name:"徐州市"},{zipcode:"320400",name:"常州市"},{zipcode:"320500",name:"苏州市"},{zipcode:"320600",name:"南通市"},{zipcode:"320700",name:"连云港市"},{zipcode:"320800",name:"淮安市"},{zipcode:"320900",name:"盐城市"},{zipcode:"321000",name:"扬州市"},{zipcode:"321100",name:"镇江市"},{zipcode:"321200",name:"泰州市"},{zipcode:"321300",name:"宿迁市"}]},{zipcode:330000,name:'浙江省',child:[{zipcode:"330100",name:"杭州市"},{zipcode:"330200",name:"宁波市"},{zipcode:"330300",name:"温州市"},{zipcode:"330400",name:"嘉兴市"},{zipcode:"330500",name:"湖州市"},{zipcode:"330600",name:"绍兴市"},{zipcode:"330700",name:"金华市"},{zipcode:"330800",name:"衢州市"},{zipcode:"330900",name:"舟山市"},{zipcode:"331000",name:"台州市"},{zipcode:"331100",name:"丽水市"}]},{zipcode:340000,name:'安徽省',child:[{zipcode:"340100",name:"合肥市"},{zipcode:"340200",name:"芜湖市"},{zipcode:"340300",name:"蚌埠市"},{zipcode:"340400",name:"淮南市"},{zipcode:"340500",name:"马鞍山市"},{zipcode:"340600",name:"淮北市"},{zipcode:"340700",name:"铜陵市"},{zipcode:"340800",name:"安庆市"},{zipcode:"341000",name:"黄山市"},{zipcode:"341100",name:"滁州市"},{zipcode:"341200",name:"阜阳市"},{zipcode:"341300",name:"宿州市"},{zipcode:"341400",name:"巢湖市"},{zipcode:"341500",name:"六安市"},{zipcode:"341600",name:"亳州市"},{zipcode:"341700",name:"池州市"},{zipcode:"341800",name:"宣城市"}]},{zipcode:350000,name:'福建省',child:[{zipcode:"350100",name:"福州市"},{zipcode:"350200",name:"厦门市"},{zipcode:"350300",name:"莆田市"},{zipcode:"350400",name:"三明市"},{zipcode:"350500",name:"泉州市"},{zipcode:"350600",name:"漳州市"},{zipcode:"350700",name:"南平市"},{zipcode:"350800",name:"龙岩市"},{zipcode:"350900",name:"宁德市"}]}, 3 | {zipcode:360000,name:'江西省',child:[{zipcode:"360100",name:"南昌市"},{zipcode:"360200",name:"景德镇市"},{zipcode:"360300",name:"萍乡市"},{zipcode:"360400",name:"九江市"},{zipcode:"360500",name:"新余市"},{zipcode:"360600",name:"鹰潭市"},{zipcode:"360700",name:"赣州市"},{zipcode:"360800",name:"吉安市"},{zipcode:"360900",name:"宜春市"},{zipcode:"361000",name:"抚州市"},{zipcode:"361100",name:"上饶市"}]}, 4 | {zipcode:370000,name:'山东省',child:[{zipcode:"370100",name:"济南市"},{zipcode:"370200",name:"青岛市"},{zipcode:"370300",name:"淄博市"},{zipcode:"370400",name:"枣庄市"},{zipcode:"370500",name:"东营市"},{zipcode:"370600",name:"烟台市"},{zipcode:"370700",name:"潍坊市"},{zipcode:"370800",name:"济宁市"},{zipcode:"370900",name:"泰安市"},{zipcode:"371000",name:"威海市"},{zipcode:"371100",name:"日照市"},{zipcode:"371200",name:"莱芜市"},{zipcode:"371300",name:"临沂市"},{zipcode:"371400",name:"德州市"},{zipcode:"371500",name:"聊城市"},{zipcode:"371600",name:"滨州市"},{zipcode:"371700",name:"菏泽市"}]}, 5 | {zipcode:410000,name:'河南省',child:[{zipcode:"410100",name:"郑州市"},{zipcode:"410200",name:"开封市"},{zipcode:"410300",name:"洛阳市"},{zipcode:"410400",name:"平顶山市"},{zipcode:"410500",name:"安阳市"},{zipcode:"410600",name:"鹤壁市"},{zipcode:"410700",name:"新乡市"},{zipcode:"410800",name:"焦作市"},{zipcode:"410900",name:"濮阳市"},{zipcode:"411000",name:"许昌市"},{zipcode:"411100",name:"漯河市"},{zipcode:"411200",name:"三门峡市"},{zipcode:"411300",name:"南阳市"},{zipcode:"411400",name:"商丘市"},{zipcode:"411500",name:"信阳市"},{zipcode:"411600",name:"周口市"},{zipcode:"411700",name:"驻马店市"}]}, 6 | {zipcode:420000,name:'湖北省',child:[{zipcode:"420100",name:"武汉市"},{zipcode:"420200",name:"黄石市"},{zipcode:"420300",name:"十堰市"},{zipcode:"420500",name:"宜昌 市"},{zipcode:"420600",name:"襄樊市"},{zipcode:"420700",name:"鄂州市"},{zipcode:"420800",name:"荆门市"},{zipcode:"420900",name:"孝感市"},{zipcode:"421000",name:"荆州市"},{zipcode:"421100",name:"黄冈市"},{zipcode:"421200",name:"咸宁市"},{zipcode:"421300",name:"随州市"},{zipcode:"422800",name:"恩施土家族苗族自治州"},{zipcode:"429000",name:"省直辖行政单位"}]}, 7 | {zipcode:430000,name:'湖南省',child:[{zipcode:"430100",name:"长沙市"},{zipcode:"430200",name:"株洲市"},{zipcode:"430300",name:"湘潭市"},{zipcode:"430400",name:"衡阳市"},{zipcode:"430500",name:"邵阳市"},{zipcode:"430600",name:"岳阳市"},{zipcode:"430700",name:"常德市"},{zipcode:"430800",name:"张家界市"},{zipcode:"430900",name:"益阳市"},{zipcode:"431000",name:"郴州市"},{zipcode:"431100",name:"永州市"},{zipcode:"431200",name:"怀化市"},{zipcode:"431300",name:"娄底市"},{zipcode:"433100",name:"湘西土家族苗族自治州"}]}, 8 | {zipcode:460000,name:'海南省',child:[{zipcode:"460200",name:"三亚市"},{zipcode:"469000",name:"省直辖县级行政单位"}]}, 9 | {zipcode:510000,name:'四川省',child:[{zipcode:"510100",name:"成都市"},{zipcode:"510300",name:"自贡市"},{zipcode:"510400",name:"攀枝花市"},{zipcode:"510500",name:"泸州市"},{zipcode:"510600",name:"德阳市"},{zipcode:"510700",name:"绵阳市"},{zipcode:"510800",name:"广元市"},{zipcode:"510900",name:"遂宁市"},{zipcode:"511000",name:"内江市"},{zipcode:"511100",name:"乐山市"},{zipcode:"511300",name:"南充市"},{zipcode:"511400",name:"眉山市"},{zipcode:"511500",name:"宜宾市"},{zipcode:"511600",name:"广安市"},{zipcode:"511700",name:"达州市"},{zipcode:"511800",name:"雅安市"},{zipcode:"511900",name:"巴中市"},{zipcode:"512000",name:"资阳市"},{zipcode:"513200",name:"阿坝藏族羌族自治州"},{zipcode:"513300",name:"甘孜藏族自治州"},{zipcode:"513400",name:"凉山彝族自治州"}]}, 10 | {zipcode:520000,name:'贵州省',child:[{zipcode:"520100",name:"贵阳市"},{zipcode:"520200",name:"六盘水市"},{zipcode:"520300",name:"遵义市"},{zipcode:"520400",name:"安顺市"},{zipcode:"522200",name:"铜仁地区"},{zipcode:"522300",name:"黔西南布依族苗族自治州"},{zipcode:"522400",name:"毕节地区"},{zipcode:"522600",name:"黔东南苗族侗族自治州"},{zipcode:"522700",name:"黔南布依族苗族自治州"}]}, 11 | {zipcode:530000,name:'云南省',child:[{zipcode:"530100",name:"昆明市"},{zipcode:"530300",name:"曲靖市"},{zipcode:"530400",name:"玉溪市"},{zipcode:"530500",name:"保山市"},{zipcode:"530600",name:"昭通市"},{zipcode:"530700",name:"丽江市"},{zipcode:"530800",name:"思茅市"},{zipcode:"530900",name:"临沧市"},{zipcode:"532300",name:"楚雄彝族自治州"},{zipcode:"532500",name:"红河哈尼族彝族自治州"},{zipcode:"532600",name:"文山壮族苗族自治州"},{zipcode:"532800",name:"西双版纳傣族自治州"},{zipcode:"532900",name:"大理白族自治州"},{zipcode:"533100",name:"德宏傣族景颇族自治州"},{zipcode:"533300",name:"怒江傈僳族自治州"},{zipcode:"533400",name:"迪庆藏族自治州"}]}, 12 | {zipcode:610000,name:'陕西省',child:[{zipcode:"610100",name:"西安市"},{zipcode:"610200",name:"铜川市"},{zipcode:"610300",name:"宝鸡市"},{zipcode:"610400",name:"咸阳市"},{zipcode:"610500",name:"渭南市"},{zipcode:"610600",name:"延安市"},{zipcode:"610700",name:"汉中市"},{zipcode:"610800",name:"榆林市"},{zipcode:"610900",name:"安康市"},{zipcode:"611000",name:"商洛市"}]}, 13 | {zipcode:620000,name:'甘肃省',child:[{zipcode:"620100",name:"兰州市"},{zipcode:"620200",name:"嘉峪关市"},{zipcode:"620300",name:"金昌市"},{zipcode:"620400",name:"白银市"},{zipcode:"620500",name:"天水市"},{zipcode:"620600",name:"武威市"},{zipcode:"620700",name:"张掖市"},{zipcode:"620800",name:"平凉市"},{zipcode:"620900",name:"酒泉市"},{zipcode:"621000",name:"庆阳市"},{zipcode:"621100",name:"定西市"},{zipcode:"621200",name:"陇南市"},{zipcode:"622900",name:"临夏回族自治州"},{zipcode:"623000",name:"甘南藏族自治州"}]}, 14 | {zipcode:630000,name:'青海省',child:[{zipcode:"630100",name:"西宁市"},{zipcode:"632100",name:"海东地区"},{zipcode:"632200",name:"海北藏族自治州"},{zipcode:"632300",name:"黄南藏族自治州"},{zipcode:"632500",name:"海南藏族自治州"},{zipcode:"632600",name:"果洛藏族自治州"},{zipcode:"632700",name:"玉树藏族自治州"},{zipcode:"632800",name:"海西蒙古族藏族自治州"}]}, 15 | {zipcode:150000,name:'内蒙古自治区',child:[{zipcode:"150100",name:"呼和浩特市"},{zipcode:"150200",name:"包头市"},{zipcode:"150300",name:"乌海市"},{zipcode:"150400",name:"赤峰市"},{zipcode:"150500",name:"通辽市"},{zipcode:"150600",name:"鄂尔多斯市"},{zipcode:"150700",name:"呼伦贝尔市"},{zipcode:"150800",name:"巴彦淖尔市"},{zipcode:"150900",name:"乌兰察布市"},{zipcode:"152200",name:"兴安盟"},{zipcode:"152500",name:"锡林郭勒盟"},{zipcode:"152900",name:"阿拉善盟"}]}, 16 | {zipcode:450000,name:'广西壮族自治区',child:[{zipcode:"450100",name:"南宁市"},{zipcode:"450200",name:"柳州市"},{zipcode:"450300",name:"桂林市"},{zipcode:"450400",name:"梧州市"},{zipcode:"450500",name:"北海市"},{zipcode:"450600",name:"防城港市"},{zipcode:"450700",name:"钦州市"},{zipcode:"450800",name:"贵港市"},{zipcode:"450900",name:"玉林市"},{zipcode:"451000",name:"百色市"},{zipcode:"451100",name:"贺州市"},{zipcode:"451200",name:"河池市"},{zipcode:"451300",name:"来宾市"},{zipcode:"451400",name:"崇左市"}]}, 17 | {zipcode:540000,name:'西藏自治区',child:[{zipcode:"540100",name:"拉萨市"},{zipcode:"542100",name:"昌都地区"},{zipcode:"542200",name:"山南地区"},{zipcode:"542300",name:"日喀则地区"},{zipcode:"542400",name:"那曲地区"},{zipcode:"542500",name:"阿里地区"},{zipcode:"542600",name:"林芝地区"}]}, 18 | {zipcode:640000,name:'宁夏回族自治区',child:[{zipcode:"640100",name:"银川市"},{zipcode:"640200",name:"石嘴山市"},{zipcode:"640300",name:"吴忠市"},{zipcode:"640400",name:"固原市"},{zipcode:"640500",name:"中卫市"}]}, 19 | {zipcode:650000,name:'新疆维吾尔自治区',child:[{zipcode:"650100",name:"乌鲁木齐市"},{zipcode:"650200",name:"克拉玛依市"},{zipcode:"652100",name:"吐鲁番地区"},{zipcode:"652200",name:"哈密地区"},{zipcode:"652300",name:"昌吉回族自治州"},{zipcode:"652700",name:"博尔塔拉蒙古自治州"},{zipcode:"652800",name:"巴音郭楞蒙古自治州"},{zipcode:"652900",name:"阿克苏地区"},{zipcode:"653000",name:"克孜勒苏柯尔克孜自治州"},{zipcode:"653100",name:"喀什地区"},{zipcode:"653200",name:"和田地区"},{zipcode:"654000",name:"伊犁哈萨克自治州"},{zipcode:"654200",name:"塔城地区"},{zipcode:"654300",name:"阿勒泰地区"},{zipcode:"659000",name:"省直辖行政单位"}]}, 20 | {zipcode:710000,name:'台湾省',child:[]}, 21 | {zipcode:810000,name:'香港特别行政区',child:[]}, 22 | {zipcode:910000,name:'澳门特别行政区',child:[]}]; -------------------------------------------------------------------------------- /src/components/FormCreate.vue: -------------------------------------------------------------------------------- 1 | 68 | 69 | 366 | 367 | 452 | 487 | -------------------------------------------------------------------------------- /src/formTemplate/change-content-100016.js: -------------------------------------------------------------------------------- 1 | // 变更内容 2 | 3 | import axios from 'axios' 4 | function vm() { 5 | const template = ` 6 |
7 | 新增 8 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 21 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 40 | 41 | 42 | 43 | 44 | 49 | 50 | 51 | 52 | 53 | 58 | 59 | 60 | 61 | 62 | 67 | 68 | 69 | 70 | 84 | 85 | 105 | 106 | 126 | 127 | 147 | 148 | 168 | 169 | 189 | 190 | 210 | 211 | 231 | 239 | 240 | 保存 241 | 242 | 243 | 244 |
245 | `; 246 | const options = { 247 | data () { 248 | return { 249 | extendData: { 250 | applicant: [], 251 | inventor: [], 252 | agency: [], 253 | agent: [], 254 | contact: [], 255 | }, 256 | data: [], 257 | typeArr: [ 258 | {value: 'applicant', label: '申请人'}, 259 | {value: 'inventor', label: '发明人'}, 260 | {value: 'agency', label: '代理机构'}, 261 | {value: 'agent', label: '代理人'}, 262 | {value: 'contact', label: '联系人'}, 263 | ], 264 | leixin: [ 265 | {value: 1, label: '转移'}, 266 | {value: 2, label: '继承'}, 267 | {value: 5, label: '更名'}, 268 | {value: 4, label: '其他'}, 269 | ], 270 | applicant_code: [ 271 | {value: 'gg_zlx_sqr:shifoudbrbz', label: '是否代表人'}, 272 | {value: 'gg_zlx_sqr:shenqingrxm', label: '姓名或名称'}, 273 | {value: 'gg_zlx_sqr:shenqingrywmz', label: '英文名称'}, 274 | {value: 'gg_zlx_sqr:shenqingrlx', label: '申请人类型'}, 275 | {value: 'gg_zlx_sqr:shenqingrzjhm', label: '居民身份证件号码或统一社会信用代码/组织机构代码'}, 276 | {value: 'gg_zlx_sqr:shenqingrgb', label: '国籍或注册国家(地区)'}, 277 | {value: 'gg_zlx_sqr:shenqingrsf', label: '省份'}, 278 | {value: 'gg_zlx_sqr:shenqingrcs', label: '城市'}, 279 | {value: 'gg_zlx_sqr:shenqingryb', label: '邮编'}, 280 | {value: 'gg_zlx_sqr:shenqingrdz', label: '地址'}, 281 | {value: 'gg_zlx_sqr:shenqingrywdz', label: '英文地址'}, 282 | {value: 'gg_zlx_sqr:shenqingrjcjs', label: '经常居所'}, 283 | {value: 'gg_zlx_sqr:shenqingrdh', label: '电话'}, 284 | {value: 'gg_zlx_sqr:shenqingrcz', label: '传真'}, 285 | {value: 'gg_zlx_sqr:shenqingrdzyx', label: '电子邮箱'}, 286 | ], 287 | inventor_code: [ 288 | {value: 'gg_zlx_fmr:famingrxm', label: '发明人姓名'}, 289 | {value: 'gg_zlx_fmr:famingrywm', label: '发明人英文名'}, 290 | {value: 'gg_zlx_fmr:famingegb', label: '发明人国别'}, 291 | {value: 'gg_zlx_fmr:famingrzjlx', label: '发明人证件类型'}, 292 | {value: 'gg_zlx_fmr:famingrzjhm', label: '发明人证件号码'}, 293 | {value: 'gg_zlx_fmr:bugongkbz', label: '不公开标志'}, 294 | ], 295 | agency_code: [ 296 | {value: 'gg_zlx_zldl:dailijgmc', label: '代理机构名称'}, 297 | {value: 'gg_zlx_zldl:dailijgdm', label: '代理机构代码'}, 298 | {value: 'gg_zlx_zldl:daililx', label: '代理类型'}, 299 | ], 300 | agent_code: [ 301 | {value: 'gg_zlx_zldl:diyidlrgzzh', label: '第一代理人工作证号'}, 302 | {value: 'gg_zlx_zldl:diyidlrxm', label: '第一代理人姓名'}, 303 | {value: 'gg_zlx_zldl:diyidlrdh', label: '第一代理人电话'}, 304 | {value: 'gg_zlx_zldl:dierdlrgzzh', label: '第二代理人工作证号'}, 305 | {value: 'gg_zlx_zldl:dierdlrxm', label: '第二代理人姓名'}, 306 | {value: 'gg_zlx_zldl:dierdlrdh', label: '第二代理人电话'}, 307 | ], 308 | contact_code: [ 309 | {value: 'gg_zlx_lxr:lianxirxm', label: '联系人姓名'}, 310 | {value: 'gg_zlx_lxr:lianxirdh', label: '联系人邮编'}, 311 | {value: 'gg_zlx_lxr:lianxiryb', label: '联系人地址'}, 312 | {value: 'gg_zlx_lxr:lianxirdz', label: '联系人电话'}, 313 | {value: 'gg_zlx_lxr:lianxircz', label: '联系人传真'}, 314 | ], 315 | applicant_type: [ 316 | {value: 3, label: '工矿企业'}, 317 | {value: 1, label: '大专院校'}, 318 | {value: 2, label: '科研单位'}, 319 | {value: 4, label: '事业单位'}, 320 | {value: 5, label: '个人'}, 321 | ], 322 | certificate_type: [ 323 | {value: 0, label: '身份证'}, 324 | {value: 1, label: '户口簿'}, 325 | {value: 2, label: '护照'}, 326 | {value: 3, label: '军官证'}, 327 | {value: 4, label: '士兵证'}, 328 | {value: 5, label: '港澳居民往来内地通行证'}, 329 | {value: 6, label: '台湾同胞来往内地通行证'}, 330 | {value: 7, label: '临时身份证'}, 331 | {value: 8, label: '外国人居住证'}, 332 | {value: 9, label: '警官证'}, 333 | {value: 10, label: '港澳台身份证'}, 334 | {value: 11, label: '回乡证'}, 335 | {value: 12, label: '驾驶证'}, 336 | {value: 13, label: '其他证件'}, 337 | {value: 14, label: '营业执照号'}, 338 | {value: 15, label: '法人代码证'}, 339 | ], 340 | closedMark_type: [ 341 | {value: '', label: '无'}, 342 | {value: '0', label: '公开'}, 343 | {value: '1', label: '不公开'}, 344 | ], 345 | agency_type: [ 346 | {value: '无代理', label: '无代理'}, 347 | {value: '全程代理', label: '全程代理'}, 348 | {value: '半程代理', label: '半程代理'}, 349 | ], 350 | 351 | area_type: [], 352 | province_type: [], 353 | city_type: [], 354 | form: { 355 | type: '', 356 | code: '', 357 | before_code: '', 358 | after_code: '', 359 | leixin: '', 360 | field: '', 361 | no: '', 362 | }, 363 | pos: 0, 364 | spanArr: [], 365 | isVisible: false, 366 | handleCode: new Map([['gg_zlx_sqr:shenqingrlx', 'applicant_type'], ['gg_zlx_sqr:shenqingrgb', 'area_type'], ['gg_zlx_sqr:shenqingrsf', 'province_type'], ['gg_zlx_sqr:shenqingrcs', 'city_type'], ['gg_zlx_fmr:famingegb', 'area_type'], ['gg_zlx_fmr:famingrzjlx', 'certificate_type'], ['gg_zlx_fmr:bugongkbz', 'closedMark_type'], ['gg_zlx_zldl:daililx', 'agency_type']]), 367 | rules:{ 368 | before_code:[{ required: true, message: '请输入', trigger: 'blur' },], 369 | after_code:[{ required: true, message: '请输入', trigger: 'blur' },], 370 | code:[{ required: true, message: '请选择变更项目', trigger: 'blur' },], 371 | } 372 | } 373 | }, 374 | computed: { 375 | itemArr: function () { 376 | let arr = [] 377 | switch (this.form.type) { 378 | case 'applicant': 379 | arr = this.applicant_code 380 | break 381 | case 'inventor': 382 | arr = this.inventor_code 383 | break 384 | case 'agency': 385 | arr = this.agency_code 386 | break 387 | case 'agent': 388 | arr = this.agent_code 389 | break 390 | case 'contact': 391 | arr = this.contact_code 392 | break 393 | } 394 | return arr 395 | }, 396 | serialLabel: function () { 397 | let str = '申请人序号' 398 | if (this.form.type === 'applicant') { 399 | str = '申请人序号' 400 | } else if (this.form.type === 'inventor') { 401 | str = '发明人序号' 402 | } 403 | return str 404 | } 405 | }, 406 | methods: { 407 | controlDialog (c) { 408 | this.isVisible = c === 'block' ? true : false 409 | const parent = document.getElementsByClassName('change_content_dialog')[0].parentNode 410 | parent.style.display = c 411 | }, 412 | mergeData () { 413 | this.data.sort(function (a, b) { 414 | return a.type.localeCompare(b.type) 415 | }) 416 | this.getSpanArr(this.data) 417 | }, 418 | deleteRow (index) { 419 | let remove = this.data.splice(index, 1); 420 | console.log(remove); 421 | this.mergeData() 422 | }, 423 | add () { 424 | this.controlDialog("block"); 425 | }, 426 | changeType (val) { 427 | //console.log(val) 428 | }, 429 | save () { 430 | this.$refs.form.validate((valid)=>{ 431 | if(valid) { 432 | let type = this.form.type 433 | let code = this.form.code 434 | this.form.field = this.getField({type, code}) 435 | this.form.before = this.getField({target: code, code: this.form.before_code}) 436 | this.form.after = this.getField({target: code, code: this.form.after_code}) 437 | this.extendData[this.form.type].push(this.form) 438 | this.data.push(this.convertData(this.form)); 439 | this.mergeData(); 440 | this.controlDialog("none"); 441 | }else { 442 | this.$message({type:"warning",message:"请填写完整"}) 443 | } 444 | }) 445 | 446 | }, 447 | convertData (source) { 448 | let table_data_type; 449 | this.typeArr.forEach((item) => { 450 | if (item.value === source.type) { 451 | table_data_type = item.label 452 | } 453 | }) 454 | return { 455 | type: table_data_type, 456 | item: `${table_data_type}${source.field}`, 457 | before: source.before, 458 | after: source.after 459 | } 460 | }, 461 | getField ({type, code, target = ''}) { 462 | let arr = !target ? this[`${type}_code`] : this[this.handleCode.get(target)] 463 | if (!arr) { 464 | return code 465 | } 466 | let obj = arr.filter((item) => { 467 | let mark = item.id ? item.id : item.value; 468 | mark = !mark ? item.zipcode : mark; 469 | if (code === mark) { 470 | return true 471 | } 472 | })[0] 473 | return obj.label ? obj.label : obj.name 474 | }, 475 | 476 | cellMerge ({row, column, rowIndex, columnIndex}) { 477 | if (columnIndex === 0) { 478 | const _row = this.spanArr[rowIndex] 479 | const _col = _row > 0 ? 1 : 0 480 | return { 481 | rowspan: _row, 482 | colspan: _col 483 | } 484 | } 485 | }, 486 | getSpanArr (data) { 487 | this.spanArr = [] 488 | for (var i = 0; i < data.length; i++) { 489 | if (i === 0) { 490 | this.spanArr.push(1) 491 | this.pos = 0 492 | } else { 493 | if (data[i].type === data[i - 1].type) { 494 | this.spanArr[this.pos] += 1 495 | this.spanArr.push(0) 496 | } else { 497 | this.spanArr.push(1) 498 | this.pos = i 499 | } 500 | } 501 | } 502 | }, 503 | }, 504 | 505 | created () { 506 | for (let key in this.extendData) { 507 | if (this.extendData.hasOwnProperty(key)) { 508 | this.extendData[key].forEach((item) => { 509 | this.data.push(this.convertData(item)); 510 | }) 511 | } 512 | } 513 | this.mergeData() 514 | const url = '/static/js/area.json' 515 | axios.get(url).then(response => { 516 | this.area_type = eval(`${response.data}`) 517 | }) 518 | axios.get('/static/js/states.json').then(response => { 519 | this.province_type = eval(`${response.data}`) 520 | this.province_type.forEach((item) => { 521 | item.child.forEach((i) => { 522 | this.city_type.push(i) 523 | }) 524 | }) 525 | }) 526 | }, 527 | watch: { 528 | 'form.type': function (val, oldVal) { 529 | this.form.code = null 530 | this.form.before_code = null 531 | this.form.after_code = null 532 | }, 533 | 'form.code': function (val, oldVal) { 534 | this.form.before_code = null 535 | this.form.after_code = null 536 | } 537 | }, 538 | }; 539 | return { 540 | custom: true, 541 | vm: options, 542 | template: template, 543 | label: "变更内容", 544 | field: "__cc", 545 | }; 546 | } 547 | 548 | export {vm} -------------------------------------------------------------------------------- /src/lib/form-create.min.js: -------------------------------------------------------------------------------- 1 | /*! form-create v1.4 | github https://github.com/xaboy/form-create | author xaboy */ 2 | !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("formCreate",[],t):"object"==typeof exports?exports.formCreate=t():e.formCreate=t()}("undefined"!=typeof self?self:this,function(){return function(e){function t(i){if(n[i])return n[i].exports;var r=n[i]={i:i,l:!1,exports:{}};return e[i].call(r.exports,r,r.exports,t),r.l=!0,r.exports}var n={};return t.m=e,t.c=n,t.d=function(e,n,i){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:i})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=10)}([function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r=[].concat,o=Object.assign,a=Object.prototype.toString,s=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"Missing parameter";throw new Error(e)},u=function(e){return"[object Date]"===a.call(e)},l=function(e){return"[object Object]"===a.call(e)},c=function(e){return"[object Function]"===a.call(e)},d=function(e){return"[object String]"===a.call(e)},f=function(e){return"[object Boolean]"===a.call(e)},h=Array.isArray,p=function(e){return e.replace(/([A-Z])/g,"-$1").toLowerCase()},m=function(e){return""!==e&&!isNaN(parseFloat(e))&&isFinite(e)},v=function(e){return h(e)?e:[e]},g=function(e){return h(e)?e[0]||"":e},y=function(e){return"object"===(void 0===e?"undefined":i(e))&&null!==e&&1===e.nodeType&&!l(e)},b=function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=!1;for(var r in n)if(Object.prototype.hasOwnProperty.call(n,r)){var o=n[r];if((i=h(o))||l(o)){var a=void 0===t[r];i?(i=!1,a&&(t[r]=[])):a&&(t[r]={}),e(t[r],o)}else t[r]=o}return t},k=0,_=function(){return++k},w=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Date,n={"M+":t.getMonth()+1,"d+":t.getDate(),"h+":t.getHours(),"m+":t.getMinutes(),"s+":t.getSeconds(),"q+":Math.floor((t.getMonth()+3)/3),S:t.getMilliseconds()};/(y+)/.test(e)&&(e=e.replace(RegExp.$1,(t.getFullYear()+"").substr(4-RegExp.$1.length)));for(var i in n)new RegExp("("+i+")").test(e)&&(e=e.replace(RegExp.$1,1==RegExp.$1.length?n[i]:("00"+n[i]).substr((""+n[i]).length)));return e};t.concat=r,t.assign=o,t.toString=a,t.throwIfMissing=s,t.isPlainObject=l,t.isDate=u,t.isFunction=c,t.isString=d,t.isArray=h,t.deepExtend=b,t.isElement=y,t.uniqueId=_,t.dateFormat=w,t.isNumeric=m,t.isBool=f,t.ATS=g,t.TA=v,t.toLine=p},function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var r=n(6),o=i(r),a=n(4),s=i(a),u=n(0),l=function(e){var t=function(e,t,n){c.call(this,e,t,n)};return t.prototype=Object.create(c.prototype),Object.assign(t.prototype,e),t.prototype.constructor=t,t},c=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};this.handler=t,this.options=n,this.vm=e,this.cvm=o.default.instance(e.$createElement),this.event=t.rule.event,this.init()};c.prototype={props:s.default.instance(),init:function(){this.handler.rule=Object.assign(this.handler.rule,{ref:this.handler.refName,key:"fco"+(0,u.uniqueId)()})},parse:function(){var e=this,t=this.handler,n=t.type,i=t.rule,r=t.childrenHandlers;return"__tmp"===i.type?[this.vm.constructor.super.compile(i.template,{}).render.call(i._vm||this.vm)]:[this.cvm.make(n,Object.assign({},i),function(){var t=[];return r.length>0&&(t=r.map(function(t){return e.parse.call(t.render)})),t})]},inputProps:function(){var e=this,t=this.handler,n=t.refName,i=t.unique,r=t.field,o=t.rule.props,a=t.rule.attrs;return this.props.props(Object.assign(o,{model:"cptData."+r,value:this.vm.cptData[r],elementId:i})).attrs(a||{}).ref(n).key("fip"+i).on(this.event).on("input",function(t){e.vm.$emit("input",t),e.vm.$set(e.vm.cptData,r,t)})}},t.default=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(0),r=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=function(e,t){o.call(this,e,t)};return t.prototype=Object.create(o.prototype),Object.assign(t.prototype,e),t.prototype.constructor=t,t},o=function(e,t){var n=t.model,r=t.field,o=t.type,a=t.validate,s=void 0===a?[]:a,u=t.event,l=void 0===u?{}:u,c=t.value,d=void 0===c?"":c,f=t.col,h=void 0===f?{}:f,p=t.emit,m=void 0===p?[]:p,v=t.props,g=void 0===v?{}:v;r=r.toString(),this.type=o,this.model=n,this.value=d,(0,i.isNumeric)(h)?h={span:h}:void 0===h.span&&(h.span=24),g&&void 0===g.hidden&&(g.hidden=!1),g&&void 0===g.visibility&&(g.visibility=!1),t.event=Object.keys(l).reduce(function(e,t){return e[""+t]=l[t],e},{}),m.forEach(function(n){t.event["on-"+n]=function(){for(var t=arguments.length,o=Array(t),a=0;a0&&void 0!==arguments[0]?arguments[0]:"").toString()},toTrueValue:function(e){return e},setValue:function(e){this.vm.changeTrueData(this.field,e)},getValue:function(){return this.vm.getTrueDataValue(this.field)},setParseValue:function(e){this.setValue(this.toTrueValue(e))},watchTrueValue:function(e){this.vm.changeFormData(this.field,this.toParseValue(e))},mounted:function(){},mounted_:function(){this.el=this.vm.$refs[this.refName],this.mounted()}},t.default=r},function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.iviewConfig=t._init=t.componentCommon=t.getMaker=t.timeStampToDate=t.getGlobalApi=t.formCreateStyle=t.getConfig=t.getComponent=void 0;var r=n(0),o=n(2),a=i(o),s=n(1),u=i(s),l=n(7),c=i(l),d=n(26),f=i(d),h=function(){var e={_v:2,resetBtnType:"ghost",resetBtnIcon:"refresh",submitBtnIcon:"ios-upload",fileIcon:"document-text",fileUpIcon:"folder",imgUpIcon:"camera"},t={_v:3,resetBtnType:"default",resetBtnIcon:"md-refresh",submitBtnIcon:"ios-share",fileIcon:"md-document",fileUpIcon:"ios-folder-open",imgUpIcon:"md-images"};return"undefined"==typeof iview?e:iview.version&&3==iview.version.split(".")[0]?t:e}(),p=function(e,t,n){var i=t.type.toLowerCase(),r=void 0===c.default[i]?m():c.default[i],o=new r.handler(e,t);return o.render=new r.render(e,o,n),o.noValue=r.noValue,o},m=function(){return{handler:(0,a.default)({}),render:(0,u.default)({}),noValue:!0}},v=function(){return{el:null,form:{inline:!1,labelPosition:"right",labelWidth:"",showMessage:!0,autocomplete:"off"},row:{gutter:0,type:void 0,align:"middle",justify:void 0,className:void 0},upload:{beforeUpload:function(){},onProgress:function(e,t,n){},onSuccess:function(e,t,n){},onError:function(e,t,n){},onPreview:function(e){},onRemove:function(e,t){},onFormatError:function(e,t){},onExceededSize:function(e,t){},handleIcon:"ios-eye-outline",allowRemove:!0},onSubmit:function(e){},submitBtn:{type:"primary",size:"large",shape:void 0,long:!0,htmlType:"button",disabled:!1,icon:h.submitBtnIcon,innerText:"提交",loading:!1,show:!0},resetBtn:{type:h.resetBtnType,size:"large",shape:void 0,long:!0,htmlType:"button",disabled:!1,icon:h.resetBtnIcon,innerText:"重置",loading:!1,show:!1},mounted:function(){}}},g=function(e){var t=e.vm;return{formData:function(){var t={};return e.fields().map(function(n){n=n.toString(),t[n]=e.handlers[n].getValue()}),t},getValue:function(t){t=t.toString();var n=e.handlers[t];if(void 0!==n)return n.getValue();console.error(t+" 字段不存在!")},changeField:function(n,i){n=n.toString();var o=e.handlers[n];void 0===o?console.error(n+" 字段不存在!"):(0,r.isFunction)(i)?i(t.getTrueData(n),function(e){o.setValue(e)}):o.setValue(i)},removeField:function(t){e.removeField(t.toString())},validate:function(t,n){e.getFormRef().validate(function(e){!0===e?t&&t():n&&n()})},validateField:function(t,n){e.getFormRef().validateField(t.toString(),n)},resetFields:function(){e.getFormRef().resetFields(),t.$nextTick(function(){e.getFormRef().resetFields()})},destroy:function(){t.$el.parentNode.removeChild(t.$el),t.$destroy()},fields:function(){return e.fields()},append:function(t,n){e.append(t,n,!1)},prepend:function(t,n){e.append(t,n,!0)},submit:function(t){var n=this;this.validate(function(){var i=n.formData();(0,r.isFunction)(t)?t(i):e.options.onSubmit&&e.options.onSubmit(i)})},hidden:function(t){var n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=e.vm;t?(0,r.isArray)(t)||(t=[t]):t=this.fields(),t.forEach(function(e){i.$set(i.trueData[e].rule.props,"hidden",!!n)})},visibility:function(t){var n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=e.vm;t?(0,r.isArray)(t)||(t=[t]):t=this.fields(),t.forEach(function(e){i.$set(i.trueData[e].rule.props,"visibility",!!n)})},model:function(t){var n={};return t?(0,r.isArray)(t)||(t=[t]):t=this.fields(),t.forEach(function(t){var i=e.handlers[t];if(!i)throw new Error(t+"字段不存在");i.model=function(e){n[t]=e},i.model(i.vm.getTrueData(t))}),n},bind:function(t){var n={},i=e.vm;return t?(0,r.isArray)(t)||(t=[t]):t=this.fields(),t.forEach(function(e){n[e]=i.trueData[e].value,Object.defineProperty(n,e,{get:function(){return i.trueData[e].value},set:function(t){i.$set(i.trueData[e],"value",t)},enumerable:!0,configurable:!0})}),n},submitStatus:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=(0,r.deepExtend)(Object.create(null),e);t.changeButtonProps(n)},resetStatus:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=(0,r.deepExtend)(Object.create(null),e);t.changeResetProps(n)},btn:{loading:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];t.changeButtonProps({loading:e})},finish:function(){this.loading(!1)},disabled:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];t.changeButtonProps({disabled:e})}},resetBtn:{loading:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];t.changeResetProps({loading:e})},finish:function(){this.loading(!1)},disabled:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];t.changeResetProps({disabled:e})}},closeModal:function(){t.$Modal.remove()},set:function(e,n,i){t.$set(e,n,i)},reload:function(t){e.reload(t)}}},y=function(e){if((0,r.isDate)(e))return e;var t=new Date(e);return"Invalid Date"===t.toString()?e:t},b=function(){return f.default},k={data:function(){return{rules:{},cptData:{},buttonProps:{},resetProps:{},trueData:{},jsonData:{},$f:{},isShow:!0,watchs:[]}},methods:{changeFormData:function(e,t){this.$set(this.cptData,e,t)},changeTrueData:function(e,t){this.$set(this.trueData[e],"value",t)},getTrueDataValue:function(e){return this.trueData[e].value},getTrueData:function(e){return this.trueData[e]},getFormData:function(e){return this.cptData[e]},removeFormData:function(e){this.$delete(this.cptData,e),this.$delete(this.trueData,e),this.$delete(this.jsonData,e)},changeButtonProps:function(e){this.$set(this,"buttonProps",Object.assign(this.buttonProps,e))},changeResetProps:function(e){this.$set(this,"resetProps",Object.assign(this.resetProps,e))},setField:function(e){this.$set(this.cptData,e,""),this.$set(this.trueData,e,{})},init:function(){var e=this,t=this.fComponent._type;this[t].forEach(function(n,i){var r=e.$watch(t+"."+i+".value",function(t){if(void 0===e.trueData[n.field])return r();e.$set(e.trueData[n.field],"value",t)});e.watchs.push(r)}),this.$watch(t,function(t){e.fComponent.reload(t)})},unWatch:function(){this.watchs.forEach(function(e){return e()}),this.watchs=[]}}},_=function(){Object.assign||(Object.assign=function(e){for(var t=1;t.ivu-icon{vertical-align: middle;}.fc-files img{width:100%;height:100%;display:inline-block;vertical-align: top;}.fc-upload .ivu-upload{display: inline-block;}.fc-upload-btn{border: 1px dashed #dddee1;}.el-date-editor.el-input{width:100%}.el-radio{display:block}.el-select{width:100%}.el-radio__label,.el-checkbox__label{line-height: 36px}.el-radio .el-input,.el-checkbox .el-input{width: auto}.el-radio .el-input .el-input__inner,.el-checkbox .el-input .el-input__inner{height: 30px}.el-radio+.el-radio{margin-left:0;margin-top:6px}.fc-upload .fc-upload-cover{ display: none; position: absolute; top: 0; bottom: 0; left: 0; right: 0; background: rgba(0,0,0,.6); }.fc-upload .fc-upload-cover i{ color: #fff; font-size: 20px; cursor: pointer; margin: 0 2px; }.fc-files:hover .fc-upload-cover{ display: block; }.fc-upload .ivu-upload-list-file{ display: inline-block;float: left; }.fc-upload .ivu-upload-list{ position: absolute;left: 0; }.fc-spin-icon-load{animation: ani-fc-spin 1s linear infinite;} @-webkit-keyframes ani-fc-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}50%{-webkit-transform:rotate(180deg);transform:rotate(180deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@keyframes ani-fc-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}50%{-webkit-transform:rotate(180deg);transform:rotate(180deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}",t.getGlobalApi=g,t.timeStampToDate=y,t.getMaker=b,t.componentCommon=k,t._init=_,t.iviewConfig=h},function(e,t,n){"use strict";function i(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t0&&void 0!==arguments[0]?arguments[0]:(0,r.throwIfMissing)("缺少参数:classList"),n=arguments[1];return(0,r.isArray)(t)?t.map(function(t){e._data.class[t.toString()]=!0}):(0,r.isPlainObject)(t)?this._data.class=(0,r.assign)({},this._data.class,t):this._data.class[t.toString()]=void 0===n||n,this},directives:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:(0,r.throwIfMissing)("缺少参数:directives");return this._data.directives=r.concat.call.apply(r.concat,i(this._data.directives).concat(i(e))),this},init:function(){this._data=this._initData()},get:function(){return this._prev=this._data,this.init(),this._prev},getPrev:function(){return this._prev}};var s=["ref","key","slot"],u=["scopedSlots","nativeOn","on","domProps","props","attrs","style"];s.forEach(function(e){o.prototype[e]=function(t){return this._data[e]=t,this}}),u.forEach(function(e){o.prototype[e]=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:(0,r.throwIfMissing)("缺少参数:"+e),n=arguments[1];return(0,r.isPlainObject)(t)?this._data[e]=(0,r.assign)(this._data[e],t):this._data[e][t.toString()]=n,this}}),t.default=o},function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var r=n(0),o=n(3),a=n(28),s=i(a),u=n(29),l=i(u),c=n(9),d=n(1),f=(i(d),(0,o.getMaker)());(0,o._init)();var h=function e(t,n){!this instanceof e&&throwIfMissing("formCreate is a constructor and should be called with the `new` keyword"),(0,r.isBool)(n.sumbitBtn)&&(n.sumbitBtn={show:n.sumbitBtn}),(0,r.isBool)(n.resetBtn)&&(n.resetBtn={show:n.resetBtn});var i=(0,r.deepExtend)((0,o.getConfig)(),n);i.el=i.el?(0,r.isElement)(i.el)?i.el:document.querySelector(i.el):window.document.body,this.options=i,this.initCreate(t)};h.maker=f,h.version="1.4.6";var p=function(){if(null===document.getElementById("form-create-style")){var e=document.createElement("style");e.id="form-create-style",e.innerText=o.formCreateStyle,document.getElementsByTagName("head")[0].appendChild(e)}};h.create=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:window.Vue,i=(0,r.isElement)(t)?{el:t}:t,o=new h(e,i);o.create(n);return o.fCreateApi},h.install=function(e){p(),e.prototype.$formCreate=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return h.create(t,n,e)},e.prototype.$formCreate.version="1.4.6",e.prototype.$formCreate.maker=f,e.component(c.formCreateName,(0,c.$FormCreate)())},h.prototype={setHandler:function(e){var t=e.rule,n=e.field;this.handlers[n]=e,!0!==e.noValue&&(this.formData[n]=e.toParseValue(e.value),this.validate[n]=t.validate,this.trueData[n]={value:e.toTrueValue(this.formData[n]),rule:e.rule})},notField:function(e){return-1===this.fieldList.indexOf(e)},createHandler:function(){var e=this;this.rules.filter(function(e){return void 0!==e.type||void 0!==e.field}).forEach(function(t){if(t.field=void 0===t.field?"":t.field,e.notField(t.field.toString())){var n=(0,o.getComponent)(e.vm,t,e.options);e.createChildren(n),e.setHandler(n),e.fieldList.push(n.field)}else console.error(t.field+" 字段已存在")})},createChildren:function(e){var t=this;e.childrenHandlers=[],(0,r.isArray)(e.rule.children)&&e.rule.children.length>0&&e.rule.children.map(function(n){if((0,r.isFunction)(n.getRule)&&(n=n.getRule()),n.field=void 0===n.field?"":n.field,t.notField(n.field.toString())){var i=(0,o.getComponent)(t.vm,n,t.options);t.createChildren(i),e.childrenHandlers.push(i)}else console.error(n.field+" 字段已存在")})},initCreate:function(e){var t=this;this.rules=Array.isArray(e)?e:[],this.handlers={},this.fRender={},this.formData={},this.validate={},this.trueData={},this.fieldList=[],this.rules.forEach(function(e,n){(0,r.isFunction)(e.getRule)&&(t.rules[n]=e.getRule())})},init:function(e){this.vm=e,this.createHandler(),this.fCreateApi=(0,o.getGlobalApi)(this),e.$set(e,"cptData",this.formData),e.$set(e,"trueData",this.trueData),e.$set(e,"buttonProps",this.options.submitBtn),e.$set(e,"resetProps",this.options.resetBtn),e.$set(e,"rules",this.rules),this.fRender=new s.default(this)},create:function(e){var t=e.extend(this.component()),n=(new t).$mount();return this.options.el.appendChild(n.$el),n},mounted:function(e){var t=this;this.vm=e,e.$nextTick(function(){Object.keys(e.cptData).map(function(n){var i=t.handlers[n];i.model&&i.model(e.getTrueData(n)),t.addHandlerWatch(i),i.mounted_()}),t.options.mounted&&t.options.mounted()})},component:function(){return(0,l.default)(this)},append:function(e,t,n){if((0,r.isFunction)(e.getRule)&&(e=e.getRule()),-1!==Object.keys(this.handlers).indexOf(e.field.toString()))throw new Error(e.field+"字段已存在");var i=(0,o.getComponent)(this.vm,e,this.options);this.createChildren(i),this.vm.setField(i.field),this.fRender.setRender(i,t||"",n),this.setHandler(i),this.addHandlerWatch(i),this.vm.$nextTick(function(){i.mounted_()})},removeField:function(e){if(void 0===this.handlers[e])throw new Error(e+"字段不存在");this.handlers[e].watch&&this.handlers[e].watch.forEach(function(e){return e()}),this.vm.removeFormData(e),delete this.handlers[e],delete this.validate[e],this.fRender.removeRender(e),delete this.formData[e],delete this.trueData[e]},addHandlerWatch:function(e){var t=this;if(!0!==e.noValue){var n=e.field,i=this.vm.$watch("cptData."+n,function(r,o){void 0!==t.handlers[n]?e.setParseValue(r):i()},{deep:!0}),r=this.vm.$watch("trueData."+n+".value",function(i,o){if(void 0!==i)if(void 0!==t.handlers[n]){var a=JSON.stringify(i);t.vm.jsonData[n]!==a&&(t.vm.jsonData[n]=a,e.model&&e.model(t.vm.getTrueData(n)),e.watchTrueValue(i),e.rule.value=i)}else r()},{deep:!0});e.watch=[i,r]}},reload:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.rules;this.vm.unWatch(),Object.keys(this.handlers).forEach(function(t){return e.removeField(t)}),this.vm.isShow=!1,this.initCreate(t),this.init(this.vm),this.fRender.parse(this.vm),this.vm.init(),this.vm.$nextTick(function(){e.vm.isShow=!0,setTimeout(function(){return e.mounted(e.vm)})})},getFormRef:function(){return this.vm.$refs[this.fRender.refName]},fields:function(){return Object.keys(this.formData)}},t.default=h},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=n(0),r=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:(0,i.throwIfMissing)("缺少参数:createElement");this.$h=e},o=null,a=null;r.instance=function(e){return!1==o instanceof r&&(o=new r(e)),o},r.setVm=function(e){a=e},r.clearVm=function(){a=null},r.prototype={make:function(e,t,n){(0,i.isString)(t)&&(t={domProps:{innerHTML:t}});var r=this.$h(e,t,this.getVNode(n));return null!==a&&(r.context=a),r},getVNode:function(e){return(0,i.isFunction)(e)?e():e||[]}};var s={modal:"Modal",progress:"el-progress",button:"el-button",icon:"i",span:"span",slider:"el-slider",rate:"el-rate",upload:"el-upload",cascader:"el-cascader",colorPicker:"el-color-picker",timePicker:"el-time-select",datePicker:"el-date-picker",switch:"el-switch",option:"el-option",select:"el-select",checkbox:"el-checkbox",checkboxGroup:"el-checkbox-group",radio:"el-radio",radioGroup:"el-radio-group",inputNumber:"el-input-number",input:"el-input",formItem:"el-form-item",form:"el-form",col:"el-col",row:"el-row",tree:"el-tree"};Object.keys(s).forEach(function(e){r.prototype[e]=function(t,n){return this.make(s[e],t,n)}}),t.default=r},function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var r=n(11),o=i(r),a=n(12),s=i(a),u=n(13),l=i(u),c=n(14),d=i(c),f=n(15),h=i(f),p=n(16),m=i(p),v=n(17),g=i(v),y=n(18),b=i(y),k=n(19),_=i(k),w=n(20),O=i(w),P=n(8),D=i(P),V=n(21),j=i(V),x=n(22),M=i(x),S=n(23),C=i(S),I=n(24),T=i(I),F=n(25),$=i(F),A={hidden:o.default,input:s.default,radio:l.default,checkbox:d.default,switch:h.default,select:m.default,datepicker:g.default,timepicker:b.default,inputnumber:_.default,colorpicker:O.default,upload:D.default,cascader:j.default,rate:M.default,slider:C.default,frame:T.default,tree:$.default};t.default=A},function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function r(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);tthis.vm.cptData[this.handler.field].length)),[this.cvm.make("div",{key:"div4"+i,class:{"fc-upload":!0}},a)]},makeUploadView:function(e,t,n){var i=this;return this.cvm.make("div",{key:"div1"+t,class:{"fc-files":!0}},function(){var r=[];return"image"===i.handler.rule.props.uploadType?r.push(i.cvm.make("img",{key:"img"+t,attrs:{src:e}})):r.push(i.cvm.icon({key:"file"+t,props:{type:c.iviewConfig.fileIcon,size:40}})),i.issetIcon&&r.push(i.makeIcons(e,t,n)),r})},makeIcons:function(e,t,n){var i=this;return this.cvm.make("div",{key:"div2"+t,class:{"fc-upload-cover":!0}},function(){var r=[];return i.uploadOptions.handleIcon&&r.push(i.makeHandleIcon(e,t,n)),!0===i.uploadOptions.allowRemove&&r.push(i.makeRemoveIcon(e,t,n)),r})},makeProgress:function(e,t){return this.cvm.make("div",{key:"div3"+t,class:{"fc-files":!0}},[this.cvm.progress({key:"upp"+t,props:{percent:e.percentage,hideInfo:!0}})])},makeUploadBtn:function(e,t){return this.cvm.upload(this.propsData,!0===t?[this.cvm.make("div",{key:"div5"+e,class:{"fc-upload-btn":!0}},[this.cvm.icon({key:"upi"+e,props:{type:"file"===this.handler.rule.props.uploadType?c.iviewConfig.fileUpIcon:c.iviewConfig.imgUpIcon,size:20}})])]:[])},makeRemoveIcon:function(e,t,n){var i=this;return this.cvm.icon({key:"upri"+t+n,props:{type:"ios-trash-outline"},nativeOn:{click:function(){i.handler.el.fileList.splice(n,1),i.handler.changeParseValue(i.handler.el.fileList),i.propsData.props.onRemove&&i.propsData.props.onRemove(i.handler.el.fileList)}}})},makeHandleIcon:function(e,t,n){var i=this;return this.cvm.icon({key:"uphi"+t+n,props:{type:this.uploadOptions.handleIcon.toString()},nativeOn:{click:function(){i.onHandle(e)}}})}});t.default={handler:d,render:f}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.formCreateName=t.$FormCreate=void 0;var i=n(5),r=function(e){return e&&e.__esModule?e:{default:e}}(i),o=n(3),a=function(){return{name:"FormCreate",render:function(){return this.fComponent.fRender.parse(this.fComponent.vm)},props:{rule:{type:Array,required:!0,default:[]},option:{type:Object,default:function(){return{}},required:!1},value:Object},data:o.componentCommon.data,methods:o.componentCommon.methods,created:function(){this.fComponent=new r.default(this.rule,this.option),this.fComponent._type="rule",this.fComponent.init(this)},mounted:function(){this.fComponent.mounted(this),this.$f=this.fComponent.fCreateApi,this.init()}}};t.$FormCreate=a,t.formCreateName="FormCreate"},function(e,t,n){"use strict";var i=n(5),r=function(e){return e&&e.__esModule?e:{default:e}}(i);"undefined"!=typeof window&&window.Vue&&window.Vue.use(r.default),e.exports.default=e.exports=r.default},function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var r=n(2),o=i(r),a=n(1),s=i(a),u=(0,o.default)({init:function(){this.rule.props={}}}),l=(0,s.default)({parse:function(){return[]}});t.default={handler:u,render:l}},function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var r=n(2),o=i(r),a=n(1),s=i(a),u=(0,o.default)({init:function(){var e=this.rule.props;e.autosize&&e.autosize.minRows&&(e.rows=e.autosize.minRows||2)}}),l=(0,s.default)({parse:function(){return[this.cvm.input(this.inputProps().get())]}});t.default={handler:u,render:l}},function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var r=n(2),o=i(r),a=n(1),s=i(a),u=(0,o.default)({toParseValue:function(e){return this.rule.options.filter(function(t){return t.value===e}).reduce(function(e,t){return t.label},"")},toTrueValue:function(e){return this.rule.options.filter(function(t){return t.label===e}).reduce(function(e,t){return t.value},"")}}),l=(0,s.default)({parse:function(){var e=this,t=this.handler,n=t.unique,i=t.rule.options;return[this.cvm.radioGroup(this.inputProps().get(),function(){return i.map(function(t,i){return e.cvm.radio({props:t,key:"ropt"+i+n})})})]}});t.default={handler:u,render:l}},function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var r=n(2),o=i(r),a=n(1),s=i(a),u=n(0),l=(0,o.default)({toParseValue:function(e){return e?(0,u.isArray)(e)||(e=[e]):e=[],this.rule.options.filter(function(t){return-1!==e.indexOf(t.value)}).map(function(e){return e.label})},toTrueValue:function(e){var t=this.rule.options.filter(function(t){return-1!==e.indexOf(t.label)}).map(function(e){return e.value});return 1===this.rule.options.length?void 0===t[0]?"":t[0]:t}}),c=(0,s.default)({parse:function(){var e=this,t=this.handler,n=t.unique,i=t.rule.options;return[this.cvm.checkboxGroup(this.inputProps().get(),function(){return i.map(function(t,i){return e.cvm.checkbox({props:t,key:"copt"+i+n})})})]}});t.default={handler:l,render:c}},function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var r=n(2),o=i(r),a=n(1),s=i(a),u=(0,o.default)({init:function(){void 0===this.rule.slot&&(this.rule.slot={})}}),l=(0,s.default)({parse:function(){var e=this.handler.rule.slot;return this.propsData=this.inputProps().scopedSlots({open:function(){return e.open},close:function(){return e.close}}).get(),[this.cvm.switch(this.propsData)]}});t.default={handler:u,render:l}},function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var r=n(2),o=i(r),a=n(1),s=i(a),u=n(0),l=(0,o.default)({toParseValue:function(e){var t=(0,u.isArray)(e);return!0===this.rule.props.multiple?Array.from(!0===t?e:[e]):!0===t?e[0]||"":e},toTrueValue:function(e){return(0,u.isArray)(e)?Array.from(e):e}}),c=(0,s.default)({parse:function(){var e=this,t=this.handler,n=t.unique,i=t.rule.options;return[this.cvm.select(this.inputProps().get(),function(){return i.map(function(t,i){return e.cvm.option({props:t,key:"sopt"+i+n})})})]}});t.default={handler:l,render:c}},function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var r=n(2),o=i(r),a=n(1),s=i(a),u=n(0),l=n(3),c=(0,o.default)({init:function(){var e=this.rule.props;e.type=e.type?e.type:"date",void 0===e.startDate&&(e.startDate=(0,l.timeStampToDate)(e.startDate))},toParseValue:function(e){var t=(0,u.isArray)(e),n=this.rule.props,i=void 0;return-1!==["daterange","datetimerange"].indexOf(n.type)?i=t?e.map(function(e){return e?(0,l.timeStampToDate)(e):""}):["",""]:"date"===n.type&&!0===n.multiple?i=e.toString():(i=t?e[0]||"":e,i=i?(0,l.timeStampToDate)(i):""),i},toTrueValue:function(){return void 0===this.el.publicStringValue?this.value:this.el.publicStringValue},mounted:function(){this.vm.changeTrueData(this.field,this.el.publicStringValue)}}),d=(0,s.default)({parse:function(){return[this.cvm.datePicker(this.inputProps().get())]}});t.default={handler:c,render:d}},function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var r=n(2),o=i(r),a=n(1),s=i(a),u=n(0),l=n(3),c=(0,o.default)({init:function(){var e=this.rule.props;e.type||(e.type="time"),void 0===e.confirm&&(e.confirm=!0)},toParseValue:function(e){var t=this,n=void 0,i=(0,u.isArray)(e);return"timerange"===this.rule.props.type?n=i?e.map(function(e){return e?t.getTime((0,l.timeStampToDate)(e)):""}):["",""]:(i&&(e=e[0]),n=e?this.getTime((0,l.timeStampToDate)(e)):""),n},toTrueValue:function(){return void 0===this.el.publicStringValue?this.value:this.el.publicStringValue},getTime:function(e){return(0,u.isDate)(e)?(0,u.dateFormat)("hh:mm:ss",e):e},mounted:function(){this.vm.changeTrueData(this.field,this.el.publicStringValue)}}),d=(0,s.default)({parse:function(){return[this.cvm.timePicker(this.inputProps().get())]}});t.default={handler:c,render:d}},function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var r=n(2),o=i(r),a=n(1),s=i(a),u=(0,o.default)({toParseValue:function(e){var t=parseFloat(e);return Number.isNaN(t)&&(t=0),t}}),l=(0,s.default)({parse:function(){return[this.cvm.inputNumber(this.inputProps().get())]}});t.default={handler:u,render:l}},function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var r=n(2),o=i(r),a=n(1),s=i(a),u=(0,o.default)({}),l=(0,s.default)({parse:function(){return[this.cvm.colorPicker(this.inputProps().get())]}});t.default={handler:u,render:l}},function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var r=n(2),o=i(r),a=n(1),s=i(a),u=n(0),l=(0,o.default)({init:function(){var e=this.rule;e.props.options||(e.props.options=[]),(0,u.isArray)(this.value)||(this.value=[]),Object.freeze(e.props.data)},toParseValue:function(e){return(0,u.isArray)(e)?e:[]},mounted:function(){this.vm.changeTrueData(this.field,this.el.value)}}),c=(0,s.default)({parse:function(){return[this.cvm.cascader(this.inputProps().get())]}});t.default={handler:l,render:c}},function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var r=n(2),o=i(r),a=n(1),s=i(a),u=(0,o.default)({toParseValue:function(e){var t=parseFloat(e);return Number.isNaN(t)&&(t=0),t}}),l=(0,s.default)({parse:function(){return[this.cvm.rate(this.inputProps().get())]}});t.default={handler:u,render:l}},function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var r=n(2),o=i(r),a=n(1),s=i(a),u=n(0),l=(0,o.default)({init:function(){this.rule.props.min=void 0===this.rule.props.min?0:parseFloat(this.rule.props.min)||0,this.rule.value&&(this.rule.value=0)},toParseValue:function(e){var t=(0,u.isArray)(e),n=this.rule.props,i=n.min;return!0===n.range?t?e:[i,parseFloat(e)||i]:t?parseFloat(e[0])||i:parseFloat(e)}}),c=(0,s.default)({parse:function(){return[this.cvm.slider(this.inputProps().get())]}});t.default={handler:l,render:c}},function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var r=n(2),o=i(r),a=n(1),s=i(a),u=n(0),l=n(8),c=i(l),d=n(3),f=(0,o.default)({init:function(){var e=this.rule.props;e.type||(e.type="input"),e.icon||(e.icon=d.iviewConfig.fileUpIcon),e.width||(e.width="500px"),e.height||(e.height="370px"),void 0===e.spin&&(e.spin=!0),e.title||(e.title="请选择"+this.rule.title),e.maxLength||(e.maxLength=0),e.multiple="1"!==e.maxLength.toString(),"file"===e.type&&void 0===e.handleIcon?e.handleIcon=!1:e.handleIcon=!0===e.handleIcon||void 0===e.handleIcon?"ios-eye-outline":e.handleIcon,void 0===e.allowRemove&&(e.allowRemove=!0)},toParseValue:function(e){var t=void 0,n=e,i=(0,u.isArray)(n);return t=""===n?[]:i?n:[n],this.parseValue=t,t},toTrueValue:function(e){return!0===this.rule.props.multiple?e:void 0===e[0]?"":e[0]}}),h={onOpen:"on-open",onChange:"on-change",onCancel:"on-cancel",onOk:"on-ok"},p=(0,s.default)({init:function(){var e=this,t=this.handler.field,n=!1;this.vm.$watch("cptData."+t,function(){!0===n&&e.onChange(),n=!0}),this._props=this.handler.rule.props,this.issetIcon=!1!==this._props.handleIcon||!0===this._props.allowRemove},parse:function(){var e=this._props.type;return"image"===e?this.makeGroup(this.makeImage()):"file"===e?this.makeGroup(this.makeFile()):this.makeInput()},makeInput:function(e){var t=this,n=this.handler.unique,i=this.inputProps().props({type:"text",value:this.handler.parseValue.toString(),icon:this._props.icon,readonly:!0,clearable:!0}).on("on-click",function(){t.showModel()}).key("ifit"+n).style({display:!0===e?"none":"inline-block"}).get();return[this.cvm.input(i)]},makeGroup:function(e){var t=this.handler.unique,n=this.handler.field;return[this.cvm.make("div",{key:"ifgp1"+t,class:{"fc-upload fc-frame":!0},ref:this.handler.refName,props:{value:this.vm.cptData[n]}},e),this.makeInput(!0)]},makeImage:function(){var e=this,t=this.handler.unique,n=this.handler.parseValue.map(function(n,i){return e.cvm.make("div",{key:"ifid1"+t+i,class:{"fc-files":!0}},[e.cvm.make("img",{key:"ifim"+t+i,attrs:{src:n}}),e.makeIcons(n,t,i)])});return n.push(this.makeBtn()),n},makeFile:function(){var e=this,t=this.handler.unique,n=this.handler.parseValue.map(function(n,i){return e.cvm.make("div",{key:"iffd2"+t+i,class:{"fc-files":!0}},[e.cvm.icon({key:"iff"+t+i,props:{type:d.iviewConfig.fileIcon,size:40}}),e.makeIcons(n,t,i)])});return n.push(this.makeBtn()),n},makeBtn:function(){var e=this,t=this.handler.rule.props;if(!(t.maxLength>0&&this.handler.parseValue.length>=t.maxLength)){var n=this.handler.unique;return this.cvm.make("div",{key:"ifbd3"+n,class:{"fc-upload-btn":!0},on:{click:function(){e.showModel()}}},[this.cvm.icon({key:"ifbi"+n,props:{type:this._props.icon,size:20}})])}},makeSpin:function(){if(!0===this._props.spin){var e=this.handler.unique;return this.cvm.make("Spin",{props:{fix:!0},key:"ifsp"+e,class:{"fc-spin":!0}},[this.cvm.icon({props:{type:"load-c",size:18},class:{"fc-spin-icon-load":!0},key:"ifspi"+e}),this.cvm.make("div",{domProps:{innerHTML:"加载中..."},key:"ifspd"+e})])}},makeIcons:function(e,t,n){var i=this;if(!0===this.issetIcon)return this.cvm.make("div",{key:"ifis"+t+n,class:{"fc-upload-cover":!0}},function(){var r=[];return!1!==i._props.handleIcon&&r.push(i.makeHandleIcon(e,t,n)),!0===i._props.allowRemove&&r.push(i.makeRemoveIcon(e,t,n)),r})},makeRemoveIcon:function(e,t,n){var i=this;return this.cvm.icon({key:"ifri"+t+n,props:{type:"ios-trash-outline"},nativeOn:{click:function(){!1!==i.onRemove(e)&&i.handler.parseValue.splice(n,1)}}})},makeHandleIcon:function(e,t,n){var i=this,r=this._props;return this.cvm.icon({key:"ifhi"+t+n,props:{type:r.handleIcon.toString()},nativeOn:{click:function(){i.onHandle(e)}}})},onRemove:function(e){var t=this.handler.rule.event["on-remove"];if(t)return t(e,this.handler.getValue())},onHandle:function(e){var t=this.handler.rule.event["on-handle"];if(t)return t(e);this.defaultOnHandle(e)},showModel:function(){var e=this,t=!1!==this.onOpen(),n=this._props,i=n.width,r=n.height,o=n.src,a=n.title;t&&(this.vm.$Modal.remove(),setTimeout(function(){e.vm.$Modal.confirm({title:a,render:function(){return[e.makeSpin(),e.cvm.make("iframe",{attrs:{src:o},style:{height:r,border:"0 none",width:"100%"},on:{load:function(){if(!0===e._props.spin){var t=document.getElementsByClassName("fc-spin")[0];t&&t.parentNode.removeChild(t)}}},key:"ifmd"+(0,u.uniqueId)()})]},onOk:function(){return e.onOk()},onCancel:function(){return e.onCancel()},showCancel:!0,closable:!0,scrollable:!0,width:i})},301))}});p.prototype.defaultOnHandle=c.default.render.prototype.defaultOnHandle,Object.keys(h).forEach(function(e){p.prototype[e]=function(){var t=this.handler.rule.event[h[e]];if(t)return t(this.handler.getValue())}}),t.default={handler:f,render:p}},function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function r(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t1&&void 0!==arguments[1]?arguments[1]:"__mp"+(0,u.uniqueId)(),i=t("",n);return i.rule.type=e,i.col({labelWidth:"1px"}),i},createTmp:function(e,n){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"__mp"+(0,u.uniqueId)(),r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{labelWidth:"110px",span:24},a=t(r,i);return a.rule.type="__tmp",a.rule.template=e,a.rule._vm=n,a.col(o),a},number:e.inputnumber,time:e.timepicker,date:e.datepicker,color:e.colorpicker}),e}();t.default=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.creator=void 0;var i=n(0),r=n(4),o=function(e){return e&&e.__esModule?e:{default:e}}(r),a=function(e){return function(t,n){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return new u(Object.assign(s(),{type:e,title:t,field:n,value:i}))}},s=function(){return{event:{},validate:[],options:[],col:{},children:[],emit:[],template:null}},u=function(e){o.default.call(this),this.rule=e,this.get=function(){return this._data},this.props({hidden:!1,visibility:!1})};u.prototype=o.default.prototype,u.constructor=u,["event","col"].forEach(function(e){u.prototype[e]=function(t){return this.rule[e]=Object.assign(this.rule[e],t),this}}),["validate","options","children","emit"].forEach(function(e){u.prototype[e]=function(t){return(0,i.isArray)(t)||(t=[t]),this.rule[e]=this.rule[e].concat(t),this}}),u.prototype.getRule=function(){return Object.assign(this.rule,this.get())},u.prototype.setValue=function(e){return this.rule.value=e,this},u.prototype.model=function(e,t){t||(t=this.rule.field),this.rule.model=function(n){e[t]=n}},t.default=a,t.creator=u},function(e,t,n){"use strict";function i(e){return e&&e.__esModule?e:{default:e}}function r(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t0&&r.push(this.makeFormBtn(n)),this.rowGroup.length=0,this.cvm.form(i,[this.cvm.row({props:this.options.row||{}},r)])}},makeRow:function(e){var t=this;if(this.layout){for(var n=[],i=0;i