Explorar o código

部分下拉框数据额整理

zhulizhen1111 %!s(int64=4) %!d(string=hai) anos
pai
achega
10ead43b02

+ 13 - 0
src/api/legendLibrary.js

@@ -0,0 +1,13 @@
+import httputils from "@/api/httputils"
+// 图例库-查询
+export function queryLegend({ postParams }) {
+    return httputils.postJson(`/api/graphElement/query`, postParams)
+}
+// 图例库-新增
+export function createLegend({ postParams }) {
+    return httputils.postJson(`/api/graphElement/create`, postParams)
+}
+//图例库-更新
+export function updateLegend({ postParams }) {
+    return httputils.postJson(`/api/graphElement/update`, postParams)
+}

+ 2 - 5
src/views/equipment/eqDialog.vue

@@ -74,7 +74,7 @@ export default {
     margin-bottom: 20px;
 }
 </style>
-<style lang="less">
+<style lang="less" >
 .dialog-container {
     .el-dialog__header {
         padding: 16px 24px;
@@ -114,10 +114,7 @@ export default {
         color: rgba(31, 36, 41, 1);
         border: 1px solid rgba(195, 199, 203, 1);
     }
-    .el-tabs,
-    .el-tabs__content {
-        height: 94%;
-    }
+
     .el-tabs__active-bar {
         background-color: transparent !important;
     }

+ 2 - 2
src/views/equipment/index.vue

@@ -89,7 +89,7 @@ export default {
     display: flex;
     flex: 1;
     .eq-top {
-        margin-left: 195px;
+        margin-left: 240px;
         padding-top: 24px;
         position: fixed;
         z-index: 3;
@@ -145,7 +145,7 @@ export default {
                     position: fixed;
                     z-index: 2;
                     top: 146px;
-                    left: 196px;
+                    left: 242px;
                     width: 141px;
                     height: 32px;
                     background: linear-gradient(270deg, rgba(199, 217, 234, 0) 0%, rgba(199, 217, 234, 1) 100%);

+ 1 - 2
src/views/equipment/table/zwTable.vue

@@ -22,7 +22,7 @@
             <el-pagination
                 background
                 layout='prev, pager, next'
-                :total='total/pageSize'
+                :total='total/size'
                 :page-size='size'
                 @prev-click='pageChanged'
                 @next-click='pageChanged'
@@ -38,7 +38,6 @@ export default {
     components: { Select },
     data() {
         return {
-            pageSize: 10,
             dataSelect2: [
                 { id: 'test1', name: '选择项' },
                 { id: 'test2', name: '单平米' },

+ 1 - 1
src/views/floorFunc/index.vue

@@ -80,7 +80,7 @@ export default {
         position: fixed;
         z-index: 2;
         top: 146px;
-        left: 196px;
+        left: 242px;
         width: 141px;
         height: 32px;
         background: linear-gradient(270deg, rgba(199, 217, 234, 0) 0%, rgba(199, 217, 234, 1) 100%);

+ 9 - 5
src/views/legendLibrary/addForm.vue

@@ -7,7 +7,7 @@
         </div>
         <div class='form2'>
             <div class='input-left'>
-                <el-input v-model='ruleForm.code' style='width:200px;height:32px;margin-right:48px;'></el-input>
+                <el-input v-model='ruleForm.code' disabled style='width:200px;height:32px;margin-right:48px;'></el-input>
                 <el-input v-model='ruleForm.name' style='width:200px;height:32px;'></el-input>
                 <div class='title'>单位</div>
                 <div class='type'>图例类型</div>
@@ -23,15 +23,15 @@
                 ></div>
             </div>
         </div>
-        <div v-if='ruleForm.type==1' class='form3'>
+        <div v-if='ruleForm.type==1 || ruleForm.type==4' class='form3'>
             <div class='form3-top'>
-                <span class='form3-span1'>填充色以及透明度</span>
+                <span class='form3-span1' v-if='ruleForm.type==1'>填充色以及透明度</span>
                 <span class='form3-span3'>边框颜色</span>
                 <span class='form3-span4'>边框线型</span>
                 <span class='form3-span5'>边框粗细</span>
             </div>
             <div class='form3-bottom'>
-                <el-color-picker v-model='ruleForm.color' show-alpha style='margin:0 172px 0 10px'></el-color-picker>
+                <el-color-picker v-if='ruleForm.type==1' v-model='ruleForm.color' show-alpha style='margin:0 172px 0 10px'></el-color-picker>
                 <el-color-picker v-model='ruleForm.borderColor' show-alpha style='margin:0 90px 0 10px'></el-color-picker>
 
                 <el-select
@@ -61,7 +61,7 @@
                 </el-upload>
             </div>
         </div>
-        <div v-if='ruleForm.type==1 || ruleForm.type==3' class='form4'>
+        <div v-if='ruleForm.type!=2' class='form4'>
             <div class='form4-top'>
                 <span class='form4-span1'>对应工程信息化中的位置/设备分类</span>
                 <span class='form4-span2'>工程信息化的专业/系统</span>
@@ -108,6 +108,10 @@ export default {
                 {
                     value: '3',
                     label: '图标'
+                },
+                {
+                    value: 4,
+                    label: '线条'
                 }
             ],
             borderLineOption: [

+ 70 - 51
src/views/legendLibrary/index.vue

@@ -9,12 +9,20 @@
         </div>
         <div class='legend-library-bottom'>
             <div class='select-box'>
-                <Select width='180' tipPlace='top' caption='所属分类:' :selectdata='dataSelect2' :placeholder='"请选择"'></Select>
-                <Select width='180' tipPlace='top' caption='说明书位置:' :selectdata='dataSelect2' :placeholder='"请选择"' style='margin:0 12px'></Select>
+                <Select width='180' tipPlace='top' caption='所属分类:' v-model='styleValue' :selectdata='typeOptions' :placeholder='"请选择"'></Select>
+                <Select
+                    width='180'
+                    tipPlace='top'
+                    caption='说明书位置:'
+                    v-model='position'
+                    :selectdata='positionSelect'
+                    :placeholder='"请选择"'
+                    style='margin:0 12px'
+                ></Select>
                 <Select width='180' tipPlace='top' caption='位置/设备分类:' :selectdata='dataSelect2' :placeholder='"请选择"'></Select>
                 <Select width='180' tipPlace='top' caption='专业/系统:' :selectdata='dataSelect2' :placeholder='"请选择"' style='margin:0 12px'></Select>
-                <Select width='180' tipPlace='top' caption='铺位可视化:' :selectdata='dataSelect2' :placeholder='"请选择"'></Select>
-                <Select width='180' tipPlace='top' caption='状态:' :selectdata='dataSelect2' :placeholder='"请选择"' style='margin:0 12px'></Select>
+                <Select width='180' tipPlace='top' caption='铺位可视化:' :selectdata='typeIdSelect' :placeholder='"请选择"'></Select>
+                <Select width='180' tipPlace='top' caption='状态:' v-model='state' :selectdata='stateSelect' :placeholder='"请选择"' style='margin:0 12px'></Select>
                 <a-input-search placeholder style='width: 192px;height:34px' @search='onSearch' />
             </div>
             <el-table :data='tableData' style='width: 100%'>
@@ -25,18 +33,25 @@
                 <el-table-column prop='type' label='对应工程信息化中的位置/设备分类' width='240'></el-table-column>
                 <el-table-column prop='system' label='对应工程信息化的系统'></el-table-column>
                 <el-table-column prop='typeId' label='铺位可视化typeid'></el-table-column>
-                <el-table-column label='操作' width='100'>
-                    <template slot-scope='scope'>
+                <el-table-column label='操作' width='100' v-if='state==1'>
+                    <template slot-scope='scope' v-if='state==1'>
                         <el-button @click='modifyClick(scope.row)' type='text' size='small'>修改</el-button>
                         <el-button @click='deleteClick(scope.row)' type='text' size='small'>做废</el-button>
                     </template>
                 </el-table-column>
+                <el-table-column v-else prop='time' label='作废时间'></el-table-column>
             </el-table>
-            <!-- <a-table size='small' style='margin-top:12px' :columns='columns' :bordered='false' :data-source='tableData'>
-                <template v-slot:action>
-                    <a href='javascript:;'>Delete</a>
-                </template>
-            </a-table>-->
+            <div class='foot'>
+                <el-pagination
+                    background
+                    layout='prev, pager, next'
+                    :total='total/size'
+                    :page-size='size'
+                    @prev-click='pageChanged'
+                    @next-click='pageChanged'
+                    @current-change='pageChanged'
+                ></el-pagination>
+            </div>
         </div>
         <add-legend ref='addLegend'></add-legend>
     </div>
@@ -48,54 +63,52 @@ export default {
     components: { addLegend, Select },
     data() {
         return {
-            columns: [
-                {
-                    title: '图例名称',
-                    dataIndex: 'name',
-                    key: 'name'
-                },
-                {
-                    title: '图例样式',
-                    dataIndex: 'style',
-                    key: 'style'
-                },
-                {
-                    title: '单位',
-                    dataIndex: 'unit',
-                    key: 'unit'
-                },
-                {
-                    title: '对应广场说明书的位置',
-                    dataIndex: 'position',
-                    key: 'position'
-                },
+            tableData: [{ name: '车库', style: '--' }, { style: '--' }],
+            dataSelect2: [
+                { id: 'test1', name: '选择项' },
+                { id: 'test2', name: '单平米' },
+                { id: 'test3', name: '下级分项' },
+                { id: 'test4', name: '滑动平均滑动平均' }
+            ],
+            stateSelect: [
+                { id: 1, name: '正常' },
+                { id: 0, name: '异常' }
+            ],
+            styleValue: '', //所属分类
+            typeOptions: [
                 {
-                    title: '对应工程信息化中的位置/设备分类',
-                    dataIndex: 'type',
-                    key: 'type'
+                    value: '2',
+                    label: '非图例'
                 },
                 {
-                    title: '对应工程信息化的系统',
-                    dataIndex: 'system',
-                    key: 'system'
+                    value: '1',
+                    label: '区域'
                 },
                 {
-                    title: '铺位可视化typeid',
-                    dataIndex: 'typeId',
-                    key: 'typeId'
+                    value: '3',
+                    label: '图标'
                 },
                 {
-                    title: '操作',
-                    dataIndex: 'action',
-                    key: 'action'
+                    value: '0',
+                    label: '线条'
                 }
             ],
-            tableData: [{ name: '车库', style: '--' }, { style: '--' }],
-            dataSelect2: [
-                { id: 'test1', name: '选择项' },
-                { id: 'test2', name: '单平米' },
-                { id: 'test3', name: '下级分项' },
-                { id: 'test4', name: '滑动平均滑动平均' }
+            typeIdSelect: [],
+            size: 11,
+            total: 1,
+            currentPage: 1,
+            state: 1,
+            position: '',
+            positionSelect: [
+                { id: '1', name: '供电系统-楼层分布' },
+                { id: '2', name: '暖通空调-原理图' },
+                { id: '3', name: '暖通空调-楼层分布' },
+                { id: '4', name: '消防系统-系统概况' },
+                { id: '5', name: '消防系统-楼层分布' },
+                { id: '6', name: '弱电系统-楼层分布' },
+                { id: '7', name: '电梯系统-楼层分布' },
+                { id: '8', name: '燃气系统-楼层分布' },
+                { id: '9', name: '土建装饰-石材铺装' }
             ]
         }
     },
@@ -130,7 +143,13 @@ export default {
                         message: '已取消删除'
                     })
                 })
-        }
+        },
+        pageChanged(page, size) {
+            this.currentPage = page
+            this.size = size
+            this.getTableList()
+        },
+        getTableList() {}
     },
     mounted() {}
 }

+ 31 - 3
src/views/legendRules/addList.vue

@@ -1,10 +1,38 @@
 <template>
-    <div>111111111111</div>
+    <div class='add-transfer'>
+        <el-transfer v-model='value' :props='{
+      key: "value",
+      label: "desc"
+    }' :data='data'></el-transfer>
+    </div>
 </template>
 
 <script>
-export default {}
+export default {
+    data() {
+        const generateData = () => {
+            const data = []
+            for (let i = 1; i <= 15; i++) {
+                data.push({
+                    value: i,
+                    desc: `备选项 ${i}`
+                })
+            }
+            return data
+        }
+        return {
+            data: generateData(),
+            value: []
+        }
+    }
+}
 </script>
 
-<style>
+<style lang='less' scoped>
+.add-transfer {
+    display: flex;
+    align-self: center;
+    justify-content: center;
+    margin-top: 40px;
+}
 </style>