zss
2024-04-09 0f1d50991781313598c47c325256d61a7513e81f
src/views/technology/operation/index.vue
@@ -10,7 +10,10 @@
        :ajaxFun="ajaxFun"
        ref="operationTable"
      >
        <template #toolbar></template>
        <template #toolbar>
          <el-button type="primary" @click="addOrUpdateHandle"
          v-if="permissions.technology_operation_add">新增</el-button>
        </template>
      </ttable>
      <!-- 弹窗, 新增 / 修改 -->
      <table-form
@@ -35,7 +38,7 @@
      multipleSelection: [],
      uploadInfo: {
        // 是否展示上传EXCEL以及对应的url
        isShow: true,
        isShow: false,
        url: '/mes/operation/excel/upload'
      },
      prelang: 'operation',
@@ -177,28 +180,28 @@
          //   }
          // },
          // 班组人员
          {
            minWidth: '120',
            prop: 'crewSize',
            label: '班组人员',
            sort: true,
            isTrue: true,
            isSearch: true,
            searchInfoType: 'text'
          },
          {
            minWidth: '120',
            prop: 'outsideOpItem',
            label: '外部工序项目',
            sort: true,
            isTrue: true,
            isSearch: true,
            searchInfoType: 'select',
            formatter: this.formatOutsideOpItem,
            optList: () => {
              return this.outsideOpItemOptions
            }
          },
          // {
          //   minWidth: '120',
          //   prop: 'crewSize',
          //   label: '班组人员',
          //   sort: true,
          //   isTrue: true,
          //   isSearch: true,
          //   searchInfoType: 'text'
          // },
          // {
          //   minWidth: '120',
          //   prop: 'outsideOpItem',
          //   label: '外部工序项目',
          //   sort: true,
          //   isTrue: true,
          //   isSearch: true,
          //   searchInfoType: 'select',
          //   formatter: this.formatOutsideOpItem,
          //   optList: () => {
          //     return this.outsideOpItemOptions
          //   }
          // },
          // 备注
          {
            minWidth: '120',
@@ -220,21 +223,8 @@
            searchInfoType: 'datetimerange'
          }
        ],
        toolbar: [
          {
            text: '新增',
            type: 'primary',
            fun: this.addOrUpdateHandle
          }
        ],
        operator: [
          {
            text: '删除',
            type: 'text',
            size: 'small',
            fun: this.deleteHandle
          }
        ],
        toolbar: [],
        operator: null,
        operatorConfig: {
          fixed: 'right',
          label: '操作',
@@ -257,6 +247,16 @@
    ...mapGetters(['permissions'])
  },
  created() {
    if(this.permissions.technology_operation_del){
      this.table.operator = [
          {
            text: '删除',
            type: 'text',
            size: 'small',
            fun: this.deleteHandle
          }
        ]
    }
    this.getReportTypeDict()
    this.getRunTimeCodeDbTypeDict()
    this.getLaborClassNoCache()
@@ -271,6 +271,10 @@
    },
    // 新增 / 修改
    addOrUpdateHandle(row) {
      if(!this.permissions.technology_operation_edit && row.id!=null){
        this.$message.error("该角色没有操作权限")
        return
      }
      this.$router.push({
        name: 'operationForm',
        params: { id: row == null ? null : row.id }