|
|
@@ -18,21 +18,28 @@
|
|
|
@size-change="sizeChange"
|
|
|
@refresh-change="refreshChange"
|
|
|
@on-load="onLoad">
|
|
|
- <!-- <template slot="menuLeft">-->
|
|
|
- <!-- <el-button type="danger"-->
|
|
|
- <!-- size="small"-->
|
|
|
- <!-- icon="el-icon-delete"-->
|
|
|
- <!-- plain-->
|
|
|
- <!-- v-if="permission.activehelprecord_delete"-->
|
|
|
- <!-- @click="handleDelete">删 除-->
|
|
|
- <!-- </el-button>-->
|
|
|
- <!-- </template>-->
|
|
|
+ <template slot="menuLeft">
|
|
|
+ <el-button type="danger"
|
|
|
+ size="small"
|
|
|
+ icon="iconfont icon-yanjing"
|
|
|
+ plain
|
|
|
+ v-if="permission.activehelprecord_view"
|
|
|
+ @click="helpRecordHide"> 废 弃
|
|
|
+ </el-button>
|
|
|
+ <el-button type="success"
|
|
|
+ size="small"
|
|
|
+ icon="iconfont icon-yanjing1"
|
|
|
+ plain
|
|
|
+ v-if="permission.activehelprecord_view"
|
|
|
+ @click="helpRecordShow"> 恢 复
|
|
|
+ </el-button>
|
|
|
+ </template>
|
|
|
</avue-crud>
|
|
|
</basic-container>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
- import {getList, getDetail, add, update, remove} from "@/api/sing_active/activehelprecord";
|
|
|
+ import {getList, getDetail, add, update, remove,setStatusHide,setStatusShow} from "@/api/sing_active/activehelprecord";
|
|
|
import {mapGetters} from "vuex";
|
|
|
|
|
|
export default {
|
|
|
@@ -82,6 +89,7 @@
|
|
|
trigger: "blur"
|
|
|
}]
|
|
|
},
|
|
|
+
|
|
|
// {
|
|
|
// label: "作品ID",
|
|
|
// prop: "productId",
|
|
|
@@ -144,6 +152,19 @@
|
|
|
trigger: "blur"
|
|
|
}]
|
|
|
},
|
|
|
+ {
|
|
|
+ label: "状态",
|
|
|
+ prop: "status",
|
|
|
+ type: 'select',
|
|
|
+ search: true,
|
|
|
+ dicData: [{
|
|
|
+ label:'正常',
|
|
|
+ value: 1
|
|
|
+ },{
|
|
|
+ label:'已废弃',
|
|
|
+ value: 0
|
|
|
+ }]
|
|
|
+ },
|
|
|
]
|
|
|
},
|
|
|
data: []
|
|
|
@@ -156,7 +177,7 @@
|
|
|
addBtn: this.vaildData(this.permission.activehelprecord_add, false),
|
|
|
viewBtn: this.vaildData(this.permission.activehelprecord_view, false),
|
|
|
delBtn: this.vaildData(this.permission.activehelprecord_delete, false),
|
|
|
- editBtn: this.vaildData(this.permission.activehelprecord_edit, false)
|
|
|
+ editBtn: this.vaildData(this.permission.activehelprecord_edit, false),
|
|
|
};
|
|
|
},
|
|
|
ids() {
|
|
|
@@ -168,6 +189,50 @@
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
+ helpRecordHide(){
|
|
|
+ if (this.selectionList.length === 0) {
|
|
|
+ this.$message.warning("请选择至少一条数据");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ this.$confirm("确定将选择数据废弃?", {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning"
|
|
|
+ })
|
|
|
+ .then(() => {
|
|
|
+ return setStatusHide(this.ids);
|
|
|
+ })
|
|
|
+ .then(() => {
|
|
|
+ this.onLoad(this.page);
|
|
|
+ this.$message({
|
|
|
+ type: "success",
|
|
|
+ message: "操作成功!"
|
|
|
+ });
|
|
|
+ this.$refs.crud.toggleSelection();
|
|
|
+ });
|
|
|
+ },
|
|
|
+ helpRecordShow(){
|
|
|
+ if (this.selectionList.length === 0) {
|
|
|
+ this.$message.warning("请选择至少一条数据");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ this.$confirm("确定将选择数据恢复?", {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning"
|
|
|
+ })
|
|
|
+ .then(() => {
|
|
|
+ return setStatusShow(this.ids);
|
|
|
+ })
|
|
|
+ .then(() => {
|
|
|
+ this.onLoad(this.page);
|
|
|
+ this.$message({
|
|
|
+ type: "success",
|
|
|
+ message: "操作成功!"
|
|
|
+ });
|
|
|
+ this.$refs.crud.toggleSelection();
|
|
|
+ });
|
|
|
+ },
|
|
|
rowSave(row, done, loading) {
|
|
|
add(row).then(() => {
|
|
|
this.onLoad(this.page);
|
|
|
@@ -281,6 +346,9 @@
|
|
|
this.data = data.records;
|
|
|
this.loading = false;
|
|
|
this.selectionClear();
|
|
|
+ this.data.filter(ele=>{
|
|
|
+ return ele
|
|
|
+ })
|
|
|
});
|
|
|
}
|
|
|
}
|