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

基础信息的增删改查

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