小小儁爺
2024-08-08 d20654ba067e5c0621d4d7d95915cbe47a10fe87
src/views/basicSettings/userList.vue
@@ -6,7 +6,7 @@
        <el-button v-waves type="primary" icon="el-icon-circle-plus-outline" @click="add('add')">新增</el-button>
        <div style="display: flex">
          <el-button v-waves icon="el-icon-menu" @click="workingTramClick">生产班组</el-button>
          <!--          <el-button v-waves icon="el-icon-menu" @click="workingTramClick">生产班组</el-button>-->
          <el-button v-waves icon="el-icon-download" @click="upload">导入</el-button>
        </div>
      </div>
@@ -323,7 +323,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>
              </div>
            </template>
@@ -704,7 +704,7 @@
import { StorgGroupSelect } from '@/api/basicInfo'
export default {
  name: 'YYQD',
  name: 'UserList',
  components: {
    Pagination, ImportPicker, TableColumnSettings
  },
@@ -1110,17 +1110,17 @@
      this.usergroupArr = res
    },
    // 新增按钮
    add(operation) {
    async add(operation) {
      this.operation = operation
      this.dialogVisible = true
      // this.dialogForm.StuOrg = getCookie('stu_torgcode')
      // this.$refs.dialogCascader.checkedValue = [getCookie('stu_torgcode')]
      this.getUserOrganization2()
      await this.getUserOrganization2()
      if (this.$store.state.settings.orgType !== '') {
        this.getStorgGroupSelect(getCookie('stu_torgcode'), this.StuOrgArr2.find(i => i.code === getCookie('stu_torgcode')) ? 'D' : 'W')
        await this.getStorgGroupSelect(getCookie('stu_torgcode'), this.StuOrgArr2.find(i => i.code === getCookie('stu_torgcode')) ? 'D' : 'W')
      }
    },
    // 修改按钮
@@ -1146,13 +1146,16 @@
      this.getUserOrganization2()
    },
    // 删除按钮
    async del(id) {
    async del(row) {
      if (getCookie('admin') === row.usercode) {
        return this.$message.info('无法删除用户本身!')
      }
      this.$confirm('是否确认删除?', '提示', {
        confirmButtonText: '确定',
        cancelButtonText: '取消',
        type: 'warning'
      }).then(() => {
        DeleteUser({ Userid: id }).then(res => {
        DeleteUser({ Userid: row.id }).then(res => {
          if (res.code === '200') {
            this.$message.success('删除成功!')
            if (this.form.page > 1 && this.tableData.length === 1) {