Commit f307658c authored by 吴志坤's avatar 吴志坤

基础信息的增删改查

parent 873b9222
...@@ -39,33 +39,11 @@ export function updataInfo(data) { ...@@ -39,33 +39,11 @@ export function updataInfo(data) {
}) })
} }
// 角色状态修改 // 逻辑删除基础信息接口
export function changeRoleStatus(businessId, flag) { export function deleteLogical(id) {
const data = {
businessId,
flag
}
return request({
url: '/system/role/changeStatus',
method: 'put',
params: data
})
}
// 删除角色
export function delRole(roleId) {
return request({ return request({
url: '/system/role/deleteLogical/' + roleId, url: '/wbbaseinfo/deleteLogical/' + id,
method: 'delete' method: 'delete'
}) })
} }
// 导出角色
export function exportRole(query) {
return request({
url: '/system/role/export',
method: 'get',
params: query,
responseType: 'blob'
})
}
...@@ -92,9 +92,9 @@ ...@@ -92,9 +92,9 @@
{{ scope.row.createName || '-' }} {{ scope.row.createName || '-' }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作时间" :show-overflow-tooltip="true" align="center" prop="createTime" width="200px"> <el-table-column label="操作时间" :show-overflow-tooltip="true" align="center" prop="updateDate" width="200px">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.createTime | transformDateByFormat('YYYY-MM-DD HH:mm') }}</span> <span>{{ scope.row.updateDate | transformDateByFormat('YYYY-MM-DD HH:mm') }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作" class-name="small-padding fixed-width" width="150px"> <el-table-column label="操作" class-name="small-padding fixed-width" width="150px">
...@@ -170,7 +170,7 @@ ...@@ -170,7 +170,7 @@
</template> </template>
<script> <script>
import { add, listBasicInfo, updataInfo, getDetailById } from '@/api/equipment/basicInfo' import { add, listBasicInfo, updataInfo, getDetailById, deleteLogical } from '@/api/equipment/basicInfo'
import { parseTime } from '@/utils' import { parseTime } from '@/utils'
export default { export default {
name: 'Role', name: 'Role',
...@@ -475,25 +475,24 @@ export default { ...@@ -475,25 +475,24 @@ export default {
}, },
/** 删除按钮操作 */ /** 删除按钮操作 */
handleDelete(row) { handleDelete(row) {
const roleIds = row.businessId || this.ids const id = row.businessId
this.$confirm('所选择数据被删除后不可再恢复,是否继续?', '提示', { this.$confirm('是否确认操作?', '提示', {
confirmButtonText: '确定', confirmButtonText: '确定',
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning' type: 'warning'
}).then(function() { }).then(res => {
return delRole(roleIds) deleteLogical(id).then(res => {
}).then(() => { if (res.code === 200) {
this.$message.success('操作成功')
this.getList() this.getList()
this.$message({ }
message: '删除成功',
type: 'success'
}) })
}).catch(function() {
}) })
} }
} }
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.app-container { .app-container {
font-size: 18px; font-size: 18px;
......
...@@ -79,9 +79,9 @@ ...@@ -79,9 +79,9 @@
{{ scope.row.createName || '-' }} {{ scope.row.createName || '-' }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作时间" :show-overflow-tooltip="true" align="center" prop="createTime" width="200px"> <el-table-column label="操作时间" :show-overflow-tooltip="true" align="center" prop="updateDate" width="200px">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.createTime | transformDateByFormat('YYYY-MM-DD HH:mm') }}</span> <span>{{ scope.row.updateDate | transformDateByFormat('YYYY-MM-DD HH:mm') }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作" class-name="small-padding fixed-width" width="150px"> <el-table-column label="操作" class-name="small-padding fixed-width" width="150px">
......
...@@ -79,9 +79,9 @@ ...@@ -79,9 +79,9 @@
{{ scope.row.createName || '-' }} {{ scope.row.createName || '-' }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作时间" :show-overflow-tooltip="true" align="center" prop="createTime" width="200px"> <el-table-column label="操作时间" :show-overflow-tooltip="true" align="center" prop="updateDate" width="200px">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.createTime | transformDateByFormat('YYYY-MM-DD HH:mm') }}</span> <span>{{ scope.row.updateDate | transformDateByFormat('YYYY-MM-DD HH:mm') }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作" class-name="small-padding fixed-width" width="150px"> <el-table-column label="操作" class-name="small-padding fixed-width" width="150px">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment