From edbe2964e959a334e1d9e12717bf854d89d25c92 Mon Sep 17 00:00:00 2001
From: loulijun2021 <1694218219@qq.com>
Date: 星期三, 15 六月 2022 21:01:26 +0800
Subject: [PATCH] 1.cookie带到接口上

---
 src/views/jcsz/zzjg.vue |  170 +++++++++++++++++++++++++++++++++++++++++++++++---------
 1 files changed, 141 insertions(+), 29 deletions(-)

diff --git a/src/views/jcsz/zzjg.vue b/src/views/jcsz/zzjg.vue
index 4a057bb..0e91ae2 100644
--- a/src/views/jcsz/zzjg.vue
+++ b/src/views/jcsz/zzjg.vue
@@ -1,10 +1,10 @@
 <template>
   <div>
-    <div class="body" style="background-color: #ffffff;  padding: 20px 10px 0 20px;">
+    <div class="body" style="background-color: #ffffff;  padding: 20px 10px 0 20px;" :style="{height:mainHeight+'px'}">
       <div style="margin-bottom: 20px;display: flex">
-        <el-button type="primary" icon="el-icon-circle-plus-outline">鏂板</el-button>
-        <el-button type="primary" icon="el-icon-delete">淇敼</el-button>
-        <el-button type="primary" icon="el-icon-delete">鍒犻櫎</el-button>
+        <el-button type="primary" icon="el-icon-circle-plus-outline" @click="add('add')">鏂板</el-button>
+        <el-button type="primary" icon="el-icon-delete" @click="edit('edit')">淇敼</el-button>
+        <el-button type="primary" icon="el-icon-delete" @click="del">鍒犻櫎</el-button>
       </div>
 
       <div style="display: flex;border: 1px solid #eee">
@@ -22,7 +22,7 @@
 
           <el-tree
             ref="tree"
-            style="margin-left: 10px;overflow-y: scroll;height: 230px"
+            :style="{marginLeft: 10+'px',overflowY: 'scroll',height:(tableHeight-140)+'px'}"
             :icon-class="iconClass"
             :data="treeData"
             default-expand-all
@@ -33,32 +33,11 @@
             @node-click="nodeClick"
           />
         </div>
-        <el-table
-          v-if="false"
-          :data="tableTreeData"
-          border
-          style="flex: 0.22"
-          :span-method="spanMethod"
-          :header-cell-style="headerCellStyle"
-        >
 
-          <el-table-column
-            label="缁勭粐鍒嗙被"
-            width="300"
-            prop="zzfl"
-            :resizable="false"
-          >
-            <template slot-scope="{row}">
-
-              <el-input v-model="filterText" placeholder="璇疯緭鍏ュ唴瀹�" />
-
-            </template>
-          </el-table-column>
-        </el-table>
         <el-table
           :data="tableData"
           border
-          style="width: 72%"
+          :style="{width: 72+'%',height:tableHeight+'px'}"
           :header-cell-style="this.$headerCellStyle"
           :cell-style="this.$cellStyle"
         >
@@ -113,11 +92,53 @@
         align="right"
         layout="prev, pager, next,sizes"
         popper-class="select_bottom"
-        style="padding: 0;margin-top: 100px"
       />
       <!--      @pagination="getManageList"-->
 
     </div>
+
+    <el-dialog
+      :title="operation==='add'?'娣诲姞':'淇敼'"
+      :visible.sync="dialogVisible"
+      width="50%"
+      top="15vh"
+      @closed="handleClose"
+    >
+      <el-form ref="dialogForm" :model="dialogForm" label-width="80px">
+        <el-form-item label="缁勭粐绫诲瀷" required>
+          <el-radio-group v-model="dialogForm.zzlx" style="display: flex;align-items: end;height: 29px;">
+            <el-radio :label="1">宸ュ巶</el-radio>
+            <el-radio :label="2">閮ㄩ棬</el-radio>
+            <el-radio :label="3">杞﹂棿</el-radio>
+            <el-radio :label="4">绉戝</el-radio>
+            <el-radio :label="5">鐢熶骇绾�</el-radio>
+          </el-radio-group>
+        </el-form-item>
+        <el-form-item label="缁勭粐缂栫爜" required>
+          <el-input v-model="dialogForm.zzbm" style="width: 220px" />
+        </el-form-item>
+        <el-form-item label="缁勭粐鍚嶇О" required>
+          <el-input v-model="dialogForm.zzmc" style="width: 220px" />
+        </el-form-item>
+        <el-form-item label="涓婄骇鍗曚綅" required>
+          <!--          <el-input v-model="dialogForm.sjdw" />-->
+          <el-select v-model="dialogForm.sjdw" style="width: 220px" placeholder="璇烽�夋嫨">
+            <el-option
+              v-for="item in sjdw"
+              :key="item.value"
+              :label="item.label"
+              :value="item.value"
+            />
+          </el-select>
+        </el-form-item>
+      </el-form>
+      <span slot="footer" class="dialog-footer">
+        <div class="footerButton">
+          <el-button @click="dialogVisibleCancel">鍙� 娑�</el-button>
+          <el-button type="primary" @click="dialogVisibleConfirm">纭� 瀹�</el-button>
+        </div>
+      </span>
+    </el-dialog>
   </div>
 </template>
 
@@ -131,6 +152,8 @@
   },
   data() {
     return {
+      mainHeight: 0,
+      tableHeight: 0,
       form: {
         pageNum: 1, // 绗嚑椤�
         pageSize: 10 // 姣忛〉澶氬皯鏉�
@@ -146,6 +169,16 @@
         { id: 7, zzbm: 'OD', zzmc: '閿�鍞儴', zzlx: '閮ㄩ棬', sjdw: '澶ц繛鎭掔ゥ', cjry: 'Admin4', cjsj: '2022-04-15 10:12:10' },
         { id: 8, zzbm: 'OD', zzmc: '閿�鍞儴', zzlx: '閮ㄩ棬', sjdw: '澶ц繛鎭掔ゥ', cjry: 'Admin4', cjsj: '2022-04-15 10:12:10' },
         { id: 9, zzbm: 'FC', zzmc: '宸ョ▼閮�', zzlx: '閮ㄩ棬', sjdw: '澶ц繛鎭掔ゥ', cjry: 'Admin3', cjsj: '2022-04-16 12:10:10' },
+        { id: 10, zzbm: 'CM', zzmc: '寮�鍙戦儴', zzlx: '閮ㄩ棬', sjdw: '澶ц繛鎭掔ゥ', cjry: 'Admin3', cjsj: '2022-04-17 15:10:10' },
+        { id: 10, zzbm: 'CM', zzmc: '寮�鍙戦儴', zzlx: '閮ㄩ棬', sjdw: '澶ц繛鎭掔ゥ', cjry: 'Admin3', cjsj: '2022-04-17 15:10:10' },
+        { id: 10, zzbm: 'CM', zzmc: '寮�鍙戦儴', zzlx: '閮ㄩ棬', sjdw: '澶ц繛鎭掔ゥ', cjry: 'Admin3', cjsj: '2022-04-17 15:10:10' },
+        { id: 10, zzbm: 'CM', zzmc: '寮�鍙戦儴', zzlx: '閮ㄩ棬', sjdw: '澶ц繛鎭掔ゥ', cjry: 'Admin3', cjsj: '2022-04-17 15:10:10' },
+        { id: 10, zzbm: 'CM', zzmc: '寮�鍙戦儴', zzlx: '閮ㄩ棬', sjdw: '澶ц繛鎭掔ゥ', cjry: 'Admin3', cjsj: '2022-04-17 15:10:10' },
+        { id: 10, zzbm: 'CM', zzmc: '寮�鍙戦儴', zzlx: '閮ㄩ棬', sjdw: '澶ц繛鎭掔ゥ', cjry: 'Admin3', cjsj: '2022-04-17 15:10:10' },
+        { id: 10, zzbm: 'CM', zzmc: '寮�鍙戦儴', zzlx: '閮ㄩ棬', sjdw: '澶ц繛鎭掔ゥ', cjry: 'Admin3', cjsj: '2022-04-17 15:10:10' },
+        { id: 10, zzbm: 'CM', zzmc: '寮�鍙戦儴', zzlx: '閮ㄩ棬', sjdw: '澶ц繛鎭掔ゥ', cjry: 'Admin3', cjsj: '2022-04-17 15:10:10' },
+        { id: 10, zzbm: 'CM', zzmc: '寮�鍙戦儴', zzlx: '閮ㄩ棬', sjdw: '澶ц繛鎭掔ゥ', cjry: 'Admin3', cjsj: '2022-04-17 15:10:10' },
+        { id: 10, zzbm: 'CM', zzmc: '寮�鍙戦儴', zzlx: '閮ㄩ棬', sjdw: '澶ц繛鎭掔ゥ', cjry: 'Admin3', cjsj: '2022-04-17 15:10:10' },
         { id: 10, zzbm: 'CM', zzmc: '寮�鍙戦儴', zzlx: '閮ㄩ棬', sjdw: '澶ц繛鎭掔ゥ', cjry: 'Admin3', cjsj: '2022-04-17 15:10:10' }
       ],
       filterText: '',
@@ -195,7 +228,21 @@
         children: 'children',
         label: 'label'
       },
-      iconClass: 'el-icon-caret-right'
+      iconClass: 'el-icon-caret-right',
+      dialogVisible: true,
+      dialogForm: {
+        zzlx: '',
+        zzbm: '',
+        zzmc: '',
+        sjdw: ''
+      },
+      sjdw: [
+        // { value: '001', label: 'test1' },
+        // { value: '001', label: 'test2' },
+        // { value: '001', label: 'test3' },
+        // { value: '001', label: 'test4' }
+      ],
+      operation: ''
 
     }
   },
@@ -207,8 +254,47 @@
   created() {
 
   },
+  mounted() {
+    window.addEventListener('resize', this.getHeight)
+    this.getHeight()
+  },
   methods: {
+    // 鏂板鎸夐挳
+    add(val) {
+      this.operation = val
+      this.dialogVisible = true
+    },
+    // 淇敼鎸夐挳
+    edit(val) {
+      this.operation = val
+      this.dialogVisible = true
+    },
+    // 鍒犻櫎鎸夐挳
+    del() {
 
+    },
+    // 瀵硅瘽妗嗗叧闂簨浠�
+    handleClose() {
+
+    },
+    // 瀵硅瘽妗嗗彇娑�
+    dialogVisibleCancel() {
+      this.dialogVisible = false
+    },
+    // 瀵硅瘽妗嗙‘璁�
+    dialogVisibleConfirm() {
+      console.log(this.dialogForm.zzlx)
+      // this.dialogVisible = false
+    },
+    // 鑾峰彇椤甸潰楂樺害
+    getHeight() {
+      this.$nextTick(() => {
+        this.mainHeight = window.innerHeight - 200
+        // this.panelHeight = this.mainHeight - 40
+        this.tableHeight = this.mainHeight - 55
+      })
+    },
+    // 鏍戝舰杩囨护鑺傜偣
     filterNode(value, data) {
       if (!value) return true
       return data.label.indexOf(value) !== -1
@@ -266,6 +352,32 @@
   font-size: 14px
 }
 
+.footerButton{
+  display: flex;
+  justify-content: end;
+}
+::v-deep .el-button--default{
+  background-color: #ffffff !important;
+  height: 30px;
+  display: flex;
+  align-items: center;
+}
+
+::v-deep .el-button--default:hover{
+  color: #606266;
+}
+::v-deep .el-dialog__body{
+  padding: 20px 100px !important;
+}
+
+::v-deep .el-radio__input.is-checked .el-radio__inner{
+  background-color: $main_color;
+  border-color: $main_color;
+}
+
+::v-deep .el-radio__input.is-checked+.el-radio__label{
+color: $main_color !important;
+}
 /*::v-deep*/
 /*.el-icon-caret-right:before {*/
 /*  content: "\e722";*/

--
Gitblit v1.9.3