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