diff --git a/package.json b/package.json index 906438a..69a1956 100644 --- a/package.json +++ b/package.json @@ -64,6 +64,7 @@ "vue": "2.6.12", "vue-count-to": "1.0.13", "vue-cropper": "0.5.5", + "vue-dompurify-html": "^2.6.0", "vue-easy-print": "0.0.8", "vue-json-excel": "^0.3.0", "vue-meta": "2.4.0", diff --git a/src/main.js b/src/main.js index 9f7dd4d..7618839 100644 --- a/src/main.js +++ b/src/main.js @@ -11,26 +11,35 @@ import App from './App' import store from './store' import router from './router' import directive from './directive' // directive +import VueDOMPurifyHTML from 'vue-dompurify-html' import plugins from './plugins' // plugins import { download, downloadJson } from '@/utils/request' import './assets/icons' // icon import './permission' // permission control -import { getDicts } from "@/api/system/dict/data"; -import { getConfigKey } from "@/api/system/config"; -import { parseTime, resetForm, addDateRange, selectDictLabel, selectDictLabels, handleTree, indexContinuation } from "@/utils/ruoyi"; +import { getDicts } from '@/api/system/dict/data' +import { getConfigKey } from '@/api/system/config' +import { + parseTime, + resetForm, + addDateRange, + selectDictLabel, + selectDictLabels, + handleTree, + indexContinuation, +} from '@/utils/ruoyi' // 分页组件 -import Pagination from "@/components/Pagination"; +import Pagination from '@/components/Pagination' // 自定义表格工具组件 -import RightToolbar from "@/components/RightToolbar" +import RightToolbar from '@/components/RightToolbar' // 富文本组件 -import Editor from "@/components/Editor" +import Editor from '@/components/Editor' // 文件上传组件 -import FileUpload from "@/components/FileUpload" +import FileUpload from '@/components/FileUpload' // 图片上传组件 -import ImageUpload from "@/components/ImageUpload" +import ImageUpload from '@/components/ImageUpload' // 图片预览组件 -import ImagePreview from "@/components/ImagePreview" +import ImagePreview from '@/components/ImagePreview' // 字典标签组件 import DictTag from '@/components/DictTag' // 头部标签组件 @@ -41,7 +50,6 @@ import DictData from '@/components/DictData' import JsonExcel from 'vue-json-excel' Vue.prototype.$eventBus = new Vue() - import global_ from '@/utils/globalUrl' // 全局方法挂载 @@ -71,6 +79,7 @@ Vue.component('downloadExcel', JsonExcel) Vue.use(directive) Vue.use(plugins) Vue.use(VueMeta) +Vue.use(VueDOMPurifyHTML) DictData.install() /** @@ -83,14 +92,14 @@ DictData.install() */ Vue.use(Element, { - size: Cookies.get('size') || 'medium' // set element-ui default size + size: Cookies.get('size') || 'medium', // set element-ui default size }) Vue.config.productionTip = false new Vue({ - el: '#app', - router, - store, - render: h => h(App) + el: '#app', + router, + store, + render: (h) => h(App), }) diff --git a/src/views/qrCode/qrCode.vue b/src/views/qrCode/qrCode.vue index ec33b23..9ffada9 100644 --- a/src/views/qrCode/qrCode.vue +++ b/src/views/qrCode/qrCode.vue @@ -154,8 +154,8 @@ - - - \ No newline at end of file + diff --git a/src/views/system/notice/index.vue b/src/views/system/notice/index.vue index 0b43603..5b230e4 100644 --- a/src/views/system/notice/index.vue +++ b/src/views/system/notice/index.vue @@ -126,7 +126,7 @@ -
+
diff --git a/src/views/warehouseManage/tagBind/bind/index.vue b/src/views/warehouseManage/tagBind/bind/index.vue index 40bccb5..567d644 100644 --- a/src/views/warehouseManage/tagBind/bind/index.vue +++ b/src/views/warehouseManage/tagBind/bind/index.vue @@ -92,7 +92,6 @@ icon="el-icon-plus" size="mini" @click="handleBind" - :disabled="single" v-hasPermi="['tagBind:bind:bind']" >绑定 @@ -123,7 +122,6 @@ plain icon="el-icon-plus" size="mini" - :disabled="multiple" @click="labelUpload" v-hasPermi="['tagBind:bind:unload']" >标签下载 - + e.status != 1) + if (!isBind) { + this.$modal.msgError('只能选择未绑定机具的标签!') + return + } + } this.reset() this.open = true this.title = '绑定' @@ -852,6 +855,11 @@ export default { }, //标签下载 async labelUpload() { + if (this.checkboxModel.length < 1) { + this.$modal.msgError('请勾选需要下载的数据!') + return + } + console.log('checkboxModel', this.checkboxModel) const msg = this.$modal.loading('批量生成中,请稍候...') try {