| | |
| | | :key="item.id" |
| | | :class="{ active: activeTabObj.id === item.id }" |
| | | > |
| | | <div class="tab" @click="chooseTab(item)"> |
| | | <div |
| | | class="tab" |
| | | @click="chooseTab(item)" |
| | | @dblclick="chooseEdit(item)" |
| | | > |
| | | {{ item.name }} |
| | | </div> |
| | | <div class="iconfont del" @click="handleTabsEdit(item.id, 'remove')"> |
| | |
| | | }; |
| | | }); |
| | | }, |
| | | chooseEdit(data) { |
| | | 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(); |
| | | }) |
| | | .catch(() => {}); |
| | | }, |
| | | |
| | | handleTabsEdit(tabId, action) { |
| | | let tabs = this.VideoManageData.TimeRules; |
| | |
| | | return; |
| | | } |
| | | |
| | | this.$confirm( |
| | | "此操作将永久删除该规则, 所关联的任务将会失效,是否继续?", |
| | | { |
| | | center: true, |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | } |
| | | ) |
| | | this.$confirm("此操作将删除该规则, 所关联的任务将会失效,是否继续?", { |
| | | center: true, |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | }) |
| | | .then(() => { |
| | | deleteTimeRule({ id: tabId }).then((rsp) => { |
| | | if (rsp && rsp.success) { |
| | |
| | | this.isAdding = false; |
| | | }) |
| | | .catch(() => { |
| | | this.$notify({ |
| | | type: "warning", |
| | | message: rsp.msg, |
| | | }); |
| | | this.isAdding = false; |
| | | }); |
| | | }, |
| | |
| | | padding: 0 20px; |
| | | margin-top: 20px; |
| | | display: flex; |
| | | justify-content: end; |
| | | justify-content: flex-end; |
| | | text-align: center; |
| | | line-height: 32px; |
| | | font-size: 14px; |
| | |
| | | position: absolute; |
| | | padding-bottom: 13px; |
| | | padding-right: 18px; |
| | | top: 16px; |
| | | top: 12px; |
| | | left: -34px; |
| | | cursor: pointer; |
| | | border-bottom: 1px solid #e9ebee; |
| | |
| | | |
| | | .swiper-next-border { |
| | | position: absolute; |
| | | top: 16px; |
| | | top: 12px; |
| | | right: -34px; |
| | | padding-bottom: 13px; |
| | | padding-left: 18px; |
| | |
| | | .btns { |
| | | position: absolute; |
| | | display: flex; |
| | | justify-content: end; |
| | | justify-content: flex-end; |
| | | align-items: center; |
| | | left: 0; |
| | | right: 0; |