-
+
+
+
+
+
+ 搜索
+
+
+
+
@@ -95,6 +113,7 @@ import {
getShortCut,
removeShortCut,
editShortCut,
+ removeMuchShortCut
} from "@/utils/shortCutUtils";
import AutoHideInfo from "@/components/AutoHideInfo";
import { createNamespacedHelpers } from "vuex";
@@ -113,6 +132,10 @@ export default {
return {
dataList: [],
modifingId: 0,
+ showSearch: false,
+ queryParams:{
+ key: null
+ }
};
},
created() {
@@ -147,8 +170,12 @@ export default {
}
},
getList(setCurrent) {
- getShortCut().then((data) => {
+ getShortCut(this.queryParams.key).then((data) => {
this.dataList = data;
+ //超过10个就显示搜索按钮
+ if(this.dataList && this.dataList.length > 5 && !this.showSearch){
+ this.showSearch = true;
+ }
// console.log(this.dataList);
if (setCurrent) {
this.$refs.shortCutTable.setCurrentRow(data[0]);
@@ -163,6 +190,27 @@ export default {
}
});
},
+ handleOnMuchDelete() {
+ if(this.dataList && this.dataList.length > 0){
+ let ids = [];
+ this.dataList.forEach((item,index) => {
+ ids.push(item.id);
+ });
+ this.$confirm("是否确定清除当前 "+ids.length+" 条快捷数据?", "警告", {
+ confirmButtonText: "确定",
+ cancelButtonText: "取消",
+ type: "warning",
+ }).then(function () {
+ return removeMuchShortCut(ids);
+ }).then((response) => {
+ this.getList();
+ if (ids.indexOf(this.curShortCutObj.id) != -1) {
+ this.setCurShortCutObj({});
+ }
+ })
+ .catch(function () {});
+ }
+ },
handleOnCurrentChange(data) {
this.setCurShortCutObj({ data });
},
diff --git a/stdiet-ui/src/views/custom/recipesBuild/RecipesView/RecipesCom/index.vue b/stdiet-ui/src/views/custom/recipesBuild/RecipesView/RecipesCom/index.vue
index 2eb697373..b5dab009f 100644
--- a/stdiet-ui/src/views/custom/recipesBuild/RecipesView/RecipesCom/index.vue
+++ b/stdiet-ui/src/views/custom/recipesBuild/RecipesView/RecipesCom/index.vue
@@ -342,6 +342,9 @@