shudonghui 1 rok temu
rodzic
commit
ef663e955f

+ 5 - 5
src/views/login/index.vue

@@ -41,9 +41,9 @@
           :rules="rules"
           v-if="loginType === 'ACCOUNT'"
         >
-          <t-form-item name="mobileNumber">
+          <t-form-item name="loginName">
             <t-input
-              v-model="formData.mobileNumber"
+              v-model="formData.loginName"
               clearable
               placeholder="请输入手机号码"
               size="large"
@@ -192,7 +192,7 @@ const route = useRoute();
 const router = useRouter();
 
 const formData = reactive({
-  mobileNumber: '',
+  loginName: '',
   password: '',
 });
 const formData2 = reactive({
@@ -200,7 +200,7 @@ const formData2 = reactive({
   code: '',
 });
 const rules = {
-  mobileNumber: [
+  loginName: [
     {
       required: true,
       message: '请输入手机号',
@@ -242,7 +242,7 @@ const loginHandle = () => {
         let params =
           loginType.value === 'ACCOUNT'
             ? {
-                mobileNumber: formData.mobileNumber,
+                loginName: formData.loginName,
                 password: getBase64(formData.password),
               }
             : formData2;

+ 43 - 3
src/views/system/notice-log/notice-manage/index.vue

@@ -40,6 +40,10 @@
           {{ noticeTypeFilter(row[col.colKey]) }}
         </template>
         <template #name="{ col, row }">
+          <t-link
+              hover="color"
+              @click="open(row)"
+          >
           <span>{{ row.title }}</span>
           <span>
             【 {{ row.createName + ':'
@@ -49,6 +53,7 @@
                 : '暂未发布'
             }}】
           </span>
+          </t-link>
         </template>
         <template #status="{ col, row }">
           <status-tag :value="row[col.colKey]" type="notice"></status-tag>
@@ -112,6 +117,20 @@
       v-model:visible="showNoticeMessageDialog"
       :curRow="curRow"
     ></notice-message-dialog>
+    <t-drawer
+        v-model:visible="visible"
+        header="通知公告"
+        size="80%"
+        :close-btn="true"
+    >
+      <h2 class="text-center notice-title">{{ curRow?.title }}</h2>
+      <div class="text-center notice-subtitle">创建时间:{{ timestampFilter(curRow?.createTime) }}</div>
+      <div class="notice-content" v-html="curRow?.content"></div>
+
+      <template #footer>
+        <t-button theme="primary" @click="visible = false">返回</t-button>
+      </template>
+    </t-drawer>
   </div>
 </template>
 
@@ -128,12 +147,12 @@ import {
   noticePublishApi,
   noticeCancelPublishApi,
 } from '@/api/system';
-import { dictToOptionList } from '@/utils/tool';
+import {dateFormat, dictToOptionList} from '@/utils/tool';
 import { NOTICE_TYPE, PUBLISH_STATUS } from '@/config/constants';
 import { noticeTypeFilter, timestampFilter } from '@/utils/filter';
 import usePermission from '@/hooks/usePermission';
 const { perm } = usePermission();
-
+const visible = ref(false);
 const showEditNoticeDialog = ref(false);
 const showNoticeMessageDialog = ref(false);
 const curRow = ref(null);
@@ -210,6 +229,7 @@ const columns = [
   { colKey: 'type', title: '类型', cell: 'type', width: 120 },
   { colKey: 'title', title: '消息名称', cell: 'name' },
   { colKey: 'status', title: '发布状态', cell: 'status', width: 120 },
+  { colKey: 'readCount', title: '回执进度', cell: 'readCount', width: 120 },
   {
     title: '管理',
     colKey: 'operate',
@@ -234,7 +254,10 @@ const {
 const selectChange = (value) => {
   selectedRowKeys.value = value;
 };
-
+const open = (notice) => {
+  curRow.value = notice;
+  visible.value = true;
+};
 const handleAdd = () => {
   curRow.value = null;
   showEditNoticeDialog.value = true;
@@ -301,3 +324,20 @@ const handlePublish = (row) => {
   });
 };
 </script>
+<style lang="less" scoped>
+.notice {
+  .notice-title {
+    color: #333;
+    font-size: 20px;
+  }
+  .notice-subtitle {
+    font-size: 13px;
+    margin-top: 6px;
+  }
+//.notice-content {
+//  font-size: 14px;
+//  margin-top: 10px;
+//  text-indent: 2em;
+//}
+}
+</style>