diff --git a/src/main.ts b/src/main.ts index 0d8acc5..25db5d1 100644 --- a/src/main.ts +++ b/src/main.ts @@ -9,7 +9,6 @@ import Vue from 'vue'; import lodash from 'lodash'; import PinyinMatch from 'pinyin-match';// 拼音匹配 import dayjs from 'dayjs'; -import animated from 'animate.css'; import CrudTable from '@/components/CrudTable/CrudTable.vue'; // 全局注册用于增删改查的高级表格组件 import axios from '@/plugins/axios';// axios中统一设置Token import store from '@/store/index';// store内做了局部持久化 @@ -21,8 +20,6 @@ import '@/permission'; // 权限控制 import '@/styles/index.scss'; // 全局样式 import '@/icons/autoImportSvg'; // 自动导入src/icon目录下的svg图标 -Vue.use(animated); - Vue.component('CrudTable', CrudTable); // 全局注册用于增删改查的高级表格组件 /* 这里改写原型链,将axios设置为Vue的原型属性, @@ -38,8 +35,7 @@ Vue.prototype.dayjs = dayjs; Vue.config.productionTip = false; // 拼音匹配插件 Vue.prototype.$pinyinmatch = PinyinMatch; -// 挂载EventBus -Vue.prototype.$EventBus = new Vue(); + new Vue({ router, store, diff --git a/src/permission.ts b/src/permission.ts index 8683a7b..a719f11 100644 --- a/src/permission.ts +++ b/src/permission.ts @@ -5,8 +5,6 @@ * @createDate 2018年11月13日10:58:43 */ -import dayjs from 'dayjs'; -import Watermark from '@/plugins/watermark'; import { router } from './router'; import store from './store'; // 白名单:不需要鉴权的地址 @@ -42,10 +40,3 @@ router.beforeEach(async (to, from, next) => { next('/login'); } }); - -// 路由全局后置钩子,不接受next不改变导航 -router.afterEach((to) => { - if ('/login,/404'.includes(to.path) === false) { - Watermark.set(store.getters.realname, dayjs().format('YYYY年MM月DD日')); - } -}); diff --git a/src/plugins/watermark.ts b/src/plugins/watermark.ts deleted file mode 100644 index d09f3e7..0000000 --- a/src/plugins/watermark.ts +++ /dev/null @@ -1,66 +0,0 @@ -/* - * @file: 水印 - * @copyright: NanJing Anshare Tech .Com - * @author: BoBo - * @Date: 2019-08-06 11:59:13 - */ -interface type { - set?:any; // 水印设置方法 -} -const watermark:type = {}; - -const setWatermark = (name, date) => { - const id = '1.23452384164.123412416'; - - if (document.getElementById(id) !== null) { - document.body.removeChild(document.getElementById(id) as any); - } - - // 创建一个画布 - const can = document.createElement('canvas'); - // 设置画布的长宽 - can.width = 500; - can.height = 500; - - const cans = can.getContext('2d') as any; - // 旋转角度 - cans.rotate((-15 * Math.PI) / 200); - cans.font = '18px Arial'; - // 设置填充绘画的颜色、渐变或者模式 - cans.fillStyle = 'rgba(200, 200, 200, 0.20)'; - // 设置文本内容的当前对齐方式 - cans.textAlign = 'left'; - // 设置在绘制文本时使用的当前文本基线 - cans.textBaseline = 'Middle'; - // 在画布上绘制填色的文本(输出的文本,开始绘制文本的X坐标位置,开始绘制文本的Y坐标位置) - cans.fillText(date, can.width / 8, can.height / 2); - cans.fillText(name, can.width / 8.5, can.height / 2.3); - - const div = document.createElement('div'); - div.id = id; - div.style.pointerEvents = 'none'; - div.style.top = '46px'; - div.style.left = '180px'; - div.style.position = 'fixed'; - div.style.zIndex = '10000000000'; - div.style.width = `${document.documentElement.clientWidth}px`; - div.style.height = `${document.documentElement.clientHeight}px`; - div.style.background = `url(${can.toDataURL('image/png')}) left top repeat`; - document.body.appendChild(div); - return id; -}; - -// 该方法只允许调用一次 -watermark.set = (name:string, date:string) => { - let id = setWatermark(name, date); - setInterval(() => { - if (document.getElementById(id) === null) { - id = setWatermark(name, date); - } - }, 500); - window.onresize = () => { - setWatermark(name, date); - }; -}; - -export default watermark; diff --git a/src/shims-tsx.d.ts b/src/shims-tsx.d.ts deleted file mode 100644 index 3a62cbe..0000000 --- a/src/shims-tsx.d.ts +++ /dev/null @@ -1,19 +0,0 @@ -/* - * @file: 用于定义全局声明 - * @copyright: NanJing Anshare Tech .Com - * @author: BoBo - * @Date: 2020年06月16 15:11:01 - */ -import Vue, { VNode } from 'vue'; - -declare global { - namespace JSX { - // tslint:disable no-empty-interface - interface Element extends VNode {} - // tslint:disable no-empty-interface - interface ElementClass extends Vue {} - interface IntrinsicElements { - [elem: string]: any; - } - } -} diff --git a/src/shims-vue-expand.d.ts b/src/shims-vue-expand.d.ts index ef22739..658a05f 100644 --- a/src/shims-vue-expand.d.ts +++ b/src/shims-vue-expand.d.ts @@ -8,7 +8,6 @@ import VueRouter, { Route } from 'vue-router'; import { Store } from 'vuex'; -import { ElMessage } from 'element-ui/types/message'; // 扩充 declare module 'vue/types/vue' { @@ -16,13 +15,10 @@ declare module 'vue/types/vue' { $router: VueRouter; $route: Route; $store: Store; - $api: any; - $message:ElMessage lodash:any; axios:any; dayjs:any; $pinyinmatch:any; - $EventBus:any; } } diff --git a/src/shims-vue.d.ts b/src/shims-vue.d.ts index 4348c77..8bf1fc5 100644 --- a/src/shims-vue.d.ts +++ b/src/shims-vue.d.ts @@ -12,5 +12,3 @@ declare module '*.vue' { declare module 'vuedraggable'; declare module 'jsoneditor'; -declare module 'animate.css'; -declare module 'v-contextmenu'; diff --git a/src/styles/variables.scss b/src/styles/variables.scss deleted file mode 100644 index 6d32064..0000000 --- a/src/styles/variables.scss +++ /dev/null @@ -1,19 +0,0 @@ -/* - * @Author: BoBo - * @Date: 2018-12-21 14:34:50 - * @Description: 预设的全局color - * 使用时@import该css即可 - */ -$blue:#324157; -$light-blue:#3A71A8; -$red:#C03639; -$pink: #E65D6E; -$green: #30B08F; -$tiffany: #4AB7BD; -$yellow:#FEC171; -$panGreen: #30B08F; -$primary:#4ae387; -//sidebar -$menuBg:#292421; -$subMenuBg:#292421; -$menuHover:#222; diff --git a/src/views/devTools/Dict.vue b/src/views/devTools/Dict.vue index 0784855..2ac2371 100644 --- a/src/views/devTools/Dict.vue +++ b/src/views/devTools/Dict.vue @@ -27,28 +27,30 @@ highlight-current :default-expanded-keys="['fe980574-2552-4754-88c8-366eb5a22861']" @node-click="treeClick"> - - {{ node.label }} - - - 添加 - - - 修改 - - - 删除 - + + @@ -68,7 +70,7 @@ - - + @@ -156,25 +158,25 @@ export default { }; }, methods: { - afterDropDown(node, end, position, event) { + afterDropDown(node, end, position) { if (position === 'inner') { const obj = node.data; obj.parentId = end.data.id; - crud(DML.UPDATE, 'ad_codelist_type', obj).then((res) => { + crud(DML.UPDATE, 'ad_codelist_type', obj).then(() => { this.$message.success('操作成功'); this.fetchDictType(); }); } else if (position === 'before') { const obj = node.data; obj.codeorder = Number(end.data.codeorder) - 1; - crud(DML.UPDATE, 'ad_codelist_type', obj).then((res) => { + crud(DML.UPDATE, 'ad_codelist_type', obj).then(() => { this.$message.success('操作成功'); this.fetchDictType(); }); } else if (position === 'after') { const obj = node.data; obj.codeorder = Number(end.data.codeorder) + 1; - crud(DML.UPDATE, 'ad_codelist_type', obj).then((res) => { + crud(DML.UPDATE, 'ad_codelist_type', obj).then(() => { this.$message.success('操作成功'); this.fetchDictType(); }); @@ -195,12 +197,12 @@ export default { save() { this.entity.codeValue = this.entity.codeName; if (this.dialogStatus === STATUS.CREATE) { - crud(DML.INSERT, 'ad_codelist_type', this.entity).then((res) => { + crud(DML.INSERT, 'ad_codelist_type', this.entity).then(() => { this.fetchDictType(); this.dialogFormVisible = false; }); } else { - crud(DML.UPDATE, 'ad_codelist_type', this.entity).then((res) => { + crud(DML.UPDATE, 'ad_codelist_type', this.entity).then(() => { this.fetchDictType(); this.dialogFormVisible = false; }); @@ -234,7 +236,7 @@ export default { this.$refs.codeListTable.tableReload(); }, // 树节点过滤 - filterNode(value, data, node) { + filterNode(value, data) { if (!value) return true; return this.$pinyinmatch.match(data.codeName, value); }, diff --git a/src/views/devTools/FormDesigner.vue b/src/views/devTools/FormDesigner.vue index 86e656d..c8800f2 100644 --- a/src/views/devTools/FormDesigner.vue +++ b/src/views/devTools/FormDesigner.vue @@ -12,19 +12,17 @@ orderCondition="timestamp desc" :btnEditOnClick="btnEditOnClick" :btnAddOnClick="btnAddOnClick" - :searchFormCondition="searchFormParams" fullHeight :visibleList="{ tableTitle:false, btnDel:true, }"> -