bugfix 0706 doc

This commit is contained in:
lb 2023-07-06 13:35:44 +08:00
parent eac4976304
commit bea02c6d0d
16 changed files with 79 additions and 22 deletions

View File

@ -233,9 +233,10 @@ export default {
// payload: { type: string, data: string | number | object }
switch (type) {
case "delete": {
let currenPageListLength = this.dataList.length
let hintMsg = "name" in data ? `确定要删除记录 "${data.name}" 吗?` : "确定删除该记录?";
let currenPageListLength = this.dataList.length;
//
return this.$confirm(`确定要删除记录 "${data.name ?? data.id}" 吗?`, "提示", {
return this.$confirm(hintMsg, "提示", {
confirmButtonText: "确认",
cancelButtonText: "我再想想",
type: "warning",

View File

@ -88,7 +88,7 @@ export default {
props: {
navigator: {
type: Boolean,
default: true
default: true,
},
tableConfig: {
type: Object,
@ -241,7 +241,7 @@ export default {
}));
this.totalPage = res.data.total;
} else if (Array.isArray(res.data)) {
this.dataList = res.data
this.dataList = res.data;
} else {
this.dataList.splice(0);
this.totalPage = 0;
@ -284,9 +284,15 @@ export default {
promptName = data[deleteConfig.promptField];
}
let hintMsg = `确定要删除记录 "${promptName}" 吗?`;
if (promptName == data.id) {
// promptName data.id ''
hintMsg = "确定删除该记录?";
}
let currenPageListLength = this.dataList.length;
//
return this.$confirm(`确定要删除记录 "${promptName}" 吗?`, "提示", {
return this.$confirm(hintMsg, "提示", {
confirmButtonText: "确认",
cancelButtonText: "我再想想",
type: "warning",

View File

@ -175,9 +175,11 @@ export default {
// payload: { type: string, data: string | number | object }
switch (type) {
case "delete": {
let hintMsg = "name" in data ? `确定要删除记录 "${data.name}" 吗?` : "确定删除该记录?";
let currenPageListLength = this.dataList.length;
//
return this.$confirm(`确定要删除记录 "${data.name ?? data.id}" 吗?`, "提示", {
return this.$confirm(hintMsg, "提示", {
confirmButtonText: "确认",
cancelButtonText: "我再想想",
type: "warning",

View File

@ -252,10 +252,11 @@ export default {
// payload: { type: string, data: string | number | object }
switch (type) {
case "delete": {
let currenPageListLength = this.dataList.length;
let hintMsg = "name" in data ? `确定要删除记录 "${data.name}" 吗?` : "确定删除该记录?";
let currenPageListLength = this.dataList.length;
//
return this.$confirm(`确定要删除记录 "${data.name ?? data.id}" 吗?`, "提示", {
return this.$confirm(hintMsg, "提示", {
confirmButtonText: "确认",
cancelButtonText: "我再想想",
type: "warning",

View File

@ -243,9 +243,15 @@ export default {
promptName = data[deleteConfig.promptField];
}
let hintMsg = `确定要删除记录 "${promptName}" 吗?`;
if (promptName == data.id) {
// promptName data.id ''
hintMsg = "确定删除该记录?";
}
let currenPageListLength = this.dataList.length;
//
return this.$confirm(`确定要删除记录 "${promptName}" 吗?`, "提示", {
return this.$confirm(hintMsg, "提示", {
confirmButtonText: "确认",
cancelButtonText: "我再想想",
type: "warning",

View File

@ -232,10 +232,15 @@ export default {
if (deleteConfig && "promptField" in deleteConfig) {
promptName = data[deleteConfig.promptField];
}
let hintMsg = `确定要删除记录 "${promptName}" 吗?`;
if (promptName == data.id) {
// promptName data.id ''
hintMsg = "确定删除该记录?";
}
let currenPageListLength = this.dataList.length;
//
return this.$confirm(`确定要删除记录 "${promptName}" 吗?`, "提示", {
return this.$confirm(hintMsg, "提示", {
confirmButtonText: "确认",
cancelButtonText: "我再想想",
type: "warning",

View File

@ -213,9 +213,14 @@ export default {
if (deleteConfig && "promptField" in deleteConfig) {
promptName = data[deleteConfig.promptField];
}
let hintMsg = `确定要删除记录 "${promptName}" 吗?`;
if (promptName == data.id) {
// promptName data.id ''
hintMsg = "确定删除该记录?";
}
let currenPageListLength = this.dataList.length;
//
return this.$confirm(`确定要删除记录 "${promptName}" 吗?`, "提示", {
return this.$confirm(hintMsg, "提示", {
confirmButtonText: "确认",
cancelButtonText: "我再想想",
type: "warning",

View File

@ -142,9 +142,14 @@ export default {
if (deleteConfig && "promptField" in deleteConfig) {
promptName = data[deleteConfig.promptField];
}
let hintMsg = `确定要删除记录 "${promptName}" 吗?`;
if (promptName == data.id) {
// promptName data.id ''
hintMsg = "确定删除该记录?";
}
let currenPageListLength = this.dataList.length;
//
return this.$confirm(`确定要删除记录 "${promptName}" 吗?`, "提示", {
return this.$confirm(hintMsg, "提示", {
confirmButtonText: "确认",
cancelButtonText: "我再想想",
type: "warning",

View File

@ -229,9 +229,14 @@ export default {
if (deleteConfig && "promptField" in deleteConfig) {
promptName = data[deleteConfig.promptField];
}
let hintMsg = `确定要删除记录 "${promptName}" 吗?`;
if (promptName == data.id) {
// promptName data.id ''
hintMsg = "确定删除该记录?";
}
let currenPageListLength = this.dataList.length;
//
return this.$confirm(`确定要删除记录 "${promptName}" 吗?`, "提示", {
return this.$confirm(hintMsg, "提示", {
confirmButtonText: "确认",
cancelButtonText: "我再想想",
type: "warning",

View File

@ -272,9 +272,11 @@ export default {
// payload: { type: string, data: string | number | object }
switch (type) {
case "delete": {
let hintMsg = "name" in data ? `确定要删除记录 "${data.name}" 吗?` : "确定删除该记录?";
let currenPageListLength = this.dataList.length;
//
return this.$confirm(`确定要删除 "${data.name}" 吗?`, "提示", {
return this.$confirm(hintMsg, "提示", {
confirmButtonText: "确认",
cancelButtonText: "我再想想",
type: "warning",

View File

@ -8,7 +8,7 @@ export default function () {
{ type: "index", label: "序号" },
{ width: 90, prop: "code", label: "原料编码" },
{ width: 240, prop: "description", label: "原料描述" },
{ width: 90, prop: "name", label: "原料名称" },
{ width: 90, prop: "name", label: "中文名称" },
{ width: 120, prop: "maxSize", label: "原料最大尺寸", filter: val => val ?? '-' },
{ width: 90, prop: "typeDictValue", label: "类型", filter: dictFilter("material_category") }, // subcomponent: {/** TODO: create a new component for this option */} },
{ prop: "baseMaterialCode", label: "基础原料编码" },
@ -175,7 +175,12 @@ export default function () {
// },
],
[
{ input: true, label: "堆积密度(g/cm³)", prop: "density", elparams: { placeholder: "请输入堆积密度" } },
{
input: true, label: "堆积密度(g/cm³)",
prop: "density",
rules: [{ type: "number", message: "请输入正确的数字类型", trigger: "blur", transform: (val) => Number(val) }],
elparams: { placeholder: "请输入堆积密度" }
},
{
input: true,
label: "加料下限",

View File

@ -25,12 +25,12 @@ export default function () {
prop: "operations",
name: "操作",
fixed: "right",
width: 120,
width: 90,
subcomponent: TableOperaionComponent,
options: [
{ name: "edit", label: "编辑", icon: "edit-outline" },
{ name: "sync", label: "同步", icon: "refresh" },
{ name: "delete", icon: "delete", label: "删除", emitFull: true, permission: "pms:materialStorage:delete" }
// { name: "delete", icon: "delete", label: "删除", emitFull: true, permission: "pms:materialStorage:delete" }
],
},
];

View File

@ -313,9 +313,11 @@ export default {
});
}
case "delete": {
let hintMsg = "code" in data ? `确定要删除记录 "${data.code}" 吗?` : "确定删除该记录?";
let currenPageListLength = this.dataList.length;
//
return this.$confirm(`确定要删除 "${data.code ?? data.id}" 吗?`, "提示", {
return this.$confirm(hintMsg, "提示", {
confirmButtonText: "确认",
cancelButtonText: "我再想想",
type: "warning",

View File

@ -365,9 +365,11 @@ export default {
// payload: { type: string, data: string | number | object }
switch (type) {
case "delete": {
let hintMsg = "name" in data ? `确定要删除记录 "${data.name}" 吗?` : "确定删除该记录?";
let currenPageListLength = this.dataList.length;
//
return this.$confirm(`确定要删除 "${data.name}" 吗?`, "提示", {
return this.$confirm(hintMsg, "提示", {
confirmButtonText: "确认",
cancelButtonText: "我再想想",
type: "warning",

View File

@ -142,9 +142,14 @@ export default {
if (deleteConfig && "promptField" in deleteConfig) {
promptName = data[deleteConfig.promptField];
}
let hintMsg = `确定要删除记录 "${promptName}" 吗?`;
if (promptName == data.id) {
// promptName data.id ''
hintMsg = "确定删除该记录?";
}
let currenPageListLength = this.dataList.length;
//
return this.$confirm(`确定要删除记录 "${promptName}" 吗?`, "提示", {
return this.$confirm(hintMsg, "提示", {
confirmButtonText: "确认",
cancelButtonText: "我再想想",
type: "warning",

View File

@ -232,9 +232,14 @@ export default {
if (deleteConfig && "promptField" in deleteConfig) {
promptName = data[deleteConfig.promptField];
}
let hintMsg = `确定要删除记录 "${promptName}" 吗?`;
if (promptName == data.id) {
// promptName data.id ''
hintMsg = "确定删除该记录?";
}
let currenPageListLength = this.dataList.length;
//
return this.$confirm(`确定要删除记录 "${promptName}" 吗?`, "提示", {
return this.$confirm(hintMsg, "提示", {
confirmButtonText: "确认",
cancelButtonText: "我再想想",
type: "warning",