JImageupload,JUpload组件修改,清除没必要的log

This commit is contained in:
yaoyanan
2021-04-08 18:44:24 +08:00
parent a39835ef6b
commit fd67747c58
15 changed files with 47 additions and 124 deletions
+1 -1
View File
@@ -5,7 +5,7 @@ window._CONFIG = {}
window._CONFIG['domianURL'] = '/jero-boot' // 路由转发 devServer window._CONFIG['domianURL'] = '/jero-boot' // 路由转发 devServer
window._CONFIG['domianWebSocketURL'] = 'http://localhost:8080/jero-boot' window._CONFIG['domianWebSocketURL'] = 'http://localhost:8080/jero-boot'
// 单点登录地址 // 单点登录地址
window._CONFIG['staticDomainURL'] = window._CONFIG['domianURL'] + '/sys/common/static' window._CONFIG['staticDomainURL'] = window._CONFIG['domianURL'] + '/sys/common/download'
window._CONFIG['pdfDomainURL'] = window._CONFIG['domianURL'] + '/sys/common/pdf/pdfPreviewIframe' window._CONFIG['pdfDomainURL'] = window._CONFIG['domianURL'] + '/sys/common/pdf/pdfPreviewIframe'
window._CONFIG['casPrefixUrl'] = 'http://cas.example.org:8443/cas' window._CONFIG['casPrefixUrl'] = 'http://cas.example.org:8443/cas'
// 预览文件地址 // 预览文件地址
-1
View File
@@ -69,7 +69,6 @@ export const ajaxGetDictItems = (code, params)=>getAction(`/sys/dict/getDictItem
function getDictItemsFromCache(dictCode) { function getDictItemsFromCache(dictCode) {
if (Vue.ls.get(UI_CACHE_DB_DICT_DATA) && Vue.ls.get(UI_CACHE_DB_DICT_DATA)[dictCode]) { if (Vue.ls.get(UI_CACHE_DB_DICT_DATA) && Vue.ls.get(UI_CACHE_DB_DICT_DATA)[dictCode]) {
let dictItems = Vue.ls.get(UI_CACHE_DB_DICT_DATA)[dictCode]; let dictItems = Vue.ls.get(UI_CACHE_DB_DICT_DATA)[dictCode];
console.log("-----------getDictItemsFromCache----------dictCode="+dictCode+"---- dictItems=",dictItems)
return dictItems; return dictItems;
} }
} }
+12 -26
View File
@@ -19,6 +19,7 @@
:class="!isMultiple?'imgupload':''"> :class="!isMultiple?'imgupload':''">
<div :style="{'width':(!isMultiple?'104px':'auto'),'height':(!isMultiple?'104px':'auto')}"> <div :style="{'width':(!isMultiple?'104px':'auto'),'height':(!isMultiple?'104px':'auto')}">
<img v-if="!isMultiple && picUrl" :src="getAvatarView()" style="width:100%;height:100%"/> <img v-if="!isMultiple && picUrl" :src="getAvatarView()" style="width:100%;height:100%"/>
<!--<img v-if="!isMultiple && picUrl" src="http://localhost:3000/jero-boot/sys/common/download/1379989167782797313?token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJleHAiOjE2MTc4NTA1OTgsInVzZXJuYW1lIjoiYWRtaW4ifQ.1xRpivI0TzTqAnISJICNm-PoMxSDUITH5uaEcvwheIQ&fullfilename=3.jpeg" style="width:100%;height:100%"/>-->
<div v-else class="iconp"> <div v-else class="iconp">
<a-icon :type="uploadLoading ? 'loading' : 'plus'" /> <a-icon :type="uploadLoading ? 'loading' : 'plus'" />
<div class="ant-upload-text">{{ text }}</div> <div class="ant-upload-text">{{ text }}</div>
@@ -39,13 +40,6 @@
const uidGenerator=()=>{ const uidGenerator=()=>{
return '-'+parseInt(Math.random()*10000+1,10); return '-'+parseInt(Math.random()*10000+1,10);
} }
const getFileName=(path)=>{
if(path.lastIndexOf("\\")>=0){
let reg=new RegExp("\\\\","g");
path = path.replace(reg,"/");
}
return path.substring(path.lastIndexOf("/")+1);
}
export default { export default {
name: 'JImageUpload', name: 'JImageUpload',
data(){ data(){
@@ -115,27 +109,20 @@
}, },
methods:{ methods:{
initFileList(paths){ initFileList(paths){
if(!paths || paths.length==0){ if(!paths || paths.length === 0){
this.fileList = []; this.fileList = [];
return; return;
} }
this.picUrl = true; this.picUrl = true;
let fileList = []; let arr = paths.join(",")
let arr = paths.split(",")
for(var a=0;a<arr.length;a++){ for(var a=0;a<arr.length;a++){
let url = getFileAccessHttpUrl(arr[a]); this.fileList.forEach((item)=>{
fileList.push({ if (item.url === arr[a]){
uid: uidGenerator(), item.uid = uidGenerator()
name: getFileName(arr[a]), item.response.status = 'history'
status: 'done',
url: url,
response:{
status:"history",
message:arr[a]
} }
}) })
} }
this.fileList = fileList
}, },
beforeUpload: function(file){ beforeUpload: function(file){
var fileType = file.type; var fileType = file.type;
@@ -157,7 +144,7 @@
this.picUrl = true; this.picUrl = true;
fileList = fileList.map((file) => { fileList = fileList.map((file) => {
if (file.response) { if (file.response) {
file.url = file.response.message; file.url = `${file.response.result.id}?token=${Vue.ls.get(ACCESS_TOKEN)}&fullfilename=${file.response.result.fileName}`;
} }
return file; return file;
}); });
@@ -180,8 +167,8 @@
}, },
getAvatarView(){ getAvatarView(){
if(this.fileList.length>0){ if(this.fileList.length>0){
let url = this.fileList[0].url let url = this.fileList[this.fileList.length-1].url
return url return getFileAccessHttpUrl(url)
} }
}, },
handlePathChange(){ handlePathChange(){
@@ -192,12 +179,12 @@
} }
let arr = []; let arr = [];
if(!this.isMultiple){ if(!this.isMultiple){
arr.push(uploadFiles[uploadFiles.length-1].response.message) arr.push(uploadFiles[uploadFiles.length-1].url)
}else{ }else{
for(let a=0;a<uploadFiles.length;a++){ for(let a=0;a<uploadFiles.length;a++){
// update-begin-author:taoyan date:20200819 for:【开源问题z】上传图片组件 LOWCOD-783 // update-begin-author:taoyan date:20200819 for:【开源问题z】上传图片组件 LOWCOD-783
if(uploadFiles[a].status === 'done' ) { if(uploadFiles[a].status === 'done' ) {
arr.push(uploadFiles[a].response.message) arr.push(uploadFiles[a].url)
}else{ }else{
return; return;
} }
@@ -211,7 +198,6 @@
}, },
handleDelete(file){ handleDelete(file){
//如有需要新增 删除逻辑 //如有需要新增 删除逻辑
console.log(file)
}, },
handleCancel() { handleCancel() {
this.close(); this.close();
+28 -53
View File
@@ -46,6 +46,7 @@
import Vue from 'vue' import Vue from 'vue'
import { ACCESS_TOKEN } from "@/store/mutation-types" import { ACCESS_TOKEN } from "@/store/mutation-types"
import { getFileAccessHttpUrl } from '@/api/manage'; import { getFileAccessHttpUrl } from '@/api/manage';
const Base64 = require('js-base64').Base64
const FILE_TYPE_ALL = "all" const FILE_TYPE_ALL = "all"
const FILE_TYPE_IMG = "image" const FILE_TYPE_IMG = "image"
@@ -53,13 +54,6 @@
const uidGenerator=()=>{ const uidGenerator=()=>{
return '-'+parseInt(Math.random()*10000+1,10); return '-'+parseInt(Math.random()*10000+1,10);
} }
const getFileName=(path)=>{
if(path.lastIndexOf("\\")>=0){
let reg=new RegExp("\\\\","g");
path = path.replace(reg,"/");
}
return path.substring(path.lastIndexOf("/")+1);
}
export default { export default {
name: 'JUpload', name: 'JUpload',
data(){ data(){
@@ -176,46 +170,29 @@
this.fileList = []; this.fileList = [];
return; return;
} }
let fileList = [];
for(var a=0;a<val.length;a++){ for(var a=0;a<val.length;a++){
let url = getFileAccessHttpUrl(val[a].filePath); this.fileList.forEach((item)=>{
fileList.push({ if (item.url === val[a]){
uid:uidGenerator(), item.uid = uidGenerator()
name:val[a].fileName, item.response.status = 'done'
status: 'done',
url: url,
response:{
status:"history",
message:val[a].filePath
} }
}) })
} }
this.fileList = fileList
}, },
initFileList(paths){ initFileList(paths){
if(!paths || paths.length==0){ if(!paths || paths.length==0){
//return [];
// update-begin- --- author:os_chengtgen ------ date:20190729 ---- for:issues:326,Jupload组件初始化bug
this.fileList = []; this.fileList = [];
return; return;
// update-end- --- author:os_chengtgen ------ date:20190729 ---- for:issues:326,Jupload组件初始化bug
} }
let fileList = [];
let arr = paths.split(",") let arr = paths.split(",")
for(var a=0;a<arr.length;a++){ for(var a=0;a<arr.length;a++){
let url = getFileAccessHttpUrl(arr[a]); this.fileList.forEach((item)=>{
fileList.push({ if (item.url === arr[a]){
uid:uidGenerator(), item.uid = uidGenerator()
name:getFileName(arr[a]), item.response.status = 'history'
status: 'done',
url: url,
response:{
status:"history",
message:arr[a]
} }
}) })
} }
this.fileList = fileList
}, },
handlePathChange(){ handlePathChange(){
let uploadFiles = this.fileList let uploadFiles = this.fileList
@@ -226,13 +203,11 @@
let arr = []; let arr = [];
for(var a=0;a<uploadFiles.length;a++){ for(var a=0;a<uploadFiles.length;a++){
// update-begin-author:lvdandan date:20200603 for:【TESTA-514】【开源issue】多个文件同时上传时,控制台报错
if(uploadFiles[a].status === 'done' ) { if(uploadFiles[a].status === 'done' ) {
arr.push(uploadFiles[a].response.message) arr.push(uploadFiles[a].url)
}else{ }else{
return; return;
} }
// update-end-author:lvdandan date:20200603 for:【TESTA-514】【开源issue】多个文件同时上传时,控制台报错
} }
if(arr.length>0){ if(arr.length>0){
path = arr.join(",") path = arr.join(",")
@@ -253,7 +228,6 @@
return true return true
}, },
handleChange(info) { handleChange(info) {
console.log("--文件列表改变--")
if(!info.file.status && this.uploadGoOn === false){ if(!info.file.status && this.uploadGoOn === false){
info.fileList.pop(); info.fileList.pop();
} }
@@ -265,7 +239,7 @@
if(info.file.response.success){ if(info.file.response.success){
fileList = fileList.map((file) => { fileList = fileList.map((file) => {
if (file.response) { if (file.response) {
let reUrl = file.response.message; let reUrl = `${file.response.result.id}?token=${Vue.ls.get(ACCESS_TOKEN)}&fullfilename=${file.response.result.fileName}`;
file.url = getFileAccessHttpUrl(reUrl); file.url = getFileAccessHttpUrl(reUrl);
} }
return file; return file;
@@ -290,7 +264,7 @@
if(fileList[a].status === 'done' ) { if(fileList[a].status === 'done' ) {
var fileJson = { var fileJson = {
fileName:fileList[a].name, fileName:fileList[a].name,
filePath:fileList[a].response.message, filePath:fileList[a].url,
fileSize:fileList[a].size fileSize:fileList[a].size
}; };
this.newFileList.push(fileJson); this.newFileList.push(fileJson);
@@ -307,12 +281,16 @@
//如有需要新增 删除逻辑 //如有需要新增 删除逻辑
console.log(file) console.log(file)
}, },
handlePreview(file){ handlePreview(file) {
if(this.fileType === FILE_TYPE_IMG){ if(this.fileType === FILE_TYPE_IMG){
this.previewImage = file.url || file.thumbUrl; this.previewImage = file.url || file.thumbUrl;
this.previewVisible = true; this.previewVisible = true;
}else{ }else{
location.href=file.url if (file && file.url) {
var fileFullUrl = `${window._CONFIG['domianWebSocketURL']}/sys/common/download/${file.response.result.id}?token=${Vue.ls.get(ACCESS_TOKEN)}&fullfilename=${file.name}`
let url = `${window._CONFIG['onlinePreviewDomainURL']}?url=${encodeURIComponent(Base64.encode(fileFullUrl))}`
window.open(url)
}
} }
}, },
handleCancel(){ handleCancel(){
@@ -320,20 +298,17 @@
}, },
//---------------------------- begin 图片左右换位置 ------------------------------------- //---------------------------- begin 图片左右换位置 -------------------------------------
moveLast(){ moveLast(){
//console.log(ev)
//console.log(this.fileList)
//console.log(this.currentImg)
let index = this.getIndexByUrl(); let index = this.getIndexByUrl();
if(index==0){ if(index == 0){
this.$message.warn('未知的操作') this.$message.warn('未知的操作')
}else{ }else{
let curr = this.fileList[index].url; let curr = this.fileList[index].url;
let last = this.fileList[index-1].url; let last = this.fileList[index-1].url;
let arr =[] let arr =[]
for(let i=0;i<this.fileList.length;i++){ for(let i=0;i<this.fileList.length;i++){
if(i==index-1){ if(i == index-1){
arr.push(curr) arr.push(curr)
}else if(i==index){ }else if(i == index){
arr.push(last) arr.push(last)
}else{ }else{
arr.push(this.fileList[i].url) arr.push(this.fileList[i].url)
@@ -345,16 +320,16 @@
}, },
moveNext(){ moveNext(){
let index = this.getIndexByUrl(); let index = this.getIndexByUrl();
if(index==this.fileList.length-1){ if(index == this.fileList.length-1){
this.$message.warn('已到最后~') this.$message.warn('已到最后~')
}else{ }else{
let curr = this.fileList[index].url; let curr = this.fileList[index].url;
let next = this.fileList[index+1].url; let next = this.fileList[index+1].url;
let arr =[] let arr =[]
for(let i=0;i<this.fileList.length;i++){ for(let i=0;i<this.fileList.length;i++){
if(i==index+1){ if(i === index+1){
arr.push(curr) arr.push(curr)
}else if(i==index){ }else if(i == index){
arr.push(next) arr.push(next)
}else{ }else{
arr.push(this.fileList[i].url) arr.push(this.fileList[i].url)
@@ -366,7 +341,7 @@
}, },
getIndexByUrl(){ getIndexByUrl(){
for(let i=0;i<this.fileList.length;i++){ for(let i=0;i<this.fileList.length;i++){
if(this.fileList[i].url === this.currentImg || encodeURI(this.fileList[i].url) === this.currentImg){ if(this.fileList[i].url == this.currentImg || encodeURI(this.fileList[i].url) == this.currentImg){
return i; return i;
} }
} }
@@ -390,7 +365,7 @@
picList[0].addEventListener('mouseover',(ev)=>{ picList[0].addEventListener('mouseover',(ev)=>{
ev = ev || window.event; ev = ev || window.event;
let target = ev.target || ev.srcElement; let target = ev.target || ev.srcElement;
if('ant-upload-list-item-info' == target.className){ if('ant-upload-list-item-info' === target.className){
this.showMoverTask=false this.showMoverTask=false
let item = target.parentElement let item = target.parentElement
this.left = item.offsetLeft this.left = item.offsetLeft
@@ -405,14 +380,14 @@
ev = ev || window.event; ev = ev || window.event;
let target = ev.target || ev.srcElement; let target = ev.target || ev.srcElement;
//console.log('移除',target) //console.log('移除',target)
if('ant-upload-list-item-info' == target.className){ if('ant-upload-list-item-info' === target.className){
this.showMoverTask=true this.showMoverTask=true
setTimeout(()=>{ setTimeout(()=>{
if(this.moverHold === false) if(this.moverHold === false)
this.moveDisplay = 'none'; this.moveDisplay = 'none';
},100) },100)
} }
if('ant-upload-list-item ant-upload-list-item-done' == target.className || 'ant-upload-list ant-upload-list-picture-card'== target.className){ if('ant-upload-list-item ant-upload-list-item-done' === target.className || 'ant-upload-list ant-upload-list-picture-card'=== target.className){
this.moveDisplay = 'none'; this.moveDisplay = 'none';
} }
}) })
@@ -88,7 +88,6 @@
//返回字段不为id时,根据返回字段获取id //返回字段不为id时,根据返回字段获取id
if(this.customReturnField !== 'id' && this.value){ if(this.customReturnField !== 'id' && this.value){
const dataList = this.$refs.innerDepartSelectModal.dataList; const dataList = this.$refs.innerDepartSelectModal.dataList;
console.log('this.value',this.value)
this.departIds = this.value.split(',').map(item => { this.departIds = this.value.split(',').map(item => {
const data = dataList.filter(d=>d[this.customReturnField] === item) const data = dataList.filter(d=>d[this.customReturnField] === item)
return data.length > 0 ? data[0].id : '' return data.length > 0 ? data[0].id : ''
@@ -31,9 +31,6 @@
{ title: '角色编码', dataIndex: 'roleCode', align: 'center', width: 120 } { title: '角色编码', dataIndex: 'roleCode', align: 'center', width: 120 }
] ]
} }
},
created(){
console.log(this.$attrs)
} }
} }
</script> </script>
@@ -17,17 +17,13 @@
//update-begin--Author:scott Date:20201015 for:路由缓存问题,关闭了tab页时再打开就不刷新 #842 //update-begin--Author:scott Date:20201015 for:路由缓存问题,关闭了tab页时再打开就不刷新 #842
includedComponents() { includedComponents() {
const includedRouters = Vue.ls.get(CACHE_INCLUDED_ROUTES) const includedRouters = Vue.ls.get(CACHE_INCLUDED_ROUTES)
console.log("includedRouters" + includedRouters)
//如果是缓存路由,则加入到 cache_included_routes //如果是缓存路由,则加入到 cache_included_routes
if (this.$route.meta.keepAlive && this.$route.meta.componentName) { if (this.$route.meta.keepAlive && this.$route.meta.componentName) {
let cacheRouterArray = Vue.ls.get(CACHE_INCLUDED_ROUTES) || [] let cacheRouterArray = Vue.ls.get(CACHE_INCLUDED_ROUTES) || []
if(!cacheRouterArray.includes(this.$route.meta.componentName)){ if(!cacheRouterArray.includes(this.$route.meta.componentName)){
cacheRouterArray.push(this.$route.meta.componentName) cacheRouterArray.push(this.$route.meta.componentName)
// cacheRouterArray.push("OnlCgformHeadList") // cacheRouterArray.push("OnlCgformHeadList")
console.log("Vue ls set componentName " + this.$route.meta.componentName)
Vue.ls.set(CACHE_INCLUDED_ROUTES, cacheRouterArray) Vue.ls.set(CACHE_INCLUDED_ROUTES, cacheRouterArray)
console.log("Vue ls includedRouterArrays " + Vue.ls.get(CACHE_INCLUDED_ROUTES))
return cacheRouterArray; return cacheRouterArray;
} }
} }
+1 -2
View File
@@ -54,7 +54,6 @@ export const JeroListMixin = {
}, },
created() { created() {
if(!this.disableMixinCreated){ if(!this.disableMixinCreated){
console.log(' -- mixin created -- ')
this.loadData(); this.loadData();
//初始化字典配置 在自己页面定义 //初始化字典配置 在自己页面定义
this.initDictConfig(); this.initDictConfig();
@@ -102,7 +101,7 @@ export const JeroListMixin = {
}) })
}, },
initDictConfig(){ initDictConfig(){
console.log("--这是一个假的方法!")
}, },
handleSuperQuery(params, matchType) { handleSuperQuery(params, matchType) {
//高级查询方法 //高级查询方法
-2
View File
@@ -22,9 +22,7 @@ router.beforeEach((to, from, next) => {
} else { } else {
if (store.getters.permissionList.length === 0) { if (store.getters.permissionList.length === 0) {
store.dispatch('GetPermissionList').then(res => { store.dispatch('GetPermissionList').then(res => {
// console.log(res)
const menuData = res.result.menu; const menuData = res.result.menu;
//console.log(res.message)
if (menuData === null || menuData === "" || menuData === undefined) { if (menuData === null || menuData === "" || menuData === undefined) {
return; return;
} }
-4
View File
@@ -60,17 +60,14 @@ const permission = {
SET_ROUTERS: (state, data) => { SET_ROUTERS: (state, data) => {
state.addRouters = data state.addRouters = data
state.routers = constantRouterMap.concat(data) state.routers = constantRouterMap.concat(data)
//console.log('-----mutations---SET_ROUTERS----', data)
} }
}, },
actions: { actions: {
GenerateRoutes({ commit }, data) { GenerateRoutes({ commit }, data) {
return new Promise(resolve => { return new Promise(resolve => {
const { roles } = data const { roles } = data
console.log('-----mutations---data----', data)
let accessedRouters let accessedRouters
accessedRouters = filterAsyncRouter(asyncRouterMap, roles) accessedRouters = filterAsyncRouter(asyncRouterMap, roles)
console.log('-----mutations---accessedRouters----', accessedRouters)
commit('SET_ROUTERS', accessedRouters) commit('SET_ROUTERS', accessedRouters)
resolve() resolve()
}) })
@@ -80,7 +77,6 @@ const permission = {
return new Promise(resolve => { return new Promise(resolve => {
//const [ roles ] = routes.constRoutes //const [ roles ] = routes.constRoutes
let routelist = routes.constRoutes; let routelist = routes.constRoutes;
console.log(routelist)
commit('SET_ROUTERS', routelist) commit('SET_ROUTERS', routelist)
resolve() resolve()
}) })
-1
View File
@@ -22,7 +22,6 @@ Vue.filter('ellipsis', function (value, vlength = 25) {
if(!value){ if(!value){
return ""; return "";
} }
console.log('vlength: '+ vlength);
if (value.length > vlength) { if (value.length > vlength) {
return value.slice(0, vlength) + '...' return value.slice(0, vlength) + '...'
} }
-2
View File
@@ -2,7 +2,6 @@ import { USER_AUTH,SYS_BUTTON_AUTH } from "@/store/mutation-types"
const hasPermission = { const hasPermission = {
install (Vue, options) { install (Vue, options) {
//console.log(options);
Vue.directive('has', { Vue.directive('has', {
inserted: (el, binding, vnode)=>{ inserted: (el, binding, vnode)=>{
console.log("页面权限控制----"); console.log("页面权限控制----");
@@ -11,7 +10,6 @@ const hasPermission = {
if(!filterNodePermission(el, binding, vnode)){ if(!filterNodePermission(el, binding, vnode)){
filterGlobalPermission(el, binding, vnode); filterGlobalPermission(el, binding, vnode);
} }
//console.timeEnd() //计时结束并输出时长
} }
}); });
} }
+5 -14
View File
@@ -178,7 +178,7 @@
<a-row :gutter="24"> <a-row :gutter="24">
<a-col :span="12"> <a-col :span="12">
<a-form-item label="过长剪切"> <a-form-item label="过长剪切">
<j-ellipsis :value="jellipsis.value" :length="20" @text-change="selectChange"/> <j-ellipsis :value="jellipsis.value" :length="20"/>
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :span="12">过长剪切:{{ jellipsis.value }}</a-col> <a-col :span="12">过长剪切:{{ jellipsis.value }}</a-col>
@@ -198,7 +198,7 @@
<a-row :gutter="24"> <a-row :gutter="24">
<a-col :span="12"> <a-col :span="12">
<a-form-item label="多选下拉框"> <a-form-item label="多选下拉框">
<j-select-multiple v-model="jselectMultiple.value" :options="jselectMultiple.options" @change="selectChange"/> <j-select-multiple v-model="jselectMultiple.value" :options="jselectMultiple.options"/>
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :span="12">多选下拉框(v-model){{ jselectMultiple.value }}</a-col> <a-col :span="12">多选下拉框(v-model){{ jselectMultiple.value }}</a-col>
@@ -331,7 +331,7 @@
<a-row :gutter="24"> <a-row :gutter="24">
<a-col :span="12"> <a-col :span="12">
<a-form-item label="图片上传"> <a-form-item label="图片上传">
<j-image-upload v-model="imgList" title="22"></j-image-upload> <j-image-upload v-model="imgList" :isMultiple="true"></j-image-upload>
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :span="12">选中的值(v-model){{ imgList }}</a-col> <a-col :span="12">选中的值(v-model){{ imgList }}</a-col>
@@ -339,7 +339,7 @@
<a-row :gutter="24" style="margin-top: 65px;margin-bottom:50px;"> <a-row :gutter="24" style="margin-top: 65px;margin-bottom:50px;">
<a-col :span="12"> <a-col :span="12">
<a-form-item label="文件上传"> <a-form-item label="文件上传">
<j-upload v-model="fileList" title="ddd" :multiple="true"></j-upload> <j-upload v-model="fileList" :multiple="true" :fileType="'image'"></j-upload>
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :span="12"> <a-col :span="12">
@@ -598,9 +598,6 @@ sayHi('hello, world!')`
], ],
} }
}, },
created(){
console.log(this.formData.jInput)
},
computed: { computed: {
nameList: function() { nameList: function() {
@@ -612,12 +609,6 @@ sayHi('hello, world!')`
} }
}, },
methods: { methods: {
as(){
this.ss = true
},
selectChange(){
console.log("ok")
},
getDepartIdValue() { getDepartIdValue() {
return this.form.getFieldValue('departId') return this.form.getFieldValue('departId')
}, },
@@ -625,7 +616,7 @@ sayHi('hello, world!')`
return this.form.getFieldValue('orgCodes') return this.form.getFieldValue('orgCodes')
}, },
changeMe() { changeMe() {
console.log('you so ... , change Me')
}, },
selectOK: function(data) { selectOK: function(data) {
this.selectList = data this.selectList = data
@@ -106,7 +106,6 @@
if(res.success){ if(res.success){
let formData = {userId:res.result, let formData = {userId:res.result,
departIdList:this.departList} departIdList:this.departList}
console.log(formData)
that.$emit('ok', formData); that.$emit('ok', formData);
} }
}).finally(() => { }).finally(() => {
@@ -117,7 +116,6 @@
}else { }else {
let formData = {userId:this.userId, let formData = {userId:this.userId,
departIdList:this.departList} departIdList:this.departList}
console.log(formData)
that.departList = []; that.departList = [];
that.$emit('ok', formData); that.$emit('ok', formData);
that.confirmLoading = false; that.confirmLoading = false;
@@ -143,7 +141,6 @@
depart.title = de.title; depart.title = de.title;
this.departList.push(depart); this.departList.push(depart);
} }
console.log('onCheck', checkedKeys, info);
}, },
queryDepartTree(){ queryDepartTree(){
queryIdTree().then((res)=>{ queryIdTree().then((res)=>{
@@ -236,8 +236,6 @@
var that = this; var that = this;
queryTreeList().then((res)=>{ queryTreeList().then((res)=>{
if(res.success){ if(res.success){
console.log('----queryTreeList---')
console.log(res)
that.treeData = []; that.treeData = [];
let treeList = res.result.treeList let treeList = res.result.treeList
for(let a=0;a<treeList.length;a++){ for(let a=0;a<treeList.length;a++){
@@ -258,7 +256,6 @@
this.model = Object.assign({}, record); this.model = Object.assign({}, record);
//-------------------------------------------------------------------------------------------------- //--------------------------------------------------------------------------------------------------
//根据菜单类型,动态展示页面字段 //根据菜单类型,动态展示页面字段
console.log(record)
this.alwaysShow = !record.alwaysShow?false:true; this.alwaysShow = !record.alwaysShow?false:true;
this.menuHidden = !record.hidden?false:true; this.menuHidden = !record.hidden?false:true;
@@ -281,7 +278,6 @@
/*update_end author:wuxianquan date:20190908 for:编辑初始化数据*/ /*update_end author:wuxianquan date:20190908 for:编辑初始化数据*/
//console.log('record.menuType', record.menuType);
this.show = record.menuType==2?false:true; this.show = record.menuType==2?false:true;
this.menuLabel = record.menuType==2?'按钮/权限':'菜单名称'; this.menuLabel = record.menuType==2?'按钮/权限':'菜单名称';
@@ -326,7 +322,6 @@
that.validateStatus = 'success'; that.validateStatus = 'success';
} }
that.confirmLoading = true; that.confirmLoading = true;
console.log(formData);
let obj; let obj;
if (!this.model.id) { if (!this.model.id) {
obj = addPermission(formData); obj = addPermission(formData);
@@ -378,7 +373,6 @@
} }
}, },
onChangeMenuType(e) { onChangeMenuType(e) {
//console.log('localMenuType checked', e.target.value)
this.localMenuType=e.target.value this.localMenuType=e.target.value
if(e.target.value == 2){ if(e.target.value == 2){
this.show = false; this.show = false;
@@ -398,7 +392,6 @@
this.iconChooseVisible = false this.iconChooseVisible = false
}, },
handleIconChoose (value) { handleIconChoose (value) {
console.log(value)
this.model.icon = value this.model.icon = value
this.form.icon = value this.form.icon = value
this.iconChooseVisible = false this.iconChooseVisible = false