| | |
| | | <el-form-item label="⚙ 选择审批组或审批架构" prop="text" class="user-type"> |
| | | <el-select @change="selected(this,'staff')" value-key="id" style="width: 80%;" size="small" |
| | | v-model="nodeProps.staffGroup" placeholder="请选择审批架构"> |
| | | <el-option v-for="staffApprovals in staffGroups" :label="staffApprovals.name" :value="staffApprovals" |
| | | :key="staffApprovals.id"></el-option> |
| | | <el-option v-for="staff in staffGroups" :label="staff.name" :value="staff" |
| | | :key="staff.id"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-divider></el-divider> |
| | |
| | | </div> |
| | | </template> |
| | | <script> |
| | | //import OrgPicker from "@/components/common/OrgPicker"; |
| | | import {getDict, getEntitySet} from "@/api/design"; |
| | | export default { |
| | | name: "ApprovalNodeConfig", |
| | |
| | | return this.$store.state.selectedNode |
| | | }, |
| | | nodeProps() { |
| | | |
| | | return this.$store.state.selectedNode.props |
| | | }, |
| | | select() { |
| | | console.log("this.config--select", this.config) |
| | | return this.config.assignedUser |
| | | }, |
| | | |
| | |
| | | let template = {"code": "position_sales"} |
| | | getDict(template).then(rsp => { |
| | | this.staffGroups = this.$Utils.decode(rsp.data.data.dictionary.items) |
| | | this.staffGroups.forEach(item => item.name = item.value); |
| | | this.staffGroups.forEach(item => item.id = item.code); |
| | | this.staffGroups.forEach(item => { |
| | | item.name = item.value |
| | | item.id = item.code |
| | | }); |
| | | // this.staffGroups.forEach(item => ); |
| | | }).catch(err => this.$message.error('获取审批流程异常')) |
| | | }, |
| | | //如果切换选箱不是指定节点 那就把之前选择的指定节点信息 给清除掉 避免提交上去 |
| | | setValue() { |
| | | if (this.nodeProps.refuse.type !== 'TO_NODE') { |
| | | this.nodeProps.refuse.target = ''; |
| | | |
| | | } |
| | | }, |
| | | delGroup(index) { |
| | | this.selectedNode.props.groups.splice(index, 1) |
| | | }, |
| | | addConditionGroup() { |
| | | console.log("this.config", this.config) |
| | | this.config.groups.push({ |
| | | }) |
| | | }, |
| | | selected(select, type) { |
| | | console.log("输出选中select", this.nodeProps) |
| | | this.nodeProps.assignedUser = [] |
| | | |
| | | if (type === 'group') { |
| | | this.nodeProps.staffGroup = {} |
| | | this.nodeProps.assignedUser.push({ |
| | |
| | | } |
| | | ) |
| | | } |
| | | console.log("assignedUser", this.config) |
| | | console.log("this.config.props", this.config) |
| | | this.orgPickerSelected.length = 0 |
| | | |
| | | }, |
| | | removeOrgItem(index) { |
| | | this.select.splice(index, 1) |