BUG 优化

dev
xiepeng 2024-04-01 18:55:28 +08:00
parent 456855000a
commit 83faf65bb4
1 changed files with 2 additions and 56 deletions

View File

@ -162,40 +162,13 @@
>编辑
</el-button>
<el-button
v-if="expandedRows[row.INSPECTANNUALLY_ID]"
v-if="buttonJurisdiction.del"
type="danger"
text
link
@click="fnDelete(row.INSPECTANNUALLY_ID)"
>删除
</el-button>
<el-button
v-if="
expandedRows[row.INSPECTANNUALLY_ID] &&
row.REMINDER_STATUS === '0'
"
type="primary"
text
link
@click="fnStatusChange(row.INSPECTANNUALLY_ID, '1')"
>开启</el-button
>
<el-button
v-if="
expandedRows[row.INSPECTANNUALLY_ID] &&
row.REMINDER_STATUS === '1'
"
type="primary"
text
link
@click="fnStatusChange(row.INSPECTANNUALLY_ID, '0')"
>关闭
</el-button>
<el-button
type="primary"
@click="toggleExpand(row.INSPECTANNUALLY_ID)"
>
{{ expandedRows[row.INSPECTANNUALLY_ID] ? "收起" : "更多" }}
删除
</el-button>
</template>
</el-table-column>
@ -228,7 +201,6 @@ import useListData from "@/assets/js/useListData.js";
import {
getInspectAnnuallyList,
setInspectAnnuallyDelete,
setInspectAnnuallyEdit2,
} from "@/request/mechanical_files.js";
import { reactive } from "vue";
import { debounce } from "throttle-debounce";
@ -272,18 +244,6 @@ const fnResetPaginationTransfer = () => {
REMINDER_STATUS: searchForm.value.REMINDER_STATUS,
});
};
// 使
const expandedRows = reactive({}); //
//
function toggleExpand(rowId) {
if (expandedRows[rowId] === undefined) {
expandedRows[rowId] = true; //
} else {
expandedRows[rowId] = !expandedRows[rowId]; //
}
}
const fnDelete = debounce(
1000,
async (INSPECTANNUALLY_ID) => {
@ -294,19 +254,6 @@ const fnDelete = debounce(
},
{ atBegin: true }
);
const fnStatusChange = debounce(
1000,
async (INSPECTANNUALLY_ID, REMINDER_STATUS) => {
const msg = REMINDER_STATUS === "0" ? "关闭" : "开启";
await ElMessageBox.confirm("确定要" + msg + "提醒吗?", {
type: "warning",
});
await setInspectAnnuallyEdit2({ INSPECTANNUALLY_ID, REMINDER_STATUS });
ElMessage.success(msg + "成功");
fnResetPaginationTransfer();
},
{ atBegin: true }
);
const buttonJurisdiction = await useButtonJurisdiction("hidden");
const fnImportDialogChangeShow = () => {
@ -328,7 +275,6 @@ const fnSubmitImport = async (formData) => {
const fnExport = async () => {
const selectionData = tableRef.value.getSelectionRows();
console.log("selectionData",selectionData);
if (selectionData.length === 0) {
ElMessage.warning("请选择需要导出至excel报表的记录信息");
return;