mirror of
https://github.com/nsnail/NetAdmin.git
synced 2025-07-05 01:58:15 +08:00
feat: ✨ 框架代码同步
This commit is contained in:
@ -8,6 +8,7 @@
|
||||
<script>
|
||||
import colorTool from '@/utils/color'
|
||||
import naVersionUpdater from '@/components/naVersionUpdater/index.vue'
|
||||
import UseTabs from '@/utils/useTabs'
|
||||
|
||||
export default {
|
||||
name: 'App',
|
||||
@ -104,8 +105,7 @@ export default {
|
||||
cancelable: false,
|
||||
}),
|
||||
)
|
||||
}
|
||||
if (!e.altKey && !e.ctrlKey && !e.shiftKey) {
|
||||
} else if (!e.altKey && !e.ctrlKey && !e.shiftKey) {
|
||||
for (const el of document.getElementsByClassName('sc-contextmenu__menu')[0]?.getElementsByTagName('li') ?? []) {
|
||||
if (el.getElementsByClassName('sc-contextmenu__suffix')[0]?.innerText === String.fromCharCode(e.keyCode)) {
|
||||
el.dispatchEvent(
|
||||
@ -118,6 +118,8 @@ export default {
|
||||
break
|
||||
}
|
||||
}
|
||||
} else if (e.altKey && e.keyCode === 81) {
|
||||
UseTabs.close()
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -4,7 +4,7 @@
|
||||
<div v-for="item in data" :class="`sc-select-filter__item${item.w100p ? ' sc-select-filter__item-w100p' : ''}`" :key="item.key">
|
||||
<div :style="{ width: labelWidth + 'rem' }" @click="autoHeight" class="sc-select-filter__item-title">
|
||||
<label>
|
||||
<span>{{ item.title }}</span>
|
||||
<span>{{ item.title }}({{ item.options.length - 1 }})</span>
|
||||
<el-icon style="display: none">
|
||||
<el-icon-arrow-up></el-icon-arrow-up>
|
||||
</el-icon>
|
||||
|
@ -120,7 +120,7 @@
|
||||
</div>
|
||||
<sc-contextmenu @command="contextMenuCommand" @visible-change="contextMenuVisibleChange" ref="contextmenu">
|
||||
<sc-contextmenu-item
|
||||
v-for="(menu, index) in contextMenus.filter((x) => x === current.column.property)"
|
||||
v-for="(menu, index) in contextMenus.filter((x) => x === current.column?.property)"
|
||||
:command="menu"
|
||||
:key="index"
|
||||
:title="`${menu}`">
|
||||
@ -370,7 +370,8 @@ export default {
|
||||
return
|
||||
}
|
||||
if (command === 'copy') {
|
||||
let data = this.current.row[this.current.column.property]
|
||||
let data = this.current.row[this.current.column?.property]
|
||||
if (!data) return
|
||||
|
||||
const textarea = document.createElement('textarea')
|
||||
textarea.readOnly = 'readonly'
|
||||
|
@ -58,6 +58,10 @@
|
||||
</li>
|
||||
</ul>
|
||||
</transition>
|
||||
|
||||
<el-tour v-model="tourOpen" @close="$TOOL.data.set('TOUR_TIP_READ_TAGS', true)">
|
||||
<el-tour-step :target="this.$refs.tags" :title="$t('小提示')"> {{ $t('按下 ALT+Q 可快速关闭当前标签页') }} </el-tour-step>
|
||||
</el-tour>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
@ -67,6 +71,7 @@ export default {
|
||||
name: 'tags',
|
||||
data() {
|
||||
return {
|
||||
tourOpen: false,
|
||||
refreshTimer: null,
|
||||
contextMenuVisible: false,
|
||||
contextMenuItem: null,
|
||||
@ -129,6 +134,11 @@ export default {
|
||||
mounted() {
|
||||
this.tagDrop()
|
||||
this.scrollInit()
|
||||
this.$nextTick(() => {
|
||||
if (!this.$TOOL.data.get('TOUR_TIP_READ_TAGS')) {
|
||||
this.tourOpen = true
|
||||
}
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
//查找树
|
||||
|
@ -22,7 +22,7 @@
|
||||
],
|
||||
},
|
||||
]"
|
||||
:label-width="8"
|
||||
:label-width="9"
|
||||
@on-change="filterChange"
|
||||
ref="selectFilter"></sc-select-filter>
|
||||
</el-header>
|
||||
@ -74,7 +74,7 @@
|
||||
<sc-table
|
||||
:before-post="(data) => data.dynamicFilter.filters.length > 0"
|
||||
:context-menus="['key', 'value', 'enabled', 'createdTime', 'id', 'summary']"
|
||||
:default-sort="{ prop: 'createdTime', order: 'descending' }"
|
||||
:default-sort="{ prop: 'id', order: 'descending' }"
|
||||
:export-api="$API.sys_dic.exportContent"
|
||||
:params="query"
|
||||
:query-api="$API.sys_dic.pagedQueryContent"
|
||||
|
@ -36,7 +36,7 @@
|
||||
],
|
||||
},
|
||||
]"
|
||||
:label-width="8"
|
||||
:label-width="9"
|
||||
@on-change="filterChange"
|
||||
ref="selectFilter"></sc-select-filter>
|
||||
</el-header>
|
||||
@ -85,7 +85,7 @@
|
||||
<sc-table
|
||||
:before-post="(data) => data.dynamicFilter.filters.length > 0"
|
||||
:context-menus="['title', 'enabled', 'createdTime', 'id', 'visibility']"
|
||||
:default-sort="{ prop: 'createdTime', order: 'descending' }"
|
||||
:default-sort="{ prop: 'id', order: 'descending' }"
|
||||
:export-api="$API.sys_doc.exportContent"
|
||||
:params="query"
|
||||
:query-api="$API.sys_doc.pagedQueryContent"
|
||||
@ -107,7 +107,7 @@
|
||||
:label="$t('档案可见性')"
|
||||
:options="
|
||||
Object.entries(this.$GLOBAL.enums.archiveVisibilities).map((x) => {
|
||||
return { value: x[0], text: x[1][1], type: x[1][2] }
|
||||
return { value: x[0], text: x[1][1], type: x[1][2], pulse: x[1][3] === 'true' }
|
||||
})
|
||||
"
|
||||
align="center"
|
||||
|
@ -156,7 +156,7 @@
|
||||
:label="$t('作业状态')"
|
||||
:options="
|
||||
Object.entries(this.$GLOBAL.enums.jobStatues).map((x) => {
|
||||
return { value: x[0], text: x[1][1], type: x[1][2] }
|
||||
return { value: x[0], text: x[1][1], type: x[1][2], pulse: x[1][3] === 'true' }
|
||||
})
|
||||
"
|
||||
align="center"
|
||||
@ -167,7 +167,7 @@
|
||||
:label="$t('请求方式')"
|
||||
:options="
|
||||
Object.entries(this.$GLOBAL.enums.httpMethods).map((x) => {
|
||||
return { value: x[0], text: x[1][1], type: x[1][2] }
|
||||
return { value: x[0], text: x[1][1], type: x[1][2], pulse: x[1][3] === 'true' }
|
||||
})
|
||||
"
|
||||
align="center"
|
||||
@ -181,7 +181,7 @@
|
||||
:data="row"
|
||||
:options="
|
||||
Object.entries(this.$GLOBAL.enums.httpStatusCodes).map((x) => {
|
||||
return { value: x[0], text: `${x[1][1]}`, type: x[1][2] }
|
||||
return { value: x[0], text: `${x[1][1]}`, type: x[1][2], pulse: x[1][3] === 'true' }
|
||||
})
|
||||
"
|
||||
prop="lastStatusCode" />
|
||||
|
@ -33,7 +33,7 @@
|
||||
w100p: true,
|
||||
},
|
||||
]"
|
||||
:label-width="8"
|
||||
:label-width="9"
|
||||
@on-change="filterChange"
|
||||
ref="selectFilter"></sc-select-filter>
|
||||
</el-header>
|
||||
@ -100,7 +100,7 @@
|
||||
}
|
||||
"
|
||||
:context-menus="['id', 'duration', 'httpMethod', 'requestUrl', 'httpStatusCode', 'createdTime', 'jobId', 'responseBody']"
|
||||
:default-sort="{ prop: 'createdTime', order: 'descending' }"
|
||||
:default-sort="{ prop: 'id', order: 'descending' }"
|
||||
:export-api="$API.sys_job.exportRecord"
|
||||
:params="query"
|
||||
:query-api="$API.sys_job.pagedQueryRecord"
|
||||
@ -119,7 +119,7 @@
|
||||
:data="row"
|
||||
:options="
|
||||
Object.entries(this.$GLOBAL.enums.httpMethods).map((x) => {
|
||||
return { value: x[0], text: `${x[1][1].toString().toUpperCase()}`, type: x[1][2] }
|
||||
return { value: x[0], text: `${x[1][1].toString().toUpperCase()}`, type: x[1][2], pulse: x[1][3] === 'true' }
|
||||
})
|
||||
"
|
||||
prop="httpMethod" />
|
||||
@ -129,7 +129,7 @@
|
||||
:data="row"
|
||||
:options="
|
||||
Object.entries(this.$GLOBAL.enums.httpStatusCodes).map((x) => {
|
||||
return { value: x[0], text: `${x[1][1]}`, type: x[1][2] }
|
||||
return { value: x[0], text: `${x[1][1]}`, type: x[1][2], pulse: x[1][3] === 'true' }
|
||||
})
|
||||
"
|
||||
prop="httpStatusCode" />
|
||||
|
@ -97,7 +97,7 @@
|
||||
<sc-table
|
||||
:context-menus="['id', 'httpStatusCode', 'loginUserName', 'createdClientIp', 'createdUserAgent', 'createdTime']"
|
||||
:context-opers="['view']"
|
||||
:default-sort="{ prop: 'createdTime', order: 'descending' }"
|
||||
:default-sort="{ prop: 'id', order: 'descending' }"
|
||||
:export-api="$API.sys_loginlog.export"
|
||||
:params="query"
|
||||
:query-api="$API.sys_loginlog.pagedQuery"
|
||||
|
@ -58,7 +58,7 @@
|
||||
<el-main class="nopadding">
|
||||
<sc-table
|
||||
:context-menus="['id', 'createdUserName', 'msgType', 'title', 'summary', 'createdTime']"
|
||||
:default-sort="{ prop: 'createdTime', order: 'descending' }"
|
||||
:default-sort="{ prop: 'id', order: 'descending' }"
|
||||
:export-api="$API.sys_sitemsg.export"
|
||||
:params="query"
|
||||
:query-api="$API.sys_sitemsg.pagedQuery"
|
||||
@ -81,7 +81,7 @@
|
||||
:label="$t('消息类型')"
|
||||
:options="
|
||||
Object.entries(this.$GLOBAL.enums.siteMsgTypes).map((x) => {
|
||||
return { value: x[0], text: x[1][1], type: x[1][2] }
|
||||
return { value: x[0], text: x[1][1], type: x[1][2], pulse: x[1][3] === 'true' }
|
||||
})
|
||||
"
|
||||
align="center"
|
||||
|
@ -152,7 +152,7 @@
|
||||
:label="$t('数据范围')"
|
||||
:options="
|
||||
Object.entries(this.$GLOBAL.enums.dataScopes).map((x) => {
|
||||
return { value: x[0], text: x[1][1], type: x[1][2] }
|
||||
return { value: x[0], text: x[1][1], type: x[1][2], pulse: x[1][3] === 'true' }
|
||||
})
|
||||
"
|
||||
align="center"
|
||||
|
@ -83,7 +83,7 @@
|
||||
<sc-table
|
||||
:context-menus="['id', 'userName', 'mobile', 'email', 'enabled', 'createdTime', 'lastLoginTime']"
|
||||
:context-opers="['view', 'edit']"
|
||||
:default-sort="{ prop: 'createdTime', order: 'descending' }"
|
||||
:default-sort="{ prop: 'id', order: 'descending' }"
|
||||
:export-api="$API.sys_user.export"
|
||||
:params="query"
|
||||
:query-api="$API.sys_user.pagedQuery"
|
||||
|
Reference in New Issue
Block a user