提交修改代码

This commit is contained in:
zhujiyan
2024-05-09 13:46:20 +08:00
parent 6076cec029
commit eeef608ccd
8 changed files with 535 additions and 404 deletions

View File

@@ -7,6 +7,7 @@
:destroy-on-close="true" :destroy-on-close="true"
@ok="handleOk" @ok="handleOk"
@cancel="handleClose" @cancel="handleClose"
:append-to-body="true"
> >
<el-row :gutter="10"> <el-row :gutter="10">
<el-col :span="7"> <el-col :span="7">

View File

@@ -0,0 +1,22 @@
<template>
<div class="nav_title" :style="{ borderLeft: `4px solid ${borderColor}` }">
<p><slot name="nav_name"></slot></p>
</div>
</template>
<script setup>
import { useConfig } from '@/stores/config'
import { ref } from 'vue'
const configStore = useConfig()
const borderColor =configStore.getColorVal('elementUiPrimary')
</script>
<style lang="scss" scoped>
.nav_title {
padding-left: 8px;
margin-top: 10px;
p {
font-size: 15px;
color: #212121;
font-weight: 600;
}
}
</style>

View File

@@ -42,8 +42,9 @@
<add-node v-model="childNode.childNode" :parent-data="childNode" /> <add-node v-model="childNode.childNode" :parent-data="childNode" />
</div> </div>
<xn-form-container <formContainer
v-model:visible="drawer" v-model="drawer"
:visible="visible"
:destroy-on-close="true" :destroy-on-close="true"
:width="700" :width="700"
:body-style="{ 'padding-top': '0px' }" :body-style="{ 'padding-top': '0px' }"
@@ -64,7 +65,7 @@
/> />
</div> </div>
</template> </template>
<el-layout-content> <div>
<el-tabs v-model="activeKey"> <el-tabs v-model="activeKey">
<el-tab-pane name="1" label="条件配置" lazy> <el-tab-pane name="1" label="条件配置" lazy>
<el-form layout="vertical"> <el-form layout="vertical">
@@ -199,12 +200,12 @@
/> />
</el-tab-pane> </el-tab-pane>
</el-tabs> </el-tabs>
</el-layout-content> </div>
<template #footer> <template #footer>
<el-button type="primary" style="margin-right: 8px" @click="save">保存</el-button> <el-button type="primary" style="margin-right: 8px" @click="save">保存</el-button>
<el-button @click="drawer = false">取消</el-button> <el-button @click="drawer = false">取消</el-button>
</template> </template>
</xn-form-container> </formContainer>
</div> </div>
</template> </template>
@@ -503,6 +504,7 @@ import tool from '@/utils/tool'
import AddNode from './addNode.vue' import AddNode from './addNode.vue'
import { ref, watch, onMounted } from 'vue' import { ref, watch, onMounted } from 'vue'
import PropListenerInfo from './prop/propListenerInfo.vue' import PropListenerInfo from './prop/propListenerInfo.vue'
import formContainer from '@/components/formContainer/index.vue';
const props = defineProps({ const props = defineProps({
modelValue: { type: Object, default: () => {} }, modelValue: { type: Object, default: () => {} },
formFieldListValue: { type: Array, default: () => [] }, formFieldListValue: { type: Array, default: () => [] },

View File

@@ -2,7 +2,7 @@
<div class="branch-wrap"> <div class="branch-wrap">
<div class="branch-box-wrap"> <div class="branch-box-wrap">
<div class="branch-box"> <div class="branch-box">
<a-button class="add-branch" type="primary" shape="round" @click="addTerm">添加并行</a-button> <el-button class="add-branch" type="primary" shape="round" @click="addTerm">添加并行</el-button>
<div v-for="(item, index) in childNode.conditionNodeList" :key="index" class="col-box"> <div v-for="(item, index) in childNode.conditionNodeList" :key="index" class="col-box">
<div class="condition-node"> <div class="condition-node">
<div class="condition-node-box"> <div class="condition-node-box">

View File

@@ -1,108 +1,117 @@
<template> <template>
<el-dialog <el-dialog
v-model="visible" v-model="visible"
title="表单人员选择" title="表单人员选择"
:mask-closable="false" :mask-closable="false"
:destroy-on-close="true" :destroy-on-close="true"
:width="600" :width="600"
@ok="handleOk" @ok="handleOk"
@cancel="handleCancel" @cancel="handleCancel"
> >
<div class="form-user-table"> <div class="form-user-table">
<el-table <el-table
ref="table" ref="table"
:columns="columns" :columns="columns"
:datel-source="dataSource" :datel-source="dataSource"
:row-key="(record) => record.model" :row-key="record => record.model"
:expand-row-by-click="true" :expand-row-by-click="true"
:row-selection="{ selectedRowKeys: state.selectedRowKeys, onChange: onSelectChange, type: 'radio' }" :row-selection="{ selectedRowKeys: state.selectedRowKeys, onChange: onSelectChange, type: 'radio' }"
:pagination="false" :pagination="false"
size="small" size="small"
bordered bordered
/> />
</div> </div>
</el-dialog> </el-dialog>
</template> </template>
<script setup name="formUserSelector"> <script setup name="formUserSelector">
import workFlowUtils from '@/components/XnWorkflow/nodes/utils/index' import workFlowUtils from '@/components/XnWorkflow/nodes/utils/index'
import { ElMessage } from 'element-plus' import { ElMessage } from 'element-plus'
import {ref,reactive} from 'vue' import { ref, reactive } from 'vue'
const visible = ref(false) const visible = ref(false)
const columns = [ const columns = [
{ {
title: '字段名', title: '字段名',
dataIndex: 'label' dataIndex: 'label'
}, },
{ {
title: '字段', title: '字段',
dataIndex: 'model' dataIndex: 'model'
} }
] ]
// 定义emit事件 // 定义emit事件
const emit = defineEmits({ click: null }) const emit = defineEmits({ click: null })
const props = defineProps(['formFieldList']) const props = defineProps(['formFieldList'])
const dataSource = ref([]) const dataSource = ref([])
dataSource.value = workFlowUtils.getListField(props.formFieldList).filter((f) => { dataSource.value = workFlowUtils
// 判断如果是人员类型的,就让列表显示 .getListField(props.formFieldList)
if (f.type === 'xnUserSelector') { .filter(f => {
return f // 判断如果是人员类型的,就让列表显示
} if (f.type === 'xnUserSelector') {
}).map((m) => { return f
return { }
label: m.label, })
model: m.model, .map(m => {
field: m.model, return {
type: m.type label: m.label,
} model: m.model,
}) field: m.model,
const selectedRowKeys = ref([]) type: m.type
// 设置默认选中的 }
const state = reactive({ })
selectedRowKeys: selectedRowKeys.value, const selectedRowKeys = ref([])
loading: false // 设置默认选中的
}) const state = reactive({
const showFormUserModal = (data = '') => { selectedRowKeys: selectedRowKeys.value,
if (dataSource.value.length === 0) { loading: false
message.warning('表单内无人员可提供选择!') })
return const showFormUserModal = (data = '') => {
} if (dataSource.value.length === 0) {
if (dataSource.value.length === 1) { ElMessage({
emit('click', dataSource.value[0]) message: '表单内无人员可提供选择!',
message.success('表单内仅有一个人员选择,默认选中!') type: 'warning'
} else { })
visible.value = true return
state.selectedRowKeys[0] = data }
} if (dataSource.value.length === 1) {
} emit('click', dataSource.value[0])
// 点击复选框回调 ElMessage({
const onSelectChange = (selectedRowKeys) => { message: '表单内仅有一个人员选择,默认选中!',
state.selectedRowKeys = selectedRowKeys type: 'success'
} })
// 确定 } else {
const handleOk = () => { visible.value = true
const result = dataSource.value.filter((item) => state.selectedRowKeys[0] === item.model) state.selectedRowKeys[0] = data
emit('click', result[0]) }
visible.value = false }
state.selectedRowKeys = [] // 点击复选框回调
} const onSelectChange = selectedRowKeys => {
// 关闭 state.selectedRowKeys = selectedRowKeys
const handleCancel = () => { }
visible.value = false // 确定
} const handleOk = () => {
const result = dataSource.value.filter(item => state.selectedRowKeys[0] === item.model)
emit('click', result[0])
visible.value = false
state.selectedRowKeys = []
}
// 关闭
const handleCancel = () => {
visible.value = false
}
// 抛出方法,让上个界面使用 // 抛出方法,让上个界面使用
defineExpose({ defineExpose({
showFormUserModal showFormUserModal
}) })
</script> </script>
<style lang="less"> <style lang="less">
.form-user-table { .form-user-table {
overflow: auto; overflow: auto;
max-height: 400px; max-height: 400px;
} }
</style> </style>

View File

@@ -1,305 +1,398 @@
<!-- 抄送人组件 -->
<template> <template>
<div class="node-wrap"> <div class="node-wrap">
<div class="node-wrap-box" @click="show"> <div class="node-wrap-box" @click="show">
<div class="title" style="background: #3296fa"> <div class="title" style="background: #3296fa">
<send-outlined class="icon" /> <send-outlined class="icon" />
<span>{{ childNode.title }}</span> <span>{{ childNode.title }}</span>
<close-outlined class="close" @click.stop="delNode()" /> <!-- <close-outlined class="close" /> -->
</div> <el-icon>
<div class="content"> <CloseBold @click="delNode()" />
<span v-if="toText(childNode)">{{ toText(childNode) }}</span> </el-icon>
<span v-else class="placeholder">请选择人员</span> </div>
</div> <div class="content">
</div> <span v-if="toText(childNode)">{{ toText(childNode) }}</span>
<add-node v-model="childNode.childNode"></add-node> <span v-else class="placeholder">请选择人员</span>
<xn-form-container </div>
v-model:visible="drawer" </div>
:destroy-on-close="true" <addNode v-model="childNode.childNode"></addNode>
:width="700" <formContainer
:body-style="{ 'padding-top': '0px' }" v-model="drawer"
> :visibile="drawer"
<template #title> :destroy-on-close="true"
<div class="node-wrap-drawer__title"> :body-style="{ 'padding-top': '0px' }"
<label v-if="!isEditTitle" @click="editTitle" >
>{{ form.title }}<edit-outlined class="node-wrap-drawer-title-edit" /> <template #title>
</label> <div class="node-wrap-drawer__title">
<el-input <label v-if="!isEditTitle" @click="editTitle">
v-if="isEditTitle" {{ form.title }}
ref="nodeTitle" <el-icon>
v-model:value="form.title" <EditPen />
allow-clear </el-icon>
@blur="saveTitle" <!-- <edit-outlined class="node-wrap-drawer-title-edit" /> -->
@keyup.enter="saveTitle" </label>
/> <el-input
</div> v-if="isEditTitle"
</template> ref="nodeTitle"
<el-container> v-model:value="form.title"
<el-tabs v-model="activeKey"> allow-clear
<el-tab-pane name="1" label="抄送配置" lazy> @blur="saveTitle"
<el-form layout="vertical" :model="userTypeForm"> @keyup.enter="saveTitle"
<div v-show="nodeLegal" style="margin-bottom: 10px"> />
<el-alert message="请选择抄送人员!" type="error" /> </div>
</div> </template>
<div class="mb-2"> <div class="tab_container">
<span class="left-span-label">选择要抄送的人员</span> <el-tabs v-model="activeKey">
</div> <el-tab-pane name="1" label="抄送配置" lazy>
<el-radio-group v-model:value="userSelectionType" style="width: 100%"> <el-form layout="vertical" :model="userTypeForm">
<el-row style="padding-bottom: 10px"> <div v-show="nodeLegal" style="margin-bottom: 10px">
<el-col :span="8" v-for="userSelectionType in userSelectionTypeList" :key="userSelectionType.value"> <div class="please_choose">
<el-radio :value="userSelectionType.value" @click="selectionClick(userSelectionType.value)"> <p>请选择抄送人员</p>
{{ userSelectionType.label }} </div>
</el-radio> </div>
</el-col> <div class="mb-2">
</el-row> <navTitle><template #nav_name>选择要抄送的人员</template></navTitle>
</el-radio-group> </div>
<el-form-item v-if="userSelectionType === 'USER'"> <!-- 选择抄送人员 -->
<el-button class="mt-2" type="primary" size="small" round @click="openSelector"> <el-radio-group v-model="userSelectionType" @input="changeRadio" style="width: 100%">
<template #icon> <el-radio
<search-outlined /> v-for="(item, index) in userSelectionTypeList"
</template> :value="item.value"
选择 :key="index"
</el-button> >
<p /> <!-- @click="selectionClick(item.value)" -->
<prop-tag :tag-list="getTagList('USER')" /> {{ item.label }}
</el-form-item> </el-radio>
<el-form-item v-if="recordData.formType === 'DESIGN' && userSelectionType === 'FORM_USER'"> </el-radio-group>
<div class="mt-2"> <el-form-item v-if="userSelectionType === 'USER'">
<el-button type="primary" @click="openSelector" size="small"> <el-button class="mt-2" type="primary" size="small" @click="openSelector">
<template #icon> <template #icon>
<search-outlined /> <el-icon>
</template> <Search />
选择 </el-icon>
</el-button> </template>
</div> 选择
<div class="mt-2"> </el-button>
<prop-tag <p />
v-if="form.properties.participateInfo.length > 0 && form.properties.participateInfo[0].value !== ''" <prop-tag :tag-list="getTagList('USER')" />
:tag-list="form.properties.participateInfo[0]" </el-form-item>
/> <el-form-item v-if="recordData.formType === 'DESIGN' && userSelectionType === 'FORM_USER'">
</div> <div class="mt-2">
</el-form-item> <el-button type="primary" @click="openSelector" size="small">
<el-form-item <template #icon>
class="mt-2" <el-icon>
v-if="recordData.formType === 'DEFINE' && userSelectionType === 'FORM_USER'" <Search />
name="formUser" </el-icon>
:rules="[{ required: true, message: '请输入人员变量' }]" </template>
> 选择
<template #label> </el-button>
<el-tooltip> </div>
<template #title>单个字段可以采用字段名多个采用字段名1,字段名2,字段名3</template> <div class="mt-2">
<question-circle-outlined /> <prop-tag
人员变量 v-if="
</el-tooltip> form.properties.participateInfo.length > 0 &&
</template> form.properties.participateInfo[0].value !== ''
<el-input "
style="width: 50%" :tag-list="form.properties.participateInfo[0]"
v-model:value="userTypeForm.formUser" />
allow-clear </div>
@input="customFormUser" </el-form-item>
@keyup.enter="customFormUser" <!-- 选择人员变量 -->
placeholder="请输入人员变量" <el-form-item
/> class="mt-2"
</el-form-item> v-if="userSelectionType === 'FORM_USER'"
</el-form> name="formUser"
</el-tab-pane> :rules="[{ required: true, message: '请输入人员变量' }]">
<el-tab-pane name="2" label="执行监听" lazy> <!-- recordData.formType === 'DEFINE' && -->
<prop-listener-info <!-- <template #label> -->
ref="propExecutionListenerInfoRef" <!-- <el-tooltip>
v-if="form&&form.properties&&form.properties.executionListenerInfo" <template #title></template>
:listener-value="form.properties.executionListenerInfo" <question-circle-outlined />
:default-listener-list="executionListenerInfo" 人员变量:
:listener-value-array="executionListenerArray" </el-tooltip> -->
/> <!-- </template> -->
</el-tab-pane> <el-tooltip
</el-tabs> content="单个字段可以采用字段名多个采用字段名1,字段名2,字段名3"
</el-container> placement="top-start"
<template #footer> >
<el-button type="primary" style="margin-right: 8px" @click="save">保存</el-button> <span class="user_icon">?</span>
<el-button @click="drawer = false">取消</el-button> <span style="width: 100px;display:block;float: left;">
</template> </span>人员变量:
</xn-form-container> </el-tooltip>
<form-user-selector ref="formUserSelectorRef" :form-field-list="formFieldListValue" @click="userCallBack" /> <el-input
<user-selector-plus v-model="userTypeForm.formUser"
ref="userselectorPlus" clearable
:org-tree-api="selectorApiFunction.orgTreeApi" @input="customFormUser"
:user-page-api="selectorApiFunction.userPageApi" @keyup.enter="customFormUser"
:checked-user-list-api="selectorApiFunction.checkedUserListApi" placeholder="请输入人员变量"
:datel-is-converter-flw="true" />
@onBack="userCallBack" </el-form-item>
/> </el-form>
</div> </el-tab-pane>
<el-tab-pane name="2" label="执行监听" lazy>
<prop-listener-info
ref="propExecutionListenerInfoRef"
v-if="form && form.properties && form.properties.executionListenerInfo"
:listener-value="form.properties.executionListenerInfo"
:default-listener-list="executionListenerInfo"
:listener-value-array="executionListenerArray"
/>
</el-tab-pane>
</el-tabs>
</div>
<template #footer>
<el-button type="primary" style="margin-right: 8px" @click="save">保存</el-button>
<el-button @click="drawer = false">取消</el-button>
</template>
</formContainer>
<form-user-selector ref="formUserSelectorRef" :form-field-list="formFieldListValue" @click="userCallBack" />
<user-selector-plus
ref="userselectorPlus"
:org-tree-api="selectorApiFunction.orgTreeApi"
:user-page-api="selectorApiFunction.userPageApi"
:checked-user-list-api="selectorApiFunction.checkedUserListApi"
:datel-is-converter-flw="true"
@onBack="userCallBack"
/>
</div>
</template> </template>
<script> <script>
import addNode from './addNode.vue' import addNode from './addNode.vue'
import userSelectorPlus from '@/components/Selector/userSelectorPlus.vue' import userSelectorPlus from '@/components/Selector/userSelectorPlus.vue'
import FormUserSelector from './prop/formUserSelector.vue' import FormUserSelector from './prop/formUserSelector.vue'
import propTag from './prop/propTag.vue' import propTag from './prop/propTag.vue'
import { cloneDeep, isEmpty } from 'lodash-es' import { cloneDeep, isEmpty } from 'lodash-es'
import config from '@/components/XnWorkflow/nodes/config/config' import config from '@/components/XnWorkflow/nodes/config/config'
import PropListenerInfo from './prop/propListenerInfo.vue' import PropListenerInfo from './prop/propListenerInfo.vue'
import { CloseBold, EditPen, Search ,InfoFilled} from '@element-plus/icons-vue'
export default { import formContainer from '@/components/formContainer/index.vue'
components: { import navTitle from '../components/navTitle.vue'
FormUserSelector, export default {
addNode, components: {
userSelectorPlus, FormUserSelector,
propTag, addNode,
PropListenerInfo userSelectorPlus,
}, propTag,
props: { PropListenerInfo,
modelValue: { type: Object, default: () => {} }, formContainer,
recordData: { type: Object, default: () => {} }, navTitle,
executionListenerArray: { type: Array, default: () => [] }, CloseBold,
selectorApiFunction: { type: Object, default: () => {} }, EditPen,
formFieldListValue: { type: Array, default: () => [] } Search,
}, InfoFilled
data() { },
return { props: {
childNode: {}, modelValue: { type: Object, default: () => {} },
drawer: false, recordData: { type: Object, default: () => {} },
isEditTitle: false, executionListenerArray: { type: Array, default: () => [] },
activeKey: '1', selectorApiFunction: { type: Object, default: () => {} },
form: {}, formFieldListValue: { type: Array, default: () => [] }
nodeLegal: false, },
userTypeForm: {}, data() {
executionListenerInfo: cloneDeep(config.listener.serviceTaskExecutionListenerInfo), return {
// 用户选择类型 childNode: {},
userSelectionType: '', drawer: false,
userSelectionTypeList: cloneDeep(config.serviceTaskConfig.userSelectionTypeList) isEditTitle: false,
} activeKey: '1',
}, form: {},
watch: { nodeLegal: false,
modelValue() { userTypeForm: {},
this.childNode = this.modelValue executionListenerInfo: cloneDeep(config.listener.serviceTaskExecutionListenerInfo),
} // 用户选择类型
}, userSelectionType: '',
mounted() { userSelectionTypeList: cloneDeep(config.serviceTaskConfig.userSelectionTypeList)
this.childNode = this.modelValue }
}, },
methods: { watch: {
show() { modelValue() {
this.form = {} this.childNode = this.modelValue
this.form = cloneDeep(this.childNode) }
this.drawer = true },
if (!isEmpty(this.form.properties.participateInfo)) { mounted() {
this.userSelectionType = this.form.properties.participateInfo[0].key this.childNode = this.modelValue
// 如果包含表单内的人 },
const formUserObj = this.form.properties.participateInfo.find((f) => f.key === 'FORM_USER') methods: {
if (formUserObj) { show() {
this.userTypeForm.formUser = formUserObj.value this.form = {}
} this.form = cloneDeep(this.childNode)
} else { this.drawer = true
this.userSelectionType = 'USER' if (!isEmpty(this.form.properties.participateInfo)) {
this.userTypeForm = {} this.userSelectionType = this.form.properties.participateInfo[0].key
this.nodeLegal = true // 如果包含表单内的人
} const formUserObj = this.form.properties.participateInfo.find(f => f.key === 'FORM_USER')
}, if (formUserObj) {
editTitle() { this.userTypeForm.formUser = formUserObj.value
this.isEditTitle = true }
this.$nextTick(() => { } else {
this.$refs.nodeTitle.focus() this.userSelectionType = 'USER'
}) this.userTypeForm = {}
}, this.nodeLegal = true
saveTitle() { }
this.isEditTitle = false },
}, editTitle() {
save() { this.isEditTitle = true
if (isEmpty(this.nodeLegal)) { this.$nextTick(() => {
this.form.properties.executionListenerInfo = this.$refs.propExecutionListenerInfoRef.selectedListenerList() this.$refs.nodeTitle.focus()
this.form.dataLegal = true })
this.$emit('update:modelValue', this.form) },
this.drawer = false saveTitle() {
} this.isEditTitle = false
}, },
delNode() { save() {
this.$emit('update:modelValue', this.childNode.childNode) if (isEmpty(this.nodeLegal)) {
}, this.form.properties.executionListenerInfo =
selectHandle(data) { this.$refs.propExecutionListenerInfoRef.selectedListenerList()
this.$refs.userselectorPlus.showUserPlusModal(data) this.form.dataLegal = true
}, this.$emit('update:modelValue', this.form)
// 选择器回调 this.drawer = false
userCallBack(value) { }
if (isEmpty(value.label)) { },
this.nodeLegal = true delNode() {
} else { this.$emit('update:modelValue', this.childNode.childNode)
this.nodeLegal = false },
} selectHandle(data) {
if (this.userSelectionType === 'USER') { this.$refs.userselectorPlus.showUserPlusModal(data)
this.form.properties.participateInfo[0] = value },
} else if (this.userSelectionType === 'FORM_USER') { // 选择器回调
this.form.properties.participateInfo = [ userCallBack(value) {
{ if (isEmpty(value.label)) {
key: 'FORM_USER', this.nodeLegal = true
label: this.userSelectionTypeList.filter((item) => item.value === 'FORM_USER')[0].label, } else {
value: value.model this.nodeLegal = false
} }
] if (this.userSelectionType === 'USER') {
} this.form.properties.participateInfo[0] = value
}, } else if (this.userSelectionType === 'FORM_USER') {
// 获取tag标签的内容 this.form.properties.participateInfo = [
getTagList(type) { {
const participateInfo = this.form.properties.participateInfo key: 'FORM_USER',
if (participateInfo.length > 0) { label: this.userSelectionTypeList.filter(item => item.value === 'FORM_USER')[0].label,
const obj = participateInfo.find((item) => item.key === type) value: value.model
if (isEmpty(obj.label)) { }
return undefined ]
} else { }
return obj },
} // 获取tag标签的内容
} else { getTagList(type) {
return undefined const participateInfo = this.form.properties.participateInfo
} if (participateInfo.length > 0) {
}, const obj = participateInfo.find(item => item.key === type)
// 选择抄送人员类型 if (isEmpty(obj.label)) {
selectionClick(value) { return undefined
this.form.properties.participateInfo = [] } else {
this.userSelectionType = value return obj
this.nodeLegal = true }
}, } else {
// 打开选择器 return undefined
openSelector() { }
let data = this.form.properties.participateInfo },
if (this.userSelectionType === 'USER') { changeRadio() {
this.$refs.userselectorPlus.showUserPlusModal(data) console.log(this.userSelectionType, '99999')
} else if (this.userSelectionType === 'FORM_USER') { this.form.properties.participateInfo = []
this.$refs.formUserSelectorRef.showFormUserModal(data[0]) this.nodeLegal = true
} },
}, // 选择抄送人员类型
// 监听自定义表单人员输入 selectionClick(value) {
customFormUser() { this.form.properties.participateInfo = []
if (this.userTypeForm.formUser) { this.userSelectionType = value
this.form.properties.participateInfo = [ this.nodeLegal = true
{ },
key: 'FORM_USER', // 打开选择器
label: '表单内的人', openSelector() {
value: this.userTypeForm.formUser let data = this.form.properties.participateInfo
} if (this.userSelectionType === 'USER') {
] this.$refs.userselectorPlus.showUserPlusModal(data)
this.nodeLegal = false } else if (this.userSelectionType === 'FORM_USER') {
} else { this.$refs.formUserSelectorRef.showFormUserModal(data[0])
this.nodeLegal = true }
} },
}, // 监听自定义表单人员输入
toText(childNode) { customFormUser() {
if (!isEmpty(childNode)) { // console.log(this.userTypeForm.formUser,"0000000");
const participateInfo = childNode.properties.participateInfo if (this.userTypeForm.formUser) {
if (participateInfo.length > 0) { // this.form.properties.participateInfo = [
let resultArray = [] // {
if (participateInfo[0].label.indexOf(',') !== -1) { // key: 'FORM_USER',
resultArray = participateInfo[0].label.split(',') // label: '表单内的人',
} else { // value: this.userTypeForm.formUser
resultArray.push(participateInfo[0].label) // }
} // ]
return resultArray.toString() this.nodeLegal = false
} else { } else {
// return '未选择抄送人'; this.nodeLegal = true
return false }
} },
} else { toText(childNode) {
return false if (!isEmpty(childNode)) {
} const participateInfo = childNode.properties.participateInfo
} if (participateInfo.length > 0) {
} let resultArray = []
} if (participateInfo[0].label.indexOf(',') !== -1) {
resultArray = participateInfo[0].label.split(',')
} else {
resultArray.push(participateInfo[0].label)
}
return resultArray.toString()
} else {
// return '未选择抄送人';
return false
}
} else {
return false
}
}
}
}
</script> </script>
<style lang="scss" scoped>
.title {
position: relative;
.el-icon {
float: right;
position: absolute;
right: 13px;
top: 6px;
display: none;
}
}
.node-wrap-box:hover {
.el-icon {
display: block;
}
}
.node-wrap-drawer__title {
margin-bottom: 0 !important;
}
.el-tab_container {
width: 100%;
}
.please_choose {
width: 96%;
height: 40px;
margin-top: 20px;
background-color: #fff0f0;
border: 2px solid #ffa39e;
display: flex;
align-items: center;
justify-content: flex-start;
padding: 8px 15px;
p {
font-size: 14px;
font-weight: 400;
}
}
.el-radio-group {
margin: 10px 0;
}
.user_icon{
display: block;
width:18px;
height: 18px;
border:1px solid #000;
border-radius:50%;
font-size: 14px;
line-height: 18px;
text-align: center;
}
</style>

View File

@@ -1,10 +1,10 @@
<template> <template>
<el-dialog v-if="isModal" v-model="visibles" @cancel="cancel" v-bind="$attrs"> <el-dialog v-if="isModal" size="50%" v-model="visibles" @cancel="cancel" v-bind="$attrs" :append-to-body="true">
<template v-for="slotKey in slotKeys" #[slotKey]> <template v-for="slotKey in slotKeys" #[slotKey]>
<slot :name="slotKey" /> <slot :name="slotKey" />
</template> </template>
</el-dialog> </el-dialog>
<el-drawer v-else v-model="visibles" v-bind="$attrs" :footer-style="{ textAlign: 'right' }"> <el-drawer v-else size="50%" v-model="visibles" v-bind="$attrs" :append-to-body="true" :footer-style="{ textAlign: 'right' }">
<template v-for="slotKey in slotKeys" #[slotKey]> <template v-for="slotKey in slotKeys" #[slotKey]>
<slot :name="slotKey" /> <slot :name="slotKey" />
</template> </template>

View File

@@ -196,3 +196,7 @@
.sgmap-ctrl-bottom-left{ .sgmap-ctrl-bottom-left{
display: none !important; display: none !important;
} }
.el-drawer__header{
margin-bottom: 0 !important;
}