Commit e9ff63b7 authored by 杨贺晨吉's avatar 杨贺晨吉

feat: 1

parent eca48366
# OSX
#
.DS_Store .DS_Store
node_modules/ node_modules/*
dist/
gifs/
npm-debug.log*
yarn-debug.log*
yarn-error.log*
#Intellij idea test/unit/coverage
.vscode/ test/e2e/reports
selenium-debug.log
# Editor directories and files
.idea/*
.vscode/*
*.suo
*.ntvs*
*.njsproj
*.sln
yarn.lock
package-lock.json
yarn.lock
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
/******/ (function(modules) { // webpackBootstrap
/******/ // install a JSONP callback for chunk loading
/******/ function webpackJsonpCallback(data) {
/******/ var chunkIds = data[0];
/******/ var moreModules = data[1];
/******/ var executeModules = data[2];
/******/
/******/ // add "moreModules" to the modules object,
/******/ // then flag all "chunkIds" as loaded and fire callback
/******/ var moduleId, chunkId, i = 0, resolves = [];
/******/ for(;i < chunkIds.length; i++) {
/******/ chunkId = chunkIds[i];
/******/ if(Object.prototype.hasOwnProperty.call(installedChunks, chunkId) && installedChunks[chunkId]) {
/******/ resolves.push(installedChunks[chunkId][0]);
/******/ }
/******/ installedChunks[chunkId] = 0;
/******/ }
/******/ for(moduleId in moreModules) {
/******/ if(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) {
/******/ modules[moduleId] = moreModules[moduleId];
/******/ }
/******/ }
/******/ if(parentJsonpFunction) parentJsonpFunction(data);
/******/
/******/ while(resolves.length) {
/******/ resolves.shift()();
/******/ }
/******/
/******/ // add entry modules from loaded chunk to deferred list
/******/ deferredModules.push.apply(deferredModules, executeModules || []);
/******/
/******/ // run deferred modules when all chunks ready
/******/ return checkDeferredModules();
/******/ };
/******/ function checkDeferredModules() {
/******/ var result;
/******/ for(var i = 0; i < deferredModules.length; i++) {
/******/ var deferredModule = deferredModules[i];
/******/ var fulfilled = true;
/******/ for(var j = 1; j < deferredModule.length; j++) {
/******/ var depId = deferredModule[j];
/******/ if(installedChunks[depId] !== 0) fulfilled = false;
/******/ }
/******/ if(fulfilled) {
/******/ deferredModules.splice(i--, 1);
/******/ result = __webpack_require__(__webpack_require__.s = deferredModule[0]);
/******/ }
/******/ }
/******/
/******/ return result;
/******/ }
/******/
/******/ // The module cache
/******/ var installedModules = {};
/******/
/******/ // object to store loaded and loading chunks
/******/ // undefined = chunk not loaded, null = chunk preloaded/prefetched
/******/ // Promise = chunk loading, 0 = chunk loaded
/******/ var installedChunks = {
/******/ "runtime": 0
/******/ };
/******/
/******/ var deferredModules = [];
/******/
/******/ // script path function
/******/ function jsonpScriptSrc(chunkId) {
/******/ return __webpack_require__.p + "assets/js/" + ({}[chunkId]||chunkId) + "." + "45335ef5851eb80f4bb9" + ".js"
/******/ }
/******/
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/
/******/ // Check if module is in cache
/******/ if(installedModules[moduleId]) {
/******/ return installedModules[moduleId].exports;
/******/ }
/******/ // Create a new module (and put it into the cache)
/******/ var module = installedModules[moduleId] = {
/******/ i: moduleId,
/******/ l: false,
/******/ exports: {}
/******/ };
/******/
/******/ // Execute the module function
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
/******/
/******/ // Flag the module as loaded
/******/ module.l = true;
/******/
/******/ // Return the exports of the module
/******/ return module.exports;
/******/ }
/******/
/******/ // This file contains only the entry chunk.
/******/ // The chunk loading function for additional chunks
/******/ __webpack_require__.e = function requireEnsure(chunkId) {
/******/ var promises = [];
/******/
/******/
/******/ // JSONP chunk loading for javascript
/******/
/******/ var installedChunkData = installedChunks[chunkId];
/******/ if(installedChunkData !== 0) { // 0 means "already installed".
/******/
/******/ // a Promise means "currently loading".
/******/ if(installedChunkData) {
/******/ promises.push(installedChunkData[2]);
/******/ } else {
/******/ // setup Promise in chunk cache
/******/ var promise = new Promise(function(resolve, reject) {
/******/ installedChunkData = installedChunks[chunkId] = [resolve, reject];
/******/ });
/******/ promises.push(installedChunkData[2] = promise);
/******/
/******/ // start chunk loading
/******/ var script = document.createElement('script');
/******/ var onScriptComplete;
/******/
/******/ script.charset = 'utf-8';
/******/ script.timeout = 120;
/******/ if (__webpack_require__.nc) {
/******/ script.setAttribute("nonce", __webpack_require__.nc);
/******/ }
/******/ script.src = jsonpScriptSrc(chunkId);
/******/
/******/ // create error before stack unwound to get useful stacktrace later
/******/ var error = new Error();
/******/ onScriptComplete = function (event) {
/******/ // avoid mem leaks in IE.
/******/ script.onerror = script.onload = null;
/******/ clearTimeout(timeout);
/******/ var chunk = installedChunks[chunkId];
/******/ if(chunk !== 0) {
/******/ if(chunk) {
/******/ var errorType = event && (event.type === 'load' ? 'missing' : event.type);
/******/ var realSrc = event && event.target && event.target.src;
/******/ error.message = 'Loading chunk ' + chunkId + ' failed.\n(' + errorType + ': ' + realSrc + ')';
/******/ error.name = 'ChunkLoadError';
/******/ error.type = errorType;
/******/ error.request = realSrc;
/******/ chunk[1](error);
/******/ }
/******/ installedChunks[chunkId] = undefined;
/******/ }
/******/ };
/******/ var timeout = setTimeout(function(){
/******/ onScriptComplete({ type: 'timeout', target: script });
/******/ }, 120000);
/******/ script.onerror = script.onload = onScriptComplete;
/******/ document.head.appendChild(script);
/******/ }
/******/ }
/******/ return Promise.all(promises);
/******/ };
/******/
/******/ // expose the modules object (__webpack_modules__)
/******/ __webpack_require__.m = modules;
/******/
/******/ // expose the module cache
/******/ __webpack_require__.c = installedModules;
/******/
/******/ // define getter function for harmony exports
/******/ __webpack_require__.d = function(exports, name, getter) {
/******/ if(!__webpack_require__.o(exports, name)) {
/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
/******/ }
/******/ };
/******/
/******/ // define __esModule on exports
/******/ __webpack_require__.r = function(exports) {
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/******/ }
/******/ Object.defineProperty(exports, '__esModule', { value: true });
/******/ };
/******/
/******/ // create a fake namespace object
/******/ // mode & 1: value is a module id, require it
/******/ // mode & 2: merge all properties of value into the ns
/******/ // mode & 4: return value when already ns object
/******/ // mode & 8|1: behave like require
/******/ __webpack_require__.t = function(value, mode) {
/******/ if(mode & 1) value = __webpack_require__(value);
/******/ if(mode & 8) return value;
/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
/******/ var ns = Object.create(null);
/******/ __webpack_require__.r(ns);
/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
/******/ return ns;
/******/ };
/******/
/******/ // getDefaultExport function for compatibility with non-harmony modules
/******/ __webpack_require__.n = function(module) {
/******/ var getter = module && module.__esModule ?
/******/ function getDefault() { return module['default']; } :
/******/ function getModuleExports() { return module; };
/******/ __webpack_require__.d(getter, 'a', getter);
/******/ return getter;
/******/ };
/******/
/******/ // Object.prototype.hasOwnProperty.call
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
/******/
/******/ // __webpack_public_path__
/******/ __webpack_require__.p = "/";
/******/
/******/ // on error function for async loading
/******/ __webpack_require__.oe = function(err) { console.error(err); throw err; };
/******/
/******/ var jsonpArray = window["webpackJsonp"] = window["webpackJsonp"] || [];
/******/ var oldJsonpFunction = jsonpArray.push.bind(jsonpArray);
/******/ jsonpArray.push = webpackJsonpCallback;
/******/ jsonpArray = jsonpArray.slice();
/******/ for(var i = 0; i < jsonpArray.length; i++) webpackJsonpCallback(jsonpArray[i]);
/******/ var parentJsonpFunction = oldJsonpFunction;
/******/
/******/
/******/ // run deferred modules from other chunks
/******/ checkDeferredModules();
/******/ })
/************************************************************************/
/******/ ([]);
\ No newline at end of file
This diff is collapsed.
<!DOCTYPE html> <!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><link rel="icon" href="./logo.ico" type="image/x-icon"><title>robot</title><meta name="keywords" content="keywords"><meta name="description" content="description"><style>.page-loading-wrap {
<html lang="en">
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<link rel="icon" href="./logo.ico" type="image/x-icon" />
<title>robot</title>
<meta name="keywords" content="keywords" />
<meta name="description" content="description" />
<style>
.page-loading-wrap {
padding: 120px; padding: 120px;
display: flex; display: flex;
justify-content: center; justify-content: center;
...@@ -57,28 +45,4 @@ ...@@ -57,28 +45,4 @@
100% { 100% {
transform: rotate(360deg); transform: rotate(360deg);
} }
} }</style><link href="/assets/css/chunk-2d237305.3caf290f.css" rel="prefetch"><link href="/assets/css/chunk-2e59a86e.0fa67829.css" rel="prefetch"><link href="/assets/css/chunk-3a31b900.1d658ff5.css" rel="prefetch"><link href="/assets/css/chunk-6fb3cb6c.c2118410.css" rel="prefetch"><link href="/assets/css/chunk-700209bb.8b6c4bff.css" rel="prefetch"><link href="/assets/css/chunk-a845870e.0af040aa.css" rel="prefetch"><link href="/assets/css/chunk-c2d92814.0af3a807.css" rel="prefetch"><link href="/assets/css/chunk-daed65c8.104a88b2.css" rel="prefetch"><link href="/assets/js/chunk-2d0a4c15.5deb44ba33ad2616402a.js" rel="prefetch"><link href="/assets/js/chunk-2d237305.5deb44ba33ad2616402a.js" rel="prefetch"><link href="/assets/js/chunk-2e59a86e.5deb44ba33ad2616402a.js" rel="prefetch"><link href="/assets/js/chunk-3a31b900.5deb44ba33ad2616402a.js" rel="prefetch"><link href="/assets/js/chunk-6fb3cb6c.5deb44ba33ad2616402a.js" rel="prefetch"><link href="/assets/js/chunk-700209bb.5deb44ba33ad2616402a.js" rel="prefetch"><link href="/assets/js/chunk-a845870e.5deb44ba33ad2616402a.js" rel="prefetch"><link href="/assets/js/chunk-c2d92814.5deb44ba33ad2616402a.js" rel="prefetch"><link href="/assets/js/chunk-daed65c8.5deb44ba33ad2616402a.js" rel="prefetch"><link href="/assets/js/npm.sortablejs.5deb44ba33ad2616402a.js" rel="prefetch"><link href="/assets/js/npm.vuedraggable.5deb44ba33ad2616402a.js" rel="prefetch"><link href="/assets/css/app.8eff4930.css" rel="preload" as="style"><link href="/assets/css/npm.viewerjs.1da9c16a.css" rel="preload" as="style"><link href="/assets/js/app.5deb44ba33ad2616402a.js" rel="preload" as="script"><link href="/assets/js/chunk-vendors.5deb44ba33ad2616402a.js" rel="preload" as="script"><link href="/assets/js/npm.axios.5deb44ba33ad2616402a.js" rel="preload" as="script"><link href="/assets/js/npm.core-js.5deb44ba33ad2616402a.js" rel="preload" as="script"><link href="/assets/js/npm.moment.5deb44ba33ad2616402a.js" rel="preload" as="script"><link href="/assets/js/npm.v-viewer.5deb44ba33ad2616402a.js" rel="preload" as="script"><link href="/assets/js/npm.view-design.5deb44ba33ad2616402a.js" rel="preload" as="script"><link href="/assets/js/npm.viewerjs.5deb44ba33ad2616402a.js" rel="preload" as="script"><link href="/assets/js/npm.vue-i18n.5deb44ba33ad2616402a.js" rel="preload" as="script"><link href="/assets/js/npm.vue-print-nb.5deb44ba33ad2616402a.js" rel="preload" as="script"><link href="/assets/js/npm.vue-router.5deb44ba33ad2616402a.js" rel="preload" as="script"><link href="/assets/js/npm.vue.5deb44ba33ad2616402a.js" rel="preload" as="script"><link href="/assets/js/npm.vuex.5deb44ba33ad2616402a.js" rel="preload" as="script"><link href="/assets/js/runtime.5deb44ba33ad2616402a.js" rel="preload" as="script"><link href="/assets/css/npm.viewerjs.1da9c16a.css" rel="stylesheet"><link href="/assets/css/app.8eff4930.css" rel="stylesheet"></head><body><script src="/config.js"></script><script src="https://lf1-cdn-tos.bytegoofy.com/obj/iconpark/icons_25749_141.e506fd4672c49c895a84e401229e9082.js"></script><noscript><strong>We're sorry but admin doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id="app"><div class="page-loading-wrap"><div class="half-circle-spinner"><div class="circle circle-1"></div><div class="circle circle-2"></div></div><h4 style="margin-top:20px;">正在加载资源...</h4></div></div><script src="/assets/js/runtime.5deb44ba33ad2616402a.js"></script><script src="/assets/js/npm.core-js.5deb44ba33ad2616402a.js"></script><script src="/assets/js/npm.moment.5deb44ba33ad2616402a.js"></script><script src="/assets/js/npm.axios.5deb44ba33ad2616402a.js"></script><script src="/assets/js/npm.view-design.5deb44ba33ad2616402a.js"></script><script src="/assets/js/npm.viewerjs.5deb44ba33ad2616402a.js"></script><script src="/assets/js/npm.v-viewer.5deb44ba33ad2616402a.js"></script><script src="/assets/js/npm.vue-i18n.5deb44ba33ad2616402a.js"></script><script src="/assets/js/npm.vue-print-nb.5deb44ba33ad2616402a.js"></script><script src="/assets/js/npm.vue-router.5deb44ba33ad2616402a.js"></script><script src="/assets/js/npm.vue.5deb44ba33ad2616402a.js"></script><script src="/assets/js/npm.vuex.5deb44ba33ad2616402a.js"></script><script src="/assets/js/chunk-vendors.5deb44ba33ad2616402a.js"></script><script src="/assets/js/app.5deb44ba33ad2616402a.js"></script></body></html>
</style> \ No newline at end of file
<link href="/assets/js/0.45335ef5851eb80f4bb9.js" rel="prefetch"><link href="/assets/js/app.45335ef5851eb80f4bb9.js" rel="preload" as="script"><link href="/assets/js/npm.axios.45335ef5851eb80f4bb9.js" rel="preload" as="script"><link href="/assets/js/npm.core-js.45335ef5851eb80f4bb9.js" rel="preload" as="script"><link href="/assets/js/npm.moment.45335ef5851eb80f4bb9.js" rel="preload" as="script"><link href="/assets/js/npm.sortablejs.45335ef5851eb80f4bb9.js" rel="preload" as="script"><link href="/assets/js/npm.v-viewer.45335ef5851eb80f4bb9.js" rel="preload" as="script"><link href="/assets/js/npm.view-design.45335ef5851eb80f4bb9.js" rel="preload" as="script"><link href="/assets/js/npm.viewerjs.45335ef5851eb80f4bb9.js" rel="preload" as="script"><link href="/assets/js/npm.vue-i18n.45335ef5851eb80f4bb9.js" rel="preload" as="script"><link href="/assets/js/npm.vue-print-nb.45335ef5851eb80f4bb9.js" rel="preload" as="script"><link href="/assets/js/npm.vue-router.45335ef5851eb80f4bb9.js" rel="preload" as="script"><link href="/assets/js/npm.vue.45335ef5851eb80f4bb9.js" rel="preload" as="script"><link href="/assets/js/npm.vuedraggable.45335ef5851eb80f4bb9.js" rel="preload" as="script"><link href="/assets/js/npm.vuex.45335ef5851eb80f4bb9.js" rel="preload" as="script"><link href="/assets/js/runtime.45335ef5851eb80f4bb9.js" rel="preload" as="script"><link href="/assets/js/vendors~app.45335ef5851eb80f4bb9.js" rel="preload" as="script"></head>
<body>
<script src="/config.js"></script>
<script
src="https://lf1-cdn-tos.bytegoofy.com/obj/iconpark/icons_25749_141.e506fd4672c49c895a84e401229e9082.js"></script>
<noscript>
<strong>We're sorry but admin doesn't work properly without JavaScript
enabled. Please enable it to continue.</strong>
</noscript>
<div id="app">
<div class="page-loading-wrap">
<div class="half-circle-spinner">
<div class="circle circle-1"></div>
<div class="circle circle-2"></div>
</div>
<h4 style="margin-top:20px;">正在加载资源...</h4>
</div>
</div>
<script type="text/javascript" src="/assets/js/runtime.45335ef5851eb80f4bb9.js"></script><script type="text/javascript" src="/assets/js/npm.core-js.45335ef5851eb80f4bb9.js"></script><script type="text/javascript" src="/assets/js/npm.moment.45335ef5851eb80f4bb9.js"></script><script type="text/javascript" src="/assets/js/npm.axios.45335ef5851eb80f4bb9.js"></script><script type="text/javascript" src="/assets/js/npm.view-design.45335ef5851eb80f4bb9.js"></script><script type="text/javascript" src="/assets/js/npm.viewerjs.45335ef5851eb80f4bb9.js"></script><script type="text/javascript" src="/assets/js/npm.vue.45335ef5851eb80f4bb9.js"></script><script type="text/javascript" src="/assets/js/npm.sortablejs.45335ef5851eb80f4bb9.js"></script><script type="text/javascript" src="/assets/js/npm.v-viewer.45335ef5851eb80f4bb9.js"></script><script type="text/javascript" src="/assets/js/npm.vue-i18n.45335ef5851eb80f4bb9.js"></script><script type="text/javascript" src="/assets/js/npm.vue-print-nb.45335ef5851eb80f4bb9.js"></script><script type="text/javascript" src="/assets/js/npm.vue-router.45335ef5851eb80f4bb9.js"></script><script type="text/javascript" src="/assets/js/npm.vuedraggable.45335ef5851eb80f4bb9.js"></script><script type="text/javascript" src="/assets/js/npm.vuex.45335ef5851eb80f4bb9.js"></script><script type="text/javascript" src="/assets/js/vendors~app.45335ef5851eb80f4bb9.js"></script><script type="text/javascript" src="/assets/js/app.45335ef5851eb80f4bb9.js"></script></body>
</html>
\ No newline at end of file
...@@ -16,21 +16,21 @@ ...@@ -16,21 +16,21 @@
import { initDepartment } from "@/api/index"; import { initDepartment } from "@/api/index";
export default { export default {
name: "departmentChoose", name: "departmentChoose",
props: ['selectDepDef'], props: ["selectDepDef"],
data() { data() {
return { return {
selectDep: [], // 已选数据 selectDep: [], // 已选数据
department: [] // 列表 department: [], // 列表
}; };
}, },
methods: { methods: {
// 获取部门数据 // 获取部门数据
initDepartmentData() { initDepartmentData() {
initDepartment().then(res => { initDepartment().then((res) => {
if (res.success) { if (res.success) {
const arr = res.result; const arr = res.result;
this.filterData(arr) this.filterData(arr);
this.department = arr this.department = arr;
} }
}); });
}, },
...@@ -40,6 +40,8 @@ export default { ...@@ -40,6 +40,8 @@ export default {
if (value && value.length > 0) { if (value && value.length > 0) {
departmentId = value[value.length - 1]; departmentId = value[value.length - 1];
} }
console.log("departmentId", departmentId);
console.log("value", value);
this.$emit("on-change", departmentId); this.$emit("on-change", departmentId);
this.$emit("on-select-dep", value); this.$emit("on-select-dep", value);
}, },
...@@ -48,26 +50,26 @@ export default { ...@@ -48,26 +50,26 @@ export default {
this.selectDep = []; this.selectDep = [];
}, },
// 处理部门数据 // 处理部门数据
filterData (data) { filterData(data) {
data.forEach(e => { data.forEach((e) => {
e.value = e.id; e.value = e.id;
e.label = e.title; e.label = e.title;
if (e.children) { if (e.children) {
this.filterData(e.children) this.filterData(e.children);
} else { } else {
return return;
} }
}) });
} },
}, },
watch: { watch: {
selectDepDef(newV,oldV) { selectDepDef(newV, oldV) {
this.selectDep = newV this.selectDep = newV;
} },
}, },
created() { created() {
this.initDepartmentData(); this.initDepartmentData();
} },
}; };
</script> </script>
......
<template> <template>
<div> <div>
<div style="display:flex;"> <div style="display: flex">
<Input <Input
v-model="currentValue" v-model="currentValue"
@on-change="handleChange" @on-change="handleChange"
...@@ -11,13 +11,28 @@ ...@@ -11,13 +11,28 @@
:readonly="readonly" :readonly="readonly"
:maxlength="maxlength" :maxlength="maxlength"
> >
<Poptip slot="append" transfer trigger="hover" title="图片预览" placement="right"> <Poptip
<Icon type="md-eye" class="see-icon" /> slot="append"
<div slot="content"> transfer
<img :src="currentValue" alt="该资源不存在" style="max-width: 300px;margin: 0 auto;display: block;" /> trigger="hover"
<a @click="viewImage=true" style="margin-top:5px;text-align:right;display:block">查看大图</a> title="图片预览"
</div> placement="right"
</Poptip> >
<Icon type="md-eye" class="see-icon" />
<div v-if="!!currentValue" slot="content">
<img
:src="currentValue"
alt="该资源不存在"
style="max-width: 300px; margin: 0 auto; display: block"
/>
<a
@click="viewImage = true"
style="margin-top: 5px; text-align: right; display: block"
>查看大图</a
>
</div>
<div v-if="!currentValue" slot="content">请上传图片</div>
</Poptip>
</Input> </Input>
<Upload <Upload
...@@ -25,7 +40,7 @@ ...@@ -25,7 +40,7 @@
:headers="accessToken" :headers="accessToken"
:on-success="handleSuccess" :on-success="handleSuccess"
:on-error="handleError" :on-error="handleError"
:format="['jpg','jpeg','png','gif','bmp']" :format="['jpg', 'jpeg', 'png', 'gif', 'bmp']"
accept=".jpg, .jpeg, .png, .gif, .bmp" accept=".jpg, .jpeg, .png, .gif, .bmp"
:max-size="1024" :max-size="1024"
:on-format-error="handleFormatError" :on-format-error="handleFormatError"
...@@ -35,14 +50,25 @@ ...@@ -35,14 +50,25 @@
ref="up" ref="up"
class="upload" class="upload"
> >
<Button :loading="loading" :size="size" :disabled="disabled">上传图片</Button> <Button :loading="loading" :size="size" :disabled="disabled"
>上传图片</Button
>
</Upload> </Upload>
</div> </div>
<Modal title="图片预览" v-model="viewImage" :styles="{top: '30px'}" draggable> <Modal
<img :src="currentValue" alt="该资源不存在" style="max-width: 300px;margin: 0 auto;display: block;" /> title="图片预览"
v-model="viewImage"
:styles="{ top: '30px' }"
draggable
>
<img
:src="currentValue"
alt="该资源不存在"
style="max-width: 300px; margin: 0 auto; display: block"
/>
<div slot="footer"> <div slot="footer">
<Button @click="viewImage=false">关闭</Button> <Button @click="viewImage = false">关闭</Button>
</div> </div>
</Modal> </Modal>
</div> </div>
...@@ -55,30 +81,30 @@ export default { ...@@ -55,30 +81,30 @@ export default {
props: { props: {
value: String, value: String,
size: { size: {
default: 'default', default: "default",
type: String type: String,
}, },
placeholder: { placeholder: {
type: String, type: String,
default: "图片链接" default: "图片链接",
}, },
showInput: { showInput: {
type: Boolean, type: Boolean,
default: true default: true,
}, },
disabled: { disabled: {
type: Boolean, type: Boolean,
default: false default: false,
}, },
readonly: { readonly: {
type: Boolean, type: Boolean,
default: false default: false,
}, },
maxlength: Number, maxlength: Number,
icon: { icon: {
type: String, type: String,
default: "ios-cloud-upload-outline" default: "ios-cloud-upload-outline",
} },
}, },
data() { data() {
return { return {
...@@ -86,14 +112,14 @@ export default { ...@@ -86,14 +112,14 @@ export default {
currentValue: this.value, // 当前值 currentValue: this.value, // 当前值
loading: false, // 加载状态 loading: false, // 加载状态
viewImage: false, // 预览图片modal viewImage: false, // 预览图片modal
uploadFileUrl: uploadFile // 上传地址 uploadFileUrl: uploadFile, // 上传地址
}; };
}, },
methods: { methods: {
// 初始化 // 初始化
init() { init() {
this.accessToken = { this.accessToken = {
accessToken: this.getStore("accessToken") accessToken: this.getStore("accessToken"),
}; };
}, },
// 格式校验 // 格式校验
...@@ -104,7 +130,7 @@ export default { ...@@ -104,7 +130,7 @@ export default {
desc: desc:
"所选文件‘ " + "所选文件‘ " +
file.name + file.name +
" ’格式不正确, 请选择 .jpg .jpeg .png .gif .bmp格式文件" " ’格式不正确, 请选择 .jpg .jpeg .png .gif .bmp格式文件",
}); });
}, },
// 大小校验 // 大小校验
...@@ -112,7 +138,7 @@ export default { ...@@ -112,7 +138,7 @@ export default {
this.loading = false; this.loading = false;
this.$Notice.warning({ this.$Notice.warning({
title: "文件大小过大", title: "文件大小过大",
desc: "所选文件大小过大, 不得超过1M." desc: "所选文件大小过大, 不得超过1M.",
}); });
}, },
// 上传前 // 上传前
...@@ -140,7 +166,7 @@ export default { ...@@ -140,7 +166,7 @@ export default {
handleChange(v) { handleChange(v) {
this.$emit("input", this.currentValue); this.$emit("input", this.currentValue);
this.$emit("on-change", this.currentValue); this.$emit("on-change", this.currentValue);
this.$attrs.rollback && this.$attrs.rollback() this.$attrs.rollback && this.$attrs.rollback();
}, },
// 初始值 // 初始值
setCurrentValue(value) { setCurrentValue(value) {
...@@ -149,16 +175,16 @@ export default { ...@@ -149,16 +175,16 @@ export default {
} }
this.currentValue = value; this.currentValue = value;
this.$emit("on-change", this.currentValue); this.$emit("on-change", this.currentValue);
} },
}, },
watch: { watch: {
value(val) { value(val) {
this.setCurrentValue(val); this.setCurrentValue(val);
} },
}, },
created() { created() {
this.init(); this.init();
} },
}; };
</script> </script>
......
...@@ -56,8 +56,8 @@ ...@@ -56,8 +56,8 @@
@on-click="handleClickUserDropdown" @on-click="handleClickUserDropdown"
> >
<div class="dropList"> <div class="dropList">
<!-- <span class="main-user-name">{{ userInfo.nickName }}</span> <span class="main-user-name">{{ userInfo.nickName }}</span>
<Icon type="md-arrow-dropdown" /> --> <Icon type="md-arrow-dropdown" />
<Avatar <Avatar
:src="avatarPath" :src="avatarPath"
style="background: #fff; margin-left: 10px" style="background: #fff; margin-left: 10px"
......
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
<FormItem label="部门名称" prop="title"> <FormItem label="部门名称" prop="title">
<Input v-model="form.title" /> <Input v-model="form.title" />
</FormItem> </FormItem>
<FormItem label="选择角色"> <FormItem label="选择角色" prop="selectedRole">
<Select <Select
:loading="userLoading" :loading="userLoading"
not-found-text="暂无角色" not-found-text="暂无角色"
...@@ -63,12 +63,6 @@ ...@@ -63,12 +63,6 @@
></InputNumber> ></InputNumber>
</Tooltip> </Tooltip>
</FormItem> </FormItem>
<!-- <FormItem label="是否启用" prop="status">
<i-switch size="large" v-model="form.status" :true-value="0" :false-value="-1">
<span slot="open">启用</span>
<span slot="close">禁用</span>
</i-switch>
</FormItem> -->
<Form-item> <Form-item>
<Button <Button
style="margin-right: 5px" style="margin-right: 5px"
...@@ -114,12 +108,6 @@ ...@@ -114,12 +108,6 @@
></InputNumber> ></InputNumber>
</Tooltip> </Tooltip>
</FormItem> </FormItem>
<!-- <FormItem label="是否启用" prop="status">
<i-switch size="large" v-model="formAdd.status" :true-value="0" :false-value="-1">
<span slot="open">启用</span>
<span slot="close">禁用</span>
</i-switch>
</FormItem> -->
</Form> </Form>
<div slot="footer"> <div slot="footer">
<Button type="text" @click="cancelAdd">取消</Button> <Button type="text" @click="cancelAdd">取消</Button>
...@@ -304,6 +292,7 @@ export default { ...@@ -304,6 +292,7 @@ export default {
// 重置表单 // 重置表单
handleReset() { handleReset() {
this.$refs.form.resetFields(); this.$refs.form.resetFields();
this.$set(this, "selectedRole", []);
this.form.status = 0; this.form.status = 0;
}, },
// 提交表单 // 提交表单
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<Tabs value="RESOURCE" @on-click="handleClickType"> <Tabs value="RESOURCE" @on-click="handleClickType">
<TabPane label="图片源" name="RESOURCE"> <TabPane label="图片源" name="RESOURCE">
<Row class="operation" style="margin-bottom: 10px"> <Row class="operation" style="margin-bottom: 10px">
<Button @click="add" type="primary">添加</Button> <Button @click="add" type="primary" icon="md-add">添加</Button>
</Row> </Row>
<Table <Table
:loading="loading" :loading="loading"
...@@ -98,12 +98,12 @@ ...@@ -98,12 +98,12 @@
style="width: 100%" style="width: 100%"
></upload-pic-input> ></upload-pic-input>
</FormItem> </FormItem>
<FormItem label="类型" prop="type"> <!-- <FormItem label="类型" prop="type">
<radio-group v-model="form.type" type="button"> <radio-group v-model="form.type" type="button">
<radio label="RESOURCE">图片源</radio> <radio label="RESOURCE">图片源</radio>
<radio label="SLIDER">滑块源</radio> <radio label="SLIDER">滑块源</radio>
</radio-group> </radio-group>
</FormItem> </FormItem> -->
</Form> </Form>
<div slot="footer"> <div slot="footer">
<Button type="text" @click="modalVisible = false">取消</Button> <Button type="text" @click="modalVisible = false">取消</Button>
...@@ -176,17 +176,17 @@ export default { ...@@ -176,17 +176,17 @@ export default {
}, },
{ {
title: "创建时间", title: "创建时间",
key: "createTime", key: "gmtCreate",
minWidth: 120, minWidth: 120,
}, },
{ // {
title: "最后修改人", // title: "最后修改人",
key: "updateBy", // key: "updateBy",
minWidth: 80, // minWidth: 80,
}, // },
{ {
title: "更新时间", title: "更新时间",
key: "updateTime", key: "gmtModify",
minWidth: 120, minWidth: 120,
}, },
{ {
......
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
></department-choose> ></department-choose>
</Form-item> </Form-item>
<Form-item label="角色" prop="mobile"> <Form-item label="角色" prop="mobile">
<Select v-model="searchForm.mobile"> <Select v-model="searchForm.mobile" clearable>
<Option v-for="item in roleList" :value="item.id" :key="item.id">{{ <Option v-for="item in roleList" :value="item.id" :key="item.id">{{
item.name item.name
}}</Option> }}</Option>
...@@ -632,6 +632,7 @@ export default { ...@@ -632,6 +632,7 @@ export default {
}, },
// 确认提交 // 确认提交
submitUser() { submitUser() {
console.log("this.form", this.form);
this.$refs.form.validate((valid) => { this.$refs.form.validate((valid) => {
if (valid) { if (valid) {
// 添加用户 避免编辑后传入id // 添加用户 避免编辑后传入id
...@@ -651,7 +652,7 @@ export default { ...@@ -651,7 +652,7 @@ export default {
} else { } else {
this.form.status = false; this.form.status = false;
} }
console.log("params", params);
this.submitLoading = true; this.submitLoading = true;
if (this.modalType == 0) { if (this.modalType == 0) {
addUser(params).then((res) => { addUser(params).then((res) => {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment