src/views/talk/talk.vue
@@ -1,8 +1,12 @@
<template>
  <basic-container
    :class="[$store.state.control.windowWidth >= 1024 ? 'oneRowSearch' : '']"
    :class="[
      $store.state.control.screenSize == 1366 ? 'smallSize' : 'normalSize',
      $store.state.control.windowWidth >= 1024 ? 'tooRowSearch1' : ''
    ]"
  >
    <avue-crud
      class="tablesss"
      :option="option"
      :table-loading="loading"
      :data="data"
@@ -69,7 +73,7 @@
        pageSize: 10,
        currentPage: 1,
        total: 0,
        ...this.$store.state.control.changePageSize,
        ...this.$store.state.control.changePageSize
      },
      selectionList: [],
      option: {
@@ -83,6 +87,7 @@
        index: true,
        viewBtn: true,
        selection: true,
        menu: false,
        dialogClickModal: false,
        ...this.$store.state.control.clearOtherBut,
        column: [
@@ -95,9 +100,9 @@
              {
                required: true,
                message: "请输入标题",
                trigger: "blur",
              },
            ],
                trigger: "blur"
              }
            ]
          },
          {
            label: "谈话对象",
@@ -114,9 +119,9 @@
              {
                required: true,
                message: "请输入谈话对象",
                trigger: "blur",
              },
            ],
                trigger: "blur"
              }
            ]
          },
          {
            label: "谈话内容",
@@ -125,9 +130,9 @@
              {
                required: true,
                message: "请输入谈话内容",
                trigger: "blur",
              },
            ],
                trigger: "blur"
              }
            ]
          },
          {
            label: "谈话时间",
@@ -139,9 +144,9 @@
              {
                required: true,
                message: "请输入谈话时间",
                trigger: "blur",
              },
            ],
                trigger: "blur"
              }
            ]
          },
          {
            label: "结论",
@@ -150,9 +155,9 @@
              {
                required: true,
                message: "请输入结论",
                trigger: "blur",
              },
            ],
                trigger: "blur"
              }
            ]
          },
          {
            label: "评价",
@@ -161,9 +166,9 @@
              {
                required: true,
                message: "请输入评价",
                trigger: "blur",
              },
            ],
                trigger: "blur"
              }
            ]
          },
          {
            label: "图片",
@@ -171,16 +176,16 @@
            // dataType: 'string',
            type: "upload",
            propsHttp: {
              res: "data",
              res: "data"
            },
            span: 24,
            listType: "picture-card",
            tip: "只能上传jpg/png文件,且不超过500kb",
            action: "/api/blade-resource/oss/endpoint/put-files-talk?file=",
          },
        ],
            action: "/api/blade-resource/oss/endpoint/put-files-talk?file="
          }
        ]
      },
      data: [],
      data: []
    };
  },
  computed: {
@@ -190,16 +195,19 @@
        addBtn: this.vaildData(this.permission.talk_add, false),
        viewBtn: this.vaildData(this.permission.talk_view, false),
        delBtn: this.vaildData(this.permission.talk_delete, false),
        editBtn: this.vaildData(this.permission.talk_edit, false),
        editBtn: this.vaildData(this.permission.talk_edit, false)
      };
    },
    ids() {
      let ids = [];
      this.selectionList.forEach((ele) => {
      this.selectionList.forEach(ele => {
        ids.push(ele.id);
      });
      return ids.join(",");
    },
    }
  },
  mounted() {
    this.$store.commit("setWindowSizeHeightAdd");
  },
  methods: {
    searchChange(params, done) {
@@ -220,11 +228,11 @@
          this.onLoad(this.page);
          this.$message({
            type: "success",
            message: "操作成功!",
            message: "操作成功!"
          });
          done();
        },
        (error) => {
        error => {
          loading();
          window.console.log(error);
        }
@@ -236,11 +244,11 @@
          this.onLoad(this.page);
          this.$message({
            type: "success",
            message: "操作成功!",
            message: "操作成功!"
          });
          done();
        },
        (error) => {
        error => {
          loading();
          console.log(error);
        }
@@ -250,7 +258,7 @@
      this.$confirm("确定将选择数据删除?", {
        confirmButtonText: "确定",
        cancelButtonText: "取消",
        type: "warning",
        type: "warning"
      })
        .then(() => {
          return remove(row.id);
@@ -259,7 +267,7 @@
          this.onLoad(this.page);
          this.$message({
            type: "success",
            message: "操作成功!",
            message: "操作成功!"
          });
        });
    },
@@ -271,7 +279,7 @@
      this.$confirm("确定将选择数据删除?", {
        confirmButtonText: "确定",
        cancelButtonText: "取消",
        type: "warning",
        type: "warning"
      })
        .then(() => {
          return remove(this.ids);
@@ -280,14 +288,14 @@
          this.onLoad(this.page);
          this.$message({
            type: "success",
            message: "操作成功!",
            message: "操作成功!"
          });
          this.$refs.crud.toggleSelection();
        });
    },
    beforeOpen(done, type) {
      if (["edit", "view"].includes(type)) {
        getDetail(this.form.id).then((res) => {
        getDetail(this.form.id).then(res => {
          this.form = res.data.data;
        });
      }
@@ -320,16 +328,17 @@
        page.currentPage,
        page.pageSize,
        Object.assign(params, this.query)
      ).then((res) => {
      ).then(res => {
        const data = res.data.data;
        this.page.total = data.total;
        this.data = data.records;
        console.log(this.data);
        this.loading = false;
        this.$store.commit("setWindowSizeHeightAdd");
        this.selectionClear();
      });
    },
  },
    }
  }
};
</script>