Forráskód Böngészése

添加图例库穿梭框

shaun-sheep 4 éve
szülő
commit
3d0af4212c

+ 14 - 1
src/views/equipment/eqDialog.vue

@@ -67,6 +67,7 @@ import otherTable from './table/otherTable'
 import wxTable from './table/wxTable'
 import recordDialog from './table/recordDialog'
 import djspTable from './table/djspTable'
+import { queryPic } from '@/api/public.js'
 export default {
     props: ['systemName', 'smsxt'],
     data() {
@@ -78,7 +79,9 @@ export default {
             rotationImg: [require('@/assets/imgs/eq.jpg'), require('@/assets/imgs/survey_pop2.png'), require('@/assets/imgs/survey_pop1.png')]
         }
     },
-    mounted() {},
+    mounted() {
+        this.initImage()
+    },
     components: { tableList, tjTable, wbTable, zwTable, lookPage, standTable, otherTable, wxTable, recordDialog, djspTable },
     methods: {
         showModal(item) {
@@ -97,6 +100,16 @@ export default {
         },
         visibalBox() {
             this.$refs.Dialog.open()
+        },
+        initImage() {
+            let getParams = {
+                data: { tyepcode: 8, plazaId: '1001145' },
+                params: {}
+            }
+            queryPic(getParams).then(res => {
+                console.log('resres', res)
+                this.rotationImg = res.data
+            })
         }
     }
 }

+ 27 - 3
src/views/legendLibrary/addForm.vue

@@ -88,9 +88,24 @@
                 <el-select v-model='value' placeholder='请选择' size='small' style='width:200px;margin-right:48px'>
                     <el-option v-for='item in options2' :key='item.value' :label='item.label' :value='item.value'></el-option>
                 </el-select>
-                <el-select v-model='value' placeholder='请选择' size='small' style='width:200px;'>
+                <!-- <el-select v-model='value' placeholder='请选择' size='small' style='width:200px;'>
                     <el-option v-for='item in options3' :key='item.value' :label='item.label' :value='item.value'></el-option>
-                </el-select>
+                </el-select>-->
+                <TreeSelect
+                    title='已选项'
+                    unit='个'
+                    placeholder='请选择'
+                    tipPlace='top'
+                    height='300'
+                    :notNull='true'
+                    :returnParentNode='false'
+                    :isShowAllChoice='true'
+                    :selectedIds='select11'
+                    :choseArea='true'
+                    :data='dataTreeMultiple5'
+                    @change='treeConfirm'
+                    @focusChange='focusChange'
+                />
             </div>
         </div>
     </div>
@@ -165,7 +180,9 @@ export default {
             canvasWidth: 200,
             canvasHeight: 114,
             view: null,
-            scene: null
+            scene: null,
+            dataTreeMultiple5: [],
+            select11: []
         }
     },
     props: ['ruleForm', 'title'],
@@ -325,6 +342,13 @@ export default {
                     }
                 })
             }
+        },
+        // 多选返回的id组
+        treeConfirm(data) {
+            console.log(data)
+        },
+        focusChange(status) {
+            console.log('focusChange', status)
         }
     },
     mounted() {

+ 30 - 7
src/views/legendLibrary/addLegend.vue

@@ -1,12 +1,23 @@
 <template>
     <div class='add-legend'>
         <el-dialog :title='title' :visible.sync='dialogVisible'>
-            <add-list v-show='title=="" && GraphCategoryId' ref='searchList' :GraphCategoryId='GraphCategoryId' @mesg='mesg'></add-list>
-            <add-form v-show='title!=""' ref='add' :ruleForm='info' @addSuccess='addSuccess' @updateSuccess='updateSuccess' :title='title'></add-form>
-            <span slot='footer' class='dialog-footer'>
-                <el-button @click='dialogVisible = false,cancal()' size='small'>取 消</el-button>
-                <el-button type='primary' @click='save' size='small'>确 定</el-button>
-            </span>
+            <!-- <add-list v-show='title=="" && GraphCategoryId' ref='searchList' :GraphCategoryId='GraphCategoryId' @mesg='mesg'></add-list> -->
+
+            <Transfer
+                :data='treeData3'
+                :linkage='false'
+                :lastStage='true'
+                @confirm='treeConfirm3'
+                v-if='title=="" && GraphCategoryId'
+                ref='searchList'
+            />
+            <template v-else>
+                <add-form ref='add' :ruleForm='info' @addSuccess='addSuccess' @updateSuccess='updateSuccess' :title='title'></add-form>
+                <span slot='footer' class='dialog-footer'>
+                    <el-button @click='dialogVisible = false,cancal()' size='small'>取 消</el-button>
+                    <el-button type='primary' @click='save' size='small'>确 定</el-button>
+                </span>
+            </template>
         </el-dialog>
     </div>
 </template>
@@ -28,7 +39,8 @@ export default {
                 LineDash: ''
             },
             title: '',
-            GraphCategoryId: 'DTXT'
+            GraphCategoryId: 'DTXT',
+            treeData3: []
         }
     },
     components: { addForm, addList },
@@ -78,6 +90,9 @@ export default {
             if (!this.title) {
                 this.$refs.searchList.save()
             }
+        },
+        treeConfirm3(ids) {
+            console.log('确定:::', ids)
         }
     }
 }
@@ -85,6 +100,14 @@ export default {
 
 <style lang='less' scoped>
 .add-legend {
+    /deep/ .p-transfer {
+        display: block;
+        width: 90%;
+    }
+    /deep/ .p-transfer-main {
+        box-shadow: none;
+        height: 479px;
+    }
 }
 </style>
 <style lang='less'>

+ 10 - 7
src/views/legendLibrary/index.vue

@@ -58,13 +58,7 @@
                     :placeholder='"请选择"'
                     style='margin:0 12px'
                 ></Select>
-                <el-input
-                    size='small'
-                    @change='getTableList'
-                    prefix-icon='el-icon-search'
-                    v-model='keyword'
-                    style='width:192px;margin-right:12px;margin-bottom:12px'
-                ></el-input>
+                <el-input size='small' @change='getTableList' prefix-icon='el-icon-search' v-model='keyword' style='width:192px;margin-right:12px;'></el-input>
             </div>
             <el-table :data='tableData' :border='true' style='width: 100%'>
                 <el-table-column prop='Name' label='图例名称'>
@@ -178,6 +172,15 @@ export default {
         }
     },
     methods: {
+        // filtersTree() {
+        //     let cloneData = JSON.parse(JSON.stringify(this.list))
+        //     return cloneData.filter(father => {
+        //         let branchArr = cloneData.filter(child => father.id == child.parentId)
+        //         branchArr.length > 0 ? (father.children = branchArr) : ''
+        //         return father.parentId == 0 //返回第一层
+        //     })
+        //     console.log(cloneData, 'cloone')
+        // },
         dumpRules() {
             this.$router.push('/home/legendRules')
         },

+ 1 - 0
src/views/legendRules/addList.vue

@@ -36,6 +36,7 @@ export default {
             }
             this.data = []
             getTransfer({ getParams }).then(res => {
+                debugger
                 console.log(res)
                 let content = res.Content
                 content.forEach(el => {