Commit 5d72ca4d authored by xuke's avatar xuke

完善报警参数

parent 9b74824a
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" @click="getdata" style="min-width: 70px;">查询</el-button> <el-button type="primary" @click="getdata" style="min-width: 70px;">查询</el-button>
<el-button type="primary" @click="open" style="min-width: 70px;">报警参数设置</el-button> <el-button type="primary" v-show="roleId" @click="open" style="min-width: 70px;">报警参数设置</el-button>
</el-form-item> </el-form-item>
</div> </div>
</el-card> </el-card>
...@@ -279,7 +279,7 @@ const show = ref(false) ...@@ -279,7 +279,7 @@ const show = ref(false)
const refreshItem = ref(0) const refreshItem = ref(0)
const AlarmInfo = ref([]) const AlarmInfo = ref([])
const dept = ref('') const dept = ref('')
const roleId = ref(false)
function open() { function open() {
show.value = true show.value = true
...@@ -514,22 +514,23 @@ console.log("AlarmInfo.value:::", AlarmInfo.value); ...@@ -514,22 +514,23 @@ console.log("AlarmInfo.value:::", AlarmInfo.value);
const userId = ref(); const userId = ref();
const roleIds = ref(); const roleIds = ref();
//获取用户信息 //获取用户信息
function getuser() { const getuser = () => {
var user = store.getters.getUserInfo(); var user = store.getters.getUserInfo();
console.log("user================>", user);
console.log("user.enterpriseId================>", user.enterpriseId);
if (user) { if (user) {
enterpriseId.value = user.enterpriseId; enterpriseId.value = user.enterpriseId;
userId.value = user.userId; userId.value = user.userId;
roleIds.value = user.roleId; roleIds.value = user.roleId;
} }
// 权限小于3显示按钮
if (roleIds.value < 3) {
roleId.value = true
}
} }
console.log("userId=========>", userId.value); getuser()
console.log("roleIds=========>", roleIds.value);
let cnNames_before = ref([]) let cnNames_before = ref([])
let cnNames_after = ref([]) let cnNames_after = ref([])
console.log("---------------------AlarmInfo.value:", AlarmInfo.value);
let params = ref({ let params = ref({
"pipeAlarmParaId": "", "pipeAlarmParaId": "",
...@@ -835,6 +836,7 @@ const onClose = () => { ...@@ -835,6 +836,7 @@ const onClose = () => {
} }
onMounted(() => { onMounted(() => {
getuser()
setContentHeight(); setContentHeight();
window.addEventListener('resize', setContentHeight); window.addEventListener('resize', setContentHeight);
}) })
......
...@@ -282,12 +282,11 @@ function getSupplys() { ...@@ -282,12 +282,11 @@ function getSupplys() {
let c = []; let c = [];
center.supplyList.forEach((supply) => { center.supplyList.forEach((supply) => {
let chi = []; let chi = [];
// if(supplyId === "b354f45b-23e5-42be-a210-0fb92394f457") { if (supply.supplyId === "b354f45b-23e5-42be-a210-0fb92394f457") {
supply.transferList.forEach((unit) => {
// } options.push({ value: unit.unitId, label: unit.unitName });
supply.transferList.forEach((unit) => { });
options.push({ value: unit.unitId, label: unit.unitName }); }
});
// c.push({ children: chi, label: supply.supplyName }); // c.push({ children: chi, label: supply.supplyName });
}); });
// options.push({ children: c, label: center.serviceCenterName }); // options.push({ children: c, label: center.serviceCenterName });
......
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