mod vue2 to vue3
This commit is contained in:
@@ -2,4 +2,4 @@
|
||||
ENV = 'development'
|
||||
|
||||
# 开发环境,一般就设置为本地后端端口,如:http://localhost:8101
|
||||
VUE_APP_BASE_API = 'http://127.0.0.1:8101'
|
||||
VITE_BASE_API = 'http://127.0.0.1:8101'
|
||||
|
||||
@@ -2,5 +2,5 @@
|
||||
ENV = 'production'
|
||||
|
||||
# 接口地址,如果要放到后端的static目录下,此处不用填任何内容
|
||||
VUE_APP_BASE_API = ''
|
||||
VITE_BASE_API = ''
|
||||
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
module.exports = {
|
||||
presets: [
|
||||
'@vue/app'
|
||||
]
|
||||
}
|
||||
+14
-46
@@ -4,68 +4,36 @@
|
||||
"description": "陈昊东毕设",
|
||||
"author": "haodongchen@aliyun.com",
|
||||
"scripts": {
|
||||
"dev": "vue-cli-service serve",
|
||||
"build:prod": "vue-cli-service build",
|
||||
"build:demo": "vue-cli-service build --mode demo",
|
||||
"lint": "eslint --ext .js,.vue src",
|
||||
"svgo": "svgo -f src/icons/svg --config=src/icons/svgo.yml"
|
||||
"dev": "vite",
|
||||
"build": "vite build",
|
||||
"preview": "vite preview"
|
||||
},
|
||||
"dependencies": {
|
||||
"@element-plus/icons-vue": "^2.3.1",
|
||||
"axios": "^0.21.1",
|
||||
"babel-plugin-dynamic-import-node": "^2.3.3",
|
||||
"clipboard": "^2.0.4",
|
||||
"cos-js-sdk-v5": "^1.2.16",
|
||||
"dropzone": "5.5.1",
|
||||
"element-ui": "^2.15.7",
|
||||
"eslint": "^8.34.0",
|
||||
"element-plus": "^2.9.1",
|
||||
"fast-glob": "^3.3.3",
|
||||
"fuse.js": "3.4.4",
|
||||
"js-cookie": "2.2.0",
|
||||
"jsonlint": "1.6.3",
|
||||
"moment": "^2.29.1",
|
||||
"normalize.css": "7.0.0",
|
||||
"nprogress": "0.2.0",
|
||||
"path-to-regexp": "2.4.0",
|
||||
"querystring": "^0.2.0",
|
||||
"screenfull": "^4.2.0",
|
||||
"showdown": "^1.9.1",
|
||||
"sortablejs": "^1.8.4",
|
||||
"tracking": "^1.1.3",
|
||||
"vue": "2.6.10",
|
||||
"vue-count-to": "1.0.13",
|
||||
"vue-fullscreen": "^2.1.6",
|
||||
"vue-loader": "^15.10.1",
|
||||
"vue-router": "3.0.2",
|
||||
"vue-splitpane": "1.0.4",
|
||||
"vue-uuid": "^2.0.2",
|
||||
"vue-visibility-change": "^1.2.1",
|
||||
"vuedraggable": "2.20.0",
|
||||
"vuex": "3.1.0"
|
||||
"vue": "^3.4.21",
|
||||
"vue-router": "^4.3.0",
|
||||
"vuex": "^4.1.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "7.0.0",
|
||||
"@babel/register": "7.0.0",
|
||||
"@vue/cli-plugin-babel": "3.5.3",
|
||||
"@vue/cli-plugin-eslint": "^3.9.1",
|
||||
"@vue/cli-service": "^4.2.2",
|
||||
"autoprefixer": "^9.5.1",
|
||||
"babel-eslint": "10.0.1",
|
||||
"babel-jest": "^25.1.0",
|
||||
"chalk": "2.4.2",
|
||||
"connect": "3.6.6",
|
||||
"@vitejs/plugin-vue": "^5.0.4",
|
||||
"sass": "^1.49.9",
|
||||
"sass-loader": "^10.2.0",
|
||||
"script-ext-html-webpack-plugin": "^2.1.5",
|
||||
"svg-sprite-loader": "4.1.3",
|
||||
"svgo": "1.2.0",
|
||||
"vue-template-compiler": "2.6.10",
|
||||
"webpack": "^4.46.0"
|
||||
"vite": "^5.2.0",
|
||||
"vite-plugin-svg-icons": "^2.0.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=8.9",
|
||||
"npm": ">= 3.0.0"
|
||||
},
|
||||
"browserslist": [
|
||||
"> 1%",
|
||||
"last 2 versions"
|
||||
]
|
||||
"node": ">=16.0.0"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<!--
|
||||
@Description 描述:
|
||||
@Author D吕贺034244311
|
||||
@Author D吕荷034244311
|
||||
@Date 20260615
|
||||
-->
|
||||
<!DOCTYPE html>
|
||||
|
||||
@@ -15,3 +15,4 @@ export function userReg(data) {
|
||||
export function userList(){
|
||||
return post('/exam/api/sys/user/queryAll', null)
|
||||
}
|
||||
|
||||
|
||||
@@ -47,7 +47,7 @@ export default {
|
||||
mounted() {
|
||||
window.addEventListener('scroll', this.handleScroll)
|
||||
},
|
||||
beforeDestroy() {
|
||||
beforeUnmount() {
|
||||
window.removeEventListener('scroll', this.handleScroll)
|
||||
if (this.interval) {
|
||||
clearInterval(this.interval)
|
||||
@@ -99,7 +99,7 @@ export default {
|
||||
transition: opacity .5s;
|
||||
}
|
||||
|
||||
.fade-enter,
|
||||
.fade-enter-from,
|
||||
.fade-leave-to {
|
||||
opacity: 0
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
<el-row>
|
||||
<el-col>
|
||||
<el-button v-if="options.addRoute" type="primary" icon="el-icon-plus" @click="handleAdd">添加</el-button>
|
||||
<el-button v-if="options.addRoute" type="primary" @click="handleAdd"><el-icon><Plus /></el-icon> 添加</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
@@ -47,13 +47,13 @@
|
||||
|
||||
</el-table>
|
||||
|
||||
<pagination v-show="dataList.total>0" :total="dataList.total" :page.sync="listQuery.current" :limit.sync="listQuery.size" @pagination="getList" />
|
||||
<pagination v-show="dataList.total>0" :total="dataList.total" v-model:page="listQuery.current" v-model:limit="listQuery.size" @pagination="getList" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { fetchList, deleteData, changeState } from '@/api/common'
|
||||
import Pagination from '@/components/Pagination'
|
||||
import { fetchList, deleteData, changeState } from '@/api/common.js'
|
||||
import Pagination from '@/components/Pagination/index.vue'
|
||||
|
||||
export default {
|
||||
name: 'PagingTable',
|
||||
|
||||
@@ -21,30 +21,27 @@
|
||||
default-expand-all
|
||||
@node-click="onClickNode"
|
||||
/>
|
||||
<el-input
|
||||
slot="reference"
|
||||
ref="input"
|
||||
v-model="labelModel"
|
||||
:style="`width: ${width}px`"
|
||||
:class="{ 'rotate': showStatus }"
|
||||
:placeholder="placeholder"
|
||||
clearable
|
||||
suffix-icon="el-icon-arrow-down"
|
||||
/>
|
||||
<template #reference>
|
||||
<el-input
|
||||
ref="input"
|
||||
v-model="labelModel"
|
||||
:style="`width: ${width}px`"
|
||||
:class="{ 'rotate': showStatus }"
|
||||
:placeholder="placeholder"
|
||||
clearable
|
||||
>
|
||||
<template #suffix><el-icon><ArrowDown /></el-icon></template>
|
||||
</el-input>
|
||||
</template>
|
||||
</el-popover>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'DepartTree',
|
||||
// 设置绑定参数
|
||||
model: {
|
||||
prop: 'value',
|
||||
event: 'selected'
|
||||
},
|
||||
props: {
|
||||
// 接收绑定参数
|
||||
value: String,
|
||||
modelValue: String,
|
||||
// 输入框宽度
|
||||
width: String,
|
||||
// 选项数据
|
||||
@@ -100,14 +97,14 @@ export default {
|
||||
}
|
||||
this.$refs.tree.filter(val)
|
||||
},
|
||||
value(val) {
|
||||
modelValue(val) {
|
||||
this.labelModel = this.queryTree(this.data, val)
|
||||
}
|
||||
},
|
||||
created() {
|
||||
// 检测输入框原有值并显示对应 label
|
||||
if (this.value) {
|
||||
this.labelModel = this.queryTree(this.data, this.value)
|
||||
if (this.modelValue) {
|
||||
this.labelModel = this.queryTree(this.data, this.modelValue)
|
||||
}
|
||||
// 获取输入框宽度同步至树状菜单宽度
|
||||
this.$nextTick(() => {
|
||||
@@ -137,7 +134,7 @@ export default {
|
||||
// 隐藏时触发
|
||||
onHidePopover() {
|
||||
this.showStatus = false
|
||||
this.$emit('selected', this.valueModel)
|
||||
this.$emit('update:modelValue', this.valueModel)
|
||||
},
|
||||
// 树节点过滤方法
|
||||
filterNode(query, data) {
|
||||
|
||||
@@ -1,19 +1,21 @@
|
||||
<template>
|
||||
<div v-if="errorLogs.length>0">
|
||||
<el-badge :is-dot="true" style="line-height: 25px;margin-top: -5px;" @click.native="dialogTableVisible=true">
|
||||
<el-badge :is-dot="true" style="line-height: 25px;margin-top: -5px;" @click="dialogTableVisible=true">
|
||||
<el-button style="padding: 8px 10px;" size="small" type="danger">
|
||||
<svg-icon icon-class="bug" />
|
||||
</el-button>
|
||||
</el-badge>
|
||||
|
||||
<el-dialog :visible.sync="dialogTableVisible" width="80%" append-to-body>
|
||||
<div slot="title">
|
||||
<el-dialog v-model="dialogTableVisible" width="80%" append-to="body">
|
||||
<template #header>
|
||||
<span style="padding-right: 10px;">Error Log</span>
|
||||
<el-button size="mini" type="primary" icon="el-icon-delete" @click="clearAll">Clear All</el-button>
|
||||
</div>
|
||||
<el-button size="small" type="primary" @click="clearAll">
|
||||
<el-icon><Delete /></el-icon> Clear All
|
||||
</el-button>
|
||||
</template>
|
||||
<el-table :data="errorLogs" border>
|
||||
<el-table-column label="Message">
|
||||
<template slot-scope="{row}">
|
||||
<template #default="{row}">
|
||||
<div>
|
||||
<span class="message-title">Msg:</span>
|
||||
<el-tag type="danger">
|
||||
@@ -24,7 +26,7 @@
|
||||
<div>
|
||||
<span class="message-title" style="padding-right: 10px;">Info: </span>
|
||||
<el-tag type="warning">
|
||||
{{ row.vm.$vnode.tag }} error in {{ row.info }}
|
||||
error in {{ row.info }}
|
||||
</el-tag>
|
||||
</div>
|
||||
<br>
|
||||
@@ -37,7 +39,7 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="Stack">
|
||||
<template slot-scope="scope">
|
||||
<template #default="scope">
|
||||
{{ scope.row.err.stack }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
@@ -29,7 +29,7 @@ export default {
|
||||
name: 'ExamSelect',
|
||||
props: {
|
||||
multi: Boolean,
|
||||
value: Array,
|
||||
modelValue: Array,
|
||||
default: String
|
||||
},
|
||||
data() {
|
||||
@@ -42,14 +42,14 @@ export default {
|
||||
|
||||
watch: {
|
||||
// 检测查询变化
|
||||
value: {
|
||||
modelValue: {
|
||||
handler() {
|
||||
this.currentValue = this.value
|
||||
this.currentValue = this.modelValue
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.currentValue = this.value
|
||||
this.currentValue = this.modelValue
|
||||
this.fetchData()
|
||||
},
|
||||
methods: {
|
||||
@@ -63,7 +63,7 @@ export default {
|
||||
console.log(e)
|
||||
|
||||
this.$emit('change', e)
|
||||
this.$emit('input', e)
|
||||
this.$emit('update:modelValue', e)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,13 +6,13 @@
|
||||
|
||||
<script>
|
||||
|
||||
import FileUploadLocal from './local'
|
||||
import FileUploadLocal from './local.vue'
|
||||
|
||||
export default {
|
||||
name: 'FileUpload',
|
||||
components: { FileUploadLocal },
|
||||
props: {
|
||||
value: String,
|
||||
modelValue: String,
|
||||
accept: {
|
||||
type: String,
|
||||
default: '*'
|
||||
@@ -31,7 +31,7 @@ export default {
|
||||
|
||||
watch: {
|
||||
// 检测查询变化
|
||||
value: {
|
||||
modelValue: {
|
||||
handler() {
|
||||
this.fillValue()
|
||||
}
|
||||
@@ -40,7 +40,7 @@ export default {
|
||||
// 检测查询变化
|
||||
fileUrl: {
|
||||
handler() {
|
||||
this.$emit('input', this.fileUrl)
|
||||
this.$emit('update:modelValue', this.fileUrl)
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -55,7 +55,7 @@ export default {
|
||||
methods: {
|
||||
|
||||
fillValue() {
|
||||
this.fileUrl = this.value
|
||||
this.fileUrl = this.modelValue
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -18,12 +18,12 @@
|
||||
|
||||
<el-button v-if="listType==='picture'" size="small" type="primary">点击上传</el-button>
|
||||
|
||||
<i v-if="listType!=='picture'" class="el-icon-upload" />
|
||||
<el-icon v-if="listType!=='picture'"><UploadFilled /></el-icon>
|
||||
<div v-if="listType!=='picture'" class="el-upload__text">
|
||||
将文件拖到此处,或
|
||||
<em>点击上传</em>
|
||||
</div>
|
||||
<div v-if="tips" slot="tip" class="el-upload__tip">{{ tips }}</div>
|
||||
<template v-if="tips" #tip><div class="el-upload__tip">{{ tips }}</div></template>
|
||||
</el-upload>
|
||||
|
||||
</div>
|
||||
@@ -37,7 +37,7 @@ import { getToken } from '@/utils/auth'
|
||||
export default {
|
||||
name: 'FileUploadLocal',
|
||||
props: {
|
||||
value: String,
|
||||
modelValue: String,
|
||||
accept: String,
|
||||
tips: String,
|
||||
listType: String,
|
||||
@@ -48,7 +48,7 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
server: `${process.env.VUE_APP_BASE_API}/common/api/file/upload`,
|
||||
server: `${import.meta.env.VITE_BASE_API}/common/api/file/upload`,
|
||||
fileList: [],
|
||||
fileUrl: '',
|
||||
header: {}
|
||||
@@ -57,7 +57,7 @@ export default {
|
||||
|
||||
watch: {
|
||||
// 检测查询变化
|
||||
value: {
|
||||
modelValue: {
|
||||
handler() {
|
||||
this.fillValue()
|
||||
}
|
||||
@@ -73,7 +73,7 @@ export default {
|
||||
|
||||
fillValue() {
|
||||
this.fileList = []
|
||||
this.fileUrl = this.value
|
||||
this.fileUrl = this.modelValue
|
||||
if (this.fileUrl) {
|
||||
this.fileList = [{ name: this.fileUrl, url: this.fileUrl }]
|
||||
}
|
||||
@@ -90,7 +90,7 @@ export default {
|
||||
|
||||
// 文件列表移除文件时的钩子
|
||||
handleRemove() {
|
||||
this.$emit('input', '')
|
||||
this.$emit('update:modelValue', '')
|
||||
this.fileList = []
|
||||
},
|
||||
|
||||
@@ -105,7 +105,7 @@ export default {
|
||||
this.fileList = []
|
||||
return
|
||||
}
|
||||
this.$emit('input', response.data.url)
|
||||
this.$emit('update:modelValue', response.data.url)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
// fuse is a lightweight fuzzy-search module
|
||||
// make search results more in line with expectations
|
||||
import Fuse from 'fuse.js'
|
||||
import path from 'path'
|
||||
import { resolve } from '@/utils/path'
|
||||
|
||||
export default {
|
||||
name: 'HeaderSearch',
|
||||
@@ -83,7 +83,6 @@ export default {
|
||||
threshold: 0.4,
|
||||
location: 0,
|
||||
distance: 100,
|
||||
maxPatternLength: 32,
|
||||
minMatchCharLength: 1,
|
||||
keys: [{
|
||||
name: 'title',
|
||||
@@ -104,7 +103,7 @@ export default {
|
||||
if (router.hidden) { continue }
|
||||
|
||||
const data = {
|
||||
path: path.resolve(basePath, router.path),
|
||||
path: resolve(basePath, router.path),
|
||||
title: [...prefixTitle]
|
||||
}
|
||||
|
||||
@@ -159,7 +158,7 @@ export default {
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
|
||||
::v-deep .el-input__inner {
|
||||
:deep(.el-input__inner) {
|
||||
border-radius: 0;
|
||||
border: 0;
|
||||
padding-left: 0;
|
||||
|
||||
@@ -25,12 +25,12 @@
|
||||
|
||||
<script>
|
||||
|
||||
import { fetchList } from '@/api/sys/role/role'
|
||||
import { fetchList } from '@/api/sys/role/role.js'
|
||||
|
||||
export default {
|
||||
name: 'MeetRole',
|
||||
props: {
|
||||
value: Array,
|
||||
modelValue: Array,
|
||||
default: Array
|
||||
},
|
||||
data() {
|
||||
@@ -43,15 +43,15 @@ export default {
|
||||
|
||||
watch: {
|
||||
// 检测查询变化
|
||||
value: {
|
||||
modelValue: {
|
||||
handler() {
|
||||
this.values = this.value
|
||||
this.values = this.modelValue
|
||||
},
|
||||
deep: true
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.values = this.value
|
||||
this.values = this.modelValue
|
||||
this.fetchList()
|
||||
},
|
||||
methods: {
|
||||
@@ -63,7 +63,7 @@ export default {
|
||||
},
|
||||
handlerChange(e) {
|
||||
this.$emit('change', e)
|
||||
this.$emit('input', e)
|
||||
this.$emit('update:modelValue', e)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
<div :class="{'hidden':hidden}" class="pagination-container">
|
||||
<el-pagination
|
||||
:background="background"
|
||||
:current-page.sync="currentPage"
|
||||
:page-size.sync="pageSize"
|
||||
v-model:current-page="currentPage"
|
||||
v-model:page-size="pageSize"
|
||||
:layout="layout"
|
||||
:page-sizes="pageSizes"
|
||||
:total="total"
|
||||
|
||||
@@ -34,7 +34,7 @@ export default {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
value: String
|
||||
modelValue: String
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@@ -46,14 +46,14 @@ export default {
|
||||
|
||||
watch: {
|
||||
// 检测查询变化
|
||||
value: {
|
||||
modelValue: {
|
||||
handler() {
|
||||
this.currentValue = this.value
|
||||
this.currentValue = this.modelValue
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.currentValue = this.value
|
||||
this.currentValue = this.modelValue
|
||||
this.fetchData()
|
||||
},
|
||||
methods: {
|
||||
@@ -69,7 +69,7 @@ export default {
|
||||
})
|
||||
|
||||
this.$emit('change', obj)
|
||||
this.$emit('input', e)
|
||||
this.$emit('update:modelValue', e)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<div class="rightPanel-background" />
|
||||
<div class="rightPanel">
|
||||
<div :style="{'top':buttonTop+'px','background-color':theme}" class="handle-button" @click="show=!show">
|
||||
<i :class="show?'el-icon-close':'el-icon-setting'" />
|
||||
<el-icon><Close v-if="show" /><Setting v-else /></el-icon>
|
||||
</div>
|
||||
<div class="rightPanel-items">
|
||||
<slot />
|
||||
@@ -52,7 +52,7 @@ export default {
|
||||
mounted() {
|
||||
this.insertToBody()
|
||||
},
|
||||
beforeDestroy() {
|
||||
beforeUnmount() {
|
||||
const elx = this.$refs.rightPanel
|
||||
elx.remove()
|
||||
},
|
||||
|
||||
@@ -17,7 +17,7 @@ export default {
|
||||
mounted() {
|
||||
this.init()
|
||||
},
|
||||
beforeDestroy() {
|
||||
beforeUnmount() {
|
||||
this.destroy()
|
||||
},
|
||||
methods: {
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<div>
|
||||
<svg-icon class-name="size-icon" icon-class="size" />
|
||||
</div>
|
||||
<el-dropdown-menu slot="dropdown">
|
||||
<el-dropdown-menu #dropdown>
|
||||
<el-dropdown-item v-for="item of sizeOptions" :key="item.value" :disabled="size===item.value" :command="item.value">
|
||||
{{
|
||||
item.label }}
|
||||
@@ -31,7 +31,6 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
handleSetSize(size) {
|
||||
this.$ELEMENT.size = size
|
||||
this.$store.dispatch('app/setSize', size)
|
||||
this.refreshView()
|
||||
this.$message({
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div v-if="isExternal" :style="styleExternalIcon" class="svg-external-icon svg-icon" v-on="$listeners" />
|
||||
<svg v-else :class="svgClass" aria-hidden="true" v-on="$listeners">
|
||||
<div v-if="isExternal" :style="styleExternalIcon" class="svg-external-icon svg-icon" v-bind="$attrs" />
|
||||
<svg v-else :class="svgClass" aria-hidden="true" v-bind="$attrs">
|
||||
<use :href="iconName" />
|
||||
</svg>
|
||||
</template>
|
||||
|
||||
@@ -8,7 +8,6 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
const version = require('element-ui/package.json').version // element-ui version from node_modules
|
||||
const ORIGINAL_THEME = '#409EFF' // default color
|
||||
|
||||
export default {
|
||||
@@ -41,8 +40,7 @@ export default {
|
||||
message: ' Compiling the theme',
|
||||
customClass: 'theme-message',
|
||||
type: 'success',
|
||||
duration: 0,
|
||||
iconClass: 'el-icon-loading'
|
||||
duration: 0
|
||||
})
|
||||
|
||||
const getHandler = (variable, id) => {
|
||||
@@ -61,7 +59,7 @@ export default {
|
||||
}
|
||||
|
||||
if (!this.chalk) {
|
||||
const url = `https://unpkg.com/element-ui@${version}/lib/theme-chalk/index.css`
|
||||
const url = `https://unpkg.com/element-plus/dist/index.css`
|
||||
await this.getCSSString(url, 'chalk')
|
||||
}
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ if (!Clipboard) {
|
||||
}
|
||||
|
||||
export default {
|
||||
bind(el, binding) {
|
||||
created(el, binding) {
|
||||
if (binding.arg === 'success') {
|
||||
el._v_clipboard_success = binding.value
|
||||
} else if (binding.arg === 'error') {
|
||||
@@ -26,7 +26,7 @@ export default {
|
||||
el._v_clipboard = clipboard
|
||||
}
|
||||
},
|
||||
update(el, binding) {
|
||||
updated(el, binding) {
|
||||
if (binding.arg === 'success') {
|
||||
el._v_clipboard_success = binding.value
|
||||
} else if (binding.arg === 'error') {
|
||||
@@ -36,7 +36,7 @@ export default {
|
||||
el._v_clipboard.action = function() { return binding.arg === 'cut' ? 'cut' : 'copy' }
|
||||
}
|
||||
},
|
||||
unbind(el, binding) {
|
||||
unmounted(el, binding) {
|
||||
if (binding.arg === 'success') {
|
||||
delete el._v_clipboard_success
|
||||
} else if (binding.arg === 'error') {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import store from '@/store'
|
||||
|
||||
export default {
|
||||
inserted(el, binding, vnode) {
|
||||
mounted(el, binding, vnode) {
|
||||
const { value } = binding
|
||||
const roles = store.getters && store.getters.roles
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
const vueSticky = {}
|
||||
let listenAction
|
||||
vueSticky.install = Vue => {
|
||||
Vue.directive('sticky', {
|
||||
inserted(el, binding) {
|
||||
vueSticky.install = app => {
|
||||
app.directive('sticky', {
|
||||
mounted(el, binding) {
|
||||
const params = binding.value || {}
|
||||
const stickyTop = params.stickyTop || 0
|
||||
const zIndex = params.zIndex || 1000
|
||||
@@ -10,12 +10,6 @@ vueSticky.install = Vue => {
|
||||
|
||||
elStyle.position = '-webkit-sticky'
|
||||
elStyle.position = 'sticky'
|
||||
// if the browser support css sticky(Currently Safari, Firefox and Chrome Canary)
|
||||
// if (~elStyle.position.indexOf('sticky')) {
|
||||
// elStyle.top = `${stickyTop}px`;
|
||||
// elStyle.zIndex = zIndex;
|
||||
// return
|
||||
// }
|
||||
const elHeight = el.getBoundingClientRect().height
|
||||
const elWidth = el.getBoundingClientRect().width
|
||||
elStyle.cssText = `top: ${stickyTop}px; z-index: ${zIndex}`
|
||||
@@ -81,7 +75,7 @@ vueSticky.install = Vue => {
|
||||
window.addEventListener('scroll', listenAction)
|
||||
},
|
||||
|
||||
unbind() {
|
||||
unmounted() {
|
||||
window.removeEventListener('scroll', listenAction)
|
||||
}
|
||||
})
|
||||
|
||||
@@ -6,9 +6,9 @@ function handleClick(el, binding) {
|
||||
function handle(e) {
|
||||
const customOpts = Object.assign({}, binding.value)
|
||||
const opts = Object.assign({
|
||||
ele: el, // 波纹作用元素
|
||||
type: 'hit', // hit 点击位置扩散 center中心点扩展
|
||||
color: 'rgba(0, 0, 0, 0.15)' // 波纹颜色
|
||||
ele: el,
|
||||
type: 'hit',
|
||||
color: 'rgba(0, 0, 0, 0.15)'
|
||||
},
|
||||
customOpts
|
||||
)
|
||||
@@ -57,14 +57,14 @@ function handleClick(el, binding) {
|
||||
}
|
||||
|
||||
export default {
|
||||
bind(el, binding) {
|
||||
created(el, binding) {
|
||||
el.addEventListener('click', handleClick(el, binding), false)
|
||||
},
|
||||
update(el, binding) {
|
||||
updated(el, binding) {
|
||||
el.removeEventListener('click', el[context].removeHandle, false)
|
||||
el.addEventListener('click', handleClick(el, binding), false)
|
||||
},
|
||||
unbind(el) {
|
||||
unmounted(el) {
|
||||
el.removeEventListener('click', el[context].removeHandle, false)
|
||||
el[context] = null
|
||||
delete el[context]
|
||||
|
||||
@@ -1,9 +1 @@
|
||||
import Vue from 'vue'
|
||||
import SvgIcon from '@/components/SvgIcon'// svg component
|
||||
|
||||
// register globally
|
||||
Vue.component('svg-icon', SvgIcon)
|
||||
|
||||
const req = require.context('./svg', false, /\.svg$/)
|
||||
const requireAll = requireContext => requireContext.keys().map(requireContext)
|
||||
requireAll(req)
|
||||
import 'virtual:svg-icons-register'
|
||||
|
||||
@@ -21,9 +21,9 @@
|
||||
<el-dropdown class="avatar-container right-menu-item hover-effect" trigger="click">
|
||||
<div class="avatar-wrapper">
|
||||
{{ realName }}
|
||||
<i class="el-icon-caret-bottom" />
|
||||
<el-icon class="el-icon-caret-bottom"><ArrowDown /></el-icon>
|
||||
</div>
|
||||
<el-dropdown-menu slot="dropdown">
|
||||
<el-dropdown-menu #dropdown>
|
||||
<router-link to="/profile/index">
|
||||
<el-dropdown-item>个人资料</el-dropdown-item>
|
||||
</router-link>
|
||||
@@ -38,12 +38,13 @@
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex'
|
||||
import Breadcrumb from '@/components/Breadcrumb'
|
||||
import Hamburger from '@/components/Hamburger'
|
||||
import ErrorLog from '@/components/ErrorLog'
|
||||
import Screenfull from '@/components/Screenfull'
|
||||
import SizeSelect from '@/components/SizeSelect'
|
||||
import Search from '@/components/HeaderSearch'
|
||||
import { ArrowDown } from '@element-plus/icons-vue'
|
||||
import Breadcrumb from '@/components/Breadcrumb/index.vue'
|
||||
import Hamburger from '@/components/Hamburger/index.vue'
|
||||
import ErrorLog from '@/components/ErrorLog/index.vue'
|
||||
import Screenfull from '@/components/Screenfull/index.vue'
|
||||
import SizeSelect from '@/components/SizeSelect/index.vue'
|
||||
import Search from '@/components/HeaderSearch/index.vue'
|
||||
|
||||
export default {
|
||||
components: {
|
||||
@@ -52,7 +53,8 @@ export default {
|
||||
ErrorLog,
|
||||
Screenfull,
|
||||
SizeSelect,
|
||||
Search
|
||||
Search,
|
||||
ArrowDown
|
||||
},
|
||||
computed: {
|
||||
...mapGetters([
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import ThemePicker from '@/components/ThemePicker'
|
||||
import ThemePicker from '@/components/ThemePicker/index.vue'
|
||||
|
||||
export default {
|
||||
components: { ThemePicker },
|
||||
|
||||
@@ -1,7 +1,11 @@
|
||||
<template>
|
||||
<svg-icon v-if="icon" :icon-class="icon" />
|
||||
<span v-if="title">{{ title }}</span>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'MenuItem',
|
||||
functional: true,
|
||||
props: {
|
||||
icon: {
|
||||
type: String,
|
||||
@@ -11,19 +15,6 @@ export default {
|
||||
type: String,
|
||||
default: ''
|
||||
}
|
||||
},
|
||||
render(h, context) {
|
||||
const { icon, title } = context.props
|
||||
const vnodes = []
|
||||
|
||||
if (icon) {
|
||||
vnodes.push(<svg-icon icon-class={icon}/>)
|
||||
}
|
||||
|
||||
if (title) {
|
||||
vnodes.push(<span slot='title'>{(title)}</span>)
|
||||
}
|
||||
return vnodes
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
|
||||
<template>
|
||||
<!-- eslint-disable vue/require-component-is -->
|
||||
<component v-bind="linkProps(to)">
|
||||
<a v-if="isExternal" :href="to" target="_blank" rel="noopener">
|
||||
<slot />
|
||||
</component>
|
||||
</a>
|
||||
<router-link v-else :to="to">
|
||||
<slot />
|
||||
</router-link>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
@@ -16,20 +18,9 @@ export default {
|
||||
required: true
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
linkProps(url) {
|
||||
if (isExternal(url)) {
|
||||
return {
|
||||
is: 'a',
|
||||
href: url,
|
||||
target: '_blank',
|
||||
rel: 'noopener'
|
||||
}
|
||||
}
|
||||
return {
|
||||
is: 'router-link',
|
||||
to: url
|
||||
}
|
||||
computed: {
|
||||
isExternal() {
|
||||
return isExternal(this.to)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -36,7 +36,7 @@ export default {
|
||||
transition: opacity 1.5s;
|
||||
}
|
||||
|
||||
.sidebarLogoFade-enter,
|
||||
.sidebarLogoFade-enter-from,
|
||||
.sidebarLogoFade-leave-to {
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
@@ -8,8 +8,8 @@
|
||||
</app-link>
|
||||
</template>
|
||||
|
||||
<el-submenu v-else ref="subMenu" :index="resolvePath(item.path)" popper-append-to-body>
|
||||
<template slot="title">
|
||||
<el-submenu v-else ref="subMenu" :index="resolvePath(item.path)" teleported>
|
||||
<template #title>
|
||||
<item v-if="item.meta" :icon="item.meta && item.meta.icon" :title="item.meta.title" />
|
||||
</template>
|
||||
<sidebar-item
|
||||
@@ -25,11 +25,11 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import path from 'path'
|
||||
import { resolve } from '@/utils/path'
|
||||
import { isExternal } from '@/utils/validate'
|
||||
import Item from './Item'
|
||||
import AppLink from './Link'
|
||||
import FixiOSBug from './FixiOSBug'
|
||||
import Item from './Item.vue'
|
||||
import AppLink from './Link.vue'
|
||||
import FixiOSBug from './FixiOSBug.js'
|
||||
|
||||
export default {
|
||||
name: 'SidebarItem',
|
||||
@@ -88,7 +88,7 @@ export default {
|
||||
if (isExternal(this.basePath)) {
|
||||
return this.basePath
|
||||
}
|
||||
return path.resolve(this.basePath, routePath)
|
||||
return resolve(this.basePath, routePath)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,9 +20,9 @@
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex'
|
||||
import Logo from './Logo'
|
||||
import SidebarItem from './SidebarItem'
|
||||
import variables from '@/styles/variables.scss'
|
||||
import Logo from './Logo.vue'
|
||||
import SidebarItem from './SidebarItem.vue'
|
||||
import variables from '@/styles/variables-js.js'
|
||||
|
||||
export default {
|
||||
components: { SidebarItem, Logo },
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<el-scrollbar ref="scrollContainer" :vertical="false" class="scroll-container" @wheel.native.prevent="handleScroll">
|
||||
<el-scrollbar ref="scrollContainer" :vertical="false" class="scroll-container" @wheel.prevent="handleScroll">
|
||||
<slot />
|
||||
</el-scrollbar>
|
||||
</template>
|
||||
@@ -73,13 +73,11 @@ export default {
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
width: 100%;
|
||||
::v-deep {
|
||||
.el-scrollbar__bar {
|
||||
bottom: 0px;
|
||||
}
|
||||
.el-scrollbar__wrap {
|
||||
height: 49px;
|
||||
}
|
||||
:deep(.el-scrollbar__bar) {
|
||||
bottom: 0px;
|
||||
}
|
||||
:deep(.el-scrollbar__wrap) {
|
||||
height: 49px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -1,20 +1,19 @@
|
||||
<template>
|
||||
<div id="tags-view-container" class="tags-view-container">
|
||||
<scroll-pane ref="scrollPane" class="tags-view-wrapper">
|
||||
<router-link
|
||||
<span
|
||||
v-for="tag in visitedViews"
|
||||
ref="tag"
|
||||
:key="tag.path"
|
||||
:class="isActive(tag)?'active':''"
|
||||
:to="{ path: tag.path, query: tag.query, fullPath: tag.fullPath }"
|
||||
tag="span"
|
||||
class="tags-view-item"
|
||||
@click.middle.native="!isAffix(tag)?closeSelectedTag(tag):''"
|
||||
@contextmenu.prevent.native="openMenu(tag,$event)"
|
||||
@click="navigateTo(tag)"
|
||||
@click.middle="!isAffix(tag)?closeSelectedTag(tag):''"
|
||||
@contextmenu.prevent="openMenu(tag,$event)"
|
||||
>
|
||||
{{ tag.title }}
|
||||
<span v-if="!isAffix(tag)" class="el-icon-close" @click.prevent.stop="closeSelectedTag(tag)" />
|
||||
</router-link>
|
||||
</span>
|
||||
</scroll-pane>
|
||||
<ul v-show="visible" :style="{left:left+'px',top:top+'px'}" class="contextmenu">
|
||||
<li @click="refreshSelectedTag(selectedTag)">Refresh</li>
|
||||
@@ -26,8 +25,8 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import ScrollPane from './ScrollPane'
|
||||
import path from 'path'
|
||||
import ScrollPane from './ScrollPane.vue'
|
||||
import { resolve } from '@/utils/path'
|
||||
|
||||
export default {
|
||||
components: { ScrollPane },
|
||||
@@ -76,7 +75,7 @@ export default {
|
||||
let tags = []
|
||||
routes.forEach(route => {
|
||||
if (route.meta && route.meta.affix) {
|
||||
const tagPath = path.resolve(basePath, route.path)
|
||||
const tagPath = resolve(basePath, route.path)
|
||||
tags.push({
|
||||
fullPath: tagPath,
|
||||
path: tagPath,
|
||||
@@ -110,20 +109,19 @@ export default {
|
||||
return false
|
||||
},
|
||||
moveToCurrentTag() {
|
||||
const tags = this.$refs.tag
|
||||
this.$nextTick(() => {
|
||||
for (const tag of tags) {
|
||||
if (tag.to.path === this.$route.path) {
|
||||
this.$refs.scrollPane.moveToTarget(tag)
|
||||
// when query is different then update
|
||||
if (tag.to.fullPath !== this.$route.fullPath) {
|
||||
this.$store.dispatch('tagsView/updateVisitedView', this.$route)
|
||||
}
|
||||
break
|
||||
}
|
||||
const tags = this.$refs.tag
|
||||
if (!tags) return
|
||||
// In Vue 3, $refs with v-for gives DOM elements in same order
|
||||
const index = this.visitedViews.findIndex(v => v.path === this.$route.path)
|
||||
if (index >= 0 && tags[index]) {
|
||||
this.$refs.scrollPane.moveToTarget(tags[index])
|
||||
}
|
||||
})
|
||||
},
|
||||
navigateTo(tag) {
|
||||
this.$router.push({ path: tag.path, query: tag.query })
|
||||
},
|
||||
refreshSelectedTag(view) {
|
||||
this.$store.dispatch('tagsView/delCachedView', view).then(() => {
|
||||
const { fullPath } = view
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
export { default as AppMain } from './AppMain'
|
||||
export { default as Navbar } from './Navbar'
|
||||
export { default as Settings } from './Settings'
|
||||
export { default as AppMain } from './AppMain.vue'
|
||||
export { default as Navbar } from './Navbar.vue'
|
||||
export { default as Settings } from './Settings/index.vue'
|
||||
export { default as Sidebar } from './Sidebar/index.vue'
|
||||
export { default as TagsView } from './TagsView/index.vue'
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import RightPanel from '@/components/RightPanel'
|
||||
import RightPanel from '@/components/RightPanel/index.vue'
|
||||
import { AppMain, Navbar, Settings, Sidebar, TagsView } from './components'
|
||||
import ResizeMixin from './mixin/ResizeHandler'
|
||||
import { mapState } from 'vuex'
|
||||
@@ -58,8 +58,8 @@ export default {
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import "~@/styles/mixin.scss";
|
||||
@import "~@/styles/variables.scss";
|
||||
@import "@/styles/mixin.scss";
|
||||
@import "@/styles/variables.scss";
|
||||
|
||||
.app-wrapper {
|
||||
@include clearfix;
|
||||
|
||||
@@ -14,7 +14,7 @@ export default {
|
||||
beforeMount() {
|
||||
window.addEventListener('resize', this.$_resizeHandler)
|
||||
},
|
||||
beforeDestroy() {
|
||||
beforeUnmount() {
|
||||
window.removeEventListener('resize', this.$_resizeHandler)
|
||||
},
|
||||
mounted() {
|
||||
|
||||
+34
-21
@@ -1,37 +1,50 @@
|
||||
import Vue from 'vue'
|
||||
import { createApp } from 'vue'
|
||||
|
||||
import Cookies from 'js-cookie'
|
||||
|
||||
import 'normalize.css/normalize.css' // a modern alternative to CSS resets
|
||||
import 'normalize.css/normalize.css'
|
||||
|
||||
import Element from 'element-ui'
|
||||
import ElementPlus from 'element-plus'
|
||||
import 'element-plus/dist/index.css'
|
||||
import zhCn from 'element-plus/es/locale/lang/zh-cn'
|
||||
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
|
||||
import './styles/element-variables.scss'
|
||||
import '@/styles/index.scss'
|
||||
|
||||
import App from './App'
|
||||
import App from './App.vue'
|
||||
import store from './store'
|
||||
import router from './router'
|
||||
|
||||
import './icons' // icon
|
||||
import './permission' // permission control
|
||||
import './utils/error-log' // error log
|
||||
import SvgIcon from '@/components/SvgIcon/index.vue'
|
||||
import './icons'
|
||||
import './permission'
|
||||
import './utils/error-log'
|
||||
|
||||
import * as filters from './filters'
|
||||
// Element UI
|
||||
Vue.use(Element, {
|
||||
size: Cookies.get('size') || 'medium' // set element-ui default size
|
||||
|
||||
const app = createApp(App)
|
||||
|
||||
app.use(ElementPlus, {
|
||||
locale: zhCn,
|
||||
size: Cookies.get('size') || 'default'
|
||||
})
|
||||
|
||||
// 注册全局过滤器
|
||||
Object.keys(filters).forEach(key => {
|
||||
Vue.filter(key, filters[key])
|
||||
})
|
||||
// 全局注册 Element Plus 图标组件
|
||||
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
|
||||
app.component(key, component)
|
||||
}
|
||||
|
||||
Vue.config.productionTip = false
|
||||
app.use(store)
|
||||
app.use(router)
|
||||
|
||||
new Vue({
|
||||
el: '#app',
|
||||
router,
|
||||
store,
|
||||
render: h => h(App)
|
||||
})
|
||||
// 注册全局过滤器(Vue3 过滤器为普通函数,通过 globalProperties 提供)
|
||||
app.component('svg-icon', SvgIcon)
|
||||
|
||||
app.config.globalProperties.$filters = filters
|
||||
|
||||
// 设置错误处理器
|
||||
if (window.__setErrorhandler__) {
|
||||
window.__setErrorhandler__(app)
|
||||
}
|
||||
|
||||
app.mount('#app')
|
||||
|
||||
+10
-17
@@ -1,29 +1,25 @@
|
||||
import router from './router'
|
||||
import store from './store'
|
||||
import { Message } from 'element-ui'
|
||||
import NProgress from 'nprogress' // progress bar
|
||||
import 'nprogress/nprogress.css' // progress bar style
|
||||
import { getToken } from '@/utils/auth' // get token from cookie
|
||||
import { ElMessage } from 'element-plus'
|
||||
import NProgress from 'nprogress'
|
||||
import 'nprogress/nprogress.css'
|
||||
import { getToken } from '@/utils/auth'
|
||||
import getPageTitle from '@/utils/get-page-title'
|
||||
|
||||
NProgress.configure({ showSpinner: false }) // NProgress Configuration
|
||||
NProgress.configure({ showSpinner: false })
|
||||
|
||||
const whiteList = ['/login', '/register'] // no redirect whitelist
|
||||
const whiteList = ['/login', '/register']
|
||||
|
||||
router.beforeEach(async(to, from, next) => {
|
||||
// start progress bar
|
||||
NProgress.start()
|
||||
|
||||
// 获取网站基本信息
|
||||
let siteData = store.getters.siteData
|
||||
if (!siteData.siteName) {
|
||||
siteData = await store.dispatch('settings/getSite')
|
||||
}
|
||||
|
||||
// 页面标题
|
||||
document.title = getPageTitle(siteData.siteName, to.meta.title)
|
||||
|
||||
// 本地token
|
||||
const hasToken = getToken()
|
||||
|
||||
if (hasToken) {
|
||||
@@ -36,26 +32,24 @@ router.beforeEach(async(to, from, next) => {
|
||||
next()
|
||||
} else {
|
||||
try {
|
||||
// 读取用户权限
|
||||
const { roles } = await store.dispatch('user/getInfo')
|
||||
const accessRoutes = await store.dispatch('permission/generateRoutes', roles)
|
||||
router.addRoutes(accessRoutes)
|
||||
accessRoutes.forEach(route => {
|
||||
router.addRoute(route)
|
||||
})
|
||||
next({ ...to, replace: true })
|
||||
} catch (error) {
|
||||
// 出错注销
|
||||
await store.dispatch('user/resetToken')
|
||||
Message.error(error || 'Has Error')
|
||||
ElMessage.error(error || 'Has Error')
|
||||
next(`/login?redirect=${to.path}`)
|
||||
NProgress.done()
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// 排除白名单
|
||||
if (whiteList.indexOf(to.path) !== -1) {
|
||||
next()
|
||||
} else {
|
||||
// 跳转到登录页面
|
||||
next(`/login?redirect=${to.path}`)
|
||||
NProgress.done()
|
||||
}
|
||||
@@ -63,6 +57,5 @@ router.beforeEach(async(to, from, next) => {
|
||||
})
|
||||
|
||||
router.afterEach(() => {
|
||||
// finish progress bar
|
||||
NProgress.done()
|
||||
})
|
||||
|
||||
@@ -1,21 +1,18 @@
|
||||
import Vue from 'vue'
|
||||
import Router from 'vue-router'
|
||||
|
||||
Vue.use(Router)
|
||||
import { createRouter, createWebHashHistory } from 'vue-router'
|
||||
|
||||
// 主要框架
|
||||
import Layout from '@/layout'
|
||||
import Layout from '@/layout/index.vue'
|
||||
|
||||
// 登录框架
|
||||
import LoginLayout from '@/views/login/components/LoginLayout'
|
||||
import LoginLayout from '@/views/login/components/LoginLayout.vue'
|
||||
|
||||
export const constantRoutes = [{
|
||||
path: '/redirect',
|
||||
component: Layout,
|
||||
hidden: true,
|
||||
children: [{
|
||||
path: '/redirect/:path*',
|
||||
component: () => import('@/views/redirect/index')
|
||||
path: '/redirect/:path(.*)',
|
||||
component: () => import('@/views/redirect/index.vue')
|
||||
}]
|
||||
},
|
||||
|
||||
@@ -26,13 +23,13 @@ export const constantRoutes = [{
|
||||
children: [{
|
||||
path: '/login',
|
||||
name: 'Login',
|
||||
component: () => import('@/views/login/index'),
|
||||
component: () => import('@/views/login/index.vue'),
|
||||
hidden: true
|
||||
},
|
||||
{
|
||||
path: '/register',
|
||||
name: 'Register',
|
||||
component: () => import('@/views/login/register'),
|
||||
component: () => import('@/views/login/register.vue'),
|
||||
hidden: true
|
||||
}
|
||||
]
|
||||
@@ -40,12 +37,12 @@ export const constantRoutes = [{
|
||||
|
||||
{
|
||||
path: '/404',
|
||||
component: () => import('@/views/error-page/404'),
|
||||
component: () => import('@/views/error-page/404.vue'),
|
||||
hidden: true
|
||||
},
|
||||
{
|
||||
path: '/401',
|
||||
component: () => import('@/views/error-page/401'),
|
||||
component: () => import('@/views/error-page/401.vue'),
|
||||
hidden: true
|
||||
},
|
||||
{
|
||||
@@ -54,7 +51,7 @@ export const constantRoutes = [{
|
||||
redirect: '/dashboard',
|
||||
children: [{
|
||||
path: 'dashboard',
|
||||
component: () => import('@/views/dashboard/index'),
|
||||
component: () => import('@/views/dashboard/index.vue'),
|
||||
name: 'Dashboard',
|
||||
meta: {
|
||||
title: '控制台',
|
||||
@@ -71,7 +68,7 @@ export const constantRoutes = [{
|
||||
hidden: true,
|
||||
children: [{
|
||||
path: 'index',
|
||||
component: () => import('@/views/profile/index'),
|
||||
component: () => import('@/views/profile/index.vue'),
|
||||
name: 'Profile',
|
||||
meta: {
|
||||
title: '个人资料',
|
||||
@@ -88,26 +85,6 @@ export const constantRoutes = [{
|
||||
*/
|
||||
export const asyncRoutes = [
|
||||
|
||||
/*{
|
||||
path: '/apply',
|
||||
component: Layout,
|
||||
redirect: '/apply/input',
|
||||
name: 'Apply',
|
||||
meta: {
|
||||
title: '报销申请',
|
||||
icon: 'example',
|
||||
roles: ['root']
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: 'input',
|
||||
component: () => import('@/views/apply/input'),
|
||||
name: 'input',
|
||||
meta: { title: '报销申请', noCache: true, icon: 'repo' }
|
||||
}
|
||||
]
|
||||
},*/
|
||||
|
||||
{
|
||||
path: '/sys',
|
||||
component: Layout,
|
||||
@@ -120,7 +97,7 @@ export const asyncRoutes = [
|
||||
},
|
||||
children: [{
|
||||
path: 'config',
|
||||
component: () => import('@/views/sys/config'),
|
||||
component: () => import('@/views/sys/config/index.vue'),
|
||||
name: 'SysConfig',
|
||||
meta: {
|
||||
title: '系统配置',
|
||||
@@ -129,26 +106,16 @@ export const asyncRoutes = [
|
||||
},
|
||||
{
|
||||
path: 'dict',
|
||||
component: () => import('@/views/sys/dict'),
|
||||
component: () => import('@/views/sys/dict/index.vue'),
|
||||
name: 'SysDict',
|
||||
meta: {
|
||||
title: '码值管理',
|
||||
icon: 'theme'
|
||||
}
|
||||
},
|
||||
/*{
|
||||
path: 'depart',
|
||||
component: () => import('@/views/sys/depart'),
|
||||
name: 'SysDepart',
|
||||
meta: {
|
||||
title: '部门管理',
|
||||
icon: 'tree'
|
||||
}
|
||||
},*/
|
||||
|
||||
{
|
||||
path: 'role',
|
||||
component: () => import('@/views/sys/role'),
|
||||
component: () => import('@/views/sys/role/index.vue'),
|
||||
name: 'SysRole',
|
||||
meta: {
|
||||
title: '角色管理',
|
||||
@@ -158,7 +125,7 @@ export const asyncRoutes = [
|
||||
|
||||
{
|
||||
path: 'user',
|
||||
component: () => import('@/views/sys/user'),
|
||||
component: () => import('@/views/sys/user/index.vue'),
|
||||
name: 'SysUser',
|
||||
meta: {
|
||||
title: '用户管理',
|
||||
@@ -168,7 +135,7 @@ export const asyncRoutes = [
|
||||
|
||||
{
|
||||
path: 'bookgl',
|
||||
component: () => import('@/views/sys/bookgl'),
|
||||
component: () => import('@/views/sys/bookgl/index.vue'),
|
||||
name: 'SysBookgl',
|
||||
meta: {
|
||||
title: '书籍信息管理',
|
||||
@@ -177,7 +144,7 @@ export const asyncRoutes = [
|
||||
},
|
||||
{
|
||||
path: 'jieshu',
|
||||
component: () => import('@/views/sys/jieshu'),
|
||||
component: () => import('@/views/sys/jieshu/index.vue'),
|
||||
name: 'SysJieshu',
|
||||
meta: {
|
||||
title: '图书搜索',
|
||||
@@ -187,7 +154,7 @@ export const asyncRoutes = [
|
||||
|
||||
{
|
||||
path: 'huanshu',
|
||||
component: () => import('@/views/sys/huanshu'),
|
||||
component: () => import('@/views/sys/huanshu/index.vue'),
|
||||
name: 'Syshuanshu',
|
||||
meta: {
|
||||
title: '我的借还',
|
||||
@@ -196,7 +163,7 @@ export const asyncRoutes = [
|
||||
},
|
||||
{
|
||||
path: 'jiehuanjilu',
|
||||
component: () => import('@/views/sys/jiehuanjilu'),
|
||||
component: () => import('@/views/sys/jiehuanjilu/index.vue'),
|
||||
name: 'SysJiehuanjilu',
|
||||
meta: {
|
||||
title: '借还记录',
|
||||
@@ -204,7 +171,7 @@ export const asyncRoutes = [
|
||||
}
|
||||
},{
|
||||
path: 'gggl',
|
||||
component: () => import('@/views/sys/gggl'),
|
||||
component: () => import('@/views/sys/gggl/index.vue'),
|
||||
name: 'SysGggl',
|
||||
meta: {
|
||||
title: '公告管理',
|
||||
@@ -213,7 +180,7 @@ export const asyncRoutes = [
|
||||
},
|
||||
{
|
||||
path: 'lygl',
|
||||
component: () => import('@/views/sys/liuyangl'),
|
||||
component: () => import('@/views/sys/liuyangl/index.vue'),
|
||||
name: 'SysLygl',
|
||||
meta: {
|
||||
title: '留言管理',
|
||||
@@ -222,9 +189,6 @@ export const asyncRoutes = [
|
||||
},
|
||||
|
||||
]
|
||||
|
||||
|
||||
|
||||
},
|
||||
{
|
||||
path: '/sys',
|
||||
@@ -235,20 +199,11 @@ export const asyncRoutes = [
|
||||
title: '用户系统',
|
||||
icon: 'configure',
|
||||
roles: ['student']
|
||||
},// 学生路由页面
|
||||
},
|
||||
children: [
|
||||
/*{
|
||||
path: 'grxxgl',
|
||||
component: () => import('@/views/sys/grxxgl'),
|
||||
name: 'SysGrxxgl',
|
||||
meta: {
|
||||
title: '个人信息管理',
|
||||
icon: 'admin'
|
||||
}
|
||||
},*/
|
||||
{
|
||||
path: 'jieshu',
|
||||
component: () => import('@/views/sys/jieshu'),
|
||||
component: () => import('@/views/sys/jieshu/index.vue'),
|
||||
name: 'SysJieshu',
|
||||
meta: {
|
||||
title: '图书搜索',
|
||||
@@ -258,7 +213,7 @@ export const asyncRoutes = [
|
||||
|
||||
{
|
||||
path: 'huanshu',
|
||||
component: () => import('@/views/sys/huanshu'),
|
||||
component: () => import('@/views/sys/huanshu/index.vue'),
|
||||
name: 'Syshuanshu',
|
||||
meta: {
|
||||
title: '我的借还',
|
||||
@@ -267,7 +222,7 @@ export const asyncRoutes = [
|
||||
},
|
||||
{
|
||||
path: 'jiehuanjilu',
|
||||
component: () => import('@/views/sys/jiehuanjilu'),
|
||||
component: () => import('@/views/sys/jiehuanjilu/index.vue'),
|
||||
name: 'SysJiehuanjilu',
|
||||
meta: {
|
||||
title: '借还记录',
|
||||
@@ -277,7 +232,7 @@ export const asyncRoutes = [
|
||||
,
|
||||
{
|
||||
path: 'liuyan',
|
||||
component: () => import('@/views/sys/stuliuyan'),
|
||||
component: () => import('@/views/sys/stuliuyan/index.vue'),
|
||||
name: 'SysStuliuyan',
|
||||
meta: {
|
||||
title: '留言板块',
|
||||
@@ -287,7 +242,7 @@ export const asyncRoutes = [
|
||||
,
|
||||
{
|
||||
path: 'gonggao',
|
||||
component: () => import('@/views/sys/stugggl'),
|
||||
component: () => import('@/views/sys/stugggl/index.vue'),
|
||||
name: 'SysStugggl',
|
||||
meta: {
|
||||
title: '公告板块',
|
||||
@@ -300,25 +255,31 @@ export const asyncRoutes = [
|
||||
|
||||
// 404 page must be placed at the end !!!
|
||||
{
|
||||
path: '*',
|
||||
path: '/:pathMatch(.*)*',
|
||||
redirect: '/dashboard',
|
||||
hidden: true
|
||||
}
|
||||
]
|
||||
|
||||
const createRouter = () => new Router({
|
||||
// mode: 'history', // require service support
|
||||
scrollBehavior: () => ({
|
||||
y: 0
|
||||
}),
|
||||
const router = createRouter({
|
||||
history: createWebHashHistory(),
|
||||
scrollBehavior: () => ({ top: 0 }),
|
||||
routes: constantRoutes
|
||||
})
|
||||
|
||||
const router = createRouter()
|
||||
|
||||
export function resetRouter() {
|
||||
const newRouter = createRouter()
|
||||
router.matcher = newRouter.matcher // reset router
|
||||
const newRouter = createRouter({
|
||||
history: createWebHashHistory(),
|
||||
scrollBehavior: () => ({ top: 0 }),
|
||||
routes: constantRoutes
|
||||
})
|
||||
// 注意:Vue Router 4 没有 matcher,通过移除所有路由再重新添加来重置
|
||||
const currentRoutes = router.getRoutes()
|
||||
currentRoutes.forEach(route => {
|
||||
if (route.name && !constantRoutes.find(cr => cr.name === route.name)) {
|
||||
router.removeRoute(route.name)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
export default router
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
module.exports = {
|
||||
export default {
|
||||
title: '图书管理系统-陈昊东',
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,23 +1,16 @@
|
||||
import Vue from 'vue'
|
||||
import Vuex from 'vuex'
|
||||
import { createStore } from 'vuex'
|
||||
import getters from './getters'
|
||||
|
||||
Vue.use(Vuex)
|
||||
// 动态导入所有 modules
|
||||
const modulesFiles = import.meta.glob('./modules/*.js', { eager: true })
|
||||
|
||||
// https://webpack.js.org/guides/dependency-management/#requirecontext
|
||||
const modulesFiles = require.context('./modules', true, /\.js$/)
|
||||
const modules = {}
|
||||
for (const path in modulesFiles) {
|
||||
const moduleName = path.replace(/(\.\/modules\/|\.js$)/g, '')
|
||||
modules[moduleName] = modulesFiles[path].default
|
||||
}
|
||||
|
||||
// you do not need `import app from './modules/app'`
|
||||
// it will auto require all vuex module from modules file
|
||||
const modules = modulesFiles.keys().reduce((modules, modulePath) => {
|
||||
// set './app.js' => 'app'
|
||||
const moduleName = modulePath.replace(/^\.\/(.*)\.\w+$/, '$1')
|
||||
const value = modulesFiles(modulePath)
|
||||
modules[moduleName] = value.default
|
||||
return modules
|
||||
}, {})
|
||||
|
||||
const store = new Vuex.Store({
|
||||
const store = createStore({
|
||||
modules,
|
||||
getters
|
||||
})
|
||||
|
||||
@@ -1,11 +1,10 @@
|
||||
import variables from '@/styles/element-variables.scss'
|
||||
import defaultSettings from '@/settings'
|
||||
import { fetchDetail } from '@/api/sys/config/config'
|
||||
import { fetchDetail } from '@/api/sys/config/config.js'
|
||||
|
||||
const { showSettings, tagsView, fixedHeader, sidebarLogo } = defaultSettings
|
||||
|
||||
const state = {
|
||||
theme: variables.theme,
|
||||
theme: '#1890ff',
|
||||
showSettings: showSettings,
|
||||
tagsView: tagsView,
|
||||
fixedHeader: fixedHeader,
|
||||
|
||||
@@ -161,7 +161,9 @@ const actions = {
|
||||
const accessRoutes = await dispatch('permission/generateRoutes', roles, { root: true })
|
||||
|
||||
// dynamically add accessible routes
|
||||
router.addRoutes(accessRoutes)
|
||||
accessRoutes.forEach(route => {
|
||||
router.addRoute(route)
|
||||
})
|
||||
|
||||
// reset visited views and cached views
|
||||
dispatch('tagsView/delAllViews', null, { root: true })
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
/**
|
||||
* I think element-ui's default theme color is too light for long-term use.
|
||||
* So I modified the default color and you can modify it to your liking.
|
||||
* Element Plus theme variables
|
||||
**/
|
||||
|
||||
/* theme color */
|
||||
@@ -8,24 +7,7 @@ $--color-primary: #1890ff;
|
||||
$--color-success: #13ce66;
|
||||
$--color-warning: #FFBA00;
|
||||
$--color-danger: #ff4949;
|
||||
// $--color-info: #1E1E1E;
|
||||
|
||||
$--button-font-weight: 400;
|
||||
|
||||
// $--color-text-regular: #1f2d3d;
|
||||
|
||||
$--border-color-light: #dfe4ed;
|
||||
$--border-color-lighter: #e6ebf5;
|
||||
|
||||
$--table-border:1px solid#dfe6ec;
|
||||
|
||||
/* icon font path, required */
|
||||
$--font-path: '~element-ui/lib/theme-chalk/fonts';
|
||||
|
||||
@import "~element-ui/packages/theme-chalk/src/index";
|
||||
|
||||
// the :export directive is the magic sauce for webpack
|
||||
// https://www.bluematador.com/blog/how-to-share-variables-between-js-and-sass
|
||||
:export {
|
||||
theme: $--color-primary;
|
||||
}
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
.login-container{
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
background-image: url('~@/assets/login-bg.svg');
|
||||
background-image: url('@/assets/login-bg.svg');
|
||||
background-repeat: no-repeat;
|
||||
background-position: center 110px;
|
||||
background-size: 100%;
|
||||
@@ -81,7 +81,6 @@
|
||||
color: #3296FA;
|
||||
}
|
||||
|
||||
::v-deep
|
||||
.el-form-item__content{
|
||||
line-height: 0px !important;
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
transition: opacity 0.28s;
|
||||
}
|
||||
|
||||
.fade-enter,
|
||||
.fade-enter-from,
|
||||
.fade-leave-active {
|
||||
opacity: 0;
|
||||
}
|
||||
@@ -17,7 +17,7 @@
|
||||
transition: all .5s;
|
||||
}
|
||||
|
||||
.fade-transform-enter {
|
||||
.fade-transform-enter-from {
|
||||
opacity: 0;
|
||||
transform: translateX(-30px);
|
||||
}
|
||||
@@ -33,7 +33,7 @@
|
||||
transition: all .5s;
|
||||
}
|
||||
|
||||
.breadcrumb-enter,
|
||||
.breadcrumb-enter-from,
|
||||
.breadcrumb-leave-active {
|
||||
opacity: 0;
|
||||
transform: translateX(20px);
|
||||
|
||||
@@ -1,14 +1,12 @@
|
||||
import Vue from 'vue'
|
||||
import { getCurrentInstance } from 'vue'
|
||||
import store from '@/store'
|
||||
import { isString, isArray } from '@/utils/validate'
|
||||
import settings from '@/settings'
|
||||
|
||||
// you can set in settings.js
|
||||
// errorLog:'production' | ['production', 'development']
|
||||
const { errorLog: needErrorLog } = settings
|
||||
|
||||
function checkNeed() {
|
||||
const env = process.env.NODE_ENV
|
||||
const env = import.meta.env.MODE
|
||||
if (isString(needErrorLog)) {
|
||||
return env === needErrorLog
|
||||
}
|
||||
@@ -19,17 +17,19 @@ function checkNeed() {
|
||||
}
|
||||
|
||||
if (checkNeed()) {
|
||||
Vue.config.errorHandler = function(err, vm, info, a) {
|
||||
// Don't ask me why I use Vue.nextTick, it just a hack.
|
||||
// detail see https://forum.vuejs.org/t/dispatch-in-vue-config-errorhandler-has-some-problem/23500
|
||||
Vue.nextTick(() => {
|
||||
store.dispatch('errorLog/addErrorLog', {
|
||||
err,
|
||||
vm,
|
||||
info,
|
||||
url: window.location.href
|
||||
})
|
||||
console.error(err, info)
|
||||
})
|
||||
// Vue 3 使用 app.config.errorHandler
|
||||
// 这里在 app 创建后设置,通过延迟设置
|
||||
window.__setErrorhandler__ = function(app) {
|
||||
app.config.errorHandler = function(err, vm, info) {
|
||||
setTimeout(() => {
|
||||
store.dispatch('errorLog/addErrorLog', {
|
||||
err,
|
||||
vm,
|
||||
info,
|
||||
url: window.location.href
|
||||
})
|
||||
console.error(err, info)
|
||||
}, 0)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,16 +1,13 @@
|
||||
import axios from 'axios'
|
||||
import { MessageBox, Message } from 'element-ui'
|
||||
import { Loading } from 'element-ui'
|
||||
import { ElMessageBox, ElMessage, ElLoading } from 'element-plus'
|
||||
import store from '@/store'
|
||||
import { getToken } from '@/utils/auth'
|
||||
|
||||
// 请求实例
|
||||
const instance = axios.create({
|
||||
baseURL: process.env.VUE_APP_BASE_API,
|
||||
baseURL: import.meta.env.VITE_BASE_API,
|
||||
timeout: 60000
|
||||
})
|
||||
|
||||
// 请求前置过滤器
|
||||
instance.interceptors.request.use(
|
||||
config => {
|
||||
if (store.getters.token) {
|
||||
@@ -24,12 +21,10 @@ instance.interceptors.request.use(
|
||||
}
|
||||
)
|
||||
|
||||
// 响应数据拦截并做通用处理
|
||||
instance.interceptors.response.use(
|
||||
response => {
|
||||
const res = response.data
|
||||
|
||||
// 下载文件直接返回
|
||||
if (res.type === 'application/octet-stream') {
|
||||
return response
|
||||
}
|
||||
@@ -38,18 +33,15 @@ instance.interceptors.response.use(
|
||||
return response
|
||||
}
|
||||
|
||||
// 0为正确响应码
|
||||
if (res.code !== 0) {
|
||||
Message({
|
||||
ElMessage({
|
||||
message: res.msg || 'Error',
|
||||
type: 'error',
|
||||
duration: 5 * 1000
|
||||
})
|
||||
|
||||
// 登录超时响应码
|
||||
if (res.code === 10010002) {
|
||||
// to re-login
|
||||
MessageBox.confirm('登录超时,请重新登录!', '登录提示', {
|
||||
ElMessageBox.confirm('登录超时,请重新登录!', '登录提示', {
|
||||
confirmButtonText: '重新登录',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
@@ -66,7 +58,7 @@ instance.interceptors.response.use(
|
||||
},
|
||||
error => {
|
||||
console.log('err' + error)
|
||||
Message({
|
||||
ElMessage({
|
||||
message: error.message,
|
||||
type: 'error',
|
||||
duration: 5 * 1000
|
||||
@@ -75,16 +67,10 @@ instance.interceptors.response.use(
|
||||
}
|
||||
)
|
||||
|
||||
/**
|
||||
* 上传
|
||||
* @param url
|
||||
* @param data
|
||||
*/
|
||||
export function upload(url, file, data) {
|
||||
const formData = new FormData()
|
||||
formData.append('file', file)
|
||||
|
||||
// 附加数据
|
||||
if (data) {
|
||||
Object.keys(data).forEach((key) => {
|
||||
formData.append(key, data[key])
|
||||
@@ -92,8 +78,7 @@ export function upload(url, file, data) {
|
||||
}
|
||||
|
||||
return new Promise((resolve, reject) => {
|
||||
// 打开
|
||||
const loading = Loading.service({
|
||||
const loading = ElLoading.service({
|
||||
text: '正在上传数据...',
|
||||
background: 'rgba(0, 0, 0, 0.7)'
|
||||
})
|
||||
@@ -114,15 +99,9 @@ export function upload(url, file, data) {
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 下载
|
||||
* @param url
|
||||
* @param data
|
||||
*/
|
||||
export function download(url, data, fileName) {
|
||||
return new Promise((resolve, reject) => {
|
||||
// 打开
|
||||
const loading = Loading.service({
|
||||
const loading = ElLoading.service({
|
||||
text: '正在下载数据...',
|
||||
background: 'rgba(0, 0, 0, 0.7)'
|
||||
})
|
||||
@@ -136,18 +115,16 @@ export function download(url, data, fileName) {
|
||||
}).then(res => {
|
||||
loading.close()
|
||||
|
||||
// 文件下载
|
||||
const blob = new Blob([res.data], {
|
||||
type: 'application/vnd.ms-excel'
|
||||
})
|
||||
|
||||
// 获得文件名称
|
||||
let link = document.createElement('a')
|
||||
link.href = URL.createObjectURL(blob)
|
||||
link.setAttribute('download', fileName)
|
||||
link.click()
|
||||
link = null
|
||||
Message.success('导出成功!')
|
||||
ElMessage.success('导出成功!')
|
||||
}).catch(err => {
|
||||
loading.close()
|
||||
reject(err)
|
||||
@@ -155,12 +132,6 @@ export function download(url, data, fileName) {
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 封装post请求
|
||||
* @param url
|
||||
* @param data
|
||||
* @returns {Promise}
|
||||
*/
|
||||
export function post(url, data = {}) {
|
||||
return new Promise((resolve, reject) => {
|
||||
instance.post(url, data)
|
||||
|
||||
@@ -1,18 +1,18 @@
|
||||
<template>
|
||||
<div>
|
||||
<data-table ref="pagingTable" :options="options" :list-query="listQuery" @multi-actions="handleMultiAction">
|
||||
<template slot="filter-content">
|
||||
<template #filter-content>
|
||||
<el-input v-model="listQuery.params.userName" style="width: 200px" placeholder="搜索登录名" class="filter-item"/>
|
||||
<el-input v-model="listQuery.params.applyTimeParam" style="width: 200px" placeholder="搜索日期格式yyyyMM"
|
||||
class="filter-item"/>
|
||||
<el-button class="filter-item" type="primary" icon="el-icon-plus" @click="handleAdd">
|
||||
添加
|
||||
<el-button class="filter-item" type="primary" @click="handleAdd">
|
||||
<el-icon><Plus /></el-icon> 添加
|
||||
</el-button>
|
||||
</template>
|
||||
<template slot="data-columns">
|
||||
<template #data-columns>
|
||||
<el-table-column type="selection" width="55"/>
|
||||
<el-table-column align="center" label="用户名">
|
||||
<template slot-scope="scope">
|
||||
<template #default="scope">
|
||||
<a style="color: #1890ff" @click="handleUpdate(scope.row)">{{ scope.row.userName }}</a>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@@ -22,7 +22,7 @@
|
||||
</template>
|
||||
</data-table>
|
||||
|
||||
<el-dialog :visible.sync="dialogVisible" title="添加申请" width="500px">
|
||||
<el-dialog v-model="dialogVisible" title="添加申请" width="500px">
|
||||
<el-form :model="formData" label-position="left" label-width="100px">
|
||||
<el-form-item label="用户">
|
||||
<el-select v-model="formData.userId" placeholder="请选择用户" :disabled="flag">
|
||||
@@ -52,25 +52,27 @@
|
||||
v-model="formData.applyTime"
|
||||
type="datetime"
|
||||
placeholder="选择日期时间"
|
||||
format="yyyy-MM-dd">
|
||||
format="YYYY-MM-DD"
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="dialogVisible = false">取 消</el-button>
|
||||
<el-button type="primary" @click="handleSave">确 定</el-button>
|
||||
</div>
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
<el-button @click="dialogVisible = false">取 消</el-button>
|
||||
<el-button type="primary" @click="handleSave">确 定</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import DataTable from '@/components/DataTable'
|
||||
import {userList} from '@/api/sys/user/user'
|
||||
import {saveData} from '@/api/apply/apply'
|
||||
import DataTable from '@/components/DataTable/index.vue'
|
||||
import {userList} from '@/api/sys/user/user.js'
|
||||
import {saveData} from '@/api/apply/apply.js'
|
||||
import {mapGetters} from "vuex";
|
||||
import {formatDate} from '@/utils/index'
|
||||
import {dataFormatter} from '@/utils'
|
||||
import {getSelectOptions} from '@/api/sys/dict/dict'
|
||||
import {getSelectOptions} from '@/api/sys/dict/dict.js'
|
||||
|
||||
export default {
|
||||
name: 'XmApply',
|
||||
@@ -140,7 +142,7 @@
|
||||
dataFormatter,
|
||||
formatDate,
|
||||
handleUploadSuccess(response) {
|
||||
// 上传图片赋值
|
||||
// 上传图片注释
|
||||
this.formData.avatar = response.data.url
|
||||
},
|
||||
|
||||
|
||||
@@ -3,10 +3,12 @@
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="16">
|
||||
<el-card class="box">
|
||||
<div slot="header" class="clearfix">
|
||||
<span>项目信息</span>
|
||||
<el-button style="float: right; padding: 3px 0; font-size: 12px" type="text">系统版本:1.0.0</el-button>
|
||||
</div>
|
||||
<template #header>
|
||||
<div class="clearfix">
|
||||
<span>项目信息</span>
|
||||
<el-button style="float: right; padding: 3px 0; font-size: 12px" text>系统版本:1.0.0</el-button>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<div style="line-height: 32px;">
|
||||
|
||||
@@ -21,8 +23,8 @@
|
||||
<el-tag>Redis</el-tag>
|
||||
<el-tag>JWT</el-tag>
|
||||
<el-tag>Vue</el-tag>
|
||||
<el-tag>Vue2</el-tag>
|
||||
<el-tag>ElementUI</el-tag>
|
||||
<el-tag>Vue3</el-tag>
|
||||
<el-tag>ElementPlus</el-tag>
|
||||
</div>
|
||||
|
||||
<div class="title">产品功能</div>
|
||||
@@ -41,9 +43,11 @@
|
||||
<el-col :span="8">
|
||||
|
||||
<el-card class="box">
|
||||
<div slot="header" class="clearfix">
|
||||
<span>支持信息</span>
|
||||
</div>
|
||||
<template #header>
|
||||
<div class="clearfix">
|
||||
<span>支持信息</span>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<div>
|
||||
|
||||
@@ -54,25 +58,8 @@
|
||||
<div>手机:<a href="tel:17640541176">陈昊东</a></div>
|
||||
<div>邮箱:<a href="mailto:haodongchen@aliyun.com">haodongchen@aliyun.com</a> </div>
|
||||
</div>
|
||||
<!-- <div style="width: 120px; display: flex; align-items: center; flex-direction: column; align-content: flex-end">
|
||||
<img style="width: 100px; height: 100px" src="@/assets/contact.png" >
|
||||
<div style="font-size: 12px; text-align: center; width: 100%">微信扫码加我好友</div>
|
||||
</div> -->
|
||||
|
||||
</div>
|
||||
|
||||
<!-- <div class="title">支持网站</div>
|
||||
<div>
|
||||
<div>企业官网:<a href="https://www.yfhl.net">https://www.yfhl.net</a></div>
|
||||
<div>在线试用:<a href="https://exam.yfhl.net">https://exam.yfhl.net</a></div>
|
||||
</div>
|
||||
|
||||
<div class="title">在线试用</div>
|
||||
<div style="display: flex; align-items: center">
|
||||
<img src="@/assets/h5.png" style="width: 150px; height: 150px; border: #efefef 1px solid">
|
||||
<img src="@/assets/mp.jpg" style="width: 150px; height: 150px; border: #efefef 1px solid; margin-left: 20px">
|
||||
</div> -->
|
||||
|
||||
</div>
|
||||
|
||||
</el-card>
|
||||
|
||||
@@ -16,8 +16,8 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import ErrorA from './components/ErrorTestA'
|
||||
import ErrorB from './components/ErrorTestB'
|
||||
import ErrorA from './components/ErrorTestA.vue'
|
||||
import ErrorB from './components/ErrorTestB.vue'
|
||||
|
||||
export default {
|
||||
name: 'ErrorLog',
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<div class="errPage-container">
|
||||
<el-button icon="el-icon-arrow-left" class="pan-back-btn" @click="back">
|
||||
返回
|
||||
<el-button class="pan-back-btn" @click="back">
|
||||
<el-icon><ArrowLeft /></el-icon> 返回
|
||||
</el-button>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
@@ -28,7 +28,7 @@
|
||||
<img :src="errGif" width="313" height="428" alt="Girl has dropped her ice cream.">
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-dialog :visible.sync="dialogVisible" title="随便看">
|
||||
<el-dialog v-model="dialogVisible" title="随便看">
|
||||
<img :src="ewizardClap" class="pan-img">
|
||||
</el-dialog>
|
||||
</div>
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex'
|
||||
import AppMain from '@/layout/components/AppMain'
|
||||
import AppMain from '@/layout/components/AppMain.vue'
|
||||
|
||||
export default {
|
||||
name: 'LoginLayout',
|
||||
@@ -39,7 +39,7 @@ export default {
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import "~@/styles/login.scss";
|
||||
@import "@/styles/login.scss";
|
||||
|
||||
</style>
|
||||
|
||||
|
||||
@@ -12,8 +12,9 @@
|
||||
v-model="postForm.username"
|
||||
style="width: 100%"
|
||||
placeholder="用户名"
|
||||
prefix-icon="el-icon-user"
|
||||
/>
|
||||
>
|
||||
<template #prefix><el-icon><User /></el-icon></template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item prop="password">
|
||||
@@ -23,12 +24,13 @@
|
||||
style="width: 100%"
|
||||
placeholder="密码"
|
||||
type="password"
|
||||
prefix-icon="el-icon-lock"
|
||||
/>
|
||||
>
|
||||
<template #prefix><el-icon><Lock /></el-icon></template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item>
|
||||
<el-button :loading="loading" type="primary" style="width: 100%" @click.native.prevent="accountLogin">登录</el-button>
|
||||
<el-button :loading="loading" type="primary" style="width: 100%" @click.prevent="accountLogin">登录</el-button>
|
||||
</el-form-item>
|
||||
|
||||
</el-form>
|
||||
|
||||
@@ -12,8 +12,9 @@
|
||||
v-model="postForm.userName"
|
||||
style="width: 100%"
|
||||
placeholder="用户名"
|
||||
prefix-icon="el-icon-mobile"
|
||||
/>
|
||||
>
|
||||
<template #prefix><el-icon><Iphone /></el-icon></template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item prop="realName">
|
||||
@@ -21,8 +22,9 @@
|
||||
v-model="postForm.realName"
|
||||
style="width: 100%"
|
||||
placeholder="姓名"
|
||||
prefix-icon="el-icon-user"
|
||||
/>
|
||||
>
|
||||
<template #prefix><el-icon><User /></el-icon></template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item prop="password">
|
||||
@@ -32,12 +34,13 @@
|
||||
style="width: 100%"
|
||||
placeholder="密码"
|
||||
type="password"
|
||||
prefix-icon="el-icon-lock"
|
||||
/>
|
||||
>
|
||||
<template #prefix><el-icon><Lock /></el-icon></template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item>
|
||||
<el-button :loading="loading" type="primary" style="width: 100%" @click.native.prevent="handleReg">注册</el-button>
|
||||
<el-button :loading="loading" type="primary" style="width: 100%" @click.prevent="handleReg">注册</el-button>
|
||||
</el-form-item>
|
||||
|
||||
</el-form>
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { updateData } from '@/api/sys/user/user'
|
||||
import { updateData } from '@/api/sys/user/user.js'
|
||||
|
||||
export default {
|
||||
props: {
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
<template>
|
||||
<el-card style="margin-bottom:20px;">
|
||||
<div slot="header" class="clearfix">
|
||||
<span>个人资料</span>
|
||||
</div>
|
||||
<template #header>
|
||||
<div class="clearfix">
|
||||
<span>个人资料</span>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<div class="user-profile">
|
||||
<div class="box-center">
|
||||
@@ -13,14 +15,14 @@
|
||||
</div>
|
||||
<div class="box-center">
|
||||
<div class="user-name text-center">{{ user.name }}</div>
|
||||
<div class="user-role text-center text-muted">{{ user.role | uppercaseFirst }}</div>
|
||||
<div class="user-role text-center text-muted">{{ $filters.uppercaseFirst(user.role) }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</el-card>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import PanThumb from '@/components/PanThumb'
|
||||
import PanThumb from '@/components/PanThumb/index.vue'
|
||||
|
||||
export default {
|
||||
components: { PanThumb },
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex'
|
||||
import UserCard from './components/UserCard'
|
||||
import Account from './components/Account'
|
||||
import UserCard from './components/UserCard.vue'
|
||||
import Account from './components/Account.vue'
|
||||
|
||||
export default {
|
||||
name: 'Profile',
|
||||
|
||||
@@ -1,12 +1,13 @@
|
||||
<script>
|
||||
import { h } from 'vue'
|
||||
export default {
|
||||
created() {
|
||||
const { params, query } = this.$route
|
||||
const { path } = params
|
||||
this.$router.replace({ path: '/' + path, query })
|
||||
},
|
||||
render: function(h) {
|
||||
return h() // avoid warning message
|
||||
render() {
|
||||
return h('div')
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
:list-query="listQuery"
|
||||
@multi-actions="handleMultiAction"
|
||||
>
|
||||
<template slot="filter-content">
|
||||
<template #filter-content>
|
||||
<el-input v-model="listQuery.params.isbn" style="width: 200px" placeholder="搜索ISBN书号" class="filter-item"/>
|
||||
<el-input v-model="listQuery.params.bName" style="width: 200px" placeholder="搜索书名" class="filter-item"/>
|
||||
<el-input v-model="listQuery.params.bAuthor" style="width: 200px" placeholder="搜索作者" class="filter-item"/>
|
||||
@@ -32,18 +32,19 @@
|
||||
|
||||
|
||||
<!-- <el-input v-model="listQuery.params.qctype" style="width: 200px" placeholder="搜索器材种类" class="filter-item"/>-->
|
||||
<el-button class="filter-item" type="primary" icon="el-icon-plus" @click="handleAdd">
|
||||
添加
|
||||
<el-button class="filter-item" type="primary" @click="handleAdd">
|
||||
<el-icon><Plus /></el-icon> 添加
|
||||
</el-button>
|
||||
</template>
|
||||
<!-- 表格-->
|
||||
<template slot="data-columns">
|
||||
<template #data-columns>
|
||||
<el-table-column type="selection" width="55"/>
|
||||
|
||||
<el-table-column align="center" label="ISBN书号" prop="isbn"/>
|
||||
<template slot-scope="scope">
|
||||
<a style="color: #1890ff" @click="handleUpdate(scope.row)">{{ scope.row.id }}</a>
|
||||
</template>
|
||||
<el-table-column align="center" label="ISBN书号" prop="isbn">
|
||||
<template #default="scope">
|
||||
<a style="color: #1890ff" @click="handleUpdate(scope.row)">{{ scope.row.id }}</a>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="书名" prop="bName" />
|
||||
<el-table-column :formatter="dataFormatter" align="center" label="图书种类" prop="bType" class-name="DIC_TSZL"/>
|
||||
|
||||
@@ -51,16 +52,18 @@
|
||||
<el-table-column align="center" label="作者" prop="bAuthor" />
|
||||
<el-table-column align="center" label="出版商" prop="bPublisher" />
|
||||
<el-table-column align="center" label="封面" >
|
||||
<template slot-scope="scope">
|
||||
<template #default="scope">
|
||||
<el-popover placement="right" trigger="hover">
|
||||
<el-image slot="reference" :src="scope.row.bPath" width="80" height="80"/>
|
||||
<template #reference>
|
||||
<el-image :src="scope.row.bPath" width="80" height="80"/>
|
||||
</template>
|
||||
<el-image style="width: 250px; height: 250px" :src="scope.row.bPath" fit="cover"/>
|
||||
</el-popover>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="出版日期">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.bPublicationTime | xmDateFormat }}
|
||||
<template #default="scope">
|
||||
{{ $filters.xmDateFormat(scope.row.bPublicationTime) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
@@ -71,7 +74,7 @@
|
||||
<el-table-column :formatter="dataFormatter" align="center" label="状态" prop="bState" class-name="STATE"/>
|
||||
|
||||
<el-table-column align="center" label="操作">
|
||||
<template slot-scope="scope">
|
||||
<template #default="scope">
|
||||
<a style="color: #1890ff" @click="handleUpdate(scope.row)">
|
||||
<el-button link type="primary" size="small"
|
||||
>编辑
|
||||
@@ -86,7 +89,7 @@
|
||||
</data-table>
|
||||
|
||||
<!-- 新增按钮按下-->
|
||||
<el-dialog :visible.sync="dialogVisible" title="书籍信息" width="500px">
|
||||
<el-dialog v-model="dialogVisible" title="书籍信息" width="500px">
|
||||
<el-form :model="formData" label-position="left" label-width="100px">
|
||||
<el-form-item label="Isbn书号">
|
||||
<el-input v-model="formData.isbn" />
|
||||
@@ -119,7 +122,7 @@
|
||||
v-model="formData.bPublicationTime"
|
||||
type="datetime"
|
||||
placeholder="选择日期时间"
|
||||
format="yyyy-MM-dd">
|
||||
format="YYYY-MM-DD">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="数量">
|
||||
@@ -132,10 +135,12 @@
|
||||
<el-input v-model="formData.bIntroduce" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="handleUpCancel">取 消</el-button>
|
||||
<el-button type="primary" @click="handleSave">确 认</el-button>
|
||||
</div>
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
<el-button @click="handleUpCancel">取 消</el-button>
|
||||
<el-button type="primary" @click="handleSave">确 认</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-dialog>
|
||||
|
||||
</div>
|
||||
@@ -143,14 +148,13 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import DataTable from '@/components/DataTable'
|
||||
import MeetRole from '@/components/MeetRole'
|
||||
import DepartTreeSelect from '@/components/DepartTreeSelect'
|
||||
import {fetchTree} from '@/api/sys/depart/depart'
|
||||
import {getSelectOptions} from '@/api/sys/dict/dict'
|
||||
import DataTable from '@/components/DataTable/index.vue'
|
||||
import MeetRole from '@/components/MeetRole/index.vue'
|
||||
import DepartTreeSelect from '@/components/DepartTreeSelect/index.vue'
|
||||
import {getSelectOptions} from '@/api/sys/dict/dict.js'
|
||||
import {dataFormatter} from '@/utils'
|
||||
import {saveData} from '@/api/sys/bookgl/bookgl'
|
||||
import {getBjList, getZyList} from "@/api/sys/grxxgl/grxxgl";
|
||||
import {saveData} from '@/api/sys/bookgl/bookgl.js'
|
||||
import {getBjList, getZyList} from "@/api/sys/grxxgl/grxxgl.js";
|
||||
|
||||
|
||||
export default {
|
||||
|
||||
@@ -31,8 +31,8 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { fetchDetail, saveData } from '@/api/sys/config/config'
|
||||
import FileUpload from '@/components/FileUpload'
|
||||
import { fetchDetail, saveData } from '@/api/sys/config/config.js'
|
||||
import FileUpload from '@/components/FileUpload/index.vue'
|
||||
|
||||
export default {
|
||||
name: 'Config',
|
||||
|
||||
@@ -2,17 +2,17 @@
|
||||
<div>
|
||||
<data-table ref="pagingTypeTable" :options="typeOptions" :list-query="typeListQuery"
|
||||
@multi-actions="handleMultiAction">
|
||||
<template slot="filter-content">
|
||||
<template #filter-content>
|
||||
<el-input v-model="typeListQuery.params.userName" style="width: 200px" placeholder="搜索登录名" class="filter-item"/>
|
||||
<el-input v-model="typeListQuery.params.realName" style="width: 200px" placeholder="搜索姓名" class="filter-item"/>
|
||||
<el-button class="filter-item" type="primary" icon="el-icon-plus" @click="handleTypeAdd">
|
||||
添加
|
||||
<el-button class="filter-item" type="primary" @click="handleTypeAdd">
|
||||
<el-icon><Plus /></el-icon> 添加
|
||||
</el-button>
|
||||
</template>
|
||||
<template slot="data-columns">
|
||||
<template #data-columns>
|
||||
<el-table-column type="selection" width="55"/>
|
||||
<el-table-column align="center" label="码值类型">
|
||||
<template slot-scope="scope">
|
||||
<template #default="scope">
|
||||
<a style="color: #1890ff" @click="handleTypeUpdate(scope.row)">{{ scope.row.code }}</a>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@@ -21,8 +21,8 @@
|
||||
<el-table-column align="center" label="码值来源sql" prop="sourceSql"/>
|
||||
<el-table-column align="center" label="状态" prop="state" class-name="STATE" :formatter="dataFormatter"/>
|
||||
<el-table-column label="操作" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="primary" size="mini" icon="el-icon-view" @click="initDictData(scope.row)">码值详情</el-button>
|
||||
<template #default="scope">
|
||||
<el-button type="primary" size="small" @click="initDictData(scope.row)"><el-icon><View /></el-icon> 码值详情</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</template>
|
||||
@@ -30,17 +30,17 @@
|
||||
|
||||
<data-table ref="pagingDataTable" :options="dataOptions" :list-query="dataListQuery"
|
||||
@multi-actions="handleMultiAction">
|
||||
<template slot="filter-content">
|
||||
<template #filter-content>
|
||||
<el-input v-model="dataListQuery.params.userName" style="width: 200px" placeholder="搜索登录名" class="filter-item"/>
|
||||
<el-input v-model="dataListQuery.params.realName" style="width: 200px" placeholder="搜索姓名" class="filter-item"/>
|
||||
<el-button class="filter-item" type="primary" icon="el-icon-plus" @click="handleDataAdd">
|
||||
添加
|
||||
<el-button class="filter-item" type="primary" @click="handleDataAdd">
|
||||
<el-icon><Plus /></el-icon> 添加
|
||||
</el-button>
|
||||
</template>
|
||||
<template slot="data-columns">
|
||||
<template #data-columns>
|
||||
<el-table-column type="selection" width="55"/>
|
||||
<el-table-column align="center" label="码值类型">
|
||||
<template slot-scope="scope">
|
||||
<template #default="scope">
|
||||
<a style="color: #1890ff" @click="handleDataUpdate(scope.row)">{{ scope.row.code }}</a>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@@ -51,7 +51,7 @@
|
||||
</template>
|
||||
</data-table>
|
||||
|
||||
<el-dialog :visible.sync="dialogVisible" title="编辑码值大类" width="500px">
|
||||
<el-dialog v-model="dialogVisible" title="编辑码值大类" width="500px">
|
||||
<el-form :model="typeFormData" label-position="left" label-width="100px">
|
||||
<el-form-item label="码值类型">
|
||||
<el-input v-model="typeFormData.code" :disabled="typeFlag"/>
|
||||
@@ -66,13 +66,15 @@
|
||||
<el-input v-model="typeFormData.sourceSql"/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="handleTypeCancel">取 消</el-button>
|
||||
<el-button type="primary" @click="handleTypeSave">确 定</el-button>
|
||||
</div>
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
<el-button @click="handleTypeCancel">取 消</el-button>
|
||||
<el-button type="primary" @click="handleTypeSave">确 定</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog :visible.sync="dialogVisibleData" title="编辑码值" width="500px">
|
||||
<el-dialog v-model="dialogVisibleData" title="编辑码值" width="500px">
|
||||
<el-form :model="dataFormData" label-position="left" label-width="100px">
|
||||
<el-form-item label="码值类型">
|
||||
<el-input v-model="dataFormData.code" :disabled="true"/>
|
||||
@@ -87,18 +89,20 @@
|
||||
<el-input v-model="dataFormData.priority"/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="handleDataCancel">取 消</el-button>
|
||||
<el-button type="primary" @click="handleDataSave">确 定</el-button>
|
||||
</div>
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
<el-button @click="handleDataCancel">取 消</el-button>
|
||||
<el-button type="primary" @click="handleDataSave">确 定</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-dialog>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import DataTable from '@/components/DataTable'
|
||||
import {saveTypeData, saveData} from '@/api/sys/dict/dict'
|
||||
import DataTable from '@/components/DataTable/index.vue'
|
||||
import {saveTypeData, saveData} from '@/api/sys/dict/dict.js'
|
||||
import {dataFormatter} from '@/utils'
|
||||
export default {
|
||||
name: 'SysDict',
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
:list-query="listQuery"
|
||||
@multi-actions="handleMultiAction"
|
||||
>
|
||||
<template slot="filter-content">
|
||||
<template #filter-content>
|
||||
<el-input v-model="listQuery.params.id" style="width: 200px" placeholder="搜索公告编码" class="filter-item"/>
|
||||
<el-input v-model="listQuery.params.title" style="width: 200px" placeholder="搜索公告标题" class="filter-item"/>
|
||||
<el-input v-model="listQuery.params.text" style="width: 200px" placeholder="搜索公告内容" class="filter-item" />
|
||||
@@ -17,41 +17,42 @@
|
||||
<el-date-picker style="width: 200px" placeholder="开始时间" class="filter-item"
|
||||
v-model="listQuery.params.createTime"
|
||||
type="datetime"
|
||||
format="yyyy-MM-dd"
|
||||
value-format="yyyy-MM-dd"
|
||||
format="YYYY-MM-DD"
|
||||
value-format="YYYY-MM-DD"
|
||||
></el-date-picker>
|
||||
<label>截至时间</label>
|
||||
<el-date-picker style="width: 200px" placeholder="截至时间" class="filter-item"
|
||||
v-model="listQuery.params.updateTime"
|
||||
type="datetime"
|
||||
format="yyyy-MM-dd"
|
||||
value-format="yyyy-MM-dd"
|
||||
format="YYYY-MM-DD"
|
||||
value-format="YYYY-MM-DD"
|
||||
></el-date-picker>
|
||||
<el-button class="filter-item" type="primary" icon="el-icon-plus" @click="handleAdd">
|
||||
添加
|
||||
<el-button class="filter-item" type="primary" @click="handleAdd">
|
||||
<el-icon><Plus /></el-icon> 添加
|
||||
</el-button>
|
||||
|
||||
|
||||
</template>
|
||||
<template slot="data-columns">
|
||||
<template #data-columns>
|
||||
<el-table-column type="selection" width="55"/>
|
||||
<el-table-column align="center" label="公告编号" prop="id"/>
|
||||
<template slot-scope="scope">
|
||||
<a style="color: #1890ff" @click="handleUpdate(scope.row)">{{ scope.row.id }}</a>
|
||||
</template>
|
||||
<el-table-column align="center" label="公告编号" prop="id">
|
||||
<template #default="scope">
|
||||
<a style="color: #1890ff" @click="handleUpdate(scope.row)">{{ scope.row.id }}</a>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
|
||||
<el-table-column align="center" label="公告标题" prop="title"/>
|
||||
<el-table-column align="center" label="公告内容" prop="text"/>
|
||||
<el-table-column align="center" label="发布时间">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.createTime | xmDateFormat }}
|
||||
<template #default="scope">
|
||||
{{ $filters.xmDateFormat(scope.row.createTime) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
|
||||
<el-table-column align="center" label="操作">
|
||||
<template slot-scope="scope">
|
||||
<template #default="scope">
|
||||
<a @click="handleUpdate(scope.row)">
|
||||
<el-button link type="primary" size="small"
|
||||
>编辑公告内容
|
||||
@@ -67,7 +68,7 @@
|
||||
</data-table>
|
||||
|
||||
<!-- 编辑按钮按下-->
|
||||
<el-dialog :visible.sync="dialogVisible" title="编辑公告信息" width="500px">
|
||||
<el-dialog v-model="dialogVisible" title="编辑公告信息" width="500px">
|
||||
<el-form :model="formData" label-position="left" label-width="100px">
|
||||
<el-form-item label="公告编号">
|
||||
<el-input v-model="formData.id" disabled="disabled"/>
|
||||
@@ -83,14 +84,16 @@
|
||||
v-model="formData.createTime" disabled="disabled"
|
||||
type="datetime"
|
||||
placeholder="选择日期时间"
|
||||
format="yyyy-MM-dd">
|
||||
format="YYYY-MM-DD">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="handleUpCancel">取 消</el-button>
|
||||
<el-button type="primary" @click="handleSave">确 认</el-button>
|
||||
</div>
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
<el-button @click="handleUpCancel">取 消</el-button>
|
||||
<el-button type="primary" @click="handleSave">确 认</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-dialog>
|
||||
|
||||
</div>
|
||||
@@ -98,11 +101,11 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import DataTable from '@/components/DataTable'
|
||||
import MeetRole from '@/components/MeetRole'
|
||||
import DepartTreeSelect from '@/components/DepartTreeSelect'
|
||||
import DataTable from '@/components/DataTable/index.vue'
|
||||
import MeetRole from '@/components/MeetRole/index.vue'
|
||||
import DepartTreeSelect from '@/components/DepartTreeSelect/index.vue'
|
||||
import {dataFormatter} from '@/utils'
|
||||
import {saveOrUpData} from "@/api/sys/gggl/gggl";
|
||||
import {saveOrUpData} from "@/api/sys/gggl/gggl.js";
|
||||
|
||||
|
||||
export default {
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
:list-query="listQuery"
|
||||
@multi-actions="handleMultiAction"
|
||||
>
|
||||
<template slot="filter-content">
|
||||
<template #filter-content>
|
||||
<el-input v-model="listQuery.params.isbn" style="width: 200px" placeholder="搜索ISBN书号" class="filter-item"/>
|
||||
<el-input v-model="listQuery.params.bName" style="width: 200px" placeholder="搜索书名" class="filter-item"/>
|
||||
<el-input v-model="listQuery.params.bAuthor" style="width: 200px" placeholder="搜索作者" class="filter-item"/>
|
||||
@@ -39,13 +39,14 @@
|
||||
<!-- </el-button>-->
|
||||
</template>
|
||||
<!-- 表格-->
|
||||
<template slot="data-columns">
|
||||
<template #data-columns>
|
||||
<!-- <el-table-column type="selection" width="55"/>-->
|
||||
|
||||
<el-table-column align="center" label="ISBN书号" prop="isbn"/>
|
||||
<template slot-scope="scope">
|
||||
<a style="color: #1890ff" @click="handleUpdate(scope.row)">{{ scope.row.id }}</a>
|
||||
</template>
|
||||
<el-table-column align="center" label="ISBN书号" prop="isbn">
|
||||
<template #default="scope">
|
||||
<a style="color: #1890ff" @click="handleUpdate(scope.row)">{{ scope.row.id }}</a>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="书名" prop="bName"/>
|
||||
<el-table-column :formatter="dataFormatter" align="center" label="图书种类" prop="bType" class-name="DIC_TSZL"/>
|
||||
|
||||
@@ -53,31 +54,33 @@
|
||||
<el-table-column align="center" label="作者" prop="bAuthor"/>
|
||||
<el-table-column align="center" label="出版商" prop="bPublisher"/>
|
||||
<el-table-column align="center" label="封面">
|
||||
<template slot-scope="scope">
|
||||
<template #default="scope">
|
||||
<el-popover placement="right" trigger="hover">
|
||||
<el-image slot="reference" :src="scope.row.bPath" width="80" height="80"/>
|
||||
<template #reference>
|
||||
<el-image :src="scope.row.bPath" width="80" height="80"/>
|
||||
</template>
|
||||
<el-image style="width: 250px; height: 250px" :src="scope.row.bPath" fit="cover"/>
|
||||
</el-popover>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column align="center" label="出版日期">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.bPublicationTime | xmDateFormat }}
|
||||
<template #default="scope">
|
||||
{{ $filters.xmDateFormat(scope.row.bPublicationTime) }}
|
||||
</template>
|
||||
</el-table-column>-->
|
||||
<el-table-column align="center" label="借阅时间">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.startTime | xmDateFormat }}
|
||||
<template #default="scope">
|
||||
{{ $filters.xmDateFormat(scope.row.startTime) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="应归还时间">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.endTime | xmDateFormat }}
|
||||
<template #default="scope">
|
||||
{{ $filters.xmDateFormat(scope.row.endTime) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="实际归还时间">
|
||||
<template v-if="scope.row.state==='1'" slot-scope="scope" >
|
||||
{{ scope.row.returnTime | xmDateFormat }}
|
||||
<template #default="scope">
|
||||
<span v-if="scope.row.state==='1'">{{ $filters.xmDateFormat(scope.row.returnTime) }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
@@ -92,12 +95,12 @@
|
||||
<el-table-column :formatter="dataFormatter" align="center" label="是否逾期" prop="exceedState" class-name="DIC_SFYQ"/>
|
||||
|
||||
<el-table-column align="center" label="操作">
|
||||
<template slot-scope="scope" v-if="scope.row.state=='0'">
|
||||
<a style="color: #1890ff" @click="handleUpdate(scope.row)">
|
||||
<el-button link type="primary" size="small"
|
||||
>还书
|
||||
</el-button>
|
||||
</a>
|
||||
<template #default="scope">
|
||||
<span v-if="scope.row.state=='0'">
|
||||
<a style="color: #1890ff" @click="handleUpdate(scope.row)">
|
||||
<el-button link type="primary" size="small">还书</el-button>
|
||||
</a>
|
||||
</span>
|
||||
</template>
|
||||
|
||||
</el-table-column>
|
||||
@@ -107,7 +110,7 @@
|
||||
</data-table>
|
||||
|
||||
<!-- 新增按钮按下-->
|
||||
<el-dialog :visible.sync="dialogVisible" title="书籍信息" width="500px">
|
||||
<el-dialog v-model="dialogVisible" title="书籍信息" width="500px">
|
||||
<el-form :model="formData" label-position="left" label-width="100px" disabled="disabled">
|
||||
<el-form-item label="Isbn书号">
|
||||
<el-input v-model="formData.isbn"/>
|
||||
@@ -140,7 +143,7 @@
|
||||
v-model="formData.bPublicationTime"
|
||||
type="datetime"
|
||||
placeholder="选择日期时间"
|
||||
format="yyyy-MM-dd">
|
||||
format="YYYY-MM-DD">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="数量">
|
||||
@@ -153,10 +156,12 @@
|
||||
<el-input v-model="formData.bIntroduce"/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="handleUpCancel">取 消</el-button>
|
||||
<el-button type="primary" @click="handleSave">确认还书</el-button>
|
||||
</div>
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
<el-button @click="handleUpCancel">取 消</el-button>
|
||||
<el-button type="primary" @click="handleSave">确认还书</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-dialog>
|
||||
|
||||
</div>
|
||||
@@ -164,16 +169,15 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import DataTable from '@/components/DataTable'
|
||||
import MeetRole from '@/components/MeetRole'
|
||||
import DepartTreeSelect from '@/components/DepartTreeSelect'
|
||||
import {fetchTree} from '@/api/sys/depart/depart'
|
||||
import {getSelectOptions} from '@/api/sys/dict/dict'
|
||||
import DataTable from '@/components/DataTable/index.vue'
|
||||
import MeetRole from '@/components/MeetRole/index.vue'
|
||||
import DepartTreeSelect from '@/components/DepartTreeSelect/index.vue'
|
||||
import {getSelectOptions} from '@/api/sys/dict/dict.js'
|
||||
import {dataFormatter} from '@/utils'
|
||||
import {saveData} from '@/api/sys/bookgl/bookgl'
|
||||
import {getBjList, getZyList} from "@/api/sys/grxxgl/grxxgl";
|
||||
import {jieshuData} from "@/api/sys/jieshu/jieshu";
|
||||
import {huanshuData} from "@/api/sys/huanshu/huanshu";
|
||||
import {saveData} from '@/api/sys/bookgl/bookgl.js'
|
||||
import {getBjList, getZyList} from "@/api/sys/grxxgl/grxxgl.js";
|
||||
import {jieshuData} from "@/api/sys/jieshu/jieshu.js";
|
||||
import {huanshuData} from "@/api/sys/huanshu/huanshu.js";
|
||||
|
||||
|
||||
export default {
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
:list-query="listQuery"
|
||||
@multi-actions="handleMultiAction"
|
||||
>
|
||||
<template slot="filter-content">
|
||||
<template #filter-content>
|
||||
<el-input v-model="listQuery.params.bookname" style="width: 200px" placeholder="搜索书名" class="filter-item"/>
|
||||
<el-select v-model="listQuery.params.state" style="width: 200px" placeholder="搜索借还类型"
|
||||
class="filter-item">
|
||||
@@ -23,23 +23,23 @@
|
||||
<el-date-picker
|
||||
v-model="listQuery.params.createTime"
|
||||
type="datetime"
|
||||
format="yyyy-MM-dd"
|
||||
format="YYYY-MM-DD"
|
||||
placeholder="选择开始时间"
|
||||
value-format="yyyy-MM-dd"
|
||||
value-format="YYYY-MM-DD"
|
||||
class="filter-item" style="width: 200px"
|
||||
/>
|
||||
<el-date-picker
|
||||
v-model="listQuery.params.updateTime"
|
||||
type="datetime"
|
||||
format="yyyy-MM-dd"
|
||||
format="YYYY-MM-DD"
|
||||
placeholder="选择结束时间"
|
||||
value-format="yyyy-MM-dd"
|
||||
value-format="YYYY-MM-DD"
|
||||
class="filter-item" style="width: 200px"
|
||||
/>
|
||||
|
||||
</template>
|
||||
<!-- 表格-->
|
||||
<template slot="data-columns">
|
||||
<template #data-columns>
|
||||
<!-- <el-table-column type="selection" width="55"/>-->
|
||||
|
||||
<el-table-column align="center" label="书名" prop="bookname"/>
|
||||
@@ -47,8 +47,8 @@
|
||||
|
||||
<el-table-column :formatter="dataFormatter" align="center" label="借还类型" prop="state" class-name="DIC_JHTYPE"/>
|
||||
<el-table-column align="center" label="发生时间">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.createTime | xmDateFormat }}
|
||||
<template #default="scope">
|
||||
{{ $filters.xmDateFormat(scope.row.createTime) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
@@ -65,16 +65,15 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import DataTable from '@/components/DataTable'
|
||||
import MeetRole from '@/components/MeetRole'
|
||||
import DepartTreeSelect from '@/components/DepartTreeSelect'
|
||||
import {fetchTree} from '@/api/sys/depart/depart'
|
||||
import {getSelectOptions} from '@/api/sys/dict/dict'
|
||||
import DataTable from '@/components/DataTable/index.vue'
|
||||
import MeetRole from '@/components/MeetRole/index.vue'
|
||||
import DepartTreeSelect from '@/components/DepartTreeSelect/index.vue'
|
||||
import {getSelectOptions} from '@/api/sys/dict/dict.js'
|
||||
import {dataFormatter} from '@/utils'
|
||||
import {saveData} from '@/api/sys/bookgl/bookgl'
|
||||
import {getBjList, getZyList} from "@/api/sys/grxxgl/grxxgl";
|
||||
import {jieshuData} from "@/api/sys/jieshu/jieshu";
|
||||
import {huanshuData} from "@/api/sys/huanshu/huanshu";
|
||||
import {saveData} from '@/api/sys/bookgl/bookgl.js'
|
||||
import {getBjList, getZyList} from "@/api/sys/grxxgl/grxxgl.js";
|
||||
import {jieshuData} from "@/api/sys/jieshu/jieshu.js";
|
||||
import {huanshuData} from "@/api/sys/huanshu/huanshu.js";
|
||||
|
||||
|
||||
export default {
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
:list-query="listQuery"
|
||||
@multi-actions="handleMultiAction"
|
||||
>
|
||||
<template slot="filter-content">
|
||||
<template #filter-content>
|
||||
<el-input v-model="listQuery.params.isbn" style="width: 200px" placeholder="搜索ISBN书号" class="filter-item"/>
|
||||
<el-input v-model="listQuery.params.bName" style="width: 200px" placeholder="搜索书名" class="filter-item"/>
|
||||
<el-input v-model="listQuery.params.bAuthor" style="width: 200px" placeholder="搜索作者" class="filter-item"/>
|
||||
@@ -37,13 +37,14 @@
|
||||
<!-- </el-button>-->
|
||||
</template>
|
||||
<!-- 表格-->
|
||||
<template slot="data-columns">
|
||||
<template #data-columns>
|
||||
<!-- <el-table-column type="selection" width="55"/>-->
|
||||
|
||||
<el-table-column align="center" label="ISBN书号" prop="isbn"/>
|
||||
<template slot-scope="scope">
|
||||
<a style="color: #1890ff" @click="handleUpdate(scope.row)">{{ scope.row.id }}</a>
|
||||
</template>
|
||||
<el-table-column align="center" label="ISBN书号" prop="isbn">
|
||||
<template #default="scope">
|
||||
<a style="color: #1890ff" @click="handleUpdate(scope.row)">{{ scope.row.id }}</a>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="书名" prop="bName" />
|
||||
<el-table-column :formatter="dataFormatter" align="center" label="图书种类" prop="bType" class-name="DIC_TSZL"/>
|
||||
|
||||
@@ -51,16 +52,18 @@
|
||||
<el-table-column align="center" label="作者" prop="bAuthor" />
|
||||
<el-table-column align="center" label="出版商" prop="bPublisher" />
|
||||
<el-table-column align="center" label="封面" >
|
||||
<template slot-scope="scope">
|
||||
<template #default="scope">
|
||||
<el-popover placement="right" trigger="hover">
|
||||
<el-image slot="reference" :src="scope.row.bPath" width="80" height="80"/>
|
||||
<template #reference>
|
||||
<el-image :src="scope.row.bPath" width="80" height="80"/>
|
||||
</template>
|
||||
<el-image style="width: 250px; height: 250px" :src="scope.row.bPath" fit="cover"/>
|
||||
</el-popover>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="出版日期">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.bPublicationTime | xmDateFormat }}
|
||||
<template #default="scope">
|
||||
{{ $filters.xmDateFormat(scope.row.bPublicationTime) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
@@ -71,7 +74,7 @@
|
||||
<el-table-column :formatter="dataFormatter" align="center" label="状态" prop="bState" class-name="STATE"/>
|
||||
|
||||
<el-table-column align="center" label="操作">
|
||||
<template slot-scope="scope">
|
||||
<template #default="scope">
|
||||
<a style="color: #1890ff" @click="handleUpdate(scope.row)">
|
||||
<el-button link type="primary" size="small" v-if="0===scope.row.bState"
|
||||
>借书
|
||||
@@ -86,7 +89,7 @@
|
||||
</data-table>
|
||||
|
||||
<!-- 新增按钮按下-->
|
||||
<el-dialog :visible.sync="dialogVisible" title="书籍信息" width="500px">
|
||||
<el-dialog v-model="dialogVisible" title="书籍信息" width="500px">
|
||||
<el-form :model="formData" label-position="left" label-width="100px" disabled="disabled">
|
||||
<el-form-item label="Isbn书号">
|
||||
<el-input v-model="formData.isbn"/>
|
||||
@@ -119,7 +122,7 @@
|
||||
v-model="formData.bPublicationTime"
|
||||
type="datetime"
|
||||
placeholder="选择日期时间"
|
||||
format="yyyy-MM-dd">
|
||||
format="YYYY-MM-DD">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="数量">
|
||||
@@ -132,10 +135,12 @@
|
||||
<el-input v-model="formData.bIntroduce" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="handleUpCancel">取 消</el-button>
|
||||
<el-button type="primary" @click="handleSave">确认借书</el-button>
|
||||
</div>
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
<el-button @click="handleUpCancel">取 消</el-button>
|
||||
<el-button type="primary" @click="handleSave">确认借书</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-dialog>
|
||||
|
||||
</div>
|
||||
@@ -143,15 +148,14 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import DataTable from '@/components/DataTable'
|
||||
import MeetRole from '@/components/MeetRole'
|
||||
import DepartTreeSelect from '@/components/DepartTreeSelect'
|
||||
import {fetchTree} from '@/api/sys/depart/depart'
|
||||
import {getSelectOptions} from '@/api/sys/dict/dict'
|
||||
import DataTable from '@/components/DataTable/index.vue'
|
||||
import MeetRole from '@/components/MeetRole/index.vue'
|
||||
import DepartTreeSelect from '@/components/DepartTreeSelect/index.vue'
|
||||
import {getSelectOptions} from '@/api/sys/dict/dict.js'
|
||||
import {dataFormatter} from '@/utils'
|
||||
import {saveData} from '@/api/sys/bookgl/bookgl'
|
||||
import {getBjList, getZyList} from "@/api/sys/grxxgl/grxxgl";
|
||||
import {jieshuData} from "@/api/sys/jieshu/jieshu";
|
||||
import {saveData} from '@/api/sys/bookgl/bookgl.js'
|
||||
import {getBjList, getZyList} from "@/api/sys/grxxgl/grxxgl.js";
|
||||
import {jieshuData} from "@/api/sys/jieshu/jieshu.js";
|
||||
|
||||
|
||||
export default {
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
:list-query="listQuery"
|
||||
@multi-actions="handleMultiAction"
|
||||
>
|
||||
<template slot="filter-content">
|
||||
<template #filter-content>
|
||||
<el-input v-model="listQuery.params.id" style="width: 200px" placeholder="搜索留言编码" class="filter-item"/>
|
||||
<el-input v-model="listQuery.params.itemname" style="width: 200px" placeholder="搜索发布人昵称" class="filter-item"/>
|
||||
<el-input v-model="listQuery.params.text" style="width: 200px" placeholder="搜索留言内容" class="filter-item" />
|
||||
@@ -17,40 +17,41 @@
|
||||
<el-date-picker style="width: 200px" placeholder="开始时间" class="filter-item"
|
||||
v-model="listQuery.params.createTime"
|
||||
type="datetime"
|
||||
format="yyyy-MM-dd"
|
||||
value-format="yyyy-MM-dd"
|
||||
format="YYYY-MM-DD"
|
||||
value-format="YYYY-MM-DD"
|
||||
></el-date-picker>
|
||||
<label>截至时间</label>
|
||||
<el-date-picker style="width: 200px" placeholder="截至时间" class="filter-item"
|
||||
v-model="listQuery.params.updateTime"
|
||||
type="datetime"
|
||||
format="yyyy-MM-dd"
|
||||
value-format="yyyy-MM-dd"
|
||||
format="YYYY-MM-DD"
|
||||
value-format="YYYY-MM-DD"
|
||||
></el-date-picker>
|
||||
<el-button class="filter-item" type="primary" icon="el-icon-plus" @click="handleAdd">
|
||||
添加
|
||||
<el-button class="filter-item" type="primary" @click="handleAdd">
|
||||
<el-icon><Plus /></el-icon> 添加
|
||||
</el-button>
|
||||
|
||||
|
||||
</template>
|
||||
<template slot="data-columns">
|
||||
<template #data-columns>
|
||||
<el-table-column type="selection" width="55"/>
|
||||
<el-table-column align="center" label="留言编号" prop="id"/>
|
||||
<template slot-scope="scope">
|
||||
<a style="color: #1890ff" @click="handleUpdate(scope.row)">{{ scope.row.id }}</a>
|
||||
</template>
|
||||
<el-table-column align="center" label="留言编号" prop="id">
|
||||
<template #default="scope">
|
||||
<a style="color: #1890ff" @click="handleUpdate(scope.row)">{{ scope.row.id }}</a>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column align="center" label="留言人昵称" prop="itemname"/>
|
||||
<el-table-column align="center" label="留言内容" prop="text"/>
|
||||
<el-table-column align="center" label="发布时间">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.createTime | xmDateFormat }}
|
||||
<template #default="scope">
|
||||
{{ $filters.xmDateFormat(scope.row.createTime) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
|
||||
<el-table-column align="center" label="操作">
|
||||
<template slot-scope="scope">
|
||||
<template #default="scope">
|
||||
<a @click="handleUpdate(scope.row)">
|
||||
<el-button link type="primary" size="small"
|
||||
>编辑留言内容
|
||||
@@ -66,7 +67,7 @@
|
||||
</data-table>
|
||||
|
||||
<!-- 编辑按钮按下-->
|
||||
<el-dialog :visible.sync="dialogVisible" title="编辑留言信息" width="500px">
|
||||
<el-dialog v-model="dialogVisible" title="编辑留言信息" width="500px">
|
||||
<el-form :model="formData" label-position="left" label-width="100px">
|
||||
<el-form-item label="留言编号">
|
||||
<el-input v-model="formData.id" disabled="disabled"/>
|
||||
@@ -83,14 +84,16 @@
|
||||
v-model="formData.createTime" disabled="disabled"
|
||||
type="datetime"
|
||||
placeholder="选择日期时间"
|
||||
format="yyyy-MM-dd">
|
||||
format="YYYY-MM-DD">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="handleUpCancel">取 消</el-button>
|
||||
<el-button type="primary" @click="handleSave">确 认</el-button>
|
||||
</div>
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
<el-button @click="handleUpCancel">取 消</el-button>
|
||||
<el-button type="primary" @click="handleSave">确 认</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-dialog>
|
||||
|
||||
</div>
|
||||
@@ -98,11 +101,11 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import DataTable from '@/components/DataTable'
|
||||
import MeetRole from '@/components/MeetRole'
|
||||
import DepartTreeSelect from '@/components/DepartTreeSelect'
|
||||
import DataTable from '@/components/DataTable/index.vue'
|
||||
import MeetRole from '@/components/MeetRole/index.vue'
|
||||
import DepartTreeSelect from '@/components/DepartTreeSelect/index.vue'
|
||||
import {dataFormatter} from '@/utils'
|
||||
import {saveLyOrUpData} from "@/api/sys/liuyangl/liuyangl";
|
||||
import {saveLyOrUpData} from "@/api/sys/liuyangl/liuyangl.js";
|
||||
|
||||
|
||||
export default {
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
:list-query="listQuery"
|
||||
>
|
||||
|
||||
<template slot="filter-content">
|
||||
<template #filter-content>
|
||||
<el-select v-model="listQuery.params.title" clearable class="filter-item">
|
||||
<el-option
|
||||
v-for="item in types"
|
||||
@@ -20,7 +20,7 @@
|
||||
<el-input v-model="listQuery.params.userName" clearable placeholder="操作人" style="width: 200px;" class="filter-item" />
|
||||
</template>
|
||||
|
||||
<template slot="data-columns">
|
||||
<template #data-columns>
|
||||
|
||||
<el-table-column
|
||||
label="日志类型"
|
||||
@@ -55,17 +55,6 @@ import DataTable from '@/components/DataTable'
|
||||
export default {
|
||||
name: 'SysLogList',
|
||||
components: { DataTable },
|
||||
filters: {
|
||||
|
||||
// 订单状态
|
||||
userState(value) {
|
||||
const map = {
|
||||
'0': '正常',
|
||||
'1': '禁用'
|
||||
}
|
||||
return map[value]
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
:list-query="listQuery"
|
||||
@multi-actions="handleMultiAction"
|
||||
>
|
||||
<template slot="data-columns">
|
||||
<template #data-columns>
|
||||
|
||||
<el-table-column
|
||||
label="角色ID"
|
||||
@@ -28,22 +28,11 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import DataTable from '@/components/DataTable'
|
||||
import DataTable from '@/components/DataTable/index.vue'
|
||||
|
||||
export default {
|
||||
name: 'SysRoleList',
|
||||
components: { DataTable },
|
||||
filters: {
|
||||
|
||||
// 订单状态
|
||||
userState(value) {
|
||||
const map = {
|
||||
'0': '正常',
|
||||
'1': '禁用'
|
||||
}
|
||||
return map[value]
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
:list-query="listQuery"
|
||||
@multi-actions="handleMultiAction"
|
||||
>
|
||||
<template slot="filter-content">
|
||||
<template #filter-content>
|
||||
<el-input v-model="listQuery.params.id" style="width: 200px" placeholder="搜索公告编码" class="filter-item"/>
|
||||
<el-input v-model="listQuery.params.title" style="width: 200px" placeholder="搜索公告标题" class="filter-item"/>
|
||||
<el-input v-model="listQuery.params.text" style="width: 200px" placeholder="搜索公告内容" class="filter-item" />
|
||||
@@ -17,15 +17,15 @@
|
||||
<el-date-picker style="width: 200px" placeholder="开始时间" class="filter-item"
|
||||
v-model="listQuery.params.createTime"
|
||||
type="datetime"
|
||||
format="yyyy-MM-dd"
|
||||
value-format="yyyy-MM-dd"
|
||||
format="YYYY-MM-DD"
|
||||
value-format="YYYY-MM-DD"
|
||||
></el-date-picker>
|
||||
<label>截至时间</label>
|
||||
<el-date-picker style="width: 200px" placeholder="截至时间" class="filter-item"
|
||||
v-model="listQuery.params.updateTime"
|
||||
type="datetime"
|
||||
format="yyyy-MM-dd"
|
||||
value-format="yyyy-MM-dd"
|
||||
format="YYYY-MM-DD"
|
||||
value-format="YYYY-MM-DD"
|
||||
></el-date-picker>
|
||||
<!-- <el-button class="filter-item" type="primary" icon="el-icon-plus" @click="handleAdd">
|
||||
添加
|
||||
@@ -33,25 +33,26 @@
|
||||
|
||||
|
||||
</template>
|
||||
<template slot="data-columns">
|
||||
<template #data-columns>
|
||||
<!-- <el-table-column type="selection" width="55"/>-->
|
||||
<el-table-column align="center" label="公告编号" prop="id"/>
|
||||
<template slot-scope="scope">
|
||||
<a style="color: #1890ff" @click="handleUpdate(scope.row)">{{ scope.row.id }}</a>
|
||||
</template>
|
||||
<el-table-column align="center" label="公告编号" prop="id">
|
||||
<template #default="scope">
|
||||
<a style="color: #1890ff" @click="handleUpdate(scope.row)">{{ scope.row.id }}</a>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
|
||||
<el-table-column align="center" label="公告标题" prop="title"/>
|
||||
<el-table-column align="center" label="公告内容" prop="text"/>
|
||||
<el-table-column align="center" label="发布时间">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.createTime | xmDateFormat }}
|
||||
<template #default="scope">
|
||||
{{ $filters.xmDateFormat(scope.row.createTime) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
|
||||
<!-- <el-table-column align="center" label="操作">
|
||||
<template slot-scope="scope">
|
||||
<template #default="scope">
|
||||
<a @click="handleUpdate(scope.row)">
|
||||
<el-button link type="primary" size="small"
|
||||
>编辑公告内容
|
||||
@@ -64,7 +65,7 @@
|
||||
</data-table>
|
||||
|
||||
<!-- 编辑按钮按下-->
|
||||
<el-dialog :visible.sync="dialogVisible" title="编辑公告信息" width="500px">
|
||||
<el-dialog v-model="dialogVisible" title="编辑公告信息" width="500px">
|
||||
<el-form :model="formData" label-position="left" label-width="100px">
|
||||
<el-form-item label="公告编号">
|
||||
<el-input v-model="formData.id" disabled="disabled"/>
|
||||
@@ -80,14 +81,16 @@
|
||||
v-model="formData.createTime" disabled="disabled"
|
||||
type="datetime"
|
||||
placeholder="选择日期时间"
|
||||
format="yyyy-MM-dd">
|
||||
format="YYYY-MM-DD">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="handleUpCancel">取 消</el-button>
|
||||
<el-button type="primary" @click="handleSave">确 认</el-button>
|
||||
</div>
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
<el-button @click="handleUpCancel">取 消</el-button>
|
||||
<el-button type="primary" @click="handleSave">确 认</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-dialog>
|
||||
|
||||
</div>
|
||||
@@ -95,11 +98,11 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import DataTable from '@/components/DataTable'
|
||||
import MeetRole from '@/components/MeetRole'
|
||||
import DepartTreeSelect from '@/components/DepartTreeSelect'
|
||||
import DataTable from '@/components/DataTable/index.vue'
|
||||
import MeetRole from '@/components/MeetRole/index.vue'
|
||||
import DepartTreeSelect from '@/components/DepartTreeSelect/index.vue'
|
||||
import {dataFormatter} from '@/utils'
|
||||
import {saveOrUpData} from "@/api/sys/gggl/gggl";
|
||||
import {saveOrUpData} from "@/api/sys/gggl/gggl.js";
|
||||
|
||||
|
||||
export default {
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
:list-query="listQuery"
|
||||
@multi-actions="handleMultiAction"
|
||||
>
|
||||
<template slot="filter-content">
|
||||
<template #filter-content>
|
||||
<el-input v-model="listQuery.params.id" style="width: 200px" placeholder="搜索留言编码" class="filter-item"/>
|
||||
<el-input v-model="listQuery.params.itemname" style="width: 200px" placeholder="搜索发布人昵称" class="filter-item"/>
|
||||
<el-input v-model="listQuery.params.text" style="width: 200px" placeholder="搜索留言内容" class="filter-item" />
|
||||
@@ -17,40 +17,41 @@
|
||||
<el-date-picker style="width: 200px" placeholder="开始时间" class="filter-item"
|
||||
v-model="listQuery.params.createTime"
|
||||
type="datetime"
|
||||
format="yyyy-MM-dd"
|
||||
value-format="yyyy-MM-dd"
|
||||
format="YYYY-MM-DD"
|
||||
value-format="YYYY-MM-DD"
|
||||
></el-date-picker>
|
||||
<label>截至时间</label>
|
||||
<el-date-picker style="width: 200px" placeholder="截至时间" class="filter-item"
|
||||
v-model="listQuery.params.updateTime"
|
||||
type="datetime"
|
||||
format="yyyy-MM-dd"
|
||||
value-format="yyyy-MM-dd"
|
||||
format="YYYY-MM-DD"
|
||||
value-format="YYYY-MM-DD"
|
||||
></el-date-picker>
|
||||
<el-button class="filter-item" type="primary" icon="el-icon-plus" @click="handleAdd">
|
||||
添加
|
||||
<el-button class="filter-item" type="primary" @click="handleAdd">
|
||||
<el-icon><Plus /></el-icon> 添加
|
||||
</el-button>
|
||||
|
||||
|
||||
</template>
|
||||
<template slot="data-columns">
|
||||
<template #data-columns>
|
||||
<!-- <el-table-column type="selection" width="55"/>-->
|
||||
<el-table-column align="center" label="留言编号" prop="id"/>
|
||||
<template slot-scope="scope">
|
||||
<a style="color: #1890ff" @click="handleUpdate(scope.row)">{{ scope.row.id }}</a>
|
||||
</template>
|
||||
<el-table-column align="center" label="留言编号" prop="id">
|
||||
<template #default="scope">
|
||||
<a style="color: #1890ff" @click="handleUpdate(scope.row)">{{ scope.row.id }}</a>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column align="center" label="留言人昵称" prop="itemname"/>
|
||||
<el-table-column align="center" label="留言内容" prop="text"/>
|
||||
<el-table-column align="center" label="发布时间">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.createTime | xmDateFormat }}
|
||||
<template #default="scope">
|
||||
{{ $filters.xmDateFormat(scope.row.createTime) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
|
||||
<!-- <el-table-column align="center" label="操作">
|
||||
<template slot-scope="scope">
|
||||
<template #default="scope">
|
||||
<a @click="handleUpdate(scope.row)">
|
||||
<el-button link type="primary" size="small"
|
||||
>编辑留言内容
|
||||
@@ -63,7 +64,7 @@
|
||||
</data-table>
|
||||
|
||||
<!-- 编辑按钮按下-->
|
||||
<el-dialog :visible.sync="dialogVisible" title="编辑留言信息" width="500px">
|
||||
<el-dialog v-model="dialogVisible" title="编辑留言信息" width="500px">
|
||||
<el-form :model="formData" label-position="left" label-width="100px">
|
||||
<el-form-item label="留言编号">
|
||||
<el-input v-model="formData.id" disabled="disabled"/>
|
||||
@@ -80,14 +81,16 @@
|
||||
v-model="formData.createTime" disabled="disabled"
|
||||
type="datetime"
|
||||
placeholder="选择日期时间"
|
||||
format="yyyy-MM-dd">
|
||||
format="YYYY-MM-DD">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="handleUpCancel">取 消</el-button>
|
||||
<el-button type="primary" @click="handleSave">确 认</el-button>
|
||||
</div>
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
<el-button @click="handleUpCancel">取 消</el-button>
|
||||
<el-button type="primary" @click="handleSave">确 认</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-dialog>
|
||||
|
||||
</div>
|
||||
@@ -95,11 +98,11 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import DataTable from '@/components/DataTable'
|
||||
import MeetRole from '@/components/MeetRole'
|
||||
import DepartTreeSelect from '@/components/DepartTreeSelect'
|
||||
import DataTable from '@/components/DataTable/index.vue'
|
||||
import MeetRole from '@/components/MeetRole/index.vue'
|
||||
import DepartTreeSelect from '@/components/DepartTreeSelect/index.vue'
|
||||
import {dataFormatter} from '@/utils'
|
||||
import {saveLyOrUpData} from "@/api/sys/liuyangl/liuyangl";
|
||||
import {saveLyOrUpData} from "@/api/sys/liuyangl/liuyangl.js";
|
||||
|
||||
|
||||
export default {
|
||||
|
||||
@@ -9,18 +9,18 @@
|
||||
@multi-actions="handleMultiAction"
|
||||
>
|
||||
|
||||
<template slot="filter-content">
|
||||
<template #filter-content>
|
||||
|
||||
<el-input v-model="listQuery.params.userName" style="width: 200px" placeholder="搜索登录名" class="filter-item" />
|
||||
<el-input v-model="listQuery.params.realName" style="width: 200px" placeholder="搜索姓名" class="filter-item" />
|
||||
<el-button class="filter-item" type="primary" icon="el-icon-plus" @click="handleAdd">
|
||||
添加
|
||||
<el-button class="filter-item" type="primary" @click="handleAdd">
|
||||
<el-icon><Plus /></el-icon> 添加
|
||||
</el-button>
|
||||
</template>
|
||||
<template slot="data-columns">
|
||||
<template #data-columns>
|
||||
<el-table-column type="selection" width="55"/>
|
||||
<el-table-column align="center" label="用户名">
|
||||
<template slot-scope="scope">
|
||||
<template #default="scope">
|
||||
<a style="color: #1890ff" @click="handleUpdate(scope.row)">{{ scope.row.userName }}</a>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@@ -28,19 +28,19 @@
|
||||
<el-table-column align="center" label="角色" prop="roleIds"/>
|
||||
<el-table-column align="center" label="创建时间" prop="createTime"/>
|
||||
<el-table-column align="center" label="创建时间">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.createTime | xmDateFormat }}
|
||||
<template #default="scope">
|
||||
{{ $filters.xmDateFormat(scope.row.createTime) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" label="状态">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.state | stateFilter }}
|
||||
<template #default="scope">
|
||||
{{ $filters.stateFilter(scope.row.state) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</template>
|
||||
</data-table>
|
||||
|
||||
<el-dialog :visible.sync="dialogVisible" title="添加用户" width="500px">
|
||||
<el-dialog v-model="dialogVisible" title="添加用户" width="500px">
|
||||
|
||||
<el-form :model="formData" label-position="left" label-width="100px">
|
||||
|
||||
@@ -70,10 +70,12 @@
|
||||
<!-- />-->
|
||||
<!-- </el-form-item>-->
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
<el-button @click="dialogVisible = false">取 消</el-button>
|
||||
<el-button type="primary" @click="handleSave">确 定</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
</el-dialog>
|
||||
|
||||
@@ -82,30 +84,18 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import DataTable from '@/components/DataTable'
|
||||
import MeetRole from '@/components/MeetRole'
|
||||
import { saveData } from '@/api/sys/user/user'
|
||||
import DepartTreeSelect from '@/components/DepartTreeSelect'
|
||||
import { fetchTree } from '@/api/sys/depart/depart'
|
||||
import DataTable from '@/components/DataTable/index.vue'
|
||||
import MeetRole from '@/components/MeetRole/index.vue'
|
||||
import { saveData } from '@/api/sys/user/user.js'
|
||||
import DepartTreeSelect from '@/components/DepartTreeSelect/index.vue'
|
||||
|
||||
export default {
|
||||
name: 'SysUserList',
|
||||
components: { DepartTreeSelect, DataTable, MeetRole },
|
||||
filters: {
|
||||
|
||||
// 订单状态
|
||||
userState(value) {
|
||||
const map = {
|
||||
'0': '正常',
|
||||
'1': '禁用'
|
||||
}
|
||||
return map[value]
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
||||
treeData: [],
|
||||
|
||||
defaultProps: {
|
||||
value: 'id',
|
||||
label: 'deptName',
|
||||
@@ -149,9 +139,7 @@ export default {
|
||||
},
|
||||
|
||||
created() {
|
||||
fetchTree({}).then(response => {
|
||||
this.treeData = response.data
|
||||
})
|
||||
|
||||
},
|
||||
|
||||
methods: {
|
||||
|
||||
Reference in New Issue
Block a user