Commit 3aa76b456dc6aedd8c75dfd8f4996f4ba045de5b

Authored by ly525
1 parent 841f12d9

add work id for form list

front-end/h5/src/locales/lang/en-US.js
... ... @@ -22,7 +22,8 @@ export default {
22 22 useNow: 'Use it Now',
23 23 preview: 'Preview',
24 24 edit: 'Edit',
25   - createNewWork: 'Create New'
  25 + createNewWork: 'Create New',
  26 + view: 'View Work'
26 27 },
27 28 basicData: {
28 29 viewData: 'View Data'
... ...
front-end/h5/src/locales/lang/zh-CN.js
  1 +/*
  2 + * @Author: ly525
  3 + * @Date: 2019-11-24 18:51:58
  4 + * @LastEditors: ly525
  5 + * @LastEditTime: 2019-11-25 22:06:54
  6 + * @FilePath: /luban-h5/front-end/h5/src/locales/lang/zh-CN.js
  7 + * @Github: https://github.com/ly525/luban-h5
  8 + * @Description: Do not edit
  9 + * @Copyright 2018 - 2019 luban-h5. All Rights Reserved
  10 + */
1 11 export default {
2 12 app: {
3 13 title: '鲁班 H5'
... ... @@ -22,10 +32,11 @@ export default {
22 32 useNow: '立即使用',
23 33 preview: '预览',
24 34 createNewWork: '创建新作品',
25   - edit: '编辑'
  35 + edit: '编辑',
  36 + view: '查看作品'
26 37 },
27 38 basicData: {
28   - viewData: 'View Data'
  39 + viewData: '查看数据'
29 40 },
30 41 editor: {
31 42 sidebar: {
... ...
front-end/h5/src/views/work-manager/form-stat/column.js
1 1 export const columns = [
2 2 {
  3 + title: 'Id',
  4 + // dataIndex: 'id',
  5 + key: 'id',
  6 + scopedSlots: { customRender: 'id' }
  7 + },
  8 + {
3 9 title: 'Title',
4 10 dataIndex: 'title',
5 11 key: 'title'
... ... @@ -15,6 +21,7 @@ export const columns = [
15 21 key: 'uv'
16 22 },
17 23 {
  24 + // i18n for title
18 25 title: 'Form Count',
19 26 key: 'formCount',
20 27 dataIndex: 'formCount'
... ...
front-end/h5/src/views/work-manager/form-stat/index.vue
  1 +<!--
  2 + * @Author: ly525
  3 + * @Date: 2019-11-24 18:51:58
  4 + * @LastEditors: ly525
  5 + * @LastEditTime: 2019-11-26 10:48:17
  6 + * @FilePath: /luban-h5/front-end/h5/src/views/work-manager/form-stat/index.vue
  7 + * @Github: https://github.com/ly525/luban-h5
  8 + * @Copyright 2018 - 2019 luban-h5. All Rights Reserved
  9 + * @Description:
  10 + #!zh: [基础数据页面](/work-manager/form-stat) 对应的页面
  11 + #!en: [basic data page](/work-manager/form-stat)
  12 + -->
  13 +
1 14 <script>
2   -/**
3   - * [基础数据](/work-manager/form-stat) 对应的页面
4   - *
5   - */
6 15 import { mapState, mapActions } from 'vuex'
7 16 import { columns } from './column'
8 17  
... ... @@ -41,7 +50,15 @@ export default {
41 50 return (
42 51 <div class="works-wrapper" style="background-color:white;padding: 12px;margin-top: 24px;">
43 52 <a-table size="middle" columns={columns} dataSource={this.computedWorks} row-key="id" scopedSlots={{
44   - action: function (props) {
  53 + id: (props) => {
  54 + return (
  55 + <router-link to={{ name: 'editor', params: { workId: props.id } }} target="_blank" title={this.$t('workCard.view')}>
  56 + {props.id}
  57 + <a-icon type="link" title={this.$t('workCard.view')} class="ml-3" />
  58 + </router-link>
  59 + )
  60 + },
  61 + action: (props) => {
45 62 // 查看数据
46 63 return [<router-link to={{ name: 'stat-detail', params: { id: props.id } }} >{that.$t('basicData.viewData')}</router-link>]
47 64 }
... ...