赵士淞
2023-01-20 12b51e8dbcec5f10361b279d0bed9fa8a377358c
修复
1 files modified
18 ■■■■■ changed files
eladmin-web-master/src/views/project/project/index.vue 18 ●●●●● patch | view | raw | blame | history
eladmin-web-master/src/views/project/project/index.vue
@@ -200,13 +200,13 @@
          </template>
        </el-table-column>
        <el-table-column :show-overflow-tooltip="true" prop="requirement" label="需求说明" width="140" />
        <el-table-column :show-overflow-tooltip="true" prop="contractPrice" label="合同总金额" width="100">
        <el-table-column v-if="userRolesLevelMin != roleLevelOrdinary" :show-overflow-tooltip="true" prop="contractPrice" label="合同总金额" width="100">
          <template slot-scope="scope">
            {{ scope.row.contractPrice != null && scope.row.contractPrice != '' ? crud.toMoney(scope.row.contractPrice) : '' }}
          </template>
        </el-table-column>
        <el-table-column :show-overflow-tooltip="true" prop="totalTaskTime" label="任务总工时" width="100" />
        <el-table-column label="报价">
        <el-table-column v-if="userRolesLevelMin != roleLevelOrdinary" label="报价">
          <el-table-column :show-overflow-tooltip="true" prop="quotationPrice" label="单金" width="100">
            <template slot-scope="scope">
              {{ crud.toMoney(scope.row.quotationPrice) }}
@@ -320,6 +320,7 @@
import crudOperation from '@crud/CRUD.operation'
import udOperation from '@crud/UD.operation'
import pagination from '@crud/Pagination'
import { mapGetters } from 'vuex'
import moneyInput from '../../assembly/moneyInput/index.vue'
import constant from '../../../utils/constant'
@@ -413,6 +414,10 @@
      approveStatus: constant.APPROVE_STATUS,
      // 项目区分
      projectDistinguish: constant.PROJECT_DISTINGUISH,
      // 角色级别:普通用户
      roleLevelOrdinary: constant.ROLE_LEVEL_ORDINARY,
      // 用户最大角色级别
      userRolesLevelMin: null,
      // 随机数
      random: 0,
      // 项目类型列表
@@ -439,9 +444,18 @@
      disabledFlagByApprove: false
    }
  },
  computed: {
    ...mapGetters([
      'user'
    ])
  },
  methods: {
    // 钩子:在获取表格数据之前执行,false 则代表不获取数据
    [CRUD.HOOK.beforeRefresh]() {
      // 用户角色级别数组
      const userRolesLevel = this.user.roles.map(({ level }) => level)
      // 用户最大角色级别
      this.userRolesLevelMin = Math.min(...userRolesLevel)
      // 获取项目类型
      this.getPackageTypeAll()
      // 获取责任人