luoyb
2024-04-06 731b5ead2f69151e8c53906068de13b4a4acaf07
src/views/user/outemployess.vue
@@ -1013,6 +1013,17 @@
                placeholder="选择打开日期"
              />
            </el-form-item>
            <el-form-item label="部门(护卫点)" required message="请选择部门(护卫点)" prop="allDeptName">
              <treeselect
                v-model="baseicInformationForm.deptId"
                :multiple="false"
                :options="depts"
                :clear-value-text="$t('common.clear')"
                placeholder="请选择部门(护卫点)"
                style="width:100%"
                @select="DeptNameSelect"
              />
            </el-form-item>
            <el-form-item label="备注说明">
              <el-input v-model="baseicInformationForm.remark" type="textarea" :rows="4" />
            </el-form-item>
@@ -1241,9 +1252,11 @@
<script>
import Pagination from '@/components/Pagination'
import ArchivesChange from './archivesChange'
import Treeselect from '@riophae/vue-treeselect'
export default {
  components: {
    Treeselect,
    ArchivesChange,
    Pagination
  },
@@ -1275,6 +1288,7 @@
        size: 15,
        num: 1
      },
      depts: [],
      headerHeight: '30px',
      advancedQueryShow: false,
      dialogTableVisible: false,
@@ -1328,8 +1342,26 @@
    this.getDicts('certificateList').then(response => {
      this.certificateListOptions = response.data
    })
    this.initDept()
  },
  methods: {
    initDept() {
      this.$get('system/dept').then((r) => {
        this.depts = r.data.data.rows
        this.deptTree = this.depts
      }).catch((error) => {
        console.error(error)
        this.$message({
          message: this.$t('tips.getDataFail'),
          type: 'error'
        })
      })
    },
    DeptNameSelect(val) {
      this.baseicInformationForm.deptId = val.deptId
      this.baseicInformationForm.deptName = val.label
      this.baseicInformationForm.allDeptName = val.allDeptName
    },
    exportExcel() {
      this.queryParams.baseKey = this.queryParams.vague
      var params = this.queryParams
@@ -1512,7 +1544,9 @@
            var id = selection[0].empId
            var name = selection[0].empName
            var number = selection[0].certificateNumb
            var deptName = selection[0].allDeptName
            var deptName = selection[0].deptName
            var deptId = selection[0].deptId
            var allDeptName = selection[0].allDeptName
            const nowDate = new Date()
            const year = nowDate.getFullYear()
            const month = nowDate.getMonth() + 1
@@ -1524,7 +1558,9 @@
              openType: 21,
              openDate: year + '-' + month + '-' + day,
              remark: '',
              allDeptName: deptName
              deptId: deptId,
              deptName: deptName,
              allDeptName: allDeptName
            }
            this.dialogShowDkda = true
          } else {