|  | @@ -0,0 +1,421 @@
 | 
	
		
			
				|  |  | +<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"
 | 
	
		
			
				|  |  | +               @resetColumn="resetColumnTwo('crud', 'option', 'optionBack', 297)"
 | 
	
		
			
				|  |  | +               @saveColumn="saveColumnTwo('crud', 'option', 'optionBack', 297)"
 | 
	
		
			
				|  |  | +               @on-load="onLoad">
 | 
	
		
			
				|  |  | +      <template slot="menuLeft">
 | 
	
		
			
				|  |  | +        <el-button type="danger"
 | 
	
		
			
				|  |  | +                   size="small"
 | 
	
		
			
				|  |  | +                   icon="el-icon-delete"
 | 
	
		
			
				|  |  | +                   plain
 | 
	
		
			
				|  |  | +                   v-if="permission.blocations_delete"
 | 
	
		
			
				|  |  | +                   @click="handleDelete">删 除
 | 
	
		
			
				|  |  | +        </el-button>
 | 
	
		
			
				|  |  | +      </template>
 | 
	
		
			
				|  |  | +    </avue-crud>
 | 
	
		
			
				|  |  | +  </basic-container>
 | 
	
		
			
				|  |  | +</template>
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +<script>
 | 
	
		
			
				|  |  | +  import {getBlocationsList, getBlocationsDetail, addBlocations, updateBlocations, removeBlocations} from "@/api/iosBasicData/blocations";
 | 
	
		
			
				|  |  | +  import {mapGetters} from "vuex";
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +  export default {
 | 
	
		
			
				|  |  | +    data() {
 | 
	
		
			
				|  |  | +      return {
 | 
	
		
			
				|  |  | +        form: {},
 | 
	
		
			
				|  |  | +        query: {},
 | 
	
		
			
				|  |  | +        loading: true,
 | 
	
		
			
				|  |  | +        page: {
 | 
	
		
			
				|  |  | +          pageSize: 10,
 | 
	
		
			
				|  |  | +          currentPage: 1,
 | 
	
		
			
				|  |  | +          total: 0
 | 
	
		
			
				|  |  | +        },
 | 
	
		
			
				|  |  | +        selectionList: [],
 | 
	
		
			
				|  |  | +        option: {},
 | 
	
		
			
				|  |  | +        optionBack: {
 | 
	
		
			
				|  |  | +          height:'auto',
 | 
	
		
			
				|  |  | +          calcHeight: 30,
 | 
	
		
			
				|  |  | +          tip: false,
 | 
	
		
			
				|  |  | +          searchShow: true,
 | 
	
		
			
				|  |  | +          searchMenuSpan: 6,
 | 
	
		
			
				|  |  | +          border: true,
 | 
	
		
			
				|  |  | +          index: true,
 | 
	
		
			
				|  |  | +          viewBtn: true,
 | 
	
		
			
				|  |  | +          selection: true,
 | 
	
		
			
				|  |  | +          dialogClickModal: false,
 | 
	
		
			
				|  |  | +          column: [
 | 
	
		
			
				|  |  | +            // {
 | 
	
		
			
				|  |  | +            //   label: "主键",
 | 
	
		
			
				|  |  | +            //   prop: "id",
 | 
	
		
			
				|  |  | +            //   rules: [{
 | 
	
		
			
				|  |  | +            //     required: true,
 | 
	
		
			
				|  |  | +            //     message: "请输入主键",
 | 
	
		
			
				|  |  | +            //     trigger: "blur"
 | 
	
		
			
				|  |  | +            //   }]
 | 
	
		
			
				|  |  | +            // },
 | 
	
		
			
				|  |  | +            // {
 | 
	
		
			
				|  |  | +            //   label: "创建人 Id",
 | 
	
		
			
				|  |  | +            //   prop: "createUser",
 | 
	
		
			
				|  |  | +            //   rules: [{
 | 
	
		
			
				|  |  | +            //     required: true,
 | 
	
		
			
				|  |  | +            //     message: "请输入创建人 Id",
 | 
	
		
			
				|  |  | +            //     trigger: "blur"
 | 
	
		
			
				|  |  | +            //   }]
 | 
	
		
			
				|  |  | +            // },
 | 
	
		
			
				|  |  | +            // {
 | 
	
		
			
				|  |  | +            //   label: "创建人",
 | 
	
		
			
				|  |  | +            //   prop: "createUserName",
 | 
	
		
			
				|  |  | +            //   rules: [{
 | 
	
		
			
				|  |  | +            //     required: true,
 | 
	
		
			
				|  |  | +            //     message: "请输入创建人",
 | 
	
		
			
				|  |  | +            //     trigger: "blur"
 | 
	
		
			
				|  |  | +            //   }]
 | 
	
		
			
				|  |  | +            // },
 | 
	
		
			
				|  |  | +            // {
 | 
	
		
			
				|  |  | +            //   label: "创建部门 Id",
 | 
	
		
			
				|  |  | +            //   prop: "createDept",
 | 
	
		
			
				|  |  | +            //   rules: [{
 | 
	
		
			
				|  |  | +            //     required: true,
 | 
	
		
			
				|  |  | +            //     message: "请输入创建部门 Id",
 | 
	
		
			
				|  |  | +            //     trigger: "blur"
 | 
	
		
			
				|  |  | +            //   }]
 | 
	
		
			
				|  |  | +            // },
 | 
	
		
			
				|  |  | +            // {
 | 
	
		
			
				|  |  | +            //   label: "创建部门",
 | 
	
		
			
				|  |  | +            //   prop: "createDeptName",
 | 
	
		
			
				|  |  | +            //   rules: [{
 | 
	
		
			
				|  |  | +            //     required: true,
 | 
	
		
			
				|  |  | +            //     message: "请输入创建部门",
 | 
	
		
			
				|  |  | +            //     trigger: "blur"
 | 
	
		
			
				|  |  | +            //   }]
 | 
	
		
			
				|  |  | +            // },
 | 
	
		
			
				|  |  | +            // {
 | 
	
		
			
				|  |  | +            //   label: "创建时间",
 | 
	
		
			
				|  |  | +            //   prop: "createTime",
 | 
	
		
			
				|  |  | +            //   rules: [{
 | 
	
		
			
				|  |  | +            //     required: true,
 | 
	
		
			
				|  |  | +            //     message: "请输入创建时间",
 | 
	
		
			
				|  |  | +            //     trigger: "blur"
 | 
	
		
			
				|  |  | +            //   }]
 | 
	
		
			
				|  |  | +            // },
 | 
	
		
			
				|  |  | +            // {
 | 
	
		
			
				|  |  | +            //   label: "修改人 Id",
 | 
	
		
			
				|  |  | +            //   prop: "updateUser",
 | 
	
		
			
				|  |  | +            //   rules: [{
 | 
	
		
			
				|  |  | +            //     required: true,
 | 
	
		
			
				|  |  | +            //     message: "请输入修改人 Id",
 | 
	
		
			
				|  |  | +            //     trigger: "blur"
 | 
	
		
			
				|  |  | +            //   }]
 | 
	
		
			
				|  |  | +            // },
 | 
	
		
			
				|  |  | +            // {
 | 
	
		
			
				|  |  | +            //   label: "修改人",
 | 
	
		
			
				|  |  | +            //   prop: "updateUserName",
 | 
	
		
			
				|  |  | +            //   rules: [{
 | 
	
		
			
				|  |  | +            //     required: true,
 | 
	
		
			
				|  |  | +            //     message: "请输入修改人",
 | 
	
		
			
				|  |  | +            //     trigger: "blur"
 | 
	
		
			
				|  |  | +            //   }]
 | 
	
		
			
				|  |  | +            // },
 | 
	
		
			
				|  |  | +            // {
 | 
	
		
			
				|  |  | +            //   label: "修改时间",
 | 
	
		
			
				|  |  | +            //   prop: "updateTime",
 | 
	
		
			
				|  |  | +            //   rules: [{
 | 
	
		
			
				|  |  | +            //     required: true,
 | 
	
		
			
				|  |  | +            //     message: "请输入修改时间",
 | 
	
		
			
				|  |  | +            //     trigger: "blur"
 | 
	
		
			
				|  |  | +            //   }]
 | 
	
		
			
				|  |  | +            // },
 | 
	
		
			
				|  |  | +            {
 | 
	
		
			
				|  |  | +              label: "港口编码",
 | 
	
		
			
				|  |  | +              prop: "code",
 | 
	
		
			
				|  |  | +              search: true,
 | 
	
		
			
				|  |  | +              rules: [{
 | 
	
		
			
				|  |  | +                required: true,
 | 
	
		
			
				|  |  | +                message: "请输入港口编码",
 | 
	
		
			
				|  |  | +                trigger: "blur"
 | 
	
		
			
				|  |  | +              }]
 | 
	
		
			
				|  |  | +            },
 | 
	
		
			
				|  |  | +            {
 | 
	
		
			
				|  |  | +              label: "中文名称",
 | 
	
		
			
				|  |  | +              prop: "cnName",
 | 
	
		
			
				|  |  | +              search: true,
 | 
	
		
			
				|  |  | +              rules: [{
 | 
	
		
			
				|  |  | +                required: true,
 | 
	
		
			
				|  |  | +                message: "请输入中文名称",
 | 
	
		
			
				|  |  | +                trigger: "blur"
 | 
	
		
			
				|  |  | +              }]
 | 
	
		
			
				|  |  | +            },
 | 
	
		
			
				|  |  | +            {
 | 
	
		
			
				|  |  | +              label: "英文名称",
 | 
	
		
			
				|  |  | +              prop: "enName",
 | 
	
		
			
				|  |  | +              search: true,
 | 
	
		
			
				|  |  | +              rules: [{
 | 
	
		
			
				|  |  | +                required: true,
 | 
	
		
			
				|  |  | +                message: "请输入英文名称",
 | 
	
		
			
				|  |  | +                trigger: "blur"
 | 
	
		
			
				|  |  | +              }]
 | 
	
		
			
				|  |  | +            },
 | 
	
		
			
				|  |  | +            {
 | 
	
		
			
				|  |  | +              label: "国家地区代码",
 | 
	
		
			
				|  |  | +              prop: "cntyCode",
 | 
	
		
			
				|  |  | +              search: true,
 | 
	
		
			
				|  |  | +              // rules: [{
 | 
	
		
			
				|  |  | +              //   required: true,
 | 
	
		
			
				|  |  | +              //   message: "请输入国家地区代码",
 | 
	
		
			
				|  |  | +              //   trigger: "blur"
 | 
	
		
			
				|  |  | +              // }]
 | 
	
		
			
				|  |  | +            },
 | 
	
		
			
				|  |  | +            {
 | 
	
		
			
				|  |  | +              label: "国家地区名称,英文",
 | 
	
		
			
				|  |  | +              prop: "cntyName",
 | 
	
		
			
				|  |  | +              search: true,
 | 
	
		
			
				|  |  | +              // rules: [{
 | 
	
		
			
				|  |  | +              //   required: true,
 | 
	
		
			
				|  |  | +              //   message: "请输入国家地区名称,英文",
 | 
	
		
			
				|  |  | +              //   trigger: "blur"
 | 
	
		
			
				|  |  | +              // }]
 | 
	
		
			
				|  |  | +            },
 | 
	
		
			
				|  |  | +            {
 | 
	
		
			
				|  |  | +              label: "州代码",
 | 
	
		
			
				|  |  | +              prop: "stateCode",
 | 
	
		
			
				|  |  | +              search: true,
 | 
	
		
			
				|  |  | +              // rules: [{
 | 
	
		
			
				|  |  | +              //   required: true,
 | 
	
		
			
				|  |  | +              //   message: "请输入州代码",
 | 
	
		
			
				|  |  | +              //   trigger: "blur"
 | 
	
		
			
				|  |  | +              // }]
 | 
	
		
			
				|  |  | +            },
 | 
	
		
			
				|  |  | +            {
 | 
	
		
			
				|  |  | +              label: "州名称,英文",
 | 
	
		
			
				|  |  | +              prop: "stateName",
 | 
	
		
			
				|  |  | +              search: true,
 | 
	
		
			
				|  |  | +              // rules: [{
 | 
	
		
			
				|  |  | +              //   required: true,
 | 
	
		
			
				|  |  | +              //   message: "请输入州名称,英文",
 | 
	
		
			
				|  |  | +              //   trigger: "blur"
 | 
	
		
			
				|  |  | +              // }]
 | 
	
		
			
				|  |  | +            },
 | 
	
		
			
				|  |  | +            {
 | 
	
		
			
				|  |  | +              label: "版本",
 | 
	
		
			
				|  |  | +              prop: "version",
 | 
	
		
			
				|  |  | +              display:false,
 | 
	
		
			
				|  |  | +              // rules: [{
 | 
	
		
			
				|  |  | +              //   required: true,
 | 
	
		
			
				|  |  | +              //   message: "请输入版本",
 | 
	
		
			
				|  |  | +              //   trigger: "blur"
 | 
	
		
			
				|  |  | +              // }]
 | 
	
		
			
				|  |  | +            },
 | 
	
		
			
				|  |  | +            {
 | 
	
		
			
				|  |  | +              label: "状态",
 | 
	
		
			
				|  |  | +              prop: "status",
 | 
	
		
			
				|  |  | +              type: "select",
 | 
	
		
			
				|  |  | +              dicData:[{
 | 
	
		
			
				|  |  | +                label:'启用',
 | 
	
		
			
				|  |  | +                value:0
 | 
	
		
			
				|  |  | +              },{
 | 
	
		
			
				|  |  | +                label:'停用',
 | 
	
		
			
				|  |  | +                value:1
 | 
	
		
			
				|  |  | +              }],
 | 
	
		
			
				|  |  | +              value: 0
 | 
	
		
			
				|  |  | +            },
 | 
	
		
			
				|  |  | +            // {
 | 
	
		
			
				|  |  | +            //   label: "是否已删除(0 否 1是)",
 | 
	
		
			
				|  |  | +            //   prop: "isDeleted",
 | 
	
		
			
				|  |  | +            //   rules: [{
 | 
	
		
			
				|  |  | +            //     required: true,
 | 
	
		
			
				|  |  | +            //     message: "请输入是否已删除(0 否 1是)",
 | 
	
		
			
				|  |  | +            //     trigger: "blur"
 | 
	
		
			
				|  |  | +            //   }]
 | 
	
		
			
				|  |  | +            // },
 | 
	
		
			
				|  |  | +            {
 | 
	
		
			
				|  |  | +              label: "备注",
 | 
	
		
			
				|  |  | +              prop: "remarks",
 | 
	
		
			
				|  |  | +              // rules: [{
 | 
	
		
			
				|  |  | +              //   required: true,
 | 
	
		
			
				|  |  | +              //   message: "请输入备注",
 | 
	
		
			
				|  |  | +              //   trigger: "blur"
 | 
	
		
			
				|  |  | +              // }]
 | 
	
		
			
				|  |  | +            },
 | 
	
		
			
				|  |  | +          ]
 | 
	
		
			
				|  |  | +        },
 | 
	
		
			
				|  |  | +        data: []
 | 
	
		
			
				|  |  | +      };
 | 
	
		
			
				|  |  | +    },
 | 
	
		
			
				|  |  | +    computed: {
 | 
	
		
			
				|  |  | +      ...mapGetters(["permission"]),
 | 
	
		
			
				|  |  | +      permissionList() {
 | 
	
		
			
				|  |  | +        return {
 | 
	
		
			
				|  |  | +          // addBtn: this.vaildData(this.permission.blocations_add, false),
 | 
	
		
			
				|  |  | +          // viewBtn: this.vaildData(this.permission.blocations_view, false),
 | 
	
		
			
				|  |  | +          // delBtn: this.vaildData(this.permission.blocations_delete, false),
 | 
	
		
			
				|  |  | +          // editBtn: this.vaildData(this.permission.blocations_edit, false)
 | 
	
		
			
				|  |  | +        };
 | 
	
		
			
				|  |  | +      },
 | 
	
		
			
				|  |  | +      ids() {
 | 
	
		
			
				|  |  | +        let ids = [];
 | 
	
		
			
				|  |  | +        this.selectionList.forEach(ele => {
 | 
	
		
			
				|  |  | +          ids.push(ele.id);
 | 
	
		
			
				|  |  | +        });
 | 
	
		
			
				|  |  | +        return ids.join(",");
 | 
	
		
			
				|  |  | +      }
 | 
	
		
			
				|  |  | +    },
 | 
	
		
			
				|  |  | +    async created() {
 | 
	
		
			
				|  |  | +        this.option = await this.getColumnData(this.getColumnName(297), this.optionBack);
 | 
	
		
			
				|  |  | +    },
 | 
	
		
			
				|  |  | +    methods: {
 | 
	
		
			
				|  |  | +      rowSave(row, done, loading) {
 | 
	
		
			
				|  |  | +        addBlocations(row).then(() => {
 | 
	
		
			
				|  |  | +          this.onLoad(this.page);
 | 
	
		
			
				|  |  | +          this.$message({
 | 
	
		
			
				|  |  | +            type: "success",
 | 
	
		
			
				|  |  | +            message: "操作成功!"
 | 
	
		
			
				|  |  | +          });
 | 
	
		
			
				|  |  | +          done();
 | 
	
		
			
				|  |  | +        }, error => {
 | 
	
		
			
				|  |  | +          loading();
 | 
	
		
			
				|  |  | +          window.console.log(error);
 | 
	
		
			
				|  |  | +        });
 | 
	
		
			
				|  |  | +      },
 | 
	
		
			
				|  |  | +      rowUpdate(row, index, done, loading) {
 | 
	
		
			
				|  |  | +        updateBlocations(row).then(() => {
 | 
	
		
			
				|  |  | +          this.onLoad(this.page);
 | 
	
		
			
				|  |  | +          this.$message({
 | 
	
		
			
				|  |  | +            type: "success",
 | 
	
		
			
				|  |  | +            message: "操作成功!"
 | 
	
		
			
				|  |  | +          });
 | 
	
		
			
				|  |  | +          done();
 | 
	
		
			
				|  |  | +        }, error => {
 | 
	
		
			
				|  |  | +          loading();
 | 
	
		
			
				|  |  | +          console.log(error);
 | 
	
		
			
				|  |  | +        });
 | 
	
		
			
				|  |  | +      },
 | 
	
		
			
				|  |  | +      rowDel(row) {
 | 
	
		
			
				|  |  | +        this.$confirm("确定将选择数据删除?", {
 | 
	
		
			
				|  |  | +          confirmButtonText: "确定",
 | 
	
		
			
				|  |  | +          cancelButtonText: "取消",
 | 
	
		
			
				|  |  | +          type: "warning"
 | 
	
		
			
				|  |  | +        })
 | 
	
		
			
				|  |  | +          .then(() => {
 | 
	
		
			
				|  |  | +            return removeBlocations(row.id);
 | 
	
		
			
				|  |  | +          })
 | 
	
		
			
				|  |  | +          .then(() => {
 | 
	
		
			
				|  |  | +            this.onLoad(this.page);
 | 
	
		
			
				|  |  | +            this.$message({
 | 
	
		
			
				|  |  | +              type: "success",
 | 
	
		
			
				|  |  | +              message: "操作成功!"
 | 
	
		
			
				|  |  | +            });
 | 
	
		
			
				|  |  | +          });
 | 
	
		
			
				|  |  | +      },
 | 
	
		
			
				|  |  | +      handleDelete() {
 | 
	
		
			
				|  |  | +        if (this.selectionList.length === 0) {
 | 
	
		
			
				|  |  | +          this.$message.warning("请选择至少一条数据");
 | 
	
		
			
				|  |  | +          return;
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +        this.$confirm("确定将选择数据删除?", {
 | 
	
		
			
				|  |  | +          confirmButtonText: "确定",
 | 
	
		
			
				|  |  | +          cancelButtonText: "取消",
 | 
	
		
			
				|  |  | +          type: "warning"
 | 
	
		
			
				|  |  | +        })
 | 
	
		
			
				|  |  | +          .then(() => {
 | 
	
		
			
				|  |  | +            return removeBlocations(this.ids);
 | 
	
		
			
				|  |  | +          })
 | 
	
		
			
				|  |  | +          .then(() => {
 | 
	
		
			
				|  |  | +            this.onLoad(this.page);
 | 
	
		
			
				|  |  | +            this.$message({
 | 
	
		
			
				|  |  | +              type: "success",
 | 
	
		
			
				|  |  | +              message: "操作成功!"
 | 
	
		
			
				|  |  | +            });
 | 
	
		
			
				|  |  | +            this.$refs.crud.toggleSelection();
 | 
	
		
			
				|  |  | +          });
 | 
	
		
			
				|  |  | +      },
 | 
	
		
			
				|  |  | +      beforeOpen(done, type) {
 | 
	
		
			
				|  |  | +        if (["edit", "view"].includes(type)) {
 | 
	
		
			
				|  |  | +          getBlocationsDetail(this.form.id).then(res => {
 | 
	
		
			
				|  |  | +            this.form = res.data.data;
 | 
	
		
			
				|  |  | +          });
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +        done();
 | 
	
		
			
				|  |  | +      },
 | 
	
		
			
				|  |  | +      searchReset() {
 | 
	
		
			
				|  |  | +        this.query = {};
 | 
	
		
			
				|  |  | +        this.onLoad(this.page);
 | 
	
		
			
				|  |  | +      },
 | 
	
		
			
				|  |  | +      searchChange(params, done) {
 | 
	
		
			
				|  |  | +        this.query = params;
 | 
	
		
			
				|  |  | +        this.page.currentPage = 1;
 | 
	
		
			
				|  |  | +        this.onLoad(this.page, params);
 | 
	
		
			
				|  |  | +        done();
 | 
	
		
			
				|  |  | +      },
 | 
	
		
			
				|  |  | +      selectionChange(list) {
 | 
	
		
			
				|  |  | +        this.selectionList = list;
 | 
	
		
			
				|  |  | +      },
 | 
	
		
			
				|  |  | +      selectionClear() {
 | 
	
		
			
				|  |  | +        this.selectionList = [];
 | 
	
		
			
				|  |  | +        this.$refs.crud.toggleSelection();
 | 
	
		
			
				|  |  | +      },
 | 
	
		
			
				|  |  | +      currentChange(currentPage){
 | 
	
		
			
				|  |  | +        this.page.currentPage = currentPage;
 | 
	
		
			
				|  |  | +      },
 | 
	
		
			
				|  |  | +      sizeChange(pageSize){
 | 
	
		
			
				|  |  | +        this.page.pageSize = pageSize;
 | 
	
		
			
				|  |  | +      },
 | 
	
		
			
				|  |  | +      refreshChange() {
 | 
	
		
			
				|  |  | +        this.onLoad(this.page, this.query);
 | 
	
		
			
				|  |  | +      },
 | 
	
		
			
				|  |  | +      onLoad(page, params = {}) {
 | 
	
		
			
				|  |  | +        this.loading = true;
 | 
	
		
			
				|  |  | +        getBlocationsList(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();
 | 
	
		
			
				|  |  | +        });
 | 
	
		
			
				|  |  | +      },
 | 
	
		
			
				|  |  | +      //自定义列保存
 | 
	
		
			
				|  |  | +      async saveColumnTwo(ref, option, optionBack, code) {
 | 
	
		
			
				|  |  | +            /**
 | 
	
		
			
				|  |  | +             * 已定义全局方法,直接使用,saveColumnData保存列数据方法,参数传值(表格名称,当前表格的option数据)
 | 
	
		
			
				|  |  | +             * 已定义全局方法,直接使用,getColumnName方法用来获取枚举值,参数根据自己定义的code值获取中文名
 | 
	
		
			
				|  |  | +             * 一定要执行异步操作,要等接口成功返回,才能执行下一行代码
 | 
	
		
			
				|  |  | +             */
 | 
	
		
			
				|  |  | +            const inSave = await this.saveColumnData(this.getColumnName(code), this[option]);
 | 
	
		
			
				|  |  | +            if (inSave) {
 | 
	
		
			
				|  |  | +                this.$message.success("保存成功");
 | 
	
		
			
				|  |  | +                //关闭窗口
 | 
	
		
			
				|  |  | +                this.$refs[ref].$refs.dialogColumn.columnBox = false;
 | 
	
		
			
				|  |  | +            }
 | 
	
		
			
				|  |  | +      },
 | 
	
		
			
				|  |  | +        //自定义列重置
 | 
	
		
			
				|  |  | +      async resetColumnTwo(ref, option, optionBack, code) {
 | 
	
		
			
				|  |  | +            this[option] = this[optionBack];
 | 
	
		
			
				|  |  | +            const inSave = await this.delColumnData(this.getColumnName(code), this[optionBack]);
 | 
	
		
			
				|  |  | +            if (inSave) {
 | 
	
		
			
				|  |  | +                this.$message.success("重置成功");
 | 
	
		
			
				|  |  | +                this.$refs[ref].$refs.dialogColumn.columnBox = false;
 | 
	
		
			
				|  |  | +            }
 | 
	
		
			
				|  |  | +      }
 | 
	
		
			
				|  |  | +    }
 | 
	
		
			
				|  |  | +  };
 | 
	
		
			
				|  |  | +</script>
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +<style>
 | 
	
		
			
				|  |  | +</style>
 |