|
|
|
|
@ -42,8 +42,12 @@ |
|
|
|
|
</span> |
|
|
|
|
</template> |
|
|
|
|
|
|
|
|
|
<template #localArea-form="{type}"> |
|
|
|
|
<el-input v-if="type == 'add' || 'edit'" v-model="form.localArea" @input="validateSmallBat"></el-input> |
|
|
|
|
<template #localArea-form="{ type }"> |
|
|
|
|
<el-input |
|
|
|
|
v-if="type == 'add' || 'edit'" |
|
|
|
|
v-model="form.localArea" |
|
|
|
|
@input="validateSmallBat" |
|
|
|
|
></el-input> |
|
|
|
|
</template> |
|
|
|
|
|
|
|
|
|
<template #name="{ row }"> |
|
|
|
|
@ -58,36 +62,47 @@ |
|
|
|
|
</avue-crud> |
|
|
|
|
|
|
|
|
|
<!-- 导入 --> |
|
|
|
|
<basic-import v-if="isShowImport" title="导入" :isShow="isShowImport" |
|
|
|
|
<basic-import |
|
|
|
|
v-if="isShowImport" |
|
|
|
|
title="导入" |
|
|
|
|
:isShow="isShowImport" |
|
|
|
|
templateUrl="/blade-desk/BA/craftAbility/downloadExcelTemplate" |
|
|
|
|
templateName="工艺能力模板.xls" |
|
|
|
|
importUrl="/blade-desk/BA/craftAbility/importExcel" |
|
|
|
|
@closeDialog="closeDialog"></basic-import> |
|
|
|
|
@closeDialog="closeDialog" |
|
|
|
|
></basic-import> |
|
|
|
|
</basic-container> |
|
|
|
|
</template> |
|
|
|
|
<script> |
|
|
|
|
import { mapGetters } from "vuex"; |
|
|
|
|
import {getList,getPlateSmall,addProcessAbility,updateProcessAbility,deleteProcessAbility,saveProcessAbility} from "@/api/basicData/processCapability" |
|
|
|
|
import { getDictionary } from "@/api/system/dict"; |
|
|
|
|
import basicImport from "@/components/basic-import/main.vue"; |
|
|
|
|
import {getDecimal} from "@/utils/formatter"; |
|
|
|
|
import { mapGetters } from 'vuex'; |
|
|
|
|
import { |
|
|
|
|
getList, |
|
|
|
|
getPlateSmall, |
|
|
|
|
addProcessAbility, |
|
|
|
|
updateProcessAbility, |
|
|
|
|
deleteProcessAbility, |
|
|
|
|
saveProcessAbility, |
|
|
|
|
} from '@/api/basicData/processCapability'; |
|
|
|
|
import { getDictionary } from '@/api/system/dict'; |
|
|
|
|
import basicImport from '@/components/basic-import/main.vue'; |
|
|
|
|
import { getDecimal } from '@/utils/formatter'; |
|
|
|
|
|
|
|
|
|
export default { |
|
|
|
|
components: { |
|
|
|
|
basicImport |
|
|
|
|
basicImport, |
|
|
|
|
}, |
|
|
|
|
data() { |
|
|
|
|
return { |
|
|
|
|
isShowImport:false, |
|
|
|
|
isShowImport: false, |
|
|
|
|
slectForm: { |
|
|
|
|
wtName: "", |
|
|
|
|
wtName: '', |
|
|
|
|
}, |
|
|
|
|
slectDic: [], |
|
|
|
|
form: {}, |
|
|
|
|
query: {}, |
|
|
|
|
loading: true, |
|
|
|
|
selectionList: [], |
|
|
|
|
parentId: "", |
|
|
|
|
parentId: '', |
|
|
|
|
page: { |
|
|
|
|
pageSize: 10, |
|
|
|
|
currentPage: 1, |
|
|
|
|
@ -99,22 +114,22 @@ export default { |
|
|
|
|
menuBtn: false, |
|
|
|
|
column: [ |
|
|
|
|
{ |
|
|
|
|
label: "", |
|
|
|
|
prop: "wtName", |
|
|
|
|
type: "select", |
|
|
|
|
label: '', |
|
|
|
|
prop: 'wtName', |
|
|
|
|
type: 'select', |
|
|
|
|
filterable: true, |
|
|
|
|
props: { |
|
|
|
|
label: "dictValue", |
|
|
|
|
value: "dictKey", |
|
|
|
|
label: 'dictValue', |
|
|
|
|
value: 'dictKey', |
|
|
|
|
}, |
|
|
|
|
dicUrl: "/blade-system/dict/dictionary?code=ProcessCapabilityType", |
|
|
|
|
dicUrl: '/blade-system/dict/dictionary?code=ProcessCapabilityType', |
|
|
|
|
}, |
|
|
|
|
], |
|
|
|
|
}, |
|
|
|
|
option: { |
|
|
|
|
columnSort: true, |
|
|
|
|
tip: false, |
|
|
|
|
height: "auto", |
|
|
|
|
height: 'auto', |
|
|
|
|
calcHeight: 32, |
|
|
|
|
simplePage: false, |
|
|
|
|
searchShow: true, |
|
|
|
|
@ -123,56 +138,56 @@ export default { |
|
|
|
|
border: true, |
|
|
|
|
selection: true, |
|
|
|
|
viewBtn: true, |
|
|
|
|
addBtnIcon: " ", |
|
|
|
|
viewBtnIcon: " ", |
|
|
|
|
delBtnIcon: " ", |
|
|
|
|
editBtnIcon: " ", |
|
|
|
|
menuWidth: 120, |
|
|
|
|
addBtnIcon: ' ', |
|
|
|
|
viewBtnIcon: ' ', |
|
|
|
|
delBtnIcon: ' ', |
|
|
|
|
editBtnIcon: ' ', |
|
|
|
|
menuWidth: 100, |
|
|
|
|
dialogClickModal: false, |
|
|
|
|
excelBtn: true, |
|
|
|
|
viewBtn: false, |
|
|
|
|
editBtnText: "修改", |
|
|
|
|
editBtnText: '修改', |
|
|
|
|
refreshBtn: false, |
|
|
|
|
searchShowBtn: false, |
|
|
|
|
gridBtn: false, |
|
|
|
|
searchIndex: 3, |
|
|
|
|
searchIcon: true, |
|
|
|
|
searchLabelPosition: "left", |
|
|
|
|
searchLabelPosition: "left", |
|
|
|
|
searchLabelPosition: 'left', |
|
|
|
|
searchGutter: 24, |
|
|
|
|
searchSpan: 6, |
|
|
|
|
menuAlign: "center", |
|
|
|
|
menuAlign: 'center', |
|
|
|
|
gridBtn: false, |
|
|
|
|
searchMenuPosition: "right", |
|
|
|
|
align: "center", |
|
|
|
|
labelWidth:140, |
|
|
|
|
|
|
|
|
|
searchMenuPosition: 'right', |
|
|
|
|
align: 'center', |
|
|
|
|
labelWidth: 100, |
|
|
|
|
searchLabelWidth: 'auto', |
|
|
|
|
column: [ |
|
|
|
|
{ |
|
|
|
|
label: "编码", |
|
|
|
|
prop: "caCode", |
|
|
|
|
label: '编码', |
|
|
|
|
prop: 'caCode', |
|
|
|
|
search: true, |
|
|
|
|
sortable: true, |
|
|
|
|
span:24, |
|
|
|
|
span: 12, |
|
|
|
|
width: 80, |
|
|
|
|
rules: [ |
|
|
|
|
{ |
|
|
|
|
required: true, |
|
|
|
|
message: "请输入编码", |
|
|
|
|
trigger: "blur", |
|
|
|
|
message: '请输入编码', |
|
|
|
|
trigger: 'blur', |
|
|
|
|
}, |
|
|
|
|
], |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
label: "名称", |
|
|
|
|
prop: "caName", |
|
|
|
|
span:24, |
|
|
|
|
label: '名称', |
|
|
|
|
prop: 'caName', |
|
|
|
|
span: 12, |
|
|
|
|
sortable: true, |
|
|
|
|
search: true, |
|
|
|
|
rules: [ |
|
|
|
|
{ |
|
|
|
|
required: true, |
|
|
|
|
message: "请输入名称", |
|
|
|
|
trigger: "blur", |
|
|
|
|
message: '请输入名称', |
|
|
|
|
trigger: 'blur', |
|
|
|
|
}, |
|
|
|
|
], |
|
|
|
|
}, |
|
|
|
|
@ -197,13 +212,13 @@ export default { |
|
|
|
|
// ], |
|
|
|
|
// }, |
|
|
|
|
{ |
|
|
|
|
label: "能力类型", |
|
|
|
|
span:24, |
|
|
|
|
prop: "wxLimit", |
|
|
|
|
label: '能力类型', |
|
|
|
|
span: 12, |
|
|
|
|
prop: 'wxLimit', |
|
|
|
|
// bind: "bsWorkType.wtName", |
|
|
|
|
sortable: true, |
|
|
|
|
search: true, |
|
|
|
|
type: "select", |
|
|
|
|
type: 'select', |
|
|
|
|
filterable: true, |
|
|
|
|
formatter: (row, value, label, column) => { |
|
|
|
|
// -1 转换为空字符串 |
|
|
|
|
@ -215,90 +230,92 @@ export default { |
|
|
|
|
return dictItem ? dictItem.dictValue : value; |
|
|
|
|
}, |
|
|
|
|
props: { |
|
|
|
|
label: "dictValue", |
|
|
|
|
value: "dictKey", |
|
|
|
|
label: 'dictValue', |
|
|
|
|
value: 'dictKey', |
|
|
|
|
}, |
|
|
|
|
dicUrl: "/blade-system/dict/dictionary?code=ProcessCapabilityType", |
|
|
|
|
dicUrl: '/blade-system/dict/dictionary?code=ProcessCapabilityType', |
|
|
|
|
rules: [ |
|
|
|
|
{ |
|
|
|
|
required: false, |
|
|
|
|
message: "请选择能力类型", |
|
|
|
|
trigger: "click", |
|
|
|
|
message: '请选择能力类型', |
|
|
|
|
trigger: 'click', |
|
|
|
|
}, |
|
|
|
|
], |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
label:"外协限制", |
|
|
|
|
prop:"wtId", |
|
|
|
|
type:"select", |
|
|
|
|
span:24, |
|
|
|
|
dicUrl: "/blade-system/dict/dictionary?code=WxLimit", |
|
|
|
|
label: '外协限制', |
|
|
|
|
prop: 'wtId', |
|
|
|
|
type: 'select', |
|
|
|
|
span: 12, |
|
|
|
|
dicUrl: '/blade-system/dict/dictionary?code=WxLimit', |
|
|
|
|
props: { |
|
|
|
|
label: "dictValue", |
|
|
|
|
value: "dictKey", |
|
|
|
|
label: 'dictValue', |
|
|
|
|
value: 'dictKey', |
|
|
|
|
}, |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
label:"厂内比例(%)", |
|
|
|
|
prop:"inRate", |
|
|
|
|
label: '厂内比例(%)', |
|
|
|
|
prop: 'inRate', |
|
|
|
|
type: 'number', |
|
|
|
|
span:24, |
|
|
|
|
span: 12, |
|
|
|
|
controls: false, |
|
|
|
|
max:100, |
|
|
|
|
max: 100, |
|
|
|
|
rules: [ |
|
|
|
|
{ |
|
|
|
|
required: true, |
|
|
|
|
message: "请输入厂内比例", |
|
|
|
|
trigger: "change", |
|
|
|
|
message: '请输入厂内比例', |
|
|
|
|
trigger: 'change', |
|
|
|
|
}, |
|
|
|
|
], |
|
|
|
|
change: (val) => { |
|
|
|
|
console.log('val==========',val) |
|
|
|
|
this.form.outRate = 100 - val.value |
|
|
|
|
} |
|
|
|
|
change: val => { |
|
|
|
|
console.log('val==========', val); |
|
|
|
|
this.form.outRate = 100 - val.value; |
|
|
|
|
}, |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
label:"外协比例(%)", |
|
|
|
|
prop:"outRate", |
|
|
|
|
label: '外协比例(%)', |
|
|
|
|
prop: 'outRate', |
|
|
|
|
type: 'number', |
|
|
|
|
disabled:true, |
|
|
|
|
span:24, |
|
|
|
|
disabled: true, |
|
|
|
|
span: 12, |
|
|
|
|
controls: false, |
|
|
|
|
rules: [ |
|
|
|
|
{ |
|
|
|
|
required: true, |
|
|
|
|
message: "请输入外协比例", |
|
|
|
|
trigger: "change", |
|
|
|
|
message: '请输入外协比例', |
|
|
|
|
trigger: 'change', |
|
|
|
|
}, |
|
|
|
|
], |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
label:"局部镀订单面积(dm²)", |
|
|
|
|
prop:"localArea", |
|
|
|
|
label: '局部镀订单面积(dm²)', |
|
|
|
|
prop: 'localArea', |
|
|
|
|
type: 'number', |
|
|
|
|
span:24, |
|
|
|
|
span: 24, |
|
|
|
|
controls: false, |
|
|
|
|
labelWidth: 140, |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
label: "修改时间", |
|
|
|
|
prop: "updateTime", |
|
|
|
|
label: '修改时间', |
|
|
|
|
prop: 'updateTime', |
|
|
|
|
sortable: true, |
|
|
|
|
search: true, |
|
|
|
|
searchRange: true, |
|
|
|
|
display: false, |
|
|
|
|
hide:true, |
|
|
|
|
type: "date", |
|
|
|
|
valueFormat: "YYYY-MM-DD", |
|
|
|
|
format:"YYYY-MM-DD" |
|
|
|
|
hide: true, |
|
|
|
|
type: 'date', |
|
|
|
|
valueFormat: 'YYYY-MM-DD', |
|
|
|
|
format: 'YYYY-MM-DD', |
|
|
|
|
startPlaceholder: '开始时间', |
|
|
|
|
endPlaceholder: '结束时间', |
|
|
|
|
}, |
|
|
|
|
{ |
|
|
|
|
label: "修改时间", |
|
|
|
|
prop: "updateTime", |
|
|
|
|
label: '修改时间', |
|
|
|
|
prop: 'updateTime', |
|
|
|
|
sortable: true, |
|
|
|
|
search: false, |
|
|
|
|
display: false, |
|
|
|
|
type: "date", |
|
|
|
|
|
|
|
|
|
type: 'date', |
|
|
|
|
}, |
|
|
|
|
], |
|
|
|
|
}, |
|
|
|
|
@ -306,7 +323,7 @@ export default { |
|
|
|
|
}; |
|
|
|
|
}, |
|
|
|
|
computed: { |
|
|
|
|
...mapGetters(["userInfo", "permission"]), |
|
|
|
|
...mapGetters(['userInfo', 'permission']), |
|
|
|
|
permissionList() { |
|
|
|
|
return { |
|
|
|
|
addBtn: this.validData(this.permission.menu_add, false), |
|
|
|
|
@ -317,28 +334,26 @@ export default { |
|
|
|
|
}, |
|
|
|
|
ids() { |
|
|
|
|
let ids = []; |
|
|
|
|
this.selectionList.forEach((ele) => { |
|
|
|
|
this.selectionList.forEach(ele => { |
|
|
|
|
ids.push(ele.id); |
|
|
|
|
}); |
|
|
|
|
return ids.join(","); |
|
|
|
|
return ids.join(','); |
|
|
|
|
}, |
|
|
|
|
}, |
|
|
|
|
methods: { |
|
|
|
|
validateSmallBat(value){ |
|
|
|
|
this.form.localArea = getDecimal(value,5) |
|
|
|
|
validateSmallBat(value) { |
|
|
|
|
this.form.localArea = getDecimal(value, 5); |
|
|
|
|
}, |
|
|
|
|
getType(){ |
|
|
|
|
getTypeData().then(res =>{ |
|
|
|
|
|
|
|
|
|
}) |
|
|
|
|
getType() { |
|
|
|
|
getTypeData().then(res => {}); |
|
|
|
|
}, |
|
|
|
|
closeDialog(val){ |
|
|
|
|
this.isShowImport = false |
|
|
|
|
if(val){ |
|
|
|
|
closeDialog(val) { |
|
|
|
|
this.isShowImport = false; |
|
|
|
|
if (val) { |
|
|
|
|
// 重新加载列表数据,导入后的数据可能需要特殊处理 |
|
|
|
|
setTimeout(() => { |
|
|
|
|
this.onLoad() |
|
|
|
|
}, 500) |
|
|
|
|
this.onLoad(); |
|
|
|
|
}, 500); |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
// 导入前处理数据 |
|
|
|
|
@ -349,37 +364,37 @@ export default { |
|
|
|
|
}, |
|
|
|
|
// 点击导入按钮 |
|
|
|
|
handleImport() { |
|
|
|
|
this.isShowImport = true |
|
|
|
|
this.isShowImport = true; |
|
|
|
|
}, |
|
|
|
|
getDictionary() { |
|
|
|
|
getDictionary({ code: "ProcessCapabilityType" }).then((res) => { |
|
|
|
|
getDictionary({ code: 'ProcessCapabilityType' }).then(res => { |
|
|
|
|
this.slectDic = res.data.data; |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
// 批量设置 |
|
|
|
|
batchSet() { |
|
|
|
|
if (this.selectionList.length === 0) { |
|
|
|
|
return this.$message.error("请先选择数据再进行操作!"); |
|
|
|
|
return this.$message.error('请先选择数据再进行操作!'); |
|
|
|
|
} |
|
|
|
|
if (this.slectForm.wtName == "") { |
|
|
|
|
return this.$message.error("请先选择能力类型!"); |
|
|
|
|
if (this.slectForm.wtName == '') { |
|
|
|
|
return this.$message.error('请先选择能力类型!'); |
|
|
|
|
} |
|
|
|
|
if (this.slectForm.wtName) { |
|
|
|
|
this.$confirm("请确认此操作!", "提示", { |
|
|
|
|
confirmButtonText: "确认", |
|
|
|
|
cancelButtonText: "取消", |
|
|
|
|
type: "warning", |
|
|
|
|
}).then(() =>{ |
|
|
|
|
this.$confirm('请确认此操作!', '提示', { |
|
|
|
|
confirmButtonText: '确认', |
|
|
|
|
cancelButtonText: '取消', |
|
|
|
|
type: 'warning', |
|
|
|
|
}).then(() => { |
|
|
|
|
saveProcessAbility({ |
|
|
|
|
ids:this.selectionList.map(item => item.id), |
|
|
|
|
wxLimit:this.slectForm.wtName, |
|
|
|
|
}).then((res) => { |
|
|
|
|
if(res.data.code === 200){ |
|
|
|
|
ids: this.selectionList.map(item => item.id), |
|
|
|
|
wxLimit: this.slectForm.wtName, |
|
|
|
|
}).then(res => { |
|
|
|
|
if (res.data.code === 200) { |
|
|
|
|
this.$message.success('设置成功'); |
|
|
|
|
this.onLoad() |
|
|
|
|
this.onLoad(); |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
}) |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
initData() { |
|
|
|
|
@ -390,7 +405,7 @@ export default { |
|
|
|
|
}, |
|
|
|
|
handleAdd(row) { |
|
|
|
|
this.parentId = row.id; |
|
|
|
|
const column = this.findObject(this.option.column, "parentId"); |
|
|
|
|
const column = this.findObject(this.option.column, 'parentId'); |
|
|
|
|
column.value = row.id; |
|
|
|
|
column.addDisabled = true; |
|
|
|
|
this.$refs.crud.rowAdd(); |
|
|
|
|
@ -405,18 +420,24 @@ export default { |
|
|
|
|
if (submitData.bpsId === '' || submitData.bpsId === null || submitData.bpsId === undefined) { |
|
|
|
|
submitData.bpsId = ''; |
|
|
|
|
} |
|
|
|
|
if (submitData.wxLimit === '' || submitData.wxLimit === null || submitData.wxLimit === undefined) { |
|
|
|
|
if ( |
|
|
|
|
submitData.wxLimit === '' || |
|
|
|
|
submitData.wxLimit === null || |
|
|
|
|
submitData.wxLimit === undefined |
|
|
|
|
) { |
|
|
|
|
submitData.wxLimit = ''; |
|
|
|
|
} |
|
|
|
|
addProcessAbility(submitData).then(res =>{ |
|
|
|
|
if(res.data.code == 200){ |
|
|
|
|
this.$message.success("新增成功") |
|
|
|
|
this.onLoad() |
|
|
|
|
done() |
|
|
|
|
addProcessAbility(submitData) |
|
|
|
|
.then(res => { |
|
|
|
|
if (res.data.code == 200) { |
|
|
|
|
this.$message.success('新增成功'); |
|
|
|
|
this.onLoad(); |
|
|
|
|
done(); |
|
|
|
|
} |
|
|
|
|
}).catch(() => { |
|
|
|
|
loading(); |
|
|
|
|
}) |
|
|
|
|
.catch(() => { |
|
|
|
|
loading(); |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
// 修改 |
|
|
|
|
rowUpdate(row, index, done, loading) { |
|
|
|
|
@ -428,58 +449,67 @@ export default { |
|
|
|
|
if (submitData.bpsId === '' || submitData.bpsId === null || submitData.bpsId === undefined) { |
|
|
|
|
submitData.bpsId = ''; |
|
|
|
|
} |
|
|
|
|
if (submitData.wxLimit === '' || submitData.wxLimit === null || submitData.wxLimit === undefined) { |
|
|
|
|
if ( |
|
|
|
|
submitData.wxLimit === '' || |
|
|
|
|
submitData.wxLimit === null || |
|
|
|
|
submitData.wxLimit === undefined |
|
|
|
|
) { |
|
|
|
|
submitData.wxLimit = ''; |
|
|
|
|
} |
|
|
|
|
if(submitData.localArea === '' || submitData.localArea === null || submitData.localArea === undefined){ |
|
|
|
|
submitData.localArea = '' |
|
|
|
|
if ( |
|
|
|
|
submitData.localArea === '' || |
|
|
|
|
submitData.localArea === null || |
|
|
|
|
submitData.localArea === undefined |
|
|
|
|
) { |
|
|
|
|
submitData.localArea = ''; |
|
|
|
|
} |
|
|
|
|
updateProcessAbility(submitData).then(res =>{ |
|
|
|
|
if(res.data.code == 200){ |
|
|
|
|
this.$message.success("修改成功") |
|
|
|
|
this.onLoad() |
|
|
|
|
done() |
|
|
|
|
updateProcessAbility(submitData) |
|
|
|
|
.then(res => { |
|
|
|
|
if (res.data.code == 200) { |
|
|
|
|
this.$message.success('修改成功'); |
|
|
|
|
this.onLoad(); |
|
|
|
|
done(); |
|
|
|
|
} |
|
|
|
|
}).catch(() => { |
|
|
|
|
loading(); |
|
|
|
|
}) |
|
|
|
|
.catch(() => { |
|
|
|
|
loading(); |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
rowDel(row, index, done) { |
|
|
|
|
this.$confirm("确定将选择数据删除?", { |
|
|
|
|
confirmButtonText: "确定", |
|
|
|
|
cancelButtonText: "取消", |
|
|
|
|
type: "warning", |
|
|
|
|
this.$confirm('确定将选择数据删除?', { |
|
|
|
|
confirmButtonText: '确定', |
|
|
|
|
cancelButtonText: '取消', |
|
|
|
|
type: 'warning', |
|
|
|
|
}).then(() => { |
|
|
|
|
deleteProcessAbility({ |
|
|
|
|
ids:row.id |
|
|
|
|
}).then(res =>{ |
|
|
|
|
if(res.data.code == 200){ |
|
|
|
|
this.$message.success("删除成功") |
|
|
|
|
this.onLoad() |
|
|
|
|
ids: row.id, |
|
|
|
|
}).then(res => { |
|
|
|
|
if (res.data.code == 200) { |
|
|
|
|
this.$message.success('删除成功'); |
|
|
|
|
this.onLoad(); |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
}) |
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
handleDelete(){ |
|
|
|
|
if(this.selectionList.length == 0){ |
|
|
|
|
this.$message.error('请至少选择一条数据!') |
|
|
|
|
return |
|
|
|
|
handleDelete() { |
|
|
|
|
if (this.selectionList.length == 0) { |
|
|
|
|
this.$message.error('请至少选择一条数据!'); |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
this.$confirm("确定将选择数据删除?", { |
|
|
|
|
confirmButtonText: "确定", |
|
|
|
|
cancelButtonText: "取消", |
|
|
|
|
type: "warning", |
|
|
|
|
this.$confirm('确定将选择数据删除?', { |
|
|
|
|
confirmButtonText: '确定', |
|
|
|
|
cancelButtonText: '取消', |
|
|
|
|
type: 'warning', |
|
|
|
|
}).then(() => { |
|
|
|
|
deleteProcessAbility({ |
|
|
|
|
ids:this.selectionList.map(item => item.id).join(',') |
|
|
|
|
}).then(res =>{ |
|
|
|
|
if(res.data.code == 200){ |
|
|
|
|
this.$message.success("删除成功") |
|
|
|
|
this.onLoad() |
|
|
|
|
ids: this.selectionList.map(item => item.id).join(','), |
|
|
|
|
}).then(res => { |
|
|
|
|
if (res.data.code == 200) { |
|
|
|
|
this.$message.success('删除成功'); |
|
|
|
|
this.onLoad(); |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
// 重置 |
|
|
|
|
searchReset() { |
|
|
|
|
@ -490,7 +520,7 @@ export default { |
|
|
|
|
// 搜索 |
|
|
|
|
searchChange(params, done) { |
|
|
|
|
this.query = params; |
|
|
|
|
this.parentId = ""; |
|
|
|
|
this.parentId = ''; |
|
|
|
|
this.page.currentPage = 1; |
|
|
|
|
this.onLoad(this.page, params); |
|
|
|
|
done(); |
|
|
|
|
@ -509,16 +539,16 @@ export default { |
|
|
|
|
beforeOpen(done, type) { |
|
|
|
|
if (['edit', 'view'].includes(type)) { |
|
|
|
|
// 处理 -1 转换为空字符串 |
|
|
|
|
this.form.bpsId = (this.form.bpsId && this.form.bpsId !== -1) ? this.form.bpsId + '' : '' |
|
|
|
|
this.form.wtId = (this.form.wtId && this.form.wtId !== -1) ? this.form.wtId + '' : '' |
|
|
|
|
this.form.bpsId = this.form.bpsId && this.form.bpsId !== -1 ? this.form.bpsId + '' : ''; |
|
|
|
|
this.form.wtId = this.form.wtId && this.form.wtId !== -1 ? this.form.wtId + '' : ''; |
|
|
|
|
} |
|
|
|
|
done(); |
|
|
|
|
}, |
|
|
|
|
// 关闭 弹框 关闭表单前会执行beforeClose方法, |
|
|
|
|
beforeClose(done) { |
|
|
|
|
this.parentId = ""; |
|
|
|
|
const column = this.findObject(this.option.column, "parentId"); |
|
|
|
|
column.value = ""; |
|
|
|
|
this.parentId = ''; |
|
|
|
|
const column = this.findObject(this.option.column, 'parentId'); |
|
|
|
|
column.value = ''; |
|
|
|
|
column.addDisabled = false; |
|
|
|
|
done(); |
|
|
|
|
}, |
|
|
|
|
@ -538,24 +568,26 @@ export default { |
|
|
|
|
onLoad(page, params = {}) { |
|
|
|
|
this.loading = true; |
|
|
|
|
let param = { |
|
|
|
|
descs:'CA_CODE', |
|
|
|
|
descs: 'CA_CODE', |
|
|
|
|
...this.query, |
|
|
|
|
startTime:this.query.updateTime && this.query.updateTime.length != 0 && this.query.updateTime[0], |
|
|
|
|
endTime:this.query.updateTime && this.query.updateTime.length != 0 && this.query.updateTime[1], |
|
|
|
|
} |
|
|
|
|
const {updateTime,...searchParam} = param |
|
|
|
|
startTime: |
|
|
|
|
this.query.updateTime && this.query.updateTime.length != 0 && this.query.updateTime[0], |
|
|
|
|
endTime: |
|
|
|
|
this.query.updateTime && this.query.updateTime.length != 0 && this.query.updateTime[1], |
|
|
|
|
}; |
|
|
|
|
const { updateTime, ...searchParam } = param; |
|
|
|
|
getList({ |
|
|
|
|
current:this.page.currentPage, |
|
|
|
|
size:this.page.pageSize, |
|
|
|
|
...searchParam |
|
|
|
|
}).then(res =>{ |
|
|
|
|
current: this.page.currentPage, |
|
|
|
|
size: this.page.pageSize, |
|
|
|
|
...searchParam, |
|
|
|
|
}).then(res => { |
|
|
|
|
res.data.data.records.map(item => { |
|
|
|
|
item.localArea = item.localArea == -1 ? '' : item.localArea |
|
|
|
|
}) |
|
|
|
|
this.data = res.data.data.records |
|
|
|
|
this.page.total = res.data.data.total |
|
|
|
|
this.loading = false |
|
|
|
|
}) |
|
|
|
|
item.localArea = item.localArea == -1 ? '' : item.localArea; |
|
|
|
|
}); |
|
|
|
|
this.data = res.data.data.records; |
|
|
|
|
this.page.total = res.data.data.total; |
|
|
|
|
this.loading = false; |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|