fix:修改组织id的bug
This commit is contained in:
@@ -144,7 +144,7 @@
|
|||||||
const visible = ref(false);
|
const visible = ref(false);
|
||||||
//父级数据
|
//父级数据
|
||||||
const energyAlarm = ref({});
|
const energyAlarm = ref({});
|
||||||
//组织数
|
//组织id
|
||||||
const orgId = ref('');
|
const orgId = ref('');
|
||||||
const result = JSON.parse(sessionStorage.getItem('ORGID')!);
|
const result = JSON.parse(sessionStorage.getItem('ORGID')!);
|
||||||
orgId.value = result;
|
orgId.value = result;
|
||||||
|
@@ -397,7 +397,6 @@
|
|||||||
};
|
};
|
||||||
// 确认按钮
|
// 确认按钮
|
||||||
const btnClick = () => {
|
const btnClick = () => {
|
||||||
infoObject.value.devicePoint = 1;
|
|
||||||
infoObject.value.alarmList.forEach((item) => {
|
infoObject.value.alarmList.forEach((item) => {
|
||||||
if (item.logic === null || item.num === null) {
|
if (item.logic === null || item.num === null) {
|
||||||
return;
|
return;
|
||||||
|
@@ -83,7 +83,7 @@
|
|||||||
<!-- 配置设备告警-->
|
<!-- 配置设备告警-->
|
||||||
<configureDeviceAlarms v-show="!equipmentAlarm" ref="configureDeviceAlarms" />
|
<configureDeviceAlarms v-show="!equipmentAlarm" ref="configureDeviceAlarms" />
|
||||||
</a-tab-pane>
|
</a-tab-pane>
|
||||||
<a-tab-pane key="3" tab="能源告警">
|
<a-tab-pane key="3" tab="能耗告警">
|
||||||
<ns-view-list-table
|
<ns-view-list-table
|
||||||
v-bind="energyAlarmConfig"
|
v-bind="energyAlarmConfig"
|
||||||
v-show="energyAlarm"
|
v-show="energyAlarm"
|
||||||
@@ -131,7 +131,7 @@
|
|||||||
@click="backenergyAlarm"
|
@click="backenergyAlarm"
|
||||||
>返回</a-button
|
>返回</a-button
|
||||||
>
|
>
|
||||||
<!-- 新增 或 编辑 能源告警 -->
|
<!-- 新增 或 编辑 能耗告警 -->
|
||||||
<editeEnergyAlarm ref="editeEnergyAlarm" @editObject="editeEnergyAlarmInfo" />
|
<editeEnergyAlarm ref="editeEnergyAlarm" @editObject="editeEnergyAlarmInfo" />
|
||||||
<!-- 配置能源告警-->
|
<!-- 配置能源告警-->
|
||||||
<configureEnergyAlarms v-show="!energyAlarm" ref="configureEnergyAlarms" />
|
<configureEnergyAlarms v-show="!energyAlarm" ref="configureEnergyAlarms" />
|
||||||
@@ -187,7 +187,7 @@
|
|||||||
if (notification === '1') {
|
if (notification === '1') {
|
||||||
methods.push('站内信息');
|
methods.push('站内信息');
|
||||||
} else if (notification === '2') {
|
} else if (notification === '2') {
|
||||||
methods.push('邮件');
|
methods.push('短信');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -235,6 +235,7 @@
|
|||||||
http
|
http
|
||||||
.post(notificationManagementApi.upData, {
|
.post(notificationManagementApi.upData, {
|
||||||
id: data.record.id,
|
id: data.record.id,
|
||||||
|
orgId: data.record.orgId,
|
||||||
enableNotifications: data.record.enableNotifications === 1 ? 0 : 1,
|
enableNotifications: data.record.enableNotifications === 1 ? 0 : 1,
|
||||||
})
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
@@ -249,6 +250,7 @@
|
|||||||
http
|
http
|
||||||
.post(deviceAlarms.addOrUpNewData, {
|
.post(deviceAlarms.addOrUpNewData, {
|
||||||
id: data.record.id,
|
id: data.record.id,
|
||||||
|
orgId: data.record.orgId,
|
||||||
enableRules: data.record.enableRules === 1 ? 0 : 1,
|
enableRules: data.record.enableRules === 1 ? 0 : 1,
|
||||||
})
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
@@ -261,6 +263,7 @@
|
|||||||
http
|
http
|
||||||
.post(energyAlarms.addOrUpNewData, {
|
.post(energyAlarms.addOrUpNewData, {
|
||||||
id: data.record.id,
|
id: data.record.id,
|
||||||
|
orgId: data.record.orgId,
|
||||||
enableRules: data.record.enableRules === 1 ? 0 : 1,
|
enableRules: data.record.enableRules === 1 ? 0 : 1,
|
||||||
})
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
|
@@ -20,6 +20,7 @@
|
|||||||
show-search
|
show-search
|
||||||
:allowClear="true"
|
:allowClear="true"
|
||||||
placeholder="请选择通知方式"
|
placeholder="请选择通知方式"
|
||||||
|
:field-names="{ label: 'cnValue', value: 'dicKey', options: 'children' }"
|
||||||
:filter-option="filterDevicePoint" />
|
:filter-option="filterDevicePoint" />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
<a-form-item label="启用规则">
|
<a-form-item label="启用规则">
|
||||||
@@ -73,6 +74,7 @@
|
|||||||
import { http } from '/nerv-lib/util';
|
import { http } from '/nerv-lib/util';
|
||||||
import linkPeople from './linkPeople/index.vue';
|
import linkPeople from './linkPeople/index.vue';
|
||||||
import { notificationManagementApi } from '/@/api/alarmManagement/alarmSettings/notificationManagements';
|
import { notificationManagementApi } from '/@/api/alarmManagement/alarmSettings/notificationManagements';
|
||||||
|
import { dict } from '/@/api';
|
||||||
|
|
||||||
//table 数据
|
//table 数据
|
||||||
const columns = [
|
const columns = [
|
||||||
@@ -173,10 +175,7 @@
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
// 通知信息
|
// 通知信息
|
||||||
const devicePointData = ref([
|
const devicePointData = ref([]);
|
||||||
{ label: '站内信息', value: '1' },
|
|
||||||
{ label: '邮件', value: '2' },
|
|
||||||
]);
|
|
||||||
|
|
||||||
const rules = {
|
const rules = {
|
||||||
notificationMethod: [{ required: true, message: '请选择通知方式', trigger: 'change' }],
|
notificationMethod: [{ required: true, message: '请选择通知方式', trigger: 'change' }],
|
||||||
@@ -185,6 +184,9 @@
|
|||||||
const formRef = ref();
|
const formRef = ref();
|
||||||
const emit = defineEmits(['updNotification']);
|
const emit = defineEmits(['updNotification']);
|
||||||
const toggle = async (value: any) => {
|
const toggle = async (value: any) => {
|
||||||
|
// NOTIFICATIONMETHOD
|
||||||
|
let devicePoint = await dict({ params: { dicKey: 'NOTIFICATIONMETHOD' } });
|
||||||
|
devicePointData.value = devicePoint.data.data;
|
||||||
//判断 是新增 还是修改
|
//判断 是新增 还是修改
|
||||||
if (value) {
|
if (value) {
|
||||||
// // 获取接口
|
// // 获取接口
|
||||||
@@ -235,10 +237,12 @@
|
|||||||
notificationMethod: null,
|
notificationMethod: null,
|
||||||
hxAlarmNotifyUserList: [],
|
hxAlarmNotifyUserList: [],
|
||||||
enableNotifications: 0,
|
enableNotifications: 0,
|
||||||
|
orgId: null,
|
||||||
};
|
};
|
||||||
obj.notificationMethod = infoObject.value.notificationMethod.toString();
|
obj.notificationMethod = infoObject.value.notificationMethod.toString();
|
||||||
obj.id = infoObject.value.id;
|
obj.id = infoObject.value.id;
|
||||||
obj.enableNotifications = infoObject.value.enableNotifications;
|
obj.enableNotifications = infoObject.value.enableNotifications;
|
||||||
|
obj.orgId = infoObject.value.orgId;
|
||||||
//处理 选择人数据
|
//处理 选择人数据
|
||||||
dataSource.value.forEach((item) => {
|
dataSource.value.forEach((item) => {
|
||||||
obj.hxAlarmNotifyUserList.push({
|
obj.hxAlarmNotifyUserList.push({
|
||||||
|
Reference in New Issue
Block a user