|
@@ -1,120 +1,115 @@
|
|
|
<template>
|
|
|
<div class="intellReport" :class="!theme ? 'themeDark' : 'themeLight'">
|
|
|
- <el-row :gutter="50" justify="space-evenly" :style="pageHeight">
|
|
|
- <el-col :span="9" class="warn-table">
|
|
|
- <existing
|
|
|
- @getExistingData="getData"
|
|
|
- :height="tableHeight"
|
|
|
- :theme="theme"
|
|
|
- />
|
|
|
- </el-col>
|
|
|
- <el-col :span="1" style="text-align: center">
|
|
|
- <div :style="btnHeight">
|
|
|
- <!-- <el-button type="primary" @click="onAddItem1">
|
|
|
- <el-icon class="el-icon--right">
|
|
|
- <ArrowRight />
|
|
|
- </el-icon>
|
|
|
- </el-button> -->
|
|
|
- <img
|
|
|
- src="../../../assets/images/left.png"
|
|
|
- @click="onAddItem1"
|
|
|
- alt=""
|
|
|
- />
|
|
|
+ <div class="l">
|
|
|
+ <existing
|
|
|
+ @getExistingData="getData"
|
|
|
+ :height="tableHeight"
|
|
|
+ :theme="theme"
|
|
|
+ />
|
|
|
+ </div>
|
|
|
+ <div class="c">
|
|
|
+ <div class="t">
|
|
|
+ <el-button
|
|
|
+ type="primary"
|
|
|
+ size="large"
|
|
|
+ :disabled="!childCurrentRow?.length"
|
|
|
+ @click="onAddItem1"
|
|
|
+ >添加至脚本列表
|
|
|
+ <el-icon style="margin-left: 4px" :size="16"><DArrowRight /></el-icon>
|
|
|
+ </el-button>
|
|
|
+ </div>
|
|
|
+ <div class="b">
|
|
|
+ <el-button
|
|
|
+ type="primary"
|
|
|
+ size="large"
|
|
|
+ :disabled="!childCurrentRow?.length"
|
|
|
+ @click="onAddItem2"
|
|
|
+ >添加至每日运行
|
|
|
+ <el-icon style="margin-left: 4px" :size="16"><DArrowRight /></el-icon>
|
|
|
+ </el-button>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="r">
|
|
|
+ <div class="t">
|
|
|
+ <div class="listTop">
|
|
|
+ <p class="tableTit">脚本列表</p>
|
|
|
+ <el-button
|
|
|
+ class="run-all-script"
|
|
|
+ type="primary"
|
|
|
+ :disabled="btnloading"
|
|
|
+ @click="runAllScript"
|
|
|
+ >
|
|
|
+ 全部运行
|
|
|
+ </el-button>
|
|
|
</div>
|
|
|
- <div :style="btnHeight">
|
|
|
- <!-- <el-button type="primary" @click="onAddItem2">
|
|
|
- <el-icon class="el-icon--right">
|
|
|
- <ArrowRight />
|
|
|
- </el-icon>
|
|
|
- </el-button> -->
|
|
|
- <img
|
|
|
- src="../../../assets/images/left.png"
|
|
|
- @click="onAddItem2"
|
|
|
- alt=""
|
|
|
+ <el-table :data="tableData" style="height: calc(100% - 40px)">
|
|
|
+ <el-table-column
|
|
|
+ type="index"
|
|
|
+ label="序号"
|
|
|
+ width="50"
|
|
|
+ align="center"
|
|
|
/>
|
|
|
- </div>
|
|
|
- </el-col>
|
|
|
- <el-col :span="13">
|
|
|
- <div class="listTop warn-table">
|
|
|
- <div style="display: flex; justify-content: space-between">
|
|
|
- <p class="tableTit">脚本列表</p>
|
|
|
- <el-button
|
|
|
- class="run-all-script"
|
|
|
- type="primary"
|
|
|
- :disabled="btnloading"
|
|
|
- @click="runAllScript"
|
|
|
- >
|
|
|
- 全部运行
|
|
|
- </el-button>
|
|
|
- </div>
|
|
|
- <el-table :data="tableData" :height="listHeight">
|
|
|
- <el-table-column type="index" width="30" />
|
|
|
- <el-table-column label="脚本名称">
|
|
|
- <template #default="scope">
|
|
|
- <!-- <el-button v-if="scope.row.scriptName !==''" type="warning" round>
|
|
|
- {{ scope.row.scriptName}}
|
|
|
- </el-button> -->
|
|
|
- <el-tag type="primary">{{ scope.row.scriptName }}</el-tag>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column align="right">
|
|
|
- <template #default="scope">
|
|
|
- <el-button
|
|
|
- :type="`${$store.state.theme ? 'primary' : ''}`"
|
|
|
- :disabled="btnloading"
|
|
|
- @click="handleRun(scope.$index)"
|
|
|
- >运行
|
|
|
- </el-button>
|
|
|
- <el-button type="danger" @click="handleDeleteList(scope.$index)"
|
|
|
- >删除
|
|
|
- </el-button>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- </el-table>
|
|
|
- </div>
|
|
|
-
|
|
|
- <div class="listTop listBot warn-table">
|
|
|
+ <el-table-column label="脚本名称">
|
|
|
+ <template #default="scope">
|
|
|
+ <el-tag type="primary">{{ scope.row.scriptName }}</el-tag>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column align="right">
|
|
|
+ <template #default="scope">
|
|
|
+ <el-button
|
|
|
+ :type="`${$store.state.theme ? 'primary' : ''}`"
|
|
|
+ :disabled="btnloading"
|
|
|
+ @click="handleRun(scope.$index)"
|
|
|
+ >运行
|
|
|
+ </el-button>
|
|
|
+ <el-button type="danger" @click="handleDeleteList(scope.$index)"
|
|
|
+ >删除
|
|
|
+ </el-button>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ </div>
|
|
|
+ <div class="b">
|
|
|
+ <div class="listTop">
|
|
|
<p class="tableTit">每天运行一次</p>
|
|
|
- <el-table :data="tableData4" :max-height="listHeight">
|
|
|
- <el-table-column label="时间" width="300">
|
|
|
- <template #default="scope">
|
|
|
- <el-time-select
|
|
|
- v-model="scope.row.time"
|
|
|
- start="00:05"
|
|
|
- step="00:05"
|
|
|
- end="23:55"
|
|
|
- placeholder="选择时间"
|
|
|
- />
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column label="脚本名称">
|
|
|
- <template #default="scope">
|
|
|
- <!-- <el-button v-if="scope.row.scriptName !==''" type="warning" round>
|
|
|
- {{ scope.row.scriptName}}
|
|
|
- </el-button> -->
|
|
|
- <el-tag type="primary">{{ scope.row.scriptName }}</el-tag>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column align="right">
|
|
|
- <template #default="scope">
|
|
|
- <el-button
|
|
|
- :type="`${$store.state.theme ? 'primary' : ''}`"
|
|
|
- v-if="!scope.row.isRunning"
|
|
|
- @click="dayRun(scope.row)"
|
|
|
- >运行
|
|
|
- </el-button>
|
|
|
- <el-button v-else disabled>运行中 </el-button>
|
|
|
- <el-button
|
|
|
- type="danger"
|
|
|
- @click="handleDeleteDayRun(scope.$index, scope.row)"
|
|
|
- >删除
|
|
|
- </el-button>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- </el-table>
|
|
|
+ <p></p>
|
|
|
</div>
|
|
|
- </el-col>
|
|
|
- </el-row>
|
|
|
+ <el-table :data="tableData4" style="height: calc(100% - 120px)">
|
|
|
+ <el-table-column label="时间" width="300">
|
|
|
+ <template #default="scope">
|
|
|
+ <el-time-select
|
|
|
+ v-model="scope.row.time"
|
|
|
+ start="00:05"
|
|
|
+ step="00:05"
|
|
|
+ end="23:55"
|
|
|
+ placeholder="选择时间"
|
|
|
+ />
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="脚本名称">
|
|
|
+ <template #default="scope">
|
|
|
+ <el-tag type="primary">{{ scope.row.scriptName }}</el-tag>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column align="right">
|
|
|
+ <template #default="scope">
|
|
|
+ <el-button
|
|
|
+ :type="`${$store.state.theme ? 'primary' : ''}`"
|
|
|
+ v-if="!scope.row.isRunning"
|
|
|
+ @click="dayRun(scope.row)"
|
|
|
+ >运行
|
|
|
+ </el-button>
|
|
|
+ <el-button v-else disabled>运行中 </el-button>
|
|
|
+ <el-button
|
|
|
+ type="danger"
|
|
|
+ @click="handleDeleteDayRun(scope.$index, scope.row)"
|
|
|
+ >删除
|
|
|
+ </el-button>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</template>
|
|
|
<script>
|
|
@@ -176,10 +171,10 @@ export default {
|
|
|
});
|
|
|
},
|
|
|
onAddItem1() {
|
|
|
- this.tableData.push(this.childCurrentRow);
|
|
|
+ this.tableData.push(...this.childCurrentRow);
|
|
|
},
|
|
|
onAddItem2() {
|
|
|
- this.tableData4.push(this.childCurrentRow);
|
|
|
+ this.tableData4.push(...this.childCurrentRow);
|
|
|
},
|
|
|
runAllScript() {
|
|
|
this.btnloading = true;
|
|
@@ -230,8 +225,7 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
getData(data) {
|
|
|
- console.log("data:", data);
|
|
|
- this.childCurrentRow = data;
|
|
|
+ this.childCurrentRow = data || [];
|
|
|
},
|
|
|
},
|
|
|
};
|
|
@@ -239,19 +233,67 @@ export default {
|
|
|
|
|
|
<style scoped lang="less">
|
|
|
.intellReport {
|
|
|
- .listTop {
|
|
|
- margin-bottom: 20px;
|
|
|
+ width: 100%;
|
|
|
+ height: 100%;
|
|
|
+ display: flex;
|
|
|
+ justify-content: space-between;
|
|
|
+ align-items: center;
|
|
|
|
|
|
- .tableTit {
|
|
|
- line-height: 40px;
|
|
|
- margin-left: 10px;
|
|
|
+ .l {
|
|
|
+ width: 35%;
|
|
|
+ height: calc(100% - 20px);
|
|
|
+ padding: 0 0 20px 0;
|
|
|
+ margin-left: 20px;
|
|
|
+ }
|
|
|
+ .c {
|
|
|
+ width: 15%;
|
|
|
+ height: calc(100% - 20px);
|
|
|
+ padding: 0 0 20px 0;
|
|
|
+ display: flex;
|
|
|
+ justify-content: center;
|
|
|
+ align-items: center;
|
|
|
+ flex-direction: column;
|
|
|
+
|
|
|
+ .t,
|
|
|
+ .b {
|
|
|
+ width: 100%;
|
|
|
+ height: 50%;
|
|
|
+ display: flex;
|
|
|
+ justify-content: center;
|
|
|
+ align-items: center;
|
|
|
+
|
|
|
+ .el-button {
|
|
|
+ margin: 0;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- .run-all-script {
|
|
|
- position: relative;
|
|
|
- right: 10px;
|
|
|
- top: 10px;
|
|
|
+ .r {
|
|
|
+ width: 45%;
|
|
|
+ height: calc(100% - 20px);
|
|
|
+ padding: 0 0 20px 0;
|
|
|
+ display: flex;
|
|
|
+ justify-content: center;
|
|
|
+ align-items: center;
|
|
|
+ flex-direction: column;
|
|
|
+ margin-right: 20px;
|
|
|
+
|
|
|
+ .t,
|
|
|
+ .b {
|
|
|
+ width: 100%;
|
|
|
+ height: 50%;
|
|
|
+ display: flex;
|
|
|
+ justify-content: flex-start;
|
|
|
+ align-items: center;
|
|
|
+ flex-direction: column;
|
|
|
+
|
|
|
+ .listTop {
|
|
|
+ width: 100%;
|
|
|
+ display: flex;
|
|
|
+ justify-content: space-between;
|
|
|
+ align-items: center;
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -262,7 +304,7 @@ export default {
|
|
|
|
|
|
.tableTit {
|
|
|
font-size: 16px;
|
|
|
- color: #f8f9ff;
|
|
|
+ color: #fff;
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -276,7 +318,7 @@ export default {
|
|
|
|
|
|
.tableTit {
|
|
|
font-size: 16px;
|
|
|
- color: #9093a6;
|
|
|
+ color: #000;
|
|
|
}
|
|
|
}
|
|
|
}
|