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

View File

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

View File

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

View File

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

View File

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