liujiayin пре 2 година
родитељ
комит
e73c434aaf
1 измењених фајлова са 147 додато и 0 уклоњено
  1. 147 0
      src/views/system/licence/indexCopy.vue

+ 147 - 0
src/views/system/licence/indexCopy.vue

@@ -0,0 +1,147 @@
+<template>
+    <ibps-crud
+        ref="crud"
+        :height="tableHeight"
+        :data="listData"
+        :toolbars="listConfig.toolbars"
+        :search-form="listConfig.searchForm"
+        :pk-key="pkKey"
+        :columns="listConfig.columns"
+        :pagination="pagination"
+        :loading="loading"
+        style="width:100%;"
+        @action-event="handleAction"
+        @pagination-change="handlePaginationChange"
+    />
+</template>
+<script>
+
+export default {
+    components: {
+        updateLicence: () => import('@/views/system/licence/update')
+    },
+    data () {
+        const { account = '', licence = {}} = this.$store.getters
+        return {
+            licenceFormVisible: false,
+            account,
+            licence,
+            status: {
+                success: '正常',
+                warning: '即将到期',
+                danger: '过期'
+            },
+            listConfig: {
+                // 工具栏
+                toolbars: [
+                    { key: 'search' }
+                ],
+                // 查询条件
+                // searchForm: {
+                //     labelWidth: 100,
+                //     forms: [
+                //         { prop: 'Q^APP_KEY_^SL', label: '应用标识', fieldType: 'slot', slotName: 'appKey' },
+                //         { prop: 'Q^API_KEY_^SL', label: '接口标识' },
+                //         { prop: 'Q^API_NAME_^SL', label: '接口名称' },
+                //         { prop: 'Q^API_URI_^SL', label: '接口地址' }
+                //     ]
+                // },
+                // 表格字段配置
+                columns: [
+                    { prop: 'isTrialVersion', label: '许可证信息' },
+                    { prop: 'customerInfo', label: '单位名称' },
+                    { prop: 'issuedTime', label: '发布时间' },
+                    { prop: 'notBefore', label: '生效时间' },
+                    { prop: 'notAfter', label: '失效时间' },
+                    { prop: 'reminderDays', label: '到期提醒天数' },
+                    { prop: 'status', label: '状态' }
+                ]
+            },
+            listData: [
+                {
+                    isTrialVersion:'许可证信息', 
+                    customerInfo:'单位名称', 
+                    issuedTime:'发布时间', 
+                    notBefore:'生效时间', 
+                    notAfter:'失效时间', 
+                    reminderDays:'到期提醒天数', 
+                    status:'状态'
+                }
+            ],
+            pagination: {},
+        }
+    },
+    computed: {
+        state () {
+            const { isTrialVersion, needRemind, overtime } = this.licence || {}
+            if (!isTrialVersion) {
+                return 'success'
+            }
+            if (overtime) {
+                return 'danger'
+            }
+            if (needRemind) {
+                return 'warning'
+            }
+            return 'success'
+        }
+    },
+    mounted () {
+        console.log(this.licence)
+    },
+    methods: {
+        handUpdate () {
+            this.licenceFormVisible = true
+        },
+        transformDate (v) {
+            return v ? new Date(v).toLocaleString('zh-CN', { hour12: false }).replace(/\//g, '-') : ''
+        }
+    }
+}
+</script>
+<style lang="scss" scoped>
+// .licence-container {
+//     width: 1080px;
+//     margin: 20px auto;
+//     height: calc(100% - 100px);
+//     padding: 20px;
+//     border: 1px solid #ccc;
+//     border-radius: 10px;
+//     background-color: #f9f9f9;
+//     box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
+//     transition: transform 0.2s;
+//     .title {
+//         font-size: 24px;
+//         font-weight: bold;
+//         margin-bottom: 20px;
+//         display: flex;
+//         align-items: center;
+//     }
+//     .card {
+//         display: flex;
+//         flex-wrap: wrap;
+//         justify-content: space-between;
+//         .item {
+//             width: 100%;
+//             margin-bottom: 20px;
+//             padding: 15px;
+//             border: 1px solid #ccc;
+//             border-radius: 5px;
+//             background-color: #fff;
+//             transition: transform 0.2s;
+//             &:hover {
+//                 transform: scale(1.01);
+//             }
+//             .label {
+//                 font-size: 16px;
+//                 font-weight: bold;
+//                 margin-bottom: 10px;
+//             }
+//             .value {
+//                 font-size: 16px;
+//                 color: #666;
+//             }
+//         }
+//     }
+// }
+</style>