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> <script>
// window.SITE_CONFIG['apiURL'] = 'http://192.168.1.103:8080/pms-am'; // 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.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.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 // window.SITE_CONFIG['apiURL'] = 'http://localhost:3000/p//////ms-am'; // xv
</script> </script>
<% } %> <% } %>

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -17,7 +17,7 @@ export default {
}, },
methods: { methods: {
emitClick() { emitClick() {
// console.log('inject data:' ,this.injectData) // //console.log('inject data:' ,this.injectData)
this.$emit('emit-data', { this.$emit('emit-data', {
type: this.injectData.head?.actionName || 'view-detail-action', type: this.injectData.head?.actionName || 'view-detail-action',
data: this.injectData.head?.emitFullData ? this.injectData : this.injectData.id data: this.injectData.head?.emitFullData ? this.injectData : this.injectData.id
@ -25,7 +25,7 @@ export default {
} }
}, },
render: function (h) { 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)]) 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() { // mounted() {
// console.log('inject data', this.injectData) // //console.log('inject data', this.injectData)
// }, // },
methods: { methods: {
// 发射事件 // 发射事件
@ -94,7 +94,7 @@ export default {
if ("enable" in opt && typeof opt.enable === "function") { if ("enable" in opt && typeof opt.enable === "function") {
shouldDisabled = !opt.enable(this.injectData); shouldDisabled = !opt.enable(this.injectData);
} }
// console.log('should disabled', shouldDisabled) // //console.log('should disabled', shouldDisabled)
btns.push( btns.push(
h( h(
"el-button", "el-button",

View File

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

View File

@ -16,7 +16,7 @@ export default {
}, },
methods: { methods: {
emitClick() { emitClick() {
// console.log('inject data:' ,this.injectData) // //console.log('inject data:' ,this.injectData)
this.$emit('emit-data', { this.$emit('emit-data', {
type: this.injectData.head?.actionName || 'select-change-action', type: this.injectData.head?.actionName || 'select-change-action',
data: this.injectData.head?.emitFullData ? this.injectData : this.injectData.id data: this.injectData.head?.emitFullData ? this.injectData : this.injectData.id
@ -24,7 +24,7 @@ export default {
} }
}, },
render: function (h) { 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)]) 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() { mounted() {
// console.log("[component] StatusComponent: ", this.injectData); // //console.log("[component] StatusComponent: ", this.injectData);
}, },
methods: { methods: {
// 发射事件 // 发射事件

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -40,7 +40,7 @@ export default {
handler: function (route) { handler: function (route) {
if (route.query.code) { if (route.query.code) {
this.triggerUpdateKey = Math.random().toString(); 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, immediate: true,

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -98,12 +98,12 @@ export default function () {
listenTo: { listenTo: {
prop: 'carId', // 应该监听 carId随 carId 而更新, prop: 'carId', // 应该监听 carId随 carId 而更新,
handler: function (carList, 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) const car = carList.find(item => item.carId === carId)
console.log('car. ', car) //console.log('car. ', car)
// 需要 bind // 需要 bind
this.$set(this.dataForm, 'hisId', car.id) 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) { // handler: function (route) {
// if (route.query.id) { // if (route.query.id) {
// this.triggerUpdateKey = Math.random().toString(); // 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, // immediate: true,
@ -51,11 +51,11 @@ export default {
// }, // },
mounted() {}, mounted() {},
activated() { activated() {
// console.log("activated..."); // //console.log("activated...");
this.triggerUpdateKey = Math.random().toString(); this.triggerUpdateKey = Math.random().toString();
}, },
// deactivated() { // deactivated() {
// console.log("deactivated..."); // //console.log("deactivated...");
// }, // },
methods: {}, methods: {},
}; };

View File

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

View File

@ -17,12 +17,12 @@ const CategoryList = {
return { list: [], calcMaxHeight, pickedId: null } return { list: [], calcMaxHeight, pickedId: null }
}, },
mounted() { mounted() {
console.log(this.injectData) //console.log(this.injectData)
if (categoryOptions.length === 0) { if (categoryOptions.length === 0) {
// 获取并缓存 categoryOptions // 获取并缓存 categoryOptions
axios.get('/pms/reportSheetCategory/list').then(({ data: res }) => { axios.get('/pms/reportSheetCategory/list').then(({ data: res }) => {
if (res.code === 0) { if (res.code === 0) {
console.log('[CategoryList小组件]', res.data) //console.log('[CategoryList小组件]', res.data)
categoryOptions = res.data categoryOptions = res.data
} else { } else {
categoryOptions.splice(0) categoryOptions.splice(0)
@ -52,7 +52,7 @@ const CategoryList = {
render: function (h) { render: function (h) {
const childOptions = [] const childOptions = []
this.injectData.head.options?.forEach(item => { 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)) 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) 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)) { if (Array.isArray(categoryList)) {
console.log('category ====> ', categoryList) //console.log('category ====> ', categoryList)
const tableProps = [ const tableProps = [
{ type: 'index', label: '序号' }, { type: 'index', label: '序号' },
{ prop: "fileName", label: "报表名称" }, { prop: "fileName", label: "报表名称" },

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -118,7 +118,7 @@ export default {
}, },
// //
dataFormSubmit: debounce(function () { 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) => { this.$refs['dataForm'].validate((valid) => {
if (!valid) { if (!valid) {
return false return false
@ -129,7 +129,7 @@ export default {
] ]
this.dataForm.deptIdList = this.$refs.deptListTree.getCheckedKeys() 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 }) => { this.$http[!this.dataForm.id ? 'post' : 'put']('/sys/role', this.dataForm).then(({ data: res }) => {
if (res.code !== 0) { if (res.code !== 0) {

View File

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

View File

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

View File

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

View File

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