|
@@ -33,7 +33,12 @@
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
<el-table-column align="left" label="创建时间" min-width="110" prop="create_time" sortable="custom" />
|
|
<el-table-column align="left" label="创建时间" min-width="110" prop="create_time" sortable="custom" />
|
|
|
<el-table-column align="left" label="更新时间" min-width="80" prop="update_time" />
|
|
<el-table-column align="left" label="更新时间" min-width="80" prop="update_time" />
|
|
|
-
|
|
|
|
|
|
|
+ <el-table-column align="left" fixed="right" label="操作" width="200">
|
|
|
|
|
+ <template #default="scope">
|
|
|
|
|
+ <el-button icon="delete" size="small" type="primary" link
|
|
|
|
|
+ @click="deleteScriptFunc(scope.row)">删除</el-button>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </el-table-column>
|
|
|
</el-table>
|
|
</el-table>
|
|
|
<div class="gva-pagination">
|
|
<div class="gva-pagination">
|
|
|
<el-pagination :current-page="page" :page-size="pageSize" :page-sizes="[10, 30, 50, 100]" :total="total"
|
|
<el-pagination :current-page="page" :page-size="pageSize" :page-sizes="[10, 30, 50, 100]" :total="total"
|
|
@@ -55,6 +60,7 @@ export default {
|
|
|
import {
|
|
import {
|
|
|
statusChange,
|
|
statusChange,
|
|
|
getScriptList,
|
|
getScriptList,
|
|
|
|
|
+ deleteScript
|
|
|
} from '@/api/taskConf'
|
|
} from '@/api/taskConf'
|
|
|
import {
|
|
import {
|
|
|
selectResponsiblePerson,
|
|
selectResponsiblePerson,
|
|
@@ -236,6 +242,27 @@ const handleIconClick = (ev) => {
|
|
|
console.log(ev)
|
|
console.log(ev)
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+const deleteScriptFunc = async (row) => {
|
|
|
|
|
+ ElMessageBox.confirm('此操作将永久删除此脚本, 是否继续?', '提示', {
|
|
|
|
|
+ confirmButtonText: '确定',
|
|
|
|
|
+ cancelButtonText: '取消',
|
|
|
|
|
+ type: 'warning'
|
|
|
|
|
+ })
|
|
|
|
|
+ .then(async () => {
|
|
|
|
|
+ const res = await deleteScript(row)
|
|
|
|
|
+ if (res.code === 0) {
|
|
|
|
|
+ ElMessage({
|
|
|
|
|
+ type: 'success',
|
|
|
|
|
+ message: '删除成功!'
|
|
|
|
|
+ })
|
|
|
|
|
+ if (tableData.value.length === 1 && page.value > 1) {
|
|
|
|
|
+ page.value--
|
|
|
|
|
+ }
|
|
|
|
|
+ getTableData()
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
// links.value = loadAll()
|
|
// links.value = loadAll()
|
|
|
|
|
|
|
|
</script>
|
|
</script>
|