|
@@ -10,8 +10,8 @@ import {
|
|
Search,
|
|
Search,
|
|
Upload
|
|
Upload
|
|
} from "@element-plus/icons-vue";
|
|
} from "@element-plus/icons-vue";
|
|
-import {ElMessageBox} from "element-plus";
|
|
|
|
-import {addRuleInfo} from "@/http/api";
|
|
|
|
|
|
+import {ElMessage, ElMessageBox} from "element-plus";
|
|
|
|
+import {addRuleInfo, searchRules} from "@/http/api";
|
|
|
|
|
|
export default {
|
|
export default {
|
|
name: "RulesTable",
|
|
name: "RulesTable",
|
|
@@ -54,14 +54,14 @@ export default {
|
|
searchForm: {
|
|
searchForm: {
|
|
name: '',
|
|
name: '',
|
|
rounds: '',
|
|
rounds: '',
|
|
- duration: '',
|
|
|
|
- interval: ''
|
|
|
|
|
|
+ duration_minutes: '',
|
|
|
|
+ interval_minutes: ''
|
|
},
|
|
},
|
|
tableData: [{
|
|
tableData: [{
|
|
name: '煤炭采购规则',
|
|
name: '煤炭采购规则',
|
|
rounds: '2',
|
|
rounds: '2',
|
|
- duration: '2',
|
|
|
|
- interval: '1'
|
|
|
|
|
|
+ duration_minutes: '2',
|
|
|
|
+ interval_minutes: '1'
|
|
}],
|
|
}],
|
|
addForm: {
|
|
addForm: {
|
|
name: '',
|
|
name: '',
|
|
@@ -89,9 +89,18 @@ export default {
|
|
// catch error
|
|
// catch error
|
|
})
|
|
})
|
|
},
|
|
},
|
|
- addRule(){
|
|
|
|
|
|
+ addRule() {
|
|
addRuleInfo(this.addForm);
|
|
addRuleInfo(this.addForm);
|
|
this.dialogVisible = false;
|
|
this.dialogVisible = false;
|
|
|
|
+ },
|
|
|
|
+ searchRules() {
|
|
|
|
+ searchRules(this.searchForm).then(
|
|
|
|
+ res => {
|
|
|
|
+ console.log(res.data);
|
|
|
|
+ this.tableData = res.data;
|
|
|
|
+ ElMessage.success("搜索成功");
|
|
|
|
+ }
|
|
|
|
+ )
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -108,13 +117,13 @@ export default {
|
|
<el-input v-model="searchForm.rounds" placeholder="请输入轮次数"></el-input>
|
|
<el-input v-model="searchForm.rounds" placeholder="请输入轮次数"></el-input>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<el-form-item label="轮次时间">
|
|
<el-form-item label="轮次时间">
|
|
- <el-input v-model="searchForm.duration" placeholder="请输入轮次时间"></el-input>
|
|
|
|
|
|
+ <el-input v-model="searchForm.duration_minutes" placeholder="请输入轮次时间"></el-input>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<el-form-item label="间隔时长">
|
|
<el-form-item label="间隔时长">
|
|
- <el-input v-model="searchForm.interval" placeholder="请输入间隔时长"></el-input>
|
|
|
|
|
|
+ <el-input v-model="searchForm.interval_minutes" placeholder="请输入间隔时长"></el-input>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<el-form-item>
|
|
<el-form-item>
|
|
- <el-button type="primary" :icon="Search">搜索</el-button>
|
|
|
|
|
|
+ <el-button type="primary" :icon="Search" @click="searchRules">搜索</el-button>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<el-form-item>
|
|
<el-form-item>
|
|
<el-button :icon="Refresh" @click="resetSearchForm">重置</el-button>
|
|
<el-button :icon="Refresh" @click="resetSearchForm">重置</el-button>
|
|
@@ -146,11 +155,11 @@ export default {
|
|
label="轮次数">
|
|
label="轮次数">
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<el-table-column
|
|
<el-table-column
|
|
- prop="duration"
|
|
|
|
|
|
+ prop="duration_minutes"
|
|
label="轮次时间(分钟)">
|
|
label="轮次时间(分钟)">
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<el-table-column
|
|
<el-table-column
|
|
- prop="interval"
|
|
|
|
|
|
+ prop="interval_minutes"
|
|
label="间隔时长(分钟)">
|
|
label="间隔时长(分钟)">
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<el-table-column
|
|
<el-table-column
|