login 功能

This commit is contained in:
simple321vip
2022-04-15 00:08:42 +08:00
parent 18da3c57b7
commit 4caddc06c0
9 changed files with 124 additions and 109 deletions
+11 -7
View File
@@ -17,7 +17,7 @@
</div>
</el-form>
<div class="create_dialog">
<el-button type="primary" @click="handleInsert">新建</el-button>
<el-button type="primary" @click="handleInsert" v-show="user.owner">新建</el-button>
</div>
<el-table ref="multipleTableRef" :data="tableData" @selection-change="handleSelectionChange" style="width: 100%">
@@ -30,13 +30,15 @@
<span style="cursor: pointer" @click="openUrl(scope.row.url)">{{ scope.row.url }}</span>
</template>
</el-table-column>
<el-table-column prop label="操作">
<el-table-column label="操作">
<template #default="scope">
<el-icon :size="20" @click="copyNumber(scope.row)" class="click-icon">
<CopyDocument />
</el-icon>
<el-button class="click-icon" size="small" @click="handleEdit(scope.$index, scope.row)">编辑</el-button>
<el-button size="small" type="danger" @click="handleDelete(scope.$index, scope.row)">删除</el-button>
<el-button class="click-icon" size="small" @click="handleEdit(scope.$index, scope.row)" v-show="user.owner">编辑
</el-button>
<el-button size="small" type="danger" @click="handleDelete(scope.$index, scope.row)" v-show="user.owner">删除
</el-button>
</template>
</el-table-column>
</el-table>
@@ -52,7 +54,8 @@
<el-dialog v-model="dialogVisible">
<delete_dialog :delete_id="currentDialogData.bk_id" @on-submit="doDelete"></delete_dialog>
</el-dialog> </div>
</el-dialog>
</div>
</template>
<script setup lang="ts">
@@ -66,8 +69,9 @@ import { CopyDocument } from "@element-plus/icons-vue";
import { ElNotification } from 'element-plus'
import copy from 'copy-to-clipboard';
import { h } from 'vue'
const formLabelWidth = '140px'
import { useUserStore } from '../../store/user'
// obtain user infomation
const user = useUserStore()
const bookmark_types = reactive<any[]>([])
bookmark_type().then(response => {
+11 -23
View File
@@ -1,37 +1,23 @@
<template>
<div class="one_note">
<div class="nav_tabs common_box">
<NavTab
:row_key="index"
:checked="nav == index ? true : false"
:nav_name="item"
@click="onclickNav(index)"
v-for="(item, index) in nav_list"
></NavTab>
<NavTab :row_key="index" :checked="nav == index ? true : false" :nav_name="item" @click="onclickNav(index)"
v-for="(item, index) in nav_list"></NavTab>
</div>
<div class="section_tabs common_box">
<div>
<SectionTab
:row_key="item.section_id"
@click="onclickSection(item.section_id, index)"
:checked="item.section_id === section.section_id ? true : false"
:section_data="item"
v-for="(item, index) in data_sections"
></SectionTab>
<SectionTab :row_key="item.section_id + ''" @click="onclickSection(item.section_id, index)"
:checked="item.section_id === section.section_id ? true : false" :section_data="item"
v-for="(item, index) in data_sections"></SectionTab>
</div>
<el-button class="plus_button" @click="addSection">+</el-button>
</div>
<div class="page_tabs common_box">
<div>
<PageTab
:row_key="item.page_id"
v-show="item.section_id == section.section_id ? true : false"
@click="onclickPage(item.page_id)"
:checked="item.page_id === page ? true : false"
:page_data="item"
v-for="(item, index) in current_page_list"
></PageTab>
<PageTab :row_key="item.page_id + ''" v-show="item.section_id == section.section_id ? true : false"
@click="onclickPage(item.page_id)" :checked="item.page_id === page ? true : false" :page_data="item"
v-for="(item, index) in current_page_list"></PageTab>
</div>
<el-button class="plus_button" @click="addPage">+</el-button>
@@ -102,7 +88,7 @@ const addSection = () => {
insert_section().then(response => {
const data = response.data
const section: Section = {
section_id: data.section_id,
section_id: data.section_id + '',
section_name: data.section_name,
page_list: data.page_list
}
@@ -133,6 +119,7 @@ const addPage = () => {
display: flex;
align-items: stretch;
}
.section_tabs,
.page_tabs {
display: flex;
@@ -155,6 +142,7 @@ const addPage = () => {
border-right-style: solid;
border-right-color: antiquewhite;
}
.plus_button {
border-top: 1px solid antiquewhite;
border-bottom: 1px solid antiquewhite;
+18 -21
View File
@@ -1,27 +1,22 @@
<template>
<div class="unit_tag" style="margin-bottom: 10px;">
<el-tag class="ml-2">from</el-tag>
<div v-for="(item, index) in colorup.list">
<el-tag
class="ml-2"
:style="item.style"
style
@click="onChange(item.binary, item.flg, index)"
>{{ item.text }}</el-tag>
<div>
<div class="unit_tag" style="margin-bottom: 10px;">
<el-tag class="ml-2">from</el-tag>
<div :class="'ml-1-' + index" v-for="(item, index) in colorup.list">
<el-tag class="ml-2" :style="item.style" style @click="onChange(item.binary, item.flg, index)">{{ item.text }}
</el-tag>
</div>
</div>
</div>
<div class="unit_tag" style="margin-bottom: 10px; border-color: red;">
<el-tag class="ml-2" style="width: 47.625px">to</el-tag>
<div v-for="(item, index) in colordown.list">
<el-tag
class="ml-2"
:style="item.style"
@click="onChange(item.binary, item.flg, index)"
>{{ item.text }}</el-tag>
<div class="unit_tag" style="margin-bottom: 10px; border-color: red;">
<el-tag class="ml-2" style="width: 47.625px">to</el-tag>
<div :class="'ml-1-' + index" v-for="(item, index) in colordown.list">
<el-tag class="ml-2" :style="item.style" @click="onChange(item.binary, item.flg, index)">{{ item.text }}
</el-tag>
</div>
</div>
<div class="test" style="margin-bottom: 10px; border-color: red;" v-for="(index) in total">
<Cal @on-clickplus="add" :data="t2t" :isPlus="total == index"></Cal>
</div>
</div>
<div class="test" style="margin-bottom: 10px; border-color: red;" v-for="(index) in total">
<Cal @on-clickplus="add" :data="t2t" :isPlus="total == index"></Cal>
</div>
</template>
@@ -77,9 +72,11 @@ const onChange = (binary: number, isFrom: boolean, index: number) => {
.unit_tag {
display: flex;
}
.test {
display: flex;
}
.ml-2 {
margin-right: 10px;
margin-left: 10px;