Parcourir la source

登录页面配置等

yuhan il y a 10 mois
Parent
commit
785475228c

BIN
src/assets/logo.png


+ 65 - 27
src/components/layouts/UserLayout.vue

@@ -4,18 +4,19 @@
     <div class="login-header">
       <div class="top-line"></div>
       <div class="iotmenu-header-content">
-        <span class="iotmenu-header-text">联锁管理平台</span>
+        <!-- <span class="iotmenu-header-text">联锁管理平台</span> -->
+         <div class="logo-img" :style="{backgroundImage: `url(${loginConfig.logoPic})`}"></div>
       </div>
     </div>
     <!--  -->
-    <div class="login-content">
+    <div class="login-content" :style="{backgroundImage: `url(${loginConfig.backPic})`}">
       <div class="login-box">
         <route-view></route-view>
       </div>
     </div>
     <!-- 尾部 -->
      <div class="login-footer">
-      <div class="login-footer-text">© 1983-2024 Advantech Co., Ltd.</div>
+      <div class="login-footer-text">{{ loginConfig.companyCopyright }}</div>
      </div>
   </div>
 </template>
@@ -23,20 +24,41 @@
 <script>
   import RouteView from "@/components/layouts/RouteView"
   import { mixinDevice } from '@/utils/mixin.js'
+  import { getAction, postAction } from '@api/manage'
 
   export default {
     name: "UserLayout",
     components: { RouteView },
     mixins: [mixinDevice],
     data () {
-      return {}
+      return {
+        loginConfig: {
+          logoPic: require('@/assets/logo.png'),
+          backPic: require('@/assets/login.png'),
+          companyCopyright: '© 1983-2024 Advantech Co., Ltd.',
+        },
+        url: '/interlockLoginConfig/interlockLoginConfig/list'
+      }
     },
     mounted () {
       document.body.classList.add('userLayout')
     },
+    created(){
+      this.getLoginConfig()
+    },
     beforeDestroy () {
       document.body.classList.remove('userLayout')
     },
+    methods: {
+      getLoginConfig(){
+        getAction(this.url).then(res=>{
+          console.log(res.result.records[0])
+          this.loginConfig.logoPic = res.result.records[0].logoPic ? window._CONFIG['staticDomainURL'] + "/" + res.result.records[0].logoPic : require('@/assets/logo.png')
+          this.loginConfig.backPic = res.result.records[0].backPic ? window._CONFIG['staticDomainURL'] + "/" +  res.result.records[0].backPic : require('@/assets/login.png')
+          this.loginConfig.companyCopyright = res.result.records[0].companyCopyright ? res.result.records[0].companyCopyright : '© 1983-2024 Advantech Co., Ltd.'
+        })
+      }
+    },
   }
 </script>
 
@@ -70,6 +92,17 @@
           margin: 0 10px 0 0 !important;
         }
       }
+      .logo-img{
+        width: 100%;
+        height: 26px;
+        position: absolute;
+        left: 30px;
+        top: 50%;
+        transform: translateY(-50%);
+        // background: url('../../assets/logo.png');
+        background-repeat: no-repeat;
+        background-size: contain;
+      }
     }
     .iotmenu-header-text{
       font-size: 23px;
@@ -82,9 +115,10 @@
   .login-content{
     width: 100%;
     height: calc(100vh - 38px - 56px);
-    // background: url('../../assets/login.png') no-repeat;
-    // background-size: cover;
-    // background-position: center 50%;
+    // background: url('../../assets/login.png');
+    background-repeat: no-repeat;
+    background-size: cover;
+    background-position: center 50%;
     position: relative;
     .login-box{
       width: 400px;
@@ -108,26 +142,30 @@
     }
   }
 }
-@media (min-width: 1281px){
-  .iot-login .login-content{
-    background: url('../../assets/login.png') no-repeat;
-    background-size: cover;
-    background-position: center 50%;
-    .login-box{
-      right: 30%;
-    }
-  }
-}
-@media (max-width: 1280px){
-  .iot-login .login-content{
-    background: url('../../assets/login1024.png') no-repeat;
-    background-size: cover;
-    background-position: center 50%;
-    .login-box{
-      right: 50%;
-    }
-  }
-}
+// @media (min-width: 1281px){
+//   .iot-login .login-content{
+//     background: url('../../assets/login.png');
+//     background-repeat: no-repeat;
+//     background-size: cover;
+//     background-position: center 50%;
+//     .login-box{
+//       right: 30%;
+//     }
+//   }
+// }
+// @media (max-width: 1280px){
+//   .iot-login .login-content{
+//     background: url('../../assets/login1024.png') no-repeat;
+//     background-size: cover;
+//     background-position: center 50%;
+//     .login-box{
+//       right: 50%;
+//     }
+//   }
+// }
+
+
+
 // @media (max-width: 1919px) and (min-width: 1441px){
 //   .iot-login .login-content .login-box{
 //     left: 55.56%;

+ 83 - 122
src/views/module_interLock/loginConfig/LoginConfigList.vue

@@ -1,96 +1,57 @@
 <template>
-  <a-card :bordered="false">
-    <!-- 查询区域 -->
-    <div class="table-page-search-wrapper">
-      <a-form layout="inline" @keyup.enter.native="searchQuery">
-        <a-row :gutter="24">
-        </a-row>
-      </a-form>
+  <div style="height: 100%;">
+    <div class="iotmenu-content-header">
+      <a-icon type="file-text" />
+      <span>登录配置</span>
     </div>
-    <!-- 查询区域-END -->
+    <a-card :bordered="false" class="iotmenu-content">
+      <div>
+        <a-table
+          ref="table"
+          size="middle"
+          :scroll="{x:true}"
+          rowKey="id"
+          :columns="columns"
+          :dataSource="dataSource"
+          :pagination="ipagination"
+          :loading="loading"
+          class="j-table-force-nowrap"
+          @change="handleTableChange">
+          <!-- :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" -->
 
-    <!-- 操作按钮区域 -->
-    <div class="table-operator">
-      <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
-      <a-button type="primary" icon="download" @click="handleExportXls('联锁登陆页配置表')">导出</a-button>
-      <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
-        <a-button type="primary" icon="import">导入</a-button>
-      </a-upload>
-      <!-- 高级查询区域 -->
-      <j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query>
-      <a-dropdown v-if="selectedRowKeys.length > 0">
-        <a-menu slot="overlay">
-          <a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item>
-        </a-menu>
-        <a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button>
-      </a-dropdown>
-    </div>
-
-    <!-- table区域-begin -->
-    <div>
-      <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
-        <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>项
-        <a style="margin-left: 24px" @click="onClearSelected">清空</a>
-      </div>
-
-      <a-table
-        ref="table"
-        size="middle"
-        :scroll="{x:true}"
-        bordered
-        rowKey="id"
-        :columns="columns"
-        :dataSource="dataSource"
-        :pagination="ipagination"
-        :loading="loading"
-        :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
-        class="j-table-force-nowrap"
-        @change="handleTableChange">
+          <template slot="htmlSlot" slot-scope="text">
+            <div v-html="text"></div>
+          </template>
+          <template slot="imgSlot" slot-scope="text,record">
+            <span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span>
+            <img v-else :src="getImgView(text)" :preview="record.id" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/>
+          </template>
+          <template slot="fileSlot" slot-scope="text">
+            <span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
+            <a-button
+              v-else
+              :ghost="true"
+              type="primary"
+              icon="download"
+              size="small"
+              @click="downloadFile(text)">
+              下载
+            </a-button>
+          </template>
 
-        <template slot="htmlSlot" slot-scope="text">
-          <div v-html="text"></div>
-        </template>
-        <template slot="imgSlot" slot-scope="text,record">
-          <span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span>
-          <img v-else :src="getImgView(text)" :preview="record.id" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/>
-        </template>
-        <template slot="fileSlot" slot-scope="text">
-          <span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
-          <a-button
-            v-else
-            :ghost="true"
-            type="primary"
-            icon="download"
-            size="small"
-            @click="downloadFile(text)">
-            下载
-          </a-button>
-        </template>
+          <span slot="action" slot-scope="text, record">
+            <a-tooltip style="margin-right: 10px;">
+              <template slot="title"> 设置 </template>
+              <span class="edit-btn" @click="handleEdit(record)"></span>
+            </a-tooltip>
+          </span>
 
-        <span slot="action" slot-scope="text, record">
-          <a @click="handleEdit(record)">编辑</a>
-
-          <a-divider type="vertical" />
-          <a-dropdown>
-            <a class="ant-dropdown-link">更多 <a-icon type="down" /></a>
-            <a-menu slot="overlay">
-              <a-menu-item>
-                <a @click="handleDetail(record)">详情</a>
-              </a-menu-item>
-              <a-menu-item>
-                <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
-                  <a>删除</a>
-                </a-popconfirm>
-              </a-menu-item>
-            </a-menu>
-          </a-dropdown>
-        </span>
-
-      </a-table>
-    </div>
+        </a-table>
+      </div>
 
-    <login-config-modal ref="modalForm" @ok="modalFormOk"></login-config-modal>
-  </a-card>
+      <login-config-modal ref="modalForm" @ok="modalFormOk"></login-config-modal>
+    </a-card>
+  </div>
 </template>
 
 <script>
@@ -111,22 +72,16 @@
         description: '联锁登陆页配置表管理页面',
         // 表头
         columns: [
-          {
-            title: '#',
-            dataIndex: '',
-            key:'rowIndex',
-            width:60,
-            align:"center",
-            customRender:function (t,r,index) {
-              return parseInt(index)+1;
-            }
-          },
-          {
-            title:'背景图片',
-            align:"center",
-            dataIndex: 'backPic',
-            scopedSlots: {customRender: 'imgSlot'}
-          },
+          // {
+          //   title: '#',
+          //   dataIndex: '',
+          //   key:'rowIndex',
+          //   width:60,
+          //   align:"center",
+          //   customRender:function (t,r,index) {
+          //     return parseInt(index)+1;
+          //   }
+          // },
           {
             title:'logo图片',
             align:"center",
@@ -134,22 +89,28 @@
             scopedSlots: {customRender: 'imgSlot'}
           },
           {
-            title:'公司网址',
-            align:"center",
-            dataIndex: 'companyUrl'
-          },
-          {
-            title:'公司地址',
-            align:"center",
-            dataIndex: 'companyAddress'
-          },
-          {
-            title:'公司电话',
+            title:'背景图片',
             align:"center",
-            dataIndex: 'companyTelephone'
+            dataIndex: 'backPic',
+            scopedSlots: {customRender: 'imgSlot'}
           },
+          // {
+          //   title:'公司网址',
+          //   align:"center",
+          //   dataIndex: 'companyUrl'
+          // },
+          // {
+          //   title:'公司地址',
+          //   align:"center",
+          //   dataIndex: 'companyAddress'
+          // },
+          // {
+          //   title:'公司电话',
+          //   align:"center",
+          //   dataIndex: 'companyTelephone'
+          // },
           {
-            title:'公司版权',
+            title:'版权',
             align:"center",
             dataIndex: 'companyCopyright'
           },
@@ -158,16 +119,16 @@
             dataIndex: 'action',
             align:"center",
             fixed:"right",
-            width:147,
+            width:100,
             scopedSlots: { customRender: 'action' }
           }
         ],
         url: {
-          list: "/loginConfig/loginConfig/list",
-          delete: "/loginConfig/loginConfig/delete",
-          deleteBatch: "/loginConfig/loginConfig/deleteBatch",
-          exportXlsUrl: "/loginConfig/loginConfig/exportXls",
-          importExcelUrl: "loginConfig/loginConfig/importExcel",
+          list: "/interlockLoginConfig/interlockLoginConfig/list",
+          // delete: "/jeecg-boot/interlockLoginConfig/interlockLoginConfig/delete",
+          // deleteBatch: "/loginConfig/loginConfig/deleteBatch",
+          // exportXlsUrl: "/loginConfig/loginConfig/exportXls",
+          // importExcelUrl: "loginConfig/loginConfig/importExcel",
           
         },
         dictOptions:{},

+ 24 - 12
src/views/module_interLock/loginConfig/modules/LoginConfigForm.vue

@@ -4,16 +4,16 @@
       <a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail">
         <a-row>
           <a-col :span="24">
-            <a-form-model-item label="背景图片" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="backPic">
-              <j-image-upload isMultiple  v-model="model.backPic" ></j-image-upload>
-            </a-form-model-item>
-          </a-col>
-          <a-col :span="24">
             <a-form-model-item label="logo图片" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="logoPic">
               <j-image-upload isMultiple  v-model="model.logoPic" ></j-image-upload>
             </a-form-model-item>
           </a-col>
           <a-col :span="24">
+            <a-form-model-item label="背景图片" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="backPic">
+              <j-image-upload isMultiple  v-model="model.backPic" ></j-image-upload>
+            </a-form-model-item>
+          </a-col>
+          <!-- <a-col :span="24">
             <a-form-model-item label="公司网址" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="companyUrl">
               <a-input v-model="model.companyUrl" placeholder="请输入公司网址"  ></a-input>
             </a-form-model-item>
@@ -27,10 +27,10 @@
             <a-form-model-item label="公司电话" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="companyTelephone">
               <a-input v-model="model.companyTelephone" placeholder="请输入公司电话"  ></a-input>
             </a-form-model-item>
-          </a-col>
+          </a-col> -->
           <a-col :span="24">
-            <a-form-model-item label="公司版权" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="companyCopyright">
-              <a-input v-model="model.companyCopyright" placeholder="请输入公司版权"  ></a-input>
+            <a-form-model-item label="版权所有" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="companyCopyright">
+              <a-input v-model="model.companyCopyright" placeholder="请输入版权所有"></a-input>
             </a-form-model-item>
           </a-col>
         </a-row>
@@ -59,7 +59,10 @@
     data () {
       return {
         model:{
-         },
+          logoPic: '',
+          backPic: '',
+          companyCopyright: '© 1983-2024 Advantech Co., Ltd.'
+        },
         labelCol: {
           xs: { span: 24 },
           sm: { span: 5 },
@@ -70,11 +73,20 @@
         },
         confirmLoading: false,
         validatorRules: {
+          logoPic: [
+            { required: true, message: '请输入logo图片!', },
+          ],
+          backPic: [
+            { required: true, message: '请输入背景图片!', },
+          ],
+          companyCopyright: [
+            { required: true, message: '请输入版权所有!', },
+          ],
         },
         url: {
-          add: "/loginConfig/loginConfig/add",
-          edit: "/loginConfig/loginConfig/edit",
-          queryById: "/loginConfig/loginConfig/queryById"
+          add: "/interlockLoginConfig/interlockLoginConfig/add",
+          edit: "/interlockLoginConfig/interlockLoginConfig/edit",
+          // queryById: "/loginConfig/loginConfig/queryById"
         }
       }
     },

+ 4 - 4
src/views/module_interLock/systemUser/modules/SystemUserForm.vue

@@ -128,10 +128,10 @@
       formDisabled(){
         return this.disabled
       },
-      isSsoManage(){
-        return cookie.get('SSORole') === 'globalAdmin'
-        // return this.$store.getters.userInfo.role === '0'
-      },
+      // isSsoManage(){
+      //   return cookie.get('SSORole') === 'globalAdmin'
+      //   // return this.$store.getters.userInfo.role === '0'
+      // },
     },
     created () {
        //备份model原始值

+ 6 - 5
src/views/user/Login.vue

@@ -1,7 +1,7 @@
 <template>
   <div class="main iot-login-content">
-    <div class="top-img"></div>
-    <div class="sign-text">登录到 联锁管理平台</div>
+    <!-- <div class="top-img"></div> -->
+    <div class="sign-text">联锁管理系统</div>
     <a-form-model class="user-layout-login" @keyup.enter.native="handleSubmit">
       <a-tabs :activeKey="customActiveKey" :tabBarStyle="{ textAlign: 'center', borderBottom: 'unset' }"  @change="handleTabClick" class="u-login-tabs">
         <a-tab-pane key="sso" tab="SSO">
@@ -212,9 +212,10 @@ export default {
   .sign-text{
     width: 100%;
     height: 32px;
-    font-size: 16px;
-    font-weight: 400;
-    color: #646464;
+    font-size: 23px;
+    font-weight: 700;
+    color: #004280;
+    // color: #646464;
     margin-top: 8px;
   }