flat: 暂存

This commit is contained in:
Apcallover
2024-03-29 16:02:57 +08:00
parent bad7616994
commit 14d8aecabd
4 changed files with 96 additions and 14 deletions

View File

@@ -2,7 +2,7 @@
<basic-container>
<avue-crud :option="option" :table-loading="loading" :data="data" ref="crud" v-model="form"
:permission="permissionList" :before-open="beforeOpen" :before-close="beforeClose" :page.sync="page"
@row-update="rowUpdate" @row-save="rowSave" @search-change="searchChange" @search-reset="searchReset"
@row-update="rowUpdate" @row-save="rowSave" @row-del="rowDel" @search-change="searchChange" @search-reset="searchReset"
@current-change="currentChange" @size-change="sizeChange" @refresh-change="refreshChange" @on-load="onLoad">
<!-- <template slot="menu" slot-scope="{row}">-->
<!-- <el-button-->
@@ -37,7 +37,7 @@
</template>
<script>
import { companyInfoAdd, companyStationInfo, companyDetail, companyUpdate, stationStop } from "@/api/manage/main";
import { companyInfoAdd, companyStationInfo, companyDetail, companyUpdate, stationStop, removeMainList } from "@/api/manage/main";
// import { getStationDic } from "@/api/manage/station";
import { mapGetters } from "vuex";
import { isMobile, check18IdCardNo, validatenull } from "@/util/validate";
@@ -79,7 +79,7 @@ export default {
index: true,
indexLabel: "序号",
viewBtn: true,
delBtn: false,
delBtn: true,
menuWidth: 250,
labelWidth: 151,
dialogClickModal: false,
@@ -428,6 +428,33 @@ export default {
initData() {
this.onLoad(this.page, this.query);
},
rowDel(row) {
const h = this.$createElement;
this.$confirm(
h("div", null, [
h("p", { style: "font-size: 16px" }, "您确定要删除此消息吗? "),
h("p", { style: "color: red" }, "一旦删除则无法找回"),
]),
{
type: "warning",
showClose: false,
showCancelButton: true,
confirmButtonText: "确定",
cancelButtonText: "取消",
}
)
.then(() => {
return removeMainList({ id: row.id, isDeleted: 1});
})
.then(() => {
this.$message({
type: "success",
message: "操作成功!",
});
this.refreshChange();
})
.catch(() => { });
},
rowSave(row, done, loading) {
console.log('rowSave')
row.authUrlId = getPath(row.authUrlId)