提交 87f9f8f2 authored 作者: Ras's avatar Ras

对过滤条件进行更新,金蝶错误原因提醒

上级 ab64c2d8
......@@ -126,5 +126,10 @@
"> 1%",
"last 2 versions",
"not ie <= 10"
]
],
"keywords": [],
"author": "",
"license": "ISC",
"description": ""
}
......@@ -9,22 +9,21 @@ import Vue from 'vue'
*/
export function httpGroupRequest(getPromise, groupId, expire = 1000 * 30) {
if (groupId == null || groupId === '') {
console.log("--------popup----------getFrom DB-------with---no--groupId ")
console.log('--------popup----------getFrom DB-------with---no--groupId ')
return getPromise()
}
if (Vue.ls.get(groupId)) {
console.log("---------popup--------getFrom Cache--------groupId = " + groupId)
return Promise.resolve(Vue.ls.get(groupId));
console.log('---------popup--------getFrom Cache--------groupId = ' + groupId)
return Promise.resolve(Vue.ls.get(groupId))
} else {
console.log("--------popup----------getFrom DB---------groupId = " + groupId)
console.log('--------popup----------getFrom DB---------groupId = ' + groupId)
}
// 还没有发出请求,就发出第一次的请求
return getPromise().then(res => {
Vue.ls.set(groupId, res, expire);
return Promise.resolve(res);
Vue.ls.set(groupId, res, expire)
return Promise.resolve(res)
})
}
差异被折叠。
const api = {
Login: '/sys/login',
Logout: '/sys/logout',
ForgePassword: '/auth/forge-password',
Register: '/auth/register',
SendSms: '/account/sms',
// get my info
UserInfo: '/user/info'
Login: '/sys/login',
Logout: '/sys/logout',
ForgePassword: '/auth/forge-password',
Register: '/auth/register',
SendSms: '/account/sms',
// get my info
UserInfo: '/user/info'
}
export default api
\ No newline at end of file
export default api
......@@ -52,7 +52,7 @@ export function logout(logoutToken) {
method: 'post',
headers: {
'Content-Type': 'application/json;charset=UTF-8',
'X-Access-Token': logoutToken
'X-Access-Token': logoutToken
}
})
}
......@@ -70,4 +70,4 @@ export function thirdLogin(token) {
'Content-Type': 'application/json;charset=UTF-8'
}
})
}
\ No newline at end of file
}
......@@ -6,40 +6,68 @@ const api = {
role: '/api/role',
service: '/api/service',
permission: '/api/permission',
permissionNoPager: '/api/permission/no-pager'
permissionNoPager: '/api/permission/no-pager',
Integrate: '/common/syn/list'
}
export default api
//post
export function postAction(url,parameter) {
// 通用配置
// get
export function getIntegrate(parameter) {
return axios({
url: api.Integrate,
method: 'get',
params: parameter
})
}
// post | put
export function addIntegrate(url, parameter, method) {
return axios({
url: url,
method: method,
data: parameter
})
}
export function deleteIntegrate(url, parameter) {
return axios({
url: url,
method:'post' ,
params: parameter
})
}
// post
export function postAction(url, parameter) {
return axios({
url: url,
method: 'post',
data: parameter
})
}
//post method= {post | put}
export function httpAction(url,parameter,method) {
export function httpAction(url, parameter, method) {
return axios({
url: url,
method:method ,
method: method,
data: parameter
})
}
//put
export function putAction(url,parameter) {
export function putAction(url, parameter) {
return axios({
url: url,
method:'put',
method: 'put',
data: parameter
})
}
//get
export function getAction(url,parameter) {
export function getAction(url, parameter) {
return axios({
url: url,
method: 'get',
......@@ -48,17 +76,17 @@ export function getAction(url,parameter) {
}
//getR
export function getRAction(url,param) {
export function getRAction(url, param) {
return axios({
url: url,
method: 'get',
params:param
params: param
})
}
//deleteAction
export function deleteAction(url,parameter) {
return axios({
export function deleteAction(url, parameter) {
return axios({
url: url,
method: 'delete',
params: parameter
......@@ -113,11 +141,11 @@ export function saveService(parameter) {
* @param parameter
* @returns {*}
*/
export function downFile(url,parameter){
export function downFile(url, parameter) {
return axios({
url: url,
params: parameter,
method:'get' ,
method: 'get',
responseType: 'blob'
})
}
......@@ -130,7 +158,7 @@ export function downFile(url,parameter){
* @returns {*}
*/
export function downloadFile(url, fileName, parameter) {
return downFile(url, parameter).then((data) => {
return downFile(url, parameter).then(data => {
if (!data || data.size === 0) {
Vue.prototype['$message'].warning('文件下载失败')
return
......@@ -157,14 +185,14 @@ export function downloadFile(url, fileName, parameter) {
* @param parameter
* @returns {*}
*/
export function uploadAction(url,parameter){
export function uploadAction(url, parameter) {
return axios({
url: url,
data: parameter,
method:'post' ,
method: 'post',
headers: {
'Content-Type': 'multipart/form-data', // 文件上传
},
'Content-Type': 'multipart/form-data' // 文件上传
}
})
}
......@@ -174,17 +202,18 @@ export function uploadAction(url,parameter){
* @param subStr
* @returns {*}
*/
export function getFileAccessHttpUrl(avatar,subStr) {
if(!subStr) subStr = 'http'
export function getFileAccessHttpUrl(avatar, subStr) {
if (!subStr) subStr = 'http'
try {
if(avatar && avatar.startsWith(subStr)){
return avatar;
}else{
if(avatar && avatar.length>0 && avatar.indexOf('[')==-1){
return window._CONFIG['staticDomainURL'] + "/" + avatar;
if (avatar && avatar.startsWith(subStr)) {
return avatar
} else {
if (avatar && avatar.length > 0 && avatar.indexOf('[') == -1) {
return window._CONFIG['staticDomainURL'] + '/' + avatar
}
}
}catch(err){
return;
} catch (err) {
return
}
}
......@@ -58,4 +58,9 @@
}
/**隐藏样式-modal确定按钮 */
.jee-hidden{display: none}
\ No newline at end of file
.jee-hidden{display: none}
/* 时间框的宽度设置 */
.ant-col-6 {
width: 27.166667%;
}
\ No newline at end of file
<template>
<div :class="[prefixCls, reverseColor && 'reverse-color' ]">
<div :class="[prefixCls, reverseColor && 'reverse-color']">
<span>
<slot name="term"></slot>
<span class="item-text">
......@@ -11,31 +11,31 @@
</template>
<script>
export default {
name: "Trend",
props: {
prefixCls: {
type: String,
default: 'ant-pro-trend'
},
/**
* 上升下降标识:up|down
*/
flag: {
type: String,
required: true
},
/**
* 颜色反转
*/
reverseColor: {
type: Boolean,
default: false
}
export default {
name: 'Trend',
props: {
prefixCls: {
type: String,
default: 'ant-pro-trend'
},
/**
* 上升下降标识:up|down
*/
flag: {
type: String,
required: true
},
/**
* 颜色反转
*/
reverseColor: {
type: Boolean,
default: false
}
}
}
</script>
<style lang="less" scoped>
@import "index";
</style>
\ No newline at end of file
@import 'index';
</style>
......@@ -5,12 +5,9 @@
</template>
<script>
export default {
name: "BlankLayout",
}
export default {
name: 'BlankLayout'
}
</script>
<style scoped>
</style>
\ No newline at end of file
<style scoped></style>
<template>
<iframe :id="id" :src="url" frameborder="0" width="100%" height="800px" scrolling="auto"></iframe>
<iframe :id="id" :src="url" frameborder="0" width="100%" height="800px" scrolling="auto"></iframe>
</template>
<script>
import Vue from 'vue'
import { ACCESS_TOKEN } from "@/store/mutation-types"
import PageLayout from '../page/PageLayout'
import RouteView from './RouteView'
import Vue from 'vue'
import { ACCESS_TOKEN } from '@/store/mutation-types'
import PageLayout from '../page/PageLayout'
import RouteView from './RouteView'
export default {
name: "IframePageContent",
inject:['closeCurrent'],
data () {
return {
url: "",
id:""
}
},
created () {
this.goUrl()
},
updated () {
export default {
name: 'IframePageContent',
inject: ['closeCurrent'],
data() {
return {
url: '',
id: ''
}
},
created() {
this.goUrl()
},
updated() {
this.goUrl()
},
watch: {
$route(to, from) {
this.goUrl()
},
watch: {
$route(to, from) {
this.goUrl();
}
},
methods: {
goUrl () {
let url = this.$route.meta.url
let id = this.$route.path
this.id = id
//url = "http://www.baidu.com"
console.log("------url------"+url)
if (url !== null && url !== undefined) {
this.url = url;
/*update_begin author:wuxianquan date:20190908 for:判断打开方式,新窗口打开时this.$route.meta.internalOrExternal==true */
if(this.$route.meta.internalOrExternal != undefined && this.$route.meta.internalOrExternal==true){
this.closeCurrent();
//外部url加入token
let tokenStr = "${token}";
if(url.indexOf(tokenStr)!=-1){
let token = Vue.ls.get(ACCESS_TOKEN);
this.url = url.replace(tokenStr,token);
}
window.open(this.url);
}
},
methods: {
goUrl() {
let url = this.$route.meta.url
let id = this.$route.path
this.id = id
//url = "http://www.baidu.com"
console.log('------url------' + url)
if (url !== null && url !== undefined) {
this.url = url
/*update_begin author:wuxianquan date:20190908 for:判断打开方式,新窗口打开时this.$route.meta.internalOrExternal==true */
if (this.$route.meta.internalOrExternal != undefined && this.$route.meta.internalOrExternal == true) {
this.closeCurrent()
//外部url加入token
let tokenStr = '${token}'
if (url.indexOf(tokenStr) != -1) {
let token = Vue.ls.get(ACCESS_TOKEN)
this.url = url.replace(tokenStr, token)
}
/*update_end author:wuxianquan date:20190908 for:判断打开方式,新窗口打开时this.$route.meta.internalOrExternal==true */
window.open(this.url)
}
/*update_end author:wuxianquan date:20190908 for:判断打开方式,新窗口打开时this.$route.meta.internalOrExternal==true */
}
}
}
}
</script>
<style>
</style>
\ No newline at end of file
<style></style>
<template>
<page-layout :desc="description" :title="getTitle" :link-list="linkList" :search="search" :tabs="tabs">
<div slot="extra" class="extra-img">
<img :src="extraImage"/>
<img :src="extraImage" />
</div>
<!-- keep-alive -->
<route-view ref="content"></route-view>
......@@ -9,77 +9,75 @@
</template>
<script>
import PageLayout from '../page/PageLayout'
import RouteView from './RouteView'
import PageLayout from '../page/PageLayout'
import RouteView from './RouteView'
export default {
name: "PageContent",
components: {
RouteView,
PageLayout
},
data () {
return {
title: '',
description: '',
linkList: [],
extraImage: '',
search: false,
tabs: {}
}
},
mounted () {
this.getPageHeaderInfo()
},
updated () {
this.getPageHeaderInfo()
},
computed: {
getTitle () {
return this.$route.meta.title
}
},
methods: {
getPageHeaderInfo () {
// eslint-disable-next-line
this.title = this.$route.meta.title
// 因为套用了一层 route-view 所以要取 ref 对象下的子节点的第一个对象
const content = this.$refs.content && this.$refs.content.$children[0]
export default {
name: 'PageContent',
components: {
RouteView,
PageLayout
},
data() {
return {
title: '',
description: '',
linkList: [],
extraImage: '',
search: false,
tabs: {}
}
},
mounted() {
this.getPageHeaderInfo()
},
updated() {
this.getPageHeaderInfo()
},
computed: {
getTitle() {
return this.$route.meta.title
}
},
methods: {
getPageHeaderInfo() {
// eslint-disable-next-line
this.title = this.$route.meta.title
// 因为套用了一层 route-view 所以要取 ref 对象下的子节点的第一个对象
const content = this.$refs.content && this.$refs.content.$children[0]
if (content) {
this.description = content.description
this.linkList = content.linkList
this.extraImage = content.extraImage
this.search = content.search == true ? true : false
this.tabs = content.tabs
}
if (content) {
this.description = content.description
this.linkList = content.linkList
this.extraImage = content.extraImage
this.search = content.search == true ? true : false
this.tabs = content.tabs
}
}
}
}
</script>
<style lang="less" scoped>
.extra-img {
margin-top: -60px;
text-align: center;
width: 195px;
img {
width: 100%;
}
}
.mobile {
.extra-img {
margin-top: -60px;
margin-top: 0;
text-align: center;
width: 195px;
width: 96px;
img {
width: 100%;
}
}
.mobile {
.extra-img{
margin-top: 0;
text-align: center;
width: 96px;
img{
width: 100%;
}
}
}
</style>
\ No newline at end of file
}
</style>
<template>
<div class="main">
<keep-alive>
<router-view v-if="keepAlive" />
</keep-alive>
<router-view v-if="!keepAlive" />
<keep-alive>
<router-view v-if="keepAlive" />
</keep-alive>
<router-view v-if="!keepAlive" />
</div>
</template>
<script>
export default {
name: "RouteView",
computed: {
keepAlive () {
return this.$route.meta.keepAlive
}
},
export default {
name: 'RouteView',
computed: {
keepAlive() {
return this.$route.meta.keepAlive
}
}
</script>
\ No newline at end of file
}
</script>
<template>
<a-modal
:title="currTitle"
:width="450"
:visible="visible"
:closable="false"
:maskClosable="closable">
<a-modal :title="currTitle" :width="450" :visible="visible" :closable="false" :maskClosable="closable">
<template slot="footer">
<a-button v-if="closable" @click="close">关闭</a-button>
<a-button type="primary" @click="departOk">确认</a-button>
......@@ -12,151 +7,149 @@
<a-form>
<a-form-item
:labelCol="{span:4}"
:wrapperCol="{span:20}"
:labelCol="{ span: 4 }"
:wrapperCol="{ span: 20 }"
style="margin-bottom:10px"
:validate-status="validate_status">
<a-tooltip placement="topLeft" >
:validate-status="validate_status"
>
<a-tooltip placement="topLeft">
<template slot="title">
<span>您隶属于多部门,请选择当前所在部门</span>
</template>
<a-avatar style="backgroundColor:#87d068" icon="gold" />
</a-tooltip>
<a-select v-model="departSelected" :class="{'valid-error':validate_status=='error'}" placeholder="请选择登录部门" style="margin-left:10px;width: 80%">
<a-select
v-model="departSelected"
:class="{ 'valid-error': validate_status == 'error' }"
placeholder="请选择登录部门"
style="margin-left:10px;width: 80%"
>
<a-icon slot="suffixIcon" type="gold" />
<a-select-option
v-for="d in departList"
:key="d.id"
:value="d.orgCode">
<a-select-option v-for="d in departList" :key="d.id" :value="d.orgCode">
{{ d.departName }}
</a-select-option>
</a-select>
</a-form-item>
</a-form>
</a-modal>
</template>
<script>
import { getAction,putAction } from '@/api/manage'
import Vue from 'vue'
import store from '@/store/'
import { USER_INFO } from "@/store/mutation-types"
import { getAction, putAction } from '@/api/manage'
import Vue from 'vue'
import store from '@/store/'
import { USER_INFO } from '@/store/mutation-types'
export default {
name: 'DepartSelect',
props:{
title:{
type:String,
default:"部门选择",
required:false
},
closable:{
type:Boolean,
default:false,
required:false
},
username:{
type:String,
default:"",
required:false
}
export default {
name: 'DepartSelect',
props: {
title: {
type: String,
default: '部门选择',
required: false
},
watch:{
username(val){
if(val){
this.loadDepartList()
}
}
closable: {
type: Boolean,
default: false,
required: false
},
data(){
return {
currTitle:this.title,
visible:false,
departList:[],
departSelected:"",
validate_status:"",
currDepartName:"",
username: {
type: String,
default: '',
required: false
}
},
watch: {
username(val) {
if (val) {
this.loadDepartList()
}
},
created(){
//this.loadDepartList()
},
methods:{
loadDepartList(){
return new Promise(resolve => {
let url = "/sys/user/getCurrentUserDeparts"
this.currDepartName=''
getAction(url).then(res=>{
if(res.success){
let departs = res.result.list
let orgCode = res.result.orgCode
if(departs && departs.length>0){
for(let i of departs){
if(i.orgCode == orgCode){
this.currDepartName = i.departName
break
}
}
},
data() {
return {
currTitle: this.title,
visible: false,
departList: [],
departSelected: '',
validate_status: '',
currDepartName: ''
}
},
created() {
//this.loadDepartList()
},
methods: {
loadDepartList() {
return new Promise(resolve => {
let url = '/sys/user/getCurrentUserDeparts'
this.currDepartName = ''
getAction(url).then(res => {
if (res.success) {
let departs = res.result.list
let orgCode = res.result.orgCode
if (departs && departs.length > 0) {
for (let i of departs) {
if (i.orgCode == orgCode) {
this.currDepartName = i.departName
break
}
}
this.departSelected = orgCode
this.departList = departs
if(this.currDepartName){
this.currTitle ="部门切换(当前部门 : "+this.currDepartName+")"
}
}
resolve()
})
this.departSelected = orgCode
this.departList = departs
if (this.currDepartName) {
this.currTitle = '部门切换(当前部门 : ' + this.currDepartName + ')'
}
}
resolve()
})
},
close(){
this.departClear()
},
departOk(){
if(!this.departSelected){
this.validate_status='error'
return false
})
},
close() {
this.departClear()
},
departOk() {
if (!this.departSelected) {
this.validate_status = 'error'
return false
}
let obj = {
orgCode: this.departSelected,
username: this.username
}
putAction('/sys/selectDepart', obj).then(res => {
if (res.success) {
const userInfo = res.result.userInfo
Vue.ls.set(USER_INFO, userInfo, 7 * 24 * 60 * 60 * 1000)
store.commit('SET_INFO', userInfo)
//console.log("---切换组织机构---userInfo-------",store.getters.userInfo.orgCode);
this.departClear()
}
let obj = {
orgCode:this.departSelected,
username:this.username
})
},
show() {
//如果组件传值username此处就不用loadDepartList了
this.loadDepartList().then(() => {
this.visible = true
if (!this.departList || this.departList.length <= 0) {
this.$message.warning('您尚未设置部门信息!')
this.departClear()
}
putAction("/sys/selectDepart",obj).then(res=>{
if(res.success){
const userInfo = res.result.userInfo;
Vue.ls.set(USER_INFO, userInfo, 7 * 24 * 60 * 60 * 1000);
store.commit('SET_INFO', userInfo);
//console.log("---切换组织机构---userInfo-------",store.getters.userInfo.orgCode);
this.departClear()
}
})
},
show(){
//如果组件传值username此处就不用loadDepartList了
this.loadDepartList().then(()=>{
this.visible=true
if(!this.departList || this.departList.length<=0){
this.$message.warning("您尚未设置部门信息!")
this.departClear()
}
})
},
departClear(){
this.departList=[]
this.departSelected=""
this.visible=false
this.validate_status=''
this.currDepartName=""
},
})
},
departClear() {
this.departList = []
this.departSelected = ''
this.visible = false
this.validate_status = ''
this.currDepartName = ''
}
}
}
</script>
<style scoped>
.valid-error .ant-select-selection__placeholder{
color: #f5222d;
}
</style>
\ No newline at end of file
.valid-error .ant-select-selection__placeholder {
color: #f5222d;
}
</style>
<template>
<component
:is="comp"
:formData="formData"
ref="compModel"
v-if="comp">
</component>
<component :is="comp" :formData="formData" ref="compModel" v-if="comp"> </component>
</template>
<script>
export default {
name: 'DynamicNotice',
data () {
return {
compName: this.path
export default {
name: 'DynamicNotice',
data() {
return {
compName: this.path
}
},
computed: {
comp: function() {
if (!this.path) {
return null
}
},
computed: {
comp: function () {
if(!this.path){
return null;
return () => import(`@/views/${this.path}.vue`)
}
},
props: ['path', 'formData'],
methods: {
detail() {
setTimeout(() => {
if (this.path) {
this.$refs.compModel.view(this.formData)
}
return () => import(`@/views/${this.path}.vue`)
}
},
props: ['path','formData'],
methods: {
detail () {
setTimeout(() => {
if(this.path){
this.$refs.compModel.view(this.formData);
}
}, 200)
},
}, 200)
}
}
</script>
\ No newline at end of file
}
</script>
......@@ -5,7 +5,6 @@ import { UserLayout, TabLayout, RouteView, BlankLayout, PageView } from '@/compo
* @type {[null,null]}
*/
export const asyncRouterMap = [
{
path: '/',
name: 'dashboard',
......@@ -13,7 +12,6 @@ export const asyncRouterMap = [
meta: { title: '首页' },
redirect: '/dashboard/analysis',
children: [
// // dashboard
// {
// path: '/dashboard',
......@@ -285,7 +283,9 @@ export const asyncRouterMap = [
]
},
{
path: '*', redirect: '/404', hidden: true
path: '*',
redirect: '/404',
hidden: true
}
]
......@@ -319,7 +319,7 @@ export const constantRouterMap = [
path: 'alteration',
name: 'alteration',
component: () => import(/* webpackChunkName: "user" */ '@/views/user/Alteration')
},
}
]
},
......@@ -363,5 +363,4 @@ export const constantRouterMap = [
path: '/404',
component: () => import(/* webpackChunkName: "fail" */ '@/views/exception/404')
}
]
......@@ -4,13 +4,13 @@ import Storage from 'vue-ls'
import router from './router'
import store from './store/'
import { VueAxios } from "@/utils/request"
import { VueAxios } from '@/utils/request'
import Antd, { version } from 'ant-design-vue'
console.log('ant-design-vue version:', version)
import Viser from 'viser-vue'
import 'ant-design-vue/dist/antd.less'; // or 'ant-design-vue/dist/antd.less'
import 'ant-design-vue/dist/antd.less' // or 'ant-design-vue/dist/antd.less'
import '@/permission' // permission control
import '@/utils/filter' // base filter
......@@ -22,7 +22,6 @@ import 'vue-photo-preview/dist/skin.css'
require('@jeecg/antd-online-mini')
require('@jeecg/antd-online-mini/dist/OnlineForm.css')
import {
ACCESS_TOKEN,
DEFAULT_COLOR,
......@@ -35,12 +34,12 @@ import {
DEFAULT_FIXED_SIDEMENU,
DEFAULT_CONTENT_WIDTH_TYPE,
DEFAULT_MULTI_PAGE
} from "@/store/mutation-types"
} from '@/store/mutation-types'
import config from '@/defaultSettings'
import JDictSelectTag from './components/dict/index.js'
import hasPermission from '@/utils/hasPermission'
import vueBus from '@/utils/vueBus';
import vueBus from '@/utils/vueBus'
import JeecgComponents from '@/components/jeecg/index'
import '@/assets/less/JAreaLinkage.less'
import VueAreaLinkage from 'vue-area-linkage'
......@@ -51,10 +50,10 @@ import LQKFListFormView from './components/LQKForm/LQKFListFormView/index'
import LQKFormBuild from './components/LQKForm/LQKFormBuild/index'
import LQKFormItem from './components/LQKForm/LQKFormItem/index'
Vue.use(KFormDesign);
Vue.use(LQKFListFormView);
Vue.use(LQKFormBuild);
Vue.use(LQKFormItem);
Vue.use(KFormDesign)
Vue.use(LQKFListFormView)
Vue.use(LQKFormBuild)
Vue.use(LQKFormItem)
Vue.config.productionTip = false
Vue.use(Storage, config.storageOptions)
Vue.use(Antd)
......@@ -64,14 +63,14 @@ Vue.use(hasPermission)
Vue.use(JDictSelectTag)
Vue.use(Print)
Vue.use(preview)
Vue.use(vueBus);
Vue.use(JeecgComponents);
Vue.use(VueAreaLinkage);
Vue.use(vueBus)
Vue.use(JeecgComponents)
Vue.use(VueAreaLinkage)
new Vue({
router,
store,
mounted () {
mounted() {
store.commit('SET_SIDEBAR_TYPE', Vue.ls.get(SIDEBAR_TYPE, true))
store.commit('TOGGLE_THEME', Vue.ls.get(DEFAULT_THEME, config.navTheme))
store.commit('TOGGLE_LAYOUT_MODE', Vue.ls.get(DEFAULT_LAYOUT_MODE, config.layout))
......@@ -82,7 +81,7 @@ new Vue({
store.commit('TOGGLE_WEAK', Vue.ls.get(DEFAULT_COLOR_WEAK, config.colorWeak))
store.commit('TOGGLE_COLOR', Vue.ls.get(DEFAULT_COLOR, config.primaryColor))
store.commit('SET_TOKEN', Vue.ls.get(ACCESS_TOKEN))
store.commit('SET_MULTI_PAGE',Vue.ls.get(DEFAULT_MULTI_PAGE,config.multipage))
store.commit('SET_MULTI_PAGE', Vue.ls.get(DEFAULT_MULTI_PAGE, config.multipage))
},
render: h => h(App)
}).$mount('#app')
/**
*
*/
import { disabledAuthFilter } from "@/utils/authFilter"
import { disabledAuthFilter } from '@/utils/authFilter'
export const DisabledAuthFilterMixin = {
props: ['formData'],
data(){
return {
}
data() {
return {}
},
methods:{
isDisabledAuth(code){
return disabledAuthFilter(code,this.formData);
},
methods: {
isDisabledAuth(code) {
return disabledAuthFilter(code, this.formData)
}
}
}
\ No newline at end of file
}
......@@ -8,8 +8,7 @@ try {
Router.prototype.push = function push(location) {
return originalPush.call(this, location).catch(err => err)
}
} catch (e) {
}
} catch (e) {}
//update-end-author:taoyan date:20191011 for:TASK #3214 【优化】访问online功能测试 浏览器控制台抛出异常
Vue.use(Router)
......@@ -19,4 +18,4 @@ export default new Router({
base: process.env.BASE_URL,
scrollBehavior: () => ({ y: 0 }),
routes: constantRouterMap
})
\ No newline at end of file
})
const VueAxios = {
vm: {},
// eslint-disable-next-line no-unused-vars
install(Vue, router = {}, instance) {
if (this.installed) {
return;
}
this.installed = true;
vm: {},
// eslint-disable-next-line no-unused-vars
install(Vue, router = {}, instance) {
if (this.installed) {
return
}
this.installed = true
if (!instance) {
// eslint-disable-next-line no-console
console.error('You have to install axios');
return;
}
if (!instance) {
// eslint-disable-next-line no-console
console.error('You have to install axios')
return
}
Vue.axios = instance;
Vue.axios = instance
Object.defineProperties(Vue.prototype, {
axios: {
get: function get() {
return instance;
}
},
$http: {
get: function get() {
return instance;
}
}
});
}
};
Object.defineProperties(Vue.prototype, {
axios: {
get: function get() {
return instance
}
},
$http: {
get: function get() {
return instance
}
}
})
}
}
export {
VueAxios,
// eslint-disable-next-line no-undef
//instance as axios
}
\ No newline at end of file
VueAxios
// eslint-disable-next-line no-undef
//instance as axios
}
......@@ -2,15 +2,15 @@ import Vue from 'vue'
import axios from 'axios'
import store from '@/store'
import { VueAxios } from './axios'
import {Modal, notification} from 'ant-design-vue'
import { ACCESS_TOKEN, TENANT_ID } from "@/store/mutation-types"
import { Modal, notification } from 'ant-design-vue'
import { ACCESS_TOKEN, TENANT_ID } from '@/store/mutation-types'
/**
* 【指定 axios的 baseURL】
* 则映射后端域名,通过 vue.config.js
* @type {*|string}
*/
let apiBaseUrl = window._CONFIG['domianURL'] || "/wmssystem";
let apiBaseUrl = window._CONFIG['domianURL'] || '/wmssystem'
//console.log("apiBaseUrl= ",apiBaseUrl)
// 创建 axios 实例
const service = axios.create({
......@@ -19,20 +19,20 @@ const service = axios.create({
timeout: 90000000000000 // 请求超时时间
})
const err = (error) => {
const err = error => {
if (error.response) {
let that=this;
let that = this
let data = error.response.data
const token = Vue.ls.get(ACCESS_TOKEN)
console.log("------异常响应------",token)
console.log("------异常响应------",error.response.status)
console.log('------异常响应------', token)
console.log('------异常响应------', error.response.status)
switch (error.response.status) {
case 403:
notification.error({ message: '系统提示', description: '拒绝访问',duration: 4})
notification.error({ message: '系统提示', description: '拒绝访问', duration: 4 })
break
case 500:
//notification.error({ message: '系统提示', description:'Token失效,请重新登录!',duration: 4})
if(token && data.message.includes("Token失效")){
if (token && data.message.includes('Token失效')) {
// update-begin- --- author:scott ------ date:20190225 ---- for:Token失效采用弹框模式,不直接跳转----
Modal.error({
title: '登录已过期',
......@@ -44,11 +44,11 @@ const err = (error) => {
Vue.ls.remove(ACCESS_TOKEN)
try {
let path = window.document.location.pathname
console.log("location pathname -> "+path)
if(path!="/" && path.indexOf('/user/login')==-1){
console.log('location pathname -> ' + path)
if (path != '/' && path.indexOf('/user/login') == -1) {
window.location.reload()
}
}catch (e) {
} catch (e) {
window.location.reload()
}
})
......@@ -58,13 +58,13 @@ const err = (error) => {
}
break
case 404:
notification.error({ message: '系统提示', description:'很抱歉,资源未找到!',duration: 4})
notification.error({ message: '系统提示', description: '很抱歉,资源未找到!', duration: 4 })
break
case 504:
notification.error({ message: '系统提示', description: '网络超时'})
notification.error({ message: '系统提示', description: '网络超时' })
break
case 401:
notification.error({ message: '系统提示', description:'未授权,请重新登录',duration: 4})
notification.error({ message: '系统提示', description: '未授权,请重新登录', duration: 4 })
if (token) {
store.dispatch('Logout').then(() => {
setTimeout(() => {
......@@ -83,47 +83,47 @@ const err = (error) => {
}
}
return Promise.reject(error)
};
}
// request interceptor
service.interceptors.request.use(config => {
const token = Vue.ls.get(ACCESS_TOKEN)
if (token) {
config.headers[ 'X-Access-Token' ] = token // 让每个请求携带自定义 token 请根据实际情况自行修改
}
//update-begin-author:taoyan date:2020707 for:多租户
let tenantid = Vue.ls.get(TENANT_ID)
if (!tenantid) {
tenantid = 0;
}
config.headers[ 'tenant_id' ] = tenantid
//update-end-author:taoyan date:2020707 for:多租户
if(config.method=='get'){
if(config.url.indexOf("sys/dict/getDictItems")<0){
config.params = {
_t: Date.parse(new Date())/1000,
...config.params
service.interceptors.request.use(
config => {
const token = Vue.ls.get(ACCESS_TOKEN)
if (token) {
config.headers['X-Access-Token'] = token // 让每个请求携带自定义 token 请根据实际情况自行修改
}
//update-begin-author:taoyan date:2020707 for:多租户
let tenantid = Vue.ls.get(TENANT_ID)
if (!tenantid) {
tenantid = 0
}
config.headers['tenant_id'] = tenantid
//update-end-author:taoyan date:2020707 for:多租户
if (config.method == 'get') {
if (config.url.indexOf('sys/dict/getDictItems') < 0) {
config.params = {
_t: Date.parse(new Date()) / 1000,
...config.params
}
}
}
return config
},
error => {
return Promise.reject(error)
}
return config
},(error) => {
return Promise.reject(error)
})
)
// response interceptor
service.interceptors.response.use((response) => {
return response.data
}, err)
service.interceptors.response.use(response => {
return response.data
}, err)
const installer = {
vm: {},
install (Vue, router = {}) {
install(Vue, router = {}) {
Vue.use(VueAxios, router, service)
}
}
export {
installer as VueAxios,
service as axios
}
\ No newline at end of file
export { installer as VueAxios, service as axios }
......@@ -5,7 +5,7 @@
<a-row :gutter="48">
<a-col :md="8" :sm="24">
<a-form-item label="角色ID">
<a-input placeholder="请输入"/>
<a-input placeholder="请输入" />
</a-form-item>
</a-col>
<a-col :md="8" :sm="24">
......@@ -27,18 +27,9 @@
</a-form>
</div>
<s-table
size="default"
:columns="columns"
:data="loadData"
>
<div
slot="expandedRowRender"
slot-scope="record"
style="margin: 0">
<a-row
:gutter="24"
:style="{ marginBottom: '12px' }">
<s-table size="default" :columns="columns" :data="loadData">
<div slot="expandedRowRender" slot-scope="record" style="margin: 0">
<a-row :gutter="24" :style="{ marginBottom: '12px' }">
<a-col :span="12" v-for="(role, index) in record.permissions" :key="index" :style="{ marginBottom: '12px' }">
<a-col :lg="4" :md="24">
<span>{{ role.permissionName }}</span>
......@@ -54,9 +45,7 @@
<a @click="handleEdit(record)">编辑</a>
<a-divider type="vertical" />
<a-dropdown>
<a class="ant-dropdown-link">
更多 <a-icon type="down" />
</a>
<a class="ant-dropdown-link"> 更多 <a-icon type="down" /> </a>
<a-menu slot="overlay">
<a-menu-item>
<a href="javascript:;">详情</a>
......@@ -72,15 +61,14 @@
</span>
</s-table>
<a-modal
title="操作"
style="top: 20px;"
:width="800"
v-model="visible"
@ok="handleOk"
>
<a-form :autoFormCreate="(form)=>{this.form = form}">
<a-modal title="操作" style="top: 20px;" :width="800" v-model="visible" @ok="handleOk">
<a-form
:autoFormCreate="
form => {
this.form = form
}
"
>
<a-form-item
:labelCol="labelCol"
:wrapperCol="wrapperCol"
......@@ -101,153 +89,131 @@
<a-input placeholder="起一个名字" v-model="mdl.name" id="role_name" />
</a-form-item>
<a-form-item
:labelCol="labelCol"
:wrapperCol="wrapperCol"
label="状态"
hasFeedback
validateStatus="warning"
>
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="状态" hasFeedback validateStatus="warning">
<a-select v-model="mdl.status">
<a-select-option value="1">正常</a-select-option>
<a-select-option value="2">禁用</a-select-option>
</a-select>
</a-form-item>
<a-form-item
:labelCol="labelCol"
:wrapperCol="wrapperCol"
label="描述"
hasFeedback
>
<a-textarea :rows="5" v-model="mdl.describe" placeholder="..." id="describe"/>
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="描述" hasFeedback>
<a-textarea :rows="5" v-model="mdl.describe" placeholder="..." id="describe" />
</a-form-item>
<a-divider />
<a-form-item
:labelCol="labelCol"
:wrapperCol="wrapperCol"
label="拥有权限"
hasFeedback
>
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="拥有权限" hasFeedback>
<a-row :gutter="16" v-for="(permission, index) in mdl.permissions" :key="index">
<a-col :span="4">
{{ permission.permissionName }}
</a-col>
<a-col :span="4"> {{ permission.permissionName }}</a-col>
<a-col :span="20">
<a-checkbox-group :options="permission.actionsOptions"/>
<a-checkbox-group :options="permission.actionsOptions" />
</a-col>
</a-row>
</a-form-item>
</a-form>
</a-modal>
</a-card>
</template>
<script>
import STable from '@/components/table/'
import { getRoleList, getServiceList } from '@/api/manage'
export default {
name: "TableList",
components: {
STable
},
data () {
return {
description: '列表使用场景:后台管理中的权限管理以及角色管理,可用于基于 RBAC 设计的角色权限控制,颗粒度细到每一个操作类型。',
visible: false,
labelCol: {
xs: { span: 24 },
sm: { span: 5 },
import STable from '@/components/table/'
import { getRoleList, getServiceList } from '@/api/manage'
export default {
name: 'TableList',
components: {
STable
},
data() {
return {
description:
'列表使用场景:后台管理中的权限管理以及角色管理,可用于基于 RBAC 设计的角色权限控制,颗粒度细到每一个操作类型。',
visible: false,
labelCol: {
xs: { span: 24 },
sm: { span: 5 }
},
wrapperCol: {
xs: { span: 24 },
sm: { span: 16 }
},
form: null,
mdl: {},
// 高级搜索 展开/关闭
advanced: false,
// 查询参数
queryParam: {},
// 表头
columns: [
{
title: '唯一识别码',
dataIndex: 'id'
},
wrapperCol: {
xs: { span: 24 },
sm: { span: 16 },
{
title: '角色名称',
dataIndex: 'name'
},
form: null,
mdl: {},
// 高级搜索 展开/关闭
advanced: false,
// 查询参数
queryParam: {},
// 表头
columns: [
{
title: '唯一识别码',
dataIndex: 'id'
},
{
title: '角色名称',
dataIndex: 'name',
},
{
title: '状态',
dataIndex: 'status'
},
{
title: '创建时间',
dataIndex: 'createTime',
sorter: true
}, {
title: '操作',
width: '150px',
dataIndex: 'action',
scopedSlots: { customRender: 'action' },
}
],
// 加载数据方法 必须为 Promise 对象
loadData: parameter => {
return getRoleList(parameter)
.then(res => {
return res.result
})
{
title: '状态',
dataIndex: 'status'
},
{
title: '创建时间',
dataIndex: 'createTime',
sorter: true
},
{
title: '操作',
width: '150px',
dataIndex: 'action',
scopedSlots: { customRender: 'action' }
}
],
// 加载数据方法 必须为 Promise 对象
loadData: parameter => {
return getRoleList(parameter).then(res => {
return res.result
})
},
selectedRowKeys: [],
selectedRows: []
}
},
created () {
getServiceList().then(res => {
console.log('getServiceList.call()', res)
selectedRowKeys: [],
selectedRows: []
}
},
created() {
getServiceList().then(res => {
console.log('getServiceList.call()', res)
})
getRoleList().then(res => {
console.log('getRoleList.call()', res)
})
},
methods: {
handleEdit(record) {
this.mdl = Object.assign({}, record)
this.mdl.permissions.forEach(permission => {
permission.actionsOptions = permission.actionEntitySet.map(action => {
return { label: action.describe, value: action.action, defaultCheck: action.defaultCheck }
})
})
getRoleList().then(res => {
console.log('getRoleList.call()', res)
})
this.visible = true
},
methods: {
handleEdit (record) {
this.mdl = Object.assign({}, record)
this.mdl.permissions.forEach(permission => {
permission.actionsOptions = permission.actionEntitySet.map(action => {
return { label: action.describe, value: action.action, defaultCheck: action.defaultCheck }
})
})
this.visible = true
},
handleOk () {
},
onChange (selectedRowKeys, selectedRows) {
this.selectedRowKeys = selectedRowKeys
this.selectedRows = selectedRows
},
toggleAdvanced () {
this.advanced = !this.advanced
},
handleOk() {},
onChange(selectedRowKeys, selectedRows) {
this.selectedRowKeys = selectedRowKeys
this.selectedRows = selectedRows
},
watch: {
/*
toggleAdvanced() {
this.advanced = !this.advanced
}
},
watch: {
/*
'selectedRows': function (selectedRows) {
this.needTotalList = this.needTotalList.map(item => {
return {
......@@ -259,6 +225,6 @@
})
}
*/
}
}
</script>
\ No newline at end of file
}
</script>
......@@ -6,12 +6,7 @@
<a-row :gutter="24">
<a-col :span="6">
<a-form-item label="选择日期:">
<a-range-picker @change="onChange" />
</a-form-item>
</a-col>
<a-col :span="4">
<a-form-item label="状态码:">
<a-input v-model="queryParam.Queue_id" placeholder="请输入Queue_id" />
<a-range-picker @change="onChange" show-time />
</a-form-item>
</a-col>
<a-col :span="4">
......
......@@ -6,12 +6,7 @@
<a-row :gutter="24">
<a-col :span="6">
<a-form-item label="选择日期:">
<a-range-picker @change="onChange" />
</a-form-item>
</a-col>
<a-col :span="4">
<a-form-item label="状态码:">
<a-input v-model="queryParam.Queue_id" placeholder="请输入Queue_id" />
<a-range-picker @change="onChange" show-time />
</a-form-item>
</a-col>
<a-col :span="4">
......
......@@ -6,12 +6,7 @@
<a-row :gutter="24">
<a-col :span="6">
<a-form-item label="选择日期:">
<a-range-picker @change="onChange" />
</a-form-item>
</a-col>
<a-col :span="4">
<a-form-item label="状态码:">
<a-input v-model="queryParam.Queue_id" placeholder="请输入Queue_id" />
<a-range-picker @change="onChange" show-time />
</a-form-item>
</a-col>
<a-col :span="4">
......
......@@ -6,12 +6,7 @@
<a-row :gutter="24">
<a-col :span="6">
<a-form-item label="选择日期:">
<a-range-picker @change="onChange" />
</a-form-item>
</a-col>
<a-col :span="4">
<a-form-item label="状态码:">
<a-input v-model="queryParam.Queue_id" placeholder="请输入Queue_id" />
<a-range-picker @change="onChange" show-time />
</a-form-item>
</a-col>
<a-col :span="4">
......
......@@ -6,12 +6,7 @@
<a-row :gutter="24">
<a-col :span="6">
<a-form-item label="选择日期:">
<a-range-picker @change="onChange" />
</a-form-item>
</a-col>
<a-col :span="4">
<a-form-item label="状态码:">
<a-input v-model="queryParam.Queue_id" placeholder="请输入Queue_id" />
<a-range-picker @change="onChange" show-time />
</a-form-item>
</a-col>
<a-col :span="4">
......
......@@ -6,12 +6,7 @@
<a-row :gutter="24">
<a-col :span="6">
<a-form-item label="选择日期:">
<a-range-picker @change="onChange" />
</a-form-item>
</a-col>
<a-col :span="4">
<a-form-item label="状态码:">
<a-input v-model="queryParam.Queue_id" placeholder="请输入Queue_id" />
<a-range-picker @change="onChange" show-time/>
</a-form-item>
</a-col>
<a-col :span="4">
......
......@@ -6,12 +6,7 @@
<a-row :gutter="24">
<a-col :span="6">
<a-form-item label="选择日期:">
<a-range-picker @change="onChange" />
</a-form-item>
</a-col>
<a-col :span="4">
<a-form-item label="状态码:">
<a-input v-model="queryParam.Queue_id" placeholder="请输入Queue_id" />
<a-range-picker @change="onChange" show-time />
</a-form-item>
</a-col>
<a-col :span="4">
......
......@@ -6,12 +6,7 @@
<a-row :gutter="24">
<a-col :span="6">
<a-form-item label="选择日期:">
<a-range-picker @change="onChange" />
</a-form-item>
</a-col>
<a-col :span="4">
<a-form-item label="状态码:">
<a-input v-model="queryParam.Queue_id" placeholder="请输入Queue_id" />
<a-range-picker @change="onChange" show-time />
</a-form-item>
</a-col>
<a-col :span="4">
......
......@@ -6,12 +6,7 @@
<a-row :gutter="24">
<a-col :span="6">
<a-form-item label="选择日期:">
<a-range-picker @change="onChange" />
</a-form-item>
</a-col>
<a-col :span="4">
<a-form-item label="状态码:">
<a-input v-model="queryParam.Queue_id" placeholder="请输入Queue_id" />
<a-range-picker @change="onChange" show-time />
</a-form-item>
</a-col>
<a-col :span="4">
......
......@@ -6,12 +6,7 @@
<a-row :gutter="24">
<a-col :span="6">
<a-form-item label="选择日期:">
<a-range-picker @change="onChange" />
</a-form-item>
</a-col>
<a-col :span="4">
<a-form-item label="状态码:">
<a-input v-model="queryParam.Queue_id" placeholder="请输入Queue_id" />
<a-range-picker @change="onChange" show-time />
</a-form-item>
</a-col>
<a-col :span="4">
......
......@@ -6,12 +6,7 @@
<a-row :gutter="24">
<a-col :span="6">
<a-form-item label="选择日期:">
<a-range-picker @change="onChange" />
</a-form-item>
</a-col>
<a-col :span="4">
<a-form-item label="状态码:">
<a-input v-model="queryParam.Queue_id" placeholder="请输入Queue_id" />
<a-range-picker @change="onChange" show-time />
</a-form-item>
</a-col>
<a-col :span="4">
......
......@@ -6,12 +6,7 @@
<a-row :gutter="24">
<a-col :span="6">
<a-form-item label="选择日期:">
<a-range-picker @change="onChange" />
</a-form-item>
</a-col>
<a-col :span="4">
<a-form-item label="状态码:">
<a-input v-model="queryParam.Queue_id" placeholder="请输入Queue_id" />
<a-range-picker @change="onChange" show-time />
</a-form-item>
</a-col>
<a-col :span="4">
......
......@@ -6,12 +6,7 @@
<a-row :gutter="24">
<a-col :span="6">
<a-form-item label="选择日期:">
<a-range-picker @change="onChange" />
</a-form-item>
</a-col>
<a-col :span="4">
<a-form-item label="状态码:">
<a-input v-model="queryParam.Queue_id" placeholder="请输入Queue_id" />
<a-range-picker @change="onChange" show-time />
</a-form-item>
</a-col>
<a-col :span="4">
......
......@@ -6,12 +6,7 @@
<a-row :gutter="24">
<a-col :span="6">
<a-form-item label="选择日期:">
<a-range-picker @change="onChange" />
</a-form-item>
</a-col>
<a-col :span="4">
<a-form-item label="状态码:">
<a-input v-model="queryParam.Queue_id" placeholder="请输入Queue_id" />
<a-range-picker @change="onChange" show-time />
</a-form-item>
</a-col>
<a-col :span="4">
......
......@@ -6,12 +6,7 @@
<a-row :gutter="24">
<a-col :span="6">
<a-form-item label="选择日期:">
<a-range-picker @change="onChange" />
</a-form-item>
</a-col>
<a-col :span="4">
<a-form-item label="状态码:">
<a-input v-model="queryParam.Queue_id" placeholder="请输入Queue_id" />
<a-range-picker @change="onChange" show-tiem />
</a-form-item>
</a-col>
<a-col :span="4">
......
......@@ -6,12 +6,7 @@
<a-row :gutter="24">
<a-col :span="6">
<a-form-item label="选择日期:">
<a-range-picker @change="onChange" />
</a-form-item>
</a-col>
<a-col :span="4">
<a-form-item label="状态码:">
<a-input v-model="queryParam.Queue_id" placeholder="请输入Queue_id" />
<a-range-picker @change="onChange" show-time />
</a-form-item>
</a-col>
<a-col :span="4">
......
......@@ -6,12 +6,7 @@
<a-row :gutter="24">
<a-col :span="6">
<a-form-item label="选择日期:">
<a-range-picker @change="onChange" />
</a-form-item>
</a-col>
<a-col :span="4">
<a-form-item label="状态码:">
<a-input v-model="queryParam.Queue_id" placeholder="请输入Queue_id" />
<a-range-picker @change="onChange" show-time />
</a-form-item>
</a-col>
<a-col :span="4">
......
......@@ -6,12 +6,7 @@
<a-row :gutter="24">
<a-col :span="6">
<a-form-item label="选择日期:">
<a-range-picker @change="onChange" />
</a-form-item>
</a-col>
<a-col :span="4">
<a-form-item label="状态码:">
<a-input v-model="queryParam.Queue_id" placeholder="请输入Queue_id" />
<a-range-picker @change="onChange" show-time />
</a-form-item>
</a-col>
<a-col :span="4">
......
......@@ -6,12 +6,7 @@
<a-row :gutter="24">
<a-col :span="6">
<a-form-item label="选择日期:">
<a-range-picker @change="onChange" />
</a-form-item>
</a-col>
<a-col :span="4">
<a-form-item label="状态码:">
<a-input v-model="queryParam.Queue_id" placeholder="请输入Queue_id" />
<a-range-picker @change="onChange" show-time />
</a-form-item>
</a-col>
<a-col :span="4">
......
......@@ -6,12 +6,7 @@
<a-row :gutter="24">
<a-col :span="6">
<a-form-item label="选择日期:">
<a-range-picker @change="onChange" />
</a-form-item>
</a-col>
<a-col :span="4">
<a-form-item label="状态码:">
<a-input v-model="queryParam.Queue_id" placeholder="请输入Queue_id" />
<a-range-picker @change="onChange" show-time />
</a-form-item>
</a-col>
<a-col :span="4">
......
......@@ -6,12 +6,7 @@
<a-row :gutter="24">
<a-col :span="6">
<a-form-item label="选择日期:">
<a-range-picker @change="onChange" />
</a-form-item>
</a-col>
<a-col :span="4">
<a-form-item label="状态码:">
<a-input v-model="queryParam.Queue_id" placeholder="请输入Queue_id" />
<a-range-picker @change="onChange" show-time />
</a-form-item>
</a-col>
<a-col :span="4">
......@@ -31,54 +26,63 @@
<div class="table-operator">
<a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
<a-button type="primary" icon="download" @click="handleExportXls('盘点盘盈单')">导出</a-button>
<a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
<a-upload
name="file"
:showUploadList="false"
:multiple="false"
:headers="tokenHeader"
:action="importExcelUrl"
@change="handleImportExcel"
>
<a-button type="primary" icon="import">导入</a-button>
</a-upload>
<a-dropdown v-if="selectedRowKeys.length > 0">
<a-menu slot="overlay">
<a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item>
<a-menu-item key="1" @click="batchDel"><a-icon type="delete" />删除</a-menu-item>
</a-menu>
<a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button>
<a-button style="margin-left: 8px"> 批量操作 <a-icon type="down"/></a-button>
</a-dropdown>
</div>
<!-- table区域-begin -->
<div>
<div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
<i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>
<i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择
<a style="font-weight: 600">{{ selectedRowKeys.length }}</a
>
<a style="margin-left: 24px" @click="onClearSelected">清空</a>
</div>
<a-table
ref="table"
size="middle"
:scroll="{x:true}"
:scroll="{ x: true }"
bordered
rowKey="id"
:columns="columns"
:dataSource="dataSource"
:pagination="ipagination"
:loading="loading"
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
:rowSelection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
class="j-table-force-nowrap"
@change="handleTableChange">
@change="handleTableChange"
>
<template slot="htmlSlot" slot-scope="text">
<div v-html="text"></div>
</template>
<template slot="imgSlot" slot-scope="text">
<span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span>
<img v-else :src="getImgView(text)" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/>
<img
v-else
:src="getImgView(text)"
height="25px"
alt=""
style="max-width:80px;font-size: 12px;font-style: italic;"
/>
</template>
<template slot="fileSlot" slot-scope="text">
<span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
<a-button
v-else
:ghost="true"
type="primary"
icon="download"
size="small"
@click="downloadFile(text)">
<a-button v-else :ghost="true" type="primary" icon="download" size="small" @click="downloadFile(text)">
下载
</a-button>
</template>
......@@ -101,7 +105,6 @@
</a-menu>
</a-dropdown> -->
</span>
</a-table>
</div>
......@@ -110,119 +113,116 @@
</template>
<script>
import '@/assets/less/TableExpand.less'
import { mixinDevice } from '@/utils/mixin'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import ImsInventorySurplusModal from './modules/ImsInventorySurplusModal'
import '@/assets/less/TableExpand.less'
import { mixinDevice } from '@/utils/mixin'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import ImsInventorySurplusModal from './modules/ImsInventorySurplusModal'
export default {
name: 'ImsInventorySurplusList',
mixins:[JeecgListMixin, mixinDevice],
components: {
ImsInventorySurplusModal
},
data () {
return {
description: '盘点盘盈单管理页面',
// 表头
columns: [
{
title: '#',
dataIndex: '',
key:'rowIndex',
width:60,
align:"center",
customRender:function (t,r,index) {
return parseInt(index)+1;
}
},
{
title:'唯一序号',
align:"center",
dataIndex: 'queueId'
},
{
title:'交易时间',
align:"center",
dataIndex: 'trxDate',
customRender:function (text) {
return !text?"":(text.length>10?text.substr(0,10):text)
}
},
{
title:'操作人编码',
align:"center",
dataIndex: 'userCode'
},
{
title:'组织代码',
align:"center",
dataIndex: 'orgId'
},
{
title:'仓库编码',
align:"center",
dataIndex: 'storeCode'
},
{
title:'物料编码',
align:"center",
dataIndex: 'mtrlCode'
},
{
title:'数量',
align:"center",
dataIndex: 'quantity'
},
{
title:'备注',
align:"center",
dataIndex: 'remark'
},
{
title:'单据编码',
align:"center",
dataIndex: 'fbillNo'
},
{
title:'fid',
align:"center",
dataIndex: 'fid'
},
{
title: '操作',
dataIndex: 'action',
align:"center",
fixed:"right",
width:147,
scopedSlots: { customRender: 'action' }
export default {
name: 'ImsInventorySurplusList',
mixins: [JeecgListMixin, mixinDevice],
components: {
ImsInventorySurplusModal
},
data() {
return {
description: '盘点盘盈单管理页面',
// 表头
columns: [
{
title: '#',
dataIndex: '',
key: 'rowIndex',
width: 60,
align: 'center',
customRender: function(t, r, index) {
return parseInt(index) + 1
}
},
{
title: '唯一序号',
align: 'center',
dataIndex: 'queueId'
},
{
title: '交易时间',
align: 'center',
dataIndex: 'trxDate',
customRender: function(text) {
return !text ? '' : text.length > 10 ? text.substr(0, 10) : text
}
],
url: {
list: "/ims/imsInventorySurplus/list",
delete: "/imsInventorySurplus/delete",
deleteBatch: "/imsInventorySurplus/deleteBatch",
exportXlsUrl: "/imsInventorySurplus/exportXls",
importExcelUrl: "/imsInventorySurplus/importExcel",
},
dictOptions:{},
}
},
created() {
},
computed: {
importExcelUrl: function(){
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
{
title: '操作人编码',
align: 'center',
dataIndex: 'userCode'
},
{
title: '组织代码',
align: 'center',
dataIndex: 'orgId'
},
{
title: '仓库编码',
align: 'center',
dataIndex: 'storeCode'
},
{
title: '物料编码',
align: 'center',
dataIndex: 'mtrlCode'
},
{
title: '数量',
align: 'center',
dataIndex: 'quantity'
},
{
title: '备注',
align: 'center',
dataIndex: 'remark'
},
{
title: '单据编码',
align: 'center',
dataIndex: 'fbillNo'
},
{
title: 'fid',
align: 'center',
dataIndex: 'fid'
},
{
title: '操作',
dataIndex: 'action',
align: 'center',
fixed: 'right',
width: 147,
scopedSlots: { customRender: 'action' }
}
],
url: {
list: '/ims/imsInventorySurplus/list',
delete: '/imsInventorySurplus/delete',
deleteBatch: '/imsInventorySurplus/deleteBatch',
exportXlsUrl: '/imsInventorySurplus/exportXls',
importExcelUrl: '/imsInventorySurplus/importExcel'
},
},
methods: {
initDictConfig(){
}
dictOptions: {}
}
},
created() {},
computed: {
importExcelUrl: function() {
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`
}
},
methods: {
initDictConfig() {}
}
}
</script>
<style scoped>
@import '~@assets/less/common.less';
</style>
\ No newline at end of file
@import '~@assets/less/common.less';
</style>
......@@ -6,12 +6,7 @@
<a-row :gutter="24">
<a-col :span="6">
<a-form-item label="选择日期:">
<a-range-picker @change="onChange" />
</a-form-item>
</a-col>
<a-col :span="4">
<a-form-item label="状态码:">
<a-input v-model="queryParam.Queue_id" placeholder="请输入Queue_id" />
<a-range-picker @change="onChange" show-time />
</a-form-item>
</a-col>
<a-col :span="4">
......
......@@ -6,12 +6,7 @@
<a-row :gutter="24">
<a-col :span="6">
<a-form-item label="选择日期:">
<a-range-picker @change="onChange" />
</a-form-item>
</a-col>
<a-col :span="4">
<a-form-item label="状态码:">
<a-input v-model="queryParam.Queue_id" placeholder="请输入Queue_id" />
<a-range-picker @change="onChange" show-time />
</a-form-item>
</a-col>
<a-col :span="4">
......
......@@ -6,12 +6,7 @@
<a-row :gutter="24">
<a-col :span="6">
<a-form-item label="选择日期:">
<a-range-picker @change="onChange" />
</a-form-item>
</a-col>
<a-col :span="4">
<a-form-item label="状态码:">
<a-input v-model="queryParam.Queue_id" placeholder="请输入Queue_id" />
<a-range-picker @change="onChange" show-time />
</a-form-item>
</a-col>
<a-col :span="4">
......
......@@ -6,12 +6,7 @@
<a-row :gutter="24">
<a-col :span="6">
<a-form-item label="选择日期:">
<a-range-picker @change="onChange" />
</a-form-item>
</a-col>
<a-col :span="4">
<a-form-item label="状态码:">
<a-input v-model="queryParam.Queue_id" placeholder="请输入Queue_id" />
<a-range-picker @change="onChange" show-time />
</a-form-item>
</a-col>
<a-col :span="4">
......
......@@ -6,12 +6,7 @@
<a-row :gutter="24">
<a-col :span="6">
<a-form-item label="选择日期:">
<a-range-picker @change="onChange" />
</a-form-item>
</a-col>
<a-col :span="4">
<a-form-item label="状态码:">
<a-input v-model="queryParam.Queue_id" placeholder="请输入Queue_id" />
<a-range-picker @change="onChange" show-time />
</a-form-item>
</a-col>
<a-col :span="4">
......
......@@ -6,12 +6,7 @@
<a-row :gutter="24">
<a-col :span="6">
<a-form-item label="选择日期:">
<a-range-picker @change="onChange" />
</a-form-item>
</a-col>
<a-col :span="4">
<a-form-item label="状态码:">
<a-input v-model="queryParam.Queue_id" placeholder="请输入Queue_id" />
<a-range-picker @change="onChange" show-time />
</a-form-item>
</a-col>
<a-col :span="4">
......
......@@ -6,12 +6,7 @@
<a-row :gutter="24">
<a-col :span="6">
<a-form-item label="选择日期:">
<a-range-picker @change="onChange" />
</a-form-item>
</a-col>
<a-col :span="4">
<a-form-item label="状态码:">
<a-input v-model="queryParam.Queue_id" placeholder="请输入Queue_id" />
<a-range-picker @change="onChange" show-time />
</a-form-item>
</a-col>
<a-col :span="4">
......
......@@ -6,12 +6,7 @@
<a-row :gutter="24">
<a-col :span="6">
<a-form-item label="选择日期:">
<a-range-picker @change="onChange" />
</a-form-item>
</a-col>
<a-col :span="4">
<a-form-item label="状态码:">
<a-input v-model="queryParam.Queue_id" placeholder="请输入Queue_id" />
<a-range-picker @change="onChange" show-time />
</a-form-item>
</a-col>
<a-col :span="4">
......
......@@ -6,12 +6,7 @@
<a-row :gutter="24">
<a-col :span="6">
<a-form-item label="选择日期:">
<a-range-picker @change="onChange" />
</a-form-item>
</a-col>
<a-col :span="4">
<a-form-item label="状态码:">
<a-input v-model="queryParam.Queue_id" placeholder="请输入Queue_id" />
<a-range-picker @change="onChange" show-time />
</a-form-item>
</a-col>
<a-col :span="4">
......
......@@ -6,12 +6,7 @@
<a-row :gutter="24">
<a-col :span="6">
<a-form-item label="选择日期:">
<a-range-picker @change="onChange" />
</a-form-item>
</a-col>
<a-col :span="4">
<a-form-item label="状态码:">
<a-input v-model="queryParam.Queue_id" placeholder="请输入Queue_id" />
<a-range-picker @change="onChange" show-time />
</a-form-item>
</a-col>
<a-col :span="4">
......
......@@ -6,12 +6,7 @@
<a-row :gutter="24">
<a-col :span="6">
<a-form-item label="选择日期:">
<a-range-picker @change="onChange" />
</a-form-item>
</a-col>
<a-col :span="4">
<a-form-item label="状态码:">
<a-input v-model="queryParam.Queue_id" placeholder="请输入Queue_id" />
<a-range-picker @change="onChange" show-time />
</a-form-item>
</a-col>
<a-col :span="4">
......
......@@ -6,12 +6,7 @@
<a-row :gutter="24">
<a-col :span="6">
<a-form-item label="选择日期:">
<a-range-picker @change="onChange" />
</a-form-item>
</a-col>
<a-col :span="4">
<a-form-item label="状态码:">
<a-input v-model="queryParam.Queue_id" placeholder="请输入Queue_id" />
<a-range-picker @change="onChange" show-time />
</a-form-item>
</a-col>
<a-col :span="4">
......
......@@ -6,12 +6,7 @@
<a-row :gutter="24">
<a-col :span="6">
<a-form-item label="选择日期:">
<a-range-picker @change="onChange" />
</a-form-item>
</a-col>
<a-col :span="4">
<a-form-item label="状态码:">
<a-input v-model="queryParam.Queue_id" placeholder="请输入Queue_id" />
<a-range-picker @change="onChange" show-time />
</a-form-item>
</a-col>
<a-col :span="4">
......
......@@ -6,12 +6,7 @@
<a-row :gutter="24">
<a-col :span="6">
<a-form-item label="选择日期:">
<a-range-picker @change="onChange" />
</a-form-item>
</a-col>
<a-col :span="4">
<a-form-item label="状态码:">
<a-input v-model="queryParam.Queue_id" placeholder="请输入Queue_id" />
<a-range-picker @change="onChange" show-tiem />
</a-form-item>
</a-col>
<a-col :span="4">
......
......@@ -6,12 +6,7 @@
<a-row :gutter="24">
<a-col :span="6">
<a-form-item label="选择日期:">
<a-range-picker @change="onChange" />
</a-form-item>
</a-col>
<a-col :span="4">
<a-form-item label="状态码:">
<a-input v-model="queryParam.Queue_id" placeholder="请输入Queue_id" />
<a-range-picker @change="onChange" show-time />
</a-form-item>
</a-col>
<a-col :span="4">
......
......@@ -10,11 +10,6 @@
</a-form-item>
</a-col>
<a-col :span="4">
<a-form-item label="状态码:">
<a-input v-model="queryParam.Queue_id" placeholder="请输入Queue_id" />
</a-form-item>
</a-col>
<a-col :span="4">
<a-form-item label="编码:">
<a-input v-model="queryParam.codeString" placeholder="请输入编码" />
</a-form-item>
......
......@@ -6,12 +6,7 @@
<a-row :gutter="24">
<a-col :span="6">
<a-form-item label="选择日期:">
<a-range-picker @change="onChange" />
</a-form-item>
</a-col>
<a-col :span="4">
<a-form-item label="状态码:">
<a-input v-model="queryParam.Queue_id" placeholder="请输入Queue_id" />
<a-range-picker @change="onChange" show-time />
</a-form-item>
</a-col>
<a-col :span="4">
......
......@@ -6,12 +6,7 @@
<a-row :gutter="24">
<a-col :span="6">
<a-form-item label="选择日期:">
<a-range-picker @change="onChange" />
</a-form-item>
</a-col>
<a-col :span="4">
<a-form-item label="状态码:">
<a-input v-model="queryParam.Queue_id" placeholder="请输入Queue_id" />
<a-range-picker @change="onChange" show-time />
</a-form-item>
</a-col>
<a-col :span="4">
......
......@@ -6,12 +6,7 @@
<a-row :gutter="24">
<a-col :span="6">
<a-form-item label="选择日期:">
<a-range-picker @change="onChange" />
</a-form-item>
</a-col>
<a-col :span="4">
<a-form-item label="状态码:">
<a-input v-model="queryParam.Queue_id" placeholder="请输入Queue_id" />
<a-range-picker @change="onChange" show-time />
</a-form-item>
</a-col>
<a-col :span="4">
......
......@@ -6,12 +6,7 @@
<a-row :gutter="24">
<a-col :span="6">
<a-form-item label="选择日期:">
<a-range-picker @change="onChange" />
</a-form-item>
</a-col>
<a-col :span="4">
<a-form-item label="状态码:">
<a-input v-model="queryParam.Queue_id" placeholder="请输入Queue_id" />
<a-range-picker @change="onChange" show-time />
</a-form-item>
</a-col>
<a-col :span="4">
......
......@@ -6,12 +6,7 @@
<a-row :gutter="24">
<a-col :span="6">
<a-form-item label="选择日期:">
<a-range-picker @change="onChange" />
</a-form-item>
</a-col>
<a-col :span="4">
<a-form-item label="状态码:">
<a-input v-model="queryParam.Queue_id" placeholder="请输入Queue_id" />
<a-range-picker @change="onChange" show-time/>
</a-form-item>
</a-col>
<a-col :span="4">
......
......@@ -6,12 +6,7 @@
<a-row :gutter="24">
<a-col :span="6">
<a-form-item label="选择日期:">
<a-range-picker @change="onChange" />
</a-form-item>
</a-col>
<a-col :span="4">
<a-form-item label="状态码:">
<a-input v-model="queryParam.Queue_id" placeholder="请输入Queue_id" />
<a-range-picker @change="onChange" show-time />
</a-form-item>
</a-col>
<a-col :span="4">
......
......@@ -6,12 +6,7 @@
<a-row :gutter="24">
<a-col :span="6">
<a-form-item label="选择日期:">
<a-range-picker @change="onChange" />
</a-form-item>
</a-col>
<a-col :span="4">
<a-form-item label="状态码:">
<a-input v-model="queryParam.Queue_id" placeholder="请输入Queue_id" />
<a-range-picker @change="onChange" show-time />
</a-form-item>
</a-col>
<a-col :span="4">
......
......@@ -6,12 +6,7 @@
<a-row :gutter="24">
<a-col :span="6">
<a-form-item label="选择日期:">
<a-range-picker @change="onChange" />
</a-form-item>
</a-col>
<a-col :span="4">
<a-form-item label="状态码:">
<a-input v-model="queryParam.Queue_id" placeholder="请输入Queue_id" />
<a-range-picker @change="onChange" show-time />
</a-form-item>
</a-col>
<a-col :span="4">
......
......@@ -6,12 +6,7 @@
<a-row :gutter="24">
<a-col :span="6">
<a-form-item label="选择日期:">
<a-range-picker @change="onChange" />
</a-form-item>
</a-col>
<a-col :span="4">
<a-form-item label="状态码:">
<a-input v-model="queryParam.Queue_id" placeholder="请输入Queue_id" />
<a-range-picker @change="onChange" show-time />
</a-form-item>
</a-col>
<a-col :span="4">
......
......@@ -6,12 +6,7 @@
<a-row :gutter="24">
<a-col :span="6">
<a-form-item label="选择日期:">
<a-range-picker @change="onChange" />
</a-form-item>
</a-col>
<a-col :span="4">
<a-form-item label="状态码:">
<a-input v-model="queryParam.Queue_id" placeholder="请输入Queue_id" />
<a-range-picker @change="onChange" show-time />
</a-form-item>
</a-col>
<a-col :span="4">
......
......@@ -6,17 +6,17 @@
<a-row :gutter="24">
<a-col :span="6">
<a-form-item label="选择日期:">
<a-range-picker @change="onChange" />
<a-range-picker @change="onChange" show-time />
</a-form-item>
</a-col>
<a-col :span="4">
<a-form-item label="状态码:">
<a-input v-model="queryParam.Queue_id" placeholder="请输入Queue_id" />
<a-input v-model="queryParam.code" placeholder="请输入Queue_id" />
</a-form-item>
</a-col>
<a-col :span="4">
<a-form-item label="编码:">
<a-input v-model="queryParam.codeString" placeholder="请输入编码" />
<a-form-item label="业务名称:">
<a-input v-model="queryParam.codeString" placeholder="请输入业务名称" />
</a-form-item>
</a-col>
<a-col :span="4">
......@@ -31,7 +31,14 @@
<div class="table-operator">
<a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
<a-button type="primary" icon="download" @click="handleExportXls('IMS日志')">导出</a-button>
<a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
<a-upload
name="file"
:showUploadList="false"
:multiple="false"
:headers="tokenHeader"
:action="importExcelUrl"
@change="handleImportExcel"
>
<a-button type="primary" icon="import">导入</a-button>
</a-upload>
</div>
......@@ -39,40 +46,42 @@
<!-- table区域-begin -->
<div>
<div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
<i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>
<i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择
<a style="font-weight: 600">{{ selectedRowKeys.length }}</a
>
<a style="margin-left: 24px" @click="onClearSelected">清空</a>
</div>
<a-table
ref="table"
size="middle"
:scroll="{x:true}"
:scroll="{ x: true }"
bordered
rowKey="id"
:columns="columns"
:dataSource="dataSource"
:pagination="ipagination"
:loading="loading"
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
:rowSelection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
class="j-table-force-nowrap"
@change="handleTableChange">
@change="handleTableChange"
>
<template slot="htmlSlot" slot-scope="text">
<div v-html="text"></div>
</template>
<template slot="imgSlot" slot-scope="text">
<span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span>
<img v-else :src="getImgView(text)" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/>
<img
v-else
:src="getImgView(text)"
height="25px"
alt=""
style="max-width:80px;font-size: 12px;font-style: italic;"
/>
</template>
<template slot="fileSlot" slot-scope="text">
<span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
<a-button
v-else
:ghost="true"
type="primary"
icon="download"
size="small"
@click="downloadFile(text)">
<a-button v-else :ghost="true" type="primary" icon="download" size="small" @click="downloadFile(text)">
下载
</a-button>
</template>
......@@ -80,7 +89,6 @@
<span slot="action" slot-scope="text, record">
<a @click="handleDetail(record)">详情</a>
</span>
</a-table>
</div>
......@@ -89,105 +97,107 @@
</template>
<script>
import '@/assets/less/TableExpand.less'
import { mixinDevice } from '@/utils/mixin'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import ImslogModal from './modules/ImslogModal'
import '@/assets/less/TableExpand.less'
import { mixinDevice } from '@/utils/mixin'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import ImslogModal from './modules/ImslogModal'
export default {
name: 'ImslogList',
mixins:[JeecgListMixin, mixinDevice],
components: {
ImslogModal
},
data () {
return {
description: 'ims响应日志管理页面',
// 表头
columns: [
{
title: '#',
dataIndex: '',
key:'rowIndex',
width:60,
align:"center",
customRender:function (t,r,index) {
return parseInt(index)+1;
},
},
{
title:'业务是否成功',
align:"center",
dataIndex: 'success',
filters:[
{
text:'true',
value:'1'
},
{
text:'false',
value:'2'
}
],
filterMultiple: false
},
{
title:'业务名字',
align:"center",
dataIndex: 'name'
},
{
title:'创建时间',
align:"center",
dataIndex: 'createTime',
},
{
title:'状态码',
align:"center",
dataIndex: 'code'
},
{
title: '操作',
dataIndex: 'action',
align:"center",
fixed:"right",
width:147,
scopedSlots: { customRender: 'action' }
export default {
name: 'ImslogList',
mixins: [JeecgListMixin, mixinDevice],
components: {
ImslogModal
},
data() {
return {
value1: '',
description: 'ims响应日志管理页面',
// 表头
columns: [
{
title: '#',
dataIndex: '',
key: 'rowIndex',
width: 60,
align: 'center',
customRender: function(t, r, index) {
return parseInt(index) + 1
}
],
url: {
list: "/imslog/list",
delete: "/imslog/delete",
deleteBatch: "/imslog/deleteBatch",
exportXlsUrl: "/imslog/exportXls",
importExcelUrl: "/imslog/importExcel",
syncUrl:'/imslog/synchronization'
},
dictOptions:{},
synLoading:false,
}
},
created() {
},
computed: {
importExcelUrl: function(){
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
},
},
methods: {
initDictConfig(){
},
syn(record){
if(record.success == "true"){
return true
}else{
return false
{
title: '业务是否成功',
align: 'center',
dataIndex: 'success',
filters: [
{
text: 'all',
value: '0'
},
{
text: 'true',
value: '1'
},
{
text: 'false',
value: '2'
}
],
filterMultiple: false
},
{
title: '业务名称',
align: 'center',
dataIndex: 'name'
},
{
title: '创建时间',
align: 'center',
dataIndex: 'createTime'
},
{
title: '状态码',
align: 'center',
dataIndex: 'code'
},
{
title: '操作',
dataIndex: 'action',
align: 'center',
fixed: 'right',
width: 147,
scopedSlots: { customRender: 'action' }
}
],
url: {
list: '/imslog/list',
delete: '/imslog/delete',
deleteBatch: '/imslog/deleteBatch',
exportXlsUrl: '/imslog/exportXls',
importExcelUrl: '/imslog/importExcel',
syncUrl: '/imslog/synchronization'
},
dictOptions: {},
synLoading: false
}
},
created() {},
computed: {
importExcelUrl: function() {
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`
}
},
methods: {
initDictConfig() {},
syn(record) {
if (record.success === 'true') {
return true
} else {
return false
}
}
}
}
</script>
<style scoped>
@import '~@assets/less/common.less';
</style>
\ No newline at end of file
<style lang="less" scoped>
@import '~@assets/less/common.less';
</style>
......@@ -6,17 +6,12 @@
<a-row :gutter="24">
<a-col :span="6">
<a-form-item label="选择日期:">
<a-range-picker @change="onChange" />
<a-range-picker @change="onChange" show-time/>
</a-form-item>
</a-col>
<a-col :span="4">
<a-form-item label="状态码:">
<a-input v-model="queryParam.Queue_id" placeholder="请输入Queue_id" />
</a-form-item>
</a-col>
<a-col :span="4">
<a-form-item label="编码:">
<a-input v-model="queryParam.codeString" placeholder="请输入编码" />
<a-form-item label="业务名称:">
<a-input v-model="queryParam.codeString" placeholder="请输入业务名称" />
</a-form-item>
</a-col>
<a-col :span="4">
......@@ -31,7 +26,14 @@
<div class="table-operator">
<a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
<a-button type="primary" icon="download" @click="handleExportXls('金蝶日志')">导出</a-button>
<a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
<a-upload
name="file"
:showUploadList="false"
:multiple="false"
:headers="tokenHeader"
:action="importExcelUrl"
@change="handleImportExcel"
>
<a-button type="primary" icon="import">导入</a-button>
</a-upload>
</div>
......@@ -39,39 +41,41 @@
<!-- table区域-begin -->
<div>
<div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
<i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>
<i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择
<a style="font-weight: 600">{{ selectedRowKeys.length }}</a
>
<a style="margin-left: 24px" @click="onClearSelected">清空</a>
</div>
<a-table
ref="table"
size="middle"
:scroll="{x:true}"
:scroll="{ x: true }"
bordered
rowKey="id"
:columns="columns"
:dataSource="dataSource"
:pagination="ipagination"
:loading="loading"
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
:rowSelection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
class="j-table-force-nowrap"
@change="handleTableChange">
@change="handleTableChange"
>
<template slot="htmlSlot" slot-scope="text">
<div v-html="text"></div>
</template>
<template slot="imgSlot" slot-scope="text">
<span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span>
<img v-else :src="getImgView(text)" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/>
<img
v-else
:src="getImgView(text)"
height="25px"
alt=""
style="max-width:80px;font-size: 12px;font-style: italic;"
/>
</template>
<template slot="fileSlot" slot-scope="text">
<span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
<a-button
v-else
:ghost="true"
type="primary"
icon="download"
size="small"
@click="downloadFile(text)">
<a-button v-else :ghost="true" type="primary" icon="download" size="small" @click="downloadFile(text)">
下载
</a-button>
</template>
......@@ -79,7 +83,6 @@
<span slot="action" slot-scope="text, record">
<a @click="handleDetail(record)">详情</a>
</span>
</a-table>
</div>
......@@ -88,92 +91,92 @@
</template>
<script>
import '@/assets/less/TableExpand.less'
import { mixinDevice } from '@/utils/mixin'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import KingdeelogModal from './modules/KingdeelogModal'
import '@/assets/less/TableExpand.less'
import { mixinDevice } from '@/utils/mixin'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import KingdeelogModal from './modules/KingdeelogModal'
export default {
name: 'KingdeelogList',
mixins:[JeecgListMixin, mixinDevice],
components: {
KingdeelogModal
},
data () {
return {
description: 'ims金蝶日志管理页面',
// 表头
columns: [
{
title: '#',
dataIndex: '',
key:'rowIndex',
width:60,
align:"center",
customRender:function (t,r,index) {
return parseInt(index)+1;
}
},
{
title:'业务是否成功',
align:"center",
dataIndex: 'synchronization',
filters:[
{
text:'true',
value:'1'
},
{
text:'false',
value:'2'
}
],
filterMultiple: false
},
{
title:'业务名字',
align:"center",
dataIndex: 'name'
},
{
title:'创建时间',
align:"center",
dataIndex: 'createtime'
},
{
title: '操作',
dataIndex: 'action',
align:"center",
fixed:"right",
width:147,
scopedSlots: { customRender: 'action' }
export default {
name: 'KingdeelogList',
mixins: [JeecgListMixin, mixinDevice],
components: {
KingdeelogModal
},
data() {
return {
description: 'ims金蝶日志管理页面',
// 表头
columns: [
{
title: '#',
dataIndex: '',
key: 'rowIndex',
width: 60,
align: 'center',
customRender: function(t, r, index) {
return parseInt(index) + 1
}
],
url: {
list: "/kingdeelog/list",
delete: "/kingdeelog/delete",
deleteBatch: "/kingdeelog/deleteBatch",
exportXlsUrl: "/kingdeelog/exportXls",
importExcelUrl: "/kingdeelog/importExcel",
},
dictOptions:{},
}
},
created() {
},
computed: {
importExcelUrl: function(){
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
{
title: '业务是否成功',
align: 'center',
dataIndex: 'synchronization',
filters: [
{
text: 'all',
value: '0'
},
{
text: 'true',
value: '1'
},
{
text: 'false',
value: '2'
}
],
filterMultiple: false
},
{
title: '业务名称',
align: 'center',
dataIndex: 'name'
},
{
title: '创建时间',
align: 'center',
dataIndex: 'createtime'
},
{
title: '操作',
dataIndex: 'action',
align: 'center',
fixed: 'right',
width: 147,
scopedSlots: { customRender: 'action' }
}
],
url: {
list: '/kingdeelog/list',
delete: '/kingdeelog/delete',
deleteBatch: '/kingdeelog/deleteBatch',
exportXlsUrl: '/kingdeelog/exportXls',
importExcelUrl: '/kingdeelog/importExcel'
},
},
methods: {
initDictConfig(){
}
dictOptions: {}
}
},
created() {},
computed: {
importExcelUrl: function() {
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`
}
},
methods: {
initDictConfig() {}
}
}
</script>
<style scoped>
@import '~@assets/less/common.less';
</style>
\ No newline at end of file
@import '~@assets/less/common.less';
</style>
......@@ -14,18 +14,33 @@
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="金蝶请求信息" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-textarea autoSize v-decorator="['request']" placeholder="请输入金蝶请求信息"></a-textarea>
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="数据创建日期" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-input v-decorator="['createtime']" placeholder="请输入数据创建日期"></a-input>
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="数据同步:失败:0,成功:1" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-input-number v-decorator="['synchronization']" placeholder="请输入数据同步:失败:0,成功:1" style="width: 100%"/>
<a-input-number
v-decorator="['synchronization']"
placeholder="请输入数据同步:失败:0,成功:1"
style="width: 100%"
/>
</a-form-item>
</a-col>
<a-col :span="24">
<a-form-item label="错误原因" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-textarea autoSize v-decorator="['failReason']" placeholder="请输入错误原因"></a-textarea>
<a-textarea
autoSize
v-decorator="['failReason']"
placeholder="请输入错误原因"
:style="{ color: this.model.failReason !== null ? 'red' : '' }"
></a-textarea>
<p v-if="this.model.failReason !== null" style="color: red">金蝶错误优先联系金蝶实施</p>
</a-form-item>
</a-col>
<a-col v-if="showFlowSubmitButton" :span="24" style="text-align: center">
......@@ -38,139 +53,141 @@
</template>
<script>
import { httpAction, getAction } from '@/api/manage'
import pick from 'lodash.pick'
import { validateDuplicateValue } from '@/utils/util'
import JFormContainer from '@/components/jeecg/JFormContainer'
import { httpAction, getAction } from '@/api/manage'
import pick from 'lodash.pick'
import { validateDuplicateValue } from '@/utils/util'
import JFormContainer from '@/components/jeecg/JFormContainer'
export default {
name: 'KingdeelogForm',
components: {
JFormContainer,
export default {
name: 'KingdeelogForm',
components: {
JFormContainer
},
props: {
//流程表单data
formData: {
type: Object,
default: () => {},
required: false
},
props: {
//流程表单data
formData: {
type: Object,
default: ()=>{},
required: false
//表单模式:true流程表单 false普通表单
formBpm: {
type: Boolean,
default: false,
required: false
},
//表单禁用
disabled: {
type: Boolean,
default: false,
required: false
}
},
data() {
return {
form: this.$form.createForm(this),
model: {},
labelCol: {
xs: { span: 24 },
sm: { span: 5 }
},
//表单模式:true流程表单 false普通表单
formBpm: {
type: Boolean,
default: false,
required: false
wrapperCol: {
xs: { span: 24 },
sm: { span: 16 }
},
//表单禁用
disabled: {
type: Boolean,
default: false,
required: false
confirmLoading: false,
validatorRules: {},
url: {
add: '/kingdeelog/add',
edit: '/kingdeelog/edit',
queryById: '/kingdeelog/queryById'
}
},
data () {
return {
form: this.$form.createForm(this),
model: {},
labelCol: {
xs: { span: 24 },
sm: { span: 5 },
},
wrapperCol: {
xs: { span: 24 },
sm: { span: 16 },
},
confirmLoading: false,
validatorRules: {
},
url: {
add: "/kingdeelog/add",
edit: "/kingdeelog/edit",
queryById: "/kingdeelog/queryById"
}
},
computed: {
formDisabled() {
if (this.formBpm === true) {
if (this.formData.disabled === false) {
return false
}
return true
}
return this.disabled
},
computed: {
formDisabled(){
if(this.formBpm===true){
if(this.formData.disabled===false){
return false
}
showFlowSubmitButton() {
if (this.formBpm === true) {
if (this.formData.disabled === false) {
return true
}
return this.disabled
},
showFlowSubmitButton(){
if(this.formBpm===true){
if(this.formData.disabled===false){
return true
}
}
return false
}
return false
}
},
created() {
// 如果是流程中表单,则需要加载流程表单data
this.showFlowData()
},
methods: {
add() {
this.edit({})
},
created () {
//如果是流程中表单,则需要加载流程表单data
this.showFlowData();
edit(record) {
this.form.resetFields()
this.model = Object.assign({}, record)
this.visible = true
this.$nextTick(() => {
this.form.setFieldsValue(
pick(this.model, 'name', 'response', 'request', 'createtime', 'synchronization', 'failReason')
)
})
},
methods: {
add () {
this.edit({});
},
edit (record) {
this.form.resetFields();
this.model = Object.assign({}, record);
this.visible = true;
this.$nextTick(() => {
this.form.setFieldsValue(pick(this.model,'name','response','createtime','synchronization','failReason'))
// 渲染流程表单数据
showFlowData() {
if (this.formBpm === true) {
let params = { id: this.formData.dataId }
getAction(this.url.queryById, params).then(res => {
if (res.success) {
this.edit(res.result)
}
})
},
//渲染流程表单数据
showFlowData(){
if(this.formBpm === true){
let params = {id:this.formData.dataId};
getAction(this.url.queryById,params).then((res)=>{
if(res.success){
this.edit (res.result);
}
});
}
},
submitForm () {
const that = this;
// 触发表单验证
this.form.validateFields((err, values) => {
if (!err) {
that.confirmLoading = true;
let httpurl = '';
let method = '';
if(!this.model.id){
httpurl+=this.url.add;
method = 'post';
}else{
httpurl+=this.url.edit;
method = 'put';
}
let formData = Object.assign(this.model, values);
console.log("表单提交数据",formData)
httpAction(httpurl,formData,method).then((res)=>{
if(res.success){
that.$message.success(res.message);
that.$emit('ok');
}else{
that.$message.warning(res.message);
}
},
submitForm() {
const that = this
// 触发表单验证
this.form.validateFields((err, values) => {
if (!err) {
that.confirmLoading = true
let httpurl = ''
let method = ''
if (!this.model.id) {
httpurl += this.url.add
method = 'post'
} else {
httpurl += this.url.edit
method = 'put'
}
let formData = Object.assign(this.model, values)
console.log('表单提交数据', formData)
httpAction(httpurl, formData, method)
.then(res => {
if (res.success) {
that.$message.success(res.message)
that.$emit('ok')
} else {
that.$message.warning(res.message)
}
}).finally(() => {
that.confirmLoading = false;
})
}
})
},
popupCallback(row){
this.form.setFieldsValue(pick(row,'name','response','createtime','synchronization','failReason'))
},
.finally(() => {
that.confirmLoading = false
})
}
})
},
popupCallback(row) {
this.form.setFieldsValue(pick(row, 'name', 'response', 'request', 'createtime', 'synchronization', 'failReason'))
}
}
</script>
\ No newline at end of file
}
</script>
......@@ -5,56 +5,56 @@
:visible="visible"
switchFullscreen
@ok="handleOk"
:okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
:okButtonProps="{ class: { 'jee-hidden': disableSubmit } }"
@cancel="handleCancel"
cancelText="关闭">
cancelText="关闭"
>
<kingdeelog-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></kingdeelog-form>
</j-modal>
</template>
<script>
import KingdeelogForm from './KingdeelogForm'
export default {
name: 'KingdeelogModal',
components: {
KingdeelogForm
import KingdeelogForm from './KingdeelogForm'
export default {
name: 'KingdeelogModal',
components: {
KingdeelogForm
},
data() {
return {
title: '',
width: 800,
visible: false,
disableSubmit: false
}
},
methods: {
add() {
this.visible = true
this.$nextTick(() => {
this.$refs.realForm.add()
})
},
edit(record) {
this.visible = true
this.$nextTick(() => {
this.$refs.realForm.edit(record)
})
},
close() {
this.$emit('close')
this.visible = false
},
handleOk() {
this.$refs.realForm.submitForm()
},
data () {
return {
title:'',
width:800,
visible: false,
disableSubmit: false
}
submitCallback() {
this.$emit('ok')
this.visible = false
},
methods: {
add () {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.add();
})
},
edit (record) {
this.visible=true
this.$nextTick(()=>{
this.$refs.realForm.edit(record);
})
},
close () {
this.$emit('close');
this.visible = false;
},
handleOk () {
this.$refs.realForm.submitForm();
},
submitCallback(){
this.$emit('ok');
this.visible = false;
},
handleCancel () {
this.close()
}
handleCancel() {
this.close()
}
}
</script>
\ No newline at end of file
}
</script>
<template>
<a-row type="flex" :gutter="16">
<a-col :md="5" :sm="24">
<address-list-left v-model="currentOrgCode"/>
<address-list-left v-model="currentOrgCode" />
</a-col>
<a-col :md="24-5" :sm="24">
<address-list-right v-model="currentOrgCode"/>
<a-col :md="24 - 5" :sm="24">
<address-list-right v-model="currentOrgCode" />
</a-col>
</a-row>
</template>
<script>
import AddressListLeft from './modules/AddressListLeft'
import AddressListRight from './modules/AddressListRight'
import AddressListLeft from './modules/AddressListLeft'
import AddressListRight from './modules/AddressListRight'
export default {
name: 'AddressList',
components: { AddressListLeft, AddressListRight },
data() {
return {
description: '通讯录页面',
currentOrgCode: ''
}
},
export default {
name: 'AddressList',
components: { AddressListLeft, AddressListRight },
data() {
return {
description: '通讯录页面',
currentOrgCode: ''
}
},
methods: {}
}
methods: {}
}
</script>
<style scoped>
@import '~@assets/less/common.less';
</style>
\ No newline at end of file
@import '~@assets/less/common.less';
</style>
......@@ -16,11 +16,11 @@
</a-col>
<span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
<a-col :md="6" :sm="24">
<a-button type="primary" @click="searchQuery">查询</a-button>
<a-button style="margin-left: 8px" @click="searchReset">重置</a-button>
</a-col>
</span>
<a-col :md="6" :sm="24">
<a-button type="primary" @click="searchQuery">查询</a-button>
<a-button style="margin-left: 8px" @click="searchReset">重置</a-button>
</a-col>
</span>
</a-row>
</a-form>
</div>
......@@ -34,7 +34,10 @@
<div>
<!--已选择的清空 -->
<div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
<i class="anticon anticon-info-circle ant-alert-icon"></i>已选择&nbsp;<a style="font-weight: 600">{{ selectedRowKeys.length }}</a>&nbsp;&nbsp;
<i class="anticon anticon-info-circle ant-alert-icon"></i>已选择&nbsp;<a style="font-weight: 600">{{
selectedRowKeys.length
}}</a
>&nbsp;&nbsp;
<a style="margin-left: 24px" @click="onClearSelected">清空</a>
</div>
<a-table
......@@ -46,7 +49,7 @@
:dataSource="dataSource"
:pagination="ipagination"
:loading="loading"
:rowSelection="{selectedRowKeys: selectedRowKeys,onChange: onSelectChange}"
:rowSelection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
@change="handleTableChange"
>
<!-- 字符串超长截取省略号显示-->
......@@ -60,79 +63,81 @@
</template>
<script>
import DataLogModal from './modules/DataLogModal'
import {JeecgListMixin} from '@/mixins/JeecgListMixin'
import JEllipsis from "@/components/jeecg/JEllipsis";
import DataLogModal from './modules/DataLogModal'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import JEllipsis from '@/components/jeecg/JEllipsis'
export default {
name: 'DataLogList',
mixins: [JeecgListMixin],
components: {
JEllipsis,
DataLogModal
},
data() {
return {
description: '数据日志管理页面',
//表头
columns: [
{
title: '表名',
align: 'center',
dataIndex: 'dataTable',
width: "120"
}, {
title: '数据ID',
align: 'center',
dataIndex: 'dataId',
width: "120"
}, {
title: '版本号',
align: 'center',
dataIndex: 'dataVersion',
width: "50"
}, {
title: '数据内容',
align: 'center',
dataIndex: 'dataContent',
width: "150",
scopedSlots: {customRender: 'dataContent'},
}, {
title: '创建人',
align: 'center',
dataIndex: 'createBy',
width: "100"
},
],
url: {
list: "/sys/dataLog/list",
export default {
name: 'DataLogList',
mixins: [JeecgListMixin],
components: {
JEllipsis,
DataLogModal
},
data() {
return {
description: '数据日志管理页面',
//表头
columns: [
{
title: '表名',
align: 'center',
dataIndex: 'dataTable',
width: '120'
},
{
title: '数据ID',
align: 'center',
dataIndex: 'dataId',
width: '120'
},
{
title: '版本号',
align: 'center',
dataIndex: 'dataVersion',
width: '50'
},
{
title: '数据内容',
align: 'center',
dataIndex: 'dataContent',
width: '150',
scopedSlots: { customRender: 'dataContent' }
},
{
title: '创建人',
align: 'center',
dataIndex: 'createBy',
width: '100'
}
],
url: {
list: '/sys/dataLog/list'
}
}
},
methods: {
handleCompare: function() {
if (!this.selectionRows || this.selectionRows.length != 2) {
this.openNotifIcon('请选择两条数据')
return false
} else if (this.selectionRows[0].dataId != this.selectionRows[1].dataId) {
this.openNotifIcon('请选择相同的数据库表和数据ID进行比较')
return false
} else {
this.$refs.modalForm.addModal(this.selectionRows)
this.$refs.modalForm.title = '数据比较'
}
},
methods: {
handleCompare: function () {
if (!this.selectionRows || this.selectionRows.length != 2) {
this.openNotifIcon('请选择两条数据');
return false;
} else if (this.selectionRows[0].dataId != this.selectionRows[1].dataId) {
this.openNotifIcon('请选择相同的数据库表和数据ID进行比较');
return false;
} else {
this.$refs.modalForm.addModal(this.selectionRows);
this.$refs.modalForm.title = "数据比较";
}
},
openNotifIcon(msg) {
this.$notification['warning']({
message: '提示信息',
description: msg,
});
},
openNotifIcon(msg) {
this.$notification['warning']({
message: '提示信息',
description: msg
})
}
}
}
</script>
<style scoped>
@import '~@assets/less/common.less'
</style>
\ No newline at end of file
@import '~@assets/less/common.less';
</style>
<template>
<a-card :bordered="false" class="card-area">
<!-- 查询区域 -->
<div class="table-page-search-wrapper">
<!-- 搜索区域 -->
<a-form layout="inline" @keyup.enter.native="searchQuery">
<a-row :gutter="24">
<a-col :md="6" :sm="8">
<a-form-item label="名称" :labelCol="{span: 5}" :wrapperCol="{span: 18, offset: 1}">
<a-form-item label="名称" :labelCol="{ span: 5 }" :wrapperCol="{ span: 18, offset: 1 }">
<a-input placeholder="请输入名称查询" v-model="queryParam.roleName"></a-input>
</a-form-item>
</a-col>
<a-col :md="10" :sm="12">
<a-form-item label="创建时间" :labelCol="{span: 5}" :wrapperCol="{span: 18, offset: 1}">
<j-date v-model="queryParam.createTime_begin" :showTime="true" date-format="YYYY-MM-DD HH:mm:ss" style="width:45%" placeholder="请选择开始时间" ></j-date>
<a-form-item label="创建时间" :labelCol="{ span: 5 }" :wrapperCol="{ span: 18, offset: 1 }">
<j-date
v-model="queryParam.createTime_begin"
:showTime="true"
date-format="YYYY-MM-DD HH:mm:ss"
style="width:45%"
placeholder="请选择开始时间"
></j-date>
<span style="width: 10px;">~</span>
<j-date v-model="queryParam.createTime_end" :showTime="true" date-format="YYYY-MM-DD HH:mm:ss" style="width:45%" placeholder="请选择结束时间"></j-date>
<j-date
v-model="queryParam.createTime_end"
:showTime="true"
date-format="YYYY-MM-DD HH:mm:ss"
style="width:45%"
placeholder="请选择结束时间"
></j-date>
</a-form-item>
</a-col>
<span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
......@@ -29,27 +40,35 @@
</div>
<!-- 操作按钮区域 -->
<div class="table-operator" style="margin-top: 5px">
<div class="table-operator" style="margin-top: 5px">
<a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
<a-button type="primary" icon="download" @click="handleExportXls('角色信息')">导出</a-button>
<a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
<a-upload
name="file"
:showUploadList="false"
:multiple="false"
:headers="tokenHeader"
:action="importExcelUrl"
@change="handleImportExcel"
>
<a-button type="primary" icon="import">导入</a-button>
</a-upload>
<a-dropdown v-if="selectedRowKeys.length > 0">
<a-menu slot="overlay">
<a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item>
<a-menu-item key="1" @click="batchDel"><a-icon type="delete" />删除</a-menu-item>
</a-menu>
<a-button style="margin-left: 8px">
批量操作 <a-icon type="down" />
</a-button>
<a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /> </a-button>
</a-dropdown>
</div>
<!-- table区域-begin -->
<div>
<div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
<i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择&nbsp;<a style="font-weight: 600">{{ selectedRowKeys.length }}</a>&nbsp;&nbsp;
<i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择&nbsp;<a style="font-weight: 600">{{
selectedRowKeys.length
}}</a
>&nbsp;&nbsp;
<a style="margin-left: 24px" @click="onClearSelected">清空</a>
</div>
......@@ -62,17 +81,15 @@
:dataSource="dataSource"
:pagination="ipagination"
:loading="loading"
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
@change="handleTableChange">
:rowSelection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
@change="handleTableChange"
>
<span slot="action" slot-scope="text, record">
<a @click="handleEdit(record)">编辑</a>
<a-divider type="vertical" />
<a-dropdown>
<a class="ant-dropdown-link">
更多 <a-icon type="down" />
</a>
<a class="ant-dropdown-link"> 更多 <a-icon type="down" /> </a>
<a-menu slot="overlay">
<a-menu-item>
<a @click="handlePerssion(record.id)">授权</a>
......@@ -85,8 +102,6 @@
</a-menu>
</a-dropdown>
</span>
</a-table>
</div>
<!-- table区域-end -->
......@@ -98,96 +113,95 @@
</template>
<script>
import RoleModal from './modules/RoleModal'
import UserRoleModal from './modules/UserRoleModal'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import JDate from '@/components/jeecg/JDate'
import RoleModal from './modules/RoleModal'
import UserRoleModal from './modules/UserRoleModal'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import JDate from '@/components/jeecg/JDate'
export default {
name: "RoleList",
mixins:[JeecgListMixin],
components: {
RoleModal,
UserRoleModal,
JDate
},
data () {
return {
description: '角色管理页面',
// 查询条件
queryParam: {roleName:'',},
// 表头
columns: [
{
title: '#',
dataIndex: '',
key:'rowIndex',
width:60,
align:"center",
customRender:function (t,r,index) {
return parseInt(index)+1;
}
},
{
title: '角色名称',
align:"center",
dataIndex: 'roleName'
},
{
title: '角色编码',
align:"center",
dataIndex: 'roleCode'
},
{
title: '备注',
align:"center",
dataIndex: 'description'
},
{
title: '创建时间',
dataIndex: 'createTime',
align:"center",
sorter: true
},
{
title: '更新时间',
dataIndex: 'updateTime',
align:"center",
sorter: true
},
{
title: '操作',
dataIndex: 'action',
align:"center",
scopedSlots: { customRender: 'action' },
export default {
name: 'RoleList',
mixins: [JeecgListMixin],
components: {
RoleModal,
UserRoleModal,
JDate
},
data() {
return {
description: '角色管理页面',
// 查询条件
queryParam: { roleName: '' },
// 表头
columns: [
{
title: '#',
dataIndex: '',
key: 'rowIndex',
width: 60,
align: 'center',
customRender: function(t, r, index) {
return parseInt(index) + 1
}
],
url: {
list: "/sys/role/list",
delete: "/sys/role/delete",
deleteBatch: "/sys/role/deleteBatch",
exportXlsUrl: "/sys/role/exportXls",
importExcelUrl: "sys/role/importExcel",
},
{
title: '角色名称',
align: 'center',
dataIndex: 'roleName'
},
{
title: '角色编码',
align: 'center',
dataIndex: 'roleCode'
},
{
title: '备注',
align: 'center',
dataIndex: 'description'
},
{
title: '创建时间',
dataIndex: 'createTime',
align: 'center',
sorter: true
},
{
title: '更新时间',
dataIndex: 'updateTime',
align: 'center',
sorter: true
},
{
title: '操作',
dataIndex: 'action',
align: 'center',
scopedSlots: { customRender: 'action' }
}
],
url: {
list: '/sys/role/list',
delete: '/sys/role/delete',
deleteBatch: '/sys/role/deleteBatch',
exportXlsUrl: '/sys/role/exportXls',
importExcelUrl: 'sys/role/importExcel'
}
}
},
computed: {
importExcelUrl: function() {
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`
}
},
methods: {
handlePerssion: function(roleId) {
// alert(roleId);
this.$refs.modalUserRole.show(roleId)
},
computed: {
importExcelUrl: function(){
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
}
},
methods: {
handlePerssion: function(roleId){
// alert(roleId);
this.$refs.modalUserRole.show(roleId);
},
onChangeDate(date, dateString) {
console.log(date, dateString);
},
onChangeDate(date, dateString) {
console.log(date, dateString)
}
}
}
</script>
<style scoped>
@import '~@assets/less/common.less'
</style>
\ No newline at end of file
@import '~@assets/less/common.less';
</style>
差异被折叠。
差异被折叠。
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论