role1.0
fanluyan 1 year ago
parent 205574e9b6
commit 4392ef299b

@ -72,7 +72,7 @@
<el-table-column prop="updateTimeStr" label="采集时间" min-width="140">
</el-table-column>
<el-table-column prop="equip_name" label="装置名称" min-width="140">
<el-table-column prop="equipName" label="装置名称" min-width="140">
</el-table-column>
<el-table-column prop="model" label="装置型号" show-overflow-tooltip>
</el-table-column>

@ -701,27 +701,27 @@ export default {
console.log(timeArr);
} else {
//
// if (this.$moment(Stime).isBefore(this.$moment(Etime))) {
// timeArr.push(Stime);
// Stime = this.$moment(Stime)
// .add(spanTime, "minute")
// .format("YYYY-MM-DD HH:mm:ss");
// } else if (this.$moment(Stime).isSame(this.$moment(Etime))) {
// // Stime = "";
// timeArr = [];
// // Stime = this.$moment(Stime)
// // .add(spanTime, "minute")
// // .format("YYYY-MM-DD HH:mm:ss");
// }
while (
this.$moment(Stime).isBefore(this.$moment(Etime)) ||
this.$moment(Stime).isSame(this.$moment(Etime))
) {
if (this.$moment(Stime).isBefore(this.$moment(Etime))) {
timeArr.push(Stime);
Stime = this.$moment(Stime)
.add(spanTime, "minute")
.format("YYYY-MM-DD HH:mm:ss");
} else if (this.$moment(Stime).isSame(this.$moment(Etime))) {
// Stime = "";
timeArr = [];
// Stime = this.$moment(Stime)
// .add(spanTime, "minute")
// .format("YYYY-MM-DD HH:mm:ss");
}
// while (
// this.$moment(Stime).isBefore(this.$moment(Etime)) ||
// this.$moment(Stime).isSame(this.$moment(Etime))
// ) {
// timeArr.push(Stime);
// Stime = this.$moment(Stime)
// .add(spanTime, "minute")
// .format("YYYY-MM-DD HH:mm:ss");
// }
}
}
console.log(timeArr);
@ -785,14 +785,18 @@ export default {
})
.then((res) => {
console.log(res);
this.requestid = res.data.list[0].requestid;
console.log(this.requestid);
clearInterval(this.timer);
this.deviceTimer = window.setInterval(() => {
this.getinfoRules();
this.deviceNum++;
console.log(this.deviceNum, this.deviceNum * 1000);
}, 1000 * this.deviceNum);
if (res.data.list.length !== 0) {
this.requestid = res.data.list[0].requestid;
console.log(this.requestid);
clearInterval(this.timer);
this.deviceTimer = window.setInterval(() => {
this.getinfoRules();
this.deviceNum++;
console.log(this.deviceNum, this.deviceNum * 1000);
}, 1000 * this.deviceNum);
} else {
console.log("未获取到requestid");
}
})
.catch((err) => {
// this.$message({

@ -5,13 +5,13 @@
:visible.sync="isShow"
:close-on-click-modal="false"
width="470px"
@close="handleclose"
@close="hide"
>
<div class="treeBoxList" v-loading="treeLoading">
<el-checkbox-group v-model="checkedMenu">
<el-checkbox
v-for="item in menuCheckOption"
:label="item"
:label="item.id"
:key="item.id"
>{{ item.desc }}</el-checkbox
>
@ -38,8 +38,8 @@ export default {
treeLoading: false,
rowData: "",
menuList: [],
checkedMenu: [],
menuCheckOption: [],
checkedMenu: [], //checkbox
menuCheckOption: [], //checkbox
checkedIds: [], //id
};
},
@ -48,7 +48,9 @@ export default {
getdataform(val) {
this.rowData = JSON.parse(JSON.stringify(val));
},
//
getMenuList() {
this.treeLoading = true;
getMenuListApi()
.then((res) => {
if (res.code == 200) {
@ -61,6 +63,7 @@ export default {
})
.catch((err) => {});
},
//
getRolePermission() {
console.log(this.rowData);
getRolePermissionApi({ id: this.rowData.id })
@ -69,6 +72,9 @@ export default {
console.log(res);
this.checkedIds = res.data;
console.log(this.checkedIds);
this.checkedMenu = this.checkedIds.map((obj) => obj.resourceId);
console.log("我时查询到的选中的值", this.checkedMenu);
this.treeLoading = false;
} else {
this.$message.error(res.msg);
}
@ -79,9 +85,10 @@ export default {
submitForm() {
console.log(this.checkedMenu);
let paramsList = [];
this.checkedMenu.forEach((node) => {
paramsList.push({ resourceId: node.id });
this.checkedMenu.map((id) => {
paramsList.push({ resourceId: id });
});
//
getRolechangePermissionApi({
list: paramsList,
roleId: this.rowData.id,
@ -109,8 +116,8 @@ export default {
},
hide() {
this.isShow = false;
this.checkedMenu = [];
},
handleclose() {},
},
mounted() {},
};

Loading…
Cancel
Save