zss
2024-01-18 9441aa12b933f294287ac9a2a37953276c327d6b
src/views/basic/param/index.vue
@@ -10,7 +10,10 @@
        :ajaxFun="ajaxFun"
        ref="paramTable"
      >
        <template #toolbar></template>
        <template #toolbar>
          <el-button type="primary" @click="addOrUpdateHandle"
          v-if="permissions.technology_param_add">新增</el-button>
        </template>
      </ttable>
      <!-- 弹窗, 新增 / 修改 -->
      <table-form
@@ -36,7 +39,8 @@
      isShowQuery: false,
      uploadInfo: {
        // 是否展示上传EXCEL以及对应的url
        isShow: false,
        isShow: true,
        download:true,
        url: '/mes/param/upload'
      },
      prelang: 'operation',
@@ -51,6 +55,7 @@
        seqNo: true,
        isShowHide: true, // 是否显示显影按钮
        isSearch: true, // 高级查询按钮
        isRefresh: true, // 是否显示刷新按钮
        defaultOrderBy: { column: 'createTime', direction: 'desc' }
      },
      table: {
@@ -147,22 +152,8 @@
            searchInfoType: 'datetimerange'
          }
        ],
        toolbar: [
          {
            text: '新增',
            type: 'primary',
            fun: this.addOrUpdateHandle
          }
        ],
        operator: [
          {
            text: '删除',
            icon: 'el-icon-delete',
            type: 'text',
            size: 'small',
            fun: this.deleteHandle
          }
        ],
        toolbar: [],
        operator: null,
        operatorConfig: {
          fixed: 'right',
          label: '操作',
@@ -181,6 +172,17 @@
    ...mapGetters(['permissions'])
  },
  created() {
    if(this.permissions.technology_param_del){
      this.table.operator = [
          {
            text: '删除',
            icon: 'el-icon-delete',
            type: 'text',
            size: 'small',
            fun: this.deleteHandle
          }
        ]
    }
    this.getParamType()
  },
  methods: {
@@ -190,6 +192,10 @@
    },
    // 新增 / 修改
    addOrUpdateHandle(row) {
      if(!this.permissions.technology_param_edit && row.id!=null){
        this.$message.error("该角色没有操作权限")
        return
      }
      this.addOrUpdateVisible = true
      this.$nextTick(() => {
        this.$refs.addOrUpdate.init(row == null ? null : row.id)