diff --git a/package.json b/package.json index 6a7a05043acb1b03e94f03ffece3777c6c7e528f..243fa01d01acb820c547a2c126064d5fe3535d39 100644 --- a/package.json +++ b/package.json @@ -11,10 +11,13 @@ }, "dependencies": { "@fortawesome/fontawesome-free": "^5.8.0", + "ace-builds": "^1.4.11", "babel-polyfill": "^6.26.0", "codemirror": "^5.45.0", "echarts": "^4.2.1", "element-ui": "^2.11.1", + "js-yaml": "^3.13.1", + "json2yaml": "^1.1.0", "material-design-icons-iconfont": "^4.0.5", "string-format": "^2.0.0", "svg-sprite-loader": "^4.2.1", diff --git a/src/components/block-radius.vue b/src/components/block-radius.vue new file mode 100644 index 0000000000000000000000000000000000000000..9c6e8c178d130e118c8020d4b42b89c3fb02a236 --- /dev/null +++ b/src/components/block-radius.vue @@ -0,0 +1,25 @@ + + + + + + diff --git a/src/components/codes.vue b/src/components/codes.vue new file mode 100644 index 0000000000000000000000000000000000000000..36f6386f0c1da0ce7a281c2a24b4a9a7c11affda --- /dev/null +++ b/src/components/codes.vue @@ -0,0 +1,105 @@ + + + + + diff --git a/src/components/table-input.vue b/src/components/table-input.vue index 42c185022ce815ae1f084b4e7e55e06baddc38cd..2b678b1f961a0adbc4bacb45b762582dd141921b 100644 --- a/src/components/table-input.vue +++ b/src/components/table-input.vue @@ -42,11 +42,15 @@ export default { .text-xs-center { height: 32px; } -.text-xs-center input { - width: 100%; -} + .table_in_input { text-align: center; font-size: 14px; } + + \ No newline at end of file diff --git a/src/components/table-um.vue b/src/components/table-um.vue index 26c39c882293e6e27ab55526995e1fe5e08185a4..afb2595b8068cb968814c1556583e90c84eabe49 100644 --- a/src/components/table-um.vue +++ b/src/components/table-um.vue @@ -32,8 +32,12 @@ element-loading-text="加载中..." :empty-text="emptyText" :stripe="stripe" + row-key="id" + default-expand-all + :tree-props="{children: 'children', hasChildren: 'hasChildren'}" ref="cesTable" :class="radius?'table_radius':''" + :header-cell-class-name="headerCellClassName" v-cloak > @@ -64,20 +68,20 @@ - + > - + > >>"); if (this.url == "") { - this.selectedTabsPage = this.tableData; + // console.log(this.emptyText); + // the if statement is to choose which data could be show, only used for test and template + if (this.emptyText == "暂时没数据") { + this.selectedTabsPage = this.tableData; + } else if (this.emptyText == "可输入表格暂时没数据") { + this.selectedTabsPage = this.tableData; + } else if (this.emptyText == "树结构暂时没数据") { + this.selectedTabsPage = this.tableData1; + } this.pagination.total = this.selectedTabsPage.length; if (this.autoAdd) { this.addRow(); @@ -560,8 +616,12 @@ em { /* .el-table th>.cell { padding-left: 14px; } */ -.could_edit { - background-color: #5c82ff; +.el-table__placeholder { + display: inline-block; + width: 40px; +} +.th_pink { + background-color: #faf2e2 !important; } \ No newline at end of file diff --git a/src/pages/fwzc_fwcs.vue b/src/pages/fwzc_fwcs.vue new file mode 100644 index 0000000000000000000000000000000000000000..71293c6e4c4693a97b2cbcc6bd306b6802aad728 --- /dev/null +++ b/src/pages/fwzc_fwcs.vue @@ -0,0 +1,46 @@ + + + + + + diff --git a/src/pages/table_example.vue b/src/pages/table_example.vue index 822b90a9ca0f33a161366ba3931f298822e1cd3f..c23e0e043920a95fc1fe4d7eff0c81a7826b43d9 100644 --- a/src/pages/table_example.vue +++ b/src/pages/table_example.vue @@ -3,14 +3,14 @@

常规表格

+

带树结构表格,供服务测试用

+ @@ -72,7 +95,12 @@ export default { } ], headers1: [ - { label: "服务url", prop: "date", type: "input", align: "center" }, + { label: "服务url", prop: "date", type: "input", align: "left" }, + { label: "服务名称", prop: "name", type: "input", align: "center" }, + { label: "中文名", prop: "address", type: "input", align: "right" }, + ], + headers2: [ + { label: "服务url", prop: "date", type: "", align: "left" }, { label: "服务名称", prop: "name", type: "input", align: "center" }, { label: "中文名", prop: "address", type: "input", align: "center" }, ], @@ -85,7 +113,9 @@ export default { btnCancelText: "取消", //取消 btnSubmitText: "确定" //确定 }, - emptyText: "暂时没数据" + emptyText: "暂时没数据", + emptyText1: "可输入表格暂时没数据", + emptyText2: "树结构暂时没数据", }), components: { cesTable diff --git a/src/router/index.js b/src/router/index.js index 19fad1b47e7931207bf80748c0eb4ca48944ab74..ddea137d3c8c2d98deeebec857b47570be307d39 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -16,11 +16,25 @@ export default new Router({ name: "index", component: Index, redirect: "/workplace", - children:[{ + children: [{ path: "/workplace", name: "workPlace", component: workPlace, - }] + }, + { + path: "/fwzc", // 服务注册 + name: "fwzc", + redirect: "/fwzc/fwcs", + component: () => import("@/pages/fwzc_fwcs"), + children: [ + { + path: "/fwzc/fwcs", // 服务注册/服务测试 + name: "fwcs", + component: () => import("@/pages/fwzc_fwcs") + }, + ] + } + ] }, { path: "/table_example", // 表格实例 @@ -31,7 +45,11 @@ export default new Router({ path: "/upload_example", // 表格实例 name: "upload_example", component: () => import("@/pages/upload_example") - }, - + }, + { + path: "/code_example", // 编辑器实例 + name: "code_example", + component: () => import("@/pages/code_example") + } ] }); diff --git a/yarn.lock b/yarn.lock index 51945944d1145f69c4d3dcd873ad9fde2167aedf..e0ca5aa8d32c4d59af1fe7949294857c0fe149be 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1005,6 +1005,11 @@ accepts@~1.3.4, accepts@~1.3.5, accepts@~1.3.7: mime-types "~2.1.24" negotiator "0.6.2" +ace-builds@^1.4.11: + version "1.4.11" + resolved "https://registry.yarnpkg.com/ace-builds/-/ace-builds-1.4.11.tgz#b1f19a891afcef1d26522473082baf80067e855f" + integrity sha512-keACH1d7MvAh72fE/us36WQzOFQPJbHphNpj33pXwVZOM84pTWcdFzIAvngxOGIGLTm7gtUP2eJ4Ku6VaPo8bw== + acorn-walk@^6.1.1: version "6.2.0" resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-6.2.0.tgz#123cb8f3b84c2171f1f7fb252615b1c78a6b1a8c" @@ -3939,6 +3944,13 @@ json-schema-traverse@^0.4.1: resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz#69f6a87d9513ab8bb8fe63bdb0979c448e684660" integrity sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg== +json2yaml@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/json2yaml/-/json2yaml-1.1.0.tgz#5414d907f9816586b80c513ec2e3aeb2ab819a6c" + integrity sha1-VBTZB/mBZYa4DFE+wuOusquBmmw= + dependencies: + remedial "1.x" + json3@^3.3.2: version "3.3.3" resolved "https://registry.yarnpkg.com/json3/-/json3-3.3.3.tgz#7fc10e375fc5ae42c4705a5cc0aa6f62be305b81" @@ -5753,6 +5765,11 @@ relateurl@0.2.x: resolved "https://registry.yarnpkg.com/relateurl/-/relateurl-0.2.7.tgz#54dbf377e51440aca90a4cd274600d3ff2d888a9" integrity sha1-VNvzd+UUQKypCkzSdGANP/LYiKk= +remedial@1.x: + version "1.0.8" + resolved "https://registry.yarnpkg.com/remedial/-/remedial-1.0.8.tgz#a5e4fd52a0e4956adbaf62da63a5a46a78c578a0" + integrity sha512-/62tYiOe6DzS5BqVsNpH/nkGlX45C/Sp6V+NtiN6JQNS1Viay7cWkazmRkrQrdFj2eshDe96SIQNIoMxqhzBOg== + remove-trailing-separator@^1.0.1: version "1.1.0" resolved "https://registry.yarnpkg.com/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz#c24bce2a283adad5bc3f58e0d48249b92379d8ef"