|
|
@@ -142,8 +142,8 @@
|
|
|
</el-checkbox>
|
|
|
<div style="margin-top:10px;" class="rowequippower">
|
|
|
<el-checkbox-group v-model="selectedequip">
|
|
|
- <el-checkbox v-for="item in equipalllist" :key="item.Id" @change="handlecheckedequpichange"
|
|
|
- :label="item.label" :value="item.value"> {{item.label}}</el-checkbox>
|
|
|
+ <el-checkbox v-for="item in equipalllist" :key="item.Id" @change="handlecheckedequpichange" :label="item.Id"
|
|
|
+ :value="item.Id"> {{item.Name}}</el-checkbox>
|
|
|
</el-checkbox-group>
|
|
|
</div>
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
@@ -483,8 +483,8 @@
|
|
|
.then(res => {
|
|
|
for (var i = 0; i < res.data.items.length / 2; i++) {
|
|
|
_this.equipalllist.push({
|
|
|
- label: res.data.items[2 * i],
|
|
|
- value: res.data.items[2 * i + 1]
|
|
|
+ Name: res.data.items[2 * i],
|
|
|
+ Id: res.data.items[2 * i + 1]
|
|
|
})
|
|
|
}
|
|
|
})
|
|
|
@@ -498,9 +498,11 @@
|
|
|
_this.selectedequip = []
|
|
|
_this.$axios.get('/role/getroleequidpower?id=' + val.Id, {})
|
|
|
.then(res => {
|
|
|
- var arr = res.data.split(",");
|
|
|
- for (let i = 0; i < arr.length; i++) {
|
|
|
- _this.selectedequip.push(arr[i])
|
|
|
+ if (res.data && res.data != '') {
|
|
|
+ var arr = res.data.split(",");
|
|
|
+ for (let i = 0; i < arr.length; i++) {
|
|
|
+ _this.selectedequip.push(arr[i])
|
|
|
+ }
|
|
|
}
|
|
|
_this.handlecheckedequpichange()
|
|
|
})
|
|
|
@@ -511,10 +513,8 @@
|
|
|
},
|
|
|
saveequiptmentpower() {
|
|
|
let _this = this
|
|
|
- // request
|
|
|
this.$axios.put('/role/saveequpipower?id=' + this.operationid + '&selectedids=' + this.selectedequip, {})
|
|
|
.then(res => {
|
|
|
- // response
|
|
|
if (res.data.code === 0) {
|
|
|
_this.$message({
|
|
|
type: 'success',
|
|
|
@@ -531,7 +531,6 @@
|
|
|
}
|
|
|
})
|
|
|
.catch(err => {
|
|
|
- // handle error
|
|
|
console.error(err)
|
|
|
})
|
|
|
},
|
|
|
@@ -549,17 +548,14 @@
|
|
|
_currentPage: this.currentUserPage,
|
|
|
_size: this.userSize
|
|
|
}
|
|
|
- // request
|
|
|
this.$axios.get('role/getusersforrole/' + rid, {
|
|
|
params
|
|
|
})
|
|
|
.then(res => {
|
|
|
- // response
|
|
|
_this.userList = res.data.items
|
|
|
_this.currentUserItemCount = res.data.currentItemCount
|
|
|
})
|
|
|
.catch(err => {
|
|
|
- // handle error
|
|
|
console.error(err)
|
|
|
})
|
|
|
},
|
|
|
@@ -572,13 +568,11 @@
|
|
|
let _this = this
|
|
|
this.$axios.get('users/list', {})
|
|
|
.then(res => {
|
|
|
- // response
|
|
|
_this.partuserlist = res.data.items
|
|
|
console.log(this.partuserlist, '====')
|
|
|
this.userlistfilter()
|
|
|
})
|
|
|
.catch(err => {
|
|
|
- // handle error
|
|
|
console.error(err)
|
|
|
})
|
|
|
},
|
|
|
@@ -598,10 +592,8 @@
|
|
|
}
|
|
|
let useridlist = tempOfficers.join(',');
|
|
|
let useridliststring = useridlist.toString()
|
|
|
- // request
|
|
|
this.$axios.put('role/setuserrole/' + useridliststring + '_' + this.selectRoleId, {})
|
|
|
.then(res => {
|
|
|
- // response
|
|
|
if (res.data.code === 0) {
|
|
|
_this.$message({
|
|
|
type: 'success',
|
|
|
@@ -618,7 +610,6 @@
|
|
|
}
|
|
|
})
|
|
|
.catch(err => {
|
|
|
- // handle error
|
|
|
console.error(err)
|
|
|
})
|
|
|
|
|
|
@@ -655,7 +646,6 @@
|
|
|
}).then(() => {
|
|
|
_this.$axios.delete('role/deleteuser/' + val.Id + '_' + this.selectRoleId, null)
|
|
|
.then(res => {
|
|
|
- // response
|
|
|
if (res.data.code === 0) {
|
|
|
_this.$message({
|
|
|
type: 'success',
|
|
|
@@ -714,7 +704,7 @@
|
|
|
this.selectedequip = []
|
|
|
if (val) {
|
|
|
for (let i = 0; i < this.equipalllist.length; i++) {
|
|
|
- this.selectedequip.push(this.equipalllist[i].label)
|
|
|
+ this.selectedequip.push(this.equipalllist[i].Id)
|
|
|
}
|
|
|
}
|
|
|
this.isequpicheckall = false
|