diff --git a/src/components/codemirror.vue b/src/components/codemirror.vue
index d029023..b99fbdc 100644
--- a/src/components/codemirror.vue
+++ b/src/components/codemirror.vue
@@ -9,6 +9,9 @@
+ 我的代码
导入
+
+
+
+
+
+
+
+
+
+
+
+ 查看代码
+ 导入代码
+ 删除
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -246,7 +333,18 @@ export default {
id: 1,
name: '内置模型'
},
- ]
+ ],
+
+ codeVisible: false,
+ codeList: [],
+ multipleSelection: [],
+ keyword: '',
+ page: 1,
+ pageSize: 10,
+ total: 0,
+
+ showVisible: false,
+ showActive: 'code',
};
},
components: {
@@ -612,7 +710,56 @@ export default {
document.onmouseup = null
}
}
- }
+ },
+
+
+ // 我的代码
+ myCode () {
+ this.codeVisible = true
+ },
+ // 批量删除
+ delAll () {
+ if (this.multipleSelection.length) {
+ const newArr = this.multipleSelection
+ const delList = newArr.map(item => {
+ return `ids=${item.id}`
+ })
+ this.$confirm(`此批量删除操作不可逆,是否确认删除?`, '提示', {
+ type: 'warning'
+ }).then(() => {
+ this.$post(`${this.api.batchDeletion}?${delList.join('&')}`).then(res => {
+ this.$refs.table.clearSelection()
+ this.$message.success('删除成功')
+ this.getData()
+ }).catch(res => { })
+ }).catch(() => { })
+ } else {
+ this.$message.error('请先选择数据 !')
+ }
+ },
+ // 删除
+ del (row) {
+ this.$confirm('此删除操作不可逆,是否确认删除选中项?', '提示', {
+ type: 'warning'
+ }).then(() => {
+ this.$post(`${this.api.batchDeletion}?ids=${row.id}`).then(res => {
+ this.$message.success('删除成功')
+ this.getData()
+ }).catch(res => { })
+ }).catch(() => { })
+ },
+ handleCurrentChange (val) {
+ this.page = val
+ this.getData()
+ },
+ handleSelectionChange (val) {
+ this.multipleSelection = val
+ },
+
+ // 导入代码
+ showSubmit () {
+
+ },
}
};
@@ -690,7 +837,7 @@ export default {
}
.del {
width: 40px;
- margin-right: 10px;
+ margin: 0 10px;
line-height: 40px;
color: #fff;
text-align: center;
@@ -829,4 +976,9 @@ export default {
max-height: 400px;
overflow: auto;
}
+/deep/.code-dia {
+ .el-dialog__body {
+ padding: 0 20px;
+ }
+}
\ No newline at end of file
diff --git a/src/styles/theme/theme9.scss b/src/styles/theme/theme9.scss
index 83dbd87..56090b1 100644
--- a/src/styles/theme/theme9.scss
+++ b/src/styles/theme/theme9.scss
@@ -16,10 +16,10 @@ $--font-path: '~element-ui/lib/theme-chalk/fonts';
background: url(../../assets/images/system/9/header.png) 0 0/100% 100%
no-repeat;
}
-.el-tabs__item.is-active {
- color: #fff !important;
- background-color: $--color-primary;
-}
+// .el-tabs__item.is-active {
+// color: #fff !important;
+// background-color: $--color-primary;
+// }
.select .el-select__caret:before {
background-color: $--color-primary;
}