|
@@ -138,7 +138,7 @@
|
|
|
header-align="center"
|
|
|
fixed="right"
|
|
|
align="center"
|
|
|
- width="180"
|
|
|
+ width="250"
|
|
|
label="操作">
|
|
|
<template slot-scope="scope">
|
|
|
<el-button v-if="isAuth('pro:technology:revoke') && scope.row.state === '1'" type="text" size="small" @click="revokeHandle(scope.row.techId)">撤销</el-button>
|
|
@@ -149,6 +149,7 @@
|
|
|
<el-button v-if="isAuth('pro:technology:info')" type="text" size="small" @click="detailHandle(scope.row.techId, scope.row.productName)">查看</el-button>
|
|
|
<el-button v-if="isAuth('pro:technology:generateInstruction') && Number(scope.row.isGenerate) === 0" type="text" size="small" @click="generate(scope.row.techId)">生成</el-button>
|
|
|
<el-button v-if="isAuth('pro:technology:save') && scope.row.state === '0'" type="text" size="small" @click="addOrUpdateHandle(scope.row.techId, false, true)">重新提交</el-button>
|
|
|
+ <el-button v-if="isAuth('pro:technology:delete')" style="color: red" type="text" size="small" @click="deleteHandle(scope.row.techId)">删除</el-button>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
@@ -311,6 +312,36 @@
|
|
|
this.$message.error('生成工艺指令失败!')
|
|
|
}
|
|
|
})
|
|
|
+ },
|
|
|
+ // 删除
|
|
|
+ deleteHandle (id) {
|
|
|
+ if (!id) return
|
|
|
+ let ids = []
|
|
|
+ ids.push(id)
|
|
|
+ this.$confirm(`确定删除?`, '提示', {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ type: 'warning'
|
|
|
+ }).then(() => {
|
|
|
+ this.$http({
|
|
|
+ url: this.$http.adornUrl(`/biz-service/technology/delete`),
|
|
|
+ method: 'DELETE',
|
|
|
+ data: ids
|
|
|
+ }).then(({data}) => {
|
|
|
+ if (data && data.code === '200') {
|
|
|
+ this.$message({
|
|
|
+ message: '操作成功',
|
|
|
+ type: 'success',
|
|
|
+ duration: 1500,
|
|
|
+ onClose: () => {
|
|
|
+ this.getDataList()
|
|
|
+ }
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ this.$message.error(data.msg)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }).catch(() => {})
|
|
|
}
|
|
|
}
|
|
|
}
|