南昌市物联网技防平台-前端
Administrator
2021-03-24 93becd8d57e767db902ba7cb9adc428745263d9b
src/views/parcel/parcel.vue
@@ -18,7 +18,22 @@
               @size-change="sizeChange"
               @refresh-change="refreshChange"
               @on-load="onLoad">
      <template slot="menu">
        <el-button type="text" @click="dialogVisible=true">点击打开 Dialog</el-button>
        <el-dialog title="提示" :visible.sync="dialogVisible" width="30%" :before-close="handleClose">
          <span>这是一段信息</span>
          <span slot="footer" class="dialog-footer">
            <el-button @click="dialogVisible = false">取 消</el-button>
            <el-button type="primary" @click="dialogVisible = false">确 定</el-button>
          </span>
        </el-dialog>
      </template>
    </avue-crud>
  </basic-container>
</template>
@@ -32,6 +47,7 @@
        form: {},
        query: {},
        loading: true,
        dialogVisible: false,
        page: {
          pageSize: 10,
          currentPage: 1,
@@ -50,7 +66,7 @@
          viewBtn: true,
          selection: true,
          labelWidth:120,
          menuWidth:120,
          menuWidth:220,
          dialogClickModal: false,
          headerAlign: 'center',
          align: 'center',
@@ -152,7 +168,7 @@
      permissionList() {
        return {
          addBtn: this.vaildData(null, false),
          viewBtn: this.vaildData(this.permission.parcel_pic_view, true),
          viewBtn: this.vaildData(null, false),
          delBtn: this.vaildData(null, false),
          editBtn: this.vaildData(null, false)
        };
@@ -167,8 +183,9 @@
    },
    methods: {
      beforeOpen(done, type) {
        if (["edit", "view"].includes(type)) {
          getDetail(this.form.id).then(res => {
        console.log(type);
        if (["view"].includes(type)) {
          getDetail(this.form.imgUrl).then(res => {
            this.form = res.data.data;
          });
        }
@@ -200,6 +217,13 @@
      refreshChange() {
        this.onLoad(this.page, this.query);
      },
      handleClose(done) {
        this.$confirm('确认关闭?')
          .then(_ => {
            done();
          })
          .catch(_ => {});
      },
      onLoad(page, params = {}) {
        debugger;
        const { dateTime } = this.query;