删除多余文件,添加引用的js文件

This commit is contained in:
kerwincui
2025-03-20 22:28:07 +08:00
parent f7e9e403b0
commit 462da2a6ce
42 changed files with 14113 additions and 1230 deletions

File diff suppressed because it is too large Load Diff

Binary file not shown.

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,280 @@
<template>
<div ref="container" @dblclick="fullscreenSwich"
style="width:100%;height:100%;background-color: #000000;margin:0 auto;">
</div>
</template>
<script>
let jessibucaPlayer = {};
export default {
name: 'jessibuca',
data() {
return {
playing: false,
isNotMute: false,
quieting: false,
fullscreen: false,
loaded: false, // mute
speed: 0,
performance: "", // 工作情况
kBps: 0,
btnDom: null,
videoInfo: null,
volume: 1,
rotate: 0,
vod: true, // 点播
forceNoOffscreen: false,
};
},
props: ['videoUrl', 'error', 'hasAudio', 'height'],
mounted() {
window.onerror = (msg) => {
// console.error(msg)
};
console.log(this._uid)
let paramUrl = decodeURIComponent(this.$route.params.url)
this.$nextTick(() => {
this.updatePlayerDomSize()
window.onresize = () => {
this.updatePlayerDomSize()
}
if (typeof (this.videoUrl) == "undefined") {
this.videoUrl = paramUrl;
}
this.btnDom = document.getElementById("buttonsBox");
console.log("初始化时的地址为: " + this.videoUrl)
this.play(this.videoUrl)
})
},
watch: {
videoUrl(newData, oldData) {
this.play(newData)
},
immediate: true
},
methods: {
updatePlayerDomSize() {
let dom = this.$refs.container;
let width = dom.parentNode.clientWidth
let height = (9 / 16) * width
const clientHeight = Math.min(document.body.clientHeight, document.documentElement.clientHeight)
if (height > clientHeight) {
height = clientHeight
width = (16 / 9) * height
}
dom.style.width = width + 'px';
dom.style.height = height + "px";
},
create() {
let options = {};
jessibucaPlayer[this._uid] = new window.JessibucaPro(Object.assign(
{
container: this.$refs.container,
autoWasm: true,
background: "",
controlAutoHide: false,
debug: false,
debugLevel: "debug",
decoder: "/js/jessibuca-pro/decoder-pro.js",
forceNoOffscreen: true,
hasAudio: typeof (this.hasAudio) == "undefined" ? true : this.hasAudio,
hasVideo: true,
heartTimeout: 5,
heartTimeoutReplay: true,
heartTimeoutReplayTimes: 3,
hiddenAutoPause: false,
hotKey: false,
isFlv: false,
isFullResize: false,
isNotMute: this.isNotMute,
isResize: false,
keepScreenOn: false,
loadingText: "请稍等, 视频加载中......",
loadingTimeout: 10,
loadingTimeoutReplay: true,
loadingTimeoutReplayTimes: 3,
openWebglAlignment: false,
operateBtns: {
fullscreen: true,
zoom: true,
ptz: false,
play: true
},
recordType: "webm",
rotate: 0,
showBandwidth: false,
supportDblclickFullscreen: false,
timeout: 10,
useMSE: location.hostname !== "localhost" && location.protocol !== "https:",
useOffscreen: false,
useWCS: location.hostname === "localhost" || location.protocol === "https",
useWebFullScreen: false,
videoBuffer: 0,
wasmDecodeAudioSyncVideo: true,
wasmDecodeErrorReplay: true,
wcsUseVideoRender: true
},
options
));
let jessibuca = jessibucaPlayer[this._uid];
let _this = this;
jessibuca.on("load", function () {
console.log("on load init");
});
jessibuca.on("log", function (msg) {
console.log("on log", msg);
});
jessibuca.on("record", function (msg) {
console.log("on record:", msg);
});
jessibuca.on("pause", function () {
_this.playing = false;
_this.loaded = true;
});
jessibuca.on("play", function () {
_this.playing = true;
_this.loaded = true;
});
jessibuca.on("fullscreen", function (msg) {
console.log("on fullscreen", msg);
_this.fullscreen = msg
});
jessibuca.on("mute", function (msg) {
console.log("on mute", msg);
_this.isNotMute = !msg;
});
jessibuca.on("audioInfo", function (msg) {
console.log("audioInfo", msg);
});
let _ts = 0;
jessibuca.on("timeUpdate", function (ts) {
// console.log('timeUpdate,old,new,timestamp', _ts, ts, ts - _ts);
_ts = ts;
});
jessibuca.on("performance", function (performance) {
let show = "卡顿";
if (performance === 2) {
show = "非常流畅";
} else if (performance === 1) {
show = "流畅";
}
_this.performance = show;
});
jessibuca.on('kBps', function (kBps) {
_this.kBps = Math.round(kBps);
});
},
play: function (url) {
if (jessibucaPlayer[this._uid]) {
this.destroy().then(() => {
if (jessibucaPlayer[this._uid] && jessibucaPlayer[this._uid].hasLoaded()) {
jessibucaPlayer[this._uid].play(url);
} else {
jessibucaPlayer[this._uid].on("load", () => {
console.log("load 播放")
jessibucaPlayer[this._uid].play(url);
});
}
});
} else {
this.create();
if (jessibucaPlayer[this._uid] && jessibucaPlayer[this._uid].hasLoaded()) {
jessibucaPlayer[this._uid].play(url);
} else {
jessibucaPlayer[this._uid].on("load", () => {
console.log("load 播放")
jessibucaPlayer[this._uid].play(url);
});
}
}
},
pause: function () {
if (jessibucaPlayer[this._uid]) {
jessibucaPlayer[this._uid].pause();
}
this.playing = false;
this.err = "";
this.performance = "";
},
screenshot: function () {
if (jessibucaPlayer[this._uid]) {
jessibucaPlayer[this._uid].screenshot();
}
},
mute: function () {
if (jessibucaPlayer[this._uid]) {
jessibucaPlayer[this._uid].mute();
}
},
cancelMute: function () {
if (jessibucaPlayer[this._uid]) {
jessibucaPlayer[this._uid].cancelMute();
}
},
destroy: async function () {
if (jessibucaPlayer[this._uid]) {
await jessibucaPlayer[this._uid].destroy().then(() => {
jessibucaPlayer[this._uid] = null;
this.playing = false;
this.create();
});
}
},
fullscreenSwich: function () {
let isFull = this.isFullscreen()
jessibucaPlayer[this._uid].setFullscreen(!isFull)
this.fullscreen = !isFull;
},
isFullscreen: function () {
return document.fullscreenElement ||
document.msFullscreenElement ||
document.mozFullScreenElement ||
document.webkitFullscreenElement || false;
}
},
destroyed() {
if (jessibucaPlayer[this._uid]) {
jessibucaPlayer[this._uid].destroy();
}
this.playing = false;
this.loaded = false;
this.performance = "";
},
}
</script>
<style>
@import '../css/iconfont.css';
.buttons-box {
width: 100%;
height: 28px;
background-color: rgba(43, 51, 63, 0.7);
position: absolute;
display: -webkit-box;
display: -ms-flexbox;
display: flex;
left: 0;
bottom: 0;
user-select: none;
z-index: 10;
}
.jessibuca-btn {
width: 20px;
color: rgb(255, 255, 255);
line-height: 27px;
margin: 0px 10px;
padding: 0px 2px;
cursor: pointer;
text-align: center;
font-size: 0.8rem !important;
}
.buttons-box-right {
position: absolute;
right: 0;
}
</style>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -1,19 +0,0 @@
<template>
<div style="padding-left:20px;">
<el-row :gutter="10">
<el-col :span="14">
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-tag type="danger" style="margin-left:15px;">开源版本不支持该功能,请前往购买商业版本</el-tag>
</el-col>
</el-row>
</el-col>
</el-row>
</div>
</template>
<style scoped lang="scss">
</style>
<script>
</script>

View File

@@ -1,338 +0,0 @@
<template>
<div class="app-container">
<el-form v-show="showSearch" ref="queryForm" :inline="true" :model="queryParams" label-width="85px">
<el-form-item label="第三方平台" prop="platform">
<el-select v-model="queryParams.platform" clearable placeholder="请选择平台" size="small">
<el-option v-for="dict in dict.type.iot_social_platform" :key="dict.value" :label="dict.label" :value="dict.value" />
</el-select>
</el-form-item>
<el-form-item label="状态" prop="status">
<el-select v-model="queryParams.status" clearable placeholder="请选择状态" size="small">
<el-option v-for="dict in dict.type.iot_social_platform_status" :key="dict.value" :label="dict.label" :value="dict.value" />
</el-select>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd" v-hasPermi="['iot:platform:add']">新增
</el-button>
</el-col>
<el-col :span="1.5">
<el-button type="success" plain icon="el-icon-edit" size="mini" :disabled="single" @click="handleUpdate" v-hasPermi="['iot:platform:edit']">修改
</el-button>
</el-col>
<el-col :span="1.5">
<el-button type="danger" plain icon="el-icon-delete" size="mini" :disabled="multiple" @click="handleDelete" v-hasPermi="['iot:platform:remove']">删除
</el-button>
</el-col>
<el-col :span="1.5">
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport" v-hasPermi="['iot:platform:export']">导出
</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="platformList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column align="center" label="平台名称" prop="platform">
<template slot-scope="scope">
<dict-tag :options="dict.type.iot_social_platform" :value="scope.row.platform" />
</template>
</el-table-column>
<el-table-column align="center" label="状态" prop="status" width="75">
<template slot-scope="scope">
<dict-tag :options="dict.type.iot_social_platform_status" :value="scope.row.status" />
</template>
</el-table-column>
<el-table-column label="平台申请ID" align="center" prop="clientId" />
<el-table-column label="跳转地址" align="center" prop="redirectUri" width="180" :show-overflow-tooltip="true" />
<el-table-column align="center" label="绑定登录uri" prop="bindUri" :show-tooltip-when-overflow="true" :render-header="(h,column)=>renderHeaderMethods(h,column,columnTips.bindId)" />
<el-table-column align="center" label="跳转登录uri" prop="redirectLoginUri" :show-tooltip-when-overflow="true" :render-header="(h,column)=>renderHeaderMethods(h,column,columnTips.redirectLogin)" />
<el-table-column align="center" label="错误提示uri" prop="errorMsgUri" :show-tooltip-when-overflow="true" :render-header="(h,column)=>renderHeaderMethods(h,column,columnTips.errorId)" />
<el-table-column align="center" label="创建时间" prop="createTime" width="100">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d}') }}</span>
</template>
</el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button size="mini" type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)" v-hasPermi="['iot:platform:edit']">修改
</el-button>
<el-button size="mini" type="text" icon="el-icon-delete" @click="handleDelete(scope.row)" v-hasPermi="['iot:platform:remove']">删除
</el-button>
</template>
</el-table-column>
</el-table>
<pagination v-show="total>0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize" @pagination="getList" />
<!-- 添加或修改第三方登录平台控制对话框 -->
<el-dialog :title="title" :visible.sync="open" width="600px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="140px">
<el-form-item label="第三方平台名称" prop="platform">
<el-select v-model="form.platform" placeholder="请选择第三方平台">
<el-option v-for="dict in dict.type.iot_social_platform" :key="dict.value" :label="dict.label" :value="dict.value"></el-option>
</el-select>
</el-form-item>
<el-form-item label="第三方平台状态" prop="status">
<el-select v-model="form.status" placeholder="请选择状态">
<el-option v-for="dict in dict.type.iot_social_platform_status" :key="dict.value" :label="dict.label" :value="dict.value"></el-option>
</el-select>
</el-form-item>
<el-form-item label="第三方平台申请ID" prop="clientId">
<el-input v-model="form.clientId" placeholder="请输入第三方平台申请Id" />
</el-form-item>
<el-form-item label="第三方平台密钥" prop="secretKey">
<el-input v-model="form.secretKey" placeholder="请输入第三方平台密钥" />
</el-form-item>
<el-form-item label="用户认证跳转地址" prop="redirectUri">
<el-input v-model="form.redirectUri" placeholder="请输入用户认证后跳转地址" />
</el-form-item>
<el-form-item label="绑定注册登录URI" prop="bindUri">
<el-input v-model="form.bindUri" placeholder="请输入绑定注册登录uri,http://localhost/login?bindId=" />
</el-form-item>
<el-form-item label="跳转登录URI" prop="redirectLoginUri">
<el-input v-model="form.redirectLoginUri" placeholder="请输入跳转登录uri,http://localhost/login?loginId=" />
</el-form-item>
<el-form-item label="错误提示URI" prop="errorMsgUri">
<el-input v-model="form.errorMsgUri" placeholder="请输入错误提示uri,http://localhost/login?errorId=" />
</el-form-item>
<el-form-item label="备注" prop="remark">
<el-input v-model="form.remark" placeholder="请输入内容" type="textarea" />
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button>
<el-button @click="cancel"> </el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import {
addPlatform,
delPlatform,
getPlatform,
listPlatform,
updatePlatform
} from "@/api/iot/platform";
export default {
name: "Platform",
dicts: ['iot_social_platform', 'iot_social_platform_status'],
data() {
return {
// 遮罩层
loading: true,
// 选中数组
ids: [],
// 非单个禁用
single: true,
// 非多个禁用
multiple: true,
// 显示搜索条件
showSearch: true,
// 总条数
total: 0,
// 第三方登录平台控制表格数据
platformList: [],
// 弹出层标题
title: "",
// 是否显示弹出层
open: false,
// 查询参数
queryParams: {
pageNum: 1,
pageSize: 10,
platform: null,
status: null,
},
columnTips: {
bindId: "绑定登录uri, http://localhost/login?bindId=,域名换成对应域名即可,本地开发不需要更改",
redirectLogin: "跳转登录uri,http://localhost/login?loginId=,域名换成对应域名即可,本地开发不需要更改",
errorId: "错误提示获取uri,http://localhost/login?errorId=,域名换成对应域名即可,本地开发不需要更改"
},
// 表单参数
form: {},
// 表单校验
rules: {
platform: [{
required: true,
message: "第三方平台不能为空",
trigger: "change"
}],
status: [{
required: true,
message: " 0:启用 ,1:禁用不能为空",
trigger: "change"
}],
clientId: [{
required: true,
message: "第三方平台申请Id不能为空",
trigger: "blur"
}],
secretKey: [{
required: true,
message: "第三方平台密钥不能为空",
trigger: "blur"
}],
redirectUri: [{
required: true,
message: "用户认证后跳转地址不能为空",
trigger: "blur"
}],
bindUri: [{
required: true,
message: "绑定注册登录uri,http://localhost/login?bindId=不能为空",
trigger: "blur"
}],
redirectLoginUri: [{
required: true,
message: "跳转登录uri,http://localhost/login?loginId=不能为空",
trigger: "blur"
}],
errorMsgUri: [{
required: true,
message: "错误提示uri,http://localhost/login?errorId=不能为空",
trigger: "blur"
}]
}
};
},
created() {
this.getList();
},
methods: {
renderHeaderMethods(h, {
column
}, content) {
return h(
'div', [
h('span', column.label),
h('el-tooltip', {
props: {
effect: 'dark',
content: content,
placement: 'top'
},
}, [
h('i', {
class: 'el-icon-question',
style: 'color:#409EFF;margin-left:5px;'
})
])
]
);
},
/** 查询第三方登录平台控制列表 */
getList() {
this.loading = true;
listPlatform(this.queryParams).then(response => {
this.platformList = response.rows;
this.total = response.total;
this.loading = false;
});
},
// 取消按钮
cancel() {
this.open = false;
this.reset();
},
// 表单重置
reset() {
this.form = {
socialPlatformId: null,
platform: null,
status: null,
clientId: null,
secretKey: null,
redirectUri: null,
createBy: null,
createTime: null,
updateTime: null,
updateBy: null,
remark: null,
bindUri: null,
redirectLoginUri: null,
errorMsgUri: null
};
this.resetForm("form");
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
// 多选框选中数据
handleSelectionChange(selection) {
this.ids = selection.map(item => item.socialPlatformId)
this.single = selection.length !== 1
this.multiple = !selection.length
},
/** 新增按钮操作 */
handleAdd() {
this.reset();
this.open = true;
this.title = "添加第三方登录平台控制";
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
const socialPlatformId = row.socialPlatformId || this.ids
getPlatform(socialPlatformId).then(response => {
this.form = response.data;
this.open = true;
this.title = "修改第三方登录平台控制";
});
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate(valid => {
if (valid) {
if (this.form.socialPlatformId != null) {
updatePlatform(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
});
} else {
addPlatform(this.form).then(response => {
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
});
}
}
});
},
/** 删除按钮操作 */
handleDelete(row) {
const socialPlatformIds = row.socialPlatformId || this.ids;
this.$modal.confirm('是否确认删除第三方登录平台控制编号为"' + socialPlatformIds + '"的数据项?').then(function () {
return delPlatform(socialPlatformIds);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {});
},
/** 导出按钮操作 */
handleExport() {
this.download('iot/platform/export', {
...this.queryParams
}, `platform_${new Date().getTime()}.xlsx`)
}
}
};
</script>

View File

@@ -1,234 +0,0 @@
<template>
<div style="padding:6px;">
<el-card v-show="showSearch" style="margin-bottom:6px;">
<el-form :model="queryParams" ref="queryForm" :inline="true" label-width="68px" style="margin-bottom:-20px;">
<el-form-item label="协议名称" prop="protocolName">
<el-input v-model="queryParams.protocolName" placeholder="请输入协议名称" clearable size="small" @keyup.enter.native="handleQuery" />
</el-form-item>
<el-form-item label="协议编码" prop="protocolCode">
<el-input v-model="queryParams.protocolCode" placeholder="请输入协议编码" clearable size="small" @keyup.enter.native="handleQuery" />
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
</el-card>
<el-card style="padding-bottom:100px;">
<el-table v-loading="loading" :data="protocolList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="协议名称" align="center" prop="protocolName" />
<el-table-column label="协议编码" align="center" prop="protocolCode" />
<el-table-column label="上传地址" align="center" prop="protocolFileUrl" />
<el-table-column label="协议类型" align="center" prop="protocolType" />
<el-table-column label="协议摘要" align="center" prop="jarSign" />
</el-table>
<pagination v-show="total>0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize" @pagination="getList" />
<!-- 添加或修改协议对话框 -->
<el-dialog :title="title" :visible.sync="open" width="600px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
<el-form-item label="协议名称" prop="protocolName">
<el-input v-model="form.protocolName" placeholder="请输入协议名称" />
</el-form-item>
<el-form-item label="协议编码" prop="protocolCode">
<el-input v-model="form.protocolCode" placeholder="请输入协议编码" />
</el-form-item>
<el-form-item label="上传地址" prop="protocolFileUrl">
<el-input v-model="form.protocolFileUrl" type="textarea" placeholder="请输入内容" />
</el-form-item>
<el-form-item label="协议摘要" prop="jarSign">
<el-input v-model="form.jarSign" placeholder="请输入协议文件摘要(文件的md5)" />
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button>
<el-button @click="cancel"> </el-button>
</div>
</el-dialog>
</el-card>
</div>
</template>
<script>
import {
listProtocol,
getProtocol,
delProtocol,
addProtocol,
updateProtocol
} from "@/api/iot/protocol";
export default {
name: "Protocol",
data() {
return {
// 遮罩层
loading: true,
// 选中数组
ids: [],
// 非单个禁用
single: true,
// 非多个禁用
multiple: true,
// 显示搜索条件
showSearch: true,
// 总条数
total: 0,
// 协议表格数据
protocolList: [],
// 弹出层标题
title: "",
// 是否显示弹出层
open: false,
// 查询参数
queryParams: {
pageNum: 1,
pageSize: 10,
protocolCode: null,
protocolName: null,
protocolFileUrl: null,
protocolType: null,
jarSign: null,
protocolStatus: null,
},
// 表单参数
form: {},
// 表单校验
rules: {
protocolCode: [{
required: true,
message: "协议编码不能为空",
trigger: "blur"
}],
protocolName: [{
required: true,
message: "协议名称不能为空",
trigger: "blur"
}],
protocolFileUrl: [{
required: true,
message: "协议上传地址不能为空",
trigger: "blur"
}],
protocolType: [{
required: true,
message: "协议类型不能为空",
trigger: "change"
}],
jarSign: [{
required: true,
message: "协议摘要不能为空",
trigger: "blur"
}]
}
};
},
created() {
this.getList();
},
methods: {
/** 查询协议列表 */
getList() {
this.loading = true;
listProtocol(this.queryParams).then(response => {
this.protocolList = response.rows;
this.total = response.total;
this.loading = false;
});
},
// 取消按钮
cancel() {
this.open = false;
this.reset();
},
// 表单重置
reset() {
this.form = {
id: null,
protocolCode: null,
protocolName: null,
protocolFileUrl: null,
protocolType: null,
jarSign: null,
createTime: null,
updateTime: null,
protocolStatus: 0,
delFlag: null
};
this.resetForm("form");
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
// 多选框选中数据
handleSelectionChange(selection) {
this.ids = selection.map(item => item.id)
this.single = selection.length !== 1
this.multiple = !selection.length
},
/** 新增按钮操作 */
handleAdd() {
this.reset();
this.open = true;
this.title = "添加协议";
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
const id = row.id || this.ids
getProtocol(id).then(response => {
this.form = response.data;
this.open = true;
this.title = "修改协议";
});
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate(valid => {
if (valid) {
if (this.form.id != null) {
updateProtocol(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
});
} else {
addProtocol(this.form).then(response => {
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
});
}
}
});
},
/** 删除按钮操作 */
handleDelete(row) {
const ids = row.id || this.ids;
this.$modal.confirm('是否确认删除协议编号为"' + ids + '"的数据项?').then(function () {
return delProtocol(ids);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {});
},
/** 导出按钮操作 */
handleExport() {
this.download('iot/protocol/export', {
...this.queryParams
}, `protocol_${new Date().getTime()}.xlsx`)
}
}
};
</script>