|
|
@@ -1,7 +1,7 @@ |
|
|
|
<template> |
|
|
|
<div class="app-container"> |
|
|
|
<search-bar |
|
|
|
:isFold="true" |
|
|
|
:isFold="true" |
|
|
|
:formConfigs="formConfig" |
|
|
|
ref="searchBarForm" |
|
|
|
@headBtnClick="buttonClick" /> |
|
|
@@ -15,11 +15,6 @@ |
|
|
|
v-loading="dataListLoading" |
|
|
|
style="width: 100%" |
|
|
|
ref="dataList"> |
|
|
|
<el-table-column type="expand"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<product :order-id="scope.row.id"></product> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column label="序号" type="index" align="center" /> |
|
|
|
<el-table-column |
|
|
|
prop="mainTaskCode" |
|
|
@@ -112,17 +107,12 @@ |
|
|
|
:page.sync="listQuery.pageNo" |
|
|
|
:total="listQuery.total" |
|
|
|
@pagination="getDataList" /> |
|
|
|
<add-or-update |
|
|
|
v-if="drawerVisible" |
|
|
|
ref="drawerRef" |
|
|
|
@refreshDataList="getDataList" /> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
|
|
|
|
<script> |
|
|
|
import product from './good-mini'; |
|
|
|
import AddOrUpdate from './add-or-updata'; |
|
|
|
import { deleteTask, getTaskPage, runTask } from '@/api/axl/task'; |
|
|
|
import { getJob, updateJobStatus } from '@/api/infra/job'; |
|
|
|
|
|
|
|
const mainTaskType = [ |
|
|
|
{ |
|
|
@@ -167,6 +157,8 @@ export default { |
|
|
|
pageNo: 1, |
|
|
|
total: 1, |
|
|
|
}, |
|
|
|
jobStatus: 1, |
|
|
|
autoText: ['关闭自动执行', '开启自动执行'], |
|
|
|
formConfig: [ |
|
|
|
{ |
|
|
|
type: 'input', |
|
|
@@ -225,6 +217,14 @@ export default { |
|
|
|
btnName: '重置', |
|
|
|
name: 'reset', |
|
|
|
}, |
|
|
|
{ |
|
|
|
type: 'separate', |
|
|
|
}, |
|
|
|
{ |
|
|
|
type: 'button', |
|
|
|
btnName: '任务自动执行', |
|
|
|
name: 'status', |
|
|
|
}, |
|
|
|
// { |
|
|
|
// type: this.$auth.hasPermi('base:factory:create') ? 'separate' : '', |
|
|
|
// }, |
|
|
@@ -237,21 +237,30 @@ export default { |
|
|
|
], |
|
|
|
}; |
|
|
|
}, |
|
|
|
components: { |
|
|
|
product, |
|
|
|
AddOrUpdate, |
|
|
|
}, |
|
|
|
components: {}, |
|
|
|
created() {}, |
|
|
|
mounted() { |
|
|
|
this.getDataList(); |
|
|
|
this.getjob(); |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
getjob() { |
|
|
|
getJob(20).then((response) => { |
|
|
|
this.jobStatus = response.data.status; |
|
|
|
const btn = { |
|
|
|
type: 'button', |
|
|
|
btnName: this.autoText[this.jobStatus - 1], |
|
|
|
name: 'status', |
|
|
|
}; |
|
|
|
this.$set(this.formConfig, 10, btn); |
|
|
|
}); |
|
|
|
}, |
|
|
|
// 获取数据列表 |
|
|
|
getDataList() { |
|
|
|
this.dataListLoading = true; |
|
|
|
this.urlOptions.getDataListURL(this.listQuery).then((response) => { |
|
|
|
this.tableData = response.data.list; |
|
|
|
this.listQuery.total = response.data.total; |
|
|
|
this.listQuery.total = response.data.total; |
|
|
|
this.dataListLoading = false; |
|
|
|
}); |
|
|
|
}, |
|
|
@@ -292,6 +301,20 @@ export default { |
|
|
|
}; |
|
|
|
this.getDataList(); |
|
|
|
break; |
|
|
|
case 'status': |
|
|
|
const status = this.jobStatus === 1 ? 2 : 1; |
|
|
|
updateJobStatus(20, status).then((response) => { |
|
|
|
this.$message({ |
|
|
|
message: '操作成功', |
|
|
|
type: 'success', |
|
|
|
duration: 1500, |
|
|
|
onClose: () => { |
|
|
|
this.getjob(); |
|
|
|
this.getDataList(); |
|
|
|
}, |
|
|
|
}); |
|
|
|
}); |
|
|
|
break; |
|
|
|
default: |
|
|
|
console.log(val); |
|
|
|
} |
|
|
|