This commit is contained in:
朱文强 2023-11-17 15:38:01 +08:00
джерело 7d6a40d91c
коміт 45e1bfdb89
3 змінених файлів з 49 додано та 22 видалено

@ -2,7 +2,7 @@
# @Author: zwq
# @Date: 2023-09-14 13:44:22
# @LastEditors: zwq
# @LastEditTime: 2023-10-26 14:40:04
# @LastEditTime: 2023-11-17 14:57:46
# @Description:
###
# 生产环境配置
@ -16,7 +16,7 @@ VUE_APP_BASE_API = '/prod-api'
# 根据服务器或域名修改
# 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'

@ -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);
}

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