Bläddra i källkod

Merge branch 'master' of http://192.168.1.43:3000/v3/v3-lab-web

dedsudiyu 1 år sedan
förälder
incheckning
92dd76b8b9

+ 14 - 99
src/views/chemicalManage/useLedger/index.vue

@@ -87,18 +87,8 @@
           </el-form-item>
           <p class="page-inquire-common-style-button" @click="handleQuery">查询</p>
           <p class="page-reset-common-style-button" @click="resetQuery">重置</p>
-          <el-form-item label="" prop="title" style="float: right">
-            <el-dropdown @command="exportButton" style="float: left">
-              <div class="form-dropdown-box">
-                <img src="@/assets/ZDimages/basicsModules/icon_jzgxx_sc.png">
-                <p>导出</p>
-                <img src="@/assets/ZDimages/basicsModules/icon_jzggl_xljt.png">
-              </div>
-              <el-dropdown-menu slot="dropdown">
-                <el-dropdown-item style="border-bottom:1px solid #E0E0E0;margin:0 10px;color:#333;" :command="{command:1}">导出全部数据</el-dropdown-item>
-                <el-dropdown-item style="margin:0 10px;color:#666;" :command="{command:2}">导出选中数据</el-dropdown-item>
-              </el-dropdown-menu>
-            </el-dropdown>
+          <el-form-item style="float: right;">
+            <export-component :exportConfig="exportConfig" v-hasPermiRouter="['demo:demo:demo']"></export-component>
           </el-form-item>
         </el-form>
       </div>
@@ -144,13 +134,16 @@
 </template>
 
 <script>
+  import exportComponent from "@/components/exportComponent/exportComponent.vue";
   import { iotTypeList,iotTypeDetail,iotTypeAdd,iotTypeUpdate,iotTypeDelete } from "@/api/iotDevice/index";
   import infoPage from "./infoPage.vue"
   import {listDepartments} from "@/api/commonality/noPermission";
   export default {
     name: 'index',
     components: {
-      infoPage
+      exportComponent,
+      infoPage,
+
     },
     data(){
       return{
@@ -169,6 +162,11 @@
         deptList:[],
         //组件传参
         propsData:{},
+        exportConfig:{
+          api:'system/user/student/export',             //导出接口地址
+          ids:'',                                       //勾选导出,勾选的IDS
+          fileName:'导出文件名',                         //导出文件的命名
+        },
       }
     },
     created(){
@@ -233,67 +231,6 @@
           this.deptList = response.data;
         });
       },
-
-
-
-      //弹层关闭
-      dialogOff(){
-        this.$set(this,'dialogType',false);
-      },
-      //弹层开启
-      dialogOpen(){
-        this.dialogFormReset();
-        this.$set(this,'dialogTitle','新增');
-        this.$set(this,'dialogType',true);
-      },
-      //弹层确定
-      dialogSubmit(){
-        this.$refs["dialogForm"].validate(valid => {
-          if (valid) {
-            if(this.dialogForm.typeId){
-              let obj = {
-                typeId:this.dialogForm.typeId,
-                typeName:this.dialogForm.typeName,
-                typeKey:this.dialogForm.typeKey,
-                state:this.dialogForm.state,
-                remark:this.dialogForm.remark,
-              }
-              iotTypeUpdate(obj).then(response => {
-                this.msgSuccess(response.message);
-                this.getList();
-                this.$set(this,'dialogType',false);
-              });
-            }else{
-              iotTypeAdd(this.dialogForm).then(response => {
-                this.msgSuccess(response.message);
-                this.getList();
-                this.$set(this,'dialogType',false);
-              });
-            }
-          }
-        })
-      },
-      handleQuery(){
-        this.$set(this.queryParams,'page',1);
-        this.getList();
-      },
-      resetQuery(){
-        this.$set(this,'queryParams',{
-          page:1,
-          pageSize:20,
-          searchValue :"",
-          state :null,
-        });
-        this.getList();
-      },
-      dialogFormReset(){
-        this.$set(this,'dialogForm',{
-          typeName:"",
-          typeKey:"",
-          state:true,
-          remark:"",
-        });
-      },
       //获取数据列表
       getList(){
         this.$set(this,'loading',true);
@@ -309,6 +246,8 @@
           //详情
           this.$set(this,'propsData',JSON.parse(JSON.stringify(row)));
           this.$set(this,'pageType',2);
+        }else if(type ==7){
+          this.$set(this,'pageType',1);
         }
       },
     },
@@ -316,31 +255,7 @@
 </script>
 
 <style scoped lang="scss">
-/*导出按钮样式*/
-.form-dropdown-box{
-  display: flex;
-  margin:0;
-  padding:0 10px;
-  cursor: pointer;
-  height:40px;
-  img:nth-child(1){
-    width:16px;
-    height:16px;
-    margin-top:12px;
-  }
-  p{
-    width:47px;
-    text-align: center;
-    font-size:14px;
-    margin:0;
-    line-height:40px;
-  }
-  img:nth-child(3){
-    width:10px;
-    height:6px;
-    margin-top:17px;
-  }
-}
+
 .useLedger{
   .useLedger-page{
 

+ 44 - 4
src/views/chemicalManage/useLedger/infoPage.vue

@@ -143,12 +143,15 @@
         border: 1px dashed #D8D8D8;
       }
       .content-box-right{
+        margin-left:56px ;
         .record{
           width: 1028px;
           height:auto;
           opacity: 1;
-          border: 1px dashed #D8D8D8;
+          border-bottom: 1px dashed #D8D8D8;
+          padding-bottom: 20px;
           .record-li{
+            margin-bottom: 20px;
             .record-li-t{
               display: flex;
               justify-content: space-between;
@@ -167,18 +170,55 @@
               .record-li-t-r{
                 display: flex;
                 >p{
-
+                  width: 100px;
+                  height: 30px;
+                  border-radius: 6px 6px 6px 6px;
+                  opacity: 1;
+                  border: 1px solid #0183FA;
+                  font-size: 16px;
+                  font-family: Microsoft YaHei, Microsoft YaHei;
+                  font-weight: 400;
+                  color: #0183FA;
+                  line-height: 30px;
+                  text-align: center;
+                  margin-left:10px;
+                  cursor: pointer;
                 }
               }
             }
             .record-li-m{
+              display: flex;
+              justify-content: flex-start;
+              border: 1px solid #E0E0E0;
               >p{
-
+                flex: 1;
+                height: 40px;
+                background: #F5F5F5;
+                font-size: 16px;
+                font-family: Microsoft YaHei, Microsoft YaHei;
+                font-weight: 400;
+                color: #333333;
+                line-height: 40px;
+                text-align: center;
+                border-right: 1px solid #E0E0E0;
               }
             }
             .record-li-b{
+              display: flex;
+              justify-content: flex-start;
+              border-bottom: 1px solid #E0E0E0;
+              border-left: 1px solid #E0E0E0;
+              border-right: 1px solid #E0E0E0;
               >p{
-
+                flex: 1;
+                height: 40px;
+                font-size: 14px;
+                font-family: Microsoft YaHei, Microsoft YaHei;
+                font-weight: 400;
+                color: #333333;
+                line-height: 40px;
+                text-align: center;
+                border-right: 1px solid #E0E0E0;
               }
             }
           }