resourcesDialog.js 2.67 KB
Newer Older
刘弈臻's avatar
刘弈臻 committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122
var resourcesDialog = {
  data: function () {
    return {
      dialogVisible: false,
      isBtnGroup: false,
      props: [
        {
          label: '信息资源编码',
          prop: 'code'
        },
        {
          label: '信息资源名称',
          prop: 'nameCn'
        },
        {
          label: '信息资源英文名',
          prop: 'nameEn'
        },
        {
          label: '所属系统',
          prop: 'sysId'
        },
        {
          label: '信息资源提供方',
          prop: 'deptName'
        },
        {
          label: '摘要',
          prop: 'summary'
        },
        [
          {
            label: '格式分类',
            prop: 'formatType1'
          },
          {
            label: '格式分类',
            prop: 'formatType2'
          }
        ],
        {
          label: '基础资源分类',
          prop: 'classify'
        },
        {
          label: '主题资源分类',
          prop: 'topicClassify'
        },
        {
          label: '数据表英文名称',
          prop: 'tbName'
        },
        {
          label: '更新频率',
          prop: 'updateFrequency'
        },
        {
          label: '对接方式',
          prop: 'buttMode'
        },
        {
          label: '提交日期',
          prop: 'releaseDate'
        },
        {
          label: '排序',
          prop: 'sort'
        }
      ],
      resourceTable: {
        loading: false,
        // table数据
        data: [],
        // table 表头
        tr: [
          {
            prop: 'nameCn',
            label: '信息项名称'
          }
        ],
        // 操作
        operation: {
          hasOperation: true,
          label: '操作',
          width: 100,
          minWidth: '',
          // danger-红色 warning-黄色 primary-蓝色 success-绿色 info-灰色 默认-白色
          data: [{
            label: '详情',
            id: 1,
            fn: 'data-element-detail-handle',
            permission: ''
          }]
        },
        pagination: {
          hasPagination: false
        }
      }
    }
  },
  watch: {
    formData: {
      handler: function (newVal) {
        if (newVal.eleList) {
          this.resourceTable.data = newVal.eleList
        }
      },
      deep: true
    }
  },
  methods: {
    openDialogHandle: function () {
      this.$refs.resourcesDialog.open()
    },
    closeDialogHandle: function () {
      this.$refs.resourcesDialog.close()
    },
    dataElementDetailHandle: function (index, row) {
      this.$emit('detailData', row)
    }
  }
}