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

@@ -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) {