修改按钮权限和展示
This commit is contained in:
parent
3115710fcb
commit
091f3f7665
@ -44,22 +44,6 @@
|
||||
<el-button size="mini" type="text" icon="el-icon-view" @click="handleShow(scope.row)"
|
||||
>查看
|
||||
</el-button>
|
||||
<el-button v-hasPermi="['repair:tkm:edit']" size="mini" type="text" icon="el-icon-setting"
|
||||
@click="handleEditTicket(scope.row)">
|
||||
编辑工单
|
||||
</el-button>
|
||||
<el-button v-hasPermi="['repair:tkm:remove']" size="mini" type="text" icon="el-icon-remove"
|
||||
@click="handleRemove(scope.row)">
|
||||
删除
|
||||
</el-button>
|
||||
<el-button v-hasPermi="['repair:tkm:void']" size="mini" type="text" icon="el-icon-delete"
|
||||
@click="handleVoid(scope.row)">
|
||||
作废
|
||||
</el-button>
|
||||
<el-button size="mini" type="text" icon="el-icon-refresh" v-hasPermi="['repair:tkm:editRecord']"
|
||||
@click="handleEditRecord(scope.row)">
|
||||
维修记录设置
|
||||
</el-button>
|
||||
<el-button
|
||||
v-if="(scope.row.ticketsWorkStatus === '01' && userRole === 'repair_staff') && nowUser.id === scope.row.nowRepairId"
|
||||
size="mini" type="text" icon="el-icon-check" @click="handleTake(scope.row)">
|
||||
@ -69,50 +53,39 @@
|
||||
type="text" icon="el-icon-check" @click="handleNotify(scope.row)">
|
||||
通知施工
|
||||
</el-button>
|
||||
<el-button size="mini"
|
||||
v-if="scope.row.ticketsWorkStatus !== '01' &&userRole === 'repair_staff' && !isFinish && nowUser.id === scope.row.nowRepairId"
|
||||
type="text" icon="el-icon-monitor" @click="handleRecord(scope.row, 'kssg')">
|
||||
开始施工
|
||||
<el-button v-if="(userRole !== 'repair_staff' && scope.row.ticketsWorkStatus !== '01') || (userRole === 'repair_staff' && leader && nowUser.id === scope.row.nowRepairId && scope.row.ticketsWorkStatus !== '04')" @click="handleReTake(scope.row)" size="mini" type="text" icon="el-icon-refresh"
|
||||
>{{ userRole === 'general_inspection' ? "内返派工" : "修改派工" }}
|
||||
</el-button>
|
||||
<el-button size="mini"
|
||||
v-if=" scope.row.ticketsWorkStatus !== '01' && userRole === 'repair_staff' && !isFinish && nowUser.id === scope.row.nowRepairId"
|
||||
type="text" icon="el-icon-monitor" @click="handleRecord(scope.row, 'sgz')">
|
||||
过程记录
|
||||
</el-button>
|
||||
<el-button size="mini"
|
||||
v-if="scope.row.ticketsWorkStatus !== '01' && userRole === 'repair_staff' && !isFinish && nowUser.id === scope.row.nowRepairId"
|
||||
type="text" icon="el-icon-monitor" @click="handleRecord(scope.row, 'sgwczj')">
|
||||
施工完成
|
||||
</el-button>
|
||||
<el-button @click="handleReTake(scope.row)" size="mini" type="text" icon="el-icon-refresh"
|
||||
v-if="userRole !== 'repair_staff'">
|
||||
{{userRole === 'service_advisor' ? "修改派工" : "内返派工"}}
|
||||
</el-button>
|
||||
<el-button
|
||||
v-if="userRole === 'repair_staff' && !isFinish && scope.row.ticketsWorkStatus === '01' && !(nowUser.id === scope.row.nowRepairId)"
|
||||
@click="handleGet(scope.row)" size="mini" type="text" icon="el-icon-document-add">
|
||||
申请配件
|
||||
</el-button>
|
||||
<!-- <el-dropdown-->
|
||||
<!-- v-if="(scope.row.ticketsWorkStatus !== '01' && ((userRole === 'service_advisor' || userRole === 'general_inspection') && !isFinish)) || (userRole === 'repair_staff' && !isFinish && scope.row.ticketsWorkStatus !== '01')"-->
|
||||
<!-- @command="(command) => handleCommand(command, scope.$index, scope.row)">-->
|
||||
<!-- <el-button size="mini" type="text" icon="el-icon-d-arrow-right">更多</el-button>-->
|
||||
<!-- <el-dropdown-menu slot="dropdown">-->
|
||||
<!-- <el-dropdown-item v-if="!isFinish && scope.row.ticketsWorkStatus !== '01' && userRole === 'repair_staff'"-->
|
||||
<!-- command="handleGet" size="mini" type="text" icon="el-icon-document-add"-->
|
||||
<!-- >申请配件-->
|
||||
<!-- </el-dropdown-item>-->
|
||||
<!-- <!– <el-dropdown-item v-if="scope.row.ticketsWorkStatus !== '01' && userRole === 'repair_staff'" command="handleBack" size="mini" type="text" icon="el-icon-document-delete"–>-->
|
||||
<!-- <!– >申请退料–>-->
|
||||
<!-- <!– </el-dropdown-item>–>-->
|
||||
<!-- <!– 还要判断是不是员工 –>-->
|
||||
<!-- <el-dropdown-item-->
|
||||
<!-- v-if="userRole !== 'repair_staff' && !isFinish && scope.row.ticketsWorkStatus !== '01'"-->
|
||||
<!-- command="handleReTake" size="mini" type="text" icon="el-icon-refresh"-->
|
||||
<!-- >{{userRole === 'service_advisor' ? "修改派工" : "内返派工"}}-->
|
||||
<!-- </el-dropdown-item>-->
|
||||
<!-- </el-dropdown-menu>-->
|
||||
<!-- </el-dropdown>-->
|
||||
<el-dropdown
|
||||
@command="(command) => handleCommand(command, scope.$index, scope.row)">
|
||||
<el-button size="mini" type="text" icon="el-icon-d-arrow-right">更多</el-button>
|
||||
<el-dropdown-menu slot="dropdown">
|
||||
<el-dropdown-item command="handleRemove" size="mini" type="text" icon="el-icon-remove" v-hasPermi="['repair:tkm:remove']">
|
||||
删除
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item command="handleVoid" v-hasPermi="['repair:tkm:void']" size="mini" type="text" icon="el-icon-delete">
|
||||
作废
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item command="handleEditTicket" v-hasPermi="['repair:tkm:edit']" size="mini" type="text" icon="el-icon-setting">
|
||||
编辑工单
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item command="handleEditRecord" size="mini" type="text" icon="el-icon-refresh" v-hasPermi="['repair:tkm:editRecord']">
|
||||
维修记录设置
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item command="handleGet" size="mini" type="text" icon="el-icon-document-add" v-if="userRole === 'repair_staff'">
|
||||
申请配件
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item command="handleRecordOne" size="mini" type="text" icon="el-icon-monitor" v-if="userRole === 'repair_staff' && nowUser.id === scope.row.nowRepairId && scope.row.ticketsWorkStatus === '04'">
|
||||
开始施工
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item command="handleRecordTwo" size="mini" type="text" icon="el-icon-monitor" v-if="userRole === 'repair_staff' && nowUser.id === scope.row.nowRepairId && scope.row.ticketsWorkStatus === '04'">
|
||||
过程记录
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item command="handleRecordThree" size="mini" type="text" icon="el-icon-monitor" v-if="userRole === 'repair_staff' && nowUser.id === scope.row.nowRepairId && scope.row.ticketsWorkStatus === '04'">
|
||||
施工完成
|
||||
</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
</el-dropdown>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@ -356,17 +329,29 @@ export default {
|
||||
// 更多操作
|
||||
handleCommand(command, index, row) {
|
||||
switch (command) {
|
||||
case 'handleReTake':
|
||||
this.handleReTake(row)
|
||||
case 'handleRemove':
|
||||
this.handleRemove(row)
|
||||
break
|
||||
case 'handleVoid':
|
||||
this.handleVoid(row)
|
||||
break
|
||||
case 'handleEditTicket':
|
||||
this.handleEditTicket(row)
|
||||
break
|
||||
case 'handleEditRecord':
|
||||
this.handleEditRecord(row)
|
||||
break
|
||||
case 'handleGet':
|
||||
this.handleGet(row)
|
||||
break
|
||||
case 'handleBack':
|
||||
this.handleBack(row)
|
||||
case 'handleRecordOne':
|
||||
this.handleRecord(row, 'kssg')
|
||||
break
|
||||
case 'handleEditRecord':
|
||||
this.handleEditRecord(row)
|
||||
case 'handleRecordTwo':
|
||||
this.handleRecord(row, 'sgz')
|
||||
break
|
||||
case 'handleRecordThree':
|
||||
this.handleRecord(row, 'sgwczj')
|
||||
break
|
||||
default:
|
||||
break
|
||||
|
Loading…
Reference in New Issue
Block a user