cfort 2 éve
szülő
commit
206dfd7a30

+ 100 - 55
src/business/platform/form/formbuilder/right-aside/editors/editor-field-selector.vue

@@ -4,34 +4,53 @@
         <div class="panel-body">
             <el-form-item v-if="types.includes('selector_type')" label-width="110px">
                 <template slot="label">选择器类型<help-tip prop="selectorType" /></template>
-                <el-select v-model="fieldOptions.selector_type" style="width: 100%" @change="(val) => selectorChange(val)">
-                    <el-option v-for="option in selectorTypeOptions" :key="option.value" :value="option.value" :label="option.label" />
+                <el-select
+                    v-model="fieldOptions.selector_type"
+                    style="width:100%;"
+                    @change="(val)=>selectorChange(val)"
+                >
+                    <el-option
+                        v-for="option in selectorTypeOptions"
+                        :key="option.value"
+                        :value="option.value"
+                        :label="option.label"
+                    />
                 </el-select>
             </el-form-item>
             <el-form-item v-if="types.includes('multiple')">
                 <template slot="label">是否多选<help-tip prop="multiple" /></template>
                 <el-switch v-model="fieldOptions.multiple" @change="setDefaultValue" />
             </el-form-item>
-            <el-form-item v-if="types.includes('multiple')">
+            <el-form-item v-if="types.includes('filtrate')">
                 <template slot="label">是否过滤</template>
                 <el-switch v-model="fieldOptions.filtrate" @change="setDefaultValue" />
             </el-form-item>
             <!--TODO:选择器范围-->
             <el-form-item v-if="types.includes('selector_type')" label-width="95px">
                 <template slot="label">选择范围<help-tip prop="checkScope" /></template>
-                <el-button icon="el-icon-s-tools" :disabled="(fieldOptions.selector_type === 'user' && fieldOptions.filter.length === 4) || (fieldOptions.selector_type !== 'user' && fieldOptions.filter.length === 1)" type="primary" size="mini" style="font-size: 14px" plain @click="addScope"> 设置 </el-button>
+                <el-button
+                    icon="el-icon-s-tools"
+                    :disabled="(fieldOptions.selector_type==='user'&&fieldOptions.filter.length===4)||(fieldOptions.selector_type!=='user'&&fieldOptions.filter.length===1)"
+                    type="primary"
+                    size="mini"
+                    style="font-size:14px;"
+                    plain
+                    @click="addScope"
+                >
+                    设置
+                </el-button>
             </el-form-item>
             <!--范围  -->
             <el-form-item label-width="95px">
-                <div v-for="(filter, i) in fieldOptions.filter" :key="i" class="list-scope-group-item">
+                <div v-for="(filter,i) in fieldOptions.filter" :key="i" class="list-scope-group-item">
                     <el-row>
                         <!-- <el-col :span="filter.type==='role'?6:filter.type==='user'?18:12"> -->
                         <el-col :span="18">
                             <el-tag v-if="$utils.isNotEmpty(filter.userType)" effect="plain">
-                                {{ filter.userType | optionsFilter(partyTypeOptions, 'label') }}
+                                {{ filter.userType|optionsFilter(partyTypeOptions,'label') }}
                             </el-tag>
-                            <el-tag v-if="$utils.isNotEmpty(filter.descVal)" effect="plain" style="margin-left: 2px">
-                                {{ filter.descVal | optionsFilter(selectorScopeOption, 'label') }}
+                            <el-tag v-if="$utils.isNotEmpty(filter.descVal)" effect="plain" style="margin-left:2px;">
+                                {{ filter.descVal|optionsFilter(selectorScopeOption,'label') }}
                             </el-tag>
 
                             <el-button-group class="actions">
@@ -39,48 +58,73 @@
                                 <el-button size="small" type="text" title="删除" icon="el-icon-delete" @click="removeButton(i)" />
                             </el-button-group>
                             <!-- <el-tag v-if="filter.type!=='role'&&$utils.isNotEmpty(filter.includeSub)" effect="plain" style="margin-left:2px;">
-                {{ filter.includeSub?'含子集':'不含子集' }}
-              </el-tag> -->
+                                {{ filter.includeSub?'含子集':'不含子集' }}
+                            </el-tag> -->
                         </el-col>
                         <!-- <el-col :span="4">
-              <el-button-group class="actions">
-                <el-button size="small" type="text" title="设置" icon="ibps-icon-cog" @click="settingButton(i)" />
-                <el-button size="small" type="text" title="删除" icon="el-icon-delete" @click="removeButton(i)" />
-              </el-button-group>
-            </el-col> -->
+                            <el-button-group class="actions">
+                                <el-button size="small" type="text" title="设置" icon="ibps-icon-cog" @click="settingButton(i)" />
+                                <el-button size="small" type="text" title="删除" icon="el-icon-delete" @click="removeButton(i)" />
+                            </el-button-group>
+                        </el-col> -->
                     </el-row>
                 </div>
             </el-form-item>
             <el-form-item v-if="types.includes('store')">
                 <template slot="label">存储格式<help-tip prop="selectorStore" /></template>
-                <el-select v-model="fieldOptions.store" style="width: 100%" @change="selectorStoreValue">
-                    <el-option v-for="store in selectorStoreOptions" :key="store.value" :value="store.value" :label="store.label" />
+                <el-select
+                    v-model="fieldOptions.store"
+                    style="width:100%;"
+                    @change="selectorStoreValue"
+                >
+                    <el-option
+                        v-for="store in selectorStoreOptions"
+                        :key="store.value"
+                        :value="store.value"
+                        :label="store.label"
+                    />
                 </el-select>
             </el-form-item>
-            <el-form-item v-if="fieldOptions.store === 'bind'">
-                <template slot="label">绑定值<help-tip :prop="fieldOptions.selector_type === 'user' ? 'bind' : 'bindOther'" /></template>
-                <el-select v-model="fieldOptions.bind" style="width: 100%">
-                    <el-option v-for="store in bindValueOptions" :key="store.value" :value="store.value" :label="store.label" /> </el-select
-            ></el-form-item>
-            <el-form-item v-if="fieldOptions.store === 'bind'">
+            <el-form-item v-if="fieldOptions.store==='bind'">
+                <template slot="label">绑定值<help-tip :prop="fieldOptions.selector_type==='user'?'bind':'bindOther'" /></template>
+                <el-select v-model="fieldOptions.bind" style="width:100%;">
+                    <el-option
+                        v-for="store in bindValueOptions"
+                        :key="store.value"
+                        :value="store.value"
+                        :label="store.label"
+                    />
+                </el-select>
+            </el-form-item>
+            <el-form-item v-if="fieldOptions.store==='bind'">
                 <template slot="label">存储字段<help-tip prop="bindFiled" /></template>
                 <ibps-bo-select v-model="fieldItem.bindFiled" :data="boFields" placeholder="请绑定属性" empty-text="未设置存储字段" @change="changeBoName" />
-
                 <!-- <ibps-tree-select
-          v-model="fieldOptions.bindFiled"
-          :data="boTreeData"
-          :props="props"
-          :multiple="false"
-          :allow-selection="changeBoName"
-          node-key="key"
-          empty-text="未设置存储字段"
-          clearable
-          filterable
-        /> -->
+                    v-model="fieldOptions.bindFiled"
+                    :data="boTreeData"
+                    :props="props"
+                    :multiple="false"
+                    :allow-selection="changeBoName"
+                    node-key="key"
+                    empty-text="未设置存储字段"
+                    clearable
+                    filterable
+                /> -->
             </el-form-item>
         </div>
         <!-- // 设置 -->
-        <setting-optional-scope :title="title" :visible="settingOptionalScopeVisible" :data="editData" :bo-data="boData" :readonly="readonly" :button-key="buttonKey" :existing-type-scope="existingTypeScope" :selector-type="fieldOptions.selector_type" @callback="setDataTemplateScopeAttr" @close="(visible) => (settingOptionalScopeVisible = visible)" />
+        <setting-optional-scope
+            :title="title"
+            :visible="settingOptionalScopeVisible"
+            :data="editData"
+            :bo-data="boData"
+            :readonly="readonly"
+            :button-key="buttonKey"
+            :existing-type-scope="existingTypeScope"
+            :selector-type="fieldOptions.selector_type"
+            @callback="setDataTemplateScopeAttr"
+            @close="visible => settingOptionalScopeVisible = visible"
+        />
     </div>
 </template>
 <script>
@@ -105,7 +149,7 @@ export default {
             default: 'selector_type,multiple,store'
         }
     },
-    data() {
+    data () {
         return {
             settingOptionalScopeVisible: false,
             partyTypeOptions: partyTypeOptions,
@@ -126,15 +170,15 @@ export default {
         }
     },
     // computed: {
-    //   boTreeData() {
-    //     return TreeUtils.transformToTreeFormat(this.boData, {
-    //       idKey: 'id',
-    //       pIdKey: 'parentId'
-    //     })
-    //   }
+    //     boTreeData () {
+    //         return TreeUtils.transformToTreeFormat(this.boData, {
+    //             idKey: 'id',
+    //             pIdKey: 'parentId'
+    //         })
+    //     }
     // },
     methods: {
-        changeBoName(value, data) {
+        changeBoName (value, data) {
             if (data.data.key === 'id' || data.data.key === 'parentId') {
                 this.$message({
                     title: '提示',
@@ -151,16 +195,16 @@ export default {
             // console.info(data, this.fieldOptions, '=>>选择器关联表单字段详细信息')
             return true
         },
-        selectorStoreValue(val) {
+        selectorStoreValue (val) {
             // if (val !== 'bind') {
-            //   this.fieldOptions.bind = ''
-            // this.fieldOptions.bindFiled = ''
+            //     this.fieldOptions.bind = ''
+            //     this.fieldOptions.bindFiled = ''
             // }
             // this.fieldOptions.attrType = ''
             // this.fieldOptions.tableName = ''
             // this.fieldOptions.isSub = false
         },
-        selectorChange(val) {
+        selectorChange (val) {
             this.setDefaultValue()
             this.bindValueOptions = val === 'user' ? bindValueEmployeeOptions : bindValueOtherOptions
             this.fieldOptions.bind = 'id'
@@ -169,16 +213,16 @@ export default {
             this.fieldOptions.filter = []
             this.fieldOptions.store = 'id'
         },
-        setDataTemplateScopeAttr(data) {
-            this.buttonKey === 'add' ? (this.fieldOptions.filter = [...this.fieldOptions.filter, ...data]) : (this.fieldOptions.filter[this.editIndex] = data[0])
+        setDataTemplateScopeAttr (data) {
+            this.buttonKey === 'add' ? this.fieldOptions.filter = [...this.fieldOptions.filter, ...data] : this.fieldOptions.filter[this.editIndex] = data[0]
         },
-        settlingDefaultValue() {
+        settlingDefaultValue () {
             if (this.fieldOptions.default_value_type === 'fixed') {
                 this.fieldOptions.default_value = ''
             }
             this.fieldOptions.filter = []
         },
-        addScope() {
+        addScope () {
             this.readonly = false
             this.editData = {}
             this.buttonKey = 'add'
@@ -187,7 +231,7 @@ export default {
             this.settingOptionalScopeVisible = true
         },
         // 设置按钮
-        settingButton(i) {
+        settingButton (i) {
             this.readonly = false
             this.buttonKey = 'setting'
             this.title = '编辑范围'
@@ -197,10 +241,10 @@ export default {
             this.settingOptionalScopeVisible = true
         },
         // 设置类型切换值
-        setTypeOptions() {
+        setTypeOptions () {
             const existingTypeScope = []
             const typeScope = []
-            this.fieldOptions.filter.forEach((f) => {
+            this.fieldOptions.filter.forEach(f => {
                 existingTypeScope.push(f.userType)
             })
             // 根据已选范围动态调整范围下拉数据
@@ -213,9 +257,10 @@ export default {
             this.existingTypeScope = typeScope
         },
         // 删除按钮
-        removeButton(i) {
+        removeButton (i) {
             this.fieldOptions.filter.splice(i, 1)
         }
     }
+
 }
 </script>

+ 7 - 9
src/business/platform/org/employee/selector.vue

@@ -137,9 +137,9 @@ export default {
         }
     },
     methods: {
-    /**
-     * 初始化数据
-     */
+        /**
+         * 初始化数据
+         */
         initData () {
             const data = this.getArrayValue(this.value)
             this.selectorValue = this.multiple ? [] : {}
@@ -170,8 +170,8 @@ export default {
         },
 
         /**
-     * 获得数组数据
-     */
+         * 获得数组数据
+         */
         getArrayValue (value, bindId) {
             if (this.$utils.isEmpty(value)) {
                 return []
@@ -253,8 +253,8 @@ export default {
             return this.getStoreValue(this.selectorValue)
         },
         /**
-     * 通过ID获取数据
-     */
+         * 通过ID获取数据
+         */
         getDataInfo (id) {
             remoteRequest('employee' + this.valueKey, id, () => {
                 return this.getRemoteByIdFunc(id)
@@ -287,7 +287,6 @@ export default {
             })
         },
         // ===================事件处理=========
-
         handleSelectorClick () {
             this.selectorVisible = true
             this.initData()
@@ -300,7 +299,6 @@ export default {
             }
             this.handleInput()
         },
-
         handleSelectorActionEvent (buttonKey, data) {
             switch (buttonKey) {
                 case 'confirm':// 确定

+ 112 - 104
src/business/platform/org/position/panel.vue

@@ -1,18 +1,22 @@
 <template>
     <div>
         <div v-if="toolbars" ref="toolbar" class="ibps-tree-toolbar">
-            <ibps-toolbar :actions="toolbars" type="icon" @action-event="handleTreeAction" />
+            <ibps-toolbar
+                :actions="toolbars"
+                type="icon"
+                @action-event="handleTreeAction"
+            />
         </div>
         <!-- <div ref="searchForm" class="ibps-tree-search-form">
-      <el-row style="padding-right:12px;" :gutter="5">
-        <el-col :span="21">
-          <el-input v-model="filterText" placeholder="请输入岗位名称" clearable />
-        </el-col>
-        <el-col :span="2">
-          <el-button size="small" type="primary" icon="el-icon-search" @click="handleMoreSearch">更多</el-button>
-        </el-col>
-      </el-row>
-    </div> -->
+            <el-row style="padding-right:12px;" :gutter="5">
+                <el-col :span="21">
+                    <el-input v-model="filterText" placeholder="请输入岗位名称" clearable />
+                </el-col>
+                <el-col :span="2">
+                    <el-button size="small" type="primary" icon="el-icon-search" @click="handleMoreSearch">更多</el-button>
+                </el-col>
+            </el-row>
+        </div> -->
         <div :style="{ height: tableHeight + 'px' }">
             <el-scrollbar style="height: 100%" wrap-class="ibps-tree-wrapper ibps-scrollbar-wrapper">
                 <!-- 多选-->
@@ -22,7 +26,7 @@
                     v-loading="loading"
                     :data="treeData"
                     :expand-on-click-node="false"
-                    :props="{ children: 'children', label: 'name', isLeaf: 'leaf' }"
+                    :props="{ children: 'children', label: 'name',isLeaf: 'leaf'}"
                     :load="loadTreeNode"
                     :lazy="lazyTree"
                     :show-checkbox="multiple"
@@ -43,7 +47,7 @@
                     v-loading="loading"
                     :data="treeData"
                     :expand-on-click-node="false"
-                    :props="{ children: 'children', label: 'name', isLeaf: 'leaf' }"
+                    :props="{ children: 'children', label: 'name',isLeaf: 'leaf'}"
                     :load="loadTreeNode"
                     :lazy="lazyTree"
                     node-key="id"
@@ -55,16 +59,29 @@
                     @node-click="onNodeClick"
                 >
                     <span slot-scope="{ node, data }" class="custom-tree-node">
-                        <el-radio v-model="radio" :label="data[pkKey]" :disabled="data.disabled" @change="changeRadio(data)">{{ node.label }}</el-radio>
+                        <el-radio
+                            v-model="radio"
+                            :label="data[pkKey]"
+                            :disabled="data.disabled"
+                            @change="changeRadio(data)"
+                        >{{ node.label }}</el-radio>
                     </span>
                 </el-tree>
             </el-scrollbar>
         </div>
-        <more-search ref="moreSearch" :title="title" :visible="dialogFormVisible" :party-type="partyType" @callback="search" @close="(visible) => (dialogFormVisible = visible)" @action-event="handleMoreSearchAction" />
+        <more-search
+            ref="moreSearch"
+            :title="title"
+            :visible="dialogFormVisible"
+            :party-type="partyType"
+            @callback="search"
+            @close="visible => dialogFormVisible = visible"
+            @action-event="handleMoreSearchAction"
+        />
     </div>
 </template>
 <script>
-import { getScriptValue } from '@/api/platform/form/formDef' // 脚本
+import { getScriptValue } from '@/api/platform/form/formDef'// 脚本
 import { findTreeData as getTreeData } from '@/api/platform/org/position'
 // import { findTreeData as getPositionTreeData } from '@/api/platform/org/entity'
 
@@ -115,7 +132,6 @@ export default {
             lazyTree: true,
             defaultExpandedKeys: ['0'],
             moreSearchParams: {},
-
             radio: '',
             pkKey: 'id', // 主键  如果主键不是pk需要传主键
             loading: false,
@@ -195,72 +211,67 @@ export default {
                 Object.assign(params, this.moreSearchParams)
             }
             if (this.$utils.isEmpty(node.data) || node.data.id === '0') {
-                getTreeData(params)
-                    .then((res) => {
-                        this.loading = false
-                        const arr = JSON.parse(JSON.stringify(res.data))
-                        // 岗位数改成部门树
-                        // 岗位数改成部门树
-                        const arrOne = []
-                        const arrTwo = []
-                        arr.forEach((item) => {
-                            if (item.name === '岗位树') {
-                                item.name = '部门树'
-                                arrOne[0] = item
-                            } else {
-                                arrTwo.push(item)
-                            }
-                        })
-                        let treeData
-                        if (type === '2' || type === '3') {
-                            arrTwo.forEach((item) => {
-                                item.leaf = true
-                            })
-                            this.treeData = arrTwo
+                getTreeData(params).then(res => {
+                    this.loading = false
+                    const arr = JSON.parse(JSON.stringify(res.data))
+                    // 岗位数改成部门树
+                    // 岗位数改成部门树
+                    const arrOne = []
+                    const arrTwo = []
+                    arr.forEach((item) => {
+                        if (item.name === '岗位树') {
+                            item.name = '部门树'
+                            arrOne[0] = item
                         } else {
-                            let arrList
-                            const frist = this.$store.getters.level.first || ''
-                            if (type === '1' && this.filtrate && frist) {
-                                const showBoo = arr.some((item) => item.id === frist)
-                                console.log(this.filtrate, showBoo)
-                                if (showBoo) {
-                                    arrList = arr.filter((item) => item.id === frist)
-                                } else {
-                                    arrList = arr
-                                }
+                            arrTwo.push(item)
+                        }
+                    })
+                    let treeData
+                    if (type === '2' || type === '3') {
+                        arrTwo.forEach((item) => {
+                            item.leaf = true
+                        })
+                        this.treeData = arrTwo
+                    } else {
+                        let arrList = []
+                        const frist = this.$store.getters.level.first || ''
+                        if (type === '1' && this.filtrate && frist) {
+                            const showBoo = arr.some((item) => item.id === frist)
+                            console.log(this.filtrate, showBoo)
+                            if (showBoo) {
+                                arrList = arr.filter((item) => item.id === frist)
                             } else {
                                 arrList = arr
                             }
-
-                            if (this.$utils.isEmpty(node.data)) {
-                                treeData = arrList
-                                resolve(this.toTree(treeData))
-                            } else {
-                                treeData = type === '1' ? arrList : this.filterTreeChildren(arrList, 'root')
-                                resolve(this.toTree(treeData))
-                            }
+                        } else {
+                            arrList = arr
                         }
-                    })
-                    .catch((res) => {
-                        this.loading = false
-                        resolve([])
-                    })
+                        if (this.$utils.isEmpty(node.data)) {
+                            treeData = arrList
+                            resolve(this.toTree(treeData))
+                        } else {
+                            treeData = type === '1' ? arrList : this.filterTreeChildren(arrList, 'root')
+                            resolve(this.toTree(treeData))
+                        }
+                    }
+                }).catch(res => {
+                    this.loading = false
+                    resolve([])
+                })
             } else if (node.data.id !== '0') {
                 if (type === '2') {
                     params = {}
                     params.type = '1'
                     params.posId = node.data.id
                 }
-                getTreeData(params)
-                    .then((res) => {
-                        this.loading = false
-                        const arr = JSON.parse(JSON.stringify(res.data))
-                        resolve(this.toTree(arr))
-                    })
-                    .catch((res) => {
-                        this.loading = false
-                        resolve([])
-                    })
+                getTreeData(params).then(res => {
+                    this.loading = false
+                    const arr = JSON.parse(JSON.stringify(res.data))
+                    resolve(this.toTree(arr))
+                }).catch(res => {
+                    this.loading = false
+                    resolve([])
+                })
             }
         },
         toTree (data) {
@@ -276,7 +287,7 @@ export default {
             // 返回设置的范围节点
             if (treeScope === 'root') {
                 const currentOrgIds = this.currentOrgId.split(',')
-                treeData.forEach((f) => {
+                treeData.forEach(f => {
                     if (currentOrgIds.includes(f.id)) {
                         f.leaf = true
                         data.push(f)
@@ -290,7 +301,7 @@ export default {
             getScriptValue({
                 script: scriptValue,
                 vars: ''
-            }).then((response) => {
+            }).then(response => {
                 const data = JSON.parse(response.data)
                 this.treeData = TreeUtils.transformToTreeFormat(data.data)
             })
@@ -312,15 +323,13 @@ export default {
         handleMoreSearchAction (data) {
             this.loading = true
             this.moreSearchParams = data
-            getTreeData(data)
-                .then((response) => {
-                    const data = response.data
-                    this.treeData = TreeUtils.transformToTreeFormat(data)
-                    this.loading = false
-                })
-                .catch(() => {
-                    this.loading = false
-                })
+            getTreeData(data).then(response => {
+                const data = response.data
+                this.treeData = TreeUtils.transformToTreeFormat(data)
+                this.loading = false
+            }).catch(() => {
+                this.loading = false
+            })
         },
         /**
          * 查询
@@ -363,9 +372,7 @@ export default {
                 const index = val.find((v) => {
                     return v[this.pkKey] === data[this.pkKey]
                 })
-                if (!index) {
-                    val.push(data)
-                }
+                if (!index) { val.push(data) }
             } else {
                 val = val.filter((v) => {
                     return v[this.pkKey] !== data[this.pkKey]
@@ -385,24 +392,25 @@ export default {
 }
 </script>
 <style lang="scss" scoped>
-$border-color: #e5e6e7;
-.ibps-tree-toolbar {
-    border: 1px solid $border-color;
-    height: 30px;
-    padding: 5px;
-}
-.ibps-tree-search-form {
-    padding: 5px;
-    border-right: 1px solid $border-color;
-    background: #ffffff;
-}
-.ibps-tree-main {
-    border: 1px solid $border-color;
-}
-.ibps-tree-wrapper {
-    background: #ffffff;
-    .el-tree > .el-tree-node {
-        display: inline-block;
+    $border-color: #e5e6e7;
+    .ibps-tree-toolbar {
+        border: 1px solid $border-color;
+        height: 30px;
+        padding: 5px;
+    }
+    .ibps-tree-search-form {
+        padding: 5px;
+        border-right: 1px solid $border-color;
+        background: #ffffff;
+    }
+    .ibps-tree-main {
+        border: 1px solid $border-color;
+    }
+    .ibps-tree-wrapper {
+        background: #ffffff;
+
+        .el-tree>.el-tree-node {
+            display: inline-block;
+        }
     }
-}
 </style>

+ 4 - 8
src/business/platform/org/position/selector.vue

@@ -148,8 +148,8 @@ export default {
         },
 
         /**
-     * 获得数组数据
-     */
+         * 获得数组数据
+         */
         getArrayValue (value, bindId) {
             if (this.$utils.isEmpty(value)) {
                 return []
@@ -231,8 +231,8 @@ export default {
             return this.getStoreValue(this.selectorValue)
         },
         /**
-     * 通过ID获取数据
-     */
+         * 通过ID获取数据
+         */
         getDataInfo (id) {
             remoteRequest('position' + this.valueKey, id, () => {
                 return this.getRemoteByIdFunc(id)
@@ -263,9 +263,7 @@ export default {
                 }
             })
         },
-
         // ===================事件处理=========
-
         handleSelectorClick () {
             this.selectorVisible = true
             this.initData()
@@ -278,7 +276,6 @@ export default {
             }
             this.handleInput()
         },
-
         handleSelectorActionEvent (buttonKey, data) {
             switch (buttonKey) {
                 case 'confirm':// 确定
@@ -294,7 +291,6 @@ export default {
             // 提供一个返回实体,提供调用
             this.$emit('callback', this.selectorValue)
         }
-
     }
 }
 </script>

+ 26 - 4
src/business/platform/org/selector/dialog.vue

@@ -18,7 +18,18 @@
             @action-event="handleSelectorActionEvent"
         />
         <!--组织选择器-->
-        <ibps-org-selector-dialog v-else-if="type === 'org'" :visible="orgSelectorVisible" :current-org-id="currentOrgId" :party-type-id="partyTypeId" :script="script" :is-use-scope="true" :value="selectorValue" :multiple="multiple" @close="closeDialog" @action-event="handleSelectorActionEvent" />
+        <ibps-org-selector-dialog
+            v-else-if="type === 'org'"
+            :visible="orgSelectorVisible"
+            :current-org-id="currentOrgId"
+            :party-type-id="partyTypeId"
+            :script="script"
+            :is-use-scope="true"
+            :value="selectorValue"
+            :multiple="multiple"
+            @close="closeDialog"
+            @action-event="handleSelectorActionEvent"
+        />
         <!--岗位选择器-->
         <ibps-position-selector-dialog
             v-else-if="type === 'position'"
@@ -34,7 +45,18 @@
             @action-event="handleSelectorActionEvent"
         />
         <!--角色选择器-->
-        <ibps-role-selector-dialog v-else-if="type === 'role'" :visible="roleSelectorVisible" :current-org-id="currentOrgId" :party-type-id="partyTypeId" :script="script" :is-use-scope="true" :value="selectorValue" :multiple="multiple" @close="closeDialog" @action-event="handleSelectorActionEvent" />
+        <ibps-role-selector-dialog
+            v-else-if="type === 'role'"
+            :visible="roleSelectorVisible"
+            :current-org-id="currentOrgId"
+            :party-type-id="partyTypeId"
+            :script="script"
+            :is-use-scope="true"
+            :value="selectorValue"
+            :multiple="multiple"
+            @close="closeDialog"
+            @action-event="handleSelectorActionEvent"
+        />
     </div>
 </template>
 <script>
@@ -161,7 +183,7 @@ export default {
             const existingTypeScope = []
             const typeScope = []
             // console.info(val)
-            val.forEach((v) => {
+            val.forEach(v => {
                 existingTypeScope.push(v.userType)
                 this.filterSelectorType(v)
             })
@@ -198,7 +220,7 @@ export default {
             }
         },
         getUserSelectorCondition (val, type) {
-            this.condition[type] ? (this.condition[type].partyTypeId = val.descVal) : null
+            this.condition[type] ? this.condition[type].partyTypeId = val.descVal : null
             switch (val.descVal) {
                 case '1':
                     break

+ 0 - 3
src/views/system/jbdScan/goods/neishenzhuangtai.vue

@@ -308,7 +308,6 @@ export default {
         return part.slice(1,part.length)
       }else{  
       for (let i = 0; i < arr.length; i++) {
-        console.log(arr[i])
         if (arr[i].bu_men_id_ == value) {
           return arr[i].mian_bu_men;
         }
@@ -605,7 +604,6 @@ export default {
       let sql = "select ID_,NAME_,CREATE_TIME_ FROM ibps_party_employee ";
       await curdPost("sql", sql).then((res) => {
         this_.employeeList = res.variables.data;
-        console.log(this_.employeeList,12)
       });
     },
     async getPart() {
@@ -614,7 +612,6 @@ export default {
       let sql = "select * FROM ibps_main_position";
       await curdPost("sql", sql).then((res) => {
         this_.partList = res.variables.data;
-        console.log(this_.partList,23)
       });
     },
     jieduan(value) {