This commit is contained in:
朱文强 2023-11-17 15:38:01 +08:00
parent 7d6a40d91c
commit 45e1bfdb89
3 changed files with 49 additions and 22 deletions

View File

@ -2,7 +2,7 @@
# @Author: zwq # @Author: zwq
# @Date: 2023-09-14 13:44:22 # @Date: 2023-09-14 13:44:22
# @LastEditors: zwq # @LastEditors: zwq
# @LastEditTime: 2023-10-26 14:40:04 # @LastEditTime: 2023-11-17 14:57:46
# @Description: # @Description:
### ###
# 生产环境配置 # 生产环境配置
@ -16,7 +16,7 @@ VUE_APP_BASE_API = '/prod-api'
# 根据服务器或域名修改 # 根据服务器或域名修改
# PUBLIC_PATH = 'http://my-pi.com:8888/yudao-admin/' # PUBLIC_PATH = 'http://my-pi.com:8888/yudao-admin/'
PUBLIC_PATH = 'http://192.168.0.127:8888/' PUBLIC_PATH = 'http://10.10.100.219:8888/'
# 二级部署路径 # 二级部署路径
VUE_APP_APP_NAME ='yudao-admin' VUE_APP_APP_NAME ='yudao-admin'

View File

@ -15,11 +15,6 @@
v-loading="dataListLoading" v-loading="dataListLoading"
style="width: 100%" style="width: 100%"
ref="dataList"> 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 label="序号" type="index" align="center" />
<el-table-column <el-table-column
prop="mainTaskCode" prop="mainTaskCode"
@ -112,17 +107,12 @@
:page.sync="listQuery.pageNo" :page.sync="listQuery.pageNo"
:total="listQuery.total" :total="listQuery.total"
@pagination="getDataList" /> @pagination="getDataList" />
<add-or-update
v-if="drawerVisible"
ref="drawerRef"
@refreshDataList="getDataList" />
</div> </div>
</template> </template>
<script> <script>
import product from './good-mini';
import AddOrUpdate from './add-or-updata';
import { deleteTask, getTaskPage, runTask } from '@/api/axl/task'; import { deleteTask, getTaskPage, runTask } from '@/api/axl/task';
import { getJob, updateJobStatus } from '@/api/infra/job';
const mainTaskType = [ const mainTaskType = [
{ {
@ -167,6 +157,8 @@ export default {
pageNo: 1, pageNo: 1,
total: 1, total: 1,
}, },
jobStatus: 1,
autoText: ['关闭自动执行', '开启自动执行'],
formConfig: [ formConfig: [
{ {
type: 'input', type: 'input',
@ -225,6 +217,14 @@ export default {
btnName: '重置', btnName: '重置',
name: 'reset', name: 'reset',
}, },
{
type: 'separate',
},
{
type: 'button',
btnName: '任务自动执行',
name: 'status',
},
// { // {
// type: this.$auth.hasPermi('base:factory:create') ? 'separate' : '', // type: this.$auth.hasPermi('base:factory:create') ? 'separate' : '',
// }, // },
@ -237,15 +237,24 @@ export default {
], ],
}; };
}, },
components: { components: {},
product,
AddOrUpdate,
},
created() {}, created() {},
mounted() { mounted() {
this.getDataList(); this.getDataList();
this.getjob();
}, },
methods: { 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() { getDataList() {
this.dataListLoading = true; this.dataListLoading = true;
@ -292,6 +301,20 @@ export default {
}; };
this.getDataList(); this.getDataList();
break; 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: default:
console.log(val); console.log(val);
} }

View File

@ -34,12 +34,16 @@
<template v-slot="scope"> <template v-slot="scope">
<span> <span>
{{ {{
scope.row.type === 0 scope.row.type === 1
? '出库'
: scope.row.type === 1
? '入库' ? '入库'
: scope.row.type === 2 : scope.row.type === 2
? '出库'
: scope.row.type === 3
? '移库' ? '移库'
: scope.row.type === 4
? '越库'
: scope.row.type === 5
? '盘点'
: '-' : '-'
}} }}
</span> </span>