|
@ -147,6 +147,14 @@ const buttonBaseClick = (val, item) => { |
|
|
console.log('其他按钮', item) |
|
|
console.log('其他按钮', item) |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
// 根据状态返回该按钮是否显示 |
|
|
|
|
|
const isShowMainButton = (row,val) => { |
|
|
|
|
|
if (val.indexOf(row.status) > -1) { |
|
|
|
|
|
return false |
|
|
|
|
|
} else { |
|
|
|
|
|
return true |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
// 列表-操作按钮 |
|
|
// 列表-操作按钮 |
|
|
const butttondata = (row,$index) => { |
|
|
const butttondata = (row,$index) => { |
|
@ -154,12 +162,61 @@ const butttondata = (row,$index) => { |
|
|
if(findIndex>-1&&findIndex<$index){ |
|
|
if(findIndex>-1&&findIndex<$index){ |
|
|
return [] |
|
|
return [] |
|
|
} |
|
|
} |
|
|
return [] |
|
|
return [ |
|
|
|
|
|
{ |
|
|
|
|
|
label: '拒收', |
|
|
|
|
|
name: 'mainJobRefusal', |
|
|
|
|
|
hide: isShowMainButton(row, ['0']), |
|
|
|
|
|
type: 'primary', |
|
|
|
|
|
icon: '', |
|
|
|
|
|
color: '', |
|
|
|
|
|
hasPermi: '', |
|
|
|
|
|
link: true // 文本展现按钮 |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
label: '接收', |
|
|
|
|
|
name: 'mainJobRecept', |
|
|
|
|
|
hide: isShowMainButton(row, ['0']), |
|
|
|
|
|
type: 'primary', |
|
|
|
|
|
icon: '', |
|
|
|
|
|
color: '', |
|
|
|
|
|
hasPermi: '', |
|
|
|
|
|
link: true // 文本展现按钮 |
|
|
|
|
|
} |
|
|
|
|
|
] |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
// 列表-操作按钮事件 |
|
|
// 列表-操作按钮事件 |
|
|
const buttonTableClick = async (val, row) => { |
|
|
const buttonTableClick = async (val, row) => { |
|
|
|
|
|
if(val == 'mainJobRefusal'){ |
|
|
|
|
|
// 拒收 |
|
|
|
|
|
handleRefusal(row) |
|
|
|
|
|
}else if(val == 'mainJobRecept'){ |
|
|
|
|
|
// 接收 |
|
|
|
|
|
handleRecept(row) |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
// 拒收 |
|
|
|
|
|
const handleRefusal = async () => { |
|
|
|
|
|
try { |
|
|
|
|
|
loadStart() |
|
|
|
|
|
// 接口 |
|
|
|
|
|
} catch { |
|
|
|
|
|
} finally { |
|
|
|
|
|
loadDone() |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
// 接收 |
|
|
|
|
|
const handleRecept = async () => { |
|
|
|
|
|
try { |
|
|
|
|
|
loadStart() |
|
|
|
|
|
// 接口 |
|
|
|
|
|
} catch { |
|
|
|
|
|
} finally { |
|
|
|
|
|
loadDone() |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
// 获取部门 用于详情 部门回显 |
|
|
// 获取部门 用于详情 部门回显 |
|
|
const { wsCache } = useCache() |
|
|
const { wsCache } = useCache() |
|
|
/** 详情操作 */ |
|
|
/** 详情操作 */ |
|
|