ZhangXianQiang
2024-05-24 aa05304d221b1883d746e686f390d6f3fba598a7
src/views/system/unit/index.vue
@@ -44,6 +44,7 @@
          icon="el-icon-plus"
          size="mini"
          @click="handleAdd"
          v-hasPermi="['unit:add']"
        >新增</el-button>
      </el-col>
      <el-col :span="1.5">
@@ -54,6 +55,7 @@
          size="mini"
          :disabled="single"
          @click="handleUpdate"
          v-hasPermi="['unit:edit']"
        >修改</el-button>
      </el-col>
      <el-col :span="1.5">
@@ -64,6 +66,7 @@
          size="mini"
          :disabled="multiple"
          @click="handleDelete"
          v-hasPermi="['unit:remove']"
        >删除</el-button>
      </el-col>
      <el-col :span="1.5">
@@ -73,6 +76,7 @@
          icon="el-icon-download"
          size="mini"
          @click="handleExport"
          v-hasPermi="['unit:export']"
        >导出</el-button>
      </el-col>
      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
@@ -94,12 +98,14 @@
            type="text"
            icon="el-icon-edit"
            @click="handleUpdate(scope.row)"
            v-hasPermi="['unit:edit']"
          >修改</el-button>
          <el-button
            size="mini"
            type="text"
            icon="el-icon-delete"
            @click="handleDelete(scope.row)"
            v-hasPermi="['unit:remove']"
          >删除</el-button>
        </template>
      </el-table-column>
@@ -123,7 +129,7 @@
          <el-input v-model="form.unitName" placeholder="请输入单位名称" />
        </el-form-item>
        <el-form-item label="单位账号" prop="unitAdminAccount">
          <el-input v-model="form.unitAdminAccount" placeholder="请输入单位管理员账号" />
          <el-input v-model="form.unitAdminAccount" placeholder="请输入单位管理员账号" :disabled="account" />
        </el-form-item>
        <el-form-item label="单位联系人" prop="unitContact">
          <el-input v-model="form.unitContact" placeholder="请输入单位联系人" />
@@ -150,6 +156,8 @@
  name: "Unit",
  data() {
    return {
      // 账号不可修改
      account: true,
      // 遮罩层
      loading: true,
      // 选中数组
@@ -261,6 +269,8 @@
    /** 重置按钮操作 */
    resetQuery() {
      this.daterangeCreateTime = [];
      this.queryParams.start = null;
      this.queryParams.end = null;
      this.resetForm("queryForm");
      this.handleQuery();
    },
@@ -272,12 +282,14 @@
    },
    /** 新增按钮操作 */
    handleAdd() {
      this.account = false;
      this.reset();
      this.open = true;
      this.title = "添加运维单位";
    },
    /** 修改按钮操作 */
    handleUpdate(row) {
      this.account = true;
      this.reset();
      const id = row.id || this.ids
      getUnit(id).then(response => {
@@ -318,7 +330,7 @@
    },
    /** 导出按钮操作 */
    handleExport() {
      this.download('system/unit/export', {
      this.download('yw-unit/export', {
        ...this.queryParams
      }, `unit_${new Date().getTime()}.xlsx`)
    }