|
@@ -225,13 +225,14 @@
|
|
|
icon="edit"
|
|
icon="edit"
|
|
|
text
|
|
text
|
|
|
@click="openChannel('通道编辑', scope.row)"
|
|
@click="openChannel('通道编辑', scope.row)"
|
|
|
- >{{$t.value.modify}}
|
|
|
|
|
|
|
+ >{{ $t.value.modify }}
|
|
|
</el-button>
|
|
</el-button>
|
|
|
<el-button
|
|
<el-button
|
|
|
type="primary"
|
|
type="primary"
|
|
|
icon="delete"
|
|
icon="delete"
|
|
|
text
|
|
text
|
|
|
- >{{$t.value.remove}}
|
|
|
|
|
|
|
+ @click="removeChannel(scope.row.ID)"
|
|
|
|
|
+ >{{ $t.value.remove }}
|
|
|
</el-button>
|
|
</el-button>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
</el-table>
|
|
</el-table>
|
|
@@ -259,7 +260,7 @@
|
|
|
text
|
|
text
|
|
|
type="success"
|
|
type="success"
|
|
|
@click="openDevice('新增设备','')"
|
|
@click="openDevice('新增设备','')"
|
|
|
- >{{$t.value.new}}
|
|
|
|
|
|
|
+ >{{ $t.value.new }}
|
|
|
</el-button>
|
|
</el-button>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
<el-form-item>
|
|
<el-form-item>
|
|
@@ -268,7 +269,7 @@
|
|
|
text
|
|
text
|
|
|
type="primary"
|
|
type="primary"
|
|
|
@click="getDeviceList"
|
|
@click="getDeviceList"
|
|
|
- >{{$t.value.reload}}
|
|
|
|
|
|
|
+ >{{ $t.value.reload }}
|
|
|
</el-button>
|
|
</el-button>
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
</el-form>
|
|
</el-form>
|
|
@@ -338,14 +339,14 @@
|
|
|
icon="edit"
|
|
icon="edit"
|
|
|
text
|
|
text
|
|
|
@click="openDevice('编辑设备', scope.row)"
|
|
@click="openDevice('编辑设备', scope.row)"
|
|
|
- >{{$t.value.modify}}
|
|
|
|
|
|
|
+ >{{ $t.value.modify }}
|
|
|
</el-button>
|
|
</el-button>
|
|
|
<el-button
|
|
<el-button
|
|
|
type="primary"
|
|
type="primary"
|
|
|
icon="delete"
|
|
icon="delete"
|
|
|
text
|
|
text
|
|
|
@click="removeDevice(scope.row.ID)"
|
|
@click="removeDevice(scope.row.ID)"
|
|
|
- >{{$t.value.remove}}
|
|
|
|
|
|
|
+ >{{ $t.value.remove }}
|
|
|
</el-button>
|
|
</el-button>
|
|
|
</template>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
@@ -481,13 +482,13 @@
|
|
|
<template #footer>
|
|
<template #footer>
|
|
|
<div class="dialog-footer">
|
|
<div class="dialog-footer">
|
|
|
<el-button @click="channelShow = false">
|
|
<el-button @click="channelShow = false">
|
|
|
- {{$t.value.Cancel}}
|
|
|
|
|
|
|
+ {{ $t.value.Cancel }}
|
|
|
</el-button>
|
|
</el-button>
|
|
|
<el-button
|
|
<el-button
|
|
|
type="primary"
|
|
type="primary"
|
|
|
@click="channelOperation"
|
|
@click="channelOperation"
|
|
|
>
|
|
>
|
|
|
- {{$t.value.Confirm}}
|
|
|
|
|
|
|
+ {{ $t.value.Confirm }}
|
|
|
</el-button>
|
|
</el-button>
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
@@ -584,12 +585,12 @@
|
|
|
</el-form>
|
|
</el-form>
|
|
|
<template #footer>
|
|
<template #footer>
|
|
|
<div class="dialog-footer">
|
|
<div class="dialog-footer">
|
|
|
- <el-button @click="deviceShow = false">{{$t.value.Cancel}}</el-button>
|
|
|
|
|
|
|
+ <el-button @click="deviceShow = false">{{ $t.value.Cancel }}</el-button>
|
|
|
<el-button
|
|
<el-button
|
|
|
type="primary"
|
|
type="primary"
|
|
|
@click="deviceOperation"
|
|
@click="deviceOperation"
|
|
|
>
|
|
>
|
|
|
- {{$t.value.Confirm}}
|
|
|
|
|
|
|
+ {{ $t.value.Confirm }}
|
|
|
</el-button>
|
|
</el-button>
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
@@ -647,10 +648,12 @@ import {
|
|
|
addChannel,
|
|
addChannel,
|
|
|
editChannel,
|
|
editChannel,
|
|
|
obtainChannelList,
|
|
obtainChannelList,
|
|
|
|
|
+ deleteChannel
|
|
|
} from '@/api/channel'
|
|
} from '@/api/channel'
|
|
|
import { addDevice, obtainDeviceList, editDevice, deleteDevice, joinDevice } from '@/api/device'
|
|
import { addDevice, obtainDeviceList, editDevice, deleteDevice, joinDevice } from '@/api/device'
|
|
|
import { addPullOver, editPullOver, obtainPullOverList, removePullOver } from '@/api/pullOver'
|
|
import { addPullOver, editPullOver, obtainPullOverList, removePullOver } from '@/api/pullOver'
|
|
|
import { ElMessage, ElMessageBox } from 'element-plus'
|
|
import { ElMessage, ElMessageBox } from 'element-plus'
|
|
|
|
|
+import { t } from '@/lang/index.js'
|
|
|
|
|
|
|
|
const activeName = ref('detail')
|
|
const activeName = ref('detail')
|
|
|
const handleClick = () => {
|
|
const handleClick = () => {
|
|
@@ -919,6 +922,40 @@ const getChannelList = () => {
|
|
|
})
|
|
})
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+const removeChannel = (id) => {
|
|
|
|
|
+ ElMessageBox.confirm(
|
|
|
|
|
+ t.value.deletePassageTip,
|
|
|
|
|
+ t.value.tip,
|
|
|
|
|
+ {
|
|
|
|
|
+ confirmButtonText: t.value.Confirm,
|
|
|
|
|
+ cancelButtonText: t.value.Cancel,
|
|
|
|
|
+ type: 'warning',
|
|
|
|
|
+ }
|
|
|
|
|
+ )
|
|
|
|
|
+ .then(() => {
|
|
|
|
|
+ deleteChannel(id).then(res => {
|
|
|
|
|
+ if (res.code === 0) {
|
|
|
|
|
+ ElMessage({
|
|
|
|
|
+ type: 'success',
|
|
|
|
|
+ message: t.value.deleteSuccess,
|
|
|
|
|
+ })
|
|
|
|
|
+ getChannelList()
|
|
|
|
|
+ } else {
|
|
|
|
|
+ ElMessage({
|
|
|
|
|
+ type: 'error',
|
|
|
|
|
+ message: t.value.deleteFailed,
|
|
|
|
|
+ })
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+ })
|
|
|
|
|
+ .catch(() => {
|
|
|
|
|
+ ElMessage({
|
|
|
|
|
+ type: 'info',
|
|
|
|
|
+ message: t.value.cancelDelete,
|
|
|
|
|
+ })
|
|
|
|
|
+ })
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
// 设备管理...............................................
|
|
// 设备管理...............................................
|
|
|
const deviceData = reactive({
|
|
const deviceData = reactive({
|
|
|
id: 0,
|
|
id: 0,
|
|
@@ -1045,11 +1082,11 @@ const getDeviceList = async() => {
|
|
|
|
|
|
|
|
const removeDevice = async(id) => {
|
|
const removeDevice = async(id) => {
|
|
|
ElMessageBox.confirm(
|
|
ElMessageBox.confirm(
|
|
|
- this.$t.deleteDeviceTip,
|
|
|
|
|
- '提示',
|
|
|
|
|
|
|
+ t.value.deleteDeviceTip,
|
|
|
|
|
+ t.value.tip,
|
|
|
{
|
|
{
|
|
|
- confirmButtonText: '确认',
|
|
|
|
|
- cancelButtonText: '取消',
|
|
|
|
|
|
|
+ confirmButtonText: t.value.Confirm,
|
|
|
|
|
+ cancelButtonText: t.value.Cancel,
|
|
|
type: 'warning',
|
|
type: 'warning',
|
|
|
}
|
|
}
|
|
|
)
|
|
)
|