guanqb
2024-01-31 f22707cc667d94c44f753fe5f842a64e4f5c1ad8
提交改成保存
5 files modified
170 ■■■■■ changed files
src/views/cGovernance/taskECall.vue 2 ●●● patch | view | raw | blame | history
src/views/property/companyManage.vue 11 ●●●●● patch | view | raw | blame | history
src/views/resource/distapch.vue 6 ●●●● patch | view | raw | blame | history
src/views/resource/oss.vue 2 ●●● patch | view | raw | blame | history
src/views/system/email.vue 149 ●●●●● patch | view | raw | blame | history
src/views/cGovernance/taskECall.vue
@@ -215,7 +215,7 @@
                {
                    label: "事发位置",
                    prop: "location",
                    submitBtn: "提交",
                    submitBtn: "保存",
                    hide: true,
                    type: 'map',
                    dataType: "string",
src/views/property/companyManage.vue
@@ -142,10 +142,7 @@
    created () {
        this.initBasicInfo()
        let param = {
            subclassName: '基础信息'
        }
        this.questionBankOnLoad(this.page, param)
        this.questionBankOnLoad(this.page)
    },
    methods: {
@@ -165,7 +162,6 @@
                        message: "操作成功!",
                    })
                    this.initBasicInfo()
                    done()
                },
                (error) => {
                    window.console.log(error)
@@ -175,7 +171,7 @@
        },
        // 获取题目
        questionBankOnLoad (page, params = {}) {
        questionBankOnLoad (page, params = { subclassName: '基础信息' }) {
            getList(
                page.currentPage,
                page.pageSize,
@@ -198,6 +194,7 @@
                        type: "success",
                        message: "操作成功!",
                    })
                    this.questionBankOnLoad(this.page)
                },
                (error) => {
                    window.console.log(error)
@@ -213,7 +210,7 @@
            this.questionBankOnLoad(this.page, param)
        },
        // 提交按钮
        // 保存按钮
        handleSubmit () {
            // 保存基本信息
            this.saveBasicInfo()
src/views/resource/distapch.vue
@@ -326,7 +326,7 @@
                code: '',
            },
            debugOption: {
                submitText: "提交",
                submitText: "保存",
                column: [
                    {
                        label: "资源编号",
@@ -389,7 +389,7 @@
    methods: {
        changeCron(val){
             console.log("===>",val);
            console.log("===>", val)
        },
        rowSave (row, done, loading) {
@@ -533,7 +533,7 @@
        },
        handlerClick(){
            console.log("111")
            this.cronPopover = true;
            this.cronPopover = true
        }
    }
}
src/views/resource/oss.vue
@@ -188,7 +188,7 @@
                code: '',
            },
            debugOption: {
                submitText: "提交",
                submitText: "保存",
                column: [
                    {
                        label: "资源编号",
src/views/system/email.vue
@@ -1,29 +1,11 @@
<template>
  <basic-container>
    <avue-crud :option="option"
               :table-loading="loading"
               :data="data"
               :page.sync="page"
               :permission="permissionList"
               :before-open="beforeOpen"
               v-model="form"
               ref="crud"
               @row-update="rowUpdate"
               @row-save="rowSave"
               @row-del="rowDel"
               @search-change="searchChange"
               @search-reset="searchReset"
               @selection-change="selectionChange"
               @current-change="currentChange"
               @size-change="sizeChange"
               @refresh-change="refreshChange"
               @on-load="onLoad">
        <avue-crud :option="option" :table-loading="loading" :data="data" :page.sync="page" :permission="permissionList"
            :before-open="beforeOpen" v-model="form" ref="crud" @row-update="rowUpdate" @row-save="rowSave"
            @row-del="rowDel" @search-change="searchChange" @search-reset="searchReset" @selection-change="selectionChange"
            @current-change="currentChange" @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.email_delete"
                <el-button type="danger" size="small" icon="el-icon-delete" plain v-if="permission.email_delete"
                   @click="handleDelete">删 除
        </el-button>
      </template>
@@ -54,8 +36,8 @@
</template>
<script>
import {getList, getDetail, add, update, remove, enable, sendEmail} from "@/api/system/email";
  import {mapGetters} from "vuex";
import { getList, getDetail, add, update, remove, enable, sendEmail } from "@/api/system/email"
import { mapGetters } from "vuex"
  export default {
    data() {
@@ -70,7 +52,8 @@
          total: 0
        },
        selectionList: [],
        option: {height:'auto',
            option: {
                height: 'auto',
          calcHeight: 30,
          tip: false,
          searchShow: true,
@@ -137,13 +120,14 @@
              editDisplay: false,
              viewDisplay: false,
            },
          ]},
                ]
            },
        data: [],
        debugForm: {},
        debugOption: {
          submitText: "提交",
                submitText: "保存",
          column: [
            {
              label: "收件人",
@@ -166,7 +150,7 @@
          ]
        }
      };
        }
    },
    computed: {
      ...mapGetters(["permission","userInfo"]),
@@ -176,14 +160,14 @@
          viewBtn: this.vaildData(this.permission.email_view, false),
          delBtn: this.vaildData(this.permission.email_delete, false),
          editBtn: this.vaildData(this.permission.email_edit, false)
        };
            }
      },
      ids() {
        let ids = [];
            let ids = []
        this.selectionList.forEach(ele => {
          ids.push(ele.id);
        });
        return ids.join(",");
                ids.push(ele.id)
            })
            return ids.join(",")
      }
    },
    methods: {
@@ -196,35 +180,35 @@
          this.$message({
            type: "success",
            message: "发送成功!"
          });
                })
        })
        done()
      },
      rowSave(row, done, loading) {
        add(row).then(() => {
          this.onLoad(this.page);
                this.onLoad(this.page)
          this.$message({
            type: "success",
            message: "操作成功!"
          });
          done();
                })
                done()
        }, error => {
          loading();
          window.console.log(error);
        });
                loading()
                window.console.log(error)
            })
      },
      rowUpdate(row, index, done, loading) {
        update(row).then(() => {
          this.onLoad(this.page);
                this.onLoad(this.page)
          this.$message({
            type: "success",
            message: "操作成功!"
          });
          done();
                })
                done()
        }, error => {
          loading();
          console.log(error);
        });
                loading()
                console.log(error)
            })
      },
      rowDel(row) {
        this.$confirm("确定将选择数据删除?", {
@@ -233,15 +217,15 @@
          type: "warning"
        })
          .then(() => {
            return remove(row.id);
                    return remove(row.id)
          })
          .then(() => {
            this.onLoad(this.page);
                    this.onLoad(this.page)
            this.$message({
              type: "success",
              message: "操作成功!"
            });
          });
                    })
                })
      },
      handleDebug (row) {
        console.log(row,"++++++++++")
@@ -267,8 +251,8 @@
      },
      handleDelete() {
        if (this.selectionList.length === 0) {
          this.$message.warning("请选择至少一条数据");
          return;
                this.$message.warning("请选择至少一条数据")
                return
        }
        this.$confirm("确定将选择数据删除?", {
          confirmButtonText: "确定",
@@ -276,64 +260,63 @@
          type: "warning"
        })
          .then(() => {
            return remove(this.ids);
                    return remove(this.ids)
          })
          .then(() => {
            this.onLoad(this.page);
                    this.onLoad(this.page)
            this.$message({
              type: "success",
              message: "操作成功!"
            });
            this.$refs.crud.toggleSelection();
          });
                    })
                    this.$refs.crud.toggleSelection()
                })
      },
      beforeOpen(done, type) {
        if (["edit", "view"].includes(type)) {
          getDetail(this.form.id).then(res => {
            this.form = res.data.data;
          });
                    this.form = res.data.data
                })
        }
        done();
            done()
      },
      searchReset() {
        this.query = {};
        this.onLoad(this.page);
            this.query = {}
            this.onLoad(this.page)
      },
      searchChange(params, done) {
        this.query = params;
        this.page.currentPage = 1;
        this.onLoad(this.page, params);
        done();
            this.query = params
            this.page.currentPage = 1
            this.onLoad(this.page, params)
            done()
      },
      selectionChange(list) {
        this.selectionList = list;
            this.selectionList = list
      },
      selectionClear() {
        this.selectionList = [];
        this.$refs.crud.toggleSelection();
            this.selectionList = []
            this.$refs.crud.toggleSelection()
      },
      currentChange(currentPage){
        this.page.currentPage = currentPage;
            this.page.currentPage = currentPage
      },
      sizeChange(pageSize){
        this.page.pageSize = pageSize;
            this.page.pageSize = pageSize
      },
      refreshChange() {
        this.onLoad(this.page, this.query);
            this.onLoad(this.page, this.query)
      },
      onLoad(page, params = {}) {
        this.loading = true;
            this.loading = true
        getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
          const data = res.data.data;
          this.page.total = data.total;
          this.data = data.records;
          this.loading = false;
          this.selectionClear();
        });
                const data = res.data.data
                this.page.total = data.total
                this.data = data.records
                this.loading = false
                this.selectionClear()
            })
      }
    }
  };
}
</script>
<style>
</style>
<style></style>