This commit is contained in:
‘937886381’ 2025-01-03 09:55:08 +08:00
parent 5dd299e549
commit f26d7abc64
6 changed files with 19 additions and 14 deletions

View File

@ -28,7 +28,7 @@ export default {
// tableBtn: [], // 占位
// searchBarFormConfig: [], // 占位
// // 弹窗表单配置
// dialogFormConfig: [], //
// dialogFormConfig: [], //
updateUrl: '',
addUrl: '',
pageUrl: '',
@ -109,7 +109,9 @@ export default {
}
},
// 处理搜索栏按钮
handleSearchBarBtnClick(btn) {
handleSearchBarBtnClick(btn) {
console.log(btn);
// const keys = ['name', 'createTime']; // timeVal // 已被 searchBarKeys 替代
switch (btn.btnName) {
case 'search':

View File

@ -201,7 +201,7 @@ export default {
this.groupOptions =
res1.data.map((item) => {
item.label =
item.name + ' - ' + getDictDataLabel('workshop', item.roomNameDict);
item.name + (getDictDataLabel('workshop', item.roomNameDict) ? ' - ' + getDictDataLabel('workshop', item.roomNameDict) : '')
return item;
}) || [];
// const res = await getEquipmentAll()

View File

@ -29,9 +29,9 @@ export default {
},
created() {
},
mounted() {
this.getDataList()
},
// mounted() {
// this.getDataList()
// },
methods: {
// 获取数据列表
getDataList() {

View File

@ -40,7 +40,7 @@ export default {
const t = new Date();
const [y, m, d] = [t.getFullYear(), t.getMonth(), t.getDate()];
return {
searchBarKeys: ['equipmentName', 'createTime'],
searchBarKeys: ['equipmentTypeId'],
equipmentTypeList:[],
tableBtn: [
{
@ -125,7 +125,7 @@ export default {
created() {
this.initSearchBar()
this.getList();
},
},
methods: {
/** 查询列表 */
getList() {
@ -231,13 +231,14 @@ export default {
return;
}
//
this.post(this.form).then((response) => {
this.post(this.form).then((res) => {
console.log('res', res)
this.$modal.msgSuccess('新增成功');
this.open = false;
this.getList()
this.showDetailVisible = true
this.$nextTick(() => {
this.$refs.showDetail.init(this.form.equipmentTypeId)
this.$refs.showDetail.init(res.data)
})
});
});

View File

@ -100,9 +100,10 @@ export default {
// console.log(this.tableData)
},
getDataList(id) {
console.log(id)
this.dataListLoading = true;
this.queryParams.equipmentTypeId = id
console.log(id);
console.log(this.queryParams.equipmentTypeId)
this.urlOptions.getDataListURL(this.queryParams).then(response => {
this.tableData = response.data.list;
this.listQuery.total = response.data.total;

View File

@ -404,8 +404,8 @@ export default {
.catch(() => {});
},
async getDict() {
const materRes = await getMaterialTree(); //
let typeId = materRes.data.find((item) => item.product === 2).id;
const materRes = await getMaterialTree();
let typeId = materRes.data.find((item) => item.product === 2);
const listQuery = {
typeId: typeId,
};
@ -416,7 +416,8 @@ export default {
...item
}));
},
updateDialogFormZ(val) {
updateDialogFormZ(val) {
// console.log(this.rows[0][0].options)
const selectData = this.rows[0][0].options.find(
(item) => item.id === val.productMaterialId
);