组件服务 应用资源添加完全删除功能

This commit is contained in:
a0049873 2022-11-18 16:55:55 +08:00
parent 281143503a
commit a5f3b4b023
2 changed files with 74 additions and 0 deletions

View File

@ -157,6 +157,13 @@
@click="deleteHandle2(scope.row.id)"
>{{ $t('delete') }}</el-button
>
<el-button
v-if="superAdmin == 1"
type="text"
size="small"
@click="deleteCompletely(scope.row)"
>完全删除</el-button
>
<el-button type="text" size="small" @click="showDetail(scope.row)"
>详情</el-button
>
@ -256,6 +263,7 @@ export default {
mixins: [mixinViewModule],
data () {
return {
superAdmin: '',
required: ['归属部门', '部门联系人', '部门联系人电话', '应用领域', '共享条件', '算法名称', '算法描述', '图层名称', '图层描述', '组件名称', '组件描述', '组件地址', '服务地址', '服务接口', '接口请求方式', '算法类别'],
notFilled: [],
insertList: [],
@ -317,6 +325,10 @@ export default {
created () {
this.dataForm.name = ''
this.dataForm.type = '组件服务'
this.$http.get('/sys/user/info').then(res => {
console.log('res', res.data.data)
this.superAdmin = res.data.data.superAdmin
})
},
mounted () {
// window.addEventListener('resize', this.a)
@ -671,6 +683,31 @@ export default {
arr.push('常见问题')
this.$refs.putOnTheShelf.submit(arr)
},
//
deleteCompletely (row) {
console.log('完全删除===', row)
this.$confirm('确认是否删除?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.$http.post('/resource/delResBySuAd?id=' + row.id).then(res => {
console.log('删除结果', res.data)
if (res.data.code == 0) {
this.$message({
type: 'success',
message: '删除成功!'
})
}
this.getDataList()
})
}).catch(() => {
// this.$message({
// type: 'info',
// message: ''
// });
})
},
submitData () {
console.log('提交11111111111===============>', this.putOnTheShelfList, this.submitFrom)
const arr = []

View File

@ -145,6 +145,13 @@
@click="deleteHandle2(scope.row.id)"
>{{ $t("delete") }}</el-button
>
<el-button
v-if="superAdmin == 1"
type="text"
size="small"
@click="deleteCompletely(scope.row)"
>完全删除</el-button
>
<el-button type="text" size="small" @click="showDetail(scope.row)"
>详情</el-button
>
@ -234,6 +241,7 @@ export default {
mixins: [mixinViewModule],
data () {
return {
superAdmin: '',
required: ['归属部门', '部门联系人', '部门联系人电话', '应用领域', '共享条件', '应用名称', '应用描述', '应用类型'],
notFilled: [],
mixinViewModuleOptions: {
@ -286,6 +294,10 @@ export default {
created () {
this.dataForm.name = ''
this.dataForm.type = '应用资源'
this.$http.get('/sys/user/info').then(res => {
console.log('res', res.data.data)
this.superAdmin = res.data.data.superAdmin
})
},
mounted () {
// window.addEventListener('resize', this.a)
@ -522,6 +534,31 @@ export default {
//
})
},
//
deleteCompletely (row) {
console.log('完全删除===', row)
this.$confirm('确认是否删除?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.$http.post('/resource/delResBySuAd?id=' + row.id).then(res => {
console.log('删除结果', res.data)
if (res.data.code == 0) {
this.$message({
type: 'success',
message: '删除成功!'
})
}
this.getDataList()
})
}).catch(() => {
// this.$message({
// type: 'info',
// message: ''
// });
})
},
//
applyAndInfrastructure (val) {
const type = '基础设施'