|
|
@@ -0,0 +1,146 @@
|
|
|
+<template>
|
|
|
+ <div>
|
|
|
+ <el-dialog title="选择审核人员" :visible.sync="visible" top="5vh" width="800px">
|
|
|
+ <el-form label-width="110px" ref="EntityForm" :model="formData">
|
|
|
+ <el-row :gutter="10">
|
|
|
+ <el-col :span="12">
|
|
|
+ <el-card style="width: 100%;height: calc(100vh - 253px);overflow: auto">
|
|
|
+ <div slot="header" class="clearfix">
|
|
|
+ <span>请选择部门</span>
|
|
|
+ </div>
|
|
|
+ <el-tree :data="orgtreelist" :props="orgtreeprops" @node-click="handleNodeClick"></el-tree>
|
|
|
+ </el-card>
|
|
|
+ </el-col>
|
|
|
+
|
|
|
+ <el-col :span="12">
|
|
|
+ <el-card style="width: 100%;height: calc(100vh - 253px);overflow: auto">
|
|
|
+ <div slot="header" class="clearfix">
|
|
|
+ <span>
|
|
|
+ 请选择用户
|
|
|
+ </span>
|
|
|
+ <span style="float: right;">
|
|
|
+ <el-button style="float: right;margin-top: -10px" type="text" @click="toggleSelection">确定</el-button>
|
|
|
+ </span>
|
|
|
+ </div>
|
|
|
+ <el-form :model="AuditorForm" label-width="90px" size="mini">
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="24">
|
|
|
+ <el-select v-model="AuditorForm.UserId" clearable style="width:100%" placeholder="请选择">
|
|
|
+ <el-option v-for="item in userOptions" :label="item.realname" :value="item.id" :key="item.id">
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ </el-form>
|
|
|
+ </el-card>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ </el-form>
|
|
|
+ </el-dialog>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script>
|
|
|
+ import {
|
|
|
+ mapGetters
|
|
|
+ } from 'vuex'
|
|
|
+ import api from '@/api/system/auditsetting'
|
|
|
+ import ElCol from "../../../node_modules/element-ui/packages/col/src/col";
|
|
|
+ import ElIcon from "../../../node_modules/element-ui/packages/icon/src/icon";
|
|
|
+ export default {
|
|
|
+ components: {
|
|
|
+ ElIcon,
|
|
|
+ ElCol
|
|
|
+ },
|
|
|
+ computed: {
|
|
|
+ ...mapGetters({
|
|
|
+ authUser: 'authUser'
|
|
|
+ })
|
|
|
+ },
|
|
|
+ name: 'chooseAuditor',
|
|
|
+ props: {
|
|
|
+ visible: {
|
|
|
+ type: Boolean,
|
|
|
+ default: false
|
|
|
+ }
|
|
|
+ },
|
|
|
+ watch: {
|
|
|
+ visible(val) {
|
|
|
+ this.selfVisible = val
|
|
|
+ if (this.visible) {
|
|
|
+ this.createoptions
|
|
|
+ }
|
|
|
+ },
|
|
|
+ selfVisible(val) {
|
|
|
+ this.$emit('update:visible', val)
|
|
|
+ }
|
|
|
+ },
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ userOptions: [],
|
|
|
+ orgtreelist: [],
|
|
|
+ orgtreeprops: {
|
|
|
+ value: 'id',
|
|
|
+ label: 'Fullname',
|
|
|
+ children: 'children'
|
|
|
+ },
|
|
|
+ formData: {
|
|
|
+ },
|
|
|
+ AuditorForm: {
|
|
|
+ UserId: ''
|
|
|
+ },
|
|
|
+ selfVisible: this.visible, // 避免vue双向绑定警告
|
|
|
+ SupplierTypeCode: ''
|
|
|
+ }
|
|
|
+ },
|
|
|
+ created() {
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ getorgtreelist(SupplierTypeCode) {
|
|
|
+ let _this = this
|
|
|
+ let params = {
|
|
|
+ IsInnerOrganize: 1,
|
|
|
+ ParentId: 100000180,
|
|
|
+ }
|
|
|
+ _this.$axios.get('organizes/listbydeptid', {
|
|
|
+ params
|
|
|
+ })
|
|
|
+ .then(res => {
|
|
|
+ _this.orgtreelist = window.toolfun_gettreejson(res.data.items, 'Id', 'Parentid', 'Id,Fullname')
|
|
|
+ _this.SupplierTypeCode = SupplierTypeCode
|
|
|
+ if (SupplierTypeCode == '01') { //物资类
|
|
|
+ _this.handleNodeClick(_this.orgtreelist[0].children[11])
|
|
|
+ } else if (SupplierTypeCode == '02') { //基建类
|
|
|
+ _this.handleNodeClick(_this.orgtreelist[0].children[17])
|
|
|
+ } else {
|
|
|
+ _this.handleNodeClick(_this.orgtreelist[0].children[0])
|
|
|
+ }
|
|
|
+ })
|
|
|
+ .catch(err => {
|
|
|
+ console.error(err)
|
|
|
+ })
|
|
|
+ },
|
|
|
+ handleNodeClick(data) {
|
|
|
+ this.userOptions = []
|
|
|
+ api.getAuditerByDept(data.id, this.$axios).then(res => {
|
|
|
+ if (res.data.code === 1) {
|
|
|
+ this.userOptions = res.data.item
|
|
|
+ if (res.data.item.length > 0) {
|
|
|
+ this.AuditorForm.UserId = res.data.item[0].id
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }).catch(err => {
|
|
|
+ console.error(err)
|
|
|
+ })
|
|
|
+ },
|
|
|
+ toggleSelection() {
|
|
|
+ this.$emit('close', this.AuditorForm.UserId)
|
|
|
+ },
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+</script>
|
|
|
+
|
|
|
+<style lang="scss">
|
|
|
+
|
|
|
+</style>
|