Commit 30f12f9f authored by renjintao's avatar renjintao

authorityCount

parent 5f194040
......@@ -191,6 +191,7 @@ export default {
if (el.authority == 1) {
this.authorityCount = 1
}
//截取加入日期
if (el.joindate && el.joindate.length >= 10) {
el.joindate = el.joindate.substr(0, 10)
}
......@@ -198,6 +199,7 @@ export default {
}
},
//新增
addList() {
this.edit = this.list.length;
this.cur = {
......@@ -213,6 +215,7 @@ export default {
this.authorityCur = 0
this.list.push(this.cur);
},
//编辑
editRow(row, index) {
let lastListGroupId = this.list[this.list.length - 1].groupId
if (lastListGroupId == undefined) {
......@@ -231,12 +234,14 @@ export default {
this.authorityCur = row.authority
this.edit = index
},
//选择权限
changeAuthority(val) {
if (this.authorityCur != 1 && this.authorityCount == 1 && val == 1) {
this.$Message.error("已存在项目经理,请选择其他权限!")
this.$Message.error("已存在权限:项目经理,请选择其他权限!")
this.cur.authority = null
}
},
//选择加入日期
getTime(value) {
if (value != '') {
this.cur.joindate = this.getFormatDateStart(
......@@ -246,6 +251,7 @@ export default {
this.cur.joindate = ''
}
},
//删除
delRow(id) {
Api.delete(id).then((r) => {
if (r.success) {
......@@ -255,6 +261,7 @@ export default {
}
})
},
//新增时取消
remove(row, index) {
if (!row.id || !row.groupId) {
this.list.pop();
......@@ -314,7 +321,6 @@ export default {
})
}
},
getFormatDateStart(dates) {
const d = new Date(dates);
const resDate =
......
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