马宇豪
2025-03-04 509f1d71c91242b11fd287cfcdeafe3d19b2d807
src/views/system/dept/index.vue
@@ -57,18 +57,18 @@
      :tree-props="{children: 'children', hasChildren: 'hasChildren'}"
    >
      <el-table-column prop="deptName" label="组织架构名称"></el-table-column>
      <el-table-column prop="orderNum" label="排序" width="200"></el-table-column>
      <el-table-column prop="status" label="状态" width="200">
      <el-table-column prop="orderNum" label="排序" width="50"></el-table-column>
      <el-table-column prop="status" label="状态" width="70">
        <template slot-scope="scope">
          <dict-tag :options="dict.type.sys_normal_disable" :value="scope.row.status"/>
        </template>
      </el-table-column>
      <el-table-column label="创建时间" align="center" prop="createTime" width="200">
      <el-table-column label="创建时间" align="center" prop="createTime" width="160">
        <template slot-scope="scope">
          <span>{{ parseTime(scope.row.createTime) }}</span>
        </template>
      </el-table-column>
      <el-table-column label="操作" align="center" class-name="small-padding" width="200">
      <el-table-column label="操作" align="center" class-name="small-padding" width="160">
        <template slot-scope="scope">
          <el-button
            size="mini"
@@ -285,7 +285,8 @@
        leader: undefined,
        phone: undefined,
        email: undefined,
        status: "0"
        status: "0",
        districtCode: undefined
      };
      this.resetForm("form");
    },
@@ -320,6 +321,9 @@
      listDept().then(response => {
        this.deptOptions = this.handleTree(response.data, "deptId");
      })
    },
    changeDistrict(val){
      console.log(val,'val')
    },
    /** 展开/折叠操作 */
    toggleExpandAll() {
@@ -378,6 +382,11 @@
    getDistrict(val){
      const t = this
      t.form.districtCode = t.findCodeById(t.deptOptions,val)
      if(t.form.districtCode == '65'){
        t.disableChange = false
      }else{
        t.disableChange = true
      }
    },
    findCodeById(data,id){
      for(let node of data){