Commit 3356373c by cwq0219

state转换

1 parent ef620ed7
...@@ -68,7 +68,10 @@ export default { ...@@ -68,7 +68,10 @@ export default {
prop: 'departName' prop: 'departName'
}, { }, {
label: '状态', label: '状态',
prop: 'state' prop: 'state',
formatter: (row, column, cellValue, index) => {
return cellValue < 1 ? '禁止' : '启动'
}
}, { }, {
label: '创建时间', label: '创建时间',
prop: 'createTime' prop: 'createTime'
...@@ -109,11 +112,11 @@ export default { ...@@ -109,11 +112,11 @@ export default {
this.getList() this.getList()
}, },
// search-------------------- // search--------------------
// watch: { watch: {
// roleName(val) { roleName(val) {
// !val !val && this.getList()
// } }
// }, },
methods: { methods: {
message(message, type) { message(message, type) {
type && this.$message({ type && this.$message({
...@@ -174,15 +177,15 @@ export default { ...@@ -174,15 +177,15 @@ export default {
}, },
// 接口请求-end--------------------------------------- // 接口请求-end---------------------------------------
// 新增用户到页面 // 新增用户到页面
aaaddRole(data) { // addRole(data) {
// 后台获取---------------------- // 后台获取----------------------
// data.id = '1038' // data.id = '1038'
data.createTime = new Date().toLocaleString().split('/').join('-') // data.createTime = new Date().toLocaleString().split('/').join('-')
// 后台获取---------------------- // 后台获取----------------------
const newData = data // const newData = data
this.roleData.data.push(newData) // this.roleData.data.push(newData)
this.message('创建角色成功!', 'success') // this.message('创建角色成功!', 'success')
}, // },
createDialogVisible() { createDialogVisible() {
this.createVisible = !this.createVisible this.createVisible = !this.createVisible
}, },
...@@ -235,8 +238,8 @@ export default { ...@@ -235,8 +238,8 @@ export default {
this.roleParam = roleCreateStructure this.roleParam = roleCreateStructure
!data && this.message('取消创建角色') !data && this.message('取消创建角色')
// 将数据提交给后台,根据返回结果做判断 // 将数据提交给后台,根据返回结果做判断
// data && !flagEOrC && this.aaaddRole(data) data && !flagEOrC && this.getList() && this.message('创建角色成功!', 'success')
// data && flagEOrC && this.message('已经成功修改数据!', 'success') data && flagEOrC && this.getList() && this.message('已经成功修改数据!', 'success')
} }
} }
} }
......
...@@ -73,7 +73,10 @@ export default { ...@@ -73,7 +73,10 @@ export default {
prop: 'mobile' prop: 'mobile'
}, { }, {
label: '状态', label: '状态',
prop: 'state' prop: 'state',
formatter: (row, column, cellValue, index) => {
return cellValue < 1 ? '禁止' : '启动'
}
}, { }, {
label: '创建时间', label: '创建时间',
prop: 'createTime' prop: 'createTime'
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!