| | |
| | | }); |
| | | }, |
| | | chooseEdit(data) { |
| | | this.$prompt("请输入新的场景名称", "提示", { |
| | | this.$prompt("请输入新的时间段名称", "提示", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | }) |
| | | .then(({ value }) => { |
| | | let repeat = false; |
| | | this.VideoManageData.TimeRules.forEach((item) => { |
| | | if (item.name === value) { |
| | | repeat = true; |
| | | } |
| | | }); |
| | | console.log("aaa"); |
| | | console.log(repeat); |
| | | if (repeat) { |
| | | this.$notify({ |
| | | message: "名称不能重复", |
| | | type: "warning", |
| | | }); |
| | | return; |
| | | } |
| | | |
| | | this.activeTabObj.name = value; |
| | | this.save(); |
| | | }) |
| | |
| | | return; |
| | | } |
| | | |
| | | this.$confirm( |
| | | "此操作将永久删除该规则, 所关联的任务将会失效,是否继续?", |
| | | { |
| | | center: true, |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | } |
| | | ) |
| | | this.$confirm("此操作将删除该规则, 所关联的任务将会失效,是否继续?", { |
| | | center: true, |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | }) |
| | | .then(() => { |
| | | deleteTimeRule({ id: tabId }).then((rsp) => { |
| | | if (rsp && rsp.success) { |
| | |
| | | padding: 0 20px; |
| | | margin-top: 20px; |
| | | display: flex; |
| | | justify-content: end; |
| | | justify-content: flex-end; |
| | | text-align: center; |
| | | line-height: 32px; |
| | | font-size: 14px; |
| | |
| | | .btns { |
| | | position: absolute; |
| | | display: flex; |
| | | justify-content: end; |
| | | justify-content: flex-end; |
| | | align-items: center; |
| | | left: 0; |
| | | right: 0; |