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

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

View File

@@ -95,7 +95,7 @@ export default {
},
blenderOrderId() {
const item = this.listQueryExtra.find((item) => item.blenderOrderId);
console.log("Find blenderOrderId", item);
//console.log("Find blenderOrderId", item);
return item ? item.blenderOrderId : null;
},
},
@@ -104,10 +104,10 @@ export default {
},
watch: {
page: (val) => {
console.log("page changed:", val);
//console.log("page changed:", val);
},
size: (val) => {
console.log("size changed:", val);
//console.log("size changed:", val);
},
triggerUpdate(val, oldVal) {
if (val && val !== oldVal) {
@@ -191,7 +191,7 @@ export default {
}
)
.then(({ data: res }) => {
console.log("[http response] res is: ", res);
//console.log("[http response] res is: ", res);
if (res.code === 0) {
// page 场景:
@@ -240,7 +240,7 @@ export default {
/** 处理 表格操作 */
handleOperate({ type, data }) {
console.log("payload", type, data);
//console.log("payload", type, data);
// 编辑、删除、跳转路由、打开弹窗动态component都可以在配置里加上 url
// payload: { type: string, data: string | number | object }
switch (type) {
@@ -381,7 +381,7 @@ export default {
this.$http
.post(this.urls.syncUrl)
.then(({ data: res }) => {
console.log("同步", res);
//console.log("同步", res);
this.$message({ message: res.msg, type: res.code === 0 ? "success" : "error" });
this.getList();
this.overlayVisible = false;

View File

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

View File

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

View File

@@ -135,7 +135,7 @@ export default {
}
)
.then(({ data: res }) => {
console.log("[http response] res is: ", res);
//console.log("[http response] res is: ", res);
if (res.code === 0) {
// page 场景:
@@ -176,7 +176,7 @@ export default {
/** 处理 表格操作 */
handleOperate({ type, data, toRouter }) {
console.log("payload", type, data);
//console.log("payload", type, data);
// 编辑、删除、跳转路由、打开弹窗动态component都可以在配置里加上 url
// payload: { type: string, data: string | number | object }
switch (type) {
@@ -283,7 +283,7 @@ export default {
},
handleBtnClick({ btnName, payload }) {
console.log("[search] form handleBtnClick", btnName, payload);
//console.log("[search] form handleBtnClick", btnName, payload);
switch (btnName) {
case "新增":
this.openDialog();
@@ -320,7 +320,7 @@ export default {
});
}
});
console.log("查询", this.cachedSearchCondition);
//console.log("查询", this.cachedSearchCondition);
this.getList(this.cachedSearchCondition);
break;
}

View File

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

View File

@@ -170,7 +170,7 @@ export default {
}
)
.then(({ data: res }) => {
console.log("[http response] res is: ", res);
//console.log("[http response] res is: ", res);
if (res.code === 0) {
// page 场景:
@@ -209,7 +209,7 @@ export default {
},
handleOperatePress({ type, data, toRouter }) {
console.log("payload", type, data);
//console.log("payload", type, data);
switch (type) {
case "detach": {
// 下发订单
@@ -249,7 +249,7 @@ export default {
/** 处理 表格操作 */
handleOperate({ type, data, toRouter }) {
console.log("payload", type, data);
//console.log("payload", type, data);
// 编辑、删除、跳转路由、打开弹窗动态component都可以在配置里加上 url
// payload: { type: string, data: string | number | object }
switch (type) {
@@ -355,7 +355,7 @@ export default {
},
handleBtnClick({ btnName, payload }) {
console.log("[search] form handleBtnClick", btnName, payload);
//console.log("[search] form handleBtnClick", btnName, payload);
switch (btnName) {
case "新增":
this.openDialog();
@@ -392,7 +392,7 @@ export default {
});
}
});
console.log("查询", this.cachedSearchCondition);
//console.log("查询", this.cachedSearchCondition);
this.getList(this.cachedSearchCondition);
this.getList(this.cachedSearchCondition, "press");
break;

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -109,7 +109,7 @@ export default {
},
},
activated() {
console.log("list view with ehad activated..........", this.triggerUpdate);
//console.log("list view with ehad activated..........", this.triggerUpdate);
this.refreshLayoutKey = this.layoutTable();
},
watch: {
@@ -181,7 +181,7 @@ export default {
}
)
.then(({ data: res }) => {
console.log("[http response] res is: ", res);
//console.log("[http response] res is: ", res);
if (res.code === 0) {
// page 场景:
@@ -231,7 +231,7 @@ export default {
/** 处理 表格操作 */
handleOperate({ type, data }) {
console.log("payload", type, data);
//console.log("payload", type, data);
// 编辑、删除、跳转路由、打开弹窗动态component都可以在配置里加上 url
// payload: { type: string, data: string | number | object }
switch (type) {
@@ -304,7 +304,7 @@ export default {
break;
}
case "status": {
console.log("status", data);
//console.log("status", data);
// TODO: 类似于这种字符串,可以统一集中到一个文件里
const { id, code } = data;
const queryCondition = { id, code };
@@ -333,7 +333,7 @@ export default {
break;
}
case "to-bom-detail": {
// console.log('to-bom-detail', data.name)
// //console.log('to-bom-detail', data.name)
// 查看配方详情
return this.$router.push({
name: "pms-bomDetails",
@@ -394,7 +394,7 @@ export default {
});
}
case "preview": {
console.log("[PREVIEW] data", data);
//console.log("[PREVIEW] data", data);
// report preview
return this.$router.push({
name: "pms-reportPreview",
@@ -404,7 +404,7 @@ export default {
});
}
case "design": {
console.log("[DESIGN] data", data);
//console.log("[DESIGN] data", data);
// report design
return this.$router.push({
name: "pms-reportDesign",
@@ -470,7 +470,7 @@ export default {
},
handleBtnClick({ btnName, payload }) {
console.log("[search] form handleBtnClick", btnName, payload);
//console.log("[search] form handleBtnClick", btnName, payload);
switch (btnName) {
case "新增":
this.openDialog();
@@ -512,7 +512,7 @@ export default {
});
}
});
console.log("查询", this.cachedSearchCondition);
//console.log("查询", this.cachedSearchCondition);
this.getList(this.cachedSearchCondition);
break;
}
@@ -551,7 +551,7 @@ export default {
});
}
this.$nextTick(() => {
console.log(`[edit-dialog] extraParams: ${extraParams}`);
//console.log(`[edit-dialog] extraParams: ${extraParams}`);
this.$refs["edit-dialog"].init(/** some args... */ row_id, detail_mode, tag_info, extraParams);
});
},

View File

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

View File

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

View File

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

View File

@@ -112,7 +112,7 @@ export default {
},
},
activated() {
console.log("list view with ehad activated..........", this.triggerUpdate);
//console.log("list view with ehad activated..........", this.triggerUpdate);
this.refreshLayoutKey = this.layoutTable();
},
watch: {
@@ -182,7 +182,7 @@ export default {
}
)
.then(({ data: res }) => {
console.log("[http response] res is: ", res);
//console.log("[http response] res is: ", res);
if (res.code === 0) {
// page 场景:
@@ -221,7 +221,7 @@ export default {
/** 处理 表格操作 */
handleOperate({ type, data }) {
console.log("payload", type, data);
//console.log("payload", type, data);
// 编辑、删除、跳转路由、打开弹窗动态component都可以在配置里加上 url
// payload: { type: string, data: string | number | object }
switch (type) {
@@ -291,7 +291,7 @@ export default {
// break;
// }
// case "status": {
// console.log("status", data);
// //console.log("status", data);
// // TODO: 类似于这种字符串,可以统一集中到一个文件里
// const { id, code } = data;
// const queryCondition = { id, code };
@@ -320,7 +320,7 @@ export default {
// break;
// }
// case "to-bom-detail": {
// // console.log('to-bom-detail', data.name)
// // //console.log('to-bom-detail', data.name)
// // 查看配方详情
// return this.$router.push({
// name: "pms-bomDetails",
@@ -381,7 +381,7 @@ export default {
// });
// }
// case "preview": {
// console.log("[PREVIEW] data", data);
// //console.log("[PREVIEW] data", data);
// // report preview
// return this.$router.push({
// name: "pms-reportPreview",
@@ -391,7 +391,7 @@ export default {
// });
// }
// case "design": {
// console.log("[DESIGN] data", data);
// //console.log("[DESIGN] data", data);
// // report design
// return this.$router.push({
// name: "pms-reportDesign",
@@ -457,7 +457,7 @@ export default {
},
handleBtnClick({ btnName, payload }) {
console.log("[search] form handleBtnClick", btnName, payload);
//console.log("[search] form handleBtnClick", btnName, payload);
switch (btnName) {
case "新增":
this.openDialog();
@@ -500,7 +500,7 @@ export default {
});
}
});
console.log("查询", this.cachedSearchCondition);
//console.log("查询", this.cachedSearchCondition);
this.getList(this.cachedSearchCondition);
break;
}
@@ -539,7 +539,7 @@ export default {
});
}
this.$nextTick(() => {
console.log(`[edit-dialog] extraParams: ${extraParams}`);
//console.log(`[edit-dialog] extraParams: ${extraParams}`);
this.$refs["edit-dialog"].init(/** some args... */ row_id, detail_mode, tag_info, extraParams);
});
},

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -110,7 +110,7 @@ export default {
},
},
activated() {
console.log("list view with ehad activated..........", this.triggerUpdate);
//console.log("list view with ehad activated..........", this.triggerUpdate);
this.refreshLayoutKey = this.layoutTable();
},
watch: {
@@ -179,7 +179,7 @@ export default {
}
)
.then(({ data: res }) => {
console.log("[http response] res is: ", res);
//console.log("[http response] res is: ", res);
if (res.code === 0) {
// page 场景:
@@ -218,7 +218,7 @@ export default {
/** 处理 表格操作 */
handleOperate({ type, data }) {
console.log("payload", type, data);
//console.log("payload", type, data);
// 编辑、删除、跳转路由、打开弹窗动态component都可以在配置里加上 url
// payload: { type: string, data: string | number | object }
switch (type) {
@@ -287,7 +287,7 @@ export default {
// break;
// }
// case "status": {
// console.log("status", data);
// //console.log("status", data);
// // TODO: 类似于这种字符串,可以统一集中到一个文件里
// const { id, code } = data;
// const queryCondition = { id, code };
@@ -316,7 +316,7 @@ export default {
// break;
// }
// case "to-bom-detail": {
// // console.log('to-bom-detail', data.name)
// // //console.log('to-bom-detail', data.name)
// // 查看配方详情
// return this.$router.push({
// name: "pms-bomDetails",
@@ -377,7 +377,7 @@ export default {
// });
// }
// case "preview": {
// console.log("[PREVIEW] data", data);
// //console.log("[PREVIEW] data", data);
// // report preview
// return this.$router.push({
// name: "pms-reportPreview",
@@ -387,7 +387,7 @@ export default {
// });
// }
// case "design": {
// console.log("[DESIGN] data", data);
// //console.log("[DESIGN] data", data);
// // report design
// return this.$router.push({
// name: "pms-reportDesign",
@@ -453,7 +453,7 @@ export default {
},
handleBtnClick({ btnName, payload }) {
console.log("[search] form handleBtnClick", btnName, payload);
//console.log("[search] form handleBtnClick", btnName, payload);
switch (btnName) {
case "新增":
this.openDialog();
@@ -495,7 +495,7 @@ export default {
});
}
});
console.log("查询", this.cachedSearchCondition);
//console.log("查询", this.cachedSearchCondition);
this.getList(this.cachedSearchCondition);
break;
}
@@ -534,7 +534,7 @@ export default {
});
}
this.$nextTick(() => {
console.log(`[edit-dialog] extraParams: ${extraParams}`);
//console.log(`[edit-dialog] extraParams: ${extraParams}`);
this.$refs["edit-dialog"].init(/** some args... */ row_id, detail_mode, tag_info, extraParams);
});
},

View File

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

View File

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

View File

@@ -201,7 +201,7 @@ export default {
},
methods: {
handleLoadSub({ tree, treeNode, resolve }) {
// console.log("tree, treeNOde, resovle is:", tree, treeNode, resolve);
// //console.log("tree, treeNOde, resovle is:", tree, treeNode, resolve);
this.$http.get(`${this.urls.tree}?rootId=${tree.id}`).then(({ data: res }) => {
if (res.code === 0 && res.data) {
resolve(
@@ -246,7 +246,7 @@ export default {
},
})
.then(({ data: res }) => {
console.log("[http response] res is: ", res);
//console.log("[http response] res is: ", res);
// page 场景:
if ("list" in res.data) {
@@ -267,7 +267,7 @@ export default {
/** 处理 表格操作 */
handleOperate({ type, data }) {
console.log("payload", type, data);
//console.log("payload", type, data);
// 编辑、删除、跳转路由、打开弹窗动态component都可以在配置里加上 url
// payload: { type: string, data: string | number | object }
switch (type) {
@@ -307,7 +307,7 @@ export default {
break;
}
case "status": {
console.log("status", data);
//console.log("status", data);
// TODO: 类似于这种字符串,可以统一集中到一个文件里
const { id, code } = data;
const queryCondition = { id, code };
@@ -346,7 +346,7 @@ export default {
},
handleBtnClick({ btnName, payload }) {
console.log("[search] form handleBtnClick", btnName, payload);
//console.log("[search] form handleBtnClick", btnName, payload);
switch (btnName) {
case "新增":
this.openDialog();

View File

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

View File

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

View File

@@ -126,7 +126,7 @@ export default {
// TODO: 此处也需要修改,碰到具体业务需求才更新...
if (field.watch) {
// const { index: innerIdx, condition } = field.watch;
// console.log("=====field.watch=====", innerIdx, this.searchForm[innerIdx], this.headConfig.fields[innerIdx].default);
// //console.log("=====field.watch=====", innerIdx, this.searchForm[innerIdx], this.headConfig.fields[innerIdx].default);
// // 设置监听器
// this.$watch(
// () => this.searchForm[innerIdx],
@@ -136,19 +136,19 @@ export default {
// // queryParams
// // })
// this.$http(field.url, queryParams).then((res) => {
// console.log("[==>] 更新有前置条件的字段!!!", queryParams, res);
// //console.log("[==>] 更新有前置条件的字段!!!", queryParams, res);
// // 此处是外部的 index
// this.searchForm[index] = Math.floor(Math.random() * 10);
// });
// }
// );
// console.log("[BaseSearchForm] mounted(): ", this.searchForm);
// //console.log("[BaseSearchForm] mounted(): ", this.searchForm);
// // 如果此时已经有默认值了,就立马根据这个默认值来发起请求
// if (this.searchForm[innerIdx]) {
// // TODO: 这个判断好像不太需要...
// console.log("TODO: 这个判断好像不太需要...");
// //console.log("TODO: 这个判断好像不太需要...");
// } else {
// console.log("TODO: 监听的字段还没来得及设置值呢...");
// //console.log("TODO: 监听的字段还没来得及设置值呢...");
// }
}
});

View File

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

View File

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

View File

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

View File

@@ -165,7 +165,7 @@ export default {
else if (col.fetchTreeData) {
// 获取设备类型时触发的用于前端构建属性结构约定parentId 为0时是顶级节点
col.fetchTreeData().then(({ data: res }) => {
// console.log("[DialogJustForm fetchTreeData -->]", res.data);
// //console.log("[DialogJustForm fetchTreeData -->]", res.data);
if (res.code === 0 && res.data) {
if ("list" in res.data) {
this.$set(col, "options", res.data.list);
@@ -198,7 +198,7 @@ export default {
row.forEach((col) => {
if (!col.prop) return;
if ("injectTo" in col && Array.isArray(col.injectTo)) {
// console.log("watching options ..... ", col);
// //console.log("watching options ..... ", col);
col.injectTo.map((item) => {
const unwatch = this.$watch(
() => this.dataForm[col.prop],
@@ -264,7 +264,7 @@ export default {
if (excludeId && key === "id") return;
this.dataForm[key] = null;
});
// console.log("[DialogJustForm resetForm()] clearing form...");
// //console.log("[DialogJustForm resetForm()] clearing form...");
this.$refs.dataForm.clearValidate();
this.$emit("dialog-closed"); // 触发父组件销毁自己
this.watchList.map((unwatch) => unwatch());
@@ -277,9 +277,9 @@ export default {
/** init **/
init(id, detailMode) {
this.visible = true;
// console.log("[DialogJustForm] init", this.dataForm, id, detailMode);
// //console.log("[DialogJustForm] init", this.dataForm, id, detailMode);
if (this.$refs.dataForm) {
// console.log("[DialogJustForm] clearing form validation...");
// //console.log("[DialogJustForm] clearing form validation...");
// 当不是首次渲染dialog的时候一开始就清空验证信息本组件的循环里只有一个 dataForm 所以只用取 [0] 即可
this.$refs.dataForm.clearValidate();
}
@@ -306,7 +306,7 @@ export default {
url: file.fileUrl,
}));
}
// console.log("[DialogJustForm] init():", this.dataForm);
// //console.log("[DialogJustForm] init():", this.dataForm);
} else {
this.$message({
message: `${res.code}: ${res.msg}`,
@@ -333,22 +333,22 @@ export default {
/** handlers */
handleSelectChange(col, eventValue) {
// console.log("[dialog] select change: ", col, eventValue);
// //console.log("[dialog] select change: ", col, eventValue);
this.$forceUpdate();
},
handleSwitchChange(val) {
// console.log("[dialog] switch change: ", val, this.dataForm);
// //console.log("[dialog] switch change: ", val, this.dataForm);
},
handleComponentModelUpdate(propName, { subject, payload: { data } }) {
this.dataForm[propName] = JSON.stringify(data);
// console.log("[DialogJustForm] handleComponentModelUpdate", this.dataForm[propName]);
// //console.log("[DialogJustForm] handleComponentModelUpdate", this.dataForm[propName]);
},
addOrUpdate(method = "POST") {
if ("parentId" in this.dataForm) {
// console.log("[DialogJustForm parentId]", this.dataForm.parentId);
// //console.log("[DialogJustForm parentId]", this.dataForm.parentId);
// 对特殊的键做特殊处理,如 parentId 是一个 cascader获取的值是 ["xxx"]后端只需要xxx
const lastItem = this.dataForm.parentId.length - 1;
this.dataForm.parentId = this.dataForm.parentId[lastItem];
@@ -400,7 +400,7 @@ export default {
// Object.getOwnPropertyNames(this.dataForm).forEach((prop) => {
// if (/.*?Time/.test(prop)) {
// console.log("HTTP prop", prop, this.dataForm[prop]);
// //console.log("HTTP prop", prop, this.dataForm[prop]);
// }
// });
@@ -413,7 +413,7 @@ export default {
data: httpPayload,
})
.then(({ data: res }) => {
// console.log("[add&update] res is: ", res);
// //console.log("[add&update] res is: ", res);
this.loadingStatus = false;
if (res.code === 0) {
this.$message.success(method === "POST" ? "添加成功" : "更新成功");
@@ -438,7 +438,7 @@ export default {
},
handleBtnClick(payload) {
// console.log("btn click payload: ", payload);
// //console.log("btn click payload: ", payload);
if ("name" in payload) {
switch (payload.name) {
@@ -454,12 +454,12 @@ export default {
break;
}
} else {
console.log("[x] 不是这么用的! 缺少name属性");
//console.log("[x] 不是这么用的! 缺少name属性");
}
},
handleUploadChange(file, fileList) {
// console.log("[Upload] handleUploadChange...", file, fileList);
// //console.log("[Upload] handleUploadChange...", file, fileList);
},
handleClose() {

View File

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

View File

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

View File

@@ -156,7 +156,7 @@ export default {
if ("list" in res.data) {
this.dataList = res.data.list;
this.totalPage = res.data.total;
} else console.log("没有res.data.list属性");
}
} else {
this.dataList.splice(0);
this.totalPage = 0;
@@ -183,7 +183,7 @@ export default {
/** 处理 表格操作 */
handleOperate({ type, data }) {
console.log("payload", type, data);
//console.log("payload", type, data);
// 编辑、删除、跳转路由、打开弹窗动态component都可以在配置里加上 url
// payload: { type: string, data: string | number | object }
switch (type) {
@@ -221,7 +221,7 @@ export default {
}
})
.catch((errMsg) => {
console.log("ere...");
//console.log("ere...");
this.$message({
message: errMsg,
type: "error",
@@ -346,7 +346,7 @@ export default {
break;
}
case "view-ongoing": {
console.log("view-ongoing", data);
//console.log("view-ongoing", data);
this.openMenuDialog(data, false);
break;
}
@@ -358,12 +358,12 @@ export default {
},
handleBtnClick({ btnName, payload }) {
console.log("SearchForm", btnName, payload);
//console.log("SearchForm", btnName, payload);
switch (btnName) {
case "查询": {
this.params = Object.assign({}, payload);
console.log("this.params", this.params);
//console.log("this.params", this.params);
if ("timerange" in payload) {
// 处理时间段
if (!!payload.timerange) {
@@ -421,7 +421,7 @@ export default {
this.renderDialog = true;
this.$nextTick(() => {
// console.log("init dialog", row_id, detail_mode);
// //console.log("init dialog", row_id, detail_mode);
this.$refs["order-dialog"].init(/** some args... */ row_id, detail_mode);
});
},

View File

@@ -148,7 +148,7 @@ export default {
watch: {
$route: function (route) {
if (route.hash) {
console.log("acitive hash", route.hash);
//console.log("acitive hash", route.hash);
this.activeTable = route.hash;
}
},
@@ -269,7 +269,7 @@ export default {
inject: ["urls"],
mounted() {
this.getSpecificList("ongoing", this.conditions.ongoing);
console.log("[list view with head]", this.headConfigs);
//console.log("[list view with head]", this.headConfigs);
},
activated() {
this.refreshLayoutKey = this.layoutTable();
@@ -296,7 +296,7 @@ export default {
if ("list" in res.data) {
this.dataLists[type] = res.data.list;
this.totalPage[type] = res.data.total;
} else console.log("没有res.data.list属性");
}
} else {
this.dataLists[type].splice(0);
this.totalPage[type] = 0;
@@ -339,7 +339,7 @@ export default {
},
})
.then(({ data: res }) => {
console.log("[http response] res is: ", res);
//console.log("[http response] res is: ", res);
// page 场景:
if ("list" in res.data) {
@@ -360,7 +360,7 @@ export default {
/** 处理 表格操作 */
handleOperate({ type, data }) {
console.log("payload", type, data);
//console.log("payload", type, data);
// 编辑、删除、跳转路由、打开弹窗动态component都可以在配置里加上 url
// payload: { type: string, data: string | number | object }
switch (type) {
@@ -404,7 +404,7 @@ export default {
break;
}
case "status": {
console.log("status", data);
//console.log("status", data);
// TODO: 类似于这种字符串,可以统一集中到一个文件里
const { id, code } = data;
const queryCondition = { id, code };
@@ -448,13 +448,13 @@ export default {
}
delete params.timerange;
}
console.log("[search form btn click]", Object.assign({}, this.conditions.ongoing, params));
//console.log("[search form btn click]", Object.assign({}, this.conditions.ongoing, params));
// 发起请求
this.getSpecificList("ongoing", Object.assign({}, this.conditions.ongoing, params));
}
}
case "pending":
console.log("[search form btn click]", type, btnName, payload);
//console.log("[search form btn click]", type, btnName, payload);
if (btnName === "压制工艺") {
// 跳转至压制工艺页面
alert("跳转至压制工艺页面");
@@ -470,7 +470,7 @@ export default {
case "finished":
break;
}
// console.log("[search] form handleBtnClick", type, btnName, payload);
// //console.log("[search] form handleBtnClick", type, btnName, payload);
// switch (btnName) {
// case "新增":
// this.openDialog();

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -112,7 +112,7 @@ export default {
},
},
activated() {
console.log("list view with ehad activated..........", this.triggerUpdate);
//console.log("list view with ehad activated..........", this.triggerUpdate);
this.refreshLayoutKey = this.layoutTable();
},
watch: {
@@ -182,7 +182,7 @@ export default {
}
)
.then(({ data: res }) => {
console.log("[http response] res is: ", res);
//console.log("[http response] res is: ", res);
if (res.code === 0) {
// page 场景:
@@ -221,7 +221,7 @@ export default {
/** 处理 表格操作 */
handleOperate({ type, data }) {
console.log("payload", type, data);
//console.log("payload", type, data);
// 编辑、删除、跳转路由、打开弹窗动态component都可以在配置里加上 url
// payload: { type: string, data: string | number | object }
switch (type) {
@@ -290,7 +290,7 @@ export default {
// break;
// }
// case "status": {
// console.log("status", data);
// //console.log("status", data);
// // TODO: 类似于这种字符串,可以统一集中到一个文件里
// const { id, code } = data;
// const queryCondition = { id, code };
@@ -319,7 +319,7 @@ export default {
// break;
// }
// case "to-bom-detail": {
// // console.log('to-bom-detail', data.name)
// // //console.log('to-bom-detail', data.name)
// // 查看配方详情
// return this.$router.push({
// name: "pms-bomDetails",
@@ -380,7 +380,7 @@ export default {
// });
// }
// case "preview": {
// console.log("[PREVIEW] data", data);
// //console.log("[PREVIEW] data", data);
// // report preview
// return this.$router.push({
// name: "pms-reportPreview",
@@ -390,7 +390,7 @@ export default {
// });
// }
// case "design": {
// console.log("[DESIGN] data", data);
// //console.log("[DESIGN] data", data);
// // report design
// return this.$router.push({
// name: "pms-reportDesign",
@@ -456,7 +456,7 @@ export default {
},
handleBtnClick({ btnName, payload }) {
console.log("[search] form handleBtnClick", btnName, payload);
//console.log("[search] form handleBtnClick", btnName, payload);
switch (btnName) {
case "新增":
this.openDialog();
@@ -499,7 +499,7 @@ export default {
});
}
});
console.log("查询", this.cachedSearchCondition);
//console.log("查询", this.cachedSearchCondition);
this.getList(this.cachedSearchCondition);
break;
}
@@ -538,7 +538,7 @@ export default {
});
}
this.$nextTick(() => {
console.log(`[edit-dialog] extraParams: ${extraParams}`);
//console.log(`[edit-dialog] extraParams: ${extraParams}`);
this.$refs["edit-dialog"].init(/** some args... */ row_id, detail_mode, tag_info, extraParams);
});
},

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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