update 0904docs

This commit is contained in:
lb 2023-09-05 10:49:37 +08:00
parent 847b2c787c
commit bd73613803
97 changed files with 625 additions and 574 deletions

View File

@ -39,9 +39,9 @@
<script>
// window.SITE_CONFIG['apiURL'] = 'http://192.168.1.103:8080/pms-am';
// window.SITE_CONFIG['apiURL'] = 'http://192.168.1.49:8080/pms-am'; // tengyun
window.SITE_CONFIG['apiURL'] = 'http://192.168.1.67:8080/pms-am'; // wenzhang
// window.SITE_CONFIG['apiURL'] = 'http://192.168.1.67:8080/pms-am'; // wenzhang
// window.SITE_CONFIG['apiURL'] = 'http://192.168.1.62:8080/pms-am'; // tao
// window.SITE_CONFIG['apiURL'] = 'http://192.168.1.21:8080/pms-am'; // xv
window.SITE_CONFIG['apiURL'] = 'http://192.168.1.21:8080/pms-am'; // xv
// window.SITE_CONFIG['apiURL'] = 'http://localhost:3000/p//////ms-am'; // xv
</script>
<% } %>

View File

@ -127,12 +127,12 @@ export default {
},
methods: {
handleSubEmitData(payload) {
console.log("[component] BaseListTable handleSubEmitData(): ", payload);
//console.log("[component] BaseListTable handleSubEmitData(): ", payload);
this.$emit("operate-event", payload);
},
handleSelectionChange(val) {
// this.selections = val;
console.log("selections change: ", val);
//console.log("selections change: ", val);
if (this.selectProps.length == 0)
this.$emit(
"select",

View File

@ -79,7 +79,7 @@ export default {
},
created() {},
mounted() {
console.log("[BaseSearchForm] configs:", JSON.parse(JSON.stringify(this.headConfig)));
//console.log("[BaseSearchForm] configs:", JSON.parse(JSON.stringify(this.headConfig)));
this.headConfig.fields.forEach((field, index) => {
// field.prop
@ -132,7 +132,7 @@ export default {
// TODO: ...
if (field.watch) {
// const { index: innerIdx, condition } = field.watch;
// console.log("=====field.watch=====", innerIdx, this.searchForm[innerIdx], this.headConfig.fields[innerIdx].default);
// //console.log("=====field.watch=====", innerIdx, this.searchForm[innerIdx], this.headConfig.fields[innerIdx].default);
// //
// this.$watch(
// () => this.searchForm[innerIdx],
@ -142,19 +142,19 @@ export default {
// // queryParams
// // })
// this.$http(field.url, queryParams).then((res) => {
// console.log("[==>] !!!", queryParams, res);
// //console.log("[==>] !!!", queryParams, res);
// // index
// this.searchForm[index] = Math.floor(Math.random() * 10);
// });
// }
// );
// console.log("[BaseSearchForm] mounted(): ", this.searchForm);
// //console.log("[BaseSearchForm] mounted(): ", this.searchForm);
// //
// if (this.searchForm[innerIdx]) {
// // TODO: ...
// console.log("TODO: ...");
// //console.log("TODO: ...");
// } else {
// console.log("TODO: ...");
// //console.log("TODO: ...");
// }
}
});

View File

@ -106,7 +106,7 @@ export default {
type: "error",
duration: 1500,
});
console.log("[*] 传入car payload对话框的id是", id);
//console.log("[*] car payloadid", id);
return;
}
this.showPaination = false;
@ -130,7 +130,7 @@ export default {
params,
})
.then(({ data: res }) => {
console.log("[car payload dialog] [http response] res is: ", res);
//console.log("[car payload dialog] [http response] res is: ", res);
if (res.code === 0) {
// page :
@ -183,7 +183,7 @@ export default {
},
handleBtnClick(payload) {
console.log("btn click payload: ", payload);
//console.log("btn click payload: ", payload);
if ("name" in payload) {
switch (payload.name) {
@ -199,7 +199,7 @@ export default {
// break;
}
} else {
console.log("[x] 不是这么用的! 缺少name属性");
//console.log("[x] ! name");
}
},

View File

@ -255,7 +255,7 @@ export default {
const promiseHistory = {};
const getData = (col, param) => {
// console.log("getData: ", col.prop, "/", param ?? "no param!");
// //console.log("getData: ", col.prop, "/", param ?? "no param!");
// -
promiseHistory[col.prop] = col.fetchData(param).then(({ data: res }) => {
if (res.code === 0) {
@ -295,13 +295,13 @@ export default {
//
if ("injectTo" in col) {
console.log("set watcher: ", col.prop);
//console.log("set watcher: ", col.prop);
const valueProp = "optionValue" in col ? col.optionValue : "id";
const unwatch = this.$watch(
() => this.dataForm[col.prop],
(val) => {
console.log("do watcher: ", col.prop);
//console.log("do watcher: ", col.prop);
if (col.disableWatcherOnEdit && this.editMode) return;
if (!val) {
col.injectTo.map((item) => {
@ -317,7 +317,7 @@ export default {
this.$forceUpdate();
});
} else {
console.log('[x] if ("injectTo" in col) {');
//console.log('[x] if ("injectTo" in col) {');
}
},
{
@ -356,14 +356,14 @@ export default {
//
if ("injectTo" in col && !col.watcher) {
console.log("set watcher: ", col.prop);
//console.log("set watcher: ", col.prop);
const valueProp = "optionValue" in col ? col.optionValue : "id";
const unwatch = this.$watch(
() => this.dataForm[col.prop],
(val) => {
if (col.disableWatcherOnEdit && this.editMode) return;
console.log("do watcher: ", col.prop);
//console.log("do watcher: ", col.prop);
if (!val) {
col.injectTo.map((item) => {
this.$set(this.dataForm, item[0], null);
@ -378,7 +378,7 @@ export default {
this.$forceUpdate();
});
} else {
console.log('[x] if ("injectTo" in col) {');
//console.log('[x] if ("injectTo" in col) {');
}
},
{
@ -399,16 +399,16 @@ export default {
}
});
console.log("after getData: ", promiseHistory);
//console.log("after getData: ", promiseHistory);
};
/** 处理函数 */
const handleFn = (prevProp, anchorField, anchorValue, targetField, col) => {
console.log("[handleFn]: ", prevProp, anchorField, anchorValue, targetField);
//console.log("[handleFn]: ", prevProp, anchorField, anchorValue, targetField);
/** 此时 cachedList 已经确保可用了 */
const target = this.cachedList[prevProp].find((i) => i[anchorField] === anchorValue);
const param = target ? target[targetField] : "";
console.log("((( chosenObject )))", target);
//console.log("((( chosenObject )))", target);
getData(col, param);
};
@ -427,13 +427,13 @@ export default {
row.forEach((col) => {
if (col == null) return;
if (col.fetchData && typeof col.fetchData === "function" && col.hasPrev) {
console.log("[hasPrev] set watcher: ", col.hasPrev);
//console.log("[hasPrev] set watcher: ", col.hasPrev);
// -
const unwatch = this.$watch(
() => this.dataForm[col.hasPrev],
(val) => {
console.log("[hasPrev] do watcher: ", col.hasPrev);
//console.log("[hasPrev] do watcher: ", col.hasPrev);
if (!val) {
col.injectTo.map((item) => {
this.$set(this.dataForm, item[0], null);
@ -467,11 +467,11 @@ export default {
if (this.configs.extraFields)
this.configs.extraFields.forEach((cnf) => {
if (cnf.listenTo) {
console.log("set watcher for: ", cnf.prop);
//console.log("set watcher for: ", cnf.prop);
const unwatch = this.$watch(
() => this.dataForm[cnf.listenTo.prop],
(carId) => {
console.log("do watcher for: ", cnf.prop);
//console.log("do watcher for: ", cnf.prop);
if (!carId) return;
if (cnf.disableWatcherOnEdit && this.editMode) return;
cnf.listenTo.handler.call(this, this.cachedList[cnf.listenTo.prop], carId);
@ -527,14 +527,14 @@ export default {
resetSpecificFields(fields) {
Object.keys(this.dataForm).forEach((key) => {
// console.log(`${key} ${fields}`, key in fields, fields.indexOf(key))
// //console.log(`${key} ${fields}`, key in fields, fields.indexOf(key))
if (fields.indexOf(key) !== -1) {
// console.log(`key ${key} in fields`)
// //console.log(`key ${key} in fields`)
// this.dataForm[key] = null;
this.$set(this.dataForm, key, null);
}
});
console.log("this.dataform", this.dataForm);
//console.log("this.dataform", this.dataForm);
},
resetForm(excludeId = false, immediate = false) {
@ -556,9 +556,9 @@ export default {
/** init **/
init(id, detailMode, tagInfo, extraParams) {
// console.log("[DialogJustForm] init", this.dataForm, id, detailMode);
// //console.log("[DialogJustForm] init", this.dataForm, id, detailMode);
if (this.$refs.dataForm) {
// console.log("[DialogJustForm] clearing form validation...");
// //console.log("[DialogJustForm] clearing form validation...");
// dialog dataForm [0]
this.$refs.dataForm.clearValidate();
}
@ -569,7 +569,7 @@ export default {
/** 判断 extraParams */
if (extraParams && typeof extraParams === "object") {
for (const [key, value] of Object.entries(extraParams)) {
// console.log("[dialog] dataForm | key | value", this.dataForm, key, value);
// //console.log("[dialog] dataForm | key | value", this.dataForm, key, value);
this.$set(this.dataForm, key, value);
}
}
@ -602,7 +602,7 @@ export default {
url: file.fileUrl,
}));
}
// console.log("[DialogJustForm] init():", this.dataForm);
// //console.log("[DialogJustForm] init():", this.dataForm);
} else {
this.$message({
message: `${res.code}: ${res.msg}`,
@ -628,7 +628,7 @@ export default {
handleButtonClick(col) {
if (!("onClick" in col)) {
console.log("[handleButtonClick] 配置文件config.js 里没有绑定 onClick");
//console.log("[handleButtonClick] config.js onClick");
return;
}
@ -639,7 +639,7 @@ export default {
handleSelectChange(col, eventValue) {
if ("autoUpdateProp" in col) {
//
// console.log(col.options, eventValue, this.savedDatalist);
// //console.log(col.options, eventValue, this.savedDatalist);
const item = this.savedDatalist[col.prop].find((item) => item.id === eventValue);
this.shadowDataForm[col.autoUpdateProp] = item.cate ?? null;
}
@ -647,17 +647,17 @@ export default {
},
handleSwitchChange(val) {
console.log("[dialog] switch change: ", val, this.dataForm);
//console.log("[dialog] switch change: ", val, this.dataForm);
},
handleComponentModelUpdate(propName, { subject, payload: { data } }) {
this.dataForm[propName] = JSON.stringify(data);
console.log("[DialogJustForm] handleComponentModelUpdate", this.dataForm[propName]);
//console.log("[DialogJustForm] handleComponentModelUpdate", this.dataForm[propName]);
},
addOrUpdate(method = "POST", url) {
if ("parentId" in this.dataForm) {
console.log("[DialogJustForm parentId]", this.dataForm.parentId);
//console.log("[DialogJustForm parentId]", this.dataForm.parentId);
// parentId cascader ["xxx"]xxx
const lastItem = this.dataForm.parentId.length - 1;
this.dataForm.parentId = this.dataForm.parentId[lastItem];
@ -709,7 +709,7 @@ export default {
data: httpPayload,
})
.then(({ data: res }) => {
console.log("[add&update] res is: ", res);
//console.log("[add&update] res is: ", res);
this.loadingStatus = false;
if (res.code === 0) {
this.$message.success(method === "POST" ? "添加成功" : "更新成功");
@ -735,7 +735,7 @@ export default {
},
handleBtnClick(payload) {
console.log("btn click payload: ", payload);
//console.log("btn click payload: ", payload);
if ("name" in payload) {
switch (payload.name) {
@ -747,7 +747,7 @@ export default {
break;
case "resetSpecific":
// qualityInspectionRecord config
console.log("resetFields", this.resetFields);
//console.log("resetFields", this.resetFields);
this.resetSpecificFields(this.resetFields);
break;
case "add":
@ -762,18 +762,18 @@ export default {
break;
}
case "add-car-payload": {
console.log("edit-car-payload", payload);
//console.log("edit-car-payload", payload);
this.addOrUpdate("POST", this.urls.payloadFormUrl);
break;
}
}
} else {
console.log("[x] 不是这么用的! 缺少name属性");
//console.log("[x] ! name");
}
},
handleUploadChange(file, fileList) {
console.log("[Upload] handleUploadChange...", file, fileList);
//console.log("[Upload] handleUploadChange...", file, fileList);
},
handleClose() {

View File

@ -137,7 +137,7 @@ export default {
},
handleSuccess(response, file, fileList) {
console.log("success response", response);
//console.log("success response", response);
this.loadingStatus = false
try {
if ("code" in response && response.code === 500) {
@ -178,7 +178,7 @@ export default {
handleError(err, file, fileList) {
this.loadingStatus = false
console.log("err", err);
//console.log("err", err);
},
handleBtnClick(payload) {
@ -211,7 +211,7 @@ export default {
},
handleUploadChange(file, fileList) {
// console.log("[Upload] handleUploadChange...", file, fileList);
// //console.log("[Upload] handleUploadChange...", file, fileList);
},
handleClose() {

View File

@ -294,7 +294,7 @@ export default {
if (col.fetchData)
col.fetchData().then(({ data: res }) => {
console.log("[Fetch Data]", "list" in res.data, res.data, res.data.list);
//console.log("[Fetch Data]", "list" in res.data, res.data, res.data.list);
if (res.code === 0) {
if (col.cacheFetchedData) {
// cache fetched data
@ -356,7 +356,7 @@ export default {
else if (col.fetchTreeData) {
// parentId 0
col.fetchTreeData().then(({ data: res }) => {
console.log("[Fetch Tree Data]", res.data);
//console.log("[Fetch Tree Data]", res.data);
if (res.code === 0) {
//
const obj = {};
@ -372,7 +372,7 @@ export default {
}
//
let filteredList = reConstructTreeData(obj);
console.log("** filteredList **", filteredList);
//console.log("** filteredList **", filteredList);
// options
this.$set(col, "options", filteredList);
} else {
@ -442,12 +442,12 @@ export default {
() => this.dataForm[col.prop],
(val) => {
if (val && col.prop in this.cached) {
console.log(
"here changeReflects",
col.prop,
col.changeReflects.toProp,
this.cached[col.prop]
);
//console.log(
// "here changeReflects",
// col.prop,
// col.changeReflects.toProp,
// this.cached[col.prop]
// );
if (typeof col.changeReflects.fromKey === "string") {
this.dataForm[col.changeReflects.toProp] = this.cached[col.prop].find(
(item) => item.id === val
@ -461,7 +461,7 @@ export default {
this.dataForm[col.changeReflects.toProp] = values.join(col.changeReflects.delimiter);
} else {
this.dataForm[col.changeReflects.toProp] = col.changeReflects.delimiter;
console.log("[DialogWithMenu] mounted() 没找到对应数据");
//console.log("[DialogWithMenu] mounted() ");
}
}
}
@ -528,7 +528,7 @@ export default {
setTimeout(
() => {
Object.keys(this.dataForm).forEach((key) => {
console.log("reset form, key", key);
//console.log("reset form, key", key);
if (excludeId && key === "id") return;
if ("files" in this.dataForm) this.dataForm.files = [];
else if ("fileIds" in this.dataForm) this.dataForm.fileIds = [];
@ -539,7 +539,7 @@ export default {
});
this.activeMenu = this.configs.menu[0].name;
this.$refs.dataForm[0].resetFields();
console.log("清除Form...", this.dataForm);
//console.log("Form...", this.dataForm);
},
immediate ? 0 : 200
);
@ -549,7 +549,7 @@ export default {
return new Promise((resolve, reject) => {
if (this.watingToRefreshQueue.length) {
this.watingToRefreshQueue.forEach((opt) => {
console.log("[刷新数据, ", opt, "]");
//console.log("[, ", opt, "]");
if ("fetchData" in opt) {
opt.fetchData(this.dataForm.id ? this.dataForm.id : -1).then(({ data: res }) => {
if (res.code === 0) {
@ -585,7 +585,7 @@ export default {
// dialog dataForm [0]
this.$refs.dataForm[0].clearValidate();
}
console.log("[dialog] DialogWithHead init():", id, detailMode);
//console.log("[dialog] DialogWithHead init():", id, detailMode);
this.detailMode = detailMode ?? false;
this.$nextTick(() => {
@ -601,11 +601,11 @@ export default {
this.$http.get(this.urls.base + `/${this.dataForm.id}`).then(({ data: res }) => {
if (res && res.code === 0) {
const dataFormKeys = Object.keys(this.dataForm);
console.log("[DialogWithMenu] dataFormKeys -------->", dataFormKeys);
//console.log("[DialogWithMenu] dataFormKeys -------->", dataFormKeys);
this.dataForm = __pick(res.data, dataFormKeys);
if ("files" in res.data) {
console.log("[DialogWithMenu] fileList===>", res.data.files, this.fileList);
//console.log("[DialogWithMenu] fileList===>", res.data.files, this.fileList);
/** 返回的文件列表 */
this.fileList = res.data.files
? res.data.files.map((file) => ({
@ -646,7 +646,7 @@ export default {
responseType: "blob",
})
.then(({ data: res }) => {
console.log("preivew", res);
//console.log("preivew", res);
if (/image/i.test(res.type)) {
//
this.currentImgUrl = URL.createObjectURL(res);
@ -657,9 +657,9 @@ export default {
a.setAttribute("target", "_blank");
a.href = URL.createObjectURL(res);
a.click();
console.log("before remove a ", a);
//console.log("before remove a ", a);
a.remove();
console.log("removed a ", a);
//console.log("removed a ", a);
} else {
this.$message({
message: "非图片和PDF文件请下载后预览",
@ -739,7 +739,7 @@ export default {
},
handleUploadSuccess(response, file, fileList) {
console.log("[DialogWithMenu] uploadedFileList", response, file, fileList);
//console.log("[DialogWithMenu] uploadedFileList", response, file, fileList);
if (response.code === 0) {
const uploadedFile = response.data[0];
@ -779,7 +779,7 @@ export default {
},
handleUploadCheck(file) {
console.log("[before upload]", file);
//console.log("[before upload]", file);
const LIMIT = 2 * 1024 * 1024; // bytes
if (file.size > LIMIT) {
this.$message({
@ -793,16 +793,16 @@ export default {
handleComponentModelUpdate(propName, { subject, payload: { data } }) {
this.dataForm[propName] = JSON.stringify(data);
console.log("[DialogJustForm] handleComponentModelUpdate", this.dataForm[propName]);
//console.log("[DialogJustForm] handleComponentModelUpdate", this.dataForm[propName]);
},
handleSelectChange(col, eventValue) {
console.log("[dialog] select change: ", col, eventValue);
//console.log("[dialog] select change: ", col, eventValue);
},
handleSwitchChange(val) {
console.log("[dialog] switch change: ", val, this.dataForm);
//console.log("[dialog] switch change: ", val, this.dataForm);
},
handleBtnClick(payload) {
console.log("btn click payload: ", payload);
//console.log("btn click payload: ", payload);
if ("name" in payload) {
switch (payload.name) {
@ -843,7 +843,7 @@ export default {
// this.configs.excludeProps.forEach((prop) => {
// delete actualPayload[prop];
// });
// console.log('actualPayload', actualPayload);
// //console.log('actualPayload', actualPayload);
// }
//
@ -859,7 +859,7 @@ export default {
.then(({ data: res }) => {
this.btnLoading = false;
this.loadingStatus = false;
console.log("[add&update] res is: ", res);
//console.log("[add&update] res is: ", res);
if (res.code === 0) {
this.$message.success(payload.name === "add" ? "添加成功" : "更新成功");
this.$emit("refreshDataList");
@ -868,7 +868,7 @@ export default {
// if (this.watingToRefreshQueue.length) {
// //
// this.watingToRefreshQueue.forEach((opt) => {
// console.log("[, ", opt, "]");
// //console.log("[, ", opt, "]");
// if ("fetchData" in opt) {
// opt.fetchData().then(({ data: res }) => {
// if (res.code === 0) {
@ -909,7 +909,7 @@ export default {
}
},
handleTabClick(payload) {
// console.log("tab click payload: ", this.activeMenu);
// //console.log("tab click payload: ", this.activeMenu);
// if (this.activeMenu === this.configs.menu[1].name) {
// //
// this.getSubList();
@ -947,7 +947,7 @@ export default {
}
}
this.$http.get(this.urls.subpage, { params }).then(({ data: res }) => {
console.log("[DialogWithMenu] getSubList:", res);
//console.log("[DialogWithMenu] getSubList:", res);
if (res.code === 0 && res.data?.list) {
//
this.subList = res.data.list;
@ -973,19 +973,19 @@ export default {
/** 列表handlers */
handleAddItem() {
// console.log('[dialog] handleAddItem ot list...');
// //console.log('[dialog] handleAddItem ot list...');
this.showBaseDialog = true;
this.$nextTick(() => {
console.log("[sub-dialog] ", this.$refs["sub-dialog"].init());
//console.log("[sub-dialog] ", this.$refs["sub-dialog"].init());
});
},
handleTableRowOperate({ type, data }) {
console.log("handleTableRowOperate", type, data);
//console.log("handleTableRowOperate", type, data);
switch (type) {
case "delete": {
//
console.log("delete....", data);
//console.log("delete....", data);
const itemName =
typeof data === "object" ? data.attrName || data.name || data.material || data.id : data;
return this.$confirm(`是否删除条目: ${itemName}`, "提示", {

View File

@ -194,7 +194,7 @@ export default {
this.dataForm = res.data;
await this.printByLocalData(res.data);
await this.getPrintStatus(id);
// this.getPrintStatus(id);
},
async printByLocalData(data) {
@ -202,7 +202,7 @@ export default {
this.paintBarCode(data.packTechCode || "0000-0000-0000");
// HU
await this.paintQrCode(data.hu || "- 无HU数据 -");
await this.handlePrint();
this.handlePrint();
},
initPrintPlugin() {
@ -245,70 +245,87 @@ export default {
}
},
// handlePrint() {
// return new Promise((resolve, reject) => {
// this.lodop.PRINT_INIT("RGV");
// //
// this.lodop.SET_PRINT_MODE("CATCH_PRINT_STATUS", true);
// if (this.lodop.CVERSION) {
// // jobId
// this.lodop.On_Return = (TaskID, Value) => {
// this.jobId = Value;
// resolve();
// };
// }
// // 60mm150mm
// this.lodop.SET_PRINT_PAGESIZE(1, 600, 1500, "ZebraT231 Tag Paper");
// this.lodop.ADD_PRINT_HTM(0, 0, "100%", "100%", document.querySelector(".print-area").outerHTML);
// this.lodop.PRINT();
// });
// },
// getPrintStatus(id) {
// return new Promise((resolve, reject) => {
// if (!this.jobId || !this.lodop) reject(-1);
// this.lodop.SET_PRINT_MODE("CATCH_PRINT_STATUS", true);
// if (this.lodop.CVERSION) {
// this.lodop.On_Return = (TaskID, Value) => {
// //console.log("this.lodop.On_Return", this.lodop.On_Return, this.jobId, Value);
// if (Value.toString() == "1") {
// //
// this.sendSuccess()
// .then(() => {
// this.$message.success(` ${id} `);
// this.$emit("refresh-list");
// resolve();
// })
// .catch((err) => {
// this.$message.error(err);
// reject(err);
// });
// } else {
// this.$message.error(` ${id} `);
// }
// };
// this.lodop.GET_VALUE("PRINT_STATUS_OK", this.jobId);
// }
// });
// },
handlePrint() {
return new Promise((resolve, reject) => {
this.lodop.PRINT_INIT("RGV小票打印");
//
this.lodop.SET_PRINT_MODE("CATCH_PRINT_STATUS", true);
if (this.lodop.CVERSION) {
// jobId
this.lodop.On_Return = (TaskID, Value) => {
this.jobId = Value;
// this.$nextTick(() => {
// this.getPrintStatus(resolve, reject);
// });
console.log("this.lodop.On_Return", this.lodop.On_Return, this.jobId);
resolve();
};
}
// 60mm150mm
this.lodop.SET_PRINT_PAGESIZE(1, 600, 1500, "ZebraT231 Tag Paper");
this.lodop.ADD_PRINT_HTM(0, 0, "100%", "100%", document.querySelector(".print-area").outerHTML);
this.lodop.PRINT();
});
this.lodop.PRINT_INIT("RGV小票打印");
// 60mm150mm
this.lodop.SET_PRINT_PAGESIZE(1, 600, 1500, "ZebraT231 Tag Paper");
this.lodop.ADD_PRINT_HTM(0, 0, "100%", "100%", document.querySelector(".print-area").outerHTML);
this.lodop.PRINT();
},
getPrintStatus(id) {
return new Promise((resolve, reject) => {
if (!this.jobId || !this.lodop) reject(-1);
this.lodop.SET_PRINT_MODE("CATCH_PRINT_STATUS", true);
if (this.lodop.CVERSION) {
this.lodop.On_Return = (TaskID, Value) => {
console.log("this.lodop.On_Return", this.lodop.On_Return, this.jobId, Value);
if (Value.toString() == "1") {
//
this.sendSuccess()
.then(() => {
this.$message.success(`打印 ${id} 成功`);
this.$emit("refresh-list");
resolve();
})
.catch((err) => {
this.$message.error(err);
reject(err);
});
} else {
this.$message.error(`打印 ${id} 失败`);
}
};
this.lodop.GET_VALUE("PRINT_STATUS_OK", this.jobId);
}
});
},
// getPrintStatus(id) {
// //
// this.sendSuccess()
// .then(() => {
// this.$message.success(` ${id} `);
// this.$emit("refresh-list");
// })
// .catch((err) => {
// this.$message.error("code" in err && "msg" in err ? `${err.code}: ${err.msg}` : err);
// });
// },
sendSuccess() {
return this.$http({
url: "/pms/pallet/print",
method: "post",
data: this.palletId,
headers: {
"Content-Type": "application/json",
},
}).then(({ data: res }) => {
if (res.code == 0) return;
else throw new Error(res.msg);
});
},
// sendSuccess() {
// return this.$http({
// url: "/pms/pallet/print",
// method: "post",
// data: this.palletId,
// headers: {
// "Content-Type": "application/json",
// },
// }).then(({ data: res }) => {
// if (res.code == 0) return;
// else throw new Error(res.msg);
// });
// },
close() {
this.$emit("destroy");

View File

@ -206,7 +206,7 @@ export default {
},
handleOperate({ type, data }) {
console.log("payload", type, data);
//console.log("payload", type, data);
switch (type) {
case "edit":
this.mode = "form";

View File

@ -103,7 +103,7 @@ export default {
this.configs.rows.forEach((row) => {
row.forEach((col) => {
dataForm[col.prop] = col.default ?? "";
console.log("[small dialog]==========>", col.prop, dataForm[col.prop]);
//console.log("[small dialog]==========>", col.prop, dataForm[col.prop]);
if (typeof col.fetchData === "function")
col.fetchData().then(({ data: res }) => {
@ -119,13 +119,13 @@ export default {
[col.customLabel]: item[col.customLabel],
}))
);
console.log(
res.data.list.map((item) => ({
label: item.name,
value: item.id,
[col.customLabel]: item[col.customLabel],
}))
);
//console.log(
// res.data.list.map((item) => ({
// label: item.name,
// value: item.id,
// [col.customLabel]: item[col.customLabel],
// }))
// );
} else {
this.$set(col, "options", []);
}
@ -156,7 +156,7 @@ export default {
resetForm(excludeId = false) {
setTimeout(() => {
Object.keys(this.dataForm).forEach((key) => {
// console.log(">>> clearing key: ", key);
// //console.log(">>> clearing key: ", key);
if (excludeId && key === "id") return;
this.dataForm[key] = null;
});
@ -165,7 +165,7 @@ export default {
},
init(id, isdetail = false) {
// console.log("[small dialog] init", id, isdetail);
// //console.log("[small dialog] init", id, isdetail);
this.visible = true;
this.detailMode = isdetail;
@ -201,8 +201,8 @@ export default {
handleSwitchChange() {},
handleBtnClick(payload) {
console.log("btn click payload: ", payload);
console.log("configs", this.configs);
//console.log("btn click payload: ", payload);
//console.log("configs", this.configs);
if ("name" in payload) {
switch (payload.name) {
case "cancel":
@ -213,7 +213,7 @@ export default {
this.$refs.dataForm.validate((passed, result) => {
if (passed) {
this.btnLoading = true;
console.log("update extraParam: ", this.configs.extraParam);
//console.log("update extraParam: ", this.configs.extraParam);
const method = payload.name === "add" ? "POST" : "PUT";
const fields = {};
@ -229,7 +229,7 @@ export default {
...fields,
},
}).then(({ data: res }) => {
console.log("[add&update] res is: ", res);
//console.log("[add&update] res is: ", res);
this.btnLoading = false;
if (res.code === 0) {
this.$message.success(payload.name === "add" ? "添加成功" : "更新成功");
@ -242,7 +242,7 @@ export default {
}
}
} else {
console.log("[x] 不是这么用的! 缺少name属性");
//console.log("[x] ! name");
}
},

View File

@ -17,7 +17,7 @@ export default {
},
methods: {
emitClick() {
// console.log('inject data:' ,this.injectData)
// //console.log('inject data:' ,this.injectData)
this.$emit('emit-data', {
type: this.injectData.head?.actionName || 'view-detail-action',
data: this.injectData.head?.emitFullData ? this.injectData : this.injectData.id
@ -25,7 +25,7 @@ export default {
}
},
render: function (h) {
// console.log('button content:', this.injectData)
// //console.log('button content:', this.injectData)
return h('span', null, [h('el-button', { props: { type: 'text' }, style: { padding: 0, margin: '5px 0' }, on: { click: this.emitClick } }, this.injectData.head?.buttonContent || this.defaultText)])
}
}

View File

@ -53,7 +53,7 @@ export default {
};
},
// mounted() {
// console.log('inject data', this.injectData)
// //console.log('inject data', this.injectData)
// },
methods: {
// 发射事件
@ -94,7 +94,7 @@ export default {
if ("enable" in opt && typeof opt.enable === "function") {
shouldDisabled = !opt.enable(this.injectData);
}
// console.log('should disabled', shouldDisabled)
// //console.log('should disabled', shouldDisabled)
btns.push(
h(
"el-button",

View File

@ -26,7 +26,7 @@ export default {
},
// modelValue(val) {
// // 这样不行,会导致编辑时富文本内容是反过来的...
// console.log('[modelValue] val is: ', val)
// //console.log('[modelValue] val is: ', val)
// this.editor && this.editor.setContents(JSON.parse(val), "user")
// }
modelValue(val) {

View File

@ -16,7 +16,7 @@ export default {
},
methods: {
emitClick() {
// console.log('inject data:' ,this.injectData)
// //console.log('inject data:' ,this.injectData)
this.$emit('emit-data', {
type: this.injectData.head?.actionName || 'select-change-action',
data: this.injectData.head?.emitFullData ? this.injectData : this.injectData.id
@ -24,7 +24,7 @@ export default {
}
},
render: function (h) {
// console.log('button content:', this.injectData)
// //console.log('button content:', this.injectData)
return h('span', null, [h('el-button', { props: { type: 'text' }, style: { paddingLeft: 0 }, on: { click: this.emitClick } }, this.injectData.head?.buttonContent || this.defaultText)])
}
}

View File

@ -49,7 +49,7 @@ export default {
}
},
mounted() {
// console.log("[component] StatusComponent: ", this.injectData);
// //console.log("[component] StatusComponent: ", this.injectData);
},
methods: {
// 发射事件

View File

@ -19,7 +19,7 @@ export default {
};
},
mounted() {
// console.log("[SwitchBtn] injectData: ", this.injectData);
// //console.log("[SwitchBtn] injectData: ", this.injectData);
},
computed: {
status: {

View File

@ -59,7 +59,7 @@ export default {
watch: {
fileList(val) {
if (val) {
console.log("[FileList] fileList prop:", val);
//console.log("[FileList] fileList prop:", val);
}
},
},
@ -82,7 +82,7 @@ export default {
responseType: "blob",
})
.then(({ data: res }) => {
console.log("preivew", res);
//console.log("preivew", res);
if (/image/i.test(res.type) || /pdf/i.test(res.type)) {
let a = document.createElement('a')
a.setAttribute('target', '_blank')
@ -100,7 +100,7 @@ export default {
},
handleDownload(file) {
console.log("[FileList] handleDownload", file);
//console.log("[FileList] handleDownload", file);
this.$http
.get("/pms/attachment/downloadFile", {
params: {
@ -136,12 +136,12 @@ export default {
});
},
handleDelete(file) {
console.log("[FileList] handleDelete", file);
//console.log("[FileList] handleDelete", file);
// TODO:
this.$emit("delete-a-file", file.id);
},
handleSearchClick() {
console.log("[FileList] handleSearchClick()");
//console.log("[FileList] handleSearchClick()");
this.showSearchInput = true;
},
},

View File

@ -77,12 +77,12 @@ export default {
},
},
mounted() {
console.log("[UploadBtn] mounted()", this.fileList, this.uploadedFileList);
//console.log("[UploadBtn] mounted()", this.fileList, this.uploadedFileList);
this.uploadedFileList = this.fileList ?? [];
},
methods: {
handleRemoveFile(fileId) {
console.log("[UploadBtn] handleRemoveFile", fileId);
//console.log("[UploadBtn] handleRemoveFile", fileId);
this.$confirm("确定删除此文件?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
@ -112,7 +112,7 @@ export default {
},
handleUploadSuccess(response, file, fileList) {
console.log("[UploadBtn] uploadedFileList", response, file, fileList, this.uploadedFileList);
//console.log("[UploadBtn] uploadedFileList", response, file, fileList, this.uploadedFileList);
if (response.code === 0) {
const uploadedFile = response.data[0];

View File

@ -70,14 +70,14 @@ export default {
},
// 表单提交
dataFormSubmit() {
console.log('in minxin basic-page dataformsubmit')
//console.log('in minxin basic-page dataformsubmit')
this.$refs["dataForm"].validate((valid) => {
if (!valid) {
return false;
}
this.$http[!this.dataForm.id ? "post" : "put"](this.urlOptions.submitURL, this.dataForm)
.then(({ data: res }) => {
// console.log('[confirm] here...')
// //console.log('[confirm] here...')
if (res.code !== 0) {
return this.$message.error(res.msg);
}

View File

@ -103,7 +103,7 @@ export default {
this.$refs.addOrUpdate.init(val.data.id);
});
} else if (val.type === "delete") {
console.log('va', val)
//console.log('va', val)
this.deleteHandle(val.data.id, val.data.name)
}
},
@ -151,7 +151,7 @@ export default {
this.addOrUpdateHandle()
break;
default:
console.log(val)
//console.log(val)
}
},
handleCancel() {
@ -165,7 +165,7 @@ export default {
refreshLocalstorage() {
// 刷新数据字典数据
this.$http("/sys/dict/type/all", { limit: 999, page: 1 }).then(({ data: res }) => {
// console.log("[dictData] loading...", res);
// //console.log("[dictData] loading...", res);
if (res.code === 0 && res.data) {
let dictList = {}
res.data.map(item => {

View File

@ -9,7 +9,7 @@ function m(url, type, fn) {
m(carManagement.url, carManagement.type, opt => {
let { limit, page } = JSON.parse(opt.body)
// console.log('limit, page', limit, page, opt.body)
// //console.log('limit, page', limit, page, opt.body)
// limit = 5
return {
code: 0,

View File

@ -17,7 +17,7 @@ const http = axios.create({
http.interceptors.request.use(config => {
config.headers['Accept-Language'] = Cookies.get('language') || 'zh-CN'
config.headers['token'] = 'token' in config.headers ? config.headers.token : (Cookies.get('token') || '')
// console.log('[request interceptor] token is:', config.headers['token'])
// //console.log('[request interceptor] token is:', config.headers['token'])
// 默认参数
var defaults = {}
// 防止缓存GET请求默认带_t参数

View File

@ -115,7 +115,7 @@ export default {
},
},
activated() {
console.log("list view with ehad activated..........");
//console.log("list view with ehad activated..........");
this.refreshLayoutKey = this.layoutTable();
},
watch: {
@ -182,7 +182,7 @@ export default {
}
)
.then(({ data: res }) => {
console.log("[http response] res is: ", res);
//console.log("[http response] res is: ", res);
if (res.code === 0) {
// page :
@ -232,7 +232,7 @@ export default {
/** 处理 表格操作 */
handleOperate({ type, data }) {
console.log("payload", type, data);
//console.log("payload", type, data);
// component url
// payload: { type: string, data: string | number | object }
switch (type) {
@ -289,7 +289,7 @@ export default {
break;
}
case "status": {
console.log("status", data);
//console.log("status", data);
// TODO:
const { id, code } = data;
const queryCondition = { id, code };
@ -318,7 +318,7 @@ export default {
break;
}
case "to-bom-detail": {
// console.log('to-bom-detail', data.name)
// //console.log('to-bom-detail', data.name)
//
return this.$router.push({
name: "pms-bomDetails",
@ -386,7 +386,7 @@ export default {
});
}
case "preview": {
console.log("[PREVIEW] data", data);
//console.log("[PREVIEW] data", data);
// report preview
return this.$router.push({
name: "pms-reportPreview",
@ -396,7 +396,7 @@ export default {
});
}
case "design": {
console.log("[DESIGN] data", data);
//console.log("[DESIGN] data", data);
// report design
return this.$router.push({
name: "pms-reportDesign",
@ -431,7 +431,7 @@ export default {
case "sync": {
let shouldShowOverlay = false;
let payload = "";
console.log("sync...", type, data);
//console.log("sync...", type, data);
if (typeof data === "object") {
const head = data.head;
const syncOpt =
@ -469,7 +469,7 @@ export default {
},
handleBtnClick({ btnName, payload }) {
console.log("[search] form handleBtnClick", btnName, payload);
//console.log("[search] form handleBtnClick", btnName, payload);
switch (btnName) {
case "新增":
this.openDialog();
@ -503,7 +503,7 @@ export default {
});
}
});
console.log("查询", params);
//console.log("", params);
this.getList(params);
break;
}
@ -541,7 +541,7 @@ export default {
});
}
this.$nextTick(() => {
console.log(`[edit-dialog] extraParams: ${extraParams}`);
//console.log(`[edit-dialog] extraParams: ${extraParams}`);
this.$refs["edit-dialog"].init(/** some args... */ row_id, detail_mode, tag_info, extraParams);
});
},

View File

@ -165,10 +165,10 @@ export default {
},
watch: {
page: (val) => {
console.log("page changed:", val);
//console.log("page changed:", val);
},
size: (val) => {
console.log("size changed:", val);
//console.log("size changed:", val);
},
triggerUpdate(val, oldVal) {
if (val && val !== oldVal) {
@ -224,7 +224,7 @@ export default {
});
}
console.log("this.queryParams is: ", JSON.stringify(this.queryParams));
//console.log("this.queryParams is: ", JSON.stringify(this.queryParams));
this.initDataWhenLoad && this.getList();
},
@ -257,7 +257,7 @@ export default {
}
)
.then(({ data: res }) => {
console.log("[http response] res is: ", res);
//console.log("[http response] res is: ", res);
if (res.code === 0) {
// page :
@ -307,7 +307,7 @@ export default {
/** 处理 表格操作 */
handleOperate({ type, data }) {
console.log("payload", type, data);
//console.log("payload", type, data);
// component url
// payload: { type: string, data: string | number | object }
switch (type) {
@ -363,7 +363,7 @@ export default {
.catch((err) => {});
}
case "edit": {
console.log("[edit] ", data);
//console.log("[edit] ", data);
this.openDialog(data); /** data is ==> id */
break;
}
@ -395,7 +395,7 @@ export default {
break;
}
case "status": {
console.log("status", data);
//console.log("status", data);
// TODO:
const { id, code } = data;
const queryCondition = { id, code };
@ -420,7 +420,7 @@ export default {
break;
}
case "view-attachment-justform-version": {
console.log(data);
//console.log(data);
break;
}
case "view-recipe": {
@ -428,7 +428,7 @@ export default {
break;
}
case "to-bom-detail": {
console.log("to-bom-detail", data);
//console.log("to-bom-detail", data);
//
return this.$router.push({
name: "pms-bomDetails",
@ -447,7 +447,7 @@ export default {
.then(() => {
//
let payload = "";
console.log("copying...", type, data);
//console.log("copying...", type, data);
if (typeof data === "object") {
const head = data.head;
const copyOpt =
@ -517,7 +517,7 @@ export default {
});
}
case "preview": {
console.log("[PREVIEW] data", data);
//console.log("[PREVIEW] data", data);
// report preview
return this.$router.push({
name: "pms-reportPreview",
@ -527,7 +527,7 @@ export default {
});
}
case "design": {
console.log("[DESIGN] data", data);
//console.log("[DESIGN] data", data);
// report design
return this.$router.push({
name: "pms-reportDesign",
@ -594,7 +594,7 @@ export default {
}).then(() => {
let shouldShowOverlay = false;
let payload = "";
// console.log("sync...", type, data);
// //console.log("sync...", type, data);
if (typeof data === "object") {
const head = data.head;
const syncOpt =
@ -638,9 +638,22 @@ export default {
type: "warning",
})
.then(this.printOnce.bind(null, data))
.catch((err) => {
// console.log("cancel ", err);
});
.then(() => {
// send successful request
return this.$http({
url: "/pms/pallet/print",
method: "post",
data: data,
headers: {
"Content-Type": "application/json",
},
});
})
.then(() => {
this.$message.success("打印成功!");
this.getList();
})
.catch(console.error);
}
}
},
@ -653,7 +666,7 @@ export default {
},
handleBtnClick({ btnName, payload }) {
console.log("[search] form handleBtnClick", btnName, payload);
//console.log("[search] form handleBtnClick", btnName, payload);
switch (btnName) {
case "批量同步":
this.overlayVisible = true;
@ -676,8 +689,8 @@ export default {
data: { page: this.page },
responseType: "blob",
}).then((res) => {
// console.log("", res);
const filename = res.headers['content-disposition'].split('filename=')[1];
// //console.log("", res);
const filename = res.headers["content-disposition"].split("filename=")[1];
const blob = new Blob([res.data]);
/** 通知 */
this.$notify({
@ -720,7 +733,7 @@ export default {
delete params.timerange;
}
// console.log(
// //console.log(
// " params",
// JSON.stringify({
// // ...this.queryParams,
@ -747,7 +760,7 @@ export default {
this.$http
.post(this.urls.syncUrl)
.then(({ data: res }) => {
console.log("同步", res);
//console.log("", res);
this.$message({ message: res.msg, type: res.code === 0 ? "success" : "error" });
this.getList();
this.overlayVisible = false;
@ -770,20 +783,35 @@ export default {
cancelButtonText: "我再想想",
type: "warning",
})
.then(async () => {
const batchPrint = async function* () {
for (const { id } of this.tableSelectedIds) {
yield { id: id, result: await this.printOnce(id) };
}
};
for await (const { id } of batchPrint.call(this)) {
//console.log("...", id);
// send successful request
await this.$http({
url: "/pms/pallet/print",
method: "post",
data: id,
headers: {
"Content-Type": "application/json",
},
});
}
})
.then(() => {
console.log("打印如下这些 ids:", this.tableSelectedIds);
// this.tableSelectedIds.reduce(async (id, _) => {
// await this.printOnce(id);
// })
this.tableSelectedIds.forEach(async (id) => {
await this.printOnce(id);
});
this.$message.success("打印成功!");
this.getList();
})
.catch((err) => {
this.$message.error(`批量打印出错: ${err}`);
});
case "报工":
console.log("报工ids:", this.tableSelectedIds);
//console.log("ids:", this.tableSelectedIds);
this.carReportDialogVisible = true;
this.$nextTick(() => {
this.$refs["car-report-dialog"].init();
@ -818,7 +846,7 @@ export default {
return new Promise((resolve) => {
this.printDOMmount = true;
this.$nextTick(async () => {
console.log("[Print] 打印项:", id);
//console.log("[Print] :", id);
await this.$refs["print"].print(id);
resolve();
});
@ -849,7 +877,7 @@ export default {
});
}
this.$nextTick(() => {
console.log(`[edit-dialog] extraParams: ${extraParams}`);
//console.log(`[edit-dialog] extraParams: ${extraParams}`);
this.$refs["edit-dialog"].init(/** some args... */ row_id, detail_mode, tag_info, extraParams);
});
},

View File

@ -56,7 +56,7 @@ export default {
}
list.push(newRouteItem);
} else {
// console.log(menu.name, '')
// //console.log(menu.name, '')
}
});
}

View File

@ -190,19 +190,19 @@ export default {
const promiseHistory = {};
const getData = (col, param) => {
console.log("getData: ", col.prop, "/", param ?? "no param!");
//console.log("getData: ", col.prop, "/", param ?? "no param!");
// -
promiseHistory[col.prop] = col.fetchData(param).then(({ data: res }) => {
if (res.code === 0) {
if ("list" in res.data) {
console.log(
"SdASD ",
res.data.list.map((i) => ({
label: col.optionLabel ? i[col.optionLabel] : i.name,
value: col.optionValue ? i[col.optionValue] : i.id,
[col.customLabel]: i[col.customLabel],
}))
);
//console.log(
// "SdASD ",
// res.data.list.map((i) => ({
// label: col.optionLabel ? i[col.optionLabel] : i.name,
// value: col.optionValue ? i[col.optionValue] : i.id,
// [col.customLabel]: i[col.customLabel],
// }))
// );
// options
this.$set(
col,
@ -226,13 +226,13 @@ export default {
//
if ("injectTo" in col) {
console.log("set watcher: ", col.prop);
//console.log("set watcher: ", col.prop);
const valueProp = "optionValue" in col ? col.optionValue : "id";
const unwatch = this.$watch(
() => this.dataForm[col.prop],
(val) => {
console.log("do watcher: ", col.prop);
//console.log("do watcher: ", col.prop);
if (col.disableWatcherOnEdit && this.editMode) return;
if (!val) {
col.injectTo.map((item) => {
@ -248,7 +248,7 @@ export default {
this.$forceUpdate();
});
} else {
console.log('[x] if ("injectTo" in col) {');
//console.log('[x] if ("injectTo" in col) {');
}
},
{
@ -287,14 +287,14 @@ export default {
//
if ("injectTo" in col && !col.watcher) {
console.log("set watcher: ", col.prop);
//console.log("set watcher: ", col.prop);
const valueProp = "optionValue" in col ? col.optionValue : "id";
const unwatch = this.$watch(
() => this.dataForm[col.prop],
(val) => {
if (col.disableWatcherOnEdit && this.editMode) return;
console.log("do watcher: ", col.prop);
//console.log("do watcher: ", col.prop);
if (!val) {
col.injectTo.map((item) => {
this.$set(this.dataForm, item[0], null);
@ -309,7 +309,7 @@ export default {
this.$forceUpdate();
});
} else {
console.log('[x] if ("injectTo" in col) {');
//console.log('[x] if ("injectTo" in col) {');
}
},
{
@ -330,16 +330,16 @@ export default {
}
});
console.log("after getData: ", promiseHistory);
//console.log("after getData: ", promiseHistory);
};
/** 处理函数 */
const handleFn = (prevProp, anchorField, anchorValue, targetField, col) => {
console.log("[handleFn]: ", prevProp, anchorField, anchorValue, targetField);
//console.log("[handleFn]: ", prevProp, anchorField, anchorValue, targetField);
/** 此时 cachedList 已经确保可用了 */
const target = this.cachedList[prevProp].find((i) => i[anchorField] === anchorValue);
const param = target ? target[targetField] : "";
console.log("((( chosenObject )))", target);
//console.log("((( chosenObject )))", target);
getData(col, param);
};
@ -358,13 +358,13 @@ export default {
row.forEach((col) => {
if (col == null) return;
if (col.fetchData && typeof col.fetchData === "function" && col.hasPrev) {
console.log("[hasPrev] set watcher: ", col.hasPrev);
//console.log("[hasPrev] set watcher: ", col.hasPrev);
// -
const unwatch = this.$watch(
() => this.dataForm[col.hasPrev],
(val) => {
console.log("[hasPrev] do watcher: ", col.hasPrev);
//console.log("[hasPrev] do watcher: ", col.hasPrev);
if (!val) {
col.injectTo.map((item) => {
this.$set(this.dataForm, item[0], null);
@ -398,11 +398,11 @@ export default {
if (this.configs.extraFields)
this.configs.extraFields.forEach((cnf) => {
if (cnf.listenTo) {
console.log("set watcher for: ", cnf.prop);
//console.log("set watcher for: ", cnf.prop);
const unwatch = this.$watch(
() => this.dataForm[cnf.listenTo.prop],
(carId) => {
console.log("do watcher for: ", cnf.prop);
//console.log("do watcher for: ", cnf.prop);
if (!carId) return;
if (cnf.disableWatcherOnEdit && this.editMode) return;
cnf.listenTo.handler.call(this, this.cachedList[cnf.listenTo.prop], carId);
@ -439,14 +439,14 @@ export default {
resetSpecificFields(fields) {
Object.keys(this.dataForm).forEach((key) => {
// console.log(`${key} ${fields}`, key in fields, fields.indexOf(key))
// //console.log(`${key} ${fields}`, key in fields, fields.indexOf(key))
if (fields.indexOf(key) !== -1) {
// console.log(`key ${key} in fields`)
// //console.log(`key ${key} in fields`)
// this.dataForm[key] = null;
this.$set(this.dataForm, key, null);
}
});
console.log("this.dataform", this.dataForm);
//console.log("this.dataform", this.dataForm);
},
resetForm(excludeId = false, immediate = false) {
@ -468,9 +468,9 @@ export default {
/** init **/
init(id, detailMode, tagInfo, extraParams) {
// console.log("[DialogJustForm] init", this.dataForm, id, detailMode);
// //console.log("[DialogJustForm] init", this.dataForm, id, detailMode);
if (this.$refs.dataForm) {
// console.log("[DialogJustForm] clearing form validation...");
// //console.log("[DialogJustForm] clearing form validation...");
// dialog dataForm [0]
this.$refs.dataForm.clearValidate();
}
@ -481,7 +481,7 @@ export default {
/** 判断 extraParams */
if (extraParams && typeof extraParams === "object") {
for (const [key, value] of Object.entries(extraParams)) {
// console.log("[dialog] dataForm | key | value", this.dataForm, key, value);
// //console.log("[dialog] dataForm | key | value", this.dataForm, key, value);
this.$set(this.dataForm, key, value);
}
}
@ -514,7 +514,7 @@ export default {
url: file.fileUrl,
}));
}
// console.log("[DialogJustForm] init():", this.dataForm);
// //console.log("[DialogJustForm] init():", this.dataForm);
} else {
this.$message({
message: `${res.code}: ${res.msg}`,
@ -540,7 +540,7 @@ export default {
handleButtonClick(col) {
if (!("onClick" in col)) {
console.log("[handleButtonClick] 配置文件config.js 里没有绑定 onClick");
//console.log("[handleButtonClick] config.js onClick");
return;
}
@ -551,7 +551,7 @@ export default {
handleSelectChange(col, eventValue) {
if ("autoUpdateProp" in col) {
//
// console.log(col.options, eventValue, this.savedDatalist);
// //console.log(col.options, eventValue, this.savedDatalist);
const item = this.savedDatalist[col.prop].find((item) => item.id === eventValue);
this.shadowDataForm[col.autoUpdateProp] = item.cate ?? null;
}
@ -559,17 +559,17 @@ export default {
},
handleSwitchChange(val) {
console.log("[dialog] switch change: ", val, this.dataForm);
//console.log("[dialog] switch change: ", val, this.dataForm);
},
handleComponentModelUpdate(propName, { subject, payload: { data } }) {
this.dataForm[propName] = JSON.stringify(data);
console.log("[DialogJustForm] handleComponentModelUpdate", this.dataForm[propName]);
//console.log("[DialogJustForm] handleComponentModelUpdate", this.dataForm[propName]);
},
addOrUpdate(method = "POST", url) {
if ("parentId" in this.dataForm) {
console.log("[DialogJustForm parentId]", this.dataForm.parentId);
//console.log("[DialogJustForm parentId]", this.dataForm.parentId);
// parentId cascader ["xxx"]xxx
const lastItem = this.dataForm.parentId.length - 1;
this.dataForm.parentId = this.dataForm.parentId[lastItem];
@ -621,7 +621,7 @@ export default {
data: httpPayload,
})
.then(({ data: res }) => {
console.log("[add&update] res is: ", res);
//console.log("[add&update] res is: ", res);
this.loadingStatus = false;
if (res.code === 0) {
this.$message.success(method === "POST" ? "添加成功" : "更新成功");
@ -647,7 +647,7 @@ export default {
},
handleBtnClick(payload) {
console.log("btn click payload: ", payload);
//console.log("btn click payload: ", payload);
if ("name" in payload) {
switch (payload.name) {
@ -659,7 +659,7 @@ export default {
break;
case "resetSpecific":
// qualityInspectionRecord config
console.log("resetFields", this.resetFields);
//console.log("resetFields", this.resetFields);
this.resetSpecificFields(this.resetFields);
break;
case "add":
@ -674,18 +674,18 @@ export default {
break;
}
case "add-car-payload": {
console.log("edit-car-payload", payload);
//console.log("edit-car-payload", payload);
this.addOrUpdate("POST", this.urls.payloadFormUrl);
break;
}
}
} else {
console.log("[x] 不是这么用的! 缺少name属性");
//console.log("[x] ! name");
}
},
handleUploadChange(file, fileList) {
console.log("[Upload] handleUploadChange...", file, fileList);
//console.log("[Upload] handleUploadChange...", file, fileList);
},
handleClose() {

View File

@ -95,7 +95,7 @@ export default {
},
blenderOrderId() {
const item = this.listQueryExtra.find((item) => item.blenderOrderId);
console.log("Find blenderOrderId", item);
//console.log("Find blenderOrderId", item);
return item ? item.blenderOrderId : null;
},
},
@ -104,10 +104,10 @@ export default {
},
watch: {
page: (val) => {
console.log("page changed:", val);
//console.log("page changed:", val);
},
size: (val) => {
console.log("size changed:", val);
//console.log("size changed:", val);
},
triggerUpdate(val, oldVal) {
if (val && val !== oldVal) {
@ -191,7 +191,7 @@ export default {
}
)
.then(({ data: res }) => {
console.log("[http response] res is: ", res);
//console.log("[http response] res is: ", res);
if (res.code === 0) {
// page :
@ -240,7 +240,7 @@ export default {
/** 处理 表格操作 */
handleOperate({ type, data }) {
console.log("payload", type, data);
//console.log("payload", type, data);
// component url
// payload: { type: string, data: string | number | object }
switch (type) {
@ -381,7 +381,7 @@ export default {
this.$http
.post(this.urls.syncUrl)
.then(({ data: res }) => {
console.log("同步", res);
//console.log("", res);
this.$message({ message: res.msg, type: res.code === 0 ? "success" : "error" });
this.getList();
this.overlayVisible = false;

View File

@ -100,7 +100,7 @@ export default {
watch: {
blenderOrderId: {
handler(val) {
// console.log("blenderOrderId changed", val);
// //console.log("blenderOrderId changed", val);
},
immediate: true,
},

View File

@ -23,11 +23,11 @@ export default {
computed: {
// id
id() {
console.log("computed id", this.$route.query.id || "");
//console.log("computed id", this.$route.query.id || "");
return this.$route.query.id || "";
},
refreshPage() {
console.log("computed refreshPage");
//console.log("computed refreshPage");
const val = this.$route.query.refreshPage ? Math.random().toString() : null;
// location.href refreshPage
location.href = location.href.replace(/&refreshPage=[^&]*/, "");
@ -50,7 +50,7 @@ export default {
// handler: function (route) {
// if (route.query.id) {
// this.triggerUpdateKey = Math.random().toString()
// console.log('[$oute changed] val.params.id', route.query.id, this.triggerUpdateKey)
// //console.log('[$oute changed] val.params.id', route.query.id, this.triggerUpdateKey)
// }
// },
// immediate: true,
@ -60,7 +60,7 @@ export default {
watch: {
refreshPage: {
handler: function (val) {
console.log("refreshPage", val);
//console.log("refreshPage", val);
if (val) {
// this.triggerUpdateKey = Math.random().toString();
this.triggerUpdateKey = val;

View File

@ -135,7 +135,7 @@ export default {
}
)
.then(({ data: res }) => {
console.log("[http response] res is: ", res);
//console.log("[http response] res is: ", res);
if (res.code === 0) {
// page :
@ -176,7 +176,7 @@ export default {
/** 处理 表格操作 */
handleOperate({ type, data, toRouter }) {
console.log("payload", type, data);
//console.log("payload", type, data);
// component url
// payload: { type: string, data: string | number | object }
switch (type) {
@ -283,7 +283,7 @@ export default {
},
handleBtnClick({ btnName, payload }) {
console.log("[search] form handleBtnClick", btnName, payload);
//console.log("[search] form handleBtnClick", btnName, payload);
switch (btnName) {
case "新增":
this.openDialog();
@ -320,7 +320,7 @@ export default {
});
}
});
console.log("查询", this.cachedSearchCondition);
//console.log("", this.cachedSearchCondition);
this.getList(this.cachedSearchCondition);
break;
}

View File

@ -120,7 +120,7 @@ export default {
if (col.delayRequest) delayList.push(col);
// let doRequest = null;
// if (col.fetchData.length) {
// console.log(`this.bomCode '${this.bomCode}'`);
// //console.log(`this.bomCode '${this.bomCode}'`);
// //
// doRequest = col.fetchData.bind(this.bomCode);
// } else doRequest = col.fetchData;
@ -146,7 +146,7 @@ export default {
}))
);
} else {
console.log("请检查返回的数据类型");
//console.log("");
}
} else {
col.options.splice(0);
@ -207,7 +207,7 @@ export default {
if (excludeId && key === "id") return;
this.dataForm[key] = null;
});
console.log("[DialogJustForm resetForm()] clearing form...");
//console.log("[DialogJustForm resetForm()] clearing form...");
this.$refs.dataForm.clearValidate();
this.$emit("dialog-closed"); //
},
@ -220,17 +220,17 @@ export default {
// id ID id
const { id, code, blender, bomId } = row;
// console.log(" { id, code, blender } = row;", row);
// //console.log(" { id, code, blender } = row;", row);
if (this.$refs.dataForm) {
this.$refs.dataForm.clearValidate();
}
this.delayList.forEach((col) => {
// console.log("delay fetch", col);
// //console.log("delay fetch", col);
// col
if (col.fetchDataParam in row) {
// console.log("delay row ", row, row[col.fetchDataParam]);
// //console.log("delay row ", row, row[col.fetchDataParam]);
col.fetchData(row[col.fetchDataParam]).then(({ data: res }) => {
if (res.code === 0) {
if ("list" in res.data) {
@ -252,7 +252,7 @@ export default {
}))
);
} else {
console.log("请检查返回的数据类型");
//console.log("");
}
} else {
col.options.splice(0);
@ -274,17 +274,17 @@ export default {
/** handlers */
handleSelectChange(col, eventValue) {
// console.log("[dialog] select change: ", col, eventValue);
// //console.log("[dialog] select change: ", col, eventValue);
this.$forceUpdate();
},
handleSwitchChange(val) {
// console.log("[dialog] switch change: ", val, this.dataForm);
// //console.log("[dialog] switch change: ", val, this.dataForm);
},
handleComponentModelUpdate(propName, { subject, payload: { data } }) {
this.dataForm[propName] = JSON.stringify(data);
// console.log("[DialogJustForm] handleComponentModelUpdate", this.dataForm[propName]);
// //console.log("[DialogJustForm] handleComponentModelUpdate", this.dataForm[propName]);
},
addOrUpdate(method = "POST") {
@ -321,7 +321,7 @@ export default {
},
handleBtnClick(payload) {
console.log("btn click payload: ", payload);
//console.log("btn click payload: ", payload);
if ("name" in payload) {
switch (payload.name) {
@ -333,12 +333,12 @@ export default {
break;
}
} else {
console.log("[x] 不是这么用的! 缺少name属性");
//console.log("[x] ! name");
}
},
handleUploadChange(file, fileList) {
console.log("[Upload] handleUploadChange...", file, fileList);
//console.log("[Upload] handleUploadChange...", file, fileList);
},
handleClose() {

View File

@ -170,7 +170,7 @@ export default {
}
)
.then(({ data: res }) => {
console.log("[http response] res is: ", res);
//console.log("[http response] res is: ", res);
if (res.code === 0) {
// page :
@ -209,7 +209,7 @@ export default {
},
handleOperatePress({ type, data, toRouter }) {
console.log("payload", type, data);
//console.log("payload", type, data);
switch (type) {
case "detach": {
//
@ -249,7 +249,7 @@ export default {
/** 处理 表格操作 */
handleOperate({ type, data, toRouter }) {
console.log("payload", type, data);
//console.log("payload", type, data);
// component url
// payload: { type: string, data: string | number | object }
switch (type) {
@ -355,7 +355,7 @@ export default {
},
handleBtnClick({ btnName, payload }) {
console.log("[search] form handleBtnClick", btnName, payload);
//console.log("[search] form handleBtnClick", btnName, payload);
switch (btnName) {
case "新增":
this.openDialog();
@ -392,7 +392,7 @@ export default {
});
}
});
console.log("查询", this.cachedSearchCondition);
//console.log("", this.cachedSearchCondition);
this.getList(this.cachedSearchCondition);
this.getList(this.cachedSearchCondition, "press");
break;

View File

@ -120,7 +120,7 @@ export default {
if (col.delayRequest) delayList.push(col);
// let doRequest = null;
// if (col.fetchData.length) {
// console.log(`this.bomCode '${this.bomCode}'`);
// //console.log(`this.bomCode '${this.bomCode}'`);
// //
// doRequest = col.fetchData.bind(this.bomCode);
// } else doRequest = col.fetchData;
@ -146,7 +146,7 @@ export default {
}))
);
} else {
console.log("请检查返回的数据类型");
//console.log("");
}
} else {
col.options.splice(0);
@ -207,7 +207,7 @@ export default {
if (excludeId && key === "id") return;
this.dataForm[key] = null;
});
console.log("[DialogJustForm resetForm()] clearing form...");
//console.log("[DialogJustForm resetForm()] clearing form...");
this.$refs.dataForm.clearValidate();
this.$emit("dialog-closed"); //
},
@ -220,17 +220,17 @@ export default {
// id ID id
const { id, code, blender, bomId } = row;
// console.log(" { id, code, blender } = row;", row);
// //console.log(" { id, code, blender } = row;", row);
if (this.$refs.dataForm) {
this.$refs.dataForm.clearValidate();
}
this.delayList.forEach((col) => {
// console.log("delay fetch", col);
// //console.log("delay fetch", col);
// col
if (col.fetchDataParam in row) {
// console.log("delay row ", row, row[col.fetchDataParam]);
// //console.log("delay row ", row, row[col.fetchDataParam]);
col.fetchData(row[col.fetchDataParam]).then(({ data: res }) => {
if (res.code === 0) {
if ("list" in res.data) {
@ -252,7 +252,7 @@ export default {
}))
);
} else {
console.log("请检查返回的数据类型");
//console.log("");
}
} else {
col.options.splice(0);
@ -274,17 +274,17 @@ export default {
/** handlers */
handleSelectChange(col, eventValue) {
// console.log("[dialog] select change: ", col, eventValue);
// //console.log("[dialog] select change: ", col, eventValue);
this.$forceUpdate();
},
handleSwitchChange(val) {
console.log("[dialog] switch change: ", val, this.dataForm);
//console.log("[dialog] switch change: ", val, this.dataForm);
},
handleComponentModelUpdate(propName, { subject, payload: { data } }) {
this.dataForm[propName] = JSON.stringify(data);
console.log("[DialogJustForm] handleComponentModelUpdate", this.dataForm[propName]);
//console.log("[DialogJustForm] handleComponentModelUpdate", this.dataForm[propName]);
},
addOrUpdate(method = "POST") {
@ -321,7 +321,7 @@ export default {
},
handleBtnClick(payload) {
console.log("btn click payload: ", payload);
//console.log("btn click payload: ", payload);
if ("name" in payload) {
switch (payload.name) {
@ -333,12 +333,12 @@ export default {
break;
}
} else {
console.log("[x] 不是这么用的! 缺少name属性");
//console.log("[x] ! name");
}
},
handleUploadChange(file, fileList) {
console.log("[Upload] handleUploadChange...", file, fileList);
//console.log("[Upload] handleUploadChange...", file, fileList);
},
handleClose() {

View File

@ -15,7 +15,7 @@ const syncTimeComponent = {
return {}
},
mounted() {
console.log('syncTimeComponent mounted', this.injectData)
//console.log('syncTimeComponent mounted', this.injectData)
},
render: function (h) {
return h('div', {

View File

@ -40,7 +40,7 @@ export default {
handler: function (route) {
if (route.query.code) {
this.triggerUpdateKey = Math.random().toString();
console.log("[$oute changed] val.query.name", route.query.code, this.triggerUpdateKey);
//console.log("[$oute changed] val.query.name", route.query.code, this.triggerUpdateKey);
}
},
immediate: true,

View File

@ -155,12 +155,12 @@ export default {
},
async getTechDetailInfo() {
console.log("[getTechDetailInfo] this.techId: ", this.techId);
//console.log("[getTechDetailInfo] this.techId: ", this.techId);
// dataForm
try {
const { data: res } = await this.$http.get(`/pms/equipmentTech/${this.techId}`);
if (res.code == 0) {
// console.log('[getTechDetailInfo] res.data: ', res.data)
// //console.log('[getTechDetailInfo] res.data: ', res.data)
// return;
this.$set(this.dataForm, "code", res.data.code);
this.$set(this.dataForm, "remark", res.data.remark);
@ -179,7 +179,7 @@ export default {
try {
const { data: res } = await this.$http.get("/pms/equipmentTechParam/page", { params });
if (res.code == 0) {
console.log("[getTechDetailList] res.data: ", res.data);
//console.log("[getTechDetailList] res.data: ", res.data);
this.dataList = res.data.list;
this.total = res.data.total;
}
@ -189,7 +189,7 @@ export default {
},
handleTabClick(v) {
// console.log("handleTabClick: ", v);
// //console.log("handleTabClick: ", v);
},
handleOperate() {},

View File

@ -108,7 +108,7 @@ export default {
page: 1,
});
if (res.code == 0) {
console.log("res", res);
//console.log("res", res);
this.techList = res.data.list.map((item) => {
return {
label: item.code,

View File

@ -91,7 +91,7 @@ export default {
params,
})
.then(({ data: res }) => {
console.log("[http response] res is: ", res);
//console.log("[http response] res is: ", res);
if (res.code === 0) {
if ("list" in res.data) {
@ -127,7 +127,7 @@ export default {
},
handleBtnClick({ btnName, payload }) {
console.log("[search] form handleBtnClick", btnName, payload);
//console.log("[search] form handleBtnClick", btnName, payload);
switch (btnName) {
case "查询":
this.getList({ ...payload });
@ -136,7 +136,7 @@ export default {
},
handleDestroy(type, refresh) {
console.log("[handleDestroy] ", type);
//console.log("[handleDestroy] ", type);
switch (type) {
case "edit":
this.editVisible = false;
@ -151,7 +151,7 @@ export default {
},
handleOperate({ type, data }) {
console.log("payload", type, data);
//console.log("payload", type, data);
switch (type) {
case "delete": {
// prompt
@ -197,7 +197,7 @@ export default {
.catch((err) => {});
}
case "edit": {
console.log("[edit] ", data);
//console.log("[edit] ", data);
this.editVisible = true;
this.$nextTick(() => {
this.$refs.edit.init({
@ -211,7 +211,7 @@ export default {
break;
}
case "view-detail-action": {
console.log("[detail] ", data, data.techId);
//console.log("[detail] ", data, data.techId);
if (!data || !data.techId) {
this.$message.warning("暂无详请可供查看");
return;

View File

@ -109,7 +109,7 @@ export default {
},
},
activated() {
console.log("list view with ehad activated..........", this.triggerUpdate);
//console.log("list view with ehad activated..........", this.triggerUpdate);
this.refreshLayoutKey = this.layoutTable();
},
watch: {
@ -181,7 +181,7 @@ export default {
}
)
.then(({ data: res }) => {
console.log("[http response] res is: ", res);
//console.log("[http response] res is: ", res);
if (res.code === 0) {
// page :
@ -231,7 +231,7 @@ export default {
/** 处理 表格操作 */
handleOperate({ type, data }) {
console.log("payload", type, data);
//console.log("payload", type, data);
// component url
// payload: { type: string, data: string | number | object }
switch (type) {
@ -304,7 +304,7 @@ export default {
break;
}
case "status": {
console.log("status", data);
//console.log("status", data);
// TODO:
const { id, code } = data;
const queryCondition = { id, code };
@ -333,7 +333,7 @@ export default {
break;
}
case "to-bom-detail": {
// console.log('to-bom-detail', data.name)
// //console.log('to-bom-detail', data.name)
//
return this.$router.push({
name: "pms-bomDetails",
@ -394,7 +394,7 @@ export default {
});
}
case "preview": {
console.log("[PREVIEW] data", data);
//console.log("[PREVIEW] data", data);
// report preview
return this.$router.push({
name: "pms-reportPreview",
@ -404,7 +404,7 @@ export default {
});
}
case "design": {
console.log("[DESIGN] data", data);
//console.log("[DESIGN] data", data);
// report design
return this.$router.push({
name: "pms-reportDesign",
@ -470,7 +470,7 @@ export default {
},
handleBtnClick({ btnName, payload }) {
console.log("[search] form handleBtnClick", btnName, payload);
//console.log("[search] form handleBtnClick", btnName, payload);
switch (btnName) {
case "新增":
this.openDialog();
@ -512,7 +512,7 @@ export default {
});
}
});
console.log("查询", this.cachedSearchCondition);
//console.log("", this.cachedSearchCondition);
this.getList(this.cachedSearchCondition);
break;
}
@ -551,7 +551,7 @@ export default {
});
}
this.$nextTick(() => {
console.log(`[edit-dialog] extraParams: ${extraParams}`);
//console.log(`[edit-dialog] extraParams: ${extraParams}`);
this.$refs["edit-dialog"].init(/** some args... */ row_id, detail_mode, tag_info, extraParams);
});
},

View File

@ -88,7 +88,7 @@ export default {
hisId: this.hisId,
})
.then(({ data: res }) => {
console.log("temp dialog res", res);
//console.log("temp dialog res", res);
this.tableLoading = false;
if (res.code === 0) {
if ("list" in res.data) {

View File

@ -39,7 +39,7 @@ export default {
};
},
activated() {
console.log("activated", this.$route.query)
//console.log("activated", this.$route.query)
this.code = this.$route.query.code || "";
this.triggerUpdateKey = Math.random().toString();
},

View File

@ -87,7 +87,7 @@ export default function () {
{ width: 56, type: "index", label: "序号" },
{ prop: "orderCode", label: "订单号" },
{ width: 80, prop: "orderCate", label: "订单子号" },
{ prop: "bomCode", label: "配方" },
{ prop: "brand", label: "配方" },
{ prop: "shapeCode", label: "砖型" },
{ width: 80, prop: "qty", label: "订单数量" },
{ width: 72, prop: "goodqty", label: "合格数" },

View File

@ -112,7 +112,7 @@ export default {
},
},
activated() {
console.log("list view with ehad activated..........", this.triggerUpdate);
//console.log("list view with ehad activated..........", this.triggerUpdate);
this.refreshLayoutKey = this.layoutTable();
},
watch: {
@ -182,7 +182,7 @@ export default {
}
)
.then(({ data: res }) => {
console.log("[http response] res is: ", res);
//console.log("[http response] res is: ", res);
if (res.code === 0) {
// page :
@ -221,7 +221,7 @@ export default {
/** 处理 表格操作 */
handleOperate({ type, data }) {
console.log("payload", type, data);
//console.log("payload", type, data);
// component url
// payload: { type: string, data: string | number | object }
switch (type) {
@ -291,7 +291,7 @@ export default {
// break;
// }
// case "status": {
// console.log("status", data);
// //console.log("status", data);
// // TODO:
// const { id, code } = data;
// const queryCondition = { id, code };
@ -320,7 +320,7 @@ export default {
// break;
// }
// case "to-bom-detail": {
// // console.log('to-bom-detail', data.name)
// // //console.log('to-bom-detail', data.name)
// //
// return this.$router.push({
// name: "pms-bomDetails",
@ -381,7 +381,7 @@ export default {
// });
// }
// case "preview": {
// console.log("[PREVIEW] data", data);
// //console.log("[PREVIEW] data", data);
// // report preview
// return this.$router.push({
// name: "pms-reportPreview",
@ -391,7 +391,7 @@ export default {
// });
// }
// case "design": {
// console.log("[DESIGN] data", data);
// //console.log("[DESIGN] data", data);
// // report design
// return this.$router.push({
// name: "pms-reportDesign",
@ -457,7 +457,7 @@ export default {
},
handleBtnClick({ btnName, payload }) {
console.log("[search] form handleBtnClick", btnName, payload);
//console.log("[search] form handleBtnClick", btnName, payload);
switch (btnName) {
case "新增":
this.openDialog();
@ -500,7 +500,7 @@ export default {
});
}
});
console.log("查询", this.cachedSearchCondition);
//console.log("", this.cachedSearchCondition);
this.getList(this.cachedSearchCondition);
break;
}
@ -539,7 +539,7 @@ export default {
});
}
this.$nextTick(() => {
console.log(`[edit-dialog] extraParams: ${extraParams}`);
//console.log(`[edit-dialog] extraParams: ${extraParams}`);
this.$refs["edit-dialog"].init(/** some args... */ row_id, detail_mode, tag_info, extraParams);
});
},

View File

@ -66,7 +66,7 @@ export default {
},
methods: {
handleTabClick(tab) {
console.log("handle tab click", tab);
//console.log("handle tab click", tab);
if (tab > this.oldActiveTab) this.toLeft = true;
else this.toLeft = false;
switch (tab) {
@ -89,7 +89,7 @@ export default {
/** init **/
init(order, detailMode) {
console.log("init menu dialog,", order);
//console.log("init menu dialog,", order);
this.order = order;
this.detailMode = detailMode ?? false;
this.visible = true;

View File

@ -260,7 +260,7 @@ export default {
},
handleBtnClick({ btnName, payload }) {
console.log("[search] form handleBtnClick", btnName, payload);
//console.log("[search] form handleBtnClick", btnName, payload);
switch (btnName) {
case "新增":
this.openDialog();
@ -300,14 +300,14 @@ export default {
});
}
});
console.log("查询", this.cachedSearchCondition);
//console.log("", this.cachedSearchCondition);
this.getList(this.cachedSearchCondition);
break;
}
case "同步":
case "全部同步":
this.$http.post(this.urls.syncUrl).then(({ data: res }) => {
console.log("全部同步", res);
//console.log("", res);
if (res.code === 0) {
this.$message({ message: "同步成功", type: "success" });
this.getList();
@ -334,7 +334,7 @@ export default {
openDialog(row, detail) {
this.dialogVisible = true;
console.log("row detail", row, detail);
//console.log("row detail", row, detail);
let extraParams = null;
if (this.attachListQueryExtra && this.listQueryExtra.length) {
@ -344,7 +344,7 @@ export default {
});
}
this.$nextTick(() => {
console.log(`[edit-dialog] extraParams: ${extraParams}`);
//console.log(`[edit-dialog] extraParams: ${extraParams}`);
this.$refs["edit-dialog"].init(/** some args... */ row, detail);
});
},

View File

@ -66,7 +66,7 @@ export default {
},
methods: {
handleOperate({ type, data }) {
console.log("payload", type, data);
//console.log("payload", type, data);
},
handleSizeChange(newSize) {
@ -89,7 +89,7 @@ export default {
...this.extraQueryFields,
};
console.log("getAlist", data, this.pageIsPost);
//console.log("getAlist", data, this.pageIsPost);
return this.$http({
url: this.urls.page ?? this.urls.base + "/page",

View File

@ -114,7 +114,7 @@ export default {
orderId: {
handler: function (val) {
if (val) {
console.log("get car list based on orderId: ", val);
//console.log("get car list based on orderId: ", val);
this.getAList(val);
}
},
@ -125,7 +125,7 @@ export default {
},
},
// activated() {
// console.log("hhh");
// //console.log("hhh");
// this.refreshLayoutKey = Math.random();
// },
methods: {
@ -218,7 +218,7 @@ export default {
},
getAList(orderId) {
console.log("geting car list, ", orderId);
//console.log("geting car list, ", orderId);
if (!orderId) orderId = this.orderId;
this.tableLoading = true;
@ -227,7 +227,7 @@ export default {
if ("list" in res.data) {
this.dataList = res.data.list;
this.totalPage = res.data.total;
} else console.log("没有res.data.list属性");
}
} else {
this.dataList.splice(0);
this.totalPage = 0;

View File

@ -25,7 +25,7 @@ export default {
},
created() { },
mounted() {
console.log('this.order', this.order)
//console.log('this.order', this.order)
this.$nextTick(() => {
this.$refs["order-detail-tag"].init(this.order.id, this.detailMode);
});

View File

@ -88,7 +88,7 @@ export default {
hisId: this.hisId,
})
.then(({ data: res }) => {
console.log("temp dialog res", res);
//console.log("temp dialog res", res);
this.tableLoading = false;
if (res.code === 0) {
if ("list" in res.data) {

View File

@ -110,7 +110,7 @@ export default {
},
},
activated() {
console.log("list view with ehad activated..........", this.triggerUpdate);
//console.log("list view with ehad activated..........", this.triggerUpdate);
this.refreshLayoutKey = this.layoutTable();
},
watch: {
@ -179,7 +179,7 @@ export default {
}
)
.then(({ data: res }) => {
console.log("[http response] res is: ", res);
//console.log("[http response] res is: ", res);
if (res.code === 0) {
// page :
@ -218,7 +218,7 @@ export default {
/** 处理 表格操作 */
handleOperate({ type, data }) {
console.log("payload", type, data);
//console.log("payload", type, data);
// component url
// payload: { type: string, data: string | number | object }
switch (type) {
@ -287,7 +287,7 @@ export default {
// break;
// }
// case "status": {
// console.log("status", data);
// //console.log("status", data);
// // TODO:
// const { id, code } = data;
// const queryCondition = { id, code };
@ -316,7 +316,7 @@ export default {
// break;
// }
// case "to-bom-detail": {
// // console.log('to-bom-detail', data.name)
// // //console.log('to-bom-detail', data.name)
// //
// return this.$router.push({
// name: "pms-bomDetails",
@ -377,7 +377,7 @@ export default {
// });
// }
// case "preview": {
// console.log("[PREVIEW] data", data);
// //console.log("[PREVIEW] data", data);
// // report preview
// return this.$router.push({
// name: "pms-reportPreview",
@ -387,7 +387,7 @@ export default {
// });
// }
// case "design": {
// console.log("[DESIGN] data", data);
// //console.log("[DESIGN] data", data);
// // report design
// return this.$router.push({
// name: "pms-reportDesign",
@ -453,7 +453,7 @@ export default {
},
handleBtnClick({ btnName, payload }) {
console.log("[search] form handleBtnClick", btnName, payload);
//console.log("[search] form handleBtnClick", btnName, payload);
switch (btnName) {
case "新增":
this.openDialog();
@ -495,7 +495,7 @@ export default {
});
}
});
console.log("查询", this.cachedSearchCondition);
//console.log("", this.cachedSearchCondition);
this.getList(this.cachedSearchCondition);
break;
}
@ -534,7 +534,7 @@ export default {
});
}
this.$nextTick(() => {
console.log(`[edit-dialog] extraParams: ${extraParams}`);
//console.log(`[edit-dialog] extraParams: ${extraParams}`);
this.$refs["edit-dialog"].init(/** some args... */ row_id, detail_mode, tag_info, extraParams);
});
},

View File

@ -127,7 +127,7 @@ export default {
},
methods: {
handleSubEmitData(payload) {
console.log("[component] BaseListTable handleSubEmitData(): ", payload);
//console.log("[component] BaseListTable handleSubEmitData(): ", payload);
this.$emit("operate-event", payload);
},
loadSubClassFn(tree, treeNode, resolve) {

View File

@ -155,12 +155,12 @@ export default {
resetForm(excludeId = false, immediate = false) {
setTimeout(
() => {
console.log("[Dialog Just Form] clearing form...");
//console.log("[Dialog Just Form] clearing form...");
Object.keys(this.dataForm).forEach((key) => {
if (excludeId && key === "id") return;
this.dataForm[key] = null;
});
console.log("[Dialog Just Form] cleared form...", this.dataForm);
//console.log("[Dialog Just Form] cleared form...", this.dataForm);
this.$refs.dataForm.clearValidate();
this.$emit("dialog-closed"); //
},
@ -182,11 +182,11 @@ export default {
handleComponentModelUpdate(propName, { subject, payload: { data } }) {
this.dataForm[propName] = JSON.stringify(data);
console.log("[DialogJustForm] handleComponentModelUpdate", this.dataForm[propName]);
//console.log("[DialogJustForm] handleComponentModelUpdate", this.dataForm[propName]);
},
handleBtnClick(payload) {
console.log("btn click payload: ", payload);
//console.log("btn click payload: ", payload);
if ("name" in payload) {
switch (payload.name) {
@ -209,7 +209,7 @@ export default {
data: this.dataForm,
})
.then(({ data: res }) => {
console.log("[add&update] res is: ", res);
//console.log("[add&update] res is: ", res);
this.loadingStatus = false;
if (res.code === 0) {
this.$message.success(payload.name === "add" ? "添加成功" : "更新成功");

View File

@ -201,7 +201,7 @@ export default {
},
methods: {
handleLoadSub({ tree, treeNode, resolve }) {
// console.log("tree, treeNOde, resovle is:", tree, treeNode, resolve);
// //console.log("tree, treeNOde, resovle is:", tree, treeNode, resolve);
this.$http.get(`${this.urls.tree}?rootId=${tree.id}`).then(({ data: res }) => {
if (res.code === 0 && res.data) {
resolve(
@ -246,7 +246,7 @@ export default {
},
})
.then(({ data: res }) => {
console.log("[http response] res is: ", res);
//console.log("[http response] res is: ", res);
// page :
if ("list" in res.data) {
@ -267,7 +267,7 @@ export default {
/** 处理 表格操作 */
handleOperate({ type, data }) {
console.log("payload", type, data);
//console.log("payload", type, data);
// component url
// payload: { type: string, data: string | number | object }
switch (type) {
@ -307,7 +307,7 @@ export default {
break;
}
case "status": {
console.log("status", data);
//console.log("status", data);
// TODO:
const { id, code } = data;
const queryCondition = { id, code };
@ -346,7 +346,7 @@ export default {
},
handleBtnClick({ btnName, payload }) {
console.log("[search] form handleBtnClick", btnName, payload);
//console.log("[search] form handleBtnClick", btnName, payload);
switch (btnName) {
case "新增":
this.openDialog();

View File

@ -70,7 +70,7 @@ export default {
deep: true,
},
"dataForm.description": function (val) {
console.log("here", val);
//console.log("here", val);
if (val === "batch备用服务器") {
this.loadData(0);
} else {

View File

@ -129,7 +129,7 @@ export default {
},
methods: {
handleSubEmitData(payload) {
// console.log("[component] BaseListTable handleSubEmitData(): ", payload);
// //console.log("[component] BaseListTable handleSubEmitData(): ", payload);
this.$emit("operate-event", payload);
},
loadSubClassFn(tree, treeNode, resolve) {

View File

@ -126,7 +126,7 @@ export default {
// TODO: ...
if (field.watch) {
// const { index: innerIdx, condition } = field.watch;
// console.log("=====field.watch=====", innerIdx, this.searchForm[innerIdx], this.headConfig.fields[innerIdx].default);
// //console.log("=====field.watch=====", innerIdx, this.searchForm[innerIdx], this.headConfig.fields[innerIdx].default);
// //
// this.$watch(
// () => this.searchForm[innerIdx],
@ -136,19 +136,19 @@ export default {
// // queryParams
// // })
// this.$http(field.url, queryParams).then((res) => {
// console.log("[==>] !!!", queryParams, res);
// //console.log("[==>] !!!", queryParams, res);
// // index
// this.searchForm[index] = Math.floor(Math.random() * 10);
// });
// }
// );
// console.log("[BaseSearchForm] mounted(): ", this.searchForm);
// //console.log("[BaseSearchForm] mounted(): ", this.searchForm);
// //
// if (this.searchForm[innerIdx]) {
// // TODO: ...
// console.log("TODO: ...");
// //console.log("TODO: ...");
// } else {
// console.log("TODO: ...");
// //console.log("TODO: ...");
// }
}
});

View File

@ -80,7 +80,7 @@ export default {
methods: {
init(id) {
this.visible = true;
console.log("[BatchDialog--detail] init", id);
//console.log("[BatchDialog--detail] init", id);
this.batchId = id;
this.getBatchDetailList();
},
@ -98,7 +98,7 @@ export default {
batchId: this.batchId,
},
});
console.log("[BatchDialog] getBatchList", data);
//console.log("[BatchDialog] getBatchList", data);
if (code == 0) {
this.dataList = data.list;
this.total = data.total;

View File

@ -91,7 +91,7 @@ export default {
data: { code, data, msg },
} = await this.$http.get("/pms/blenderBatch/" + batchId);
if (code == 0) {
console.log("[BatchDialog] getBatch", data);
//console.log("[BatchDialog] getBatch", data);
this.$set(this.dataForm, "id", data.id);
this.$set(this.dataForm, "batchSize", data.batchSize);
} else {

View File

@ -148,7 +148,7 @@ export default {
methods: {
init(id) {
this.visible = true;
console.log("[BatchDialog] init", id);
//console.log("[BatchDialog] init", id);
this.blenderOrderId = id;
this.getBatchList();
},
@ -166,7 +166,7 @@ export default {
blenderOrderId: this.blenderOrderId,
},
});
console.log("[BatchDialog] getBatchList", data);
//console.log("[BatchDialog] getBatchList", data);
if (code == 0) {
this.dataList = data.list;
this.total = data.total;
@ -185,7 +185,7 @@ export default {
},
handleOperate({ type, data }) {
console.log("[BatchDialog] handleOperate", type, data);
//console.log("[BatchDialog] handleOperate", type, data);
switch (type) {
case "create":
this.editDialogVisible = true;

View File

@ -165,7 +165,7 @@ export default {
else if (col.fetchTreeData) {
// parentId 0
col.fetchTreeData().then(({ data: res }) => {
// console.log("[DialogJustForm fetchTreeData -->]", res.data);
// //console.log("[DialogJustForm fetchTreeData -->]", res.data);
if (res.code === 0 && res.data) {
if ("list" in res.data) {
this.$set(col, "options", res.data.list);
@ -198,7 +198,7 @@ export default {
row.forEach((col) => {
if (!col.prop) return;
if ("injectTo" in col && Array.isArray(col.injectTo)) {
// console.log("watching options ..... ", col);
// //console.log("watching options ..... ", col);
col.injectTo.map((item) => {
const unwatch = this.$watch(
() => this.dataForm[col.prop],
@ -264,7 +264,7 @@ export default {
if (excludeId && key === "id") return;
this.dataForm[key] = null;
});
// console.log("[DialogJustForm resetForm()] clearing form...");
// //console.log("[DialogJustForm resetForm()] clearing form...");
this.$refs.dataForm.clearValidate();
this.$emit("dialog-closed"); //
this.watchList.map((unwatch) => unwatch());
@ -277,9 +277,9 @@ export default {
/** init **/
init(id, detailMode) {
this.visible = true;
// console.log("[DialogJustForm] init", this.dataForm, id, detailMode);
// //console.log("[DialogJustForm] init", this.dataForm, id, detailMode);
if (this.$refs.dataForm) {
// console.log("[DialogJustForm] clearing form validation...");
// //console.log("[DialogJustForm] clearing form validation...");
// dialog dataForm [0]
this.$refs.dataForm.clearValidate();
}
@ -306,7 +306,7 @@ export default {
url: file.fileUrl,
}));
}
// console.log("[DialogJustForm] init():", this.dataForm);
// //console.log("[DialogJustForm] init():", this.dataForm);
} else {
this.$message({
message: `${res.code}: ${res.msg}`,
@ -333,22 +333,22 @@ export default {
/** handlers */
handleSelectChange(col, eventValue) {
// console.log("[dialog] select change: ", col, eventValue);
// //console.log("[dialog] select change: ", col, eventValue);
this.$forceUpdate();
},
handleSwitchChange(val) {
// console.log("[dialog] switch change: ", val, this.dataForm);
// //console.log("[dialog] switch change: ", val, this.dataForm);
},
handleComponentModelUpdate(propName, { subject, payload: { data } }) {
this.dataForm[propName] = JSON.stringify(data);
// console.log("[DialogJustForm] handleComponentModelUpdate", this.dataForm[propName]);
// //console.log("[DialogJustForm] handleComponentModelUpdate", this.dataForm[propName]);
},
addOrUpdate(method = "POST") {
if ("parentId" in this.dataForm) {
// console.log("[DialogJustForm parentId]", this.dataForm.parentId);
// //console.log("[DialogJustForm parentId]", this.dataForm.parentId);
// parentId cascader ["xxx"]xxx
const lastItem = this.dataForm.parentId.length - 1;
this.dataForm.parentId = this.dataForm.parentId[lastItem];
@ -400,7 +400,7 @@ export default {
// Object.getOwnPropertyNames(this.dataForm).forEach((prop) => {
// if (/.*?Time/.test(prop)) {
// console.log("HTTP prop", prop, this.dataForm[prop]);
// //console.log("HTTP prop", prop, this.dataForm[prop]);
// }
// });
@ -413,7 +413,7 @@ export default {
data: httpPayload,
})
.then(({ data: res }) => {
// console.log("[add&update] res is: ", res);
// //console.log("[add&update] res is: ", res);
this.loadingStatus = false;
if (res.code === 0) {
this.$message.success(method === "POST" ? "添加成功" : "更新成功");
@ -438,7 +438,7 @@ export default {
},
handleBtnClick(payload) {
// console.log("btn click payload: ", payload);
// //console.log("btn click payload: ", payload);
if ("name" in payload) {
switch (payload.name) {
@ -454,12 +454,12 @@ export default {
break;
}
} else {
console.log("[x] 不是这么用的! 缺少name属性");
//console.log("[x] ! name");
}
},
handleUploadChange(file, fileList) {
// console.log("[Upload] handleUploadChange...", file, fileList);
// //console.log("[Upload] handleUploadChange...", file, fileList);
},
handleClose() {

View File

@ -110,7 +110,7 @@ export default {
},
handleSuccess(response, file, fileList) {
// console.log("success response", response);
// //console.log("success response", response);
if ("code" in response && response.code === 500) {
this.$message({
@ -141,7 +141,7 @@ export default {
},
handleError(err, file, fileList) {
console.log("err", err);
//console.log("err", err);
},
handleBtnClick(payload) {
@ -174,7 +174,7 @@ export default {
},
handleUploadChange(file, fileList) {
// console.log("[Upload] handleUploadChange...", file, fileList);
// //console.log("[Upload] handleUploadChange...", file, fileList);
},
handleClose() {

View File

@ -66,7 +66,7 @@ export default {
},
methods: {
handleTabClick(tab) {
console.log("handle tab click", tab);
//console.log("handle tab click", tab);
if (tab > this.oldActiveTab) this.toLeft = true;
else this.toLeft = false;
switch (tab) {
@ -89,7 +89,7 @@ export default {
/** init **/
init(order, detailMode) {
console.log("init menu dialog,", order);
//console.log("init menu dialog,", order);
this.order = order;
this.detailMode = detailMode ?? false;
this.visible = true;

View File

@ -156,7 +156,7 @@ export default {
if ("list" in res.data) {
this.dataList = res.data.list;
this.totalPage = res.data.total;
} else console.log("没有res.data.list属性");
}
} else {
this.dataList.splice(0);
this.totalPage = 0;
@ -183,7 +183,7 @@ export default {
/** 处理 表格操作 */
handleOperate({ type, data }) {
console.log("payload", type, data);
//console.log("payload", type, data);
// component url
// payload: { type: string, data: string | number | object }
switch (type) {
@ -221,7 +221,7 @@ export default {
}
})
.catch((errMsg) => {
console.log("ere...");
//console.log("ere...");
this.$message({
message: errMsg,
type: "error",
@ -346,7 +346,7 @@ export default {
break;
}
case "view-ongoing": {
console.log("view-ongoing", data);
//console.log("view-ongoing", data);
this.openMenuDialog(data, false);
break;
}
@ -358,12 +358,12 @@ export default {
},
handleBtnClick({ btnName, payload }) {
console.log("SearchForm", btnName, payload);
//console.log("SearchForm", btnName, payload);
switch (btnName) {
case "查询": {
this.params = Object.assign({}, payload);
console.log("this.params", this.params);
//console.log("this.params", this.params);
if ("timerange" in payload) {
//
if (!!payload.timerange) {
@ -421,7 +421,7 @@ export default {
this.renderDialog = true;
this.$nextTick(() => {
// console.log("init dialog", row_id, detail_mode);
// //console.log("init dialog", row_id, detail_mode);
this.$refs["order-dialog"].init(/** some args... */ row_id, detail_mode);
});
},

View File

@ -148,7 +148,7 @@ export default {
watch: {
$route: function (route) {
if (route.hash) {
console.log("acitive hash", route.hash);
//console.log("acitive hash", route.hash);
this.activeTable = route.hash;
}
},
@ -269,7 +269,7 @@ export default {
inject: ["urls"],
mounted() {
this.getSpecificList("ongoing", this.conditions.ongoing);
console.log("[list view with head]", this.headConfigs);
//console.log("[list view with head]", this.headConfigs);
},
activated() {
this.refreshLayoutKey = this.layoutTable();
@ -296,7 +296,7 @@ export default {
if ("list" in res.data) {
this.dataLists[type] = res.data.list;
this.totalPage[type] = res.data.total;
} else console.log("没有res.data.list属性");
}
} else {
this.dataLists[type].splice(0);
this.totalPage[type] = 0;
@ -339,7 +339,7 @@ export default {
},
})
.then(({ data: res }) => {
console.log("[http response] res is: ", res);
//console.log("[http response] res is: ", res);
// page :
if ("list" in res.data) {
@ -360,7 +360,7 @@ export default {
/** 处理 表格操作 */
handleOperate({ type, data }) {
console.log("payload", type, data);
//console.log("payload", type, data);
// component url
// payload: { type: string, data: string | number | object }
switch (type) {
@ -404,7 +404,7 @@ export default {
break;
}
case "status": {
console.log("status", data);
//console.log("status", data);
// TODO:
const { id, code } = data;
const queryCondition = { id, code };
@ -448,13 +448,13 @@ export default {
}
delete params.timerange;
}
console.log("[search form btn click]", Object.assign({}, this.conditions.ongoing, params));
//console.log("[search form btn click]", Object.assign({}, this.conditions.ongoing, params));
//
this.getSpecificList("ongoing", Object.assign({}, this.conditions.ongoing, params));
}
}
case "pending":
console.log("[search form btn click]", type, btnName, payload);
//console.log("[search form btn click]", type, btnName, payload);
if (btnName === "压制工艺") {
//
alert("跳转至压制工艺页面");
@ -470,7 +470,7 @@ export default {
case "finished":
break;
}
// console.log("[search] form handleBtnClick", type, btnName, payload);
// //console.log("[search] form handleBtnClick", type, btnName, payload);
// switch (btnName) {
// case "":
// this.openDialog();

View File

@ -85,7 +85,7 @@ export default {
},
methods: {
handleOperate({ type, data: id }) {
console.log("payload", type, id);
//console.log("payload", type, id);
switch (type) {
case "blender-edit":
this.blenderOrderEditVisible = true;
@ -108,7 +108,7 @@ export default {
type: "warning",
})
.then(() => {
console.log("here");
//console.log("here");
this.$http
.post(this.urls.detach, id /* { id: data } */, { headers: { "Content-Type": "application/json" } })
.then(({ data: res }) => {
@ -159,7 +159,7 @@ export default {
...this.extraQueryFields,
};
console.log("getAlist", data, this.pageIsPost);
//console.log("getAlist", data, this.pageIsPost);
return this.$http({
url: this.urls.page ?? this.urls.base + "/page",

View File

@ -471,9 +471,9 @@
<span style="display: block; margin-top: 32px">{{ dataForm.shortDesc }}</span>
</el-form-item>
</el-col>
<el-col :span="6">
<!-- :rules="[{ required: true, message: '请选择托盘类型', trigger: 'blur' }]"> -->
<!-- <el-col :span="6">
<el-form-item label="托盘类型" prop="palletType">
<!-- :rules="[{ required: true, message: '请选择托盘类型', trigger: 'blur' }]"> -->
<el-select
v-model="dataForm.palletType"
filterable
@ -487,7 +487,7 @@
:value="pt.dictValue"></el-option>
</el-select>
</el-form-item>
</el-col>
</el-col> -->
<el-col :span="6">
<el-form-item
label="贴纸板"
@ -769,7 +769,7 @@ export default {
* 因为每个页面也许有独立的需求链
*/
handleBomChange(bomID) {
console.log("[handleBomChange] val is: ", bomID);
//console.log("[handleBomChange] val is: ", bomID);
const target = this.cachedList.bom.find((item) => item.id === bomID);
// bomId dataForm
this.bomId = bomID;
@ -781,7 +781,7 @@ export default {
async getBomVersionList(bom) {
try {
const { data: res } = await this.$http.get("/pms/bom/pageVersion", { params: { key: bom.code } });
console.log("[bom version list]", res.data.list);
//console.log("[bom version list]", res.data.list);
this.versionList = res.data.list.map((item) => ({
label: item.version,
value: item.version,
@ -800,7 +800,7 @@ export default {
const targetBom = this.versionList.find((item) => item.value === v);
// this.bomId this.dataForm.bomId
this.bomId = targetBom.id;
console.log("[handleVersionChange] new bomID", this.bomId);
//console.log("[handleVersionChange] new bomID", this.bomId);
},
async init(id, detail_mode) {
@ -892,18 +892,23 @@ export default {
ai: null, // BOM ID
},
});
this.btnLoading = false;
console.log("herer.......", res);
if (res && res.code == 0) {
this.$message.success("添加成功");
this.$emit("refreshDataList");
this.handleClose();
this.btnLoading = false;
} else {
throw new Error("请求出错");
return this.$message({
message: `${res.code}: ${res.msg}`,
type: "error",
duration: 1500,
});
}
} catch (err) {
this.$message.error("参数错误:" + "msg" in err ? err.msg : err);
this.$message.error(
err.isServerFeedback ? `${err.code}: ${err.msg}` : "参数错误:" + "msg" in err ? err.msg : err
);
this.btnLoading = false;
}
}

View File

@ -109,7 +109,7 @@ export default {
mounted() {},
methods: {
init({ id, blender, blenderCode, bomCode, bomId, bomName, code, orderCode, orderId }) {
// console.log("[blenderOrderEdit] init");
// //console.log("[blenderOrderEdit] init");
Promise.all([this.getBlenderList(), this.getBomList(bomCode)])
.then((r1, r2) => {
this.dataForm = {
@ -121,7 +121,7 @@ export default {
this.visible = true;
})
.catch((err) => {
console.log(err);
//console.log(err);
this.close();
});
},

View File

@ -114,7 +114,7 @@ export default {
orderId: {
handler: function (val) {
if (val) {
console.log("get car list based on orderId: ", val);
//console.log("get car list based on orderId: ", val);
this.getAList(val);
}
},
@ -125,7 +125,7 @@ export default {
},
},
// activated() {
// console.log("hhh");
// //console.log("hhh");
// this.refreshLayoutKey = Math.random();
// },
methods: {
@ -218,7 +218,7 @@ export default {
},
getAList(orderId) {
console.log("geting car list, ", orderId);
//console.log("geting car list, ", orderId);
if (!orderId) orderId = this.orderId;
this.tableLoading = true;
@ -227,7 +227,7 @@ export default {
if ("list" in res.data) {
this.dataList = res.data.list;
this.totalPage = res.data.total;
} else console.log("没有res.data.list属性");
}
} else {
this.dataList.splice(0);
this.totalPage = 0;

View File

@ -462,7 +462,7 @@
<span style="display: block; margin-top: 32px">{{ dataForm.shortDesc }}</span>
</el-form-item>
</el-col>
<el-col :span="6">
<!-- <el-col :span="6">
<el-form-item
label="托盘类型"
prop="palletType"
@ -480,7 +480,7 @@
:value="pt.dictValue"></el-option>
</el-select>
</el-form-item>
</el-col>
</el-col> -->
<el-col :span="6">
<el-form-item
label="贴纸板"

View File

@ -25,7 +25,7 @@ export default {
},
created() { },
mounted() {
console.log('this.order', this.order)
//console.log('this.order', this.order)
this.$nextTick(() => {
this.$refs["order-detail-tag"].init(this.order.id, this.detailMode);
});

View File

@ -88,7 +88,7 @@ export default {
hisId: this.hisId,
})
.then(({ data: res }) => {
console.log("temp dialog res", res);
//console.log("temp dialog res", res);
this.tableLoading = false;
if (res.code === 0) {
if ("list" in res.data) {

View File

@ -84,13 +84,13 @@ export default {
this.keys[name] = Math.random().toString();
});
} else {
console.log("handleRefreshTable 需要传递数组!");
//console.log("handleRefreshTable !");
}
},
cellClassName({ row, column, rowIndex, columnIndex }) {
if ("statusDictValue" in row && row.statusDictValue == "2") {
// console.log("setting cell style.....", row);
// //console.log("setting cell style.....", row);
return "cell-in-production";
}
},

View File

@ -25,7 +25,8 @@ export default {
// components: { BaseSearchForm },
data() {
return {
hu: "40032179#300000624000000016",
// hu: "40032179#300000624000000016",
hu: ''
};
},
methods: {

View File

@ -123,7 +123,7 @@ export default function () {
button: true,
onClick: function (id) {
// 必须用 function 形式
console.log(`查看载砖详情`, id);
//console.log(`查看载砖详情`, id);
this.$emit("emit-data", { type: "to-car-payload", data: id });
},
},

View File

@ -87,7 +87,7 @@ export default function () {
button: true,
onClick: function (id) {
// 必须用 function 形式
console.log(`查看载砖详情`, id);
//console.log(`查看载砖详情`, id);
this.$emit("emit-data", { type: "to-car-payload", data: id });
},
},

View File

@ -112,7 +112,7 @@ export default {
},
},
activated() {
console.log("list view with ehad activated..........", this.triggerUpdate);
//console.log("list view with ehad activated..........", this.triggerUpdate);
this.refreshLayoutKey = this.layoutTable();
},
watch: {
@ -182,7 +182,7 @@ export default {
}
)
.then(({ data: res }) => {
console.log("[http response] res is: ", res);
//console.log("[http response] res is: ", res);
if (res.code === 0) {
// page :
@ -221,7 +221,7 @@ export default {
/** 处理 表格操作 */
handleOperate({ type, data }) {
console.log("payload", type, data);
//console.log("payload", type, data);
// component url
// payload: { type: string, data: string | number | object }
switch (type) {
@ -290,7 +290,7 @@ export default {
// break;
// }
// case "status": {
// console.log("status", data);
// //console.log("status", data);
// // TODO:
// const { id, code } = data;
// const queryCondition = { id, code };
@ -319,7 +319,7 @@ export default {
// break;
// }
// case "to-bom-detail": {
// // console.log('to-bom-detail', data.name)
// // //console.log('to-bom-detail', data.name)
// //
// return this.$router.push({
// name: "pms-bomDetails",
@ -380,7 +380,7 @@ export default {
// });
// }
// case "preview": {
// console.log("[PREVIEW] data", data);
// //console.log("[PREVIEW] data", data);
// // report preview
// return this.$router.push({
// name: "pms-reportPreview",
@ -390,7 +390,7 @@ export default {
// });
// }
// case "design": {
// console.log("[DESIGN] data", data);
// //console.log("[DESIGN] data", data);
// // report design
// return this.$router.push({
// name: "pms-reportDesign",
@ -456,7 +456,7 @@ export default {
},
handleBtnClick({ btnName, payload }) {
console.log("[search] form handleBtnClick", btnName, payload);
//console.log("[search] form handleBtnClick", btnName, payload);
switch (btnName) {
case "新增":
this.openDialog();
@ -499,7 +499,7 @@ export default {
});
}
});
console.log("查询", this.cachedSearchCondition);
//console.log("", this.cachedSearchCondition);
this.getList(this.cachedSearchCondition);
break;
}
@ -538,7 +538,7 @@ export default {
});
}
this.$nextTick(() => {
console.log(`[edit-dialog] extraParams: ${extraParams}`);
//console.log(`[edit-dialog] extraParams: ${extraParams}`);
this.$refs["edit-dialog"].init(/** some args... */ row_id, detail_mode, tag_info, extraParams);
});
},

View File

@ -98,12 +98,12 @@ export default function () {
listenTo: {
prop: 'carId', // 应该监听 carId随 carId 而更新,
handler: function (carList, carId) {
console.log('this. ', carList, this.cachedList)
//console.log('this. ', carList, this.cachedList)
const car = carList.find(item => item.carId === carId)
console.log('car. ', car)
//console.log('car. ', car)
// 需要 bind
this.$set(this.dataForm, 'hisId', car.id)
console.log('this.dataForm.hisId', this.dataForm, this.dataForm.hisId)
//console.log('this.dataForm.hisId', this.dataForm, this.dataForm.hisId)
}
}
}],

View File

@ -42,7 +42,7 @@ export default {
// handler: function (route) {
// if (route.query.id) {
// this.triggerUpdateKey = Math.random().toString();
// console.log("[$oute changed] val.params.id", route.query.id, this.triggerUpdateKey);
// //console.log("[$oute changed] val.params.id", route.query.id, this.triggerUpdateKey);
// }
// },
// immediate: true,
@ -51,11 +51,11 @@ export default {
// },
mounted() {},
activated() {
// console.log("activated...");
// //console.log("activated...");
this.triggerUpdateKey = Math.random().toString();
},
// deactivated() {
// console.log("deactivated...");
// //console.log("deactivated...");
// },
methods: {},
};

View File

@ -40,7 +40,7 @@ export default {
params: {},
}).then(({ data: res }) => {
this.allNum = 0;
console.log("报表", res);
//console.log("", res);
if (res.code === 0 && res.data) {
if (Array.isArray(res.data)) {

View File

@ -17,12 +17,12 @@ const CategoryList = {
return { list: [], calcMaxHeight, pickedId: null }
},
mounted() {
console.log(this.injectData)
//console.log(this.injectData)
if (categoryOptions.length === 0) {
// 获取并缓存 categoryOptions
axios.get('/pms/reportSheetCategory/list').then(({ data: res }) => {
if (res.code === 0) {
console.log('[CategoryList小组件]', res.data)
//console.log('[CategoryList小组件]', res.data)
categoryOptions = res.data
} else {
categoryOptions.splice(0)
@ -52,7 +52,7 @@ const CategoryList = {
render: function (h) {
const childOptions = []
this.injectData.head.options?.forEach(item => {
console.log('【报表分类】', item.value)
//console.log('【报表分类】', item.value)
childOptions.push(h('el-option', { props: { label: item.label, value: item.value } }, null))
})
return h('el-select', { props: { value: this.pickedId }, on: { change: this.handleChange } }, childOptions)
@ -64,7 +64,7 @@ export default async function () {
if (Array.isArray(categoryList)) {
console.log('category ====> ', categoryList)
//console.log('category ====> ', categoryList)
const tableProps = [
{ type: 'index', label: '序号' },
{ prop: "fileName", label: "报表名称" },

View File

@ -17,7 +17,7 @@ const CategoryList = {
return { pickedId: null };
},
mounted() {
// console.log(this.injectData)
// //console.log(this.injectData)
this.pickedId = this.injectData[this.injectData.head.prop];
},
methods: {
@ -32,7 +32,7 @@ const CategoryList = {
render: function (h) {
const childOptions = [];
this.injectData.head.options?.forEach((item) => {
// console.log('【报表分类】', item.value)
// //console.log('【报表分类】', item.value)
childOptions.push(h("el-option", { props: { label: item.label, value: item.value } }, null));
});
return h("el-select", { props: { size: 'mini', value: this.pickedId }, on: { change: this.handleChange } }, childOptions);

View File

@ -32,7 +32,7 @@ export default {
// this.dialogConfigs = dialogConfigs
// });
fetchCategoryList.call(this).then((categoryList) => {
console.log("[fetchCategoryList() then...]");
//console.log("[fetchCategoryList() then...]");
if ("column" in this.tableConfig) {
const categoryProp = this.tableConfig.column.find((item) => item.prop === "category");
this.$set(
@ -40,7 +40,7 @@ export default {
"options",
categoryList.map((item) => ({ label: item.name, value: item.id }))
);
console.log("[报表, 设置options成功..]", categoryProp);
//console.log("[, options..]", categoryProp);
}
});
},

View File

@ -295,7 +295,7 @@ export default {
* @description: 从配置项中提取出需要监听的项
*/
initWatchList() {
console.log("[DWM initWatchList]");
//console.log("[DWM initWatchList]");
this.configs.form.rows.forEach((row) => {
row.forEach((col) => {
/** 找到配置项中含有 changeReflects 属性的项 */
@ -321,7 +321,7 @@ export default {
* @description: 开始监听事件
*/
startWatchProcess() {
console.log("[DWM startWatchProcess]");
//console.log("[DWM startWatchProcess]");
if (this.watchList.length) {
this.watchList.forEach((item) => {
this.handleWatch(item.targetProp, item.followerProp, this.cached);
@ -339,7 +339,7 @@ export default {
this.$watch(
() => this.dataForm[targetProp],
(val) => {
console.log("[DWM watch]");
//console.log("[DWM watch]");
if (val && targetProp in dataSource) {
this.dataForm[followerProp] = dataSource[targetProp]?.find((item) => item.id === val)?.[followerProp];
}
@ -378,19 +378,19 @@ export default {
/** 准备选择器的列表 */
async doRequests() {
console.log("[DWM doRequests] requestList", this.requestList);
//console.log("[DWM doRequests] requestList", this.requestList);
if (this.requestList.length) {
const promiseList = [];
try {
this.requestList.forEach((opt) => {
console.log("[DWM doRequests]", opt.fetchData);
//console.log("[DWM doRequests]", opt.fetchData);
promiseList.push(async () => {
this.optionsLoading = true;
const { data: res } = await opt.fetchData(
opt.fetchDataNeedsId ? this.dataForm.id : undefined
);
if (opt.cacheFetchedData) this.cached[opt.prop] = "list" in res.data ? res.data.list : res.data || [];
console.log("[DWM doRequests] res", res);
//console.log("[DWM doRequests] res", res);
if (res.code === 0) {
this.$set(
opt,
@ -417,7 +417,7 @@ export default {
value: opt.optionValue ? i[opt.optionValue] : i.id,
}))
);
console.log("[DWM doRequests] set options", opt);
//console.log("[DWM doRequests] set options", opt);
} else {
// res.code != 0
this.$set(opt, "options", []);
@ -446,11 +446,11 @@ export default {
this.$http.get(this.urls.base + `/${id}`).then(({ data: res }) => {
if (res && res.code === 0) {
const dataFormKeys = Object.keys(this.dataForm);
console.log("[DWM getDetail] dataFormKeys -------->", dataFormKeys);
//console.log("[DWM getDetail] dataFormKeys -------->", dataFormKeys);
this.dataForm = __pick(res.data, dataFormKeys);
if ("files" in res.data) {
console.log("[DWM getDetail] fileList===>", res.data.files, this.fileList);
//console.log("[DWM getDetail] fileList===>", res.data.files, this.fileList);
/** 返回的文件列表 */
this.fileList = res.data.files
? res.data.files.map((file) => ({
@ -507,7 +507,7 @@ export default {
/** 获取请求 */
this.$http.get(this.urls.subpage, { params }).then(({ data: res }) => {
console.log("[DWM getSubList]", res);
//console.log("[DWM getSubList]", res);
if (res.code === 0 && res.data?.list) {
this.subList = res.data.list;
this.attrTotal = res.data.total;
@ -538,7 +538,7 @@ export default {
setTimeout(
() => {
Object.keys(this.dataForm).forEach((key) => {
console.log("reset form, key", key);
//console.log("reset form, key", key);
if (excludeId && key === "id") return;
if ("files" in this.dataForm) this.dataForm.files = [];
else if ("fileIds" in this.dataForm) this.dataForm.fileIds = [];
@ -549,7 +549,7 @@ export default {
});
this.activeMenu = this.configs.menu[0].name;
this.$refs.dataForm[0].resetFields();
console.log("清除Form...", this.dataForm);
//console.log("Form...", this.dataForm);
},
immediate ? 0 : 200
);
@ -599,7 +599,7 @@ export default {
responseType: "blob",
})
.then(({ data: res }) => {
console.log("preivew", res);
//console.log("preivew", res);
if (/image/i.test(res.type)) {
//
this.currentImgUrl = URL.createObjectURL(res);
@ -610,9 +610,9 @@ export default {
a.setAttribute("target", "_blank");
a.href = URL.createObjectURL(res);
a.click();
console.log("before remove a ", a);
//console.log("before remove a ", a);
a.remove();
console.log("removed a ", a);
//console.log("removed a ", a);
} else {
this.$message({
message: "非图片和PDF文件请下载后预览",
@ -692,7 +692,7 @@ export default {
},
handleUploadSuccess(response, file, fileList) {
console.log("[DialogWithMenu] uploadedFileList", response, file, fileList);
//console.log("[DialogWithMenu] uploadedFileList", response, file, fileList);
if (response.code === 0) {
const uploadedFile = response.data[0];
@ -732,7 +732,7 @@ export default {
},
handleUploadCheck(file) {
console.log("[before upload]", file);
//console.log("[before upload]", file);
const LIMIT = 2 * 1024 * 1024; // bytes
if (file.size > LIMIT) {
this.$message({
@ -746,17 +746,17 @@ export default {
handleComponentModelUpdate(propName, { subject, payload: { data } }) {
this.dataForm[propName] = JSON.stringify(data);
console.log("[DialogJustForm] handleComponentModelUpdate", this.dataForm[propName]);
//console.log("[DialogJustForm] handleComponentModelUpdate", this.dataForm[propName]);
},
handleSelectChange(col, eventValue) {},
handleSwitchChange(val) {
console.log("[dialog] switch change: ", val, this.dataForm);
//console.log("[dialog] switch change: ", val, this.dataForm);
},
handleBtnClick(payload) {
console.log("btn click payload: ", payload);
//console.log("btn click payload: ", payload);
if ("name" in payload) {
switch (payload.name) {
@ -804,7 +804,7 @@ export default {
.then(({ data: res }) => {
this.btnLoading = false;
this.formLoading = false;
console.log("[add&update] res is: ", res);
//console.log("[add&update] res is: ", res);
if (res.code === 0) {
this.$message.success(payload.name === "add" ? "添加成功" : "更新成功");
this.$emit("refreshDataList");
@ -858,19 +858,19 @@ export default {
/** 列表handlers */
handleAddItem() {
// console.log('[dialog] handleAddItem ot list...');
// //console.log('[dialog] handleAddItem ot list...');
this.showBaseDialog = true;
this.$nextTick(() => {
console.log("[sub-dialog] ", this.$refs["sub-dialog"].init());
//console.log("[sub-dialog] ", this.$refs["sub-dialog"].init());
});
},
handleTableRowOperate({ type, data }) {
console.log("handleTableRowOperate", type, data);
//console.log("handleTableRowOperate", type, data);
switch (type) {
case "delete": {
//
console.log("delete....", data);
//console.log("delete....", data);
const itemName = typeof data === "object" ? data.attrName || data.name || data.material || data.id : data;
return this.$confirm(`是否删除条目: ${itemName}`, "提示", {
confirmButtonText: "确认",

View File

@ -107,10 +107,10 @@ export default {
},
watch: {
page: (val) => {
console.log("page changed:", val);
//console.log("page changed:", val);
},
size: (val) => {
console.log("size changed:", val);
//console.log("size changed:", val);
},
triggerUpdate(val, oldVal) {
if (val && val !== oldVal) {
@ -183,7 +183,7 @@ export default {
}
)
.then(({ data: res }) => {
console.log("[http response] res is: ", res);
//console.log("[http response] res is: ", res);
if (res.code === 0) {
// page :
@ -243,7 +243,7 @@ export default {
/** 处理 表格操作 */
handleOperate({ type, data }) {
console.log("payload", type, data);
//console.log("payload", type, data);
// component url
// payload: { type: string, data: string | number | object }
switch (type) {
@ -299,7 +299,7 @@ export default {
.catch((err) => {});
}
case "edit": {
console.log("[edit] ", data);
//console.log("[edit] ", data);
this.openDialog(data); /** data is ==> id */
break;
}
@ -322,7 +322,7 @@ export default {
.then(() => {
//
let payload = "";
console.log("copying...", type, data);
//console.log("copying...", type, data);
if (typeof data === "object") {
const head = data.head;
const copyOpt =
@ -375,7 +375,7 @@ export default {
case "sync": {
let shouldShowOverlay = false;
let payload = "";
console.log("sync...", type, data);
//console.log("sync...", type, data);
if (typeof data === "object") {
const head = data.head;
const syncOpt =
@ -413,7 +413,7 @@ export default {
},
handleBtnClick({ btnName, payload }) {
console.log("[search] form handleBtnClick", btnName, payload);
//console.log("[search] form handleBtnClick", btnName, payload);
switch (btnName) {
case "新增":
this.openDialog();
@ -456,14 +456,14 @@ export default {
});
}
});
console.log("查询", this.cachedSearchCondition);
//console.log("", this.cachedSearchCondition);
this.getList(this.cachedSearchCondition);
break;
}
case "同步":
case "全部同步":
this.$http.post(this.urls.syncUrl).then(({ data: res }) => {
console.log("同步", res);
//console.log("", res);
this.$message({ message: res.msg, type: res.code === 0 ? "success" : "error" });
this.getList();
});
@ -495,7 +495,7 @@ export default {
});
}
this.$nextTick(() => {
console.log(`[edit-dialog] extraParams: ${extraParams}`);
//console.log(`[edit-dialog] extraParams: ${extraParams}`);
this.$refs["edit-dialog"].init(/** some args... */ row_id, detail_mode, tag_info, extraParams);
});
},

View File

@ -295,7 +295,7 @@ export default {
* @description: 从配置项中提取出需要监听的项
*/
initWatchList() {
console.log("[DWM initWatchList]");
//console.log("[DWM initWatchList]");
this.configs.form.rows.forEach((row) => {
row.forEach((col) => {
/** 找到配置项中含有 changeReflects 属性的项 */
@ -321,7 +321,7 @@ export default {
* @description: 开始监听事件
*/
startWatchProcess() {
console.log("[DWM startWatchProcess]");
//console.log("[DWM startWatchProcess]");
if (this.watchList.length) {
this.watchList.forEach((item) => {
this.handleWatch(item.targetProp, item.followerProp, this.cached);
@ -339,7 +339,7 @@ export default {
this.$watch(
() => this.dataForm[targetProp],
(val) => {
console.log("[DWM watch]");
//console.log("[DWM watch]");
if (val && targetProp in dataSource) {
this.dataForm[followerProp] = dataSource[targetProp]?.find((item) => item.id === val)?.[followerProp];
}
@ -378,19 +378,19 @@ export default {
/** 准备选择器的列表 */
async doRequests() {
console.log("[DWM doRequests] requestList", this.requestList);
//console.log("[DWM doRequests] requestList", this.requestList);
if (this.requestList.length) {
const promiseList = [];
try {
this.requestList.forEach((opt) => {
console.log("[DWM doRequests]", opt.fetchData);
//console.log("[DWM doRequests]", opt.fetchData);
promiseList.push(async () => {
this.optionsLoading = true;
const { data: res } = await opt.fetchData(
opt.fetchDataNeedsId ? this.dataForm.id : undefined
);
if (opt.cacheFetchedData) this.cached[opt.prop] = "list" in res.data ? res.data.list : res.data || [];
console.log("[DWM doRequests] res", res);
//console.log("[DWM doRequests] res", res);
if (res.code === 0) {
this.$set(
opt,
@ -417,7 +417,7 @@ export default {
value: opt.optionValue ? i[opt.optionValue] : i.id,
}))
);
console.log("[DWM doRequests] set options", opt);
//console.log("[DWM doRequests] set options", opt);
} else {
// res.code != 0
this.$set(opt, "options", []);
@ -446,11 +446,11 @@ export default {
this.$http.get(this.urls.base + `/${id}`).then(({ data: res }) => {
if (res && res.code === 0) {
const dataFormKeys = Object.keys(this.dataForm);
console.log("[DWM getDetail] dataFormKeys -------->", dataFormKeys);
//console.log("[DWM getDetail] dataFormKeys -------->", dataFormKeys);
this.dataForm = __pick(res.data, dataFormKeys);
if ("files" in res.data) {
console.log("[DWM getDetail] fileList===>", res.data.files, this.fileList);
//console.log("[DWM getDetail] fileList===>", res.data.files, this.fileList);
/** 返回的文件列表 */
this.fileList = res.data.files
? res.data.files.map((file) => ({
@ -507,7 +507,7 @@ export default {
/** 获取请求 */
this.$http.get(this.urls.subpage, { params }).then(({ data: res }) => {
console.log("[DWM getSubList]", res);
//console.log("[DWM getSubList]", res);
if (res.code === 0 && res.data?.list) {
this.subList = res.data.list;
this.attrTotal = res.data.total;
@ -538,7 +538,7 @@ export default {
setTimeout(
() => {
Object.keys(this.dataForm).forEach((key) => {
console.log("reset form, key", key);
//console.log("reset form, key", key);
if (excludeId && key === "id") return;
if ("files" in this.dataForm) this.dataForm.files = [];
else if ("fileIds" in this.dataForm) this.dataForm.fileIds = [];
@ -549,7 +549,7 @@ export default {
});
this.activeMenu = this.configs.menu[0].name;
this.$refs.dataForm[0].resetFields();
console.log("清除Form...", this.dataForm);
//console.log("Form...", this.dataForm);
},
immediate ? 0 : 200
);
@ -599,7 +599,7 @@ export default {
responseType: "blob",
})
.then(({ data: res }) => {
console.log("preivew", res);
//console.log("preivew", res);
if (/image/i.test(res.type)) {
//
this.currentImgUrl = URL.createObjectURL(res);
@ -610,9 +610,9 @@ export default {
a.setAttribute("target", "_blank");
a.href = URL.createObjectURL(res);
a.click();
console.log("before remove a ", a);
//console.log("before remove a ", a);
a.remove();
console.log("removed a ", a);
//console.log("removed a ", a);
} else {
this.$message({
message: "非图片和PDF文件请下载后预览",
@ -692,7 +692,7 @@ export default {
},
handleUploadSuccess(response, file, fileList) {
console.log("[DialogWithMenu] uploadedFileList", response, file, fileList);
//console.log("[DialogWithMenu] uploadedFileList", response, file, fileList);
if (response.code === 0) {
const uploadedFile = response.data[0];
@ -732,7 +732,7 @@ export default {
},
handleUploadCheck(file) {
console.log("[before upload]", file);
//console.log("[before upload]", file);
const LIMIT = 2 * 1024 * 1024; // bytes
if (file.size > LIMIT) {
this.$message({
@ -746,17 +746,17 @@ export default {
handleComponentModelUpdate(propName, { subject, payload: { data } }) {
this.dataForm[propName] = JSON.stringify(data);
console.log("[DialogJustForm] handleComponentModelUpdate", this.dataForm[propName]);
//console.log("[DialogJustForm] handleComponentModelUpdate", this.dataForm[propName]);
},
handleSelectChange(col, eventValue) {},
handleSwitchChange(val) {
console.log("[dialog] switch change: ", val, this.dataForm);
//console.log("[dialog] switch change: ", val, this.dataForm);
},
handleBtnClick(payload) {
console.log("btn click payload: ", payload);
//console.log("btn click payload: ", payload);
if ("name" in payload) {
switch (payload.name) {
@ -804,7 +804,7 @@ export default {
.then(({ data: res }) => {
this.btnLoading = false;
this.formLoading = false;
console.log("[add&update] res is: ", res);
//console.log("[add&update] res is: ", res);
if (res.code === 0) {
this.$message.success(payload.name === "add" ? "添加成功" : "更新成功");
this.$emit("refreshDataList");
@ -858,19 +858,19 @@ export default {
/** 列表handlers */
handleAddItem() {
// console.log('[dialog] handleAddItem ot list...');
// //console.log('[dialog] handleAddItem ot list...');
this.showBaseDialog = true;
this.$nextTick(() => {
console.log("[sub-dialog] ", this.$refs["sub-dialog"].init());
//console.log("[sub-dialog] ", this.$refs["sub-dialog"].init());
});
},
handleTableRowOperate({ type, data }) {
console.log("handleTableRowOperate", type, data);
//console.log("handleTableRowOperate", type, data);
switch (type) {
case "delete": {
//
console.log("delete....", data);
//console.log("delete....", data);
const itemName = typeof data === "object" ? data.attrName || data.name || data.material || data.id : data;
return this.$confirm(`是否删除条目: ${itemName}`, "提示", {
confirmButtonText: "确认",

View File

@ -107,10 +107,10 @@ export default {
},
watch: {
page: (val) => {
console.log("page changed:", val);
//console.log("page changed:", val);
},
size: (val) => {
console.log("size changed:", val);
//console.log("size changed:", val);
},
triggerUpdate(val, oldVal) {
if (val && val !== oldVal) {
@ -183,7 +183,7 @@ export default {
}
)
.then(({ data: res }) => {
console.log("[http response] res is: ", res);
//console.log("[http response] res is: ", res);
if (res.code === 0) {
// page :
@ -243,7 +243,7 @@ export default {
/** 处理 表格操作 */
handleOperate({ type, data }) {
console.log("payload", type, data);
//console.log("payload", type, data);
// component url
// payload: { type: string, data: string | number | object }
switch (type) {
@ -299,7 +299,7 @@ export default {
.catch((err) => {});
}
case "edit": {
console.log("[edit] ", data);
//console.log("[edit] ", data);
this.openDialog(data); /** data is ==> id */
break;
}
@ -322,7 +322,7 @@ export default {
.then(() => {
//
let payload = "";
console.log("copying...", type, data);
//console.log("copying...", type, data);
if (typeof data === "object") {
const head = data.head;
const copyOpt =
@ -375,7 +375,7 @@ export default {
case "sync": {
let shouldShowOverlay = false;
let payload = "";
console.log("sync...", type, data);
//console.log("sync...", type, data);
if (typeof data === "object") {
const head = data.head;
const syncOpt =
@ -413,7 +413,7 @@ export default {
},
handleBtnClick({ btnName, payload }) {
console.log("[search] form handleBtnClick", btnName, payload);
//console.log("[search] form handleBtnClick", btnName, payload);
switch (btnName) {
case "新增":
this.openDialog();
@ -456,14 +456,14 @@ export default {
});
}
});
console.log("查询", this.cachedSearchCondition);
//console.log("", this.cachedSearchCondition);
this.getList(this.cachedSearchCondition);
break;
}
case "同步":
case "全部同步":
this.$http.post(this.urls.syncUrl).then(({ data: res }) => {
console.log("同步", res);
//console.log("", res);
this.$message({ message: res.msg, type: res.code === 0 ? "success" : "error" });
this.getList();
});
@ -495,7 +495,7 @@ export default {
});
}
this.$nextTick(() => {
console.log(`[edit-dialog] extraParams: ${extraParams}`);
//console.log(`[edit-dialog] extraParams: ${extraParams}`);
this.$refs["edit-dialog"].init(/** some args... */ row_id, detail_mode, tag_info, extraParams);
});
},

View File

@ -136,7 +136,7 @@ export default {
this.addOrUpdateHandle()
break;
default:
console.log(val)
//console.log(val)
}
},
// /

View File

@ -117,7 +117,7 @@ export default {
this.addOrUpdateHandle();
break;
default:
console.log(val);
//console.log(val);
}
},

View File

@ -84,7 +84,7 @@ export default {
this.exportHandle();
break;
default:
console.log(val)
//console.log(val)
}
},
//

View File

@ -113,7 +113,7 @@ export default {
this.addOrUpdateHandle()
break;
default:
console.log(val)
//console.log(val)
}
},
}

View File

@ -119,7 +119,7 @@ export default {
this.addOrUpdateHandle()
break;
default:
console.log(val)
//console.log(val)
}
},
}

View File

@ -116,7 +116,7 @@ export default {
this.addOrUpdateHandle()
break;
default:
console.log(val)
//console.log(val)
}
},
}

View File

@ -118,7 +118,7 @@ export default {
},
//
dataFormSubmit: debounce(function () {
console.log('in role-add-or-update.vue dataformsubmit')
//console.log('in role-add-or-update.vue dataformsubmit')
this.$refs['dataForm'].validate((valid) => {
if (!valid) {
return false
@ -129,7 +129,7 @@ export default {
]
this.dataForm.deptIdList = this.$refs.deptListTree.getCheckedKeys()
// console.log('this.dataForm', this.dataForm)
// //console.log('this.dataForm', this.dataForm)
this.$http[!this.dataForm.id ? 'post' : 'put']('/sys/role', this.dataForm).then(({ data: res }) => {
if (res.code !== 0) {

View File

@ -136,7 +136,7 @@ export default {
},
methods: {
handleBtnClick({ btnName, payload }) {
console.log("[search] form handleBtnClick", btnName, payload);
//console.log("[search] form handleBtnClick", btnName, payload);
switch (btnName) {
case "新增":
this.addOrEditTitle = "新增";
@ -165,7 +165,7 @@ export default {
// this.addOrUpdateHandle();
// break;
// default:
// console.log(val);
// //console.log(val);
// }
// },
},

View File

@ -70,7 +70,7 @@ export default {
}
},
mounted() {
console.log('use user-add-or-update.vue')
//console.log('use user-add-or-update.vue')
},
computed: {
dataRule () {

View File

@ -165,7 +165,7 @@ export default {
},
methods: {
handleBtnClick({ btnName, payload }) {
console.log("[search] form handleBtnClick", btnName, payload);
//console.log("[search] form handleBtnClick", btnName, payload);
switch (btnName) {
case "新增":
this.addOrEditTitle = "新增";
@ -194,7 +194,7 @@ export default {
// this.addOrUpdateHandle();
// break;
// default:
// console.log(val);
// //console.log(val);
// }
// },
},

View File

@ -209,7 +209,7 @@ export default {
Cookies.set("token", res.data.token);
//
this.$http("/sys/dict/type/all", { limit: 999, page: 1 }).then(({ data: res }) => {
// console.log("[dictData] loading...", res);
// //console.log("[dictData] loading...", res);
if (res.code === 0 && res.data) {
let dictList = {};
res.data.map((item) => {