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

提交

parent 0949ba1a
...@@ -20,6 +20,13 @@ export function add(data) { ...@@ -20,6 +20,13 @@ export function add(data) {
}) })
} }
// 根据id查询基础信息接口
export function getDetailById(id) {
return request({
url: '/wbbaseinfo/detail/' + id,
method: 'get'
})
}
// 修改基础信息接口 // 修改基础信息接口
export function updataInfo(data) { export function updataInfo(data) {
return request({ return request({
......
...@@ -170,7 +170,7 @@ ...@@ -170,7 +170,7 @@
</template> </template>
<script> <script>
import { add, listBasicInfo, updataInfo} from '@/api/equipment/basicInfo' import { add, listBasicInfo, updataInfo, getDetailById } from '@/api/equipment/basicInfo'
import { parseTime } from '@/utils' import { parseTime } from '@/utils'
export default { export default {
name: 'Role', name: 'Role',
...@@ -435,19 +435,11 @@ export default { ...@@ -435,19 +435,11 @@ export default {
}, },
/** 修改按钮操作 */ /** 修改按钮操作 */
handleUpdate(row) { handleUpdate(row) {
this.reset() this.title = '编辑基础信息表单'
const roleId = row.businessId || this.ids const id = row.businessId
const roleMenu = this.getRoleMenuTreeselect(roleId) getDetailById(id).then(res => {
getRole(roleId).then(response => { this.form = res.data
this.form = response.data
this.open = true this.open = true
this.getMenuTreeselect(roleId)
this.$nextTick(() => {
roleMenu.then(res => {
this.$refs.menu.setCheckedKeys(res.data.checkedKeys)
})
})
this.title = '修改角色'
}) })
}, },
/** 提交按钮 */ /** 提交按钮 */
......
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