|
@@ -276,44 +276,42 @@ export default {
|
|
|
})
|
|
|
this.getList();
|
|
|
this.getTreeselect();
|
|
|
- listPostUser({
|
|
|
-
|
|
|
- }).then(response => {
|
|
|
- this.principalList = response;
|
|
|
- });
|
|
|
},
|
|
|
methods: {
|
|
|
/** 查询装置区域管理列表 */
|
|
|
getList() {
|
|
|
- let _this = this
|
|
|
- this.loading = true;
|
|
|
- listDevice(this.queryParams).then(response => {
|
|
|
- this.deviceList = response.rows;
|
|
|
- this.$nextTick(() => {
|
|
|
- this.$refs.deviceTable.doLayout(); // 解决表格错位
|
|
|
- });
|
|
|
- this.total = response.total;
|
|
|
- this.loading = false;
|
|
|
- this.deviceList.forEach(function (value,key,arr) {
|
|
|
- var principalName = null;
|
|
|
- let principal = null;
|
|
|
- if (value.regionalHead != null) {
|
|
|
- principal = value.regionalHead.split(",");
|
|
|
- principal.forEach(function (value, key, arr) {
|
|
|
- _this.principalList.forEach(function (v, k, arr){
|
|
|
- if (value==v.userId){
|
|
|
- if (key != 0) {
|
|
|
- principalName = principalName + ","+v.nickName;
|
|
|
- }else if (key == 0) {
|
|
|
- principalName = v.nickName;
|
|
|
+ listPostUser({}).then(response => {
|
|
|
+ this.principalList = response;
|
|
|
+ let _this = this
|
|
|
+ this.loading = true;
|
|
|
+ listDevice(this.queryParams).then(response => {
|
|
|
+ this.deviceList = response.rows;
|
|
|
+ this.$nextTick(() => {
|
|
|
+ this.$refs.deviceTable.doLayout(); // 解决表格错位
|
|
|
+ });
|
|
|
+ this.total = response.total;
|
|
|
+ this.loading = false;
|
|
|
+ this.deviceList.forEach(function (value, key, arr) {
|
|
|
+ var principalName = null;
|
|
|
+ let principal = null;
|
|
|
+ if (value.regionalHead != null) {
|
|
|
+ principal = value.regionalHead.split(",");
|
|
|
+ principal.forEach(function (value, key, arr) {
|
|
|
+ _this.principalList.forEach(function (v, k, arr) {
|
|
|
+ if (value == v.userId) {
|
|
|
+ if (key != 0) {
|
|
|
+ principalName = principalName + "," + v.nickName;
|
|
|
+ } else if (key == 0) {
|
|
|
+ principalName = v.nickName;
|
|
|
+ }
|
|
|
}
|
|
|
- }
|
|
|
- })
|
|
|
- });
|
|
|
- }
|
|
|
- _this.deviceList[key].regionalHead = principal;
|
|
|
- _this.deviceList[key].regionalHeadName = principalName;
|
|
|
- })
|
|
|
+ })
|
|
|
+ });
|
|
|
+ }
|
|
|
+ _this.deviceList[key].regionalHead = principal;
|
|
|
+ _this.deviceList[key].regionalHeadName = principalName;
|
|
|
+ })
|
|
|
+ });
|
|
|
});
|
|
|
},
|
|
|
/** 查询部门下拉树结构 */
|