yijiusmile
2021-01-28 a94cc24363a6b6a210c0a3598c6745e2e4c1ae0b
增加岗位管理
1个文件已修改
68 ■■■■■ 已修改文件
src/views/febs/system/dept/Index.vue 68 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/febs/system/dept/Index.vue
@@ -22,20 +22,13 @@
              </el-dropdown-menu>
            </el-dropdown>
          </div>
          <el-tree
            ref="deptTree"
            :data="deptTree"
            :check-strictly="true"
            show-checkbox
            accordion
            node-key="id"
            highlight-current
            :filter-node-method="filterNode"
            @node-click="nodeClick"
          />
          <el-tree ref="deptTree" :data="deptTree" :check-strictly="true" show-checkbox accordion node-key="id"
            highlight-current :filter-node-method="filterNode" @node-click="nodeClick" />
        </div>
      </el-col>
      <el-col :xs="24" :sm="12">
        <el-tabs v-model="activeName">
          <el-tab-pane label="部门信息" name="first">
        <el-card class="box-card">
          <div slot="header" class="clearfix">
            <span>{{ dept.deptId === '' ? this.$t('common.add') : this.$t('common.edit') }}</span>
@@ -43,14 +36,8 @@
          <div>
            <el-form ref="form" :model="dept" :rules="rules" label-position="right" label-width="100px">
              <el-form-item :label="$t('table.dept.parentId')" prop="parentId">
                <treeselect
                  v-model="dept.parentId"
                  :multiple="false"
                  :options="deptTree"
                  :clear-value-text="$t('common.clear')"
                  placeholder=" "
                  style="width:100%"
                />
                    <treeselect v-model="dept.parentId" :multiple="false" :options="deptTree" :clear-value-text="$t('common.clear')"
                      placeholder=" " style="width:100%" />
              </el-form-item>
              <el-form-item :label="$t('table.dept.deptName')" prop="deptName">
                <el-input v-model="dept.deptName" />
@@ -68,6 +55,19 @@
            </el-col>
          </el-row>
        </el-card>
          </el-tab-pane>
          <el-tab-pane label="岗位信息" name="second">
            <el-button type="danger">添加岗位</el-button>
            <el-button type="primary">删除岗位</el-button>
            <el-table :data="jobData" style="width: 100%">
              <el-table-column prop="prop0" label="" width="180" />
              <el-table-column prop="prop1" label="序号" width="180" />
              <el-table-column prop="prop2" label="岗位名称" width="180" />
              <el-table-column prop="prop3" label="在岗人数" width="180" />
            </el-table>
          </el-tab-pane>
        </el-tabs>
      </el-col>
    </el-row>
  </div>
@@ -78,17 +78,29 @@
export default {
  name: 'DeptManager',
  components: { Treeselect },
    components: {
      Treeselect
    },
  data() {
    return {
        activeName: 'first',
      deptName: '',
      buttonLoading: false,
      deptTree: [],
      dept: this.initDept(),
        jobData:[{"prop0":"","prop1":"1","prop2":"市场部总监","prop3":"1"},{"prop0":"","prop1":"2","prop2":"市场部经理","prop3":"2"},{"prop0":"","prop1":"3","prop2":"高级客户经理","prop3":"5"},{"prop0":"","prop1":"4","prop2":"客户经理","prop3":"10"},{"prop0":"","prop1":"5","prop2":"销售内勤","prop3":"1"},{"prop0":"","prop1":"6","prop2":"销售助理","prop3":"1"}],
      rules: {
        deptName: [
          { required: true, message: this.$t('rules.require'), trigger: 'blur' },
          { min: 3, max: 10, message: this.$t('rules.range3to10'), trigger: 'blur' }
          deptName: [{
              required: true,
              message: this.$t('rules.require'),
              trigger: 'blur'
            },
            {
              min: 3,
              max: 10,
              message: this.$t('rules.range3to10'),
              trigger: 'blur'
            }
        ]
      }
    }
@@ -179,7 +191,8 @@
          this.buttonLoading = true
          this.dept.createTime = this.dept.modifyTime = null
          if (this.dept.deptId) {
            this.$put('system/dept', { ...this.dept }).then(() => {
              this.$put('system/dept', { ...this.dept
              }).then(() => {
              this.buttonLoading = false
              this.$message({
                message: this.$t('tips.updateSuccess'),
@@ -188,7 +201,8 @@
              this.reset()
            })
          } else {
            this.$post('system/dept', { ...this.dept }).then(() => {
              this.$post('system/dept', { ...this.dept
              }).then(() => {
              this.buttonLoading = false
              this.$message({
                message: this.$t('tips.createSuccess'),
@@ -213,16 +227,20 @@
<style lang="scss" scoped>
  .dept {
    margin: 10px;
    .app-container {
      margin: 0 0 10px 0 !important;
    }
  }
  .el-card.is-always-shadow {
    box-shadow: none;
  }
  .el-card {
    border-radius: 0;
    border: none;
    .el-card__header {
      padding: 10px 20px !important;
      border-bottom: 1px solid #f1f1f1 !important;