Ver código fonte

修改登录页背景图logo样式

ZYZ 1 ano atrás
pai
commit
d1eb7c41cd

+ 8 - 8
zkqy-ui/src/permission.js

@@ -1,14 +1,14 @@
 import router from './router'
 import store from './store'
-import {Message} from 'element-ui'
+import { Message } from 'element-ui'
 import NProgress from 'nprogress'
 import 'nprogress/nprogress.css'
-import {getToken} from '@/utils/auth'
-import {isRelogin} from '@/utils/request'
+import { getToken } from '@/utils/auth'
+import { isRelogin } from '@/utils/request'
 
-NProgress.configure({showSpinner: false})
+NProgress.configure({ showSpinner: false })
 
-const whiteList = ['/login', '/register', '/404', '/adminLogin','/401']
+const whiteList = ['/login', '/register', '/404', '/adminLogin', '/401', '/loading']
 
 router.beforeEach((to, from, next) => {
   NProgress.start()
@@ -16,7 +16,7 @@ router.beforeEach((to, from, next) => {
     to.meta.title && store.dispatch('settings/setTitle', to.meta.title)
     /* has token*/
     if (to.path === '/login') {
-      next({path: '/'})
+      next({ path: '/' })
       NProgress.done()
     } else {
       if (store.getters.roles.length === 0) {
@@ -27,12 +27,12 @@ router.beforeEach((to, from, next) => {
           store.dispatch('GenerateRoutes').then(accessRoutes => {
             // 根据roles权限生成可访问的路由表
             router.addRoutes(accessRoutes) // 动态添加可访问路由表
-            next({...to, replace: true}) // hack方法 确保addRoutes已完成
+            next({ ...to, replace: true }) // hack方法 确保addRoutes已完成
           })
         }).catch(err => {
           store.dispatch('LogOut').then(() => {
             Message.error(err)
-            next({path: '/'})
+            next({ path: '/' })
           })
         })
       } else {

+ 17 - 12
zkqy-ui/src/router/index.js

@@ -1,6 +1,6 @@
 import Vue from 'vue'
 import Router from 'vue-router'
-import {getQueryParams} from '@/utils/other'
+import { getQueryParams } from '@/utils/other'
 
 Vue.use(Router)
 
@@ -44,7 +44,7 @@ export const constantRoutes = [
   //     }
   //   ]
   // },
-  
+
   {
     path: '/redirect',
     component: Layout,
@@ -190,6 +190,11 @@ export const constantRoutes = [
     component: () => import('@/views/error/401'),
     hidden: true
   },
+  {
+    path: '/loading',
+    component: () => import('@/views/loading'),
+    hidden: true
+  },
   {
     path: '',
     component: Layout,
@@ -230,7 +235,7 @@ export const constantRoutes = [
         path: 'profile',
         component: () => import('@/views/system/user/profile/index'),
         name: 'Profile',
-        meta: {title: '个人中心', icon: 'user'}
+        meta: { title: '个人中心', icon: 'user' }
       }
     ]
   },
@@ -250,7 +255,7 @@ export const dynamicRoutes = [
         component: () => import('@/views/system/data/index'),
         // component: (resolve) => require(['@/views/system/data/index'], resolve),
         name: 'AuthRole',
-        meta: {title: '数据源配置', activeMenu: '/system/data'}
+        meta: { title: '数据源配置', activeMenu: '/system/data' }
       }
     ]
   },
@@ -265,7 +270,7 @@ export const dynamicRoutes = [
         component: () => import('@/views/system/user/authRole'),
         // component: (resolve) => require(['@/views/system/user/authRole'], resolve),
         name: 'AuthRole',
-        meta: {title: '分配角色', activeMenu: '/system/user'}
+        meta: { title: '分配角色', activeMenu: '/system/user' }
       }
     ]
   },
@@ -280,7 +285,7 @@ export const dynamicRoutes = [
         component: () => import('@/views/system/fromModel/index'),
         // component: (resolve) => require(['@/views/system/fromModel/index'], resolve),
         name: 'fromModel',
-        meta: {title: '表单建模', activeMenu: '/system/fromModel/index'}
+        meta: { title: '表单建模', activeMenu: '/system/fromModel/index' }
       },
       // {
       //   path: '/fromModel/:index',
@@ -302,7 +307,7 @@ export const dynamicRoutes = [
         component: () => import('@/views/system/role/authUser'),
         // component: (resolve) => require(['@/views/system/role/authUser'], resolve),
         name: 'AuthUser',
-        meta: {title: '分配用户', activeMenu: '/system/role'}
+        meta: { title: '分配用户', activeMenu: '/system/role' }
       }
     ]
   },
@@ -317,7 +322,7 @@ export const dynamicRoutes = [
         component: () => import('@/views/system/dict/data'),
         // component: (resolve) => require(['@/views/system/dict/data'], resolve),
         name: 'Data',
-        meta: {title: '字典数据', activeMenu: '/system/dict'}
+        meta: { title: '字典数据', activeMenu: '/system/dict' }
       }
     ]
   },
@@ -333,7 +338,7 @@ export const dynamicRoutes = [
         component: () => import('@/views/system/tenant/dict/data'),
         // component: (resolve) => require(['@/views/system/tenant/dict/data'], resolve),
         name: 'TenantData',
-        meta: {title: '字典数据', activeMenu: '/system/tenant/dict'}
+        meta: { title: '字典数据', activeMenu: '/system/tenant/dict' }
       }
     ]
   },
@@ -349,7 +354,7 @@ export const dynamicRoutes = [
         component: () => import('@/views/monitor/job/log'),
         // component: (resolve) => require(['@/views/monitor/job/log'], resolve),
         name: 'JobLog',
-        meta: {title: '调度日志', activeMenu: '/monitor/job'}
+        meta: { title: '调度日志', activeMenu: '/monitor/job' }
       }
     ]
   },
@@ -365,7 +370,7 @@ export const dynamicRoutes = [
 
         // component: (resolve) => require(['@/views/tool/gen/editTable'], resolve),
         name: 'GenEdit',
-        meta: {title: '修改生成配置', activeMenu: '/tool/gen'}
+        meta: { title: '修改生成配置', activeMenu: '/tool/gen' }
       }
     ]
   }
@@ -386,6 +391,6 @@ Router.prototype.replace = function push(location) {
 
 export default new Router({
   mode: 'history', // 去掉url中的#
-  scrollBehavior: () => ({y: 0}),
+  scrollBehavior: () => ({ y: 0 }),
   routes: constantRoutes
 })

+ 1 - 1
zkqy-ui/src/views/index.vue

@@ -56,7 +56,7 @@
       <div class="tenant-name">{{ tenantName }}</div>
       <div class="date">{{ date }}</div> -->
       <!-- <div class="title">欢迎登录Mec OS 工业应用操作系统</div> -->
-      <div class="title mt20">欢迎登录工业应用操作系统</div>
+      <div class="title mt20">欢迎登录工业应用引擎</div>
     </div>
   </div>
 </template>

+ 211 - 0
zkqy-ui/src/views/loading.vue

@@ -0,0 +1,211 @@
+<template>
+  <div id="app">
+    <div id="loader-wrapper">
+      <div id="loader"></div>
+      <div class="loader-section section-left"></div>
+      <div class="loader-section section-right"></div>
+      <div class="load_title">正在加载系统资源,请耐心等待</div>
+    </div>
+  </div>
+</template>
+
+<script>
+export default {
+  name: "loading",
+  props: [],
+  components: {},
+  data() {
+    return {};
+  },
+  computed: {},
+  methods: {},
+  onMounted() {},
+};
+</script>
+
+<style scoped lang="scss">
+html,
+body,
+#app {
+  height: 100%;
+  margin: 0px;
+  padding: 0px;
+}
+
+.chromeframe {
+  margin: 0.2em 0;
+  background: #ccc;
+  color: #000;
+  padding: 0.2em 0;
+}
+
+#loader-wrapper {
+  position: fixed;
+  top: 0;
+  left: 0;
+  width: 100%;
+  height: 100%;
+  z-index: 999999;
+}
+
+#loader {
+  display: block;
+  position: relative;
+  left: 50%;
+  top: 50%;
+  width: 150px;
+  height: 150px;
+  margin: -75px 0 0 -75px;
+  border-radius: 50%;
+  border: 3px solid transparent;
+  border-top-color: #fff;
+  -webkit-animation: spin 2s linear infinite;
+  -ms-animation: spin 2s linear infinite;
+  -moz-animation: spin 2s linear infinite;
+  -o-animation: spin 2s linear infinite;
+  animation: spin 2s linear infinite;
+  z-index: 1001;
+}
+
+#loader:before {
+  content: "";
+  position: absolute;
+  top: 5px;
+  left: 5px;
+  right: 5px;
+  bottom: 5px;
+  border-radius: 50%;
+  border: 3px solid transparent;
+  border-top-color: #fff;
+  -webkit-animation: spin 3s linear infinite;
+  -moz-animation: spin 3s linear infinite;
+  -o-animation: spin 3s linear infinite;
+  -ms-animation: spin 3s linear infinite;
+  animation: spin 3s linear infinite;
+}
+
+#loader:after {
+  content: "";
+  position: absolute;
+  top: 15px;
+  left: 15px;
+  right: 15px;
+  bottom: 15px;
+  border-radius: 50%;
+  border: 3px solid transparent;
+  border-top-color: #fff;
+  -moz-animation: spin 1.5s linear infinite;
+  -o-animation: spin 1.5s linear infinite;
+  -ms-animation: spin 1.5s linear infinite;
+  -webkit-animation: spin 1.5s linear infinite;
+  animation: spin 1.5s linear infinite;
+}
+
+@-webkit-keyframes spin {
+  0% {
+    -webkit-transform: rotate(0deg);
+    -ms-transform: rotate(0deg);
+    transform: rotate(0deg);
+  }
+
+  100% {
+    -webkit-transform: rotate(360deg);
+    -ms-transform: rotate(360deg);
+    transform: rotate(360deg);
+  }
+}
+
+@keyframes spin {
+  0% {
+    -webkit-transform: rotate(0deg);
+    -ms-transform: rotate(0deg);
+    transform: rotate(0deg);
+  }
+
+  100% {
+    -webkit-transform: rotate(360deg);
+    -ms-transform: rotate(360deg);
+    transform: rotate(360deg);
+  }
+}
+
+#loader-wrapper .loader-section {
+  position: fixed;
+  top: 0;
+  width: 51%;
+  height: 100%;
+  background: #7171c6;
+  z-index: 1000;
+  -webkit-transform: translateX(0);
+  -ms-transform: translateX(0);
+  transform: translateX(0);
+}
+
+#loader-wrapper .loader-section.section-left {
+  left: 0;
+}
+
+#loader-wrapper .loader-section.section-right {
+  right: 0;
+}
+
+.loaded #loader-wrapper .loader-section.section-left {
+  -webkit-transform: translateX(-100%);
+  -ms-transform: translateX(-100%);
+  transform: translateX(-100%);
+  -webkit-transition: all 0.7s 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);
+  transition: all 0.7s 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);
+}
+
+.loaded #loader-wrapper .loader-section.section-right {
+  -webkit-transform: translateX(100%);
+  -ms-transform: translateX(100%);
+  transform: translateX(100%);
+  -webkit-transition: all 0.7s 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);
+  transition: all 0.7s 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);
+}
+
+.loaded #loader {
+  opacity: 0;
+  -webkit-transition: all 0.3s ease-out;
+  transition: all 0.3s ease-out;
+}
+
+.loaded #loader-wrapper {
+  visibility: hidden;
+  -webkit-transform: translateY(-100%);
+  -ms-transform: translateY(-100%);
+  transform: translateY(-100%);
+  -webkit-transition: all 0.3s 1s ease-out;
+  transition: all 0.3s 1s ease-out;
+}
+
+.no-js #loader-wrapper {
+  display: none;
+}
+
+.no-js h1 {
+  color: #222222;
+}
+
+#loader-wrapper .load_title {
+  font-family: "Open Sans";
+  color: #fff;
+  font-size: 19px;
+  width: 100%;
+  text-align: center;
+  z-index: 9999999999999;
+  position: absolute;
+  top: 60%;
+  opacity: 1;
+  line-height: 30px;
+}
+
+#loader-wrapper .load_title span {
+  font-weight: normal;
+  font-style: italic;
+  font-size: 13px;
+  color: #fff;
+  opacity: 0.5;
+}
+</style>

+ 53 - 63
zkqy-ui/src/views/login.vue

@@ -8,7 +8,8 @@
       ref="loginForm"
       :model="loginForm"
       :rules="loginRules"
-      class="login-form">
+      class="login-form"
+    >
       <el-row>
         <el-col :span="12" class="comlogo"></el-col>
         <el-col :span="12">
@@ -16,8 +17,7 @@
             · 工业应用引擎
             <!-- 智能制造平台 -->
           </div>
-        </el-col
-        >
+        </el-col>
       </el-row>
       <el-row class="rowww">
         <el-col :span="12" class="text" prop="username">用户名</el-col>
@@ -60,7 +60,7 @@
           </el-col>
           <el-col :span="4" :offset="1">
             <div class="login-code">
-              <img :src="codeUrl" @click="getCode" class="login-code-img"/>
+              <img :src="codeUrl" @click="getCode" class="login-code-img" />
             </div>
           </el-col>
         </el-row>
@@ -71,9 +71,8 @@
           <img :src="codeUrl" @click="getCode" class="login-code-img" />
         </div> -->
         <el-checkbox v-model="loginForm.rememberMe" class="aaa"
-        >在这个设备上记住我
-        </el-checkbox
-        >
+          >在这个设备上记住我
+        </el-checkbox>
       </el-row>
 
       <el-row>
@@ -81,19 +80,18 @@
           class="logg"
           :loading="loading"
           @click.native.prevent="handleLogin"
-        >登录
-        </el-col
-        >
+          >登录
+        </el-col>
       </el-row>
     </el-form>
   </div>
 </template>
 
 <script>
-import {getCodeImg, isTenantExist} from "@/api/login";
-import {changeDatasource} from "@/api/dataEngine";
+import { getCodeImg, isTenantExist } from "@/api/login";
+import { changeDatasource } from "@/api/dataEngine";
 import Cookies from "js-cookie";
-import {encrypt, decrypt} from "@/utils/jsencrypt";
+import { encrypt, decrypt } from "@/utils/jsencrypt";
 
 export default {
   name: "Login",
@@ -110,16 +108,16 @@ export default {
         rememberMe: false,
         code: "",
         uuid: "",
-        tenantID: ""
+        tenantID: "",
       },
       loginRules: {
         username: [
-          {required: true, trigger: "blur", message: "请输入您的账号"},
+          { required: true, trigger: "blur", message: "请输入您的账号" },
         ],
         password: [
-          {required: true, trigger: "blur", message: "请输入您的密码"},
+          { required: true, trigger: "blur", message: "请输入您的密码" },
         ],
-        code: [{required: true, trigger: "blur", message: "请输入验证码"}],
+        code: [{ required: true, trigger: "blur", message: "请输入验证码" }],
       },
       loading: true,
       // 验证码开关
@@ -140,49 +138,44 @@ export default {
     },
   },
   created() {
-    this.validateTenantId()
+    this.validateTenantId();
   },
   methods: {
     handleBlur(event) {
-      if (event.target.value.toLowerCase() === 'admin') {
-        this.loginForm.username = '';
-        this.$message.warning("请使用当前租户下的账号登录!")
+      if (event.target.value.toLowerCase() === "admin") {
+        this.loginForm.username = "";
+        this.$message.warning("请使用当前租户下的账号登录!");
       }
-      if (event.target.value.toLowerCase() === 'Admin') {
-        this.loginForm.username = '';
-        this.$message.warning("请使用当前租户下的账号登录!")
+      if (event.target.value.toLowerCase() === "Admin") {
+        this.loginForm.username = "";
+        this.$message.warning("请使用当前租户下的账号登录!");
       }
     },
     // 校验url
     validateTenantId() {
-      let tenantCode = this.$route.query['tenantCode']
-      console.log("租户登录", tenantCode);
+      let tenantCode = this.$route.query["tenantCode"];
       if (tenantCode != null) {
         // 得到tenantId 查询裤中是否存在该租户
-        isTenantExist({tenantCode: tenantCode}).then(res => {
-          if (res.data?.tenantId) { // 判断当前编号是否存在库中
+        isTenantExist({ tenantCode: tenantCode }).then((res) => {
+          if (res == undefined) {
+            this.$router.push({ path: "/401" });
+          } else if (res.data?.tenantId) {
+            // 判断当前编号是否存在库中
             this.tenantId = res.data.tenantId;
             this.loginForm.tenantID = this.tenantId;
-            // 得到租户的信息
-            this.config = res.data.loginPageConfiguration
-            this.setConfig();
-            // 如果当前租户没有配置登录页面则不可访问
-            if (this.config == null && this.config == undefined) {
-              // this.$router.push({path: "/404"})
-              this.getCode();
-              this.getCookie();
-            } else {
-              this.getCode();
-              this.getCookie();
+            if (res.data.loginPageConfiguration != null) {
+              // 得到租户的信息
+              this.config = res.data.loginPageConfiguration;
+              this.setConfig();
             }
           } else {
+            console.log("租户有问题!");
             // 当前访问链接中的租户编号不存在
-            this.$router.push({path: "/404"})
+            this.$router.push({ path: "/401" });
           }
-        })
+        });
       } else {
-        console.log('跳转')
-        this.$router.push({path: "/404"})
+        this.$router.push({ path: "/401" });
       }
     },
     setConfig() {
@@ -202,10 +195,6 @@ export default {
           loginBgDom[0].style.backgroundImage = `url(${
             process.env.VUE_APP_BASE_IMG_API + loginPageBackgroundImage
           })`;
-
-          console.log("" + `url(${
-            process.env.VUE_APP_BASE_IMG_API + loginPageBackgroundImage
-          })`)
         }
       }
 
@@ -237,7 +226,6 @@ export default {
       if (loginPageDescription) {
         this.config.pageDescription = loginPageDescription;
       }
-
     },
     getCode() {
       getCodeImg().then((res) => {
@@ -266,7 +254,7 @@ export default {
         if (valid) {
           this.loading = true;
           if (this.loginForm.rememberMe) {
-            Cookies.set("username", this.loginForm.username, {expires: 30});
+            Cookies.set("username", this.loginForm.username, { expires: 30 });
             Cookies.set("password", encrypt(this.loginForm.password), {
               expires: 30,
             });
@@ -280,18 +268,20 @@ export default {
           }
           let form = {
             ...this.loginForm,
-            tenantID: this.tenantId
-          }
-          this.$store.dispatch("Login", form).then(() => {
-            // changeDatasource(); //切换数据源
-            this.$router.push({path: this.redirect || "/"}).catch(() => {
+            tenantID: this.tenantId,
+          };
+          this.$store
+            .dispatch("Login", form)
+            .then(() => {
+              // changeDatasource(); //切换数据源
+              this.$router.push({ path: this.redirect || "/" }).catch(() => {});
+            })
+            .catch(() => {
+              this.loading = false;
+              if (this.captchaEnabled) {
+                this.getCode();
+              }
             });
-          }).catch(() => {
-            this.loading = false;
-            if (this.captchaEnabled) {
-              this.getCode();
-            }
-          });
         }
       });
     },
@@ -349,9 +339,9 @@ export default {
   opacity: 1;
   border-radius: 27px;
   background: linear-gradient(
-      135deg,
-      rgba(79, 138, 255, 1) 0%,
-      rgba(75, 94, 255, 1) 100%
+    135deg,
+    rgba(79, 138, 255, 1) 0%,
+    rgba(75, 94, 255, 1) 100%
   );
   box-shadow: 0px 4px 16px rgba(179, 192, 231, 1);
   color: #fff;

+ 15 - 0
zkqy-ui/src/views/system/bpmnPro/components/Panel/components/ElementUnusualTasks.vue

@@ -331,6 +331,15 @@ export default {
       return formList;
     },
   },
+  watch: {
+    scriptKeyList: {
+      handler: (val) => {
+        console.log('new val',val);
+      },
+      deep: true,
+      immediate: true
+    }
+  },
   methods: {
     // 自定义表单规则
     composeNameValidate(rule, value, callback) {
@@ -441,6 +450,11 @@ export default {
         scriptType: "0",
         industryType,
       };
+      console.log(
+        this.allScriptList(),
+        condition,
+        filterUtil(condition, this.allScriptList())
+      );
       this.scriptKeyList = filterUtil(condition, this.allScriptList()).map(
         (item) => ({
           value: item.scriptKey,
@@ -448,6 +462,7 @@ export default {
           tableName: item.tableName,
         })
       );
+      console.log(JSON.parse(JSON.stringify(this.scriptKeyList)));
     },
     async getDragFormList() {
       try {

+ 2 - 2
zkqy-ui/src/views/system/excuteBtnMange/index.vue

@@ -89,7 +89,7 @@
         prop="btnGroupName"
         label="按钮组名称"
         :show-overflow-tooltip="true"
-        width="160"
+        width="250"
         align="center"
       ></el-table-column>
       <el-table-column prop="btnIcon" label="图标" align="center" width="100">
@@ -1587,7 +1587,7 @@ export default {
       console.log(this.btnHidenCondtionData);
       if (this.btnHidenCondtionData.length == 0) return "";
       let temp = this.btnHidenCondtionData.filter((item) => {
-        return item.fieldName && item.mark && item.refValue;
+        return item.fieldName && item.mark;
       });
       if (temp.length > 0) {
         return JSON.stringify(temp);

+ 5 - 3
zkqy-ui/src/views/system/formGroupMange/index.vue

@@ -465,7 +465,7 @@
         <el-table-column prop="tableName" label="依赖表单">
           <template slot-scope="scope">
             <el-select
-              v-model="scope.row.tableName"
+              v-model="scope.row.formKey"
               placeholder="请选择依赖表单"
               clearable
               filterable
@@ -710,8 +710,9 @@ export default {
     },
     // 依赖的主表单变化回调
     async changeTableName(row) {
-      if (row.tableName) {
-        let tableName = this.getTableNameByFormKey(row.tableName);
+      if (row.formKey) {
+        let tableName = this.getTableNameByFormKey(row.formKey);
+        row.tableName = tableName;
         let data = {
           databaseName: this.databaseName,
           databaseType: this.databaseType,
@@ -740,6 +741,7 @@ export default {
       this.conditionTableData.push({
         fieldName: "", //字段
         type: "", //类型
+        formKey: "", //字段
         tableName: "", //依赖表单
         relaField: "", //依赖字段
         refValue: "", //默认值