Commit f8d39ca9 authored by 李苏's avatar 李苏 💬

cell调整

parent 9463fe06
......@@ -35,10 +35,37 @@
saveSelected: false
},
config: {
cellStyle({
row,
column,
}) {
// 定义样式变量
let cellStyle;
switch (row.zt) {
case 'W':
cellStyle = 'color:#dcc40e';
break;
case 'D':
cellStyle = 'color:#76b82a';
break;
case 'C':
cellStyle = 'color:#60b5ff';
break;
case 'CF':
cellStyle = 'color:#666';
break;
default:
cellStyle = '';
}
if (column.label == "状态") {
return cellStyle
}
},
/* 基本配置*/
url: 'lxyl/wcs/wcsTask',
tableTitle: [
{
tableTitle: [{
title: "状态",
field: "zt",
width: 80,
......@@ -66,16 +93,16 @@
{
title: "起始位",
field: "gwName",
formatter(row,b,v){
return row.kwName||row.gwName
formatter(row, b, v) {
return row.kwName || row.gwName
},
width: 140,
},
{
title: "目标位",
field: "mbkwCode",
formatter(row,b,v){
return row.mbkwCode||row.mbgwCode||row.gwName
formatter(row, b, v) {
return row.mbkwCode || row.mbgwCode || row.gwName
},
width: 140,
},
......@@ -197,8 +224,7 @@
],
[
{
[{
label: '任务号',
prop: 'djid',
span: 8,
......@@ -235,72 +261,72 @@
},
methods: {
execute(ctx){
execute(ctx) {
if (ctx.singleItem && ctx.singleItem.id) {
this.$confirm('确定要重新执行任务吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(res => {
ctx.$refs.TablePager.loading=true
ctx.$refs.TablePager.loading = true
this.$post('lxyl/wcs/wcsTask/start', {
id: ctx.singleItem.id
}).then(res => {
if (res.success) {
this.$success('操作成功')
ctx.$refs.TablePager.loading=false
ctx.$refs.TablePager.loading = false
ctx.refresh()
}
}).finally(res=>{
ctx.$refs.TablePager.loading=false
}).finally(res => {
ctx.$refs.TablePager.loading = false
})
})
} else {
this.$warning('请选中一条数据')
}
},
close(ctx){
close(ctx) {
if (ctx.singleItem && ctx.singleItem.id) {
this.$confirm('确定要关闭任务吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(res => {
ctx.$refs.TablePager.loading=true
ctx.$refs.TablePager.loading = true
this.$post('lxyl/wcs/wcsTask/close', {
id: ctx.singleItem.id
}).then(res => {
if (res.success) {
this.$success('操作成功')
ctx.$refs.TablePager.loading=false
ctx.$refs.TablePager.loading = false
ctx.refresh()
}
}).finally(res=>{
ctx.$refs.TablePager.loading=false
}).finally(res => {
ctx.$refs.TablePager.loading = false
})
})
} else {
this.$warning('请选中一条数据')
}
},
complete(ctx){
complete(ctx) {
if (ctx.singleItem && ctx.singleItem.id) {
this.$confirm('确定要完成任务吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(res => {
ctx.$refs.TablePager.loading=true
ctx.$refs.TablePager.loading = true
this.$post('lxyl/wcs/wcsTask/complete', {
id: ctx.singleItem.id
}).then(res => {
if (res.success) {
this.$success('操作成功')
ctx.$refs.TablePager.loading=false
ctx.$refs.TablePager.loading = false
ctx.refresh()
}
}).finally(res=>{
ctx.$refs.TablePager.loading=false
}).finally(res => {
ctx.$refs.TablePager.loading = false
})
})
} else {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment