CzRger 2 달 전
부모
커밋
b487fc0aa1
4개의 변경된 파일94개의 추가작업 그리고 61개의 파일을 삭제
  1. 0 24
      src/style/czr.scss
  2. 22 1
      src/style/element-plus.scss
  3. 57 4
      src/views/global/login/index.vue
  4. 15 32
      src/views/manage/knowledge/detail.vue

+ 0 - 24
src/style/czr.scss

@@ -13,14 +13,12 @@
     cursor: not-allowed !important;
   }
 }
-
 .__hover {
   &:hover {
     opacity: 0.75;
     cursor: pointer;
   }
 }
-
 .__hover-bg {
   &:hover {
     opacity: 0.75;
@@ -264,12 +262,10 @@
     background-color: var(--czr-main-color);
   }
 }
-
 .__czr-popover {
   max-width: 60% !important;
   width: auto !important;
 }
-
 .__czr-cascader_only-last {
   li[aria-haspopup="true"] {
     .el-checkbox, .el-radio {
@@ -277,7 +273,6 @@
     }
   }
 }
-
 .__check {
   width: 18px;
   height: 18px;
@@ -305,23 +300,6 @@
     opacity: 0.8;
   }
 }
-
-.el-table-filter__list {
-  overflow-y: auto;
-  max-height: 40vh;
-}
-.el-tree-select__popper {
-  .el-tree {
-    .el-tree-node {
-      .el-select-dropdown__item {
-        &:after {
-          display: none;
-        }
-      }
-    }
-  }
-}
-
 .__czr-table-form-column {
   .el-form-item:not(.is-error) {
     margin-bottom: 0 !important;
@@ -342,7 +320,6 @@
     }
   }
 }
-
 .__czr-confirm-dialog {
   .el-dialog {
     padding: 0;
@@ -401,7 +378,6 @@
     }
   }
 }
-
 .__czr-dialog-foot_submit {
   border: 1px solid var(--czr-main-color);
   padding: 0 1.63rem;

+ 22 - 1
src/style/element-plus.scss

@@ -5,4 +5,25 @@
     ),
   ),
 );
- @use "element-plus/theme-chalk/src/index.scss" as *;
+@use "element-plus/theme-chalk/src/index.scss" as *;
+
+.el-table-filter__list {
+ overflow-y: auto;
+ max-height: 40vh;
+}
+
+.el-tree-select__popper {
+ .el-tree {
+  .el-tree-node {
+   .el-select-dropdown__item {
+    &:after {
+     display: none;
+    }
+   }
+  }
+ }
+}
+
+.el-loading-mask {
+  background-color: rgba(255, 255, 255, 0.7);
+}

+ 57 - 4
src/views/global/login/index.vue

@@ -2,18 +2,66 @@
   <div class="login">
     <img class="logo" src="@/assets/images/taiji-logo.png">
     <div class="login-main">
-
+      <div class="flex flex flex-col w-[26.5rem]">
+        <div class="font-bold text-[1.88rem] text-[#373D4C]">欢迎您登录</div>
+        <div class="font-bold text-[1.88rem] text-[#3363DE] mt-4">{{ titleCpt }}</div>
+        <CzrForm :label-width="0" ref="ref_form" @handleEnter="onLogin">
+          <div class="w-full mt-8">
+            <CzrFormColumn
+              required
+              width="100%"
+              v-model:param="state.form.username"
+              placeholder="请输入您的账号"
+              default-error-msg="请输入您的账号"
+              :prefix-icon="User"
+            />
+          </div>
+          <div class="w-full mt-4">
+            <CzrFormColumn
+              required
+              width="100%"
+              v-model:param="state.form.password"
+              type="password"
+              placeholder="请输入您的密码"
+              default-error-msg="请输入您的密码"
+              :prefix-icon="Lock"
+            />
+          </div>
+        </CzrForm>
+        <div class="__hover mt-8 w-full h-[2.5rem] flex items-center justify-center bg-[#3363DE] text-[0.88rem] text-[#ffffff]" @click="onLogin" v-loading="state.loading">登录</div>
+      </div>
     </div>
   </div>
 </template>
 
 <script setup lang="ts">
-import {getCurrentInstance, reactive, ref} from "vue";
+import {computed, getCurrentInstance, reactive, ref} from "vue";
+import { User, Lock } from '@element-plus/icons-vue'
+import {ElMessage} from "element-plus";
 
 const emits = defineEmits([])
 const props = defineProps({})
 const {proxy}: any = getCurrentInstance()
-const state: any = reactive({})
+const state: any = reactive({
+  form: {},
+  loading: false
+})
+const ref_form = ref()
+const titleCpt =  computed(() => import.meta.env.VITE_TITLE)
+const onLogin = () => {
+  if (!state.loading) {
+    ref_form.value.submit().then(() => {
+      state.loading = true
+
+    }).catch((e) => {
+      ElMessage({
+        message: e[0].message,
+        grouping: true,
+        type: 'warning',
+      })
+    })
+  }
+}
 </script>
 
 <style lang="scss" scoped>
@@ -35,7 +83,12 @@ const state: any = reactive({})
     position: absolute;
     right: 0;
     top: 0;
-
+    height: 100%;
+    width: 42.5rem;
+    background-color: var(--czr-dialog-bg);
+    display: flex;
+    justify-content: center;
+    align-items: center;
   }
 }
 </style>

+ 15 - 32
src/views/manage/knowledge/detail.vue

@@ -8,8 +8,15 @@
     height="auto"
     max-height="36rem"
     :loading="state.loading"
-    :show-submit="!isViewCpt"
+    :show-submit="false"
+    :show-close="false"
   >
+    <template #foot>
+      <div class="__czr-dialog-foot_submit __hover" v-if="transfer.mode === 'add'" @click="onCreate(true)">创建并导入</div>
+      <div class="__czr-dialog-foot_cancel __hover" v-if="transfer.mode === 'add'" @click="onCreate(false)">完成创建</div>
+      <div class="__czr-dialog-foot_cancel __hover" v-if="transfer.mode === 'edit'" @click="onSubmit">保存</div>
+      <div class="__czr-dialog-foot_cancel __hover">取消</div>
+    </template>
     <div class="bm-form">
       <div class="__czr-title_1">基本信息</div>
       <CzrForm ref="ref_form" label-width="6.1rem" :form-view="isViewCpt">
@@ -95,37 +102,10 @@ const onSubmit = () => {
       type: "warning",
     } as any).then(() => {
       state.loading = true
-      if (props.transfer.mode == 'add') {
-        // addRuleLogisticsDataSubscribeInfo(Object.assign(state.form, {
-        //   subscribeDataType: 1  //   要传subscribeDataType这个值,"1"表示空运,"2"表示海运
-        // })).then(res => {
-        //   if (res.code == 200) {
-            ElMessage.success('新增成功!')
-            emit('update:show', false)
-            emit('refresh')
-            state.loading = false
-        //   } else {
-        //     ElMessage.error(res.msg)
-        //   }
-        // }).catch(() => {
-        //   state.loading = false
-        // })
-      } else if (props.transfer.mode == 'edit') {
-        // updateRuleLogisticsDataSubscribeInfo(Object.assign(state.form, {
-        //   subscribeDataType: 1  //   要传subscribeDataType这个值,"1"表示空运,"2"表示海运
-        // })).then(res => {
-        //   if (res.code == 200) {
-            ElMessage.success('修改成功!')
-            emit('update:show', false)
-            emit('refresh')
-            state.loading = false
-        //   } else {
-        //     ElMessage.error(res.msg)
-        //   }
-        // }).catch(() => {
-        //   state.loading = false
-        // })
-      }
+      ElMessage.success('新增成功!')
+      emit('update:show', false)
+      emit('refresh')
+      state.loading = false
     }).catch(() => {})
   }).catch((e) => {
     ElMessage({
@@ -135,6 +115,9 @@ const onSubmit = () => {
     })
   })
 }
+const onCreate = (isImport) => {
+
+}
 </script>
 
 <style lang="scss" scoped>