| | |
| | | <el-input v-model="form.name" placeholder="请输入姓名" v-trim /> |
| | | </el-form-item> |
| | | <el-form-item label="所属组织" prop="companyId"> |
| | | <el-cascader v-model="form.company" :options="department" @change="handleChangeCompany" :show-all-levels="false" |
| | | clearable filterable :props="departprops"></el-cascader> |
| | | <!-- <el-cascader v-model="form.company" :options="department" @change="handleChangeCompany" :show-all-levels="false" |
| | | clearable filterable :props="departprops"></el-cascader>--> |
| | | <!-- <el-select v-model="form.companyId" clearable filterable placeholder="请选择">--> |
| | | <!-- <template v-for="item in companyList">--> |
| | | <!-- <el-option :key="item.id" :label="item.companyNamePath" :value="item.id">--> |
| | | <!-- </el-option>--> |
| | | <!-- </template>--> |
| | | <!-- </el-select>--> |
| | | <treeselect |
| | | v-model="form.companyId" |
| | | placeholder="请选择" |
| | | :options="treeData" |
| | | :normalizer="normalizeOptions" |
| | | :default-expand-level="1" |
| | | noChildrenText="没有子选项" |
| | | noOptionsText="没有可选项" |
| | | noResultsText="没有匹配的结果" /> |
| | | <div style="font-size: 12px;color: #F56C6C"> |
| | | 注:仅支持选择 【{{ companyType === 0 ? '相关方组织' : '内部组织' }}】 |
| | | </div> |
| | |
| | | import { checkMobile, validIdCardNo, validIdCardNoNew } from '@/utils/form' |
| | | import { allList } from '@/api/business/position' |
| | | import { upload } from '@/api/system/common' |
| | | import {companyGetList} from "@/api/business/company"; |
| | | export default { |
| | | name: 'OperaCompanyWindow', |
| | | extends: BaseOpera, |
| | |
| | | companyType: 0, |
| | | department: [], |
| | | positionList: [], |
| | | companyList: [], |
| | | // 表单数据 |
| | | form: { |
| | | id: null, |
| | |
| | | positionId: null, |
| | | faceImgFull: '' |
| | | }, |
| | | treeData: [], |
| | | // 验证规则 |
| | | rules: { |
| | | name: [{ required: true, message: '请输入员工姓名', trigger: 'blur' }], |
| | |
| | | }) |
| | | }, |
| | | methods: { |
| | | // 规范化选项数据的方法 |
| | | normalizeOptions(node) { |
| | | // node: 原始的选项数据 |
| | | // 在这里根据需要进行选项数据的规范化操作,并返回规范化后的选项数据 |
| | | // 例如,可以将原始的选项数据转换为符合插件要求的结构 |
| | | if (node.childList && !node.childList.length) { |
| | | // 去掉children=[]的children属性 |
| | | delete node.childList; |
| | | } |
| | | return { |
| | | id: node.id, |
| | | label: node.name, |
| | | children: node.childList, |
| | | }; |
| | | }, |
| | | getCompany() { |
| | | companyGetList({ |
| | | model: {type:this.companyType } , |
| | | capacity: 10000, |
| | | page: 1, |
| | | }).then(res => { |
| | | this.companyList = res.records || [] |
| | | |
| | | }) |
| | | }, |
| | | openCamera() { |
| | | this.paisheModal = true |
| | | this.isShowCamera = true |
| | | this.blobFileCamera = '' |
| | | const that = this |
| | | this.$nextTick(() => { |
| | | var mediaOpts = { audio: false, video: true } |
| | |
| | | // 点击拍摄 |
| | | setImage() { |
| | | const that = this |
| | | this.blobFileCamera = '' |
| | | that.isShowCamera = false |
| | | const video = document.querySelector('#videoCamera') |
| | | const canvas = document.querySelector('#canvasCamera') |
| | |
| | | // this.updateImg = false |
| | | this.form.faceImg = res.imgaddr |
| | | this.form.faceImgFull = res.url |
| | | this.isShowCropper = false |
| | | // this.$emit('uploadSuccess', { imgurl: res.imgaddr, imgurlfull: res.url, name: res.originname }) |
| | | // this.$emit('uploadEnd') |
| | | }, () => { |
| | |
| | | faceImgFull: '' |
| | | } |
| | | this.companyType = companyType |
| | | this.getCompany() |
| | | this.getPositionList() |
| | | // 新建 |
| | | if (target == null) { |
| | |
| | | this.form[this.configData['field.id']] = null |
| | | this.form.company = [] |
| | | }) |
| | | |
| | | this.getCompany() |
| | | return |
| | | } |
| | | // 编辑 |