|
@@ -17,6 +17,20 @@
|
|
|
</el-form>
|
|
</el-form>
|
|
|
</div>
|
|
</div>
|
|
|
<div class="gva-table-box">
|
|
<div class="gva-table-box">
|
|
|
|
|
+ <div class="gva-btn-list">
|
|
|
|
|
+ <el-button size="small" icon="refresh" @click="onReset">刷新</el-button>
|
|
|
|
|
+ <el-popover v-model="deleteVisible" placement="top" width="160">
|
|
|
|
|
+ <p>确定要删除吗?</p>
|
|
|
|
|
+ <div style="text-align: right; margin-top: 8px;">
|
|
|
|
|
+ <el-button size="small" type="primary" link @click="deleteVisible = false">取消</el-button>
|
|
|
|
|
+ <el-button size="small" type="primary" @click="onDelete">确定</el-button>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <template #reference>
|
|
|
|
|
+ <el-button icon="delete" type="danger" size="small" :disabled="!apis.length"
|
|
|
|
|
+ style="margin-left: 10px;" @click="deleteVisible = true">删除</el-button>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </el-popover>
|
|
|
|
|
+ </div>
|
|
|
<el-table :data="tableData" border @sort-change="sortChange" @selection-change="handleSelectionChange">
|
|
<el-table :data="tableData" border @sort-change="sortChange" @selection-change="handleSelectionChange">
|
|
|
<el-table-column type="selection" width="55" />
|
|
<el-table-column type="selection" width="55" />
|
|
|
<el-table-column align="left" label="任务ID" min-width="60" prop="task_id" sortable="custom" />
|
|
<el-table-column align="left" label="任务ID" min-width="60" prop="task_id" sortable="custom" />
|
|
@@ -60,7 +74,8 @@ export default {
|
|
|
import {
|
|
import {
|
|
|
statusChange,
|
|
statusChange,
|
|
|
getScriptList,
|
|
getScriptList,
|
|
|
- deleteScript
|
|
|
|
|
|
|
+ deleteScript,
|
|
|
|
|
+ bulkDeleteScript
|
|
|
} from '@/api/taskConf'
|
|
} from '@/api/taskConf'
|
|
|
import {
|
|
import {
|
|
|
selectResponsiblePerson,
|
|
selectResponsiblePerson,
|
|
@@ -193,6 +208,23 @@ const handleSelectionChange = (val) => {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
const deleteVisible = ref(false)
|
|
const deleteVisible = ref(false)
|
|
|
|
|
+const onDelete = async () => {
|
|
|
|
|
+ const ids = apis.value.map(item => item.id)
|
|
|
|
|
+ const res = await bulkDeleteScript({ ids })
|
|
|
|
|
+ if (res.code === 0) {
|
|
|
|
|
+ ElMessage({
|
|
|
|
|
+ type: 'success',
|
|
|
|
|
+ message: res.msg
|
|
|
|
|
+ })
|
|
|
|
|
+ if (tableData.value.length === ids.length && page.value > 1) {
|
|
|
|
|
+ page.value--
|
|
|
|
|
+ }
|
|
|
|
|
+ deleteVisible.value = false
|
|
|
|
|
+ getTableData()
|
|
|
|
|
+ }
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
|
|
|
// 弹窗相关
|
|
// 弹窗相关
|
|
|
const apiForm = ref(null)
|
|
const apiForm = ref(null)
|