驾驶舱&基础信息配置

This commit is contained in:
2026-04-01 15:04:37 +08:00
parent 161d6a1bdf
commit f0ac88af3d
15 changed files with 309 additions and 130 deletions

View File

@@ -22,17 +22,20 @@
<script>
import ProductInfoAdd from './components/productInfoAdd.vue';
import { getProductConfigPage,delProductConfig } from '@/api/basicInfoConfig';
import { publicFormatter } from '@/utils/dict';
const tableProps = [
{
prop: 'name',
prop: 'product',
label: '产品名称'
},
{
prop: 'code',
label: '工艺'
prop: 'process',
label: '工艺',
filter: publicFormatter('process')
},
{
prop: 'jd',
prop: 'spec',
label: '规格'
},
];
@@ -46,7 +49,7 @@ export default {
type: 'input',
label: '产品名称',
placeholder: '产品名称',
param: 'cName'
param: 'product'
},
{
type: 'button',
@@ -66,11 +69,12 @@ export default {
}
],
listQuery:{
product:'',
pageSize:20,
pageNo:1
},
total:2,
tableData:[{name:'111'}],
total:0,
tableData:[],
tableProps,
tableBtn:[
{
@@ -87,13 +91,16 @@ export default {
}
},
mounted() {
this.getDataList();
},
methods: {
buttonClick(val) {
console.log(val)
switch (val.btnName) {
case 'search':
this.listQuery.product = val.product;
this.listQuery.pageNo = 1;
this.getList();
this.getDataList();
break;
case 'add':
this.addOrEditTitle = '新增';
@@ -105,7 +112,17 @@ export default {
}
},
getDataList() {
getProductConfigPage({
...this.listQuery
}).then(res => {
if (res.code === 0) {
this.tableData = res.data.list;
this.total = res.data.total;
}else{
this.tableData = [];
this.total = 0;
}
})
},
handleClick(val) {
switch (val.type) {
@@ -130,14 +147,15 @@ export default {
},
successSubmit() {
this.handleCancel();
this.getList();
this.getDataList();
},
/** 删除按钮操作 */
handleDelete(row) {
this.$modal.confirm('确定删除产品"' + row.name + '吗?').then(function() {
deleteModel(row.id).then(response => {
that.getList();
that.$modal.msgSuccess("删除成功");
let _this = this;
_this.$modal.confirm('确定删除产品"' + row.product + '吗?').then(function() {
delProductConfig({id:row.id}).then(response => {
_this.getDataList();
_this.$modal.msgSuccess("删除成功");
})
}).catch(() => {});
}