bugfix 0706 doc
This commit is contained in:
parent
eac4976304
commit
bea02c6d0d
@ -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",
|
||||
|
@ -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",
|
||||
|
@ -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",
|
||||
|
@ -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",
|
||||
|
@ -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",
|
||||
|
@ -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",
|
||||
|
@ -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",
|
||||
|
@ -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",
|
||||
|
@ -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",
|
||||
|
@ -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",
|
||||
|
@ -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: "加料下限",
|
||||
|
@ -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" }
|
||||
],
|
||||
},
|
||||
];
|
||||
|
@ -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",
|
||||
|
@ -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",
|
||||
|
@ -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",
|
||||
|
@ -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",
|
||||
|
Loading…
Reference in New Issue
Block a user