小小儁爺
2024-08-08 d20654ba067e5c0621d4d7d95915cbe47a10fe87
src/views/basicSettings/organizationList.vue
@@ -168,7 +168,7 @@
                  />
                </el-tooltip>
                <el-tooltip v-del-tab-index class="item" effect="dark" content="删除" placement="top">
                  <i :style="{color:$store.state.settings.theme}" class="el-icon-delete" @click="del(row.id)" />
                  <i :style="{color:$store.state.settings.theme}" class="el-icon-delete" @click="del(row)" />
                </el-tooltip>
                <!--                <el-button type="primary" size="mini" />-->
                <!--                <el-button type="danger" size="mini">删除</el-button>-->
@@ -184,7 +184,7 @@
        :page.sync="form.page"
        :limit.sync="form.rows"
        align="right"
        layout="total ,prev, pager, next,sizes"
        layout="total ,prev, pager, next, sizes,jumper "
        popper-class="select_bottom"
        @pagination="getOrganizationSearch"
      />
@@ -220,7 +220,7 @@
        <el-form-item label="组织名称" prop="OrgName">
          <el-input v-model="dialogForm.OrgName" style="width: 200px" />
        </el-form-item>
        <el-form-item v-if="dialogForm.OrgType!=='部门'" prop="SupUnit" label="上级单位">
        <el-form-item v-if="dialogForm.OrgType!=='部门'&&$store.state.settings.orgType===''" prop="SupUnit" label="上级单位">
          <el-select
            v-model="dialogForm.SupUnit"
            style="width: 200px"
@@ -265,7 +265,7 @@
// const SER_HZ = /^[\u4e00-\u9fa5]+$/
// const SER_HZ = /^[a-zA-Z0-9_;,.<>() ]{0,}$/
export default {
  name: 'ZZJG',
  name: 'OrganizationList',
  components: {
    Pagination, TableColumnSettings
  },
@@ -474,9 +474,9 @@
    handleRequest() {
      this.getOrganizationSearch().then(res => {
        if (res.code === '200') {
          this.getPrentOrganization()
        }
        // if (res.code === '200') {
        //   this.getPrentOrganization()
        // }
      })
    },
    async getOrganizationSearch() {
@@ -523,6 +523,8 @@
        return this.$message.info('当前用户无新增权限!')
      }
      await this.getPrentOrganization()
      this.operation = operation
      this.dialogVisible = true
@@ -531,11 +533,11 @@
      // this.numvalue = res.numvalue
    },
    // 修改按钮
    edit(operation, row) {
    async  edit(operation, row) {
      if (this.$store.state.settings.orgType === 'W') {
        return this.$message.info('当前用户无修改权限!')
      }
      await this.getPrentOrganization()
      this.operation = operation
      this.dialogVisible = true
      // if (row.description === 'F') {
@@ -552,14 +554,13 @@
      //   this.dialogForm.OrgType = '生产线'
      // }
      this.$nextTick(() => {
        this.changeRadio(this.dialogForm.OrgType)
        this.dialogForm.OrgCode = row.org_code
        this.dialogForm.OrgName = row.org_name
        this.dialogForm.SupUnit = row.parent_id
      })
    },
    // 删除按钮
    async del(id) {
    async del(row) {
      if (this.$store.state.settings.orgType === 'W') {
        return this.$message.info('当前用户无删除权限!')
      }
@@ -569,7 +570,7 @@
        cancelButtonText: '取消',
        type: 'warning'
      }).then(() => {
        DeleteOrganization({ orgid: id }).then(res => {
        DeleteOrganization({ orgid: row.id, orgcode: row.org_code }).then(res => {
          if (res.code === '200') {
            this.$message.success('删除成功!')
            if (this.form.page > 1 && this.tableData.length === 1) {