提交 bf6a7101 authored 作者: 王鹏飞's avatar 王鹏飞

chore: upgrade to vue 2.7

上级 ac574bef
module.exports = { module.exports = {
env: { root: true,
node: true env: { node: true },
}, extends: ['eslint:recommended', 'plugin:vue/essential'],
extends: ['plugin:vue/essential', 'standard'],
rules: { rules: {
'vue/comment-directive': 'off',
'vue/multi-word-component-names': 'off', 'vue/multi-word-component-names': 'off',
'space-before-function-paren': 'off' 'vue/comment-directive': 'off'
} }
} }
...@@ -2,7 +2,7 @@ const fs = require('fs') ...@@ -2,7 +2,7 @@ const fs = require('fs')
const path = require('path') const path = require('path')
const axios = require('axios') const axios = require('axios')
const domain = 'dev.ezijing.com' const domain = 'ezijing.com'
const outputPath = './https' const outputPath = './https'
......
{
"compilerOptions": {
"baseUrl": ".",
"paths": {
"@/*": ["src/*"]
}
},
"exclude": ["node_modules", "dist"],
"vueCompilerOptions": {
"target": 2.7
}
}
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -12,26 +12,21 @@ ...@@ -12,26 +12,21 @@
}, },
"dependencies": { "dependencies": {
"axios": "^0.27.2", "axios": "^0.27.2",
"element-ui": "^2.15.8", "element-ui": "^2.15.12",
"lodash": "^4.17.21", "lodash": "^4.17.21",
"query-string": "^7.1.1", "query-string": "^7.1.3",
"vue": "^2.6.14", "vue": "^2.7.14",
"vue-router": "^3.5.4", "vue-router": "^3.6.5",
"vuex": "^3.6.2" "vuex": "^3.6.2"
}, },
"devDependencies": { "devDependencies": {
"@vitejs/plugin-vue2": "^2.2.0",
"ali-oss": "^6.17.1", "ali-oss": "^6.17.1",
"chalk": "^4.1.2", "chalk": "^4.1.2",
"eslint": "^8.13.0", "eslint": "^8.32.0",
"eslint-config-standard": "^17.0.0", "eslint-plugin-vue": "^9.9.0",
"eslint-plugin-import": "^2.26.0", "sass": "1.57.1",
"eslint-plugin-node": "^11.1.0", "vite": "^4.0.4",
"eslint-plugin-promise": "^6.0.0", "vite-plugin-checker": "^0.5.3"
"eslint-plugin-vue": "^9.0.1",
"sass": "1.52.1",
"vite": "^2.9.9",
"vite-plugin-checker": "^0.4.6",
"vite-plugin-vue2": "^2.0.1",
"vue-template-compiler": "^2.6.14"
} }
} }
...@@ -19,7 +19,7 @@ export default function (blobInfo, succFun, failFun) { ...@@ -19,7 +19,7 @@ export default function (blobInfo, succFun, failFun) {
failFun('上传失败') failFun('上传失败')
}) })
}) })
.catch(response => { .catch(() => {
failFun('获取Signature失败') failFun('获取Signature失败')
}) })
} }
const modules = Object.values(import.meta.globEager('./**/index.js')) const modules = Object.values(import.meta.glob('./**/index.js', { eager: true }))
export default function ({ router }) { export default function ({ router }) {
modules.forEach(({ routes }) => { modules.forEach(({ routes }) => {
......
...@@ -6,7 +6,11 @@ ...@@ -6,7 +6,11 @@
<el-button type="warning" @click="cloneVisible = true">复制权限</el-button> <el-button type="warning" @click="cloneVisible = true">复制权限</el-button>
</template> </template>
<el-tabs v-model="activeName" type="card" @tab-click="handleClick"> <el-tabs v-model="activeName" type="card" @tab-click="handleClick">
<el-tab-pane :label="item.label" :name="item.value.toString()" v-for="(item, index) in typeList" :key="index"></el-tab-pane> <el-tab-pane
:label="item.label"
:name="item.value.toString()"
v-for="(item, index) in typeList"
:key="index"></el-tab-pane>
</el-tabs> </el-tabs>
<template v-slot:table-x="{ row }"> <template v-slot:table-x="{ row }">
<el-button type="text" @click="handleCreate(row)">创建子权限</el-button><br /> <el-button type="text" @click="handleCreate(row)">创建子权限</el-button><br />
...@@ -14,7 +18,12 @@ ...@@ -14,7 +18,12 @@
<el-button type="text" @click="onRemove(row)">删除</el-button> <el-button type="text" @click="onRemove(row)">删除</el-button>
</template> </template>
</app-list> </app-list>
<editform :visible.sync="visible" :isEdit="isEdit" :data="editRaw" @success="handleSuccess" v-if="visible"></editform> <editform
:visible.sync="visible"
:isEdit="isEdit"
:data="editRaw"
@success="handleSuccess"
v-if="visible"></editform>
<ClonePermissions :visible.sync="cloneVisible" @success="handleSuccess" v-if="cloneVisible"></ClonePermissions> <ClonePermissions :visible.sync="cloneVisible" @success="handleSuccess" v-if="cloneVisible"></ClonePermissions>
</app-card> </app-card>
</template> </template>
...@@ -122,7 +131,7 @@ export default { ...@@ -122,7 +131,7 @@ export default {
}, },
// 删除 // 删除
handleRemove(row) { handleRemove(row) {
deletePermission({ id: row.id }).then(res => { deletePermission({ id: row.id }).then(() => {
this.$message({ type: 'success', message: '删除成功' }) this.$message({ type: 'success', message: '删除成功' })
this.$refs.list.refetch() this.$refs.list.refetch()
}) })
......
...@@ -8,7 +8,13 @@ ...@@ -8,7 +8,13 @@
<el-tag>{{ row.role_name }}</el-tag> <el-tag>{{ row.role_name }}</el-tag>
</template> </template>
<template v-slot:table-status="{ row }"> <template v-slot:table-status="{ row }">
<el-switch v-model="row.status" :active-value="1" :inactive-value="2" active-text="启用" inactive-text="停用" @change="handleStatus(row)"></el-switch> <el-switch
v-model="row.status"
:active-value="1"
:inactive-value="2"
active-text="启用"
inactive-text="停用"
@change="handleStatus(row)"></el-switch>
</template> </template>
<template v-slot:table-x="{ row }"> <template v-slot:table-x="{ row }">
<el-button type="primary" plain @click="handleUpdate(row)">编辑</el-button> <el-button type="primary" plain @click="handleUpdate(row)">编辑</el-button>
...@@ -16,7 +22,12 @@ ...@@ -16,7 +22,12 @@
</template> </template>
</app-list> </app-list>
<!-- 创建/编辑 --> <!-- 创建/编辑 -->
<editform :visible.sync="visible" :isEdit="isEdit" :data="editRaw" @success="handleSuccess" v-if="visible"></editform> <editform
:visible.sync="visible"
:isEdit="isEdit"
:data="editRaw"
@success="handleSuccess"
v-if="visible"></editform>
</app-card> </app-card>
</template> </template>
...@@ -107,20 +118,20 @@ export default { ...@@ -107,20 +118,20 @@ export default {
}, },
// 删除 // 删除
handleRemove(row) { handleRemove(row) {
deleteProject({ id: row.id }).then(res => { deleteProject({ id: row.id }).then(() => {
this.$message({ type: 'success', message: '删除成功' }) this.$message({ type: 'success', message: '删除成功' })
this.$refs.list.refetch() this.$refs.list.refetch()
}) })
}, },
// 状态改变 // 状态改变
handleStatus(row) { handleStatus(row) {
updateProjectStatus({ id: row.id, status: row.status }).then(res => { updateProjectStatus({ id: row.id, status: row.status }).then(() => {
this.$message({ type: 'success', message: '修改成功' }) this.$message({ type: 'success', message: '修改成功' })
}) })
}, },
// 初始化用户角色 // 初始化用户角色
handleInitUserRole(row) { handleInitUserRole(row) {
initUserRole({ project_id: row.id }).then(res => { initUserRole({ project_id: row.id }).then(() => {
this.$message({ type: 'success', message: '初始化角色成功' }) this.$message({ type: 'success', message: '初始化角色成功' })
}) })
} }
......
...@@ -11,7 +11,12 @@ ...@@ -11,7 +11,12 @@
</template> </template>
</app-list> </app-list>
<!-- 创建/编辑 --> <!-- 创建/编辑 -->
<editform :visible.sync="visible" :isEdit="isEdit" :data="editRaw" @success="handleSuccess" v-if="visible"></editform> <editform
:visible.sync="visible"
:isEdit="isEdit"
:data="editRaw"
@success="handleSuccess"
v-if="visible"></editform>
<!-- 权限配置 --> <!-- 权限配置 -->
<permissions :visible.sync="permisssionVisible" :data="editRaw" v-if="permisssionVisible"></permissions> <permissions :visible.sync="permisssionVisible" :data="editRaw" v-if="permisssionVisible"></permissions>
</app-card> </app-card>
...@@ -97,7 +102,7 @@ export default { ...@@ -97,7 +102,7 @@ export default {
}, },
// 删除 // 删除
handleRemove(row) { handleRemove(row) {
deleteRole({ id: row.id }).then(res => { deleteRole({ id: row.id }).then(() => {
this.$message({ type: 'success', message: '删除成功' }) this.$message({ type: 'success', message: '删除成功' })
this.$refs.list.refetch() this.$refs.list.refetch()
}) })
......
...@@ -7,13 +7,20 @@ ...@@ -7,13 +7,20 @@
<template v-slot:table-roles="{ row }"> <template v-slot:table-roles="{ row }">
<el-tag v-for="item in row.roles" :key="item.id" style="margin: 0 5px 5px 0">{{ item.name }}</el-tag> <el-tag v-for="item in row.roles" :key="item.id" style="margin: 0 5px 5px 0">{{ item.name }}</el-tag>
</template> </template>
<template v-slot:table-x="{ row }"> <el-button type="primary" plain @click="handleUpdate(row)">编辑</el-button>&nbsp; </template> <template v-slot:table-x="{ row }">
<el-button type="primary" plain @click="handleUpdate(row)">编辑</el-button>&nbsp;
</template>
<template #footer> <template #footer>
<el-button type="primary" @click="onRemove" :disabled="!multipleSelection.length">删除</el-button> <el-button type="primary" @click="onRemove" :disabled="!multipleSelection.length">删除</el-button>
</template> </template>
</app-list> </app-list>
<!-- 创建/编辑 --> <!-- 创建/编辑 -->
<editform :visible.sync="visible" :isEdit="isEdit" :data="editRaw" @success="handleSuccess" v-if="visible"></editform> <editform
:visible.sync="visible"
:isEdit="isEdit"
:data="editRaw"
@success="handleSuccess"
v-if="visible"></editform>
</app-card> </app-card>
</template> </template>
...@@ -87,7 +94,7 @@ export default { ...@@ -87,7 +94,7 @@ export default {
// 删除 // 删除
handleRemove() { handleRemove() {
const ids = this.multipleSelection.map(item => item.id) const ids = this.multipleSelection.map(item => item.id)
deleteOrgUser({ ids }).then(res => { deleteOrgUser({ ids }).then(() => {
this.$message({ type: 'success', message: '删除成功' }) this.$message({ type: 'success', message: '删除成功' })
this.$refs.list.refetch() this.$refs.list.refetch()
}) })
......
...@@ -21,7 +21,12 @@ ...@@ -21,7 +21,12 @@
</el-descriptions-item> </el-descriptions-item>
</el-descriptions> </el-descriptions>
<!-- 编辑 --> <!-- 编辑 -->
<editform :visible.sync="visible" :isEdit="true" :data="detail" @success="handleUpdateSuccess" v-if="visible"></editform> <editform
:visible.sync="visible"
:isEdit="true"
:data="detail"
@success="handleUpdateSuccess"
v-if="visible"></editform>
</app-card> </app-card>
<app-card title="二级机构"> <app-card title="二级机构">
<app-list v-bind="tableOptions" ref="list"> <app-list v-bind="tableOptions" ref="list">
...@@ -101,7 +106,7 @@ export default { ...@@ -101,7 +106,7 @@ export default {
}) })
}, },
// 更新成功 // 更新成功
handleUpdateSuccess(data) { handleUpdateSuccess() {
this.getDetail() this.getDetail()
}, },
contentPermissionName(value) { contentPermissionName(value) {
......
...@@ -158,7 +158,7 @@ export default { ...@@ -158,7 +158,7 @@ export default {
}, },
// 删除 // 删除
handleRemove(row) { handleRemove(row) {
deleteOrg({ id: row.id }).then(res => { deleteOrg({ id: row.id }).then(() => {
this.$message({ type: 'success', message: '删除成功' }) this.$message({ type: 'success', message: '删除成功' })
this.$refs.list.refetch() this.$refs.list.refetch()
}) })
......
import fs from 'fs' import fs from 'fs'
import path from 'path' import path from 'path'
import { defineConfig } from 'vite' import { defineConfig } from 'vite'
import { createVuePlugin } from 'vite-plugin-vue2' import vue from '@vitejs/plugin-vue2'
import checker from 'vite-plugin-checker' import checker from 'vite-plugin-checker'
export default defineConfig(({ mode }) => { export default defineConfig(({ mode }) => {
return { return {
base: mode === 'prod' ? 'https://webapp-pub.ezijing.com/website/prod/x-school-admin/' : '/', base: mode === 'prod' ? 'https://webapp-pub.ezijing.com/website/prod/x-school-admin/' : '/',
plugins: [createVuePlugin(), checker({ eslint: { lintCommand: 'eslint "./src/**/*.{vue,js,jsx,ts,tsx}"' } })], plugins: [vue(), checker({ eslint: { lintCommand: 'eslint "./src/**/*.{vue,js,jsx,ts,tsx}"' } })],
server: { server: {
open: true, open: true,
host: 'dev.ezijing.com', host: 'dev.ezijing.com',
https: { https: {
key: fs.readFileSync(path.join(__dirname, './https/dev.ezijing.com.key')), key: fs.readFileSync(path.join(__dirname, './https/ezijing.com.key')),
cert: fs.readFileSync(path.join(__dirname, './https/dev.ezijing.com.pem')) cert: fs.readFileSync(path.join(__dirname, './https/ezijing.com.pem'))
}, },
proxy: { proxy: {
'/api': 'https://project-center.ezijing.com' '/api': 'https://project-center.ezijing.com'
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论