eslint; 收入合同
This commit is contained in:
+2
-2
@@ -1,3 +1,3 @@
|
|||||||
module.exports = {
|
module.exports = {
|
||||||
presets: ["@vue/cli-plugin-babel/preset"],
|
presets: ['@vue/cli-plugin-babel/preset'],
|
||||||
};
|
}
|
||||||
|
|||||||
+12
-12
@@ -6,35 +6,35 @@
|
|||||||
</a-config-provider>
|
</a-config-provider>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import zhCN from "ant-design-vue/lib/locale-provider/zh_CN";
|
import zhCN from 'ant-design-vue/lib/locale-provider/zh_CN'
|
||||||
import enquireScreen from "@/utils/device";
|
import enquireScreen from '@/utils/device'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
locale: zhCN
|
locale: zhCN
|
||||||
};
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
let that = this;
|
let that = this
|
||||||
enquireScreen(deviceType => {
|
enquireScreen(deviceType => {
|
||||||
// tablet
|
// tablet
|
||||||
if (deviceType === 0) {
|
if (deviceType === 0) {
|
||||||
that.$store.commit("TOGGLE_DEVICE", "mobile");
|
that.$store.commit('TOGGLE_DEVICE', 'mobile')
|
||||||
that.$store.dispatch("setSidebar", false);
|
that.$store.dispatch('setSidebar', false)
|
||||||
}
|
}
|
||||||
// mobile
|
// mobile
|
||||||
else if (deviceType === 1) {
|
else if (deviceType === 1) {
|
||||||
that.$store.commit("TOGGLE_DEVICE", "mobile");
|
that.$store.commit('TOGGLE_DEVICE', 'mobile')
|
||||||
that.$store.dispatch("setSidebar", false);
|
that.$store.dispatch('setSidebar', false)
|
||||||
} else {
|
} else {
|
||||||
that.$store.commit("TOGGLE_DEVICE", "desktop");
|
that.$store.commit('TOGGLE_DEVICE', 'desktop')
|
||||||
that.$store.dispatch("setSidebar", true);
|
that.$store.dispatch('setSidebar', true)
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
})
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
</script>
|
</script>
|
||||||
<style>
|
<style>
|
||||||
#app {
|
#app {
|
||||||
|
|||||||
+56
-56
@@ -1,100 +1,100 @@
|
|||||||
import { getAction, deleteAction, postAction, httpAction } from '@/api/manage'
|
import { getAction, deleteAction, postAction, httpAction } from '@/api/manage'
|
||||||
import Vue from 'vue'
|
import Vue from 'vue'
|
||||||
import {UI_CACHE_DB_DICT_DATA } from "@/store/mutation-types"
|
import {UI_CACHE_DB_DICT_DATA } from '@/store/mutation-types'
|
||||||
|
|
||||||
//角色管理
|
//角色管理
|
||||||
const addRole = (params)=>postAction("/sys/role/add",params);
|
const addRole = (params)=>postAction('/sys/role/add',params)
|
||||||
const editRole = (params)=>postAction("/sys/role/edit",params);
|
const editRole = (params)=>postAction('/sys/role/edit',params)
|
||||||
const checkRoleCode = (params)=>getAction("/sys/role/checkRoleCode",params);
|
const checkRoleCode = (params)=>getAction('/sys/role/checkRoleCode',params)
|
||||||
const queryallRoles = (params)=> getAction('sys/role/treeList',params)
|
const queryallRoles = (params)=> getAction('sys/role/treeList',params)
|
||||||
const queryall = (params)=>getAction("/sys/role/queryall",params);
|
const queryall = (params)=>getAction('/sys/role/queryall',params)
|
||||||
|
|
||||||
//用户管理
|
//用户管理
|
||||||
const addUser = (params)=>postAction("/sys/user/add",params);
|
const addUser = (params)=>postAction('/sys/user/add',params)
|
||||||
const editUser = (params)=>postAction("/sys/user/edit",params);
|
const editUser = (params)=>postAction('/sys/user/edit',params)
|
||||||
const queryUserRole = (params)=>getAction("/sys/user/queryUserRole",params);
|
const queryUserRole = (params)=>getAction('/sys/user/queryUserRole',params)
|
||||||
const getUserList = (params)=>getAction("/sys/user/page",params);
|
const getUserList = (params)=>getAction('/sys/user/page',params)
|
||||||
// 获取全部用户列表
|
// 获取全部用户列表
|
||||||
const getAllUserList = (params) => getAction("/sys/user/list", params);
|
const getAllUserList = (params) => getAction('/sys/user/list', params)
|
||||||
const frozenBatch = (params)=>postAction("/sys/user/frozenBatch",params);
|
const frozenBatch = (params)=>postAction('/sys/user/frozenBatch',params)
|
||||||
//验证用户是否存在
|
//验证用户是否存在
|
||||||
const checkOnlyUser = (params)=>getAction("/sys/user/checkOnlyUser",params);
|
const checkOnlyUser = (params)=>getAction('/sys/user/checkOnlyUser',params)
|
||||||
//改变密码
|
//改变密码
|
||||||
const changePassword = (params)=>postAction("/sys/user/changePassword",params);
|
const changePassword = (params)=>postAction('/sys/user/changePassword',params)
|
||||||
// 重置密码
|
// 重置密码
|
||||||
const resetUserPassword = (params) => postAction('/sys/user/resetPassword',params)
|
const resetUserPassword = (params) => postAction('/sys/user/resetPassword',params)
|
||||||
|
|
||||||
//权限管理
|
//权限管理
|
||||||
const addPermission= (params)=>postAction("/sys/permission/add",params);
|
const addPermission= (params)=>postAction('/sys/permission/add',params)
|
||||||
const editPermission= (params)=>postAction("/sys/permission/edit",params);
|
const editPermission= (params)=>postAction('/sys/permission/edit',params)
|
||||||
const getPermissionList = (params)=>getAction("/sys/permission/page",params);
|
const getPermissionList = (params)=>getAction('/sys/permission/page',params)
|
||||||
const getSystemMenuList = (params)=>getAction("/sys/permission/getSystemMenuList",params);
|
const getSystemMenuList = (params)=>getAction('/sys/permission/getSystemMenuList',params)
|
||||||
const getSystemSubmenu = (params)=>getAction("/sys/permission/getSystemSubmenu",params);
|
const getSystemSubmenu = (params)=>getAction('/sys/permission/getSystemSubmenu',params)
|
||||||
const getSystemSubmenuBatch = (params) => getAction('/sys/permission/getSystemSubmenuBatch', params)
|
const getSystemSubmenuBatch = (params) => getAction('/sys/permission/getSystemSubmenuBatch', params)
|
||||||
const queryTreeList = (params)=>getAction("/sys/permission/queryTreeList",params);
|
const queryTreeList = (params)=>getAction('/sys/permission/queryTreeList',params)
|
||||||
const queryTreeListForRole = (params)=>getAction("/sys/role/queryTreeList",params);
|
const queryTreeListForRole = (params)=>getAction('/sys/role/queryTreeList',params)
|
||||||
const queryListAsync = (params)=>getAction("/sys/permission/queryListAsync",params);
|
const queryListAsync = (params)=>getAction('/sys/permission/queryListAsync',params)
|
||||||
const queryRolePermission = (params)=>getAction("/sys/permission/queryRolePermission",params);
|
const queryRolePermission = (params)=>getAction('/sys/permission/queryRolePermission',params)
|
||||||
const saveRolePermission = (params)=>postAction("/sys/permission/saveRolePermission",params);
|
const saveRolePermission = (params)=>postAction('/sys/permission/saveRolePermission',params)
|
||||||
const queryPermissionsByUser = ()=>getAction("/sys/permission/getUserPermissionByToken");
|
const queryPermissionsByUser = ()=>getAction('/sys/permission/getUserPermissionByToken')
|
||||||
const loadAllRoleIds = (params)=>getAction("/sys/permission/loadAllRoleIds",params);
|
const loadAllRoleIds = (params)=>getAction('/sys/permission/loadAllRoleIds',params)
|
||||||
const getPermissionRuleList = (params)=>getAction("/sys/permission/getPermRuleListByPermId",params);
|
const getPermissionRuleList = (params)=>getAction('/sys/permission/getPermRuleListByPermId',params)
|
||||||
const queryPermissionRule = (params)=>getAction("/sys/permission/queryPermissionRule",params);
|
const queryPermissionRule = (params)=>getAction('/sys/permission/queryPermissionRule',params)
|
||||||
|
|
||||||
// 部门管理
|
// 部门管理
|
||||||
const queryDepartTreeList = (params)=>getAction("/sys/sysDepart/queryTreeList",params);
|
const queryDepartTreeList = (params)=>getAction('/sys/sysDepart/queryTreeList',params)
|
||||||
const queryIdTree = (params)=>getAction("/sys/sysDepart/queryIdTree",params);
|
const queryIdTree = (params)=>getAction('/sys/sysDepart/queryIdTree',params)
|
||||||
const queryParentName = (params)=>getAction("/sys/sysDepart/queryParentName",params);
|
const queryParentName = (params)=>getAction('/sys/sysDepart/queryParentName',params)
|
||||||
const searchByKeywords = (params)=>getAction("/sys/sysDepart/searchBy",params);
|
const searchByKeywords = (params)=>getAction('/sys/sysDepart/searchBy',params)
|
||||||
const deleteByDepartId = (params)=>deleteAction("/sys/sysDepart/delete",params);
|
const deleteByDepartId = (params)=>deleteAction('/sys/sysDepart/delete',params)
|
||||||
|
|
||||||
//二级部门管理
|
//二级部门管理
|
||||||
const queryDepartPermission = (params)=>getAction("/sys/permission/queryDepartPermission",params);
|
const queryDepartPermission = (params)=>getAction('/sys/permission/queryDepartPermission',params)
|
||||||
const saveDepartPermission = (params)=>postAction("/sys/permission/saveDepartPermission",params);
|
const saveDepartPermission = (params)=>postAction('/sys/permission/saveDepartPermission',params)
|
||||||
const queryTreeListForDeptRole = (params)=>getAction("/sys/sysDepartPermission/queryTreeListForDeptRole",params);
|
const queryTreeListForDeptRole = (params)=>getAction('/sys/sysDepartPermission/queryTreeListForDeptRole',params)
|
||||||
const queryDeptRolePermission = (params)=>getAction("/sys/sysDepartPermission/queryDeptRolePermission",params);
|
const queryDeptRolePermission = (params)=>getAction('/sys/sysDepartPermission/queryDeptRolePermission',params)
|
||||||
const saveDeptRolePermission = (params)=>postAction("/sys/sysDepartPermission/saveDeptRolePermission",params);
|
const saveDeptRolePermission = (params)=>postAction('/sys/sysDepartPermission/saveDeptRolePermission',params)
|
||||||
const queryMyDepartTreeList = (params)=>getAction("/sys/sysDepart/queryMyDeptTreeList",params);
|
const queryMyDepartTreeList = (params)=>getAction('/sys/sysDepart/queryMyDeptTreeList',params)
|
||||||
|
|
||||||
//日志管理
|
//日志管理
|
||||||
//const getLogList = (params)=>getAction("/sys/log/page",params);
|
//const getLogList = (params)=>getAction("/sys/log/page",params);
|
||||||
const deleteLog = (params)=>deleteAction("/sys/log/delete",params);
|
const deleteLog = (params)=>deleteAction('/sys/log/delete',params)
|
||||||
const deleteLogList = (params)=>deleteAction("/sys/log/deleteBatch",params);
|
const deleteLogList = (params)=>deleteAction('/sys/log/deleteBatch',params)
|
||||||
|
|
||||||
//数据字典
|
//数据字典
|
||||||
const addDict = (params)=>postAction("/sys/dict/add",params);
|
const addDict = (params)=>postAction('/sys/dict/add',params)
|
||||||
const editDict = (params)=>postAction("/sys/dict/edit",params);
|
const editDict = (params)=>postAction('/sys/dict/edit',params)
|
||||||
const treeList = (params)=>getAction("/sys/dict/treeList",params);
|
const treeList = (params)=>getAction('/sys/dict/treeList',params)
|
||||||
const addDictItem = (params)=>postAction("/sys/dictItem/add",params);
|
const addDictItem = (params)=>postAction('/sys/dictItem/add',params)
|
||||||
const editDictItem = (params)=>postAction("/sys/dictItem/edit",params);
|
const editDictItem = (params)=>postAction('/sys/dictItem/edit',params)
|
||||||
|
|
||||||
//字典标签专用(通过code获取字典数组)
|
//字典标签专用(通过code获取字典数组)
|
||||||
export const ajaxGetDictItems = (code, params)=>getAction(`/sys/dict/getDictItems/${code}`,params);
|
export const ajaxGetDictItems = (code, params)=>getAction(`/sys/dict/getDictItems/${code}`,params)
|
||||||
//从缓存中获取字典配置
|
//从缓存中获取字典配置
|
||||||
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]
|
||||||
return dictItems;
|
return dictItems
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//系统通告
|
//系统通告
|
||||||
const doReleaseData = (params)=>getAction("/sys/annountCement/doReleaseData",params);
|
const doReleaseData = (params)=>getAction('/sys/annountCement/doReleaseData',params)
|
||||||
const doReovkeData = (params)=>getAction("/sys/annountCement/doReovkeData",params);
|
const doReovkeData = (params)=>getAction('/sys/annountCement/doReovkeData',params)
|
||||||
//获取系统访问量
|
//获取系统访问量
|
||||||
const getLoginfo = (params)=>getAction("/sys/loginfo",params);
|
const getLoginfo = (params)=>getAction('/sys/loginfo',params)
|
||||||
const getVisitInfo = (params)=>getAction("/sys/visitInfo",params);
|
const getVisitInfo = (params)=>getAction('/sys/visitInfo',params)
|
||||||
|
|
||||||
// 根据部门主键查询用户信息
|
// 根据部门主键查询用户信息
|
||||||
const queryUserByDepId = (params)=>getAction("/sys/user/queryUserByDepId",params);
|
const queryUserByDepId = (params)=>getAction('/sys/user/queryUserByDepId',params)
|
||||||
|
|
||||||
// 重复校验
|
// 重复校验
|
||||||
const duplicateCheck = (params)=>getAction("/sys/duplicate/check",params);
|
const duplicateCheck = (params)=>getAction('/sys/duplicate/check',params)
|
||||||
// 加载分类字典
|
// 加载分类字典
|
||||||
const loadCategoryData = (params)=>getAction("/sys/category/loadAllData",params);
|
const loadCategoryData = (params)=>getAction('/sys/category/loadAllData',params)
|
||||||
const checkRuleByCode = (params) => getAction('/sys/checkRule/checkByCode', params)
|
const checkRuleByCode = (params) => getAction('/sys/checkRule/checkByCode', params)
|
||||||
//加载我的通告信息
|
//加载我的通告信息
|
||||||
const getUserNoticeInfo= (params)=>getAction("/sys/sysAnnouncementSend/getMyAnnouncementSend",params);
|
const getUserNoticeInfo= (params)=>getAction('/sys/sysAnnouncementSend/getMyAnnouncementSend',params)
|
||||||
const getTransitURL = url => `/sys/common/transitRESTful?url=${encodeURIComponent(url)}`
|
const getTransitURL = url => `/sys/common/transitRESTful?url=${encodeURIComponent(url)}`
|
||||||
|
|
||||||
// 通过文件的id获取文件的相应信息
|
// 通过文件的id获取文件的相应信息
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import {getAction} from "@api/manage";
|
import {getAction} from '@api/manage'
|
||||||
|
|
||||||
// 通过用户id获取用户信息
|
// 通过用户id获取用户信息
|
||||||
const getUserInfo = (params) => getAction('/sys/user/queryById',params)
|
const getUserInfo = (params) => getAction('/sys/user/queryById',params)
|
||||||
|
|||||||
+3
-3
@@ -169,13 +169,13 @@ export function getFileAccessHttpUrl(avatar,subStr) {
|
|||||||
if(!subStr) subStr = 'http'
|
if(!subStr) subStr = 'http'
|
||||||
try {
|
try {
|
||||||
if(avatar && avatar.startsWith(subStr)){
|
if(avatar && avatar.startsWith(subStr)){
|
||||||
return avatar;
|
return avatar
|
||||||
}else{
|
}else{
|
||||||
if(avatar && avatar.length>0 && avatar.indexOf('[')==-1){
|
if(avatar && avatar.length>0 && avatar.indexOf('[')==-1){
|
||||||
return window._CONFIG['staticDomainURL'] + "/" + avatar;
|
return window._CONFIG['staticDomainURL'] + '/' + avatar
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}catch(err){
|
}catch(err){
|
||||||
return;
|
return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Binary file not shown.
|
After Width: | Height: | Size: 4.1 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 5.7 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 2.4 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 1.6 KiB |
@@ -78,6 +78,7 @@
|
|||||||
font-weight: 700;
|
font-weight: 700;
|
||||||
text-align: left;
|
text-align: left;
|
||||||
color: #333333;
|
color: #333333;
|
||||||
|
display: flex;
|
||||||
position: relative;
|
position: relative;
|
||||||
|
|
||||||
&-text {
|
&-text {
|
||||||
@@ -93,5 +94,6 @@
|
|||||||
width: 10px;
|
width: 10px;
|
||||||
height: 10px;
|
height: 10px;
|
||||||
background: #069f99;
|
background: #069f99;
|
||||||
|
border-radius: 5px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -104,11 +104,11 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
name: "HelloWorld",
|
name: 'HelloWorld',
|
||||||
props: {
|
props: {
|
||||||
msg: String,
|
msg: String,
|
||||||
},
|
},
|
||||||
};
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<!-- Add "scoped" attribute to limit CSS to this component only -->
|
<!-- Add "scoped" attribute to limit CSS to this component only -->
|
||||||
|
|||||||
@@ -155,65 +155,65 @@ const logisticsInfoList = [
|
|||||||
postPerson: '李四',
|
postPerson: '李四',
|
||||||
postTime: '2021年10月21',
|
postTime: '2021年10月21',
|
||||||
emsOrSF: 'EMS',
|
emsOrSF: 'EMS',
|
||||||
postNo: "123456"
|
postNo: '123456'
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
const columns = [
|
const columns = [
|
||||||
{
|
{
|
||||||
title: '开票人',
|
title: '开票人',
|
||||||
align: "center",
|
align: 'center',
|
||||||
dataIndex: '',
|
dataIndex: '',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '日期',
|
title: '日期',
|
||||||
align: "center",
|
align: 'center',
|
||||||
dataIndex: '',
|
dataIndex: '',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '金额(元)',
|
title: '金额(元)',
|
||||||
align: "center",
|
align: 'center',
|
||||||
dataIndex: '',
|
dataIndex: '',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '票号',
|
title: '票号',
|
||||||
align: "center",
|
align: 'center',
|
||||||
dataIndex: '',
|
dataIndex: '',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '项目',
|
title: '项目',
|
||||||
align: "center",
|
align: 'center',
|
||||||
dataIndex: '',
|
dataIndex: '',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '邮寄人',
|
title: '邮寄人',
|
||||||
align: "center",
|
align: 'center',
|
||||||
dataIndex: '',
|
dataIndex: '',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '快递',
|
title: '快递',
|
||||||
align: "center",
|
align: 'center',
|
||||||
dataIndex: '',
|
dataIndex: '',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '快递单号',
|
title: '快递单号',
|
||||||
align: "center",
|
align: 'center',
|
||||||
dataIndex: 'piaoNo',
|
dataIndex: 'piaoNo',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '操作',
|
title: '操作',
|
||||||
align: "center",
|
align: 'center',
|
||||||
dataIndex: '',
|
dataIndex: '',
|
||||||
scopedSlots: {customRender: 'action'}
|
scopedSlots: {customRender: 'action'}
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
export default {
|
export default {
|
||||||
name: "ProjectDetailModal",
|
name: 'ProjectDetailModal',
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
description: "项目详情模态框",
|
description: '项目详情模态框',
|
||||||
width: 800,
|
width: 800,
|
||||||
visible: false,
|
visible: false,
|
||||||
title: "项目信息",
|
title: '项目信息',
|
||||||
// 当前项目id
|
// 当前项目id
|
||||||
currentProjectId: '',
|
currentProjectId: '',
|
||||||
// 基本信息
|
// 基本信息
|
||||||
@@ -256,7 +256,7 @@ export default {
|
|||||||
* 查看物流
|
* 查看物流
|
||||||
* */
|
* */
|
||||||
lookLogistics() {
|
lookLogistics() {
|
||||||
window.open("http://www.api.kuaidi100.com", "_blank")
|
window.open('http://www.api.kuaidi100.com', '_blank')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,13 +1,13 @@
|
|||||||
<template>
|
<template>
|
||||||
<j-modal
|
<j-modal
|
||||||
:title="title"
|
:title="title"
|
||||||
:width="width"
|
:width="width"
|
||||||
:visible="visible"
|
:visible="visible"
|
||||||
:confirmLoading="confirmLoading"
|
:confirmLoading="confirmLoading"
|
||||||
switchFullscreen
|
switchFullscreen
|
||||||
@ok="handleOk"
|
@ok="handleOk"
|
||||||
@cancel="handleCancel"
|
@cancel="handleCancel"
|
||||||
cancelText="关闭">
|
cancelText="关闭">
|
||||||
<div class="table-page-search-wrapper">
|
<div class="table-page-search-wrapper">
|
||||||
<a-form layout="inline" @keyup.enter.native="searchQuery">
|
<a-form layout="inline" @keyup.enter.native="searchQuery">
|
||||||
<a-row>
|
<a-row>
|
||||||
@@ -27,17 +27,17 @@
|
|||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<a-table
|
<a-table
|
||||||
ref="table"
|
ref="table"
|
||||||
size="middle"
|
size="middle"
|
||||||
bordered
|
bordered
|
||||||
rowKey="id"
|
rowKey="id"
|
||||||
:columns="columns"
|
:columns="columns"
|
||||||
:dataSource="dataSource"
|
:dataSource="dataSource"
|
||||||
:pagination="ipagination"
|
:pagination="ipagination"
|
||||||
:loading="loading"
|
:loading="loading"
|
||||||
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange, type: 'radio'}"
|
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange, type: 'radio'}"
|
||||||
@change="handleTableChange"
|
@change="handleTableChange"
|
||||||
class="j-table-force-nowrap">
|
class="j-table-force-nowrap">
|
||||||
<template slot="htmlSlot" slot-scope="text">
|
<template slot="htmlSlot" slot-scope="text">
|
||||||
<div v-html="text"></div>
|
<div v-html="text"></div>
|
||||||
</template>
|
</template>
|
||||||
@@ -51,7 +51,7 @@
|
|||||||
<j-ellipsis @click.native="uploadFile(record.chargeNoticeFileId)" style="color:#219AFF;cursor: pointer"
|
<j-ellipsis @click.native="uploadFile(record.chargeNoticeFileId)" style="color:#219AFF;cursor: pointer"
|
||||||
:value="text" :length="20"/>
|
:value="text" :length="20"/>
|
||||||
</template>
|
</template>
|
||||||
<template slot="text" slot-scope="text,record">
|
<template slot="text" slot-scope="text">
|
||||||
<j-ellipsis :value="text" :length="30"></j-ellipsis>
|
<j-ellipsis :value="text" :length="30"></j-ellipsis>
|
||||||
</template>
|
</template>
|
||||||
</a-table>
|
</a-table>
|
||||||
@@ -72,7 +72,7 @@ export default {
|
|||||||
visible: false,
|
visible: false,
|
||||||
confirmLoading: false,
|
confirmLoading: false,
|
||||||
url: {
|
url: {
|
||||||
list: '/company/payCompanyManagement/list',
|
list: '/company/payCompanyManagement/list'
|
||||||
},
|
},
|
||||||
selectedCompany: {},
|
selectedCompany: {},
|
||||||
selectedRowKeys: [],
|
selectedRowKeys: [],
|
||||||
|
|||||||
@@ -20,7 +20,7 @@
|
|||||||
<contact-management-module ref="contactForm"
|
<contact-management-module ref="contactForm"
|
||||||
is-company-disabled
|
is-company-disabled
|
||||||
:selected-company="selectedCompany"
|
:selected-company="selectedCompany"
|
||||||
v-on="$listeners">
|
@ok="addContactsOk">
|
||||||
</contact-management-module>
|
</contact-management-module>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@@ -59,6 +59,7 @@ export default {
|
|||||||
return {
|
return {
|
||||||
contactsList: [], // 该企业下联系人列表
|
contactsList: [], // 该企业下联系人列表
|
||||||
isFirstOpen: true, // 编辑状态下是否为第一次打开
|
isFirstOpen: true, // 编辑状态下是否为第一次打开
|
||||||
|
contactId: this.value
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
@@ -114,11 +115,16 @@ export default {
|
|||||||
}
|
}
|
||||||
this.$message.warn('请先选择来款企业再为该企业新建联系人')
|
this.$message.warn('请先选择来款企业再为该企业新建联系人')
|
||||||
},
|
},
|
||||||
|
addContactsOk(id) {
|
||||||
|
this.getContactsList()
|
||||||
|
this.$emit('change', id)
|
||||||
|
this.$emit('ok')
|
||||||
|
},
|
||||||
// 下拉框的搜索
|
// 下拉框的搜索
|
||||||
filterOption(input, option) {
|
filterOption(input, option) {
|
||||||
return (
|
return (
|
||||||
option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
|
option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
|
||||||
);
|
)
|
||||||
},
|
},
|
||||||
handleDropdownOpen() {
|
handleDropdownOpen() {
|
||||||
if (this.isFirstOpen && this.initContacts && this.initContacts.hasOwnProperty('id')) {
|
if (this.isFirstOpen && this.initContacts && this.initContacts.hasOwnProperty('id')) {
|
||||||
@@ -143,5 +149,6 @@ export default {
|
|||||||
.form-btn {
|
.form-btn {
|
||||||
padding-top: 1px;
|
padding-top: 1px;
|
||||||
padding-left: 8px;
|
padding-left: 8px;
|
||||||
|
margin-bottom: -1px;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ export default {
|
|||||||
filterOption(input, option) {
|
filterOption(input, option) {
|
||||||
return (
|
return (
|
||||||
option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
|
option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
|
||||||
);
|
)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
model: {
|
model: {
|
||||||
|
|||||||
@@ -21,7 +21,7 @@
|
|||||||
import {ajaxGetDictItems,getDictItemsFromCache} from '@/api/api'
|
import {ajaxGetDictItems,getDictItemsFromCache} from '@/api/api'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "JDictSelectTag",
|
name: 'JDictSelectTag',
|
||||||
props: {
|
props: {
|
||||||
dictCode: String,
|
dictCode: String,
|
||||||
placeholder: String,
|
placeholder: String,
|
||||||
@@ -37,7 +37,7 @@
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
dictOptions: [],
|
dictOptions: [],
|
||||||
tagType:""
|
tagType:''
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch:{
|
watch:{
|
||||||
@@ -50,8 +50,8 @@
|
|||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
// console.log(this.dictCode);
|
// console.log(this.dictCode);
|
||||||
if(!this.type || this.type==="list"){
|
if(!this.type || this.type==='list'){
|
||||||
this.tagType = "select"
|
this.tagType = 'select'
|
||||||
}else{
|
}else{
|
||||||
this.tagType = this.type
|
this.tagType = this.type
|
||||||
}
|
}
|
||||||
@@ -62,7 +62,7 @@
|
|||||||
getValueSting(){
|
getValueSting(){
|
||||||
// update-begin author:wangshuai date:20200601 for: 不显示placeholder的文字 ------
|
// update-begin author:wangshuai date:20200601 for: 不显示placeholder的文字 ------
|
||||||
// 当有null或“” placeholder不显示
|
// 当有null或“” placeholder不显示
|
||||||
return this.value != null ? this.value.toString() : undefined;
|
return this.value != null ? this.value.toString() : undefined
|
||||||
// update-end author:wangshuai date:20200601 for: 不显示placeholder的文字 ------
|
// update-end author:wangshuai date:20200601 for: 不显示placeholder的文字 ------
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@@ -70,7 +70,7 @@
|
|||||||
initDictData() {
|
initDictData() {
|
||||||
//优先从缓存中读取字典配置
|
//优先从缓存中读取字典配置
|
||||||
if(getDictItemsFromCache(this.dictCode)){
|
if(getDictItemsFromCache(this.dictCode)){
|
||||||
this.dictOptions = getDictItemsFromCache(this.dictCode);
|
this.dictOptions = getDictItemsFromCache(this.dictCode)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -78,22 +78,22 @@
|
|||||||
ajaxGetDictItems(this.dictCode, null).then((res) => {
|
ajaxGetDictItems(this.dictCode, null).then((res) => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
// console.log(res.result);
|
// console.log(res.result);
|
||||||
this.dictOptions = res.result;
|
this.dictOptions = res.result
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
handleInput(e) {
|
handleInput(e) {
|
||||||
let val;
|
let val
|
||||||
if(this.tagType=="radio"){
|
if(this.tagType=='radio'){
|
||||||
val = e.target.value
|
val = e.target.value
|
||||||
}else{
|
}else{
|
||||||
val = e
|
val = e
|
||||||
}
|
}
|
||||||
|
|
||||||
if(this.triggerChange){
|
if(this.triggerChange){
|
||||||
this.$emit('change', val);
|
this.$emit('change', val)
|
||||||
}else{
|
}else{
|
||||||
this.$emit('input', val);
|
this.$emit('input', val)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
setCurrentDictOptions(dictOptions){
|
setCurrentDictOptions(dictOptions){
|
||||||
|
|||||||
@@ -14,18 +14,18 @@ import {getAction} from '@/api/manage'
|
|||||||
*/
|
*/
|
||||||
export async function initDictOptions(dictCode) {
|
export async function initDictOptions(dictCode) {
|
||||||
if (!dictCode) {
|
if (!dictCode) {
|
||||||
return '字典Code不能为空!';
|
return '字典Code不能为空!'
|
||||||
}
|
}
|
||||||
//优先从缓存中读取字典配置
|
//优先从缓存中读取字典配置
|
||||||
if(getDictItemsFromCache(dictCode)){
|
if(getDictItemsFromCache(dictCode)){
|
||||||
let res = {}
|
let res = {}
|
||||||
res.result = getDictItemsFromCache(dictCode);
|
res.result = getDictItemsFromCache(dictCode)
|
||||||
res.success = true;
|
res.success = true
|
||||||
return res;
|
return res
|
||||||
}
|
}
|
||||||
//获取字典数组
|
//获取字典数组
|
||||||
let res = await ajaxGetDictItems(dictCode);
|
let res = await ajaxGetDictItems(dictCode)
|
||||||
return res;
|
return res
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -80,25 +80,25 @@ export function filterMultiDictText(dictOptions, text) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(!text || text=='null' || !dictOptions || dictOptions.length==0){
|
if(!text || text=='null' || !dictOptions || dictOptions.length==0){
|
||||||
return ""
|
return ''
|
||||||
}
|
}
|
||||||
let re = "";
|
let re = ''
|
||||||
text = text.toString()
|
text = text.toString()
|
||||||
let arr = text.split(",")
|
let arr = text.split(',')
|
||||||
dictOptions.forEach(function (option) {
|
dictOptions.forEach(function (option) {
|
||||||
if(option){
|
if(option){
|
||||||
for(let i=0;i<arr.length;i++){
|
for(let i=0;i<arr.length;i++){
|
||||||
if (arr[i] === option.value) {
|
if (arr[i] === option.value) {
|
||||||
re += option.text+",";
|
re += option.text+','
|
||||||
break;
|
break
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
})
|
||||||
if(re==""){
|
if(re==''){
|
||||||
return text;
|
return text
|
||||||
}
|
}
|
||||||
return re.substring(0,re.length-1);
|
return re.substring(0,re.length-1)
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -108,16 +108,16 @@ export function filterMultiDictText(dictOptions, text) {
|
|||||||
*/
|
*/
|
||||||
export function filterDictTextByCache(dictCode, key) {
|
export function filterDictTextByCache(dictCode, key) {
|
||||||
if(key==null ||key.length==0){
|
if(key==null ||key.length==0){
|
||||||
return;
|
return
|
||||||
}
|
}
|
||||||
if (!dictCode) {
|
if (!dictCode) {
|
||||||
return '字典Code不能为空!';
|
return '字典Code不能为空!'
|
||||||
}
|
}
|
||||||
//优先从缓存中读取字典配置
|
//优先从缓存中读取字典配置
|
||||||
if(getDictItemsFromCache(dictCode)){
|
if(getDictItemsFromCache(dictCode)){
|
||||||
let item = getDictItemsFromCache(dictCode).filter(t => t["value"] == key)
|
let item = getDictItemsFromCache(dictCode).filter(t => t['value'] == key)
|
||||||
if(item && item.length>0){
|
if(item && item.length>0){
|
||||||
return item[0]["text"]
|
return item[0]['text']
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -127,7 +127,7 @@ export async function getDictItems(dictCode, params) {
|
|||||||
//优先从缓存中读取字典配置
|
//优先从缓存中读取字典配置
|
||||||
if(getDictItemsFromCache(dictCode)){
|
if(getDictItemsFromCache(dictCode)){
|
||||||
let desformDictItems = getDictItemsFromCache(dictCode).map(item => ({...item, label: item.text}))
|
let desformDictItems = getDictItemsFromCache(dictCode).map(item => ({...item, label: item.text}))
|
||||||
return desformDictItems;
|
return desformDictItems
|
||||||
}
|
}
|
||||||
|
|
||||||
//缓存中没有,就请求后台
|
//缓存中没有,就请求后台
|
||||||
|
|||||||
@@ -51,13 +51,13 @@
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
dictOptions: [],
|
dictOptions: [],
|
||||||
tagType:"",
|
tagType:'',
|
||||||
arrayValue:!this.value?[]:this.value.split(this.spliter)
|
arrayValue:!this.value?[]:this.value.split(this.spliter)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
if(!this.type || this.type==="list_multi"){
|
if(!this.type || this.type==='list_multi'){
|
||||||
this.tagType = "select"
|
this.tagType = 'select'
|
||||||
}else{
|
}else{
|
||||||
this.tagType = this.type
|
this.tagType = this.type
|
||||||
}
|
}
|
||||||
@@ -66,7 +66,7 @@
|
|||||||
},
|
},
|
||||||
watch:{
|
watch:{
|
||||||
options: function(val){
|
options: function(val){
|
||||||
this.setCurrentDictOptions(val);
|
this.setCurrentDictOptions(val)
|
||||||
},
|
},
|
||||||
dictCode:{
|
dictCode:{
|
||||||
immediate:true,
|
immediate:true,
|
||||||
@@ -96,14 +96,14 @@
|
|||||||
//根据字典Code, 初始化字典数组
|
//根据字典Code, 初始化字典数组
|
||||||
ajaxGetDictItems(this.dictCode, null).then((res) => {
|
ajaxGetDictItems(this.dictCode, null).then((res) => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
this.dictOptions = res.result;
|
this.dictOptions = res.result
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
onChange (selectedValue) {
|
onChange (selectedValue) {
|
||||||
this.$emit('change', selectedValue.join(this.spliter));
|
this.$emit('change', selectedValue.join(this.spliter))
|
||||||
},
|
},
|
||||||
setCurrentDictOptions(dictOptions){
|
setCurrentDictOptions(dictOptions){
|
||||||
this.dictOptions = dictOptions
|
this.dictOptions = dictOptions
|
||||||
|
|||||||
@@ -40,7 +40,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { ajaxGetDictItems,getDictItemsFromCache } from '@/api/api'
|
import { ajaxGetDictItems,getDictItemsFromCache } from '@/api/api'
|
||||||
import debounce from 'lodash/debounce';
|
import debounce from 'lodash/debounce'
|
||||||
import { getAction } from '../../api/manage'
|
import { getAction } from '../../api/manage'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
@@ -53,7 +53,7 @@
|
|||||||
async: Boolean,
|
async: Boolean,
|
||||||
placeholder:{
|
placeholder:{
|
||||||
type:String,
|
type:String,
|
||||||
default:"请选择",
|
default:'请选择',
|
||||||
required:false
|
required:false
|
||||||
},
|
},
|
||||||
popContainer:{
|
popContainer:{
|
||||||
@@ -68,8 +68,8 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
data(){
|
data(){
|
||||||
this.loadData = debounce(this.loadData, 800);//消抖
|
this.loadData = debounce(this.loadData, 800)//消抖
|
||||||
this.lastLoad = 0;
|
this.lastLoad = 0
|
||||||
return {
|
return {
|
||||||
loading:false,
|
loading:false,
|
||||||
selectedValue:[],
|
selectedValue:[],
|
||||||
@@ -78,10 +78,10 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
created(){
|
created(){
|
||||||
this.initDictData();
|
this.initDictData()
|
||||||
},
|
},
|
||||||
watch:{
|
watch:{
|
||||||
"value":{
|
'value':{
|
||||||
immediate:true,
|
immediate:true,
|
||||||
handler(val){
|
handler(val){
|
||||||
if(!val){
|
if(!val){
|
||||||
@@ -96,7 +96,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"dict":{
|
'dict':{
|
||||||
handler(){
|
handler(){
|
||||||
this.initDictData()
|
this.initDictData()
|
||||||
}
|
}
|
||||||
@@ -114,7 +114,7 @@
|
|||||||
initSelectValue(){
|
initSelectValue(){
|
||||||
if(this.async){
|
if(this.async){
|
||||||
if(!this.selectedAsyncValue || !this.selectedAsyncValue.key || this.selectedAsyncValue.key!=this.value){
|
if(!this.selectedAsyncValue || !this.selectedAsyncValue.key || this.selectedAsyncValue.key!=this.value){
|
||||||
console.log("这才请求后台")
|
console.log('这才请求后台')
|
||||||
getAction(`/sys/dict/loadDictItem/${this.dict}`,{key:this.value}).then(res=>{
|
getAction(`/sys/dict/loadDictItem/${this.dict}`,{key:this.value}).then(res=>{
|
||||||
if(res.success){
|
if(res.success){
|
||||||
let obj = {
|
let obj = {
|
||||||
@@ -130,7 +130,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
loadData(value){
|
loadData(value){
|
||||||
console.log("数据加载",value)
|
console.log('数据加载',value)
|
||||||
this.lastLoad +=1
|
this.lastLoad +=1
|
||||||
const currentLoad = this.lastLoad
|
const currentLoad = this.lastLoad
|
||||||
this.options = []
|
this.options = []
|
||||||
@@ -143,7 +143,7 @@
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
this.options = res.result
|
this.options = res.result
|
||||||
console.log("我是第一个",res)
|
console.log('我是第一个',res)
|
||||||
}else{
|
}else{
|
||||||
this.$message.warning(res.message)
|
this.$message.warning(res.message)
|
||||||
}
|
}
|
||||||
@@ -167,16 +167,16 @@
|
|||||||
}else{
|
}else{
|
||||||
dictStr = this.dict
|
dictStr = this.dict
|
||||||
}
|
}
|
||||||
if (this.dict.indexOf(",") == -1) {
|
if (this.dict.indexOf(',') == -1) {
|
||||||
//优先从缓存中读取字典配置
|
//优先从缓存中读取字典配置
|
||||||
if (getDictItemsFromCache(this.dictCode)) {
|
if (getDictItemsFromCache(this.dictCode)) {
|
||||||
this.options = getDictItemsFromCache(this.dictCode);
|
this.options = getDictItemsFromCache(this.dictCode)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ajaxGetDictItems(dictStr, null).then((res) => {
|
ajaxGetDictItems(dictStr, null).then((res) => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
this.options = res.result;
|
this.options = res.result
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@@ -198,7 +198,7 @@
|
|||||||
return option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
|
return option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
|
||||||
},
|
},
|
||||||
handleChange (selectedValue) {
|
handleChange (selectedValue) {
|
||||||
console.log("selectedValue",selectedValue)
|
console.log('selectedValue',selectedValue)
|
||||||
this.selectedValue = selectedValue
|
this.selectedValue = selectedValue
|
||||||
this.callback()
|
this.callback()
|
||||||
},
|
},
|
||||||
@@ -211,13 +211,13 @@
|
|||||||
this.selectedAsyncValue = null
|
this.selectedAsyncValue = null
|
||||||
this.selectedValue = null
|
this.selectedValue = null
|
||||||
this.options = null
|
this.options = null
|
||||||
this.loadData("")
|
this.loadData('')
|
||||||
}
|
}
|
||||||
this.callback()
|
this.callback()
|
||||||
//update-end-author:scott date:20201222 for:【搜索】搜索查询组件,删除条件,默认下拉还是上次的缓存数据,不好 JT-191
|
//update-end-author:scott date:20201222 for:【搜索】搜索查询组件,删除条件,默认下拉还是上次的缓存数据,不好 JT-191
|
||||||
},
|
},
|
||||||
callback(){
|
callback(){
|
||||||
this.$emit('change', this.selectedValue);
|
this.$emit('change', this.selectedValue)
|
||||||
},
|
},
|
||||||
setCurrentDictOptions(dictOptions){
|
setCurrentDictOptions(dictOptions){
|
||||||
this.options = dictOptions
|
this.options = dictOptions
|
||||||
|
|||||||
@@ -5,9 +5,9 @@ import { filterMultiDictText,filterDictText,initDictOptions,filterDictTextByCach
|
|||||||
|
|
||||||
export default {
|
export default {
|
||||||
install: function (Vue) {
|
install: function (Vue) {
|
||||||
Vue.component('JDictSelectTag',JDictSelectTag);
|
Vue.component('JDictSelectTag',JDictSelectTag)
|
||||||
Vue.component('JMultiSelectTag',JMultiSelectTag);
|
Vue.component('JMultiSelectTag',JMultiSelectTag)
|
||||||
Vue.component('JSearchSelectTag',JSearchSelectTag);
|
Vue.component('JSearchSelectTag',JSearchSelectTag)
|
||||||
Vue.prototype.$initDictOptions = (dictCode) => initDictOptions(dictCode)
|
Vue.prototype.$initDictOptions = (dictCode) => initDictOptions(dictCode)
|
||||||
Vue.prototype.$filterMultiDictText = (dictOptions, text) => filterMultiDictText(dictOptions, text)
|
Vue.prototype.$filterMultiDictText = (dictOptions, text) => filterMultiDictText(dictOptions, text)
|
||||||
Vue.prototype.$filterDictText = (dictOptions, text) => filterDictText(dictOptions, text)
|
Vue.prototype.$filterDictText = (dictOptions, text) => filterDictText(dictOptions, text)
|
||||||
|
|||||||
@@ -0,0 +1,160 @@
|
|||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<a-form :form="form">
|
||||||
|
<a-row v-for="(item, index) in installmentList" :key="index">
|
||||||
|
<a-col :xxl="4" :xl="8" :sm="12">
|
||||||
|
<a-form-item :label="`${index + 1}阶段`" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||||
|
<a-input placeholder="请输入名称"
|
||||||
|
v-decorator="['installmentList['+index+'].phaseName',validatorRules.phaseName]"
|
||||||
|
:maxLength='50'
|
||||||
|
v-bind="$attrs"
|
||||||
|
@change="e => {e.target.value = (e.target.value + '').trim()}"></a-input>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :xxl="4" :xl="8" :sm="12">
|
||||||
|
<a-form-item :label="`${index + 1}阶段应收`" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||||
|
<a-input placeholder="请输入金额"
|
||||||
|
v-decorator="['installmentList['+index+'].accountsReceivableAmount',validatorRules.accountsReceivableAmount]"
|
||||||
|
:maxLength='50'
|
||||||
|
v-bind="$attrs"
|
||||||
|
@change="(e) => {e.target.value = (e.target.value.replace(/[^0-9.]/g,'')).trim()}"></a-input>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :xxl="5" :xl="8" :sm="12">
|
||||||
|
<a-form-item :label="`${index + 1}阶段应收时间`" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||||
|
<j-date placeholder="请选择应收时间"
|
||||||
|
style="width: 100%;"
|
||||||
|
v-decorator="['installmentList['+index+'].accountsReceivableTime']"
|
||||||
|
:trigger-change="true"
|
||||||
|
v-bind="$attrs"
|
||||||
|
date-format="YYYY-MM-DD"/>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :xxl="4" :xl="8" :sm="12">
|
||||||
|
<a-form-item :label="`${index + 1}阶段实收`" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||||
|
<a-input placeholder="请输入金额"
|
||||||
|
v-decorator="['installmentList['+index+'].paidAmount',validatorRules.paidAmount]"
|
||||||
|
:maxLength='50'
|
||||||
|
v-bind="$attrs"
|
||||||
|
@change="(e) => {e.target.value = (e.target.value.replace(/[^0-9.]/g,'')).trim()}"></a-input>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :xxl="5" :xl="8" :sm="12">
|
||||||
|
<a-form-item :label="`${index + 1}阶段实收时间`" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||||
|
<j-date placeholder="请选择实收时间"
|
||||||
|
style="width: 100%;"
|
||||||
|
v-decorator="['installmentList['+index+'].paidTime',validatorRules.paidTime]"
|
||||||
|
:trigger-change="true"
|
||||||
|
v-bind="$attrs"
|
||||||
|
date-format="YYYY-MM-DD"/>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :xxl="2" :xl="8" :sm="12" class="operator-btn">
|
||||||
|
<a-button icon="plus" @click="addInstallmentItem" v-bind="$attrs"></a-button>
|
||||||
|
<a-button icon="minus" @click="deleteInstallmentItem(index)"
|
||||||
|
v-bind="$attrs"
|
||||||
|
:disabled="installmentList.length === 1">
|
||||||
|
</a-button>
|
||||||
|
</a-col>
|
||||||
|
</a-row>
|
||||||
|
</a-form>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import JDate from '../tools/JDate'
|
||||||
|
import pick from 'lodash.pick'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'InstallmentForm',
|
||||||
|
components: { JDate },
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
form: this.$form.createForm(this),
|
||||||
|
model: {},
|
||||||
|
labelCol: {
|
||||||
|
xs: { span: 24 },
|
||||||
|
sm: { span: 9 }
|
||||||
|
},
|
||||||
|
wrapperCol: {
|
||||||
|
xs: { span: 24 },
|
||||||
|
sm: { span: 15 }
|
||||||
|
},
|
||||||
|
validatorRules: {
|
||||||
|
phaseName: {
|
||||||
|
rules: [{ required: true, message: '请输入名称'}],
|
||||||
|
validateTrigger: 'blur'
|
||||||
|
},
|
||||||
|
accountsReceivableAmount: {
|
||||||
|
rules: [{ required: true, message: '请输入金额'}],
|
||||||
|
validateTrigger: 'blur'
|
||||||
|
},
|
||||||
|
paidAmount: {
|
||||||
|
rules: [{ required: true, message: '请输入金额'}],
|
||||||
|
validateTrigger: 'blur'
|
||||||
|
},
|
||||||
|
paidTime: {
|
||||||
|
rules: [{ required: true, message: '请选择实收时间'}],
|
||||||
|
validateTrigger: 'blur'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
index: 1,
|
||||||
|
installmentList: [],
|
||||||
|
defaultFormData: {
|
||||||
|
phaseName: null,
|
||||||
|
accountsReceivableAmount: null,
|
||||||
|
accountsReceivableTime: undefined,
|
||||||
|
paidAmount: null,
|
||||||
|
paidTime: undefined
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
/**
|
||||||
|
* 初始化分期信息列表
|
||||||
|
* @param record
|
||||||
|
*/
|
||||||
|
initInstallmentList(record) {
|
||||||
|
// 判断是否为编辑
|
||||||
|
if (record.installmentList && record.installmentList.length > 0) {
|
||||||
|
this.installmentList = record.installmentList
|
||||||
|
} else {
|
||||||
|
record.installmentList = [this.defaultFormData]
|
||||||
|
}
|
||||||
|
this.model = Object({}, record)
|
||||||
|
this.installmentList = record.installmentList
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.form.setFieldsValue(pick(this.model, 'installmentList'))
|
||||||
|
})
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
* 添加一个分期信息
|
||||||
|
*/
|
||||||
|
addInstallmentItem() {
|
||||||
|
this.installmentList.push(this.defaultFormData)
|
||||||
|
},
|
||||||
|
deleteInstallmentItem(index) {
|
||||||
|
this.installmentList.splice(index, 1)
|
||||||
|
},
|
||||||
|
handleSave() {
|
||||||
|
this.form.validateFields((err, values) => {
|
||||||
|
if (!err) {
|
||||||
|
this.$emit('ok', values)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="less">
|
||||||
|
.operator-btn {
|
||||||
|
height: 40px;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
|
||||||
|
.ant-btn {
|
||||||
|
margin-left: 10px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -8,7 +8,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import JCronModal from "./modal/JCronModal";
|
import JCronModal from './modal/JCronModal'
|
||||||
export default {
|
export default {
|
||||||
name: 'JCron',
|
name: 'JCron',
|
||||||
components: {
|
components: {
|
||||||
@@ -32,11 +32,11 @@
|
|||||||
},
|
},
|
||||||
methods:{
|
methods:{
|
||||||
openModal(){
|
openModal(){
|
||||||
this.$refs.innerVueCron.show();
|
this.$refs.innerVueCron.show()
|
||||||
},
|
},
|
||||||
handleOK(val){
|
handleOK(val){
|
||||||
this.cron = val;
|
this.cron = val
|
||||||
this.$emit("change", this.cron);
|
this.$emit('change', this.cron)
|
||||||
//this.$emit("change", Object.assign({}, this.cron));
|
//this.$emit("change", Object.assign({}, this.cron));
|
||||||
},
|
},
|
||||||
handleEmpty(){
|
handleEmpty(){
|
||||||
|
|||||||
@@ -97,7 +97,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
data () {
|
data () {
|
||||||
let dateStr = this.value;
|
let dateStr = this.value
|
||||||
return {
|
return {
|
||||||
yearShowOne:false, //控制年份模态框的显示与否
|
yearShowOne:false, //控制年份模态框的显示与否
|
||||||
year:'', // mode==“year” 专用
|
year:'', // mode==“year” 专用
|
||||||
@@ -107,12 +107,12 @@
|
|||||||
computed: {
|
computed: {
|
||||||
//透传给下级组件的事件,需要排除本组件使用的change事件
|
//透传给下级组件的事件,需要排除本组件使用的change事件
|
||||||
childListeners() {
|
childListeners() {
|
||||||
const vm = this;
|
const vm = this
|
||||||
let result = Object.assign({},
|
let result = Object.assign({},
|
||||||
this.$listeners,
|
this.$listeners,
|
||||||
)
|
)
|
||||||
delete result.change;
|
delete result.change
|
||||||
return result;
|
return result
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
@@ -131,7 +131,7 @@
|
|||||||
methods: {
|
methods: {
|
||||||
moment,
|
moment,
|
||||||
handleDateChange(mom,dateStr){
|
handleDateChange(mom,dateStr){
|
||||||
this.$emit('change', dateStr);
|
this.$emit('change', dateStr)
|
||||||
},
|
},
|
||||||
handleMonthChange(mom,dateStr){
|
handleMonthChange(mom,dateStr){
|
||||||
this.$emit('change',dateStr)
|
this.$emit('change',dateStr)
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
console.log("我是表单禁用专用组件,但是我并不支持表单中iframe的内容禁用")
|
console.log('我是表单禁用专用组件,但是我并不支持表单中iframe的内容禁用')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -31,36 +31,36 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
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 Base64 = require('js-base64').Base64
|
||||||
|
|
||||||
const uidGenerator=()=>{
|
const uidGenerator=()=>{
|
||||||
return '-'+parseInt(Math.random()*10000+1,10);
|
return '-'+parseInt(Math.random()*10000+1,10)
|
||||||
}
|
}
|
||||||
export default {
|
export default {
|
||||||
name: 'JImageUpload',
|
name: 'JImageUpload',
|
||||||
data(){
|
data(){
|
||||||
return {
|
return {
|
||||||
uploadAction:window._CONFIG['domianURL']+"/sys/common/upload",
|
uploadAction:window._CONFIG['domianURL']+'/sys/common/upload',
|
||||||
uploadLoading:false,
|
uploadLoading:false,
|
||||||
picUrl:false,
|
picUrl:false,
|
||||||
headers:{},
|
headers:{},
|
||||||
fileList: [],
|
fileList: [],
|
||||||
previewImage:"",
|
previewImage:'',
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
props:{
|
props:{
|
||||||
text:{
|
text:{
|
||||||
type:String,
|
type:String,
|
||||||
required:false,
|
required:false,
|
||||||
default:"上传"
|
default:'上传'
|
||||||
},
|
},
|
||||||
/*这个属性用于控制文件上传的业务路径*/
|
/*这个属性用于控制文件上传的业务路径*/
|
||||||
bizPath:{
|
bizPath:{
|
||||||
type:String,
|
type:String,
|
||||||
required:false,
|
required:false,
|
||||||
default:"temp"
|
default:'temp'
|
||||||
},
|
},
|
||||||
value:{
|
value:{
|
||||||
type:[String,Array],
|
type:[String,Array],
|
||||||
@@ -87,12 +87,12 @@
|
|||||||
computed: {
|
computed: {
|
||||||
//透传给下级组件的事件,需要排除本组件使用的change事件
|
//透传给下级组件的事件,需要排除本组件使用的change事件
|
||||||
childListeners() {
|
childListeners() {
|
||||||
const vm = this;
|
const vm = this
|
||||||
let result = Object.assign({},
|
let result = Object.assign({},
|
||||||
this.$listeners,
|
this.$listeners,
|
||||||
)
|
)
|
||||||
delete result.change;
|
delete result.change
|
||||||
return result;
|
return result
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch:{
|
watch:{
|
||||||
@@ -104,7 +104,7 @@
|
|||||||
this.initFileList(val)
|
this.initFileList(val)
|
||||||
}
|
}
|
||||||
if(!val || val.length==0){
|
if(!val || val.length==0){
|
||||||
this.picUrl = false;
|
this.picUrl = false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
//立刻执行handler
|
//立刻执行handler
|
||||||
@@ -112,17 +112,17 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
created(){
|
created(){
|
||||||
const token = Vue.ls.get(ACCESS_TOKEN);
|
const token = Vue.ls.get(ACCESS_TOKEN)
|
||||||
this.headers = {"X-Access-Token":token}
|
this.headers = {'X-Access-Token':token}
|
||||||
},
|
},
|
||||||
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 arr = paths.split(",")
|
let arr = paths.split(',')
|
||||||
for(var a=0;a<arr.length;a++){
|
for(var a=0;a<arr.length;a++){
|
||||||
this.fileList.forEach((item)=>{
|
this.fileList.forEach((item)=>{
|
||||||
if (item.url === arr[a]){
|
if (item.url === arr[a]){
|
||||||
@@ -133,33 +133,33 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
beforeUpload: function(file){
|
beforeUpload: function(file){
|
||||||
var fileType = file.type;
|
var fileType = file.type
|
||||||
if(fileType.indexOf('image')<0){
|
if(fileType.indexOf('image')<0){
|
||||||
this.$message.warning('请上传图片');
|
this.$message.warning('请上传图片')
|
||||||
return false;
|
return false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
handleChange(info) {
|
handleChange(info) {
|
||||||
this.picUrl = false;
|
this.picUrl = false
|
||||||
let fileList = info.fileList
|
let fileList = info.fileList
|
||||||
//update-begin-author:wangshuai date:20201022 for:LOWCOD-969 判断number是否大于0和是否多选,返回选定的元素。
|
//update-begin-author:wangshuai date:20201022 for:LOWCOD-969 判断number是否大于0和是否多选,返回选定的元素。
|
||||||
if(this.number>0 && this.isMultiple){
|
if(this.number>0 && this.isMultiple){
|
||||||
fileList = fileList.slice(-this.number);
|
fileList = fileList.slice(-this.number)
|
||||||
}
|
}
|
||||||
//update-end-author:wangshuai date:20201022 for:LOWCOD-969 判断number是否大于0和是否多选,返回选定的元素。
|
//update-end-author:wangshuai date:20201022 for:LOWCOD-969 判断number是否大于0和是否多选,返回选定的元素。
|
||||||
if(info.file.status==='done'){
|
if(info.file.status==='done'){
|
||||||
if(info.file.response.success){
|
if(info.file.response.success){
|
||||||
this.picUrl = true;
|
this.picUrl = true
|
||||||
fileList = fileList.map((file) => {
|
fileList = fileList.map((file) => {
|
||||||
if (file.response) {
|
if (file.response) {
|
||||||
file.url = `${file.response.result.id}?token=${Vue.ls.get(ACCESS_TOKEN)}&fullfilename=${file.response.result.fileName}`;
|
file.url = `${file.response.result.id}?token=${Vue.ls.get(ACCESS_TOKEN)}&fullfilename=${file.response.result.fileName}`
|
||||||
}
|
}
|
||||||
return file;
|
return file
|
||||||
});
|
})
|
||||||
}
|
}
|
||||||
//this.$message.success(`${info.file.name} 上传成功!`);
|
//this.$message.success(`${info.file.name} 上传成功!`);
|
||||||
}else if (info.file.status === 'error') {
|
}else if (info.file.status === 'error') {
|
||||||
this.$message.error(`${info.file.name} 上传失败.`);
|
this.$message.error(`${info.file.name} 上传失败.`)
|
||||||
}else if(info.file.status === 'removed'){
|
}else if(info.file.status === 'removed'){
|
||||||
this.handleDelete(info.file)
|
this.handleDelete(info.file)
|
||||||
}
|
}
|
||||||
@@ -188,7 +188,7 @@
|
|||||||
if(!uploadFiles || uploadFiles.length==0){
|
if(!uploadFiles || uploadFiles.length==0){
|
||||||
path = ''
|
path = ''
|
||||||
}
|
}
|
||||||
let arr = [];
|
let arr = []
|
||||||
if(!this.isMultiple){
|
if(!this.isMultiple){
|
||||||
arr.push(uploadFiles[uploadFiles.length-1].url)
|
arr.push(uploadFiles[uploadFiles.length-1].url)
|
||||||
}else{
|
}else{
|
||||||
@@ -197,22 +197,22 @@
|
|||||||
if(uploadFiles[a].status === 'done' ) {
|
if(uploadFiles[a].status === 'done' ) {
|
||||||
arr.push(uploadFiles[a].url)
|
arr.push(uploadFiles[a].url)
|
||||||
}else{
|
}else{
|
||||||
return;
|
return
|
||||||
}
|
}
|
||||||
// update-end-author:taoyan date:20200819 for:【开源问题z】上传图片组件 LOWCOD-783
|
// update-end-author:taoyan date:20200819 for:【开源问题z】上传图片组件 LOWCOD-783
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(arr.length>0){
|
if(arr.length>0){
|
||||||
path = arr.join(",")
|
path = arr.join(',')
|
||||||
}
|
}
|
||||||
this.$emit('change', path);
|
this.$emit('change', path)
|
||||||
},
|
},
|
||||||
handleDelete(file){
|
handleDelete(file){
|
||||||
//如有需要新增 删除逻辑
|
//如有需要新增 删除逻辑
|
||||||
},
|
},
|
||||||
handleCancel() {
|
handleCancel() {
|
||||||
this.close();
|
this.close()
|
||||||
this.previewVisible = false;
|
this.previewVisible = false
|
||||||
},
|
},
|
||||||
close () {
|
close () {
|
||||||
|
|
||||||
|
|||||||
@@ -11,10 +11,10 @@
|
|||||||
|
|
||||||
import { Input } from 'ant-design-vue'
|
import { Input } from 'ant-design-vue'
|
||||||
|
|
||||||
const JINPUT_QUERY_LIKE = 'like';
|
const JINPUT_QUERY_LIKE = 'like'
|
||||||
const JINPUT_QUERY_NE = 'ne';
|
const JINPUT_QUERY_NE = 'ne'
|
||||||
const JINPUT_QUERY_GE = 'ge'; //大于等于
|
const JINPUT_QUERY_GE = 'ge' //大于等于
|
||||||
const JINPUT_QUERY_LE = 'le'; //小于等于
|
const JINPUT_QUERY_LE = 'le' //小于等于
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'JInput',
|
name: 'JInput',
|
||||||
@@ -48,19 +48,19 @@
|
|||||||
computed: {
|
computed: {
|
||||||
//透传给下级组件的事件,需要排除本组件使用的change事件
|
//透传给下级组件的事件,需要排除本组件使用的change事件
|
||||||
childListeners() {
|
childListeners() {
|
||||||
const vm = this;
|
const vm = this
|
||||||
let result = Object.assign({},
|
let result = Object.assign({},
|
||||||
this.$listeners,
|
this.$listeners,
|
||||||
)
|
)
|
||||||
delete result.change;
|
delete result.change
|
||||||
return result;
|
return result
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch:{
|
watch:{
|
||||||
value:{
|
value:{
|
||||||
immediate:true,
|
immediate:true,
|
||||||
handler:function(){
|
handler:function(){
|
||||||
this.initVal();
|
this.initVal()
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 当 type 变化的时候重新计算值
|
// 当 type 变化的时候重新计算值
|
||||||
@@ -77,19 +77,19 @@
|
|||||||
switch (this.type) {
|
switch (this.type) {
|
||||||
case JINPUT_QUERY_LIKE:
|
case JINPUT_QUERY_LIKE:
|
||||||
//修复路由传参的值传送到jinput框被前后各截取了一位 #1336
|
//修复路由传参的值传送到jinput框被前后各截取了一位 #1336
|
||||||
if(text.indexOf("*") != -1){
|
if(text.indexOf('*') != -1){
|
||||||
text = text.substring(1,text.length-1);
|
text = text.substring(1,text.length-1)
|
||||||
}
|
}
|
||||||
break;
|
break
|
||||||
case JINPUT_QUERY_NE:
|
case JINPUT_QUERY_NE:
|
||||||
text = text.substring(1);
|
text = text.substring(1)
|
||||||
break;
|
break
|
||||||
case JINPUT_QUERY_GE:
|
case JINPUT_QUERY_GE:
|
||||||
text = text.substring(2);
|
text = text.substring(2)
|
||||||
break;
|
break
|
||||||
case JINPUT_QUERY_LE:
|
case JINPUT_QUERY_LE:
|
||||||
text = text.substring(2);
|
text = text.substring(2)
|
||||||
break;
|
break
|
||||||
default:
|
default:
|
||||||
}
|
}
|
||||||
this.inputVal = text
|
this.inputVal = text
|
||||||
@@ -102,20 +102,20 @@
|
|||||||
}
|
}
|
||||||
switch (this.type) {
|
switch (this.type) {
|
||||||
case JINPUT_QUERY_LIKE:
|
case JINPUT_QUERY_LIKE:
|
||||||
text = "*"+text+"*";
|
text = '*'+text+'*'
|
||||||
break;
|
break
|
||||||
case JINPUT_QUERY_NE:
|
case JINPUT_QUERY_NE:
|
||||||
text = "!"+text;
|
text = '!'+text
|
||||||
break;
|
break
|
||||||
case JINPUT_QUERY_GE:
|
case JINPUT_QUERY_GE:
|
||||||
text = ">="+text;
|
text = '>='+text
|
||||||
break;
|
break
|
||||||
case JINPUT_QUERY_LE:
|
case JINPUT_QUERY_LE:
|
||||||
text = "<="+text;
|
text = '<='+text
|
||||||
break;
|
break
|
||||||
default:
|
default:
|
||||||
}
|
}
|
||||||
this.$emit('change', text);
|
this.$emit('change', text)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
model: {
|
model: {
|
||||||
|
|||||||
@@ -107,11 +107,11 @@
|
|||||||
return {
|
return {
|
||||||
treeValue: null, // 选中的数据
|
treeValue: null, // 选中的数据
|
||||||
treeData:[],// 渲染树的数组
|
treeData:[],// 渲染树的数组
|
||||||
url:"/sys/dict/loadTreeData",
|
url:'/sys/dict/loadTreeData',
|
||||||
view:'/sys/dict/loadDictItem/',
|
view:'/sys/dict/loadDictItem/',
|
||||||
tableName:"",
|
tableName:'',
|
||||||
text:"",
|
text:'',
|
||||||
code:"",
|
code:'',
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
@@ -131,12 +131,12 @@
|
|||||||
},
|
},
|
||||||
//透传给下级组件的事件,需要排除本组件使用的change事件
|
//透传给下级组件的事件,需要排除本组件使用的change事件
|
||||||
childListeners() {
|
childListeners() {
|
||||||
const vm = this;
|
const vm = this
|
||||||
let result = Object.assign({},
|
let result = Object.assign({},
|
||||||
this.$listeners,
|
this.$listeners,
|
||||||
)
|
)
|
||||||
delete result.change;
|
delete result.change
|
||||||
return result;
|
return result
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created(){
|
created(){
|
||||||
@@ -151,7 +151,7 @@
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
loadItemByCode(){
|
loadItemByCode(){
|
||||||
if( !this.value || this.value == "0" ){
|
if( !this.value || this.value == '0' ){
|
||||||
this.treeValue = null
|
this.treeValue = null
|
||||||
}else{
|
}else{
|
||||||
getAction(`${this.view}${this.dict}`,{key:this.value}).then(res=>{
|
getAction(`${this.view}${this.dict}`,{key:this.value}).then(res=>{
|
||||||
@@ -160,7 +160,7 @@
|
|||||||
this.treeValue = values // v-model接收的是string || string[]
|
this.treeValue = values // v-model接收的是string || string[]
|
||||||
//将节点名称显示在选择框上
|
//将节点名称显示在选择框上
|
||||||
this.treeValue = res.result[0]
|
this.treeValue = res.result[0]
|
||||||
this.onLoadTriggleChange(res.result[0]);
|
this.onLoadTriggleChange(res.result[0])
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@@ -172,7 +172,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
initDictInfo(){ //取出父组件传过来的code,text,tableName
|
initDictInfo(){ //取出父组件传过来的code,text,tableName
|
||||||
let arr = this.dict.split(",")
|
let arr = this.dict.split(',')
|
||||||
this.tableName = arr[0]
|
this.tableName = arr[0]
|
||||||
this.text = arr[1]
|
this.text = arr[1]
|
||||||
this.code = arr[2]
|
this.code = arr[2]
|
||||||
@@ -253,7 +253,7 @@
|
|||||||
}
|
}
|
||||||
this.treeData = [...res.result]
|
this.treeData = [...res.result]
|
||||||
}else{
|
}else{
|
||||||
console.log("数根节点查询结果-else",res)
|
console.log('数根节点查询结果-else',res)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}else{
|
}else{
|
||||||
@@ -276,7 +276,7 @@
|
|||||||
/*
|
/*
|
||||||
* 使用$listeners向上暴露事件---和$emit一起使用出现的问题:change事件会执行两遍
|
* 使用$listeners向上暴露事件---和$emit一起使用出现的问题:change事件会执行两遍
|
||||||
* 解决办法:改变选中时提交的事件名*/
|
* 解决办法:改变选中时提交的事件名*/
|
||||||
this.$emit('change', '');
|
this.$emit('change', '')
|
||||||
this.treeValue = null
|
this.treeValue = null
|
||||||
} else if (value instanceof Array) {
|
} else if (value instanceof Array) {
|
||||||
//多选
|
//多选
|
||||||
@@ -295,18 +295,18 @@
|
|||||||
let myCondition = this.condition
|
let myCondition = this.condition
|
||||||
return new Promise((resolve,reject)=>{
|
return new Promise((resolve,reject)=>{
|
||||||
if(!myCondition){
|
if(!myCondition){
|
||||||
resolve();
|
resolve()
|
||||||
}else{
|
}else{
|
||||||
try {
|
try {
|
||||||
let test=JSON.parse(myCondition);
|
let test=JSON.parse(myCondition)
|
||||||
if(typeof test == 'object' && test){
|
if(typeof test == 'object' && test){
|
||||||
resolve()
|
resolve()
|
||||||
}else{
|
}else{
|
||||||
this.$message.error("组件JTreeSelect-condition传值有误,需要一个json字符串!")
|
this.$message.error('组件JTreeSelect-condition传值有误,需要一个json字符串!')
|
||||||
reject()
|
reject()
|
||||||
}
|
}
|
||||||
} catch(e) {
|
} catch(e) {
|
||||||
this.$message.error("组件JTreeSelect-condition传值有误,需要一个json字符串!")
|
this.$message.error('组件JTreeSelect-condition传值有误,需要一个json字符串!')
|
||||||
reject()
|
reject()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -31,22 +31,22 @@
|
|||||||
<script>
|
<script>
|
||||||
|
|
||||||
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'
|
||||||
import { getFileInfo } from '@/api/api';
|
import { getFileInfo } from '@/api/api'
|
||||||
const Base64 = require('js-base64').Base64
|
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'
|
||||||
const FILE_TYPE_TXT = "file"
|
const FILE_TYPE_TXT = 'file'
|
||||||
const uidGenerator=()=>{
|
const uidGenerator=()=>{
|
||||||
return '-'+parseInt(Math.random()*10000+1,10);
|
return '-'+parseInt(Math.random()*10000+1,10)
|
||||||
}
|
}
|
||||||
export default {
|
export default {
|
||||||
name: 'JUpload',
|
name: 'JUpload',
|
||||||
data(){
|
data(){
|
||||||
return {
|
return {
|
||||||
uploadAction:window._CONFIG['domianURL']+"/sys/common/upload",
|
uploadAction:window._CONFIG['domianURL']+'/sys/common/upload',
|
||||||
headers:{},
|
headers:{},
|
||||||
fileList: [],
|
fileList: [],
|
||||||
newFileList: [],
|
newFileList: [],
|
||||||
@@ -57,7 +57,7 @@
|
|||||||
text: {
|
text: {
|
||||||
type: String,
|
type: String,
|
||||||
required: false,
|
required: false,
|
||||||
default: "点击上传"
|
default: '点击上传'
|
||||||
},
|
},
|
||||||
fileType: {
|
fileType: {
|
||||||
type: String,
|
type: String,
|
||||||
@@ -68,7 +68,7 @@
|
|||||||
bizPath: {
|
bizPath: {
|
||||||
type: String,
|
type: String,
|
||||||
required: false,
|
required: false,
|
||||||
default: "temp"
|
default: 'temp'
|
||||||
},
|
},
|
||||||
value: {
|
value: {
|
||||||
type: [String, Array],
|
type: [String, Array],
|
||||||
@@ -127,7 +127,7 @@
|
|||||||
if(this.returnUrl){
|
if(this.returnUrl){
|
||||||
this.initFileList(val.join(','))
|
this.initFileList(val.join(','))
|
||||||
}else{
|
}else{
|
||||||
this.initFileListArr(val);
|
this.initFileListArr(val)
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
this.initFileList(val)
|
this.initFileList(val)
|
||||||
@@ -138,12 +138,12 @@
|
|||||||
computed:{
|
computed:{
|
||||||
//透传给下级组件的事件,需要排除本组件使用的change事件
|
//透传给下级组件的事件,需要排除本组件使用的change事件
|
||||||
childListeners() {
|
childListeners() {
|
||||||
const vm = this;
|
const vm = this
|
||||||
let result = Object.assign({},
|
let result = Object.assign({},
|
||||||
this.$listeners,
|
this.$listeners,
|
||||||
)
|
)
|
||||||
delete result.change;
|
delete result.change
|
||||||
return result;
|
return result
|
||||||
},
|
},
|
||||||
isImageComp(){
|
isImageComp(){
|
||||||
return this.fileType === FILE_TYPE_IMG
|
return this.fileType === FILE_TYPE_IMG
|
||||||
@@ -153,17 +153,17 @@
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
created(){
|
created(){
|
||||||
const token = Vue.ls.get(ACCESS_TOKEN);
|
const token = Vue.ls.get(ACCESS_TOKEN)
|
||||||
//---------------------------- begin 图片左右换位置 -------------------------------------
|
//---------------------------- begin 图片左右换位置 -------------------------------------
|
||||||
this.headers = {"X-Access-Token":token};
|
this.headers = {'X-Access-Token':token}
|
||||||
this.containerId = 'container-ty-'+new Date().getTime();
|
this.containerId = 'container-ty-'+new Date().getTime()
|
||||||
//---------------------------- end 图片左右换位置 -------------------------------------
|
//---------------------------- end 图片左右换位置 -------------------------------------
|
||||||
},
|
},
|
||||||
methods:{
|
methods:{
|
||||||
initFileListArr(val){
|
initFileListArr(val){
|
||||||
if(!val || val.length==0){
|
if(!val || val.length==0){
|
||||||
this.fileList = [];
|
this.fileList = []
|
||||||
return;
|
return
|
||||||
}
|
}
|
||||||
for(var a=0;a<val.length;a++){
|
for(var a=0;a<val.length;a++){
|
||||||
this.fileList.forEach((item)=>{
|
this.fileList.forEach((item)=>{
|
||||||
@@ -176,10 +176,10 @@
|
|||||||
},
|
},
|
||||||
async initFileList(paths){
|
async initFileList(paths){
|
||||||
if(!paths || paths.length === 0){
|
if(!paths || paths.length === 0){
|
||||||
this.fileList = [];
|
this.fileList = []
|
||||||
return;
|
return
|
||||||
}
|
}
|
||||||
let arr = paths.split(",")
|
let arr = paths.split(',')
|
||||||
// 返回路径的时候,对路径进行操作,取出所属id
|
// 返回路径的时候,对路径进行操作,取出所属id
|
||||||
if(!this.returnId && arr.length > 0) {
|
if(!this.returnId && arr.length > 0) {
|
||||||
const newArr = []
|
const newArr = []
|
||||||
@@ -216,20 +216,20 @@
|
|||||||
if(!uploadFiles || uploadFiles.length==0){
|
if(!uploadFiles || uploadFiles.length==0){
|
||||||
path = ''
|
path = ''
|
||||||
}
|
}
|
||||||
let arr = [];
|
let arr = []
|
||||||
// 如果returnid为true 只返回id
|
// 如果returnid为true 只返回id
|
||||||
if(this.returnId){
|
if(this.returnId){
|
||||||
for(var a=0;a<uploadFiles.length;a++){
|
for(var a=0;a<uploadFiles.length;a++){
|
||||||
if(uploadFiles[a].status === 'done' ) {
|
if(uploadFiles[a].status === 'done' ) {
|
||||||
arr.push(uploadFiles[a].response.result.id)
|
arr.push(uploadFiles[a].response.result.id)
|
||||||
}else{
|
}else{
|
||||||
return;
|
return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(arr.length>0){
|
if(arr.length>0){
|
||||||
fileIds = arr.join(",")
|
fileIds = arr.join(',')
|
||||||
}
|
}
|
||||||
this.$emit('change', fileIds);
|
this.$emit('change', fileIds)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -237,22 +237,22 @@
|
|||||||
if(uploadFiles[a].status === 'done' ) {
|
if(uploadFiles[a].status === 'done' ) {
|
||||||
arr.push(uploadFiles[a].url)
|
arr.push(uploadFiles[a].url)
|
||||||
}else{
|
}else{
|
||||||
return;
|
return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(arr.length>0){
|
if(arr.length>0){
|
||||||
path = arr.join(",")
|
path = arr.join(',')
|
||||||
}
|
}
|
||||||
this.$emit('change', path);
|
this.$emit('change', path)
|
||||||
},
|
},
|
||||||
beforeUpload(file){
|
beforeUpload(file){
|
||||||
this.uploadGoOn=true
|
this.uploadGoOn=true
|
||||||
var fileType = file.type;
|
var fileType = file.type
|
||||||
if(this.fileType===FILE_TYPE_IMG){
|
if(this.fileType===FILE_TYPE_IMG){
|
||||||
if(fileType.indexOf('image')<0){
|
if(fileType.indexOf('image')<0){
|
||||||
this.$message.warning('请上传图片');
|
this.$message.warning('请上传图片')
|
||||||
this.uploadGoOn=false
|
this.uploadGoOn=false
|
||||||
return false;
|
return false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//TODO 扩展功能验证文件大小
|
//TODO 扩展功能验证文件大小
|
||||||
@@ -260,25 +260,25 @@
|
|||||||
},
|
},
|
||||||
handleChange(info) {
|
handleChange(info) {
|
||||||
if(!info.file.status && this.uploadGoOn === false){
|
if(!info.file.status && this.uploadGoOn === false){
|
||||||
info.fileList.pop();
|
info.fileList.pop()
|
||||||
}
|
}
|
||||||
let fileList = info.fileList
|
let fileList = info.fileList
|
||||||
if(info.file.status==='done'){
|
if(info.file.status==='done'){
|
||||||
if(this.number>0){
|
if(this.number>0){
|
||||||
fileList = fileList.slice(-this.number);
|
fileList = fileList.slice(-this.number)
|
||||||
}
|
}
|
||||||
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.result.id}?token=${Vue.ls.get(ACCESS_TOKEN)}&fullfilename=${file.response.result.fileName}`;
|
// let reUrl = `${file.response.result.id}?token=${Vue.ls.get(ACCESS_TOKEN)}&fullfilename=${file.response.result.fileName}`;
|
||||||
file.url = getFileAccessHttpUrl(file.response.result.id);
|
file.url = getFileAccessHttpUrl(file.response.result.id)
|
||||||
}
|
}
|
||||||
return file;
|
return file
|
||||||
});
|
})
|
||||||
}
|
}
|
||||||
//this.$message.success(`${info.file.name} 上传成功!`);
|
//this.$message.success(`${info.file.name} 上传成功!`);
|
||||||
}else if (info.file.status === 'error') {
|
}else if (info.file.status === 'error') {
|
||||||
this.$message.error(`${info.file.name} 上传失败.`);
|
this.$message.error(`${info.file.name} 上传失败.`)
|
||||||
}else if(info.file.status === 'removed'){
|
}else if(info.file.status === 'removed'){
|
||||||
this.handleDelete(info.file)
|
this.handleDelete(info.file)
|
||||||
}
|
}
|
||||||
@@ -289,7 +289,7 @@
|
|||||||
this.handlePathChange()
|
this.handlePathChange()
|
||||||
}else{
|
}else{
|
||||||
//returnUrl为false时返回文件名称、文件路径及文件大小
|
//returnUrl为false时返回文件名称、文件路径及文件大小
|
||||||
this.newFileList = [];
|
this.newFileList = []
|
||||||
for(var a=0;a<fileList.length;a++){
|
for(var a=0;a<fileList.length;a++){
|
||||||
// update-begin-author:lvdandan date:20200603 for:【TESTA-514】【开源issue】多个文件同时上传时,控制台报错
|
// update-begin-author:lvdandan date:20200603 for:【TESTA-514】【开源issue】多个文件同时上传时,控制台报错
|
||||||
if(fileList[a].status === 'done' ) {
|
if(fileList[a].status === 'done' ) {
|
||||||
@@ -297,14 +297,14 @@
|
|||||||
fileName:fileList[a].name,
|
fileName:fileList[a].name,
|
||||||
filePath:fileList[a].url,
|
filePath:fileList[a].url,
|
||||||
fileSize:fileList[a].size
|
fileSize:fileList[a].size
|
||||||
};
|
}
|
||||||
this.newFileList.push(fileJson);
|
this.newFileList.push(fileJson)
|
||||||
}else{
|
}else{
|
||||||
return;
|
return
|
||||||
}
|
}
|
||||||
// update-end-author:lvdandan date:20200603 for:【TESTA-514】【开源issue】多个文件同时上传时,控制台报错
|
// update-end-author:lvdandan date:20200603 for:【TESTA-514】【开源issue】多个文件同时上传时,控制台报错
|
||||||
}
|
}
|
||||||
this.$emit('change', this.newFileList);
|
this.$emit('change', this.newFileList)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
import JModal from "./JModal";
|
import JModal from './JModal'
|
||||||
import JInput from "./JInput.vue";
|
import JInput from './JInput.vue'
|
||||||
import JEllipsis from './JEllipsis.vue'
|
import JEllipsis from './JEllipsis.vue'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
install(Vue) {
|
install(Vue) {
|
||||||
Vue.component(JModal.name, JModal);
|
Vue.component(JModal.name, JModal)
|
||||||
Vue.component("JInput", JInput);
|
Vue.component('JInput', JInput)
|
||||||
Vue.component('JEllipsis', JEllipsis)
|
Vue.component('JEllipsis', JEllipsis)
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
|
|||||||
@@ -14,14 +14,14 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { getFileAccessHttpUrl } from '@/api/manage';
|
import { getFileAccessHttpUrl } from '@/api/manage'
|
||||||
|
|
||||||
const getFileName=(path)=>{
|
const getFileName=(path)=>{
|
||||||
if(path.lastIndexOf("\\")>=0){
|
if(path.lastIndexOf('\\')>=0){
|
||||||
let reg=new RegExp("\\\\","g");
|
let reg=new RegExp('\\\\','g')
|
||||||
path = path.replace(reg,"/");
|
path = path.replace(reg,'/')
|
||||||
}
|
}
|
||||||
return path.substring(path.lastIndexOf("/")+1);
|
return path.substring(path.lastIndexOf('/')+1)
|
||||||
}
|
}
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
@@ -76,11 +76,11 @@
|
|||||||
},
|
},
|
||||||
methods:{
|
methods:{
|
||||||
handleChange(value){
|
handleChange(value){
|
||||||
this.filePath = value;
|
this.filePath = value
|
||||||
},
|
},
|
||||||
show(id,value,flag){
|
show(id,value,flag){
|
||||||
this.id = id;
|
this.id = id
|
||||||
this.filePath = value;
|
this.filePath = value
|
||||||
this.visible=true
|
this.visible=true
|
||||||
if(flag === 'img'){
|
if(flag === 'img'){
|
||||||
this.fileType = 'image'
|
this.fileType = 'image'
|
||||||
@@ -91,10 +91,10 @@
|
|||||||
},
|
},
|
||||||
ok(){
|
ok(){
|
||||||
if(!this.filePath){
|
if(!this.filePath){
|
||||||
this.$message.error("未上传任何文件")
|
this.$message.error('未上传任何文件')
|
||||||
return false;
|
return false
|
||||||
}
|
}
|
||||||
let arr = this.filePath.split(",")
|
let arr = this.filePath.split(',')
|
||||||
let obj = {
|
let obj = {
|
||||||
name:getFileName(arr[0]),
|
name:getFileName(arr[0]),
|
||||||
url:getFileAccessHttpUrl(arr[0]),
|
url:getFileAccessHttpUrl(arr[0]),
|
||||||
|
|||||||
@@ -68,7 +68,7 @@
|
|||||||
immediate:true,
|
immediate:true,
|
||||||
handler:function(){
|
handler:function(){
|
||||||
if(this.value && this.value.length>0){
|
if(this.value && this.value.length>0){
|
||||||
this.inputContent = this.value;
|
this.inputContent = this.value
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -335,184 +335,184 @@
|
|||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
modalWidth(){
|
modalWidth(){
|
||||||
return 608;
|
return 608
|
||||||
},
|
},
|
||||||
secondsText() {
|
secondsText() {
|
||||||
let seconds = '';
|
let seconds = ''
|
||||||
let cronEvery=this.result.second.cronEvery||'';
|
let cronEvery=this.result.second.cronEvery||''
|
||||||
switch (cronEvery.toString()){
|
switch (cronEvery.toString()){
|
||||||
case '1':
|
case '1':
|
||||||
seconds = '*';
|
seconds = '*'
|
||||||
break;
|
break
|
||||||
case '2':
|
case '2':
|
||||||
seconds = this.result.second.incrementStart+'/'+this.result.second.incrementIncrement;
|
seconds = this.result.second.incrementStart+'/'+this.result.second.incrementIncrement
|
||||||
break;
|
break
|
||||||
case '3':
|
case '3':
|
||||||
this.result.second.specificSpecific.map(val=> {seconds += val+','});
|
this.result.second.specificSpecific.map(val=> {seconds += val+','})
|
||||||
seconds = seconds.slice(0, -1);
|
seconds = seconds.slice(0, -1)
|
||||||
break;
|
break
|
||||||
case '4':
|
case '4':
|
||||||
seconds = this.result.second.rangeStart+'-'+this.result.second.rangeEnd;
|
seconds = this.result.second.rangeStart+'-'+this.result.second.rangeEnd
|
||||||
break;
|
break
|
||||||
}
|
}
|
||||||
return seconds;
|
return seconds
|
||||||
},
|
},
|
||||||
minutesText() {
|
minutesText() {
|
||||||
let minutes = '';
|
let minutes = ''
|
||||||
let cronEvery=this.result.minute.cronEvery||'';
|
let cronEvery=this.result.minute.cronEvery||''
|
||||||
switch (cronEvery.toString()){
|
switch (cronEvery.toString()){
|
||||||
case '1':
|
case '1':
|
||||||
minutes = '*';
|
minutes = '*'
|
||||||
break;
|
break
|
||||||
case '2':
|
case '2':
|
||||||
minutes = this.result.minute.incrementStart+'/'+this.result.minute.incrementIncrement;
|
minutes = this.result.minute.incrementStart+'/'+this.result.minute.incrementIncrement
|
||||||
break;
|
break
|
||||||
case '3':
|
case '3':
|
||||||
this.result.minute.specificSpecific.map(val=> {
|
this.result.minute.specificSpecific.map(val=> {
|
||||||
minutes += val+','
|
minutes += val+','
|
||||||
});
|
})
|
||||||
minutes = minutes.slice(0, -1);
|
minutes = minutes.slice(0, -1)
|
||||||
break;
|
break
|
||||||
case '4':
|
case '4':
|
||||||
minutes = this.result.minute.rangeStart+'-'+this.result.minute.rangeEnd;
|
minutes = this.result.minute.rangeStart+'-'+this.result.minute.rangeEnd
|
||||||
break;
|
break
|
||||||
}
|
}
|
||||||
return minutes;
|
return minutes
|
||||||
},
|
},
|
||||||
hoursText() {
|
hoursText() {
|
||||||
let hours = '';
|
let hours = ''
|
||||||
let cronEvery=this.result.hour.cronEvery||'';
|
let cronEvery=this.result.hour.cronEvery||''
|
||||||
switch (cronEvery.toString()){
|
switch (cronEvery.toString()){
|
||||||
case '1':
|
case '1':
|
||||||
hours = '*';
|
hours = '*'
|
||||||
break;
|
break
|
||||||
case '2':
|
case '2':
|
||||||
hours = this.result.hour.incrementStart+'/'+this.result.hour.incrementIncrement;
|
hours = this.result.hour.incrementStart+'/'+this.result.hour.incrementIncrement
|
||||||
break;
|
break
|
||||||
case '3':
|
case '3':
|
||||||
this.result.hour.specificSpecific.map(val=> {
|
this.result.hour.specificSpecific.map(val=> {
|
||||||
hours += val+','
|
hours += val+','
|
||||||
});
|
})
|
||||||
hours = hours.slice(0, -1);
|
hours = hours.slice(0, -1)
|
||||||
break;
|
break
|
||||||
case '4':
|
case '4':
|
||||||
hours = this.result.hour.rangeStart+'-'+this.result.hour.rangeEnd;
|
hours = this.result.hour.rangeStart+'-'+this.result.hour.rangeEnd
|
||||||
break;
|
break
|
||||||
}
|
}
|
||||||
return hours;
|
return hours
|
||||||
},
|
},
|
||||||
daysText() {
|
daysText() {
|
||||||
let days='';
|
let days=''
|
||||||
let cronEvery=this.result.day.cronEvery||'';
|
let cronEvery=this.result.day.cronEvery||''
|
||||||
switch (cronEvery.toString()){
|
switch (cronEvery.toString()){
|
||||||
case '1':
|
case '1':
|
||||||
break;
|
break
|
||||||
case '2':
|
case '2':
|
||||||
case '4':
|
case '4':
|
||||||
case '11':
|
case '11':
|
||||||
days = '?';
|
days = '?'
|
||||||
break;
|
break
|
||||||
case '3':
|
case '3':
|
||||||
days = this.result.day.incrementStart+'/'+this.result.day.incrementIncrement;
|
days = this.result.day.incrementStart+'/'+this.result.day.incrementIncrement
|
||||||
break;
|
break
|
||||||
case '5':
|
case '5':
|
||||||
this.result.day.specificSpecific.map(val=> {
|
this.result.day.specificSpecific.map(val=> {
|
||||||
days += val+','
|
days += val+','
|
||||||
});
|
})
|
||||||
days = days.slice(0, -1);
|
days = days.slice(0, -1)
|
||||||
break;
|
break
|
||||||
case '6':
|
case '6':
|
||||||
days = "L";
|
days = 'L'
|
||||||
break;
|
break
|
||||||
case '7':
|
case '7':
|
||||||
days = "LW";
|
days = 'LW'
|
||||||
break;
|
break
|
||||||
case '8':
|
case '8':
|
||||||
days = this.result.day.cronLastSpecificDomDay + 'L';
|
days = this.result.day.cronLastSpecificDomDay + 'L'
|
||||||
break;
|
break
|
||||||
case '9':
|
case '9':
|
||||||
days = 'L-' + this.result.day.cronDaysBeforeEomMinus;
|
days = 'L-' + this.result.day.cronDaysBeforeEomMinus
|
||||||
break;
|
break
|
||||||
case '10':
|
case '10':
|
||||||
days = this.result.day.cronDaysNearestWeekday+"W";
|
days = this.result.day.cronDaysNearestWeekday+'W'
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
return days;
|
return days
|
||||||
},
|
},
|
||||||
weeksText() {
|
weeksText() {
|
||||||
let weeks = '';
|
let weeks = ''
|
||||||
let cronEvery=this.result.day.cronEvery||'';
|
let cronEvery=this.result.day.cronEvery||''
|
||||||
switch (cronEvery.toString()){
|
switch (cronEvery.toString()){
|
||||||
case '1':
|
case '1':
|
||||||
case '3':
|
case '3':
|
||||||
case '5':
|
case '5':
|
||||||
weeks = '?';
|
weeks = '?'
|
||||||
break;
|
break
|
||||||
case '2':
|
case '2':
|
||||||
weeks = this.result.week.incrementStart+'/'+this.result.week.incrementIncrement;
|
weeks = this.result.week.incrementStart+'/'+this.result.week.incrementIncrement
|
||||||
break;
|
break
|
||||||
case '4':
|
case '4':
|
||||||
this.result.week.specificSpecific.map(val=> {
|
this.result.week.specificSpecific.map(val=> {
|
||||||
weeks += val+','
|
weeks += val+','
|
||||||
});
|
})
|
||||||
weeks = weeks.slice(0, -1);
|
weeks = weeks.slice(0, -1)
|
||||||
break;
|
break
|
||||||
case '6':
|
case '6':
|
||||||
case '7':
|
case '7':
|
||||||
case '8':
|
case '8':
|
||||||
case '9':
|
case '9':
|
||||||
case '10':
|
case '10':
|
||||||
weeks = "?";
|
weeks = '?'
|
||||||
break;
|
break
|
||||||
case '11':
|
case '11':
|
||||||
weeks = this.result.week.cronNthDayDay+"#"+this.result.week.cronNthDayNth;
|
weeks = this.result.week.cronNthDayDay+'#'+this.result.week.cronNthDayNth
|
||||||
break;
|
break
|
||||||
}
|
}
|
||||||
return weeks;
|
return weeks
|
||||||
},
|
},
|
||||||
monthsText() {
|
monthsText() {
|
||||||
let months = '';
|
let months = ''
|
||||||
let cronEvery=this.result.month.cronEvery||'';
|
let cronEvery=this.result.month.cronEvery||''
|
||||||
switch (cronEvery.toString()){
|
switch (cronEvery.toString()){
|
||||||
case '1':
|
case '1':
|
||||||
months = '*';
|
months = '*'
|
||||||
break;
|
break
|
||||||
case '2':
|
case '2':
|
||||||
months = this.result.month.incrementStart+'/'+this.result.month.incrementIncrement;
|
months = this.result.month.incrementStart+'/'+this.result.month.incrementIncrement
|
||||||
break;
|
break
|
||||||
case '3':
|
case '3':
|
||||||
this.result.month.specificSpecific.map(val=> {
|
this.result.month.specificSpecific.map(val=> {
|
||||||
months += val+','
|
months += val+','
|
||||||
});
|
})
|
||||||
months = months.slice(0, -1);
|
months = months.slice(0, -1)
|
||||||
break;
|
break
|
||||||
case '4':
|
case '4':
|
||||||
months = this.result.month.rangeStart+'-'+this.result.month.rangeEnd;
|
months = this.result.month.rangeStart+'-'+this.result.month.rangeEnd
|
||||||
break;
|
break
|
||||||
}
|
}
|
||||||
return months;
|
return months
|
||||||
},
|
},
|
||||||
yearsText() {
|
yearsText() {
|
||||||
let years = '';
|
let years = ''
|
||||||
let cronEvery=this.result.year.cronEvery||'';
|
let cronEvery=this.result.year.cronEvery||''
|
||||||
switch (cronEvery.toString()){
|
switch (cronEvery.toString()){
|
||||||
case '1':
|
case '1':
|
||||||
years = '*';
|
years = '*'
|
||||||
break;
|
break
|
||||||
case '2':
|
case '2':
|
||||||
years = this.result.year.incrementStart+'/'+this.result.year.incrementIncrement;
|
years = this.result.year.incrementStart+'/'+this.result.year.incrementIncrement
|
||||||
break;
|
break
|
||||||
case '3':
|
case '3':
|
||||||
this.result.year.specificSpecific.map(val=> {
|
this.result.year.specificSpecific.map(val=> {
|
||||||
years += val+','
|
years += val+','
|
||||||
});
|
})
|
||||||
years = years.slice(0, -1);
|
years = years.slice(0, -1)
|
||||||
break;
|
break
|
||||||
case '4':
|
case '4':
|
||||||
years = this.result.year.rangeStart+'-'+this.result.year.rangeEnd;
|
years = this.result.year.rangeStart+'-'+this.result.year.rangeEnd
|
||||||
break;
|
break
|
||||||
}
|
}
|
||||||
return years;
|
return years
|
||||||
},
|
},
|
||||||
cron(){
|
cron(){
|
||||||
return `${this.secondsText||'*'} ${this.minutesText||'*'} ${this.hoursText||'*'} ${this.daysText||'*'} ${this.monthsText||'*'} ${this.weeksText||'?'} ${this.yearsText||'*'}`
|
return `${this.secondsText||'*'} ${this.minutesText||'*'} ${this.hoursText||'*'} ${this.daysText||'*'} ${this.monthsText||'*'} ${this.weeksText||'?'} ${this.yearsText||'*'}`
|
||||||
@@ -531,25 +531,25 @@
|
|||||||
// //this.result = clone(this.defaultValue);
|
// //this.result = clone(this.defaultValue);
|
||||||
// this.result = JSON.parse(JSON.stringify(this.defaultValue));
|
// this.result = JSON.parse(JSON.stringify(this.defaultValue));
|
||||||
// }
|
// }
|
||||||
let label = this.data;
|
let label = this.data
|
||||||
if(label){
|
if(label){
|
||||||
this.secondsReverseExp(label)
|
this.secondsReverseExp(label)
|
||||||
this.minutesReverseExp(label);
|
this.minutesReverseExp(label)
|
||||||
this.hoursReverseExp(label);
|
this.hoursReverseExp(label)
|
||||||
this.daysReverseExp(label);
|
this.daysReverseExp(label)
|
||||||
this.daysReverseExp(label);
|
this.daysReverseExp(label)
|
||||||
this.monthsReverseExp(label);
|
this.monthsReverseExp(label)
|
||||||
this.yearReverseExp(label);
|
this.yearReverseExp(label)
|
||||||
JSON.parse(JSON.stringify(label));
|
JSON.parse(JSON.stringify(label))
|
||||||
}else {
|
}else {
|
||||||
this.result = JSON.parse(JSON.stringify(this.defaultValue));
|
this.result = JSON.parse(JSON.stringify(this.defaultValue))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
show(){
|
show(){
|
||||||
this.visible = true;
|
this.visible = true
|
||||||
// console.log('secondsReverseExp',this.secondsReverseExp(this.data));
|
// console.log('secondsReverseExp',this.secondsReverseExp(this.data));
|
||||||
// console.log('minutesReverseExp',this.minutesReverseExp(this.data));
|
// console.log('minutesReverseExp',this.minutesReverseExp(this.data));
|
||||||
// console.log('hoursReverseExp',this.hoursReverseExp(this.data));
|
// console.log('hoursReverseExp',this.hoursReverseExp(this.data));
|
||||||
@@ -559,15 +559,15 @@
|
|||||||
|
|
||||||
},
|
},
|
||||||
handleSubmit(){
|
handleSubmit(){
|
||||||
this.$emit('ok',this.cron);
|
this.$emit('ok',this.cron)
|
||||||
this.close();
|
this.close()
|
||||||
this.visible = false;
|
this.visible = false
|
||||||
},
|
},
|
||||||
close(){
|
close(){
|
||||||
this.visible = false;
|
this.visible = false
|
||||||
},
|
},
|
||||||
secondsReverseExp(seconds) {
|
secondsReverseExp(seconds) {
|
||||||
let val = seconds.split(" ")[0];
|
let val = seconds.split(' ')[0]
|
||||||
//alert(val);
|
//alert(val);
|
||||||
let second = {
|
let second = {
|
||||||
cronEvery:'',
|
cronEvery:'',
|
||||||
@@ -576,32 +576,32 @@
|
|||||||
rangeStart:1,
|
rangeStart:1,
|
||||||
rangeEnd:0,
|
rangeEnd:0,
|
||||||
specificSpecific:[]
|
specificSpecific:[]
|
||||||
};
|
}
|
||||||
switch (true) {
|
switch (true) {
|
||||||
case val.includes('*'):
|
case val.includes('*'):
|
||||||
second.cronEvery = '1';
|
second.cronEvery = '1'
|
||||||
break;
|
break
|
||||||
case val.includes('/'):
|
case val.includes('/'):
|
||||||
second.cronEvery = '2';
|
second.cronEvery = '2'
|
||||||
second.incrementStart = val.split('/')[0];
|
second.incrementStart = val.split('/')[0]
|
||||||
second.incrementIncrement = val.split('/')[1];
|
second.incrementIncrement = val.split('/')[1]
|
||||||
break;
|
break
|
||||||
case val.includes(','):
|
case val.includes(','):
|
||||||
second.cronEvery = '3';
|
second.cronEvery = '3'
|
||||||
second.specificSpecific = val.split(',').map(Number).sort();
|
second.specificSpecific = val.split(',').map(Number).sort()
|
||||||
break;
|
break
|
||||||
case val.includes('-'):
|
case val.includes('-'):
|
||||||
second.cronEvery = '4';
|
second.cronEvery = '4'
|
||||||
second.rangeStart = val.split('-')[0];
|
second.rangeStart = val.split('-')[0]
|
||||||
second.rangeEnd = val.split('-')[1];
|
second.rangeEnd = val.split('-')[1]
|
||||||
break;
|
break
|
||||||
default:
|
default:
|
||||||
second.cronEvery = '1';
|
second.cronEvery = '1'
|
||||||
}
|
}
|
||||||
this.result.second = second;
|
this.result.second = second
|
||||||
},
|
},
|
||||||
minutesReverseExp(minutes) {
|
minutesReverseExp(minutes) {
|
||||||
let val = minutes.split(" ")[1];
|
let val = minutes.split(' ')[1]
|
||||||
let minute = {
|
let minute = {
|
||||||
cronEvery:'',
|
cronEvery:'',
|
||||||
incrementStart:3,
|
incrementStart:3,
|
||||||
@@ -612,29 +612,29 @@
|
|||||||
}
|
}
|
||||||
switch (true) {
|
switch (true) {
|
||||||
case val.includes('*'):
|
case val.includes('*'):
|
||||||
minute.cronEvery = '1';
|
minute.cronEvery = '1'
|
||||||
break;
|
break
|
||||||
case val.includes('/'):
|
case val.includes('/'):
|
||||||
minute.cronEvery = '2';
|
minute.cronEvery = '2'
|
||||||
minute.incrementStart = val.split('/')[0];
|
minute.incrementStart = val.split('/')[0]
|
||||||
minute.incrementIncrement = val.split('/')[1];
|
minute.incrementIncrement = val.split('/')[1]
|
||||||
break;
|
break
|
||||||
case val.includes(','):
|
case val.includes(','):
|
||||||
minute.cronEvery = '3';
|
minute.cronEvery = '3'
|
||||||
minute.specificSpecific = val.split(',').map(Number).sort();
|
minute.specificSpecific = val.split(',').map(Number).sort()
|
||||||
break;
|
break
|
||||||
case val.includes('-'):
|
case val.includes('-'):
|
||||||
minute.cronEvery = '4';
|
minute.cronEvery = '4'
|
||||||
minute.rangeStart = val.split('-')[0];
|
minute.rangeStart = val.split('-')[0]
|
||||||
minute.rangeEnd = val.split('-')[1];
|
minute.rangeEnd = val.split('-')[1]
|
||||||
break;
|
break
|
||||||
default:
|
default:
|
||||||
minute.cronEvery = '1';
|
minute.cronEvery = '1'
|
||||||
}
|
}
|
||||||
this.result.minute = minute;
|
this.result.minute = minute
|
||||||
},
|
},
|
||||||
hoursReverseExp(hours) {
|
hoursReverseExp(hours) {
|
||||||
let val = hours.split(" ")[2];
|
let val = hours.split(' ')[2]
|
||||||
let hour ={
|
let hour ={
|
||||||
cronEvery:'',
|
cronEvery:'',
|
||||||
incrementStart:3,
|
incrementStart:3,
|
||||||
@@ -642,33 +642,33 @@
|
|||||||
rangeStart:1,
|
rangeStart:1,
|
||||||
rangeEnd:'0',
|
rangeEnd:'0',
|
||||||
specificSpecific:[],
|
specificSpecific:[],
|
||||||
};
|
}
|
||||||
switch (true) {
|
switch (true) {
|
||||||
case val.includes('*'):
|
case val.includes('*'):
|
||||||
hour.cronEvery = '1';
|
hour.cronEvery = '1'
|
||||||
break;
|
break
|
||||||
case val.includes('/'):
|
case val.includes('/'):
|
||||||
hour.cronEvery = '2';
|
hour.cronEvery = '2'
|
||||||
hour.incrementStart = val.split('/')[0];
|
hour.incrementStart = val.split('/')[0]
|
||||||
hour.incrementIncrement = val.split('/')[1];
|
hour.incrementIncrement = val.split('/')[1]
|
||||||
break;
|
break
|
||||||
case val.includes(','):
|
case val.includes(','):
|
||||||
hour.cronEvery = '3';
|
hour.cronEvery = '3'
|
||||||
hour.specificSpecific = val.split(',').map(Number).sort();
|
hour.specificSpecific = val.split(',').map(Number).sort()
|
||||||
break;
|
break
|
||||||
case val.includes('-'):
|
case val.includes('-'):
|
||||||
hour.cronEvery = '4';
|
hour.cronEvery = '4'
|
||||||
hour.rangeStart = val.split('-')[0];
|
hour.rangeStart = val.split('-')[0]
|
||||||
hour.rangeEnd = val.split('-')[1];
|
hour.rangeEnd = val.split('-')[1]
|
||||||
break;
|
break
|
||||||
default:
|
default:
|
||||||
hour.cronEvery = '1';
|
hour.cronEvery = '1'
|
||||||
}
|
}
|
||||||
this.result.hour = hour;
|
this.result.hour = hour
|
||||||
},
|
},
|
||||||
daysReverseExp(cron) {
|
daysReverseExp(cron) {
|
||||||
let days = cron.split(" ")[3];
|
let days = cron.split(' ')[3]
|
||||||
let weeks = cron.split(" ")[5];
|
let weeks = cron.split(' ')[5]
|
||||||
let day ={
|
let day ={
|
||||||
cronEvery:'',
|
cronEvery:'',
|
||||||
incrementStart:1,
|
incrementStart:1,
|
||||||
@@ -679,7 +679,7 @@
|
|||||||
cronLastSpecificDomDay:1,
|
cronLastSpecificDomDay:1,
|
||||||
cronDaysBeforeEomMinus:1,
|
cronDaysBeforeEomMinus:1,
|
||||||
cronDaysNearestWeekday:1,
|
cronDaysNearestWeekday:1,
|
||||||
};
|
}
|
||||||
let week = {
|
let week = {
|
||||||
cronEvery:'',
|
cronEvery:'',
|
||||||
incrementStart:1,
|
incrementStart:1,
|
||||||
@@ -687,80 +687,80 @@
|
|||||||
specificSpecific:[],
|
specificSpecific:[],
|
||||||
cronNthDayDay:1,
|
cronNthDayDay:1,
|
||||||
cronNthDayNth:'1',
|
cronNthDayNth:'1',
|
||||||
};
|
}
|
||||||
if (!days.includes('?')) {
|
if (!days.includes('?')) {
|
||||||
switch (true) {
|
switch (true) {
|
||||||
case days.includes('*'):
|
case days.includes('*'):
|
||||||
day.cronEvery = '1';
|
day.cronEvery = '1'
|
||||||
break;
|
break
|
||||||
case days.includes('?'):
|
case days.includes('?'):
|
||||||
// 2、4、11
|
// 2、4、11
|
||||||
break;
|
break
|
||||||
case days.includes('/'):
|
case days.includes('/'):
|
||||||
day.cronEvery = '3';
|
day.cronEvery = '3'
|
||||||
day.incrementStart = days.split('/')[0];
|
day.incrementStart = days.split('/')[0]
|
||||||
day.incrementIncrement = days.split('/')[1];
|
day.incrementIncrement = days.split('/')[1]
|
||||||
break;
|
break
|
||||||
case days.includes(','):
|
case days.includes(','):
|
||||||
day.cronEvery = '5';
|
day.cronEvery = '5'
|
||||||
day.specificSpecific = days.split(',').map(Number).sort();
|
day.specificSpecific = days.split(',').map(Number).sort()
|
||||||
// day.specificSpecific.forEach(function (value, index) {
|
// day.specificSpecific.forEach(function (value, index) {
|
||||||
// day.specificSpecific[index] = value -1;
|
// day.specificSpecific[index] = value -1;
|
||||||
// });
|
// });
|
||||||
break;
|
break
|
||||||
case days.includes('LW'):
|
case days.includes('LW'):
|
||||||
day.cronEvery = '7';
|
day.cronEvery = '7'
|
||||||
break;
|
break
|
||||||
case days.includes('L-'):
|
case days.includes('L-'):
|
||||||
day.cronEvery = '9';
|
day.cronEvery = '9'
|
||||||
day.cronDaysBeforeEomMinus = days.split('L-')[1];
|
day.cronDaysBeforeEomMinus = days.split('L-')[1]
|
||||||
break;
|
break
|
||||||
case days.includes('L'):
|
case days.includes('L'):
|
||||||
|
|
||||||
//alert(days);
|
//alert(days);
|
||||||
if(days.len == 1){
|
if(days.len == 1){
|
||||||
day.cronEvery = '6';
|
day.cronEvery = '6'
|
||||||
day.cronLastSpecificDomDay = '1';
|
day.cronLastSpecificDomDay = '1'
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
day.cronEvery = '8';
|
day.cronEvery = '8'
|
||||||
day.cronLastSpecificDomDay = Number(days.split('L')[0]);
|
day.cronLastSpecificDomDay = Number(days.split('L')[0])
|
||||||
}
|
}
|
||||||
break;
|
break
|
||||||
case days.includes('W'):
|
case days.includes('W'):
|
||||||
day.cronEvery = '10';
|
day.cronEvery = '10'
|
||||||
day.cronDaysNearestWeekday = days.split('W')[0];
|
day.cronDaysNearestWeekday = days.split('W')[0]
|
||||||
break;
|
break
|
||||||
default:
|
default:
|
||||||
day.cronEvery = '1';
|
day.cronEvery = '1'
|
||||||
}
|
}
|
||||||
}else {
|
}else {
|
||||||
switch (true){
|
switch (true){
|
||||||
case weeks.includes('/'):
|
case weeks.includes('/'):
|
||||||
day.cronEvery = '2';
|
day.cronEvery = '2'
|
||||||
week.incrementStart = weeks.split("/")[0];
|
week.incrementStart = weeks.split('/')[0]
|
||||||
week.incrementIncrement = weeks.split("/")[1];
|
week.incrementIncrement = weeks.split('/')[1]
|
||||||
break;
|
break
|
||||||
case weeks.includes(','):
|
case weeks.includes(','):
|
||||||
day.cronEvery = '4';
|
day.cronEvery = '4'
|
||||||
week.specificSpecific = weeks.split(',').map(Number).sort();
|
week.specificSpecific = weeks.split(',').map(Number).sort()
|
||||||
break;
|
break
|
||||||
case '#':
|
case '#':
|
||||||
day.cronEvery = '11';
|
day.cronEvery = '11'
|
||||||
week.cronNthDayDay = weeks.split("#")[0];
|
week.cronNthDayDay = weeks.split('#')[0]
|
||||||
week.cronNthDayNth = weeks.split("#")[1];
|
week.cronNthDayNth = weeks.split('#')[1]
|
||||||
break;
|
break
|
||||||
default:
|
default:
|
||||||
day.cronEvery = '1';
|
day.cronEvery = '1'
|
||||||
week.cronEvery = '1';
|
week.cronEvery = '1'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.result.day = day;
|
this.result.day = day
|
||||||
this.result.week = week;
|
this.result.week = week
|
||||||
},
|
},
|
||||||
monthsReverseExp(cron) {
|
monthsReverseExp(cron) {
|
||||||
let months = cron.split(" ")[4];
|
let months = cron.split(' ')[4]
|
||||||
let month = {
|
let month = {
|
||||||
cronEvery:'',
|
cronEvery:'',
|
||||||
incrementStart:3,
|
incrementStart:3,
|
||||||
@@ -768,32 +768,32 @@
|
|||||||
rangeStart:1,
|
rangeStart:1,
|
||||||
rangeEnd:1,
|
rangeEnd:1,
|
||||||
specificSpecific:[],
|
specificSpecific:[],
|
||||||
};
|
}
|
||||||
switch (true){
|
switch (true){
|
||||||
case months.includes('*'):
|
case months.includes('*'):
|
||||||
month.cronEvery = '1';
|
month.cronEvery = '1'
|
||||||
break;
|
break
|
||||||
case months.includes('/'):
|
case months.includes('/'):
|
||||||
month.cronEvery = '2';
|
month.cronEvery = '2'
|
||||||
month.incrementStart = months.split('/')[0];
|
month.incrementStart = months.split('/')[0]
|
||||||
month.incrementIncrement = months.split('/')[1];
|
month.incrementIncrement = months.split('/')[1]
|
||||||
break;
|
break
|
||||||
case months.includes(','):
|
case months.includes(','):
|
||||||
month.cronEvery = '3';
|
month.cronEvery = '3'
|
||||||
month.specificSpecific = months.split(',').map(Number).sort();
|
month.specificSpecific = months.split(',').map(Number).sort()
|
||||||
break;
|
break
|
||||||
case months.includes('-'):
|
case months.includes('-'):
|
||||||
month.cronEvery = '4';
|
month.cronEvery = '4'
|
||||||
month.rangeStart = months.split('-')[0];
|
month.rangeStart = months.split('-')[0]
|
||||||
month.rangeEnd = months.split('-')[1];
|
month.rangeEnd = months.split('-')[1]
|
||||||
break;
|
break
|
||||||
default:
|
default:
|
||||||
month.cronEvery = '1';
|
month.cronEvery = '1'
|
||||||
}
|
}
|
||||||
this.result.month = month;
|
this.result.month = month
|
||||||
},
|
},
|
||||||
yearReverseExp(cron) {
|
yearReverseExp(cron) {
|
||||||
let years = cron.split(" ")[6];
|
let years = cron.split(' ')[6]
|
||||||
let year = {
|
let year = {
|
||||||
cronEvery:'',
|
cronEvery:'',
|
||||||
incrementStart:3,
|
incrementStart:3,
|
||||||
@@ -801,29 +801,29 @@
|
|||||||
rangeStart:2019,
|
rangeStart:2019,
|
||||||
rangeEnd:2019,
|
rangeEnd:2019,
|
||||||
specificSpecific:[],
|
specificSpecific:[],
|
||||||
};
|
}
|
||||||
switch (true){
|
switch (true){
|
||||||
case years.includes('*'):
|
case years.includes('*'):
|
||||||
year.cronEvery = '1';
|
year.cronEvery = '1'
|
||||||
break;
|
break
|
||||||
case years.includes('/'):
|
case years.includes('/'):
|
||||||
year.cronEvery = '2';
|
year.cronEvery = '2'
|
||||||
year.incrementStart = years.split('/')[0];
|
year.incrementStart = years.split('/')[0]
|
||||||
year.incrementIncrement = years.split('/')[1];
|
year.incrementIncrement = years.split('/')[1]
|
||||||
break;
|
break
|
||||||
case years.includes(','):
|
case years.includes(','):
|
||||||
year.cronEvery = '3';
|
year.cronEvery = '3'
|
||||||
year.specificSpecific = years.split(',').map(Number).sort();
|
year.specificSpecific = years.split(',').map(Number).sort()
|
||||||
break;
|
break
|
||||||
case years.includes('-'):
|
case years.includes('-'):
|
||||||
year.cronEvery = '4';
|
year.cronEvery = '4'
|
||||||
year.rangeStart = years.split('-')[0];
|
year.rangeStart = years.split('-')[0]
|
||||||
year.rangeEnd = years.split('-')[1];
|
year.rangeEnd = years.split('-')[1]
|
||||||
break;
|
break
|
||||||
default:
|
default:
|
||||||
year.cronEvery = '1';
|
year.cronEvery = '1'
|
||||||
}
|
}
|
||||||
this.result.year = year;
|
this.result.year = year
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,7 +13,7 @@
|
|||||||
import GlobalLayout from '@/components/page/GlobalLayout'
|
import GlobalLayout from '@/components/page/GlobalLayout'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "BasicLayout",
|
name: 'BasicLayout',
|
||||||
components: {
|
components: {
|
||||||
GlobalLayout
|
GlobalLayout
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -6,15 +6,15 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import Vue from 'vue'
|
import Vue from 'vue'
|
||||||
import { ACCESS_TOKEN } from "@/store/mutation-types"
|
import { ACCESS_TOKEN } from '@/store/mutation-types'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "IframePageContent",
|
name: 'IframePageContent',
|
||||||
inject:['closeCurrent'],
|
inject:['closeCurrent'],
|
||||||
data () {
|
data () {
|
||||||
return {
|
return {
|
||||||
url: "",
|
url: '',
|
||||||
id:""
|
id:''
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created () {
|
created () {
|
||||||
@@ -25,7 +25,7 @@
|
|||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
$route(to, from) {
|
$route(to, from) {
|
||||||
this.goUrl();
|
this.goUrl()
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
@@ -34,19 +34,19 @@
|
|||||||
let id = this.$route.path
|
let id = this.$route.path
|
||||||
this.id = id
|
this.id = id
|
||||||
//url = "http://www.baidu.com"
|
//url = "http://www.baidu.com"
|
||||||
console.log("------url------"+url)
|
console.log('------url------'+url)
|
||||||
if (url !== null && url !== undefined) {
|
if (url !== null && url !== undefined) {
|
||||||
this.url = url;
|
this.url = url
|
||||||
/*update_begin author:wuxianquan date:20190908 for:判断打开方式,新窗口打开时this.$route.meta.internalOrExternal==true */
|
/*update_begin author:wuxianquan date:20190908 for:判断打开方式,新窗口打开时this.$route.meta.internalOrExternal==true */
|
||||||
if(this.$route.meta.internalOrExternal != undefined && this.$route.meta.internalOrExternal==true){
|
if(this.$route.meta.internalOrExternal != undefined && this.$route.meta.internalOrExternal==true){
|
||||||
this.closeCurrent();
|
this.closeCurrent()
|
||||||
//外部url加入token
|
//外部url加入token
|
||||||
let tokenStr = "${token}";
|
let tokenStr = '${token}'
|
||||||
if(url.indexOf(tokenStr)!=-1){
|
if(url.indexOf(tokenStr)!=-1){
|
||||||
let token = Vue.ls.get(ACCESS_TOKEN);
|
let token = Vue.ls.get(ACCESS_TOKEN)
|
||||||
this.url = url.replace(tokenStr,token);
|
this.url = url.replace(tokenStr,token)
|
||||||
}
|
}
|
||||||
window.open(this.url);
|
window.open(this.url)
|
||||||
}
|
}
|
||||||
/*update_end author:wuxianquan date:20190908 for:判断打开方式,新窗口打开时this.$route.meta.internalOrExternal==true */
|
/*update_end author:wuxianquan date:20190908 for:判断打开方式,新窗口打开时this.$route.meta.internalOrExternal==true */
|
||||||
|
|
||||||
|
|||||||
@@ -13,7 +13,7 @@
|
|||||||
import RouteView from './RouteView'
|
import RouteView from './RouteView'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "PageContent",
|
name: 'PageContent',
|
||||||
components: {
|
components: {
|
||||||
RouteView,
|
RouteView,
|
||||||
PageLayout
|
PageLayout
|
||||||
|
|||||||
@@ -9,10 +9,10 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import Vue from 'vue'
|
import Vue from 'vue'
|
||||||
import { CACHE_INCLUDED_ROUTES } from "@/store/mutation-types"
|
import { CACHE_INCLUDED_ROUTES } from '@/store/mutation-types'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "RouteView",
|
name: 'RouteView',
|
||||||
computed: {
|
computed: {
|
||||||
//update-begin--Author:scott Date:20201015 for:路由缓存问题,关闭了tab页时再打开就不刷新 #842
|
//update-begin--Author:scott Date:20201015 for:路由缓存问题,关闭了tab页时再打开就不刷新 #842
|
||||||
includedComponents() {
|
includedComponents() {
|
||||||
@@ -24,10 +24,10 @@
|
|||||||
cacheRouterArray.push(this.$route.meta.componentName)
|
cacheRouterArray.push(this.$route.meta.componentName)
|
||||||
// cacheRouterArray.push("OnlCgformHeadList")
|
// cacheRouterArray.push("OnlCgformHeadList")
|
||||||
Vue.ls.set(CACHE_INCLUDED_ROUTES, cacheRouterArray)
|
Vue.ls.set(CACHE_INCLUDED_ROUTES, cacheRouterArray)
|
||||||
return cacheRouterArray;
|
return cacheRouterArray
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return includedRouters;
|
return includedRouters
|
||||||
},
|
},
|
||||||
//update-end--Author:scott Date:20201015 for:路由缓存问题,关闭了tab页时再打开就不刷新 #842
|
//update-end--Author:scott Date:20201015 for:路由缓存问题,关闭了tab页时再打开就不刷新 #842
|
||||||
keepAlive () {
|
keepAlive () {
|
||||||
|
|||||||
@@ -38,7 +38,7 @@
|
|||||||
import { triggerWindowResizeEvent } from '@/utils/util'
|
import { triggerWindowResizeEvent } from '@/utils/util'
|
||||||
const indexKey = '/dashboard/analysis'
|
const indexKey = '/dashboard/analysis'
|
||||||
import Vue from 'vue'
|
import Vue from 'vue'
|
||||||
import { CACHE_INCLUDED_ROUTES } from "@/store/mutation-types"
|
import { CACHE_INCLUDED_ROUTES } from '@/store/mutation-types'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'TabLayout',
|
name: 'TabLayout',
|
||||||
@@ -171,7 +171,7 @@
|
|||||||
|
|
||||||
// update-begin-author:sunjianlei date:20200120 for: 动态更改页面标题
|
// update-begin-author:sunjianlei date:20200120 for: 动态更改页面标题
|
||||||
changeTitle(title) {
|
changeTitle(title) {
|
||||||
let projectTitle = "Jero-Boot 企业级快速开发平台"
|
let projectTitle = 'Jero-Boot 企业级快速开发平台'
|
||||||
// 首页特殊处理
|
// 首页特殊处理
|
||||||
if (this.$route.path === indexKey) {
|
if (this.$route.path === indexKey) {
|
||||||
document.title = projectTitle
|
document.title = projectTitle
|
||||||
@@ -206,7 +206,7 @@
|
|||||||
this.$message.warning('这是最后一页,不能再关闭了啦')
|
this.$message.warning('这是最后一页,不能再关闭了啦')
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
console.log("this.pageList ",this.pageList );
|
console.log('this.pageList ',this.pageList )
|
||||||
let removeRoute = this.pageList.filter(item => item.fullPath == key)
|
let removeRoute = this.pageList.filter(item => item.fullPath == key)
|
||||||
this.pageList = this.pageList.filter(item => item.fullPath !== key)
|
this.pageList = this.pageList.filter(item => item.fullPath !== key)
|
||||||
let index = this.linkList.indexOf(key)
|
let index = this.linkList.indexOf(key)
|
||||||
@@ -219,8 +219,8 @@
|
|||||||
let cacheRouterArray = Vue.ls.get(CACHE_INCLUDED_ROUTES) || []
|
let cacheRouterArray = Vue.ls.get(CACHE_INCLUDED_ROUTES) || []
|
||||||
if (removeRoute && removeRoute[0]) {
|
if (removeRoute && removeRoute[0]) {
|
||||||
let componentName = removeRoute[0].meta.componentName
|
let componentName = removeRoute[0].meta.componentName
|
||||||
console.log("key: ", key);
|
console.log('key: ', key)
|
||||||
console.log("componentName: ", componentName);
|
console.log('componentName: ', componentName)
|
||||||
if(cacheRouterArray.includes(componentName)){
|
if(cacheRouterArray.includes(componentName)){
|
||||||
cacheRouterArray.splice(cacheRouterArray.findIndex(item => item === componentName), 1)
|
cacheRouterArray.splice(cacheRouterArray.findIndex(item => item === componentName), 1)
|
||||||
Vue.ls.set(CACHE_INCLUDED_ROUTES, cacheRouterArray)
|
Vue.ls.set(CACHE_INCLUDED_ROUTES, cacheRouterArray)
|
||||||
@@ -266,7 +266,7 @@
|
|||||||
},
|
},
|
||||||
/* update_begin author:wuxianquan date:20190828 for: 关闭当前tab页,供子页面调用->望菜单能配置外链,直接弹出新页面而不是嵌入iframe #428 */
|
/* update_begin author:wuxianquan date:20190828 for: 关闭当前tab页,供子页面调用->望菜单能配置外链,直接弹出新页面而不是嵌入iframe #428 */
|
||||||
closeCurrent(){
|
closeCurrent(){
|
||||||
this.remove(this.activePage);
|
this.remove(this.activePage)
|
||||||
},
|
},
|
||||||
/* update_end author:wuxianquan date:20190828 for: 关闭当前tab页,供子页面调用->望菜单能配置外链,直接弹出新页面而不是嵌入iframe #428 */
|
/* update_end author:wuxianquan date:20190828 for: 关闭当前tab页,供子页面调用->望菜单能配置外链,直接弹出新页面而不是嵌入iframe #428 */
|
||||||
closeOthers(pageKey) {
|
closeOthers(pageKey) {
|
||||||
@@ -324,7 +324,7 @@
|
|||||||
//update-begin-author:taoyan date:20191008 for:路由刷新
|
//update-begin-author:taoyan date:20191008 for:路由刷新
|
||||||
routeReload(){
|
routeReload(){
|
||||||
this.reloadFlag = false
|
this.reloadFlag = false
|
||||||
let ToggleMultipage = "ToggleMultipage"
|
let ToggleMultipage = 'ToggleMultipage'
|
||||||
this.$store.dispatch(ToggleMultipage,false)
|
this.$store.dispatch(ToggleMultipage,false)
|
||||||
this.$nextTick(()=>{
|
this.$nextTick(()=>{
|
||||||
this.$store.dispatch(ToggleMultipage,true)
|
this.$store.dispatch(ToggleMultipage,true)
|
||||||
|
|||||||
@@ -32,11 +32,11 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import RouteView from "@/components/layouts/RouteView"
|
import RouteView from '@/components/layouts/RouteView'
|
||||||
import { mixinDevice } from '@/utils/mixin.js'
|
import { mixinDevice } from '@/utils/mixin.js'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "UserLayout",
|
name: 'UserLayout',
|
||||||
components: { RouteView },
|
components: { RouteView },
|
||||||
mixins: [mixinDevice],
|
mixins: [mixinDevice],
|
||||||
data () {
|
data () {
|
||||||
@@ -53,27 +53,27 @@
|
|||||||
}
|
}
|
||||||
// 判断当前设备
|
// 判断当前设备
|
||||||
function isMobile() {
|
function isMobile() {
|
||||||
var userAgentInfo = navigator.userAgent;
|
var userAgentInfo = navigator.userAgent
|
||||||
|
|
||||||
var mobileAgents = ["Android", "iPhone", "SymbianOS", "Windows Phone", "iPad", "iPod"];
|
var mobileAgents = ['Android', 'iPhone', 'SymbianOS', 'Windows Phone', 'iPad', 'iPod']
|
||||||
|
|
||||||
var mobile_flag = false;
|
var mobile_flag = false
|
||||||
|
|
||||||
//根据userAgent判断是否是手机
|
//根据userAgent判断是否是手机
|
||||||
for (var v = 0; v < mobileAgents.length; v++) {
|
for (var v = 0; v < mobileAgents.length; v++) {
|
||||||
if (userAgentInfo.indexOf(mobileAgents[v]) > 0) {
|
if (userAgentInfo.indexOf(mobileAgents[v]) > 0) {
|
||||||
mobile_flag = true;
|
mobile_flag = true
|
||||||
break;
|
break
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
var screen_width = window.screen.width;
|
var screen_width = window.screen.width
|
||||||
var screen_height = window.screen.height;
|
var screen_height = window.screen.height
|
||||||
|
|
||||||
//根据屏幕分辨率判断是否是手机
|
//根据屏幕分辨率判断是否是手机
|
||||||
if (screen_width < 500 && screen_height < 800) {
|
if (screen_width < 500 && screen_height < 800) {
|
||||||
mobile_flag = true;
|
mobile_flag = true
|
||||||
}
|
}
|
||||||
return mobile_flag;
|
return mobile_flag
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<style lang="less" >
|
<style lang="less" >
|
||||||
|
|||||||
@@ -19,13 +19,13 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import ALayoutSider from "ant-design-vue/es/layout/Sider"
|
import ALayoutSider from 'ant-design-vue/es/layout/Sider'
|
||||||
import Logo from '../tools/Logo'
|
import Logo from '../tools/Logo'
|
||||||
import SMenu from './index'
|
import SMenu from './index'
|
||||||
import { mixin, mixinDevice } from '@/utils/mixin.js'
|
import { mixin, mixinDevice } from '@/utils/mixin.js'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "SideMenu",
|
name: 'SideMenu',
|
||||||
components: { ALayoutSider, Logo, SMenu },
|
components: { ALayoutSider, Logo, SMenu },
|
||||||
mixins: [mixin, mixinDevice],
|
mixins: [mixin, mixinDevice],
|
||||||
props: {
|
props: {
|
||||||
|
|||||||
@@ -89,7 +89,7 @@ export default {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
//update-begin-author:taoyan date:20190510 for:online表单菜单点击展开的一级目录不对
|
//update-begin-author:taoyan date:20190510 for:online表单菜单点击展开的一级目录不对
|
||||||
if(!this.selectedKeys || this.selectedKeys[0].indexOf(":")<0){
|
if(!this.selectedKeys || this.selectedKeys[0].indexOf(':')<0){
|
||||||
this.collapsed ? (this.cachedOpenKeys = openKeys) : (this.openKeys = openKeys)
|
this.collapsed ? (this.cachedOpenKeys = openKeys) : (this.openKeys = openKeys)
|
||||||
}
|
}
|
||||||
//update-end-author:taoyan date:20190510 for:online表单菜单点击展开的一级目录不对
|
//update-end-author:taoyan date:20190510 for:online表单菜单点击展开的一级目录不对
|
||||||
|
|||||||
@@ -15,7 +15,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
name: "LayoutFooter"
|
name: 'LayoutFooter'
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
@@ -44,9 +44,9 @@
|
|||||||
import Breadcrumb from '@/components/tools/Breadcrumb'
|
import Breadcrumb from '@/components/tools/Breadcrumb'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "PageHeader",
|
name: 'PageHeader',
|
||||||
components: {
|
components: {
|
||||||
"s-breadcrumb": Breadcrumb
|
's-breadcrumb': Breadcrumb
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
title: {
|
title: {
|
||||||
|
|||||||
@@ -40,7 +40,7 @@
|
|||||||
import PageHeader from './PageHeader'
|
import PageHeader from './PageHeader'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "LayoutContent",
|
name: 'LayoutContent',
|
||||||
components: {
|
components: {
|
||||||
PageHeader
|
PageHeader
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -19,7 +19,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
name: "HeaderNotice",
|
name: 'HeaderNotice',
|
||||||
props: {
|
props: {
|
||||||
tabs: {
|
tabs: {
|
||||||
type: Array,
|
type: Array,
|
||||||
|
|||||||
@@ -169,12 +169,12 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import DetailList from "@/components/tools/DetailList";
|
import DetailList from '@/components/tools/DetailList'
|
||||||
import SettingItem from "@/components/setting/SettingItem";
|
import SettingItem from '@/components/setting/SettingItem'
|
||||||
import config from "@/defaultSettings";
|
import config from '@/defaultSettings'
|
||||||
import { updateTheme, updateColorWeak, colorList } from "@/components/tools/setting";
|
import { updateTheme, updateColorWeak, colorList } from '@/components/tools/setting'
|
||||||
import { mixin, mixinDevice } from "@/utils/mixin.js";
|
import { mixin, mixinDevice } from '@/utils/mixin.js'
|
||||||
import { triggerWindowResizeEvent } from "@/utils/util";
|
import { triggerWindowResizeEvent } from '@/utils/util'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
@@ -187,71 +187,71 @@ export default {
|
|||||||
visible: false,
|
visible: false,
|
||||||
colorList,
|
colorList,
|
||||||
dataFixSiderbar: false
|
dataFixSiderbar: false
|
||||||
};
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
// 当主题色不是默认色时,才进行主题编译
|
// 当主题色不是默认色时,才进行主题编译
|
||||||
if (this.primaryColor !== config.primaryColor) {
|
if (this.primaryColor !== config.primaryColor) {
|
||||||
updateTheme(this.primaryColor);
|
updateTheme(this.primaryColor)
|
||||||
}
|
}
|
||||||
if (this.colorWeak !== config.colorWeak) {
|
if (this.colorWeak !== config.colorWeak) {
|
||||||
updateColorWeak(this.colorWeak);
|
updateColorWeak(this.colorWeak)
|
||||||
}
|
}
|
||||||
if (this.multipage !== config.multipage) {
|
if (this.multipage !== config.multipage) {
|
||||||
this.$store.dispatch("ToggleMultipage", this.multipage);
|
this.$store.dispatch('ToggleMultipage', this.multipage)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
showDrawer() {
|
showDrawer() {
|
||||||
this.visible = true;
|
this.visible = true
|
||||||
},
|
},
|
||||||
onClose() {
|
onClose() {
|
||||||
this.visible = false;
|
this.visible = false
|
||||||
},
|
},
|
||||||
toggle() {
|
toggle() {
|
||||||
this.visible = !this.visible;
|
this.visible = !this.visible
|
||||||
},
|
},
|
||||||
onColorWeak(checked) {
|
onColorWeak(checked) {
|
||||||
this.$store.dispatch("ToggleWeak", checked);
|
this.$store.dispatch('ToggleWeak', checked)
|
||||||
updateColorWeak(checked);
|
updateColorWeak(checked)
|
||||||
},
|
},
|
||||||
onMultipageWeak(checked) {
|
onMultipageWeak(checked) {
|
||||||
this.$store.dispatch("ToggleMultipage", checked);
|
this.$store.dispatch('ToggleMultipage', checked)
|
||||||
},
|
},
|
||||||
handleMenuTheme(theme) {
|
handleMenuTheme(theme) {
|
||||||
this.$store.dispatch("ToggleTheme", theme);
|
this.$store.dispatch('ToggleTheme', theme)
|
||||||
},
|
},
|
||||||
handleLayout(mode) {
|
handleLayout(mode) {
|
||||||
this.$store.dispatch("ToggleLayoutMode", mode);
|
this.$store.dispatch('ToggleLayoutMode', mode)
|
||||||
// 因为顶部菜单不能固定左侧菜单栏,所以强制关闭
|
// 因为顶部菜单不能固定左侧菜单栏,所以强制关闭
|
||||||
this.handleFixSiderbar(false);
|
this.handleFixSiderbar(false)
|
||||||
// 触发窗口resize事件
|
// 触发窗口resize事件
|
||||||
triggerWindowResizeEvent();
|
triggerWindowResizeEvent()
|
||||||
},
|
},
|
||||||
handleContentWidthChange(type) {
|
handleContentWidthChange(type) {
|
||||||
this.$store.dispatch("ToggleContentWidth", type);
|
this.$store.dispatch('ToggleContentWidth', type)
|
||||||
},
|
},
|
||||||
changeColor(color) {
|
changeColor(color) {
|
||||||
if (this.primaryColor !== color) {
|
if (this.primaryColor !== color) {
|
||||||
this.$store.dispatch("ToggleColor", color);
|
this.$store.dispatch('ToggleColor', color)
|
||||||
updateTheme(color);
|
updateTheme(color)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
handleFixedHeader(fixed) {
|
handleFixedHeader(fixed) {
|
||||||
this.$store.dispatch("ToggleFixedHeader", fixed);
|
this.$store.dispatch('ToggleFixedHeader', fixed)
|
||||||
},
|
},
|
||||||
handleFixedHeaderHidden(autoHidden) {
|
handleFixedHeaderHidden(autoHidden) {
|
||||||
this.$store.dispatch("ToggleFixedHeaderHidden", autoHidden);
|
this.$store.dispatch('ToggleFixedHeaderHidden', autoHidden)
|
||||||
},
|
},
|
||||||
handleFixSiderbar(fixed) {
|
handleFixSiderbar(fixed) {
|
||||||
if (this.layoutMode === "topmenu") {
|
if (this.layoutMode === 'topmenu') {
|
||||||
fixed = false;
|
fixed = false
|
||||||
}
|
}
|
||||||
this.dataFixSiderbar = fixed;
|
this.dataFixSiderbar = fixed
|
||||||
this.$store.dispatch("ToggleFixSiderbar", fixed);
|
this.$store.dispatch('ToggleFixSiderbar', fixed)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="less" scoped>
|
<style lang="less" scoped>
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
name: "SettingItem",
|
name: 'SettingItem',
|
||||||
props: {
|
props: {
|
||||||
title: {
|
title: {
|
||||||
type: String,
|
type: String,
|
||||||
|
|||||||
@@ -43,14 +43,14 @@
|
|||||||
import { getAction,putAction } from '@/api/manage'
|
import { getAction,putAction } from '@/api/manage'
|
||||||
import Vue from 'vue'
|
import Vue from 'vue'
|
||||||
import store from '@/store/'
|
import store from '@/store/'
|
||||||
import { USER_INFO } from "@/store/mutation-types"
|
import { USER_INFO } from '@/store/mutation-types'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'DepartSelect',
|
name: 'DepartSelect',
|
||||||
props:{
|
props:{
|
||||||
title:{
|
title:{
|
||||||
type:String,
|
type:String,
|
||||||
default:"部门选择",
|
default:'部门选择',
|
||||||
required:false
|
required:false
|
||||||
},
|
},
|
||||||
closable:{
|
closable:{
|
||||||
@@ -60,7 +60,7 @@
|
|||||||
},
|
},
|
||||||
username:{
|
username:{
|
||||||
type:String,
|
type:String,
|
||||||
default:"",
|
default:'',
|
||||||
required:false
|
required:false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -76,9 +76,9 @@
|
|||||||
currTitle:this.title,
|
currTitle:this.title,
|
||||||
visible:false,
|
visible:false,
|
||||||
departList:[],
|
departList:[],
|
||||||
departSelected:"",
|
departSelected:'',
|
||||||
validate_status:"",
|
validate_status:'',
|
||||||
currDepartName:"",
|
currDepartName:'',
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created(){
|
created(){
|
||||||
@@ -87,7 +87,7 @@
|
|||||||
methods:{
|
methods:{
|
||||||
loadDepartList(){
|
loadDepartList(){
|
||||||
return new Promise(resolve => {
|
return new Promise(resolve => {
|
||||||
let url = "/sys/user/getCurrentUserDeparts"
|
let url = '/sys/user/getCurrentUserDeparts'
|
||||||
this.currDepartName=''
|
this.currDepartName=''
|
||||||
getAction(url).then(res=>{
|
getAction(url).then(res=>{
|
||||||
if(res.success){
|
if(res.success){
|
||||||
@@ -104,7 +104,7 @@
|
|||||||
this.departSelected = orgCode
|
this.departSelected = orgCode
|
||||||
this.departList = departs
|
this.departList = departs
|
||||||
if(this.currDepartName){
|
if(this.currDepartName){
|
||||||
this.currTitle ="部门切换(当前部门 : "+this.currDepartName+")"
|
this.currTitle ='部门切换(当前部门 : '+this.currDepartName+')'
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -124,11 +124,11 @@
|
|||||||
orgCode:this.departSelected,
|
orgCode:this.departSelected,
|
||||||
username:this.username
|
username:this.username
|
||||||
}
|
}
|
||||||
putAction("/sys/selectDepart",obj).then(res=>{
|
putAction('/sys/selectDepart',obj).then(res=>{
|
||||||
if(res.success){
|
if(res.success){
|
||||||
const userInfo = res.result.userInfo;
|
const userInfo = res.result.userInfo
|
||||||
Vue.ls.set(USER_INFO, userInfo, 7 * 24 * 60 * 60 * 1000);
|
Vue.ls.set(USER_INFO, userInfo, 7 * 24 * 60 * 60 * 1000)
|
||||||
store.commit('SET_INFO', userInfo);
|
store.commit('SET_INFO', userInfo)
|
||||||
//console.log("---切换组织机构---userInfo-------",store.getters.userInfo.orgCode);
|
//console.log("---切换组织机构---userInfo-------",store.getters.userInfo.orgCode);
|
||||||
this.departClear()
|
this.departClear()
|
||||||
}
|
}
|
||||||
@@ -139,17 +139,17 @@
|
|||||||
this.loadDepartList().then(()=>{
|
this.loadDepartList().then(()=>{
|
||||||
this.visible=true
|
this.visible=true
|
||||||
if(!this.departList || this.departList.length<=0){
|
if(!this.departList || this.departList.length<=0){
|
||||||
this.$message.warning("您尚未设置部门信息!")
|
this.$message.warning('您尚未设置部门信息!')
|
||||||
this.departClear()
|
this.departClear()
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
departClear(){
|
departClear(){
|
||||||
this.departList=[]
|
this.departList=[]
|
||||||
this.departSelected=""
|
this.departSelected=''
|
||||||
this.visible=false
|
this.visible=false
|
||||||
this.validate_status=''
|
this.validate_status=''
|
||||||
this.currDepartName=""
|
this.currDepartName=''
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -42,7 +42,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "DetailList",
|
name: 'DetailList',
|
||||||
Item: Item,
|
Item: Item,
|
||||||
components: {
|
components: {
|
||||||
Col
|
Col
|
||||||
|
|||||||
@@ -84,7 +84,7 @@
|
|||||||
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "HeaderNotice",
|
name: 'HeaderNotice',
|
||||||
components: {
|
components: {
|
||||||
DynamicNotice,
|
DynamicNotice,
|
||||||
// ShowAnnouncement,
|
// ShowAnnouncement,
|
||||||
@@ -93,17 +93,17 @@
|
|||||||
return {
|
return {
|
||||||
loadding: false,
|
loadding: false,
|
||||||
url:{
|
url:{
|
||||||
listCementByUser:"/sys/annountCement/listByUser",
|
listCementByUser:'/sys/annountCement/listByUser',
|
||||||
editCementSend:"/sys/sysAnnouncementSend/editByAnntIdAndUserId",
|
editCementSend:'/sys/sysAnnouncementSend/editByAnntIdAndUserId',
|
||||||
queryById:"/sys/annountCement/queryById",
|
queryById:'/sys/annountCement/queryById',
|
||||||
},
|
},
|
||||||
hovered: false,
|
hovered: false,
|
||||||
announcement1:[],
|
announcement1:[],
|
||||||
announcement2:[],
|
announcement2:[],
|
||||||
msg1Count:"0",
|
msg1Count:'0',
|
||||||
msg2Count:"0",
|
msg2Count:'0',
|
||||||
msg1Title:"通知(0)",
|
msg1Title:'通知(0)',
|
||||||
msg2Title:"",
|
msg2Title:'',
|
||||||
stopTimer:false,
|
stopTimer:false,
|
||||||
websock: null,
|
websock: null,
|
||||||
lockReconnect:false,
|
lockReconnect:false,
|
||||||
@@ -114,26 +114,26 @@
|
|||||||
},
|
},
|
||||||
computed:{
|
computed:{
|
||||||
msgTotal () {
|
msgTotal () {
|
||||||
return parseInt(this.msg1Count)+parseInt(this.msg2Count);
|
return parseInt(this.msg1Count)+parseInt(this.msg2Count)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.loadData();
|
this.loadData()
|
||||||
//this.timerFun();
|
//this.timerFun();
|
||||||
this.initWebSocket();
|
this.initWebSocket()
|
||||||
// this.heartCheckFun();
|
// this.heartCheckFun();
|
||||||
},
|
},
|
||||||
destroyed: function () { // 离开页面生命周期函数
|
destroyed: function () { // 离开页面生命周期函数
|
||||||
this.websocketOnclose();
|
this.websocketOnclose()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
timerFun() {
|
timerFun() {
|
||||||
this.stopTimer = false;
|
this.stopTimer = false
|
||||||
let myTimer = setInterval(()=>{
|
let myTimer = setInterval(()=>{
|
||||||
// 停止定时器
|
// 停止定时器
|
||||||
if (this.stopTimer == true) {
|
if (this.stopTimer == true) {
|
||||||
clearInterval(myTimer);
|
clearInterval(myTimer)
|
||||||
return;
|
return
|
||||||
}
|
}
|
||||||
this.loadData()
|
this.loadData()
|
||||||
},6000)
|
},6000)
|
||||||
@@ -143,21 +143,21 @@
|
|||||||
// 获取系统消息
|
// 获取系统消息
|
||||||
getAction(this.url.listCementByUser).then((res) => {
|
getAction(this.url.listCementByUser).then((res) => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
this.announcement1 = res.result.anntMsgList;
|
this.announcement1 = res.result.anntMsgList
|
||||||
this.msg1Count = res.result.anntMsgTotal;
|
this.msg1Count = res.result.anntMsgTotal
|
||||||
this.msg1Title = "通知(" + res.result.anntMsgTotal + ")";
|
this.msg1Title = '通知(' + res.result.anntMsgTotal + ')'
|
||||||
this.announcement2 = res.result.sysMsgList;
|
this.announcement2 = res.result.sysMsgList
|
||||||
this.msg2Count = res.result.sysMsgTotal;
|
this.msg2Count = res.result.sysMsgTotal
|
||||||
this.msg2Title = "系统消息(" + res.result.sysMsgTotal + ")";
|
this.msg2Title = '系统消息(' + res.result.sysMsgTotal + ')'
|
||||||
}
|
}
|
||||||
}).catch(error => {
|
}).catch(error => {
|
||||||
console.log("系统消息通知异常",error);//这行打印permissionName is undefined
|
console.log('系统消息通知异常',error)//这行打印permissionName is undefined
|
||||||
this.stopTimer = true;
|
this.stopTimer = true
|
||||||
console.log("清理timer");
|
console.log('清理timer')
|
||||||
});
|
})
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
this.stopTimer = true;
|
this.stopTimer = true
|
||||||
console.log("通知异常",err);
|
console.log('通知异常',err)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
fetchNotice () {
|
fetchNotice () {
|
||||||
@@ -173,14 +173,14 @@
|
|||||||
showAnnouncement(record){
|
showAnnouncement(record){
|
||||||
putAction(this.url.editCementSend,{anntId:record.id}).then((res)=>{
|
putAction(this.url.editCementSend,{anntId:record.id}).then((res)=>{
|
||||||
if(res.success){
|
if(res.success){
|
||||||
this.loadData();
|
this.loadData()
|
||||||
}
|
}
|
||||||
});
|
})
|
||||||
this.hovered = false;
|
this.hovered = false
|
||||||
if(record.openType==='component'){
|
if(record.openType==='component'){
|
||||||
this.openPath = record.openPage;
|
this.openPath = record.openPage
|
||||||
this.formData = {id:record.busId};
|
this.formData = {id:record.busId}
|
||||||
this.$refs.showDynamNotice.detail(record.openPage);
|
this.$refs.showDynamNotice.detail(record.openPage)
|
||||||
}else{
|
}else{
|
||||||
// this.$refs.ShowAnnouncement.detail(record);
|
// this.$refs.ShowAnnouncement.detail(record);
|
||||||
}
|
}
|
||||||
@@ -188,65 +188,65 @@
|
|||||||
toMyAnnouncement(){
|
toMyAnnouncement(){
|
||||||
this.$router.push({
|
this.$router.push({
|
||||||
path: '/isps/userAnnouncement'
|
path: '/isps/userAnnouncement'
|
||||||
});
|
})
|
||||||
},
|
},
|
||||||
modalFormOk(){
|
modalFormOk(){
|
||||||
},
|
},
|
||||||
handleHoverChange (visible) {
|
handleHoverChange (visible) {
|
||||||
this.hovered = visible;
|
this.hovered = visible
|
||||||
},
|
},
|
||||||
|
|
||||||
initWebSocket: function () {
|
initWebSocket: function () {
|
||||||
// WebSocket与普通的请求所用协议有所不同,ws等同于http,wss等同于https
|
// WebSocket与普通的请求所用协议有所不同,ws等同于http,wss等同于https
|
||||||
var userId = store.getters.userInfo.id;
|
var userId = store.getters.userInfo.id
|
||||||
var url = window._CONFIG['domianWebSocketURL'].replace("https://","wss://").replace("http://","ws://")+"/websocket/"+userId;
|
var url = window._CONFIG['domianWebSocketURL'].replace('https://','wss://').replace('http://','ws://')+'/websocket/'+userId
|
||||||
//console.log(url);
|
//console.log(url);
|
||||||
this.websock = new WebSocket(url);
|
this.websock = new WebSocket(url)
|
||||||
this.websock.onopen = this.websocketOnopen;
|
this.websock.onopen = this.websocketOnopen
|
||||||
this.websock.onerror = this.websocketOnerror;
|
this.websock.onerror = this.websocketOnerror
|
||||||
this.websock.onmessage = this.websocketOnmessage;
|
this.websock.onmessage = this.websocketOnmessage
|
||||||
this.websock.onclose = this.websocketOnclose;
|
this.websock.onclose = this.websocketOnclose
|
||||||
},
|
},
|
||||||
websocketOnopen: function () {
|
websocketOnopen: function () {
|
||||||
console.log("WebSocket连接成功");
|
console.log('WebSocket连接成功')
|
||||||
//心跳检测重置
|
//心跳检测重置
|
||||||
//this.heartCheck.reset().start();
|
//this.heartCheck.reset().start();
|
||||||
},
|
},
|
||||||
websocketOnerror: function (e) {
|
websocketOnerror: function (e) {
|
||||||
console.log("WebSocket连接发生错误");
|
console.log('WebSocket连接发生错误')
|
||||||
this.reconnect();
|
this.reconnect()
|
||||||
},
|
},
|
||||||
websocketOnmessage: function (e) {
|
websocketOnmessage: function (e) {
|
||||||
console.log("-----接收消息-------",e.data);
|
console.log('-----接收消息-------',e.data)
|
||||||
var data = eval("(" + e.data + ")"); //解析对象
|
var data = eval('(' + e.data + ')') //解析对象
|
||||||
if(data.cmd == "topic"){
|
if(data.cmd == 'topic'){
|
||||||
//系统通知
|
//系统通知
|
||||||
this.loadData();
|
this.loadData()
|
||||||
}else if(data.cmd == "user"){
|
}else if(data.cmd == 'user'){
|
||||||
//用户消息
|
//用户消息
|
||||||
this.loadData();
|
this.loadData()
|
||||||
}
|
}
|
||||||
//心跳检测重置
|
//心跳检测重置
|
||||||
//this.heartCheck.reset().start();
|
//this.heartCheck.reset().start();
|
||||||
},
|
},
|
||||||
websocketOnclose: function (e) {
|
websocketOnclose: function (e) {
|
||||||
console.log("connection closed (" + e + ")");
|
console.log('connection closed (' + e + ')')
|
||||||
if(e){
|
if(e){
|
||||||
console.log("connection closed (" + e.code + ")");
|
console.log('connection closed (' + e.code + ')')
|
||||||
}
|
}
|
||||||
this.reconnect();
|
this.reconnect()
|
||||||
},
|
},
|
||||||
websocketSend(text) { // 数据发送
|
websocketSend(text) { // 数据发送
|
||||||
try {
|
try {
|
||||||
this.websock.send(text);
|
this.websock.send(text)
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.log("send failed (" + err.code + ")");
|
console.log('send failed (' + err.code + ')')
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
openNotification (data) {
|
openNotification (data) {
|
||||||
var text = data.msgTxt;
|
var text = data.msgTxt
|
||||||
const key = `open${Date.now()}`;
|
const key = `open${Date.now()}`
|
||||||
this.$notification.open({
|
this.$notification.open({
|
||||||
message: '消息提醒',
|
message: '消息提醒',
|
||||||
placement:'bottomRight',
|
placement:'bottomRight',
|
||||||
@@ -263,39 +263,39 @@
|
|||||||
}
|
}
|
||||||
}, '查看详情')
|
}, '查看详情')
|
||||||
},
|
},
|
||||||
});
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
reconnect() {
|
reconnect() {
|
||||||
var that = this;
|
var that = this
|
||||||
if(that.lockReconnect) return;
|
if(that.lockReconnect) return
|
||||||
that.lockReconnect = true;
|
that.lockReconnect = true
|
||||||
//没连接上会一直重连,设置延迟避免请求过多
|
//没连接上会一直重连,设置延迟避免请求过多
|
||||||
setTimeout(function () {
|
setTimeout(function () {
|
||||||
console.info("尝试重连...");
|
console.info('尝试重连...')
|
||||||
that.initWebSocket();
|
that.initWebSocket()
|
||||||
that.lockReconnect = false;
|
that.lockReconnect = false
|
||||||
}, 5000);
|
}, 5000)
|
||||||
},
|
},
|
||||||
heartCheckFun(){
|
heartCheckFun(){
|
||||||
var that = this;
|
var that = this
|
||||||
//心跳检测,每20s心跳一次
|
//心跳检测,每20s心跳一次
|
||||||
that.heartCheck = {
|
that.heartCheck = {
|
||||||
timeout: 20000,
|
timeout: 20000,
|
||||||
timeoutObj: null,
|
timeoutObj: null,
|
||||||
serverTimeoutObj: null,
|
serverTimeoutObj: null,
|
||||||
reset: function(){
|
reset: function(){
|
||||||
clearTimeout(this.timeoutObj);
|
clearTimeout(this.timeoutObj)
|
||||||
//clearTimeout(this.serverTimeoutObj);
|
//clearTimeout(this.serverTimeoutObj);
|
||||||
return this;
|
return this
|
||||||
},
|
},
|
||||||
start: function(){
|
start: function(){
|
||||||
var self = this;
|
var self = this
|
||||||
this.timeoutObj = setTimeout(function(){
|
this.timeoutObj = setTimeout(function(){
|
||||||
//这里发送一个心跳,后端收到后,返回一个心跳消息,
|
//这里发送一个心跳,后端收到后,返回一个心跳消息,
|
||||||
//onmessage拿到返回的心跳就说明连接正常
|
//onmessage拿到返回的心跳就说明连接正常
|
||||||
that.websocketSend("HeartBeat");
|
that.websocketSend('HeartBeat')
|
||||||
console.info("客户端发送心跳");
|
console.info('客户端发送心跳')
|
||||||
//self.serverTimeoutObj = setTimeout(function(){//如果超过一定时间还没重置,说明后端主动断开了
|
//self.serverTimeoutObj = setTimeout(function(){//如果超过一定时间还没重置,说明后端主动断开了
|
||||||
// that.websock.close();//如果onclose会执行reconnect,我们执行ws.close()就行了.如果直接执行reconnect 会触发onclose导致重连两次
|
// that.websock.close();//如果onclose会执行reconnect,我们执行ws.close()就行了.如果直接执行reconnect 会触发onclose导致重连两次
|
||||||
//}, self.timeout)
|
//}, self.timeout)
|
||||||
@@ -306,12 +306,12 @@
|
|||||||
|
|
||||||
|
|
||||||
showDetail(key,data){
|
showDetail(key,data){
|
||||||
this.$notification.close(key);
|
this.$notification.close(key)
|
||||||
var id = data.msgId;
|
var id = data.msgId
|
||||||
getAction(this.url.queryById,{id:id}).then((res) => {
|
getAction(this.url.queryById,{id:id}).then((res) => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
var record = res.result;
|
var record = res.result
|
||||||
this.showAnnouncement(record);
|
this.showAnnouncement(record)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
@@ -24,12 +24,12 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
name: "SysAnnouncementModal",
|
name: 'SysAnnouncementModal',
|
||||||
components: {
|
components: {
|
||||||
},
|
},
|
||||||
data () {
|
data () {
|
||||||
return {
|
return {
|
||||||
title:"通知消息",
|
title:'通知消息',
|
||||||
record: {},
|
record: {},
|
||||||
labelCol: {
|
labelCol: {
|
||||||
xs: { span: 24 },
|
xs: { span: 24 },
|
||||||
@@ -43,9 +43,9 @@
|
|||||||
switchFullscreen: true,
|
switchFullscreen: true,
|
||||||
loading: false,
|
loading: false,
|
||||||
bodyStyle:{
|
bodyStyle:{
|
||||||
padding: "0",
|
padding: '0',
|
||||||
height:(window.innerHeight*0.8)+"px",
|
height:(window.innerHeight*0.8)+'px',
|
||||||
"overflow-y":"auto",
|
'overflow-y':'auto',
|
||||||
|
|
||||||
},
|
},
|
||||||
modelStyle:{
|
modelStyle:{
|
||||||
@@ -59,11 +59,11 @@
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
detail (record) {
|
detail (record) {
|
||||||
this.visible = true;
|
this.visible = true
|
||||||
this.record = record;
|
this.record = record
|
||||||
},
|
},
|
||||||
handleCancel () {
|
handleCancel () {
|
||||||
this.visible = false;
|
this.visible = false
|
||||||
},
|
},
|
||||||
/** 切换全屏显示 */
|
/** 切换全屏显示 */
|
||||||
handleClickToggleFullScreen() {
|
handleClickToggleFullScreen() {
|
||||||
@@ -79,7 +79,7 @@
|
|||||||
},
|
},
|
||||||
toHandle(){
|
toHandle(){
|
||||||
if(this.record.openType==='url'){
|
if(this.record.openType==='url'){
|
||||||
this.visible = false;
|
this.visible = false
|
||||||
//链接跳转
|
//链接跳转
|
||||||
this.$router.push({path: this.record.openPage})
|
this.$router.push({path: this.record.openPage})
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ import half from '../../assets/imgs/half.png'
|
|||||||
import error from '../../assets/imgs/error.png'
|
import error from '../../assets/imgs/error.png'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "StatusSlot",
|
name: 'StatusSlot',
|
||||||
props: {
|
props: {
|
||||||
/*
|
/*
|
||||||
* 表格行对象
|
* 表格行对象
|
||||||
|
|||||||
@@ -63,16 +63,16 @@
|
|||||||
<script>
|
<script>
|
||||||
import HeaderNotice from './HeaderNotice'
|
import HeaderNotice from './HeaderNotice'
|
||||||
import UserPassword from './UserPassword'
|
import UserPassword from './UserPassword'
|
||||||
import SettingDrawer from "@/components/setting/SettingDrawer";
|
import SettingDrawer from '@/components/setting/SettingDrawer'
|
||||||
import DepartSelect from './DepartSelect'
|
import DepartSelect from './DepartSelect'
|
||||||
import { mapActions, mapGetters,mapState } from 'vuex'
|
import { mapActions, mapGetters,mapState } from 'vuex'
|
||||||
import { mixinDevice } from '@/utils/mixin.js'
|
import { mixinDevice } from '@/utils/mixin.js'
|
||||||
import { getFileAccessHttpUrl,getAction } from "@/api/manage"
|
import { getFileAccessHttpUrl,getAction } from '@/api/manage'
|
||||||
import Vue from 'vue'
|
import Vue from 'vue'
|
||||||
import { UI_CACHE_DB_DICT_DATA } from "@/store/mutation-types"
|
import { UI_CACHE_DB_DICT_DATA } from '@/store/mutation-types'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "UserMenu",
|
name: 'UserMenu',
|
||||||
mixins: [mixinDevice],
|
mixins: [mixinDevice],
|
||||||
data(){
|
data(){
|
||||||
return{
|
return{
|
||||||
@@ -139,8 +139,8 @@
|
|||||||
this.shows = false
|
this.shows = false
|
||||||
},
|
},
|
||||||
/* update_end author:zhaoxin date:20191129 for: 做头部菜单栏导航*/
|
/* update_end author:zhaoxin date:20191129 for: 做头部菜单栏导航*/
|
||||||
...mapActions(["Logout"]),
|
...mapActions(['Logout']),
|
||||||
...mapGetters(["nickname", "avatar","userInfo"]),
|
...mapGetters(['nickname', 'avatar','userInfo']),
|
||||||
getAvatar(){
|
getAvatar(){
|
||||||
return getFileAccessHttpUrl(this.avatar())
|
return getFileAccessHttpUrl(this.avatar())
|
||||||
},
|
},
|
||||||
@@ -153,7 +153,7 @@
|
|||||||
onOk() {
|
onOk() {
|
||||||
return that.Logout({}).then(() => {
|
return that.Logout({}).then(() => {
|
||||||
// update-begin author:wangshuai date:20200601 for: 退出登录跳转登录页面
|
// update-begin author:wangshuai date:20200601 for: 退出登录跳转登录页面
|
||||||
that.$router.push({ path: '/user/login' });
|
that.$router.push({ path: '/user/login' })
|
||||||
// update-end author:wangshuai date:20200601 for: 退出登录跳转登录页面
|
// update-end author:wangshuai date:20200601 for: 退出登录跳转登录页面
|
||||||
//window.location.reload()
|
//window.location.reload()
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
@@ -165,7 +165,7 @@
|
|||||||
},
|
},
|
||||||
onCancel() {
|
onCancel() {
|
||||||
},
|
},
|
||||||
});
|
})
|
||||||
},
|
},
|
||||||
updatePassword(){
|
updatePassword(){
|
||||||
let username = this.userInfo().username
|
let username = this.userInfo().username
|
||||||
@@ -180,7 +180,7 @@
|
|||||||
/* update_begin author:zhaoxin date:20191129 for: 做头部菜单栏导航*/
|
/* update_begin author:zhaoxin date:20191129 for: 做头部菜单栏导航*/
|
||||||
searchMenus(arr,menus){
|
searchMenus(arr,menus){
|
||||||
for(let i of menus){
|
for(let i of menus){
|
||||||
if(!i.hidden && "layouts/RouteView"!==i.component){
|
if(!i.hidden && 'layouts/RouteView'!==i.component){
|
||||||
arr.push(i)
|
arr.push(i)
|
||||||
}
|
}
|
||||||
if(i.children&& i.children.length>0){
|
if(i.children&& i.children.length>0){
|
||||||
@@ -205,20 +205,20 @@
|
|||||||
/*update_end author:zhaoxin date:20191129 for: 做头部菜单栏导航*/
|
/*update_end author:zhaoxin date:20191129 for: 做头部菜单栏导航*/
|
||||||
/*update_begin author:liushaoqian date:20200507 for: 刷新缓存*/
|
/*update_begin author:liushaoqian date:20200507 for: 刷新缓存*/
|
||||||
clearCache(){
|
clearCache(){
|
||||||
getAction("sys/dict/refleshCache").then((res) => {
|
getAction('sys/dict/refleshCache').then((res) => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
//重新加载缓存
|
//重新加载缓存
|
||||||
getAction("sys/dict/queryAllDictItems").then((res) => {
|
getAction('sys/dict/queryAllDictItems').then((res) => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
Vue.ls.remove(UI_CACHE_DB_DICT_DATA)
|
Vue.ls.remove(UI_CACHE_DB_DICT_DATA)
|
||||||
Vue.ls.set(UI_CACHE_DB_DICT_DATA, res.result, 7 * 24 * 60 * 60 * 1000)
|
Vue.ls.set(UI_CACHE_DB_DICT_DATA, res.result, 7 * 24 * 60 * 60 * 1000)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
this.$message.success("刷新缓存完成!");
|
this.$message.success('刷新缓存完成!')
|
||||||
}
|
}
|
||||||
}).catch(e=>{
|
}).catch(e=>{
|
||||||
this.$message.warn("刷新缓存失败!");
|
this.$message.warn('刷新缓存失败!')
|
||||||
console.log("刷新失败",e)
|
console.log('刷新失败',e)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
/*update_end author:liushaoqian date:20200507 for: 刷新缓存*/
|
/*update_end author:liushaoqian date:20200507 for: 刷新缓存*/
|
||||||
|
|||||||
@@ -42,10 +42,10 @@
|
|||||||
import { putAction } from '@/api/manage'
|
import { putAction } from '@/api/manage'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "UserPassword",
|
name: 'UserPassword',
|
||||||
data () {
|
data () {
|
||||||
return {
|
return {
|
||||||
title:"修改密码",
|
title:'修改密码',
|
||||||
modalWidth:800,
|
modalWidth:800,
|
||||||
visible: false,
|
visible: false,
|
||||||
confirmLoading: false,
|
confirmLoading: false,
|
||||||
@@ -81,63 +81,63 @@
|
|||||||
},
|
},
|
||||||
|
|
||||||
form:this.$form.createForm(this),
|
form:this.$form.createForm(this),
|
||||||
url: "sys/user/updatePassword",
|
url: 'sys/user/updatePassword',
|
||||||
username:"",
|
username:'',
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
show(uname){
|
show(uname){
|
||||||
if(!uname){
|
if(!uname){
|
||||||
this.$message.warning("当前系统无登录用户!");
|
this.$message.warning('当前系统无登录用户!')
|
||||||
return
|
return
|
||||||
}else{
|
}else{
|
||||||
this.username = uname
|
this.username = uname
|
||||||
this.form.resetFields();
|
this.form.resetFields()
|
||||||
this.visible = true;
|
this.visible = true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
handleCancel () {
|
handleCancel () {
|
||||||
this.close()
|
this.close()
|
||||||
},
|
},
|
||||||
close () {
|
close () {
|
||||||
this.$emit('close');
|
this.$emit('close')
|
||||||
this.visible = false;
|
this.visible = false
|
||||||
this.disableSubmit = false;
|
this.disableSubmit = false
|
||||||
this.selectedRole = [];
|
this.selectedRole = []
|
||||||
},
|
},
|
||||||
handleOk () {
|
handleOk () {
|
||||||
const that = this;
|
const that = this
|
||||||
// 触发表单验证
|
// 触发表单验证
|
||||||
this.form.validateFields((err, values) => {
|
this.form.validateFields((err, values) => {
|
||||||
if (!err) {
|
if (!err) {
|
||||||
that.confirmLoading = true;
|
that.confirmLoading = true
|
||||||
let params = Object.assign({username:this.username},values)
|
let params = Object.assign({username:this.username},values)
|
||||||
console.log("修改密码提交数据",params)
|
console.log('修改密码提交数据',params)
|
||||||
putAction(this.url,params).then((res)=>{
|
putAction(this.url,params).then((res)=>{
|
||||||
if(res.success){
|
if(res.success){
|
||||||
console.log(res)
|
console.log(res)
|
||||||
that.$message.success(res.message);
|
that.$message.success(res.message)
|
||||||
that.close();
|
that.close()
|
||||||
}else{
|
}else{
|
||||||
that.$message.warning(res.message);
|
that.$message.warning(res.message)
|
||||||
}
|
}
|
||||||
}).finally(() => {
|
}).finally(() => {
|
||||||
that.confirmLoading = false;
|
that.confirmLoading = false
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
validateToNextPassword (rule, value, callback) {
|
validateToNextPassword (rule, value, callback) {
|
||||||
const form = this.form;
|
const form = this.form
|
||||||
if (value && this.confirmDirty) {
|
if (value && this.confirmDirty) {
|
||||||
form.validateFields(['confirm'], { force: true })
|
form.validateFields(['confirm'], { force: true })
|
||||||
}
|
}
|
||||||
callback();
|
callback()
|
||||||
},
|
},
|
||||||
compareToFirstPassword (rule, value, callback) {
|
compareToFirstPassword (rule, value, callback) {
|
||||||
const form = this.form;
|
const form = this.form
|
||||||
if (value && value !== form.getFieldValue('password')) {
|
if (value && value !== form.getFieldValue('password')) {
|
||||||
callback('两次输入的密码不一样!');
|
callback('两次输入的密码不一样!')
|
||||||
} else {
|
} else {
|
||||||
callback()
|
callback()
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import { message } from 'ant-design-vue/es';
|
import { message } from 'ant-design-vue/es'
|
||||||
// import defaultSettings from '../defaultSettings';
|
// import defaultSettings from '../defaultSettings';
|
||||||
|
|
||||||
let lessNodesAppended;
|
let lessNodesAppended
|
||||||
|
|
||||||
const colorList = [
|
const colorList = [
|
||||||
{
|
{
|
||||||
@@ -28,7 +28,7 @@ const colorList = [
|
|||||||
{
|
{
|
||||||
key: '酱紫', color: '#722ED1',
|
key: '酱紫', color: '#722ED1',
|
||||||
},
|
},
|
||||||
];
|
]
|
||||||
|
|
||||||
const updateTheme = primaryColor => {
|
const updateTheme = primaryColor => {
|
||||||
// Don't compile less in production!
|
// Don't compile less in production!
|
||||||
@@ -37,33 +37,33 @@ const updateTheme = primaryColor => {
|
|||||||
} */
|
} */
|
||||||
// Determine if the component is remounted
|
// Determine if the component is remounted
|
||||||
if (!primaryColor) {
|
if (!primaryColor) {
|
||||||
return;
|
return
|
||||||
}
|
}
|
||||||
const hideMessage = message.loading('正在编译主题!', 0);
|
const hideMessage = message.loading('正在编译主题!', 0)
|
||||||
console.info(`正在编译主题!`)
|
console.info(`正在编译主题!`)
|
||||||
function buildIt() {
|
function buildIt() {
|
||||||
// 正确的判定less是否已经加载less.modifyVars可用
|
// 正确的判定less是否已经加载less.modifyVars可用
|
||||||
if (!window.less || !window.less.modifyVars) {
|
if (!window.less || !window.less.modifyVars) {
|
||||||
return;
|
return
|
||||||
}
|
}
|
||||||
// less.modifyVars可用
|
// less.modifyVars可用
|
||||||
window.less.modifyVars({
|
window.less.modifyVars({
|
||||||
'@primary-color': primaryColor,
|
'@primary-color': primaryColor,
|
||||||
})
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
hideMessage();
|
hideMessage()
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
message.error('Failed to update theme');
|
message.error('Failed to update theme')
|
||||||
hideMessage();
|
hideMessage()
|
||||||
});
|
})
|
||||||
}
|
}
|
||||||
if (!lessNodesAppended) {
|
if (!lessNodesAppended) {
|
||||||
// insert less.js and color.less
|
// insert less.js and color.less
|
||||||
const lessStyleNode = document.createElement('link');
|
const lessStyleNode = document.createElement('link')
|
||||||
const lessConfigNode = document.createElement('script');
|
const lessConfigNode = document.createElement('script')
|
||||||
const lessScriptNode = document.createElement('script');
|
const lessScriptNode = document.createElement('script')
|
||||||
lessStyleNode.setAttribute('rel', 'stylesheet/less');
|
lessStyleNode.setAttribute('rel', 'stylesheet/less')
|
||||||
lessStyleNode.setAttribute('href', __webpack_public_path__ + 'color.less')
|
lessStyleNode.setAttribute('href', __webpack_public_path__ + 'color.less')
|
||||||
lessConfigNode.innerHTML = `
|
lessConfigNode.innerHTML = `
|
||||||
window.less = {
|
window.less = {
|
||||||
@@ -71,25 +71,25 @@ const updateTheme = primaryColor => {
|
|||||||
env: 'production',
|
env: 'production',
|
||||||
javascriptEnabled: true
|
javascriptEnabled: true
|
||||||
};
|
};
|
||||||
`;
|
`
|
||||||
lessScriptNode.src = 'https://gw.alipayobjects.com/os/lib/less.js/3.8.1/less.min.js';
|
lessScriptNode.src = 'https://gw.alipayobjects.com/os/lib/less.js/3.8.1/less.min.js'
|
||||||
lessScriptNode.async = true;
|
lessScriptNode.async = true
|
||||||
lessScriptNode.onload = () => {
|
lessScriptNode.onload = () => {
|
||||||
buildIt();
|
buildIt()
|
||||||
lessScriptNode.onload = null;
|
lessScriptNode.onload = null
|
||||||
};
|
}
|
||||||
document.body.appendChild(lessStyleNode);
|
document.body.appendChild(lessStyleNode)
|
||||||
document.body.appendChild(lessConfigNode);
|
document.body.appendChild(lessConfigNode)
|
||||||
document.body.appendChild(lessScriptNode);
|
document.body.appendChild(lessScriptNode)
|
||||||
lessNodesAppended = true;
|
lessNodesAppended = true
|
||||||
} else {
|
} else {
|
||||||
buildIt();
|
buildIt()
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
|
|
||||||
const updateColorWeak = colorWeak => {
|
const updateColorWeak = colorWeak => {
|
||||||
// document.body.className = colorWeak ? 'colorWeak' : '';
|
// document.body.className = colorWeak ? 'colorWeak' : '';
|
||||||
colorWeak ? document.body.classList.add('colorWeak') : document.body.classList.remove('colorWeak')
|
colorWeak ? document.body.classList.add('colorWeak') : document.body.classList.remove('colorWeak')
|
||||||
};
|
}
|
||||||
|
|
||||||
export { updateTheme, colorList, updateColorWeak }
|
export { updateTheme, colorList, updateColorWeak }
|
||||||
+34
-34
@@ -1,13 +1,13 @@
|
|||||||
import Vue from "vue";
|
import Vue from 'vue'
|
||||||
import App from "./App.vue";
|
import App from './App.vue'
|
||||||
import router from "./router";
|
import router from './router'
|
||||||
import store from "./store";
|
import store from './store'
|
||||||
import "./config";
|
import './config'
|
||||||
import Storage from "vue-ls";
|
import Storage from 'vue-ls'
|
||||||
import Antd from "ant-design-vue";
|
import Antd from 'ant-design-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 '@/permission' // permission control
|
||||||
import hasPermission from "@/utils/hasPermission";
|
import hasPermission from '@/utils/hasPermission'
|
||||||
import {
|
import {
|
||||||
ACCESS_TOKEN,
|
ACCESS_TOKEN,
|
||||||
DEFAULT_COLOR,
|
DEFAULT_COLOR,
|
||||||
@@ -20,23 +20,23 @@ import {
|
|||||||
DEFAULT_FIXED_SIDEMENU,
|
DEFAULT_FIXED_SIDEMENU,
|
||||||
DEFAULT_CONTENT_WIDTH_TYPE,
|
DEFAULT_CONTENT_WIDTH_TYPE,
|
||||||
DEFAULT_MULTI_PAGE
|
DEFAULT_MULTI_PAGE
|
||||||
} from "@/store/mutation-types";
|
} from '@/store/mutation-types'
|
||||||
import config from "@/defaultSettings";
|
import config from '@/defaultSettings'
|
||||||
import JeroComponents from "@/components/jero/index";
|
import JeroComponents from '@/components/jero/index'
|
||||||
import JDictSelectTag from "./components/dict/index.js";
|
import JDictSelectTag from './components/dict/index.js'
|
||||||
import '@/utils/filter' // base filtermybatis-plus
|
import '@/utils/filter' // base filtermybatis-plus
|
||||||
import vTrim from "@/utils/vTrim";
|
import vTrim from '@/utils/vTrim'
|
||||||
import preventClick from "@/utils/preventClick";
|
import preventClick from '@/utils/preventClick'
|
||||||
import '@/assets/less/JAreaLinkage.less'
|
import '@/assets/less/JAreaLinkage.less'
|
||||||
import VueAreaLinkage from 'vue-area-linkage'
|
import VueAreaLinkage from 'vue-area-linkage'
|
||||||
|
|
||||||
Vue.config.productionTip = false;
|
Vue.config.productionTip = false
|
||||||
Vue.use(Storage, config.storageOptions);
|
Vue.use(Storage, config.storageOptions)
|
||||||
Vue.use(Antd);
|
Vue.use(Antd)
|
||||||
Vue.use(hasPermission)
|
Vue.use(hasPermission)
|
||||||
Vue.use(router);
|
Vue.use(router)
|
||||||
Vue.use(JeroComponents);
|
Vue.use(JeroComponents)
|
||||||
Vue.use(JDictSelectTag);
|
Vue.use(JDictSelectTag)
|
||||||
Vue.use(vTrim)
|
Vue.use(vTrim)
|
||||||
Vue.use(preventClick)
|
Vue.use(preventClick)
|
||||||
Vue.use(VueAreaLinkage)
|
Vue.use(VueAreaLinkage)
|
||||||
@@ -45,17 +45,17 @@ new Vue({
|
|||||||
router,
|
router,
|
||||||
store,
|
store,
|
||||||
mounted() {
|
mounted() {
|
||||||
store.commit("SET_SIDEBAR_TYPE", Vue.ls.get(SIDEBAR_TYPE, true));
|
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_THEME', Vue.ls.get(DEFAULT_THEME, config.navTheme))
|
||||||
store.commit("TOGGLE_LAYOUT_MODE", Vue.ls.get(DEFAULT_LAYOUT_MODE, config.layout));
|
store.commit('TOGGLE_LAYOUT_MODE', Vue.ls.get(DEFAULT_LAYOUT_MODE, config.layout))
|
||||||
store.commit("TOGGLE_FIXED_HEADER", Vue.ls.get(DEFAULT_FIXED_HEADER, config.fixedHeader));
|
store.commit('TOGGLE_FIXED_HEADER', Vue.ls.get(DEFAULT_FIXED_HEADER, config.fixedHeader))
|
||||||
store.commit("TOGGLE_FIXED_SIDERBAR", Vue.ls.get(DEFAULT_FIXED_SIDEMENU, config.fixSiderbar));
|
store.commit('TOGGLE_FIXED_SIDERBAR', Vue.ls.get(DEFAULT_FIXED_SIDEMENU, config.fixSiderbar))
|
||||||
store.commit("TOGGLE_CONTENT_WIDTH", Vue.ls.get(DEFAULT_CONTENT_WIDTH_TYPE, config.contentWidth));
|
store.commit('TOGGLE_CONTENT_WIDTH', Vue.ls.get(DEFAULT_CONTENT_WIDTH_TYPE, config.contentWidth))
|
||||||
store.commit("TOGGLE_FIXED_HEADER_HIDDEN", Vue.ls.get(DEFAULT_FIXED_HEADER_HIDDEN, config.autoHideHeader));
|
store.commit('TOGGLE_FIXED_HEADER_HIDDEN', Vue.ls.get(DEFAULT_FIXED_HEADER_HIDDEN, config.autoHideHeader))
|
||||||
store.commit("TOGGLE_WEAK", Vue.ls.get(DEFAULT_COLOR_WEAK, config.colorWeak));
|
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('TOGGLE_COLOR', Vue.ls.get(DEFAULT_COLOR, config.primaryColor))
|
||||||
store.commit("SET_TOKEN", Vue.ls.get(ACCESS_TOKEN));
|
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)
|
render: (h) => h(App)
|
||||||
}).$mount("#app");
|
}).$mount('#app')
|
||||||
|
|||||||
+98
-98
@@ -3,13 +3,13 @@
|
|||||||
* 高级查询按钮调用 superQuery方法 高级查询组件ref定义为superQueryModal
|
* 高级查询按钮调用 superQuery方法 高级查询组件ref定义为superQueryModal
|
||||||
* data中url定义 list为查询列表 delete为删除单条记录 deleteBatch为批量删除
|
* data中url定义 list为查询列表 delete为删除单条记录 deleteBatch为批量删除
|
||||||
*/
|
*/
|
||||||
import {filterObj} from '@/utils/util';
|
import {filterObj} from '@/utils/util'
|
||||||
import {deleteAction, getAction, downFile, getFileAccessHttpUrl} from '@/api/manage'
|
import {deleteAction, getAction, downFile, getFileAccessHttpUrl} from '@/api/manage'
|
||||||
import Vue from 'vue'
|
import Vue from 'vue'
|
||||||
import {ACCESS_TOKEN, TENANT_ID} from "@/store/mutation-types"
|
import {ACCESS_TOKEN, TENANT_ID} from '@/store/mutation-types'
|
||||||
import store from '@/store'
|
import store from '@/store'
|
||||||
import {Modal} from 'ant-design-vue'
|
import {Modal} from 'ant-design-vue'
|
||||||
import {deleteByDepartId} from "@api/api";
|
import {deleteByDepartId} from '@api/api'
|
||||||
|
|
||||||
export const JeroListMixin = {
|
export const JeroListMixin = {
|
||||||
data() {
|
data() {
|
||||||
@@ -26,7 +26,7 @@ export const JeroListMixin = {
|
|||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
pageSizeOptions: ['10', '20', '30', '50'],
|
pageSizeOptions: ['10', '20', '30', '50'],
|
||||||
showTotal: (total, range) => {
|
showTotal: (total, range) => {
|
||||||
return range[0] + "-" + range[1] + " 共" + total + "条"
|
return range[0] + '-' + range[1] + ' 共' + total + '条'
|
||||||
},
|
},
|
||||||
showQuickJumper: true,
|
showQuickJumper: true,
|
||||||
showSizeChanger: true,
|
showSizeChanger: true,
|
||||||
@@ -57,9 +57,9 @@ export const JeroListMixin = {
|
|||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
if (!this.disableMixinCreated) {
|
if (!this.disableMixinCreated) {
|
||||||
this.loadData();
|
this.loadData()
|
||||||
//初始化字典配置 在自己页面定义
|
//初始化字典配置 在自己页面定义
|
||||||
this.initDictConfig();
|
this.initDictConfig()
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@@ -70,38 +70,38 @@ export const JeroListMixin = {
|
|||||||
if (tenantid) {
|
if (tenantid) {
|
||||||
head['tenant_id'] = tenantid
|
head['tenant_id'] = tenantid
|
||||||
}
|
}
|
||||||
return head;
|
return head
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
loadData(arg) {
|
loadData(arg) {
|
||||||
if (!this.url.list) {
|
if (!this.url.list) {
|
||||||
this.$message.error("请设置url.list属性!")
|
this.$message.error('请设置url.list属性!')
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
//加载数据 若传入参数1则加载第一页的内容
|
//加载数据 若传入参数1则加载第一页的内容
|
||||||
if (arg === 1) {
|
if (arg === 1) {
|
||||||
this.ipagination.current = 1;
|
this.ipagination.current = 1
|
||||||
}
|
}
|
||||||
var params = this.getQueryParams();//查询条件
|
var params = this.getQueryParams()//查询条件
|
||||||
this.loading = true;
|
this.loading = true
|
||||||
getAction(this.url.list, params).then((res) => {
|
getAction(this.url.list, params).then((res) => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
//update-begin---author:zhangyafei Date:20201118 for:适配不分页的数据列表------------
|
//update-begin---author:zhangyafei Date:20201118 for:适配不分页的数据列表------------
|
||||||
this.dataSource = res.result.records || res.result;
|
this.dataSource = res.result.records || res.result
|
||||||
if (res.result.total) {
|
if (res.result.total) {
|
||||||
this.ipagination.total = res.result.total;
|
this.ipagination.total = res.result.total
|
||||||
//清空列表选中
|
//清空列表选中
|
||||||
this.onClearSelected()
|
this.onClearSelected()
|
||||||
} else {
|
} else {
|
||||||
this.ipagination.total = 0;
|
this.ipagination.total = 0
|
||||||
}
|
}
|
||||||
//update-end---author:zhangyafei Date:20201118 for:适配不分页的数据列表------------
|
//update-end---author:zhangyafei Date:20201118 for:适配不分页的数据列表------------
|
||||||
}
|
}
|
||||||
if (res.code === 510) {
|
if (res.code === 510) {
|
||||||
this.$message.warning(res.message)
|
this.$message.warning(res.message)
|
||||||
}
|
}
|
||||||
this.loading = false;
|
this.loading = false
|
||||||
}).finally(() => {
|
}).finally(() => {
|
||||||
this.loading = false
|
this.loading = false
|
||||||
})
|
})
|
||||||
@@ -129,128 +129,128 @@ export const JeroListMixin = {
|
|||||||
sqp['superQueryMatchType'] = this.superQueryMatchType
|
sqp['superQueryMatchType'] = this.superQueryMatchType
|
||||||
}
|
}
|
||||||
// var param = Object.assign(sqp, this.queryParam, this.isorter ,this.filters);
|
// var param = Object.assign(sqp, this.queryParam, this.isorter ,this.filters);
|
||||||
var param = Object.assign(sqp, this.lastQueryParam, this.isorter, this.filters);
|
var param = Object.assign(sqp, this.lastQueryParam, this.isorter, this.filters)
|
||||||
param.field = this.getQueryField();
|
param.field = this.getQueryField()
|
||||||
param.pageNo = this.ipagination.current;
|
param.pageNo = this.ipagination.current
|
||||||
param.pageSize = this.ipagination.pageSize;
|
param.pageSize = this.ipagination.pageSize
|
||||||
return filterObj(param);
|
return filterObj(param)
|
||||||
},
|
},
|
||||||
getQueryField() {
|
getQueryField() {
|
||||||
//TODO 字段权限控制
|
//TODO 字段权限控制
|
||||||
var str = "id,";
|
var str = 'id,'
|
||||||
this.columns.forEach(function (value) {
|
this.columns.forEach(function (value) {
|
||||||
str += "," + value.dataIndex;
|
str += ',' + value.dataIndex
|
||||||
});
|
})
|
||||||
return str;
|
return str
|
||||||
},
|
},
|
||||||
|
|
||||||
onSelectChange(selectedRowKeys, selectionRows) {
|
onSelectChange(selectedRowKeys, selectionRows) {
|
||||||
this.selectedRowKeys = selectedRowKeys;
|
this.selectedRowKeys = selectedRowKeys
|
||||||
this.selectionRows = selectionRows;
|
this.selectionRows = selectionRows
|
||||||
},
|
},
|
||||||
onClearSelected() {
|
onClearSelected() {
|
||||||
this.selectedRowKeys = [];
|
this.selectedRowKeys = []
|
||||||
this.selectionRows = [];
|
this.selectionRows = []
|
||||||
},
|
},
|
||||||
searchQuery() {
|
searchQuery() {
|
||||||
this.lastQueryParam = {...this.queryParam}
|
this.lastQueryParam = {...this.queryParam}
|
||||||
this.loadData(1);
|
this.loadData(1)
|
||||||
},
|
},
|
||||||
superQuery() {
|
superQuery() {
|
||||||
this.$refs.superQueryModal.show();
|
this.$refs.superQueryModal.show()
|
||||||
},
|
},
|
||||||
searchReset() {
|
searchReset() {
|
||||||
this.lastQueryParam = {}
|
this.lastQueryParam = {}
|
||||||
this.queryParam = {}
|
this.queryParam = {}
|
||||||
this.loadData(1);
|
this.loadData(1)
|
||||||
},
|
},
|
||||||
batchDel: function () {
|
batchDel: function () {
|
||||||
if (!this.url.deleteBatch) {
|
if (!this.url.deleteBatch) {
|
||||||
this.$message.error("请设置url.deleteBatch属性!")
|
this.$message.error('请设置url.deleteBatch属性!')
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if (this.selectedRowKeys.length <= 0) {
|
if (this.selectedRowKeys.length <= 0) {
|
||||||
this.$message.warning('请选择一条记录!');
|
this.$message.warning('请选择一条记录!')
|
||||||
return;
|
return
|
||||||
} else {
|
} else {
|
||||||
var ids = "";
|
var ids = ''
|
||||||
for (var a = 0; a < this.selectedRowKeys.length; a++) {
|
for (var a = 0; a < this.selectedRowKeys.length; a++) {
|
||||||
ids += this.selectedRowKeys[a] + ",";
|
ids += this.selectedRowKeys[a] + ','
|
||||||
}
|
}
|
||||||
var that = this;
|
var that = this
|
||||||
this.$confirm({
|
this.$confirm({
|
||||||
title: "确认删除",
|
title: '确认删除',
|
||||||
content: "是否删除选中数据?",
|
content: '是否删除选中数据?',
|
||||||
onOk: function () {
|
onOk: function () {
|
||||||
that.loading = true;
|
that.loading = true
|
||||||
getAction(that.url.deleteBatch, {ids: ids}).then((res) => {
|
getAction(that.url.deleteBatch, {ids: ids}).then((res) => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
that.$message.success(res.message);
|
that.$message.success(res.message)
|
||||||
// 判断当前删除的数据是否是最后一页的全部数据,如果是的话页码减一
|
// 判断当前删除的数据是否是最后一页的全部数据,如果是的话页码减一
|
||||||
if (that.ipagination.current > 1 && (that.ipagination.current === Math.ceil(that.ipagination.total / that.ipagination.pageSize)) &&
|
if (that.ipagination.current > 1 && (that.ipagination.current === Math.ceil(that.ipagination.total / that.ipagination.pageSize)) &&
|
||||||
that.selectedRowKeys.length === that.dataSource.length
|
that.selectedRowKeys.length === that.dataSource.length
|
||||||
) {
|
) {
|
||||||
that.ipagination.current -= 1
|
that.ipagination.current -= 1
|
||||||
}
|
}
|
||||||
that.loadData();
|
that.loadData()
|
||||||
that.onClearSelected();
|
that.onClearSelected()
|
||||||
} else {
|
} else {
|
||||||
that.$message.warning(res.message);
|
that.$message.warning(res.message)
|
||||||
}
|
}
|
||||||
}).finally(() => {
|
}).finally(() => {
|
||||||
that.loading = false;
|
that.loading = false
|
||||||
});
|
})
|
||||||
}
|
}
|
||||||
});
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
handleDelete: function (id) {
|
handleDelete: function (id) {
|
||||||
if (!this.url.delete) {
|
if (!this.url.delete) {
|
||||||
this.$message.error("请设置url.delete属性!")
|
this.$message.error('请设置url.delete属性!')
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
var that = this;
|
var that = this
|
||||||
this.$confirm({
|
this.$confirm({
|
||||||
title: "确认删除",
|
title: '确认删除',
|
||||||
content: "确定要删除此条数据吗?",
|
content: '确定要删除此条数据吗?',
|
||||||
onOk: function () {
|
onOk: function () {
|
||||||
getAction(that.url.delete, {id: id}).then((res) => {
|
getAction(that.url.delete, {id: id}).then((res) => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
that.$message.success(res.message);
|
that.$message.success(res.message)
|
||||||
// 判断当前删除的数据是否是最后一页的最后一条数据,如果是的话页码减一
|
// 判断当前删除的数据是否是最后一页的最后一条数据,如果是的话页码减一
|
||||||
if (that.ipagination.current > 1 && ((that.ipagination.current - 1) * that.ipagination.pageSize) + 1 === that.ipagination.total) {
|
if (that.ipagination.current > 1 && ((that.ipagination.current - 1) * that.ipagination.pageSize) + 1 === that.ipagination.total) {
|
||||||
that.ipagination.current -= 1
|
that.ipagination.current -= 1
|
||||||
}
|
}
|
||||||
that.loadData();
|
that.loadData()
|
||||||
} else {
|
} else {
|
||||||
that.$message.warning(res.message);
|
that.$message.warning(res.message)
|
||||||
}
|
}
|
||||||
});
|
})
|
||||||
}
|
}
|
||||||
});
|
})
|
||||||
},
|
},
|
||||||
handleEdit: function (record) {
|
handleEdit: function (record) {
|
||||||
this.$refs.modalForm.edit(record);
|
this.$refs.modalForm.edit(record)
|
||||||
this.$refs.modalForm.title = "编辑";
|
this.$refs.modalForm.title = '编辑'
|
||||||
this.$refs.modalForm.disableSubmit = false;
|
this.$refs.modalForm.disableSubmit = false
|
||||||
},
|
},
|
||||||
handleAdd: function () {
|
handleAdd: function () {
|
||||||
this.$refs.modalForm.add();
|
this.$refs.modalForm.add()
|
||||||
this.$refs.modalForm.title = "新增";
|
this.$refs.modalForm.title = '新增'
|
||||||
this.$refs.modalForm.disableSubmit = false;
|
this.$refs.modalForm.disableSubmit = false
|
||||||
},
|
},
|
||||||
handleTableChange(pagination, filters, sorter) {
|
handleTableChange(pagination, filters, sorter) {
|
||||||
//分页、排序、筛选变化时触发
|
//分页、排序、筛选变化时触发
|
||||||
//TODO 筛选
|
//TODO 筛选
|
||||||
if (Object.keys(sorter).length > 0) {
|
if (Object.keys(sorter).length > 0) {
|
||||||
this.isorter.column = sorter.field;
|
this.isorter.column = sorter.field
|
||||||
this.isorter.order = "ascend" == sorter.order ? "asc" : "desc"
|
this.isorter.order = 'ascend' == sorter.order ? 'asc' : 'desc'
|
||||||
}
|
}
|
||||||
this.ipagination = pagination;
|
this.ipagination = pagination
|
||||||
this.loadData();
|
this.loadData()
|
||||||
},
|
},
|
||||||
handleToggleSearch() {
|
handleToggleSearch() {
|
||||||
this.toggleSearchStatus = !this.toggleSearchStatus;
|
this.toggleSearchStatus = !this.toggleSearchStatus
|
||||||
},
|
},
|
||||||
// 给popup查询使用(查询区域不支持回填多个字段,限制只返回一个字段)
|
// 给popup查询使用(查询区域不支持回填多个字段,限制只返回一个字段)
|
||||||
getPopupField(fields) {
|
getPopupField(fields) {
|
||||||
@@ -258,33 +258,33 @@ export const JeroListMixin = {
|
|||||||
},
|
},
|
||||||
modalFormOk() {
|
modalFormOk() {
|
||||||
// 新增/修改 成功时,重载列表
|
// 新增/修改 成功时,重载列表
|
||||||
this.loadData();
|
this.loadData()
|
||||||
//清空列表选中
|
//清空列表选中
|
||||||
this.onClearSelected()
|
this.onClearSelected()
|
||||||
},
|
},
|
||||||
handleDetail: function (record) {
|
handleDetail: function (record) {
|
||||||
this.$refs.modalForm.edit(record);
|
this.$refs.modalForm.edit(record)
|
||||||
this.$refs.modalForm.title = "详情";
|
this.$refs.modalForm.title = '详情'
|
||||||
this.$refs.modalForm.disableSubmit = true;
|
this.$refs.modalForm.disableSubmit = true
|
||||||
},
|
},
|
||||||
/* 导出 */
|
/* 导出 */
|
||||||
handleExportXls2() {
|
handleExportXls2() {
|
||||||
let paramsStr = encodeURI(JSON.stringify(this.getQueryParams()));
|
let paramsStr = encodeURI(JSON.stringify(this.getQueryParams()))
|
||||||
let url = `${window._CONFIG['domianURL']}/${this.url.exportXlsUrl}?paramsStr=${paramsStr}`;
|
let url = `${window._CONFIG['domianURL']}/${this.url.exportXlsUrl}?paramsStr=${paramsStr}`
|
||||||
window.location.href = url;
|
window.location.href = url
|
||||||
},
|
},
|
||||||
handleExportXls(fileName) {
|
handleExportXls(fileName) {
|
||||||
if (!fileName || typeof fileName != "string") {
|
if (!fileName || typeof fileName != 'string') {
|
||||||
fileName = "导出文件"
|
fileName = '导出文件'
|
||||||
}
|
}
|
||||||
let param = this.getQueryParams();
|
let param = this.getQueryParams()
|
||||||
if (this.selectedRowKeys && this.selectedRowKeys.length > 0) {
|
if (this.selectedRowKeys && this.selectedRowKeys.length > 0) {
|
||||||
param['selections'] = this.selectedRowKeys.join(",")
|
param['selections'] = this.selectedRowKeys.join(',')
|
||||||
}
|
}
|
||||||
console.log("导出参数", param)
|
console.log('导出参数', param)
|
||||||
downFile(this.url.exportXlsUrl, param).then((data) => {
|
downFile(this.url.exportXlsUrl, param).then((data) => {
|
||||||
if (!data) {
|
if (!data) {
|
||||||
this.$message.warning("文件下载失败")
|
this.$message.warning('文件下载失败')
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if (typeof window.navigator.msSaveBlob !== 'undefined') {
|
if (typeof window.navigator.msSaveBlob !== 'undefined') {
|
||||||
@@ -297,8 +297,8 @@ export const JeroListMixin = {
|
|||||||
link.setAttribute('download', fileName + '.xls')
|
link.setAttribute('download', fileName + '.xls')
|
||||||
document.body.appendChild(link)
|
document.body.appendChild(link)
|
||||||
link.click()
|
link.click()
|
||||||
document.body.removeChild(link); //下载完成移除元素
|
document.body.removeChild(link) //下载完成移除元素
|
||||||
window.URL.revokeObjectURL(url); //释放掉blob对象
|
window.URL.revokeObjectURL(url) //释放掉blob对象
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
@@ -306,12 +306,12 @@ export const JeroListMixin = {
|
|||||||
* 下载模板
|
* 下载模板
|
||||||
* */
|
* */
|
||||||
downTemplate(fileName) {
|
downTemplate(fileName) {
|
||||||
if (!fileName || typeof fileName != "string") {
|
if (!fileName || typeof fileName != 'string') {
|
||||||
fileName = "模板文件"
|
fileName = '模板文件'
|
||||||
}
|
}
|
||||||
downFile(this.url.downTemplateUrl).then((data) => {
|
downFile(this.url.downTemplateUrl).then((data) => {
|
||||||
if (!data) {
|
if (!data) {
|
||||||
this.$message.warning("文件下载失败")
|
this.$message.warning('文件下载失败')
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if (typeof window.navigator.msSaveBlob !== 'undefined') {
|
if (typeof window.navigator.msSaveBlob !== 'undefined') {
|
||||||
@@ -324,15 +324,15 @@ export const JeroListMixin = {
|
|||||||
link.setAttribute('download', fileName + '.xls')
|
link.setAttribute('download', fileName + '.xls')
|
||||||
document.body.appendChild(link)
|
document.body.appendChild(link)
|
||||||
link.click()
|
link.click()
|
||||||
document.body.removeChild(link); //下载完成移除元素
|
document.body.removeChild(link) //下载完成移除元素
|
||||||
window.URL.revokeObjectURL(url); //释放掉blob对象
|
window.URL.revokeObjectURL(url) //释放掉blob对象
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
/* 导入 */
|
/* 导入 */
|
||||||
handleImportExcel(info) {
|
handleImportExcel(info) {
|
||||||
if (info.file.status !== 'uploading') {
|
if (info.file.status !== 'uploading') {
|
||||||
console.log(info.file, info.fileList);
|
console.log(info.file, info.fileList)
|
||||||
}
|
}
|
||||||
if (info.file.status === 'done') {
|
if (info.file.status === 'done') {
|
||||||
if (info.file.response.success) {
|
if (info.file.response.success) {
|
||||||
@@ -375,7 +375,7 @@ export const JeroListMixin = {
|
|||||||
if (info.file.response.status === 500) {
|
if (info.file.response.status === 500) {
|
||||||
let data = info.file.response
|
let data = info.file.response
|
||||||
const token = Vue.ls.get(ACCESS_TOKEN)
|
const token = Vue.ls.get(ACCESS_TOKEN)
|
||||||
if (token && data.message.includes("Token失效")) {
|
if (token && data.message.includes('Token失效')) {
|
||||||
Modal.error({
|
Modal.error({
|
||||||
title: '登录已过期',
|
title: '登录已过期',
|
||||||
content: '很抱歉,登录已过期,请重新登录',
|
content: '很抱歉,登录已过期,请重新登录',
|
||||||
@@ -384,13 +384,13 @@ export const JeroListMixin = {
|
|||||||
onOk: () => {
|
onOk: () => {
|
||||||
store.dispatch('Logout').then(() => {
|
store.dispatch('Logout').then(() => {
|
||||||
Vue.ls.remove(ACCESS_TOKEN)
|
Vue.ls.remove(ACCESS_TOKEN)
|
||||||
window.location.reload();
|
window.location.reload()
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
this.$message.error(`文件上传失败: ${info.file.msg} `);
|
this.$message.error(`文件上传失败: ${info.file.msg} `)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -402,8 +402,8 @@ export const JeroListMixin = {
|
|||||||
},
|
},
|
||||||
/* 图片预览 */
|
/* 图片预览 */
|
||||||
getImgView(text) {
|
getImgView(text) {
|
||||||
if (text && text.indexOf(",") > 0) {
|
if (text && text.indexOf(',') > 0) {
|
||||||
text = text.substring(0, text.indexOf(","))
|
text = text.substring(0, text.indexOf(','))
|
||||||
}
|
}
|
||||||
return getFileAccessHttpUrl(text)
|
return getFileAccessHttpUrl(text)
|
||||||
},
|
},
|
||||||
@@ -411,14 +411,14 @@ export const JeroListMixin = {
|
|||||||
// update--autor:lvdandan-----date:20200630------for:修改下载文件方法名uploadFile改为downloadFile------
|
// update--autor:lvdandan-----date:20200630------for:修改下载文件方法名uploadFile改为downloadFile------
|
||||||
downloadFile(text) {
|
downloadFile(text) {
|
||||||
if (!text) {
|
if (!text) {
|
||||||
this.$message.warning("未知的文件")
|
this.$message.warning('未知的文件')
|
||||||
return;
|
return
|
||||||
}
|
}
|
||||||
if (text.indexOf(",") > 0) {
|
if (text.indexOf(',') > 0) {
|
||||||
text = text.substring(0, text.indexOf(","))
|
text = text.substring(0, text.indexOf(','))
|
||||||
}
|
}
|
||||||
let url = getFileAccessHttpUrl(text)
|
let url = getFileAccessHttpUrl(text)
|
||||||
window.open(url);
|
window.open(url)
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+36
-36
@@ -1,72 +1,72 @@
|
|||||||
import Vue from "vue";
|
import Vue from 'vue'
|
||||||
import router from "./router";
|
import router from './router'
|
||||||
import store from "./store";
|
import store from './store'
|
||||||
import NProgress from "nprogress"; // progress bar
|
import NProgress from 'nprogress' // progress bar
|
||||||
import "nprogress/nprogress.css"; // progress bar style
|
import 'nprogress/nprogress.css' // progress bar style
|
||||||
// import notification from 'ant-design-vue/es/notification'
|
// import notification from 'ant-design-vue/es/notification'
|
||||||
import { ACCESS_TOKEN, INDEX_MAIN_PAGE_PATH } from "@/store/mutation-types";
|
import { ACCESS_TOKEN, INDEX_MAIN_PAGE_PATH } from '@/store/mutation-types'
|
||||||
import { generateIndexRouter } from "@/utils/util";
|
import { generateIndexRouter } from '@/utils/util'
|
||||||
|
|
||||||
NProgress.configure({ showSpinner: false }); // NProgress Configuration
|
NProgress.configure({ showSpinner: false }) // NProgress Configuration
|
||||||
|
|
||||||
const whiteList = ["/user/login", "/user/register", "/user/register-result", "/user/alteration"]; // no redirect whitelist
|
const whiteList = ['/user/login', '/user/register', '/user/register-result', '/user/alteration'] // no redirect whitelist
|
||||||
|
|
||||||
router.beforeEach((to, from, next) => {
|
router.beforeEach((to, from, next) => {
|
||||||
NProgress.start(); // start progress bar
|
NProgress.start() // start progress bar
|
||||||
|
|
||||||
if (Vue.ls.get(ACCESS_TOKEN)) {
|
if (Vue.ls.get(ACCESS_TOKEN)) {
|
||||||
/* has token */
|
/* has token */
|
||||||
if (to.path === "/user/login") {
|
if (to.path === '/user/login') {
|
||||||
next({ path: INDEX_MAIN_PAGE_PATH });
|
next({ path: INDEX_MAIN_PAGE_PATH })
|
||||||
NProgress.done();
|
NProgress.done()
|
||||||
} else {
|
} else {
|
||||||
if (store.getters.permissionList.length === 0) {
|
if (store.getters.permissionList.length === 0) {
|
||||||
store.dispatch("GetPermissionList").then(res => {
|
store.dispatch('GetPermissionList').then(res => {
|
||||||
const menuData = res.result.menu;
|
const menuData = res.result.menu
|
||||||
if (menuData === null || menuData === "" || menuData === undefined) {
|
if (menuData === null || menuData === '' || menuData === undefined) {
|
||||||
return;
|
return
|
||||||
}
|
}
|
||||||
let constRoutes = [];
|
let constRoutes = []
|
||||||
constRoutes = generateIndexRouter(menuData);
|
constRoutes = generateIndexRouter(menuData)
|
||||||
// 添加主界面路由
|
// 添加主界面路由
|
||||||
store.dispatch("UpdateAppRouter", { constRoutes }).then(() => {
|
store.dispatch('UpdateAppRouter', { constRoutes }).then(() => {
|
||||||
// 根据roles权限生成可访问的路由表
|
// 根据roles权限生成可访问的路由表
|
||||||
// 动态添加可访问路由表
|
// 动态添加可访问路由表
|
||||||
router.addRoutes(store.getters.addRouters);
|
router.addRoutes(store.getters.addRouters)
|
||||||
const redirect = decodeURIComponent(from.query.redirect || to.path);
|
const redirect = decodeURIComponent(from.query.redirect || to.path)
|
||||||
if (to.path === redirect) {
|
if (to.path === redirect) {
|
||||||
// hack方法 确保addRoutes已完成 ,set the replace: true so the navigation will not leave a history record
|
// hack方法 确保addRoutes已完成 ,set the replace: true so the navigation will not leave a history record
|
||||||
next({ ...to, replace: true });
|
next({ ...to, replace: true })
|
||||||
} else {
|
} else {
|
||||||
// 跳转到目的路由
|
// 跳转到目的路由
|
||||||
next({ path: redirect });
|
next({ path: redirect })
|
||||||
}
|
}
|
||||||
});
|
})
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
/* notification.error({
|
/* notification.error({
|
||||||
message: '系统提示',
|
message: '系统提示',
|
||||||
description: '请求用户信息失败,请重试!'
|
description: '请求用户信息失败,请重试!'
|
||||||
})*/
|
})*/
|
||||||
store.dispatch("Logout").then(() => {
|
store.dispatch('Logout').then(() => {
|
||||||
next({ path: "/user/login", query: { redirect: to.fullPath } });
|
next({ path: '/user/login', query: { redirect: to.fullPath } })
|
||||||
});
|
})
|
||||||
});
|
})
|
||||||
} else {
|
} else {
|
||||||
next();
|
next()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (whiteList.indexOf(to.path) !== -1) {
|
if (whiteList.indexOf(to.path) !== -1) {
|
||||||
// 在免登录白名单,直接进入
|
// 在免登录白名单,直接进入
|
||||||
next();
|
next()
|
||||||
} else {
|
} else {
|
||||||
next({ path: "/user/login", query: { redirect: to.fullPath } });
|
next({ path: '/user/login', query: { redirect: to.fullPath } })
|
||||||
NProgress.done(); // if current page is login will not trigger afterEach hook, so manually handle it
|
NProgress.done() // if current page is login will not trigger afterEach hook, so manually handle it
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
})
|
||||||
|
|
||||||
router.afterEach(() => {
|
router.afterEach(() => {
|
||||||
NProgress.done(); // finish progress bar
|
NProgress.done() // finish progress bar
|
||||||
});
|
})
|
||||||
|
|||||||
+10
-10
@@ -1,18 +1,18 @@
|
|||||||
import Vue from "vue";
|
import Vue from 'vue'
|
||||||
import Router from "vue-router";
|
import Router from 'vue-router'
|
||||||
import { constantRouterMap } from "@/config/router.config";
|
import { constantRouterMap } from '@/config/router.config'
|
||||||
|
|
||||||
Vue.use(Router);
|
Vue.use(Router)
|
||||||
|
|
||||||
const originalPush = Router.prototype.push;
|
const originalPush = Router.prototype.push
|
||||||
Router.prototype.push = function push(location, onResolve, onReject) {
|
Router.prototype.push = function push(location, onResolve, onReject) {
|
||||||
if (onResolve || onReject) return originalPush.call(this, location, onResolve, onReject);
|
if (onResolve || onReject) return originalPush.call(this, location, onResolve, onReject)
|
||||||
return originalPush.call(this, location).catch(err => err);
|
return originalPush.call(this, location).catch(err => err)
|
||||||
};
|
}
|
||||||
|
|
||||||
export default new Router({
|
export default new Router({
|
||||||
mode: "history",
|
mode: 'history',
|
||||||
base: process.env.BASE_URL,
|
base: process.env.BASE_URL,
|
||||||
scrollBehavior: () => ({ y: 0 }),
|
scrollBehavior: () => ({ y: 0 }),
|
||||||
routes: constantRouterMap
|
routes: constantRouterMap
|
||||||
});
|
})
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import Vue from 'vue'
|
import Vue from 'vue'
|
||||||
import { USER_INFO, ENHANCE_PRE } from "@/store/mutation-types"
|
import { USER_INFO, ENHANCE_PRE } from '@/store/mutation-types'
|
||||||
const getters = {
|
const getters = {
|
||||||
device: state => state.app.device,
|
device: state => state.app.device,
|
||||||
theme: state => state.app.theme,
|
theme: state => state.app.theme,
|
||||||
@@ -14,7 +14,7 @@ const getters = {
|
|||||||
addRouters: state => state.permission.addRouters,
|
addRouters: state => state.permission.addRouters,
|
||||||
onlAuthFields: state => {return state.online.authFields },
|
onlAuthFields: state => {return state.online.authFields },
|
||||||
enhanceJs:(state) => (code) => {
|
enhanceJs:(state) => (code) => {
|
||||||
state.enhance.enhanceJs[code] = Vue.ls.get(ENHANCE_PRE+code);
|
state.enhance.enhanceJs[code] = Vue.ls.get(ENHANCE_PRE+code)
|
||||||
return state.enhance.enhanceJs[code]
|
return state.enhance.enhanceJs[code]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+11
-11
@@ -1,14 +1,14 @@
|
|||||||
import Vue from "vue";
|
import Vue from 'vue'
|
||||||
import Vuex from "vuex";
|
import Vuex from 'vuex'
|
||||||
|
|
||||||
import app from "./modules/app";
|
import app from './modules/app'
|
||||||
import user from "./modules/user";
|
import user from './modules/user'
|
||||||
import permission from "./modules/permission";
|
import permission from './modules/permission'
|
||||||
import enhance from "./modules/enhance";
|
import enhance from './modules/enhance'
|
||||||
import online from "./modules/online";
|
import online from './modules/online'
|
||||||
import getters from "./getters";
|
import getters from './getters'
|
||||||
|
|
||||||
Vue.use(Vuex);
|
Vue.use(Vuex)
|
||||||
|
|
||||||
export default new Vuex.Store({
|
export default new Vuex.Store({
|
||||||
modules: {
|
modules: {
|
||||||
@@ -23,10 +23,10 @@ export default new Vuex.Store({
|
|||||||
currentProjetcInfo:{}
|
currentProjetcInfo:{}
|
||||||
},
|
},
|
||||||
mutations: {
|
mutations: {
|
||||||
"SET_CURRENTPROJECT":(state,info) =>{
|
'SET_CURRENTPROJECT':(state,info) =>{
|
||||||
state.currentProjetcInfo = Object.assign({},info)
|
state.currentProjetcInfo = Object.assign({},info)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
actions: {},
|
actions: {},
|
||||||
getters
|
getters
|
||||||
});
|
})
|
||||||
|
|||||||
+45
-45
@@ -1,4 +1,4 @@
|
|||||||
import Vue from "vue";
|
import Vue from 'vue'
|
||||||
import {
|
import {
|
||||||
SIDEBAR_TYPE,
|
SIDEBAR_TYPE,
|
||||||
DEFAULT_THEME,
|
DEFAULT_THEME,
|
||||||
@@ -10,7 +10,7 @@ import {
|
|||||||
DEFAULT_FIXED_HEADER_HIDDEN,
|
DEFAULT_FIXED_HEADER_HIDDEN,
|
||||||
DEFAULT_CONTENT_WIDTH_TYPE,
|
DEFAULT_CONTENT_WIDTH_TYPE,
|
||||||
DEFAULT_MULTI_PAGE
|
DEFAULT_MULTI_PAGE
|
||||||
} from "@/store/mutation-types";
|
} from '@/store/mutation-types'
|
||||||
|
|
||||||
const app = {
|
const app = {
|
||||||
state: {
|
state: {
|
||||||
@@ -18,10 +18,10 @@ const app = {
|
|||||||
opened: true,
|
opened: true,
|
||||||
withoutAnimation: false
|
withoutAnimation: false
|
||||||
},
|
},
|
||||||
device: "desktop",
|
device: 'desktop',
|
||||||
theme: "",
|
theme: '',
|
||||||
layout: "",
|
layout: '',
|
||||||
contentWidth: "",
|
contentWidth: '',
|
||||||
fixedHeader: false,
|
fixedHeader: false,
|
||||||
fixSiderbar: false,
|
fixSiderbar: false,
|
||||||
autoHideHeader: false,
|
autoHideHeader: false,
|
||||||
@@ -31,96 +31,96 @@ const app = {
|
|||||||
},
|
},
|
||||||
mutations: {
|
mutations: {
|
||||||
SET_SIDEBAR_TYPE: (state, type) => {
|
SET_SIDEBAR_TYPE: (state, type) => {
|
||||||
state.sidebar.opened = type;
|
state.sidebar.opened = type
|
||||||
Vue.ls.set(SIDEBAR_TYPE, type);
|
Vue.ls.set(SIDEBAR_TYPE, type)
|
||||||
},
|
},
|
||||||
CLOSE_SIDEBAR: (state, withoutAnimation) => {
|
CLOSE_SIDEBAR: (state, withoutAnimation) => {
|
||||||
Vue.ls.set(SIDEBAR_TYPE, true);
|
Vue.ls.set(SIDEBAR_TYPE, true)
|
||||||
state.sidebar.opened = false;
|
state.sidebar.opened = false
|
||||||
state.sidebar.withoutAnimation = withoutAnimation;
|
state.sidebar.withoutAnimation = withoutAnimation
|
||||||
},
|
},
|
||||||
TOGGLE_DEVICE: (state, device) => {
|
TOGGLE_DEVICE: (state, device) => {
|
||||||
state.device = device;
|
state.device = device
|
||||||
},
|
},
|
||||||
TOGGLE_THEME: (state, theme) => {
|
TOGGLE_THEME: (state, theme) => {
|
||||||
// setStore('_DEFAULT_THEME', theme)
|
// setStore('_DEFAULT_THEME', theme)
|
||||||
Vue.ls.set(DEFAULT_THEME, theme);
|
Vue.ls.set(DEFAULT_THEME, theme)
|
||||||
state.theme = theme;
|
state.theme = theme
|
||||||
},
|
},
|
||||||
TOGGLE_LAYOUT_MODE: (state, layout) => {
|
TOGGLE_LAYOUT_MODE: (state, layout) => {
|
||||||
Vue.ls.set(DEFAULT_LAYOUT_MODE, layout);
|
Vue.ls.set(DEFAULT_LAYOUT_MODE, layout)
|
||||||
state.layout = layout;
|
state.layout = layout
|
||||||
},
|
},
|
||||||
TOGGLE_FIXED_HEADER: (state, fixed) => {
|
TOGGLE_FIXED_HEADER: (state, fixed) => {
|
||||||
Vue.ls.set(DEFAULT_FIXED_HEADER, fixed);
|
Vue.ls.set(DEFAULT_FIXED_HEADER, fixed)
|
||||||
state.fixedHeader = fixed;
|
state.fixedHeader = fixed
|
||||||
},
|
},
|
||||||
TOGGLE_FIXED_SIDERBAR: (state, fixed) => {
|
TOGGLE_FIXED_SIDERBAR: (state, fixed) => {
|
||||||
Vue.ls.set(DEFAULT_FIXED_SIDEMENU, fixed);
|
Vue.ls.set(DEFAULT_FIXED_SIDEMENU, fixed)
|
||||||
state.fixSiderbar = fixed;
|
state.fixSiderbar = fixed
|
||||||
},
|
},
|
||||||
TOGGLE_FIXED_HEADER_HIDDEN: (state, show) => {
|
TOGGLE_FIXED_HEADER_HIDDEN: (state, show) => {
|
||||||
Vue.ls.set(DEFAULT_FIXED_HEADER_HIDDEN, show);
|
Vue.ls.set(DEFAULT_FIXED_HEADER_HIDDEN, show)
|
||||||
state.autoHideHeader = show;
|
state.autoHideHeader = show
|
||||||
},
|
},
|
||||||
TOGGLE_CONTENT_WIDTH: (state, type) => {
|
TOGGLE_CONTENT_WIDTH: (state, type) => {
|
||||||
Vue.ls.set(DEFAULT_CONTENT_WIDTH_TYPE, type);
|
Vue.ls.set(DEFAULT_CONTENT_WIDTH_TYPE, type)
|
||||||
state.contentWidth = type;
|
state.contentWidth = type
|
||||||
},
|
},
|
||||||
TOGGLE_COLOR: (state, color) => {
|
TOGGLE_COLOR: (state, color) => {
|
||||||
Vue.ls.set(DEFAULT_COLOR, color);
|
Vue.ls.set(DEFAULT_COLOR, color)
|
||||||
state.color = color;
|
state.color = color
|
||||||
},
|
},
|
||||||
TOGGLE_WEAK: (state, flag) => {
|
TOGGLE_WEAK: (state, flag) => {
|
||||||
Vue.ls.set(DEFAULT_COLOR_WEAK, flag);
|
Vue.ls.set(DEFAULT_COLOR_WEAK, flag)
|
||||||
state.weak = flag;
|
state.weak = flag
|
||||||
},
|
},
|
||||||
SET_MULTI_PAGE(state, multipageFlag) {
|
SET_MULTI_PAGE(state, multipageFlag) {
|
||||||
Vue.ls.set(DEFAULT_MULTI_PAGE, multipageFlag);
|
Vue.ls.set(DEFAULT_MULTI_PAGE, multipageFlag)
|
||||||
state.multipage = multipageFlag;
|
state.multipage = multipageFlag
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
actions: {
|
actions: {
|
||||||
setSidebar: ({ commit }, type) => {
|
setSidebar: ({ commit }, type) => {
|
||||||
commit("SET_SIDEBAR_TYPE", type);
|
commit('SET_SIDEBAR_TYPE', type)
|
||||||
},
|
},
|
||||||
CloseSidebar({ commit }, { withoutAnimation }) {
|
CloseSidebar({ commit }, { withoutAnimation }) {
|
||||||
commit("CLOSE_SIDEBAR", withoutAnimation);
|
commit('CLOSE_SIDEBAR', withoutAnimation)
|
||||||
},
|
},
|
||||||
ToggleDevice({ commit }, device) {
|
ToggleDevice({ commit }, device) {
|
||||||
commit("TOGGLE_DEVICE", device);
|
commit('TOGGLE_DEVICE', device)
|
||||||
},
|
},
|
||||||
ToggleTheme({ commit }, theme) {
|
ToggleTheme({ commit }, theme) {
|
||||||
commit("TOGGLE_THEME", theme);
|
commit('TOGGLE_THEME', theme)
|
||||||
},
|
},
|
||||||
ToggleLayoutMode({ commit }, mode) {
|
ToggleLayoutMode({ commit }, mode) {
|
||||||
commit("TOGGLE_LAYOUT_MODE", mode);
|
commit('TOGGLE_LAYOUT_MODE', mode)
|
||||||
},
|
},
|
||||||
ToggleFixedHeader({ commit }, fixedHeader) {
|
ToggleFixedHeader({ commit }, fixedHeader) {
|
||||||
if (!fixedHeader) {
|
if (!fixedHeader) {
|
||||||
commit("TOGGLE_FIXED_HEADER_HIDDEN", false);
|
commit('TOGGLE_FIXED_HEADER_HIDDEN', false)
|
||||||
}
|
}
|
||||||
commit("TOGGLE_FIXED_HEADER", fixedHeader);
|
commit('TOGGLE_FIXED_HEADER', fixedHeader)
|
||||||
},
|
},
|
||||||
ToggleFixSiderbar({ commit }, fixSiderbar) {
|
ToggleFixSiderbar({ commit }, fixSiderbar) {
|
||||||
commit("TOGGLE_FIXED_SIDERBAR", fixSiderbar);
|
commit('TOGGLE_FIXED_SIDERBAR', fixSiderbar)
|
||||||
},
|
},
|
||||||
ToggleFixedHeaderHidden({ commit }, show) {
|
ToggleFixedHeaderHidden({ commit }, show) {
|
||||||
commit("TOGGLE_FIXED_HEADER_HIDDEN", show);
|
commit('TOGGLE_FIXED_HEADER_HIDDEN', show)
|
||||||
},
|
},
|
||||||
ToggleContentWidth({ commit }, type) {
|
ToggleContentWidth({ commit }, type) {
|
||||||
commit("TOGGLE_CONTENT_WIDTH", type);
|
commit('TOGGLE_CONTENT_WIDTH', type)
|
||||||
},
|
},
|
||||||
ToggleColor({ commit }, color) {
|
ToggleColor({ commit }, color) {
|
||||||
commit("TOGGLE_COLOR", color);
|
commit('TOGGLE_COLOR', color)
|
||||||
},
|
},
|
||||||
ToggleWeak({ commit }, weakFlag) {
|
ToggleWeak({ commit }, weakFlag) {
|
||||||
commit("TOGGLE_WEAK", weakFlag);
|
commit('TOGGLE_WEAK', weakFlag)
|
||||||
},
|
},
|
||||||
ToggleMultipage({ commit }, multipageFlag) {
|
ToggleMultipage({ commit }, multipageFlag) {
|
||||||
commit("SET_MULTI_PAGE", multipageFlag);
|
commit('SET_MULTI_PAGE', multipageFlag)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
|
|
||||||
export default app;
|
export default app
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import Vue from "vue";
|
import Vue from 'vue'
|
||||||
|
|
||||||
const online = {
|
const online = {
|
||||||
state: {
|
state: {
|
||||||
@@ -7,8 +7,8 @@ const online = {
|
|||||||
},
|
},
|
||||||
mutations: {
|
mutations: {
|
||||||
SET_AUTHFIELDS: (state, fields) => {
|
SET_AUTHFIELDS: (state, fields) => {
|
||||||
console.log("fields", fields);
|
console.log('fields', fields)
|
||||||
Vue.set(state, "authFields", fields);
|
Vue.set(state, 'authFields', fields)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
actions: {
|
actions: {
|
||||||
@@ -18,6 +18,6 @@ const online = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
|
|
||||||
export default online;
|
export default online
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { asyncRouterMap, constantRouterMap } from "@/config/router.config"
|
import { asyncRouterMap, constantRouterMap } from '@/config/router.config'
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 过滤账户是否拥有某一个权限,并将菜单从加载列表移除
|
* 过滤账户是否拥有某一个权限,并将菜单从加载列表移除
|
||||||
@@ -76,7 +76,7 @@ const permission = {
|
|||||||
UpdateAppRouter({ commit }, routes) {
|
UpdateAppRouter({ commit }, routes) {
|
||||||
return new Promise(resolve => {
|
return new Promise(resolve => {
|
||||||
//const [ roles ] = routes.constRoutes
|
//const [ roles ] = routes.constRoutes
|
||||||
let routelist = routes.constRoutes;
|
let routelist = routes.constRoutes
|
||||||
commit('SET_ROUTERS', routelist)
|
commit('SET_ROUTERS', routelist)
|
||||||
resolve()
|
resolve()
|
||||||
})
|
})
|
||||||
|
|||||||
+14
-14
@@ -1,7 +1,7 @@
|
|||||||
import Vue from 'vue'
|
import Vue from 'vue'
|
||||||
import { login, logout, phoneLogin, thirdLogin } from "@/api/login"
|
import { login, logout, phoneLogin, thirdLogin } from '@/api/login'
|
||||||
import { ACCESS_TOKEN, USER_NAME,USER_INFO,USER_AUTH,SYS_BUTTON_AUTH,UI_CACHE_DB_DICT_DATA,TENANT_ID,CACHE_INCLUDED_ROUTES } from "@/store/mutation-types"
|
import { ACCESS_TOKEN, USER_NAME,USER_INFO,USER_AUTH,SYS_BUTTON_AUTH,UI_CACHE_DB_DICT_DATA,TENANT_ID,CACHE_INCLUDED_ROUTES } from '@/store/mutation-types'
|
||||||
import { welcome } from "@/utils/util"
|
import { welcome } from '@/utils/util'
|
||||||
import { queryPermissionsByUser } from '@/api/api'
|
import { queryPermissionsByUser } from '@/api/api'
|
||||||
import { getAction } from '@/api/manage'
|
import { getAction } from '@/api/manage'
|
||||||
|
|
||||||
@@ -44,8 +44,8 @@ const user = {
|
|||||||
// CAS验证登录
|
// CAS验证登录
|
||||||
ValidateLogin({ commit }, userInfo) {
|
ValidateLogin({ commit }, userInfo) {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
getAction("/sys/cas/client/validateLogin",userInfo).then(response => {
|
getAction('/sys/cas/client/validateLogin',userInfo).then(response => {
|
||||||
console.log("----cas 登录--------",response);
|
console.log('----cas 登录--------',response)
|
||||||
if(response.success){
|
if(response.success){
|
||||||
const result = response.result
|
const result = response.result
|
||||||
const userInfo = result.userInfo
|
const userInfo = result.userInfo
|
||||||
@@ -117,21 +117,21 @@ const user = {
|
|||||||
GetPermissionList({ commit }) {
|
GetPermissionList({ commit }) {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
queryPermissionsByUser().then(response => {
|
queryPermissionsByUser().then(response => {
|
||||||
const menuData = response.result.menu;
|
const menuData = response.result.menu
|
||||||
const authData = response.result.auth;
|
const authData = response.result.auth
|
||||||
const allAuthData = response.result.allAuth;
|
const allAuthData = response.result.allAuth
|
||||||
//Vue.ls.set(USER_AUTH,authData);
|
//Vue.ls.set(USER_AUTH,authData);
|
||||||
sessionStorage.setItem(USER_AUTH,JSON.stringify(authData));
|
sessionStorage.setItem(USER_AUTH,JSON.stringify(authData))
|
||||||
sessionStorage.setItem(SYS_BUTTON_AUTH,JSON.stringify(allAuthData));
|
sessionStorage.setItem(SYS_BUTTON_AUTH,JSON.stringify(allAuthData))
|
||||||
if (menuData && menuData.length > 0) {
|
if (menuData && menuData.length > 0) {
|
||||||
//update--begin--autor:qinfeng-----date:20200109------for:JEECG-63 一级菜单的子菜单全部是隐藏路由,则一级菜单不显示------
|
//update--begin--autor:qinfeng-----date:20200109------for:JEECG-63 一级菜单的子菜单全部是隐藏路由,则一级菜单不显示------
|
||||||
menuData.forEach((item, index) => {
|
menuData.forEach((item, index) => {
|
||||||
if (item["children"]) {
|
if (item['children']) {
|
||||||
let hasChildrenMenu = item["children"].filter((i) => {
|
let hasChildrenMenu = item['children'].filter((i) => {
|
||||||
return !i.hidden || i.hidden == false
|
return !i.hidden || i.hidden == false
|
||||||
})
|
})
|
||||||
if (hasChildrenMenu == null || hasChildrenMenu.length == 0) {
|
if (hasChildrenMenu == null || hasChildrenMenu.length == 0) {
|
||||||
item["hidden"] = true
|
item['hidden'] = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@@ -151,7 +151,7 @@ const user = {
|
|||||||
// 登出
|
// 登出
|
||||||
Logout({ commit, state }) {
|
Logout({ commit, state }) {
|
||||||
return new Promise((resolve) => {
|
return new Promise((resolve) => {
|
||||||
let logoutToken = state.token;
|
let logoutToken = state.token
|
||||||
commit('SET_TOKEN', '')
|
commit('SET_TOKEN', '')
|
||||||
commit('SET_PERMISSIONLIST', [])
|
commit('SET_PERMISSIONLIST', [])
|
||||||
Vue.ls.remove(ACCESS_TOKEN)
|
Vue.ls.remove(ACCESS_TOKEN)
|
||||||
|
|||||||
@@ -12,10 +12,10 @@ const FormTypes = {
|
|||||||
file: 'file',
|
file: 'file',
|
||||||
image: 'image',
|
image: 'image',
|
||||||
popup:'popup',
|
popup:'popup',
|
||||||
list_multi:"list_multi",
|
list_multi:'list_multi',
|
||||||
sel_search:"sel_search",
|
sel_search:'sel_search',
|
||||||
radio:'radio',
|
radio:'radio',
|
||||||
checkbox_meta:"checkbox_meta",
|
checkbox_meta:'checkbox_meta',
|
||||||
input_pop:'input_pop',
|
input_pop:'input_pop',
|
||||||
sel_depart: 'sel_depart',
|
sel_depart: 'sel_depart',
|
||||||
sel_user: 'sel_user',
|
sel_user: 'sel_user',
|
||||||
@@ -90,7 +90,7 @@ export function validateTables(cases, deleteTempId) {
|
|||||||
}
|
}
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
let tables = []
|
let tables = []
|
||||||
let index = 0;
|
let index = 0
|
||||||
if(!cases || cases.length === 0){
|
if(!cases || cases.length === 0){
|
||||||
resolve()
|
resolve()
|
||||||
}
|
}
|
||||||
@@ -108,7 +108,7 @@ export function validateTables(cases, deleteTempId) {
|
|||||||
// 出现未验证通过的表单,不再进行下一步校验,直接返回失败并跳转到该表格
|
// 出现未验证通过的表单,不再进行下一步校验,直接返回失败并跳转到该表格
|
||||||
if (error === VALIDATE_NO_PASSED) {
|
if (error === VALIDATE_NO_PASSED) {
|
||||||
// 尝试获取tabKey,如果在ATab组件内即可获取
|
// 尝试获取tabKey,如果在ATab组件内即可获取
|
||||||
let paneKey;
|
let paneKey
|
||||||
let tabPane = getVmParentByName(vm, 'ATabPane')
|
let tabPane = getVmParentByName(vm, 'ATabPane')
|
||||||
if (tabPane) {
|
if (tabPane) {
|
||||||
paneKey = tabPane.$vnode.key
|
paneKey = tabPane.$vnode.key
|
||||||
|
|||||||
+60
-60
@@ -1,20 +1,20 @@
|
|||||||
import { USER_AUTH,SYS_BUTTON_AUTH } from "@/store/mutation-types"
|
import { USER_AUTH,SYS_BUTTON_AUTH } from '@/store/mutation-types'
|
||||||
|
|
||||||
export function disabledAuthFilter(code,formData) {
|
export function disabledAuthFilter(code,formData) {
|
||||||
if(nodeDisabledAuth(code,formData)){
|
if(nodeDisabledAuth(code,formData)){
|
||||||
return true;
|
return true
|
||||||
}else{
|
}else{
|
||||||
return globalDisabledAuth(code);
|
return globalDisabledAuth(code)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function nodeDisabledAuth(code,formData){
|
function nodeDisabledAuth(code,formData){
|
||||||
// console.log("页面权限禁用--NODE--开始");
|
// console.log("页面权限禁用--NODE--开始");
|
||||||
let permissionList = [];
|
let permissionList = []
|
||||||
try {
|
try {
|
||||||
// console.log("页面权限禁用--NODE--开始",formData);
|
// console.log("页面权限禁用--NODE--开始",formData);
|
||||||
if (formData) {
|
if (formData) {
|
||||||
let bpmList = formData.permissionList;
|
let bpmList = formData.permissionList
|
||||||
permissionList = bpmList.filter(item=>item.type=='2')
|
permissionList = bpmList.filter(item=>item.type=='2')
|
||||||
// for (let bpm of bpmList) {
|
// for (let bpm of bpmList) {
|
||||||
// if(bpm.type == '2') {
|
// if(bpm.type == '2') {
|
||||||
@@ -22,102 +22,102 @@ function nodeDisabledAuth(code,formData){
|
|||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
}else{
|
}else{
|
||||||
return false;
|
return false
|
||||||
}
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
//console.log("页面权限异常----", e);
|
//console.log("页面权限异常----", e);
|
||||||
}
|
}
|
||||||
if (permissionList.length == 0) {
|
if (permissionList.length == 0) {
|
||||||
return false;
|
return false
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
// console.log("流程节点页面权限禁用--NODE--开始");
|
// console.log("流程节点页面权限禁用--NODE--开始");
|
||||||
let permissions = [];
|
let permissions = []
|
||||||
for (let item of permissionList) {
|
for (let item of permissionList) {
|
||||||
if(item.type == '2') {
|
if(item.type == '2') {
|
||||||
permissions.push(item.action);
|
permissions.push(item.action)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//console.log("页面权限----"+code);
|
//console.log("页面权限----"+code);
|
||||||
if (!permissions.includes(code)) {
|
if (!permissions.includes(code)) {
|
||||||
return false;
|
return false
|
||||||
}else{
|
}else{
|
||||||
for (let item2 of permissionList) {
|
for (let item2 of permissionList) {
|
||||||
if(code === item2.action){
|
if(code === item2.action){
|
||||||
// console.log("流程节点页面权限禁用--NODE--生效");
|
// console.log("流程节点页面权限禁用--NODE--生效");
|
||||||
return true;
|
return true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return false;
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
function globalDisabledAuth(code){
|
function globalDisabledAuth(code){
|
||||||
// console.log("全局页面禁用权限--Global--开始");
|
// console.log("全局页面禁用权限--Global--开始");
|
||||||
|
|
||||||
let permissionList = [];
|
let permissionList = []
|
||||||
let allPermissionList = [];
|
let allPermissionList = []
|
||||||
|
|
||||||
//let authList = Vue.ls.get(USER_AUTH);
|
//let authList = Vue.ls.get(USER_AUTH);
|
||||||
let authList = JSON.parse(sessionStorage.getItem(USER_AUTH) || "[]");
|
let authList = JSON.parse(sessionStorage.getItem(USER_AUTH) || '[]')
|
||||||
for (let auth of authList) {
|
for (let auth of authList) {
|
||||||
if(auth.type == '2') {
|
if(auth.type == '2') {
|
||||||
permissionList.push(auth);
|
permissionList.push(auth)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//console.log("页面禁用权限--Global--",sessionStorage.getItem(SYS_BUTTON_AUTH));
|
//console.log("页面禁用权限--Global--",sessionStorage.getItem(SYS_BUTTON_AUTH));
|
||||||
let allAuthList = JSON.parse(sessionStorage.getItem(SYS_BUTTON_AUTH) || "[]");
|
let allAuthList = JSON.parse(sessionStorage.getItem(SYS_BUTTON_AUTH) || '[]')
|
||||||
for (let gauth of allAuthList) {
|
for (let gauth of allAuthList) {
|
||||||
if(gauth.type == '2') {
|
if(gauth.type == '2') {
|
||||||
allPermissionList.push(gauth);
|
allPermissionList.push(gauth)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//设置全局配置是否有命中
|
//设置全局配置是否有命中
|
||||||
let gFlag = false;//禁用命中
|
let gFlag = false//禁用命中
|
||||||
let invalidFlag = false;//无效命中
|
let invalidFlag = false//无效命中
|
||||||
if(allPermissionList != null && allPermissionList != "" && allPermissionList != undefined && allPermissionList.length > 0){
|
if(allPermissionList != null && allPermissionList != '' && allPermissionList != undefined && allPermissionList.length > 0){
|
||||||
for (let itemG of allPermissionList) {
|
for (let itemG of allPermissionList) {
|
||||||
if(code === itemG.action){
|
if(code === itemG.action){
|
||||||
if(itemG.status == '0'){
|
if(itemG.status == '0'){
|
||||||
invalidFlag = true;
|
invalidFlag = true
|
||||||
break;
|
break
|
||||||
}else{
|
}else{
|
||||||
gFlag = true;
|
gFlag = true
|
||||||
break;
|
break
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(invalidFlag){
|
if(invalidFlag){
|
||||||
return false;
|
return false
|
||||||
}
|
}
|
||||||
if (permissionList === null || permissionList === "" || permissionList === undefined||permissionList.length<=0) {
|
if (permissionList === null || permissionList === '' || permissionList === undefined||permissionList.length<=0) {
|
||||||
return gFlag;
|
return gFlag
|
||||||
}
|
}
|
||||||
let permissions = [];
|
let permissions = []
|
||||||
for (let item of permissionList) {
|
for (let item of permissionList) {
|
||||||
if(item.type == '2') {
|
if(item.type == '2') {
|
||||||
permissions.push(item.action);
|
permissions.push(item.action)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//console.log("页面禁用权限----"+code);
|
//console.log("页面禁用权限----"+code);
|
||||||
if (!permissions.includes(code)) {
|
if (!permissions.includes(code)) {
|
||||||
return gFlag;
|
return gFlag
|
||||||
}else{
|
}else{
|
||||||
for (let item2 of permissionList) {
|
for (let item2 of permissionList) {
|
||||||
if(code === item2.action){
|
if(code === item2.action){
|
||||||
// console.log("全局页面权限解除禁用--Global--生效");
|
// console.log("全局页面权限解除禁用--Global--生效");
|
||||||
gFlag = false;
|
gFlag = false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return gFlag;
|
return gFlag
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
export function colAuthFilter(columns,pre) {
|
export function colAuthFilter(columns,pre) {
|
||||||
let authList = getNoAuthCols(pre);
|
let authList = getNoAuthCols(pre)
|
||||||
const cols = columns.filter(item => {
|
const cols = columns.filter(item => {
|
||||||
if (hasColoum(item,authList)) {
|
if (hasColoum(item,authList)) {
|
||||||
return true
|
return true
|
||||||
@@ -136,11 +136,11 @@ export function colAuthFilter(columns,pre) {
|
|||||||
* @returns {*}
|
* @returns {*}
|
||||||
*/
|
*/
|
||||||
export function colAuthFilterJEditableTable(columns,pre) {
|
export function colAuthFilterJEditableTable(columns,pre) {
|
||||||
let authList = getAllShowAndDisabledAuthCols(pre);
|
let authList = getAllShowAndDisabledAuthCols(pre)
|
||||||
const cols = columns.filter(item => {
|
const cols = columns.filter(item => {
|
||||||
let oneAuth = authList.find(auth => {
|
let oneAuth = authList.find(auth => {
|
||||||
return auth.action === pre + item.key;
|
return auth.action === pre + item.key
|
||||||
});
|
})
|
||||||
if(!oneAuth){
|
if(!oneAuth){
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
@@ -152,7 +152,7 @@ export function colAuthFilterJEditableTable(columns,pre) {
|
|||||||
|
|
||||||
//禁用逻辑
|
//禁用逻辑
|
||||||
if (oneAuth.type == '2' && !oneAuth.isAuth) {
|
if (oneAuth.type == '2' && !oneAuth.isAuth) {
|
||||||
item["disabled"] = true
|
item['disabled'] = true
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
//隐藏逻辑逻辑
|
//隐藏逻辑逻辑
|
||||||
@@ -178,39 +178,39 @@ export function getNoAuthCols(pre){
|
|||||||
if(!pre || pre.length==0){
|
if(!pre || pre.length==0){
|
||||||
return []
|
return []
|
||||||
}
|
}
|
||||||
let permissionList = [];
|
let permissionList = []
|
||||||
let allPermissionList = [];
|
let allPermissionList = []
|
||||||
|
|
||||||
//let authList = Vue.ls.get(USER_AUTH);
|
//let authList = Vue.ls.get(USER_AUTH);
|
||||||
let authList = JSON.parse(sessionStorage.getItem(USER_AUTH) || "[]");
|
let authList = JSON.parse(sessionStorage.getItem(USER_AUTH) || '[]')
|
||||||
for (let auth of authList) {
|
for (let auth of authList) {
|
||||||
//显示策略,有效状态
|
//显示策略,有效状态
|
||||||
if(auth.type == '1'&&startWith(auth.action,pre)) {
|
if(auth.type == '1'&&startWith(auth.action,pre)) {
|
||||||
permissionList.push(substrPre(auth.action,pre));
|
permissionList.push(substrPre(auth.action,pre))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//console.log("页面禁用权限--Global--",sessionStorage.getItem(SYS_BUTTON_AUTH));
|
//console.log("页面禁用权限--Global--",sessionStorage.getItem(SYS_BUTTON_AUTH));
|
||||||
let allAuthList = JSON.parse(sessionStorage.getItem(SYS_BUTTON_AUTH) || "[]");
|
let allAuthList = JSON.parse(sessionStorage.getItem(SYS_BUTTON_AUTH) || '[]')
|
||||||
for (let gauth of allAuthList) {
|
for (let gauth of allAuthList) {
|
||||||
//显示策略,有效状态
|
//显示策略,有效状态
|
||||||
if(gauth.type == '1'&&gauth.status == '1'&&startWith(gauth.action,pre)) {
|
if(gauth.type == '1'&&gauth.status == '1'&&startWith(gauth.action,pre)) {
|
||||||
allPermissionList.push(substrPre(gauth.action,pre));
|
allPermissionList.push(substrPre(gauth.action,pre))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
const cols = allPermissionList.filter(item => {
|
const cols = allPermissionList.filter(item => {
|
||||||
if (permissionList.includes(item)) {
|
if (permissionList.includes(item)) {
|
||||||
return false;
|
return false
|
||||||
}
|
}
|
||||||
return true;
|
return true
|
||||||
})
|
})
|
||||||
return cols;
|
return cols
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 将Online的行编辑按钮权限,添加至本地存储
|
* 将Online的行编辑按钮权限,添加至本地存储
|
||||||
*/
|
*/
|
||||||
export function addOnlineBtAuth2Storage(pre, authList){
|
export function addOnlineBtAuth2Storage(pre, authList){
|
||||||
let allAuthList = JSON.parse(sessionStorage.getItem(SYS_BUTTON_AUTH) || "[]");
|
let allAuthList = JSON.parse(sessionStorage.getItem(SYS_BUTTON_AUTH) || '[]')
|
||||||
let newAuthList = allAuthList.filter(item=>{
|
let newAuthList = allAuthList.filter(item=>{
|
||||||
if(!item.action){
|
if(!item.action){
|
||||||
return true
|
return true
|
||||||
@@ -225,7 +225,7 @@ export function addOnlineBtAuth2Storage(pre, authList){
|
|||||||
status:1
|
status:1
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
let temp = JSON.parse(sessionStorage.getItem(USER_AUTH) || "[]");
|
let temp = JSON.parse(sessionStorage.getItem(USER_AUTH) || '[]')
|
||||||
let newArr = temp.filter(item=>{
|
let newArr = temp.filter(item=>{
|
||||||
if(!item.action){
|
if(!item.action){
|
||||||
return true
|
return true
|
||||||
@@ -248,30 +248,30 @@ export function addOnlineBtAuth2Storage(pre, authList){
|
|||||||
*/
|
*/
|
||||||
function getAllShowAndDisabledAuthCols(pre){
|
function getAllShowAndDisabledAuthCols(pre){
|
||||||
//用户拥有的权限
|
//用户拥有的权限
|
||||||
let userAuthList = JSON.parse(sessionStorage.getItem(USER_AUTH) || "[]");
|
let userAuthList = JSON.parse(sessionStorage.getItem(USER_AUTH) || '[]')
|
||||||
//全部权限配置
|
//全部权限配置
|
||||||
let allAuthList = JSON.parse(sessionStorage.getItem(SYS_BUTTON_AUTH) || "[]");
|
let allAuthList = JSON.parse(sessionStorage.getItem(SYS_BUTTON_AUTH) || '[]')
|
||||||
|
|
||||||
let newAllAuthList = allAuthList.map(function (item, index) {
|
let newAllAuthList = allAuthList.map(function (item, index) {
|
||||||
let hasAuthArray = userAuthList.filter(u => u.action===item.action );
|
let hasAuthArray = userAuthList.filter(u => u.action===item.action )
|
||||||
if (hasAuthArray && hasAuthArray.length>0) {
|
if (hasAuthArray && hasAuthArray.length>0) {
|
||||||
item["isAuth"] = true
|
item['isAuth'] = true
|
||||||
}
|
}
|
||||||
return item;
|
return item
|
||||||
})
|
})
|
||||||
|
|
||||||
return newAllAuthList;
|
return newAllAuthList
|
||||||
}
|
}
|
||||||
|
|
||||||
function startWith(str,pre) {
|
function startWith(str,pre) {
|
||||||
if (pre == null || pre == "" || str==null|| str==""|| str.length == 0 || pre.length > str.length)
|
if (pre == null || pre == '' || str==null|| str==''|| str.length == 0 || pre.length > str.length)
|
||||||
return false;
|
return false
|
||||||
if (str.substr(0, pre.length) == pre)
|
if (str.substr(0, pre.length) == pre)
|
||||||
return true;
|
return true
|
||||||
else
|
else
|
||||||
return false;
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
function substrPre(str,pre) {
|
function substrPre(str,pre) {
|
||||||
return str.substr(pre.length);
|
return str.substr(pre.length)
|
||||||
}
|
}
|
||||||
|
|||||||
+1544
-1544
File diff suppressed because it is too large
Load Diff
+3
-3
@@ -1,5 +1,5 @@
|
|||||||
import Vue from "vue";
|
import Vue from 'vue'
|
||||||
import * as dayjs from "dayjs";
|
import * as dayjs from 'dayjs'
|
||||||
|
|
||||||
Vue.filter('NumberFormat', function (value) {
|
Vue.filter('NumberFormat', function (value) {
|
||||||
if (!value) {
|
if (!value) {
|
||||||
@@ -20,7 +20,7 @@ Vue.filter('moment', function(dataStr, pattern = 'YYYY-MM-DD HH:mm:ss') {
|
|||||||
/** 字符串超长截取省略号显示 */
|
/** 字符串超长截取省略号显示 */
|
||||||
Vue.filter('ellipsis', function (value, vlength = 25) {
|
Vue.filter('ellipsis', function (value, vlength = 25) {
|
||||||
if(!value){
|
if(!value){
|
||||||
return "";
|
return ''
|
||||||
}
|
}
|
||||||
if (value.length > vlength) {
|
if (value.length > vlength) {
|
||||||
return value.slice(0, vlength) + '...'
|
return value.slice(0, vlength) + '...'
|
||||||
|
|||||||
+40
-40
@@ -1,4 +1,4 @@
|
|||||||
import { USER_AUTH,SYS_BUTTON_AUTH } from "@/store/mutation-types"
|
import { USER_AUTH,SYS_BUTTON_AUTH } from '@/store/mutation-types'
|
||||||
|
|
||||||
const hasPermission = {
|
const hasPermission = {
|
||||||
install (Vue, options) {
|
install (Vue, options) {
|
||||||
@@ -8,126 +8,126 @@ const hasPermission = {
|
|||||||
//console.time()
|
//console.time()
|
||||||
//节点权限处理,如果命中则不进行全局权限处理
|
//节点权限处理,如果命中则不进行全局权限处理
|
||||||
if(!filterNodePermission(el, binding, vnode)){
|
if(!filterNodePermission(el, binding, vnode)){
|
||||||
filterGlobalPermission(el, binding, vnode);
|
filterGlobalPermission(el, binding, vnode)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
})
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 流程节点权限控制
|
* 流程节点权限控制
|
||||||
*/
|
*/
|
||||||
export function filterNodePermission(el, binding, vnode) {
|
export function filterNodePermission(el, binding, vnode) {
|
||||||
let permissionList = [];
|
let permissionList = []
|
||||||
try {
|
try {
|
||||||
let obj = vnode.context.$props.formData;
|
let obj = vnode.context.$props.formData
|
||||||
if (obj) {
|
if (obj) {
|
||||||
let bpmList = obj.permissionList;
|
let bpmList = obj.permissionList
|
||||||
for (let bpm of bpmList) {
|
for (let bpm of bpmList) {
|
||||||
if(bpm.type != '2') {
|
if(bpm.type != '2') {
|
||||||
permissionList.push(bpm);
|
permissionList.push(bpm)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
return false;
|
return false
|
||||||
}
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
//console.log("页面权限异常----", e);
|
//console.log("页面权限异常----", e);
|
||||||
}
|
}
|
||||||
if (permissionList === null || permissionList === "" || permissionList === undefined||permissionList.length<=0) {
|
if (permissionList === null || permissionList === '' || permissionList === undefined||permissionList.length<=0) {
|
||||||
//el.parentNode.removeChild(el)
|
//el.parentNode.removeChild(el)
|
||||||
return false;
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log("流程节点页面权限--NODE--");
|
console.log('流程节点页面权限--NODE--')
|
||||||
let permissions = [];
|
let permissions = []
|
||||||
for (let item of permissionList) {
|
for (let item of permissionList) {
|
||||||
if(item.type != '2') {
|
if(item.type != '2') {
|
||||||
permissions.push(item.action);
|
permissions.push(item.action)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//console.log("页面权限----"+permissions);
|
//console.log("页面权限----"+permissions);
|
||||||
//console.log("页面权限----"+binding.value);
|
//console.log("页面权限----"+binding.value);
|
||||||
if (!permissions.includes(binding.value)) {
|
if (!permissions.includes(binding.value)) {
|
||||||
//el.parentNode.removeChild(el)
|
//el.parentNode.removeChild(el)
|
||||||
return false;
|
return false
|
||||||
}else{
|
}else{
|
||||||
for (let item2 of permissionList) {
|
for (let item2 of permissionList) {
|
||||||
if(binding.value === item2.action){
|
if(binding.value === item2.action){
|
||||||
return true;
|
return true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return false;
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 全局权限控制
|
* 全局权限控制
|
||||||
*/
|
*/
|
||||||
export function filterGlobalPermission(el, binding, vnode) {
|
export function filterGlobalPermission(el, binding, vnode) {
|
||||||
console.log("全局页面权限--Global--");
|
console.log('全局页面权限--Global--')
|
||||||
|
|
||||||
let permissionList = [];
|
let permissionList = []
|
||||||
let allPermissionList = [];
|
let allPermissionList = []
|
||||||
|
|
||||||
//let authList = Vue.ls.get(USER_AUTH);
|
//let authList = Vue.ls.get(USER_AUTH);
|
||||||
let authList = JSON.parse(sessionStorage.getItem(USER_AUTH) || "[]");
|
let authList = JSON.parse(sessionStorage.getItem(USER_AUTH) || '[]')
|
||||||
for (let auth of authList) {
|
for (let auth of authList) {
|
||||||
if(auth.type != '2') {
|
if(auth.type != '2') {
|
||||||
permissionList.push(auth);
|
permissionList.push(auth)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//console.log("页面权限--Global--",sessionStorage.getItem(SYS_BUTTON_AUTH));
|
//console.log("页面权限--Global--",sessionStorage.getItem(SYS_BUTTON_AUTH));
|
||||||
let allAuthList = JSON.parse(sessionStorage.getItem(SYS_BUTTON_AUTH) || "[]");
|
let allAuthList = JSON.parse(sessionStorage.getItem(SYS_BUTTON_AUTH) || '[]')
|
||||||
for (let gauth of allAuthList) {
|
for (let gauth of allAuthList) {
|
||||||
if(gauth.type != '2') {
|
if(gauth.type != '2') {
|
||||||
allPermissionList.push(gauth);
|
allPermissionList.push(gauth)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//设置全局配置是否有命中
|
//设置全局配置是否有命中
|
||||||
let invalidFlag = false;//无效命中
|
let invalidFlag = false//无效命中
|
||||||
if(allPermissionList != null && allPermissionList != "" && allPermissionList != undefined && allPermissionList.length > 0){
|
if(allPermissionList != null && allPermissionList != '' && allPermissionList != undefined && allPermissionList.length > 0){
|
||||||
for (let itemG of allPermissionList) {
|
for (let itemG of allPermissionList) {
|
||||||
if(binding.value === itemG.action){
|
if(binding.value === itemG.action){
|
||||||
if(itemG.status == '0'){
|
if(itemG.status == '0'){
|
||||||
invalidFlag = true;
|
invalidFlag = true
|
||||||
break;
|
break
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(invalidFlag){
|
if(invalidFlag){
|
||||||
return;
|
return
|
||||||
}
|
}
|
||||||
if (permissionList === null || permissionList === "" || permissionList === undefined||permissionList.length<=0) {
|
if (permissionList === null || permissionList === '' || permissionList === undefined||permissionList.length<=0) {
|
||||||
el.parentNode.removeChild(el);
|
el.parentNode.removeChild(el)
|
||||||
return;
|
return
|
||||||
}
|
}
|
||||||
let permissions = [];
|
let permissions = []
|
||||||
for (let item of permissionList) {
|
for (let item of permissionList) {
|
||||||
//权限策略1显示2禁用
|
//权限策略1显示2禁用
|
||||||
if(item.type != '2'){
|
if(item.type != '2'){
|
||||||
//update--begin--autor:wangshuai-----date:20200729------for:按钮权限,授权标识的提示信息是多个用逗号分隔逻辑处理 gitee#I1OUGU-------
|
//update--begin--autor:wangshuai-----date:20200729------for:按钮权限,授权标识的提示信息是多个用逗号分隔逻辑处理 gitee#I1OUGU-------
|
||||||
if(item.action){
|
if(item.action){
|
||||||
if(item.action.includes(",")){
|
if(item.action.includes(',')){
|
||||||
let split = item.action.split(",")
|
let split = item.action.split(',')
|
||||||
for (let i = 0; i <split.length ; i++) {
|
for (let i = 0; i <split.length ; i++) {
|
||||||
if(!split[i] ||split[i].length==0){
|
if(!split[i] ||split[i].length==0){
|
||||||
continue;
|
continue
|
||||||
}
|
}
|
||||||
permissions.push(split[i]);
|
permissions.push(split[i])
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
permissions.push(item.action);
|
permissions.push(item.action)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//update--end--autor:wangshuai-----date:20200729------for:按钮权限,授权标识的提示信息是多个用逗号分隔逻辑处理 gitee#I1OUGU------
|
//update--end--autor:wangshuai-----date:20200729------for:按钮权限,授权标识的提示信息是多个用逗号分隔逻辑处理 gitee#I1OUGU------
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!permissions.includes(binding.value)) {
|
if (!permissions.includes(binding.value)) {
|
||||||
el.parentNode.removeChild(el);
|
el.parentNode.removeChild(el)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export default hasPermission;
|
export default hasPermission
|
||||||
|
|||||||
+1
-1
@@ -1,5 +1,5 @@
|
|||||||
// import Vue from 'vue'
|
// import Vue from 'vue'
|
||||||
import { mapState } from "vuex";
|
import { mapState } from 'vuex'
|
||||||
|
|
||||||
// const mixinsComputed = Vue.config.optionMergeStrategies.computed
|
// const mixinsComputed = Vue.config.optionMergeStrategies.computed
|
||||||
// const mixinsMethods = Vue.config.optionMergeStrategies.methods
|
// const mixinsMethods = Vue.config.optionMergeStrategies.methods
|
||||||
|
|||||||
+22
-22
@@ -2,7 +2,7 @@ import Vue from 'vue'
|
|||||||
import axios from 'axios'
|
import axios from 'axios'
|
||||||
import store from '@/store'
|
import store from '@/store'
|
||||||
import {Modal, notification} from 'ant-design-vue'
|
import {Modal, notification} from 'ant-design-vue'
|
||||||
import { ACCESS_TOKEN, TENANT_ID } from "@/store/mutation-types"
|
import { ACCESS_TOKEN, TENANT_ID } from '@/store/mutation-types'
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 【指定 axios的 baseURL】
|
* 【指定 axios的 baseURL】
|
||||||
@@ -10,7 +10,7 @@ import { ACCESS_TOKEN, TENANT_ID } from "@/store/mutation-types"
|
|||||||
* 则映射后端域名,通过 vue.config.js
|
* 则映射后端域名,通过 vue.config.js
|
||||||
* @type {*|string}
|
* @type {*|string}
|
||||||
*/
|
*/
|
||||||
let apiBaseUrl = window._CONFIG['domianURL'] || "/jero-boot";
|
let apiBaseUrl = window._CONFIG['domianURL'] || '/jero-boot'
|
||||||
//console.log("apiBaseUrl= ",apiBaseUrl)
|
//console.log("apiBaseUrl= ",apiBaseUrl)
|
||||||
// 创建 axios 实例
|
// 创建 axios 实例
|
||||||
const service = axios.create({
|
const service = axios.create({
|
||||||
@@ -23,23 +23,23 @@ const err = (error) => {
|
|||||||
if (error.response) {
|
if (error.response) {
|
||||||
let data = error.response.data
|
let data = error.response.data
|
||||||
const token = Vue.ls.get(ACCESS_TOKEN)
|
const token = Vue.ls.get(ACCESS_TOKEN)
|
||||||
console.log("------异常响应------",token)
|
console.log('------异常响应------',token)
|
||||||
console.log("------异常响应------",error.response.status)
|
console.log('------异常响应------',error.response.status)
|
||||||
switch (error.response.status) {
|
switch (error.response.status) {
|
||||||
case 403:
|
case 403:
|
||||||
notification.error({ message: '系统提示', description: '拒绝访问',duration: 4})
|
notification.error({ message: '系统提示', description: '拒绝访问',duration: 4})
|
||||||
break
|
break
|
||||||
case 500:
|
case 500:
|
||||||
console.log("------error.response------",error.response)
|
console.log('------error.response------',error.response)
|
||||||
// update-begin- --- author:liusq ------ date:20200910 ---- for:处理Blob情况----
|
// update-begin- --- author:liusq ------ date:20200910 ---- for:处理Blob情况----
|
||||||
let type=error.response.request.responseType;
|
let type=error.response.request.responseType
|
||||||
if(type === 'blob'){
|
if(type === 'blob'){
|
||||||
blobToJson(data);
|
blobToJson(data)
|
||||||
break;
|
break
|
||||||
}
|
}
|
||||||
// update-end- --- author:liusq ------ date:20200910 ---- for:处理Blob情况----
|
// update-end- --- author:liusq ------ date:20200910 ---- for:处理Blob情况----
|
||||||
//notification.error({ message: '系统提示', description:'Token失效,请重新登录!',duration: 4})
|
//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失效采用弹框模式,不直接跳转----
|
// update-begin- --- author:scott ------ date:20190225 ---- for:Token失效采用弹框模式,不直接跳转----
|
||||||
Modal.error({
|
Modal.error({
|
||||||
title: '登录已过期',
|
title: '登录已过期',
|
||||||
@@ -51,8 +51,8 @@ const err = (error) => {
|
|||||||
Vue.ls.remove(ACCESS_TOKEN)
|
Vue.ls.remove(ACCESS_TOKEN)
|
||||||
try {
|
try {
|
||||||
let path = window.document.location.pathname
|
let path = window.document.location.pathname
|
||||||
console.log("location pathname -> "+path)
|
console.log('location pathname -> '+path)
|
||||||
if(path!="/" && path.indexOf('/user/login')==-1){
|
if(path!='/' && path.indexOf('/user/login')==-1){
|
||||||
window.location.reload()
|
window.location.reload()
|
||||||
}
|
}
|
||||||
}catch (e) {
|
}catch (e) {
|
||||||
@@ -90,7 +90,7 @@ const err = (error) => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
return Promise.reject(error)
|
return Promise.reject(error)
|
||||||
};
|
}
|
||||||
|
|
||||||
// request interceptor
|
// request interceptor
|
||||||
service.interceptors.request.use(config => {
|
service.interceptors.request.use(config => {
|
||||||
@@ -101,12 +101,12 @@ service.interceptors.request.use(config => {
|
|||||||
//update-begin-author:taoyan date:2020707 for:多租户
|
//update-begin-author:taoyan date:2020707 for:多租户
|
||||||
let tenantid = Vue.ls.get(TENANT_ID)
|
let tenantid = Vue.ls.get(TENANT_ID)
|
||||||
if (!tenantid) {
|
if (!tenantid) {
|
||||||
tenantid = 0;
|
tenantid = 0
|
||||||
}
|
}
|
||||||
config.headers[ 'tenant_id' ] = tenantid
|
config.headers[ 'tenant_id' ] = tenantid
|
||||||
//update-end-author:taoyan date:2020707 for:多租户
|
//update-end-author:taoyan date:2020707 for:多租户
|
||||||
if(config.method=='get'){
|
if(config.method=='get'){
|
||||||
if(config.url.indexOf("sys/dict/getDictItems")<0){
|
if(config.url.indexOf('sys/dict/getDictItems')<0){
|
||||||
config.params = {
|
config.params = {
|
||||||
_t: Date.parse(new Date())/1000,
|
_t: Date.parse(new Date())/1000,
|
||||||
...config.params
|
...config.params
|
||||||
@@ -128,15 +128,15 @@ service.interceptors.response.use((response) => {
|
|||||||
* @param data
|
* @param data
|
||||||
*/
|
*/
|
||||||
function blobToJson(data) {
|
function blobToJson(data) {
|
||||||
let fileReader = new FileReader();
|
let fileReader = new FileReader()
|
||||||
let token = Vue.ls.get(ACCESS_TOKEN);
|
let token = Vue.ls.get(ACCESS_TOKEN)
|
||||||
fileReader.onload = function() {
|
fileReader.onload = function() {
|
||||||
try {
|
try {
|
||||||
let jsonData = JSON.parse(this.result); // 说明是普通对象数据,后台转换失败
|
let jsonData = JSON.parse(this.result) // 说明是普通对象数据,后台转换失败
|
||||||
console.log("jsonData",jsonData)
|
console.log('jsonData',jsonData)
|
||||||
if (jsonData.status === 500) {
|
if (jsonData.status === 500) {
|
||||||
console.log("token----------》",token)
|
console.log('token----------》',token)
|
||||||
if(token && jsonData.message.includes("Token失效")){
|
if(token && jsonData.message.includes('Token失效')){
|
||||||
Modal.error({
|
Modal.error({
|
||||||
title: '登录已过期',
|
title: '登录已过期',
|
||||||
content: '很抱歉,登录已过期,请重新登录',
|
content: '很抱歉,登录已过期,请重新登录',
|
||||||
@@ -153,9 +153,9 @@ function blobToJson(data) {
|
|||||||
}
|
}
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
// 解析成对象失败,说明是正常的文件流
|
// 解析成对象失败,说明是正常的文件流
|
||||||
console.log("blob解析fileReader返回err",err)
|
console.log('blob解析fileReader返回err',err)
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
fileReader.readAsText(data)
|
fileReader.readAsText(data)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+35
-35
@@ -1,6 +1,6 @@
|
|||||||
import * as api from '@/api/api'
|
import * as api from '@/api/api'
|
||||||
import { isURL } from '@/utils/validate'
|
import { isURL } from '@/utils/validate'
|
||||||
import { JSEncrypt } from "jsencrypt";
|
import { JSEncrypt } from 'jsencrypt'
|
||||||
// import onlineCommons from '@/components/onlineForm/onlineForm'
|
// import onlineCommons from '@/components/onlineForm/onlineForm'
|
||||||
//
|
//
|
||||||
export function timeFix() {
|
export function timeFix() {
|
||||||
@@ -32,16 +32,16 @@ export function triggerWindowResizeEvent() {
|
|||||||
*/
|
*/
|
||||||
export function filterObj(obj) {
|
export function filterObj(obj) {
|
||||||
if (!(typeof obj == 'object')) {
|
if (!(typeof obj == 'object')) {
|
||||||
return;
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
for ( let key in obj) {
|
for ( let key in obj) {
|
||||||
if (obj.hasOwnProperty(key)
|
if (obj.hasOwnProperty(key)
|
||||||
&& (obj[key] == null || obj[key] == undefined || obj[key] === '')) {
|
&& (obj[key] == null || obj[key] == undefined || obj[key] === '')) {
|
||||||
delete obj[key];
|
delete obj[key]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return obj;
|
return obj
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -51,10 +51,10 @@ export function filterObj(obj) {
|
|||||||
* @returns {*}
|
* @returns {*}
|
||||||
*/
|
*/
|
||||||
export function formatDate(value, fmt) {
|
export function formatDate(value, fmt) {
|
||||||
let regPos = /^\d+(\.\d+)?$/;
|
let regPos = /^\d+(\.\d+)?$/
|
||||||
if(regPos.test(value)){
|
if(regPos.test(value)){
|
||||||
//如果是数字
|
//如果是数字
|
||||||
let getDate = new Date(value);
|
let getDate = new Date(value)
|
||||||
let o = {
|
let o = {
|
||||||
'M+': getDate.getMonth() + 1,
|
'M+': getDate.getMonth() + 1,
|
||||||
'd+': getDate.getDate(),
|
'd+': getDate.getDate(),
|
||||||
@@ -63,7 +63,7 @@ export function formatDate(value, fmt) {
|
|||||||
's+': getDate.getSeconds(),
|
's+': getDate.getSeconds(),
|
||||||
'q+': Math.floor((getDate.getMonth() + 3) / 3),
|
'q+': Math.floor((getDate.getMonth() + 3) / 3),
|
||||||
'S': getDate.getMilliseconds()
|
'S': getDate.getMilliseconds()
|
||||||
};
|
}
|
||||||
if (/(y+)/.test(fmt)) {
|
if (/(y+)/.test(fmt)) {
|
||||||
fmt = fmt.replace(RegExp.$1, (getDate.getFullYear() + '').substr(4 - RegExp.$1.length))
|
fmt = fmt.replace(RegExp.$1, (getDate.getFullYear() + '').substr(4 - RegExp.$1.length))
|
||||||
}
|
}
|
||||||
@@ -72,11 +72,11 @@ export function formatDate(value, fmt) {
|
|||||||
fmt = fmt.replace(RegExp.$1, (RegExp.$1.length === 1) ? (o[k]) : (('00' + o[k]).substr(('' + o[k]).length)))
|
fmt = fmt.replace(RegExp.$1, (RegExp.$1.length === 1) ? (o[k]) : (('00' + o[k]).substr(('' + o[k]).length)))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return fmt;
|
return fmt
|
||||||
}else{
|
}else{
|
||||||
//TODO
|
//TODO
|
||||||
value = value.trim();
|
value = value.trim()
|
||||||
return value.substr(0,fmt.length);
|
return value.substr(0,fmt.length)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -93,27 +93,27 @@ let indexRouter = [{
|
|||||||
...generateChildRouters(data)
|
...generateChildRouters(data)
|
||||||
]
|
]
|
||||||
},{
|
},{
|
||||||
"path": "*", "redirect": "/404", "hidden": true
|
'path': '*', 'redirect': '/404', 'hidden': true
|
||||||
}]
|
}]
|
||||||
return indexRouter;
|
return indexRouter
|
||||||
}
|
}
|
||||||
|
|
||||||
// 生成嵌套路由(子路由)
|
// 生成嵌套路由(子路由)
|
||||||
|
|
||||||
function generateChildRouters (data) {
|
function generateChildRouters (data) {
|
||||||
const routers = [];
|
const routers = []
|
||||||
for (let item of data) {
|
for (let item of data) {
|
||||||
let component = "";
|
let component = ''
|
||||||
if(item.component.indexOf("layouts")>=0){
|
if(item.component.indexOf('layouts')>=0){
|
||||||
component = "components/"+item.component;
|
component = 'components/'+item.component
|
||||||
}else{
|
}else{
|
||||||
component = "views/"+item.component;
|
component = 'views/'+item.component
|
||||||
}
|
}
|
||||||
|
|
||||||
// eslint-disable-next-line
|
// eslint-disable-next-line
|
||||||
let URL = (item.meta.url|| '').replace(/{{([^}}]+)?}}/g, (s1, s2) => eval(s2)) // URL支持{{ window.xxx }}占位符变量
|
let URL = (item.meta.url|| '').replace(/{{([^}}]+)?}}/g, (s1, s2) => eval(s2)) // URL支持{{ window.xxx }}占位符变量
|
||||||
if (isURL(URL)) {
|
if (isURL(URL)) {
|
||||||
item.meta.url = URL;
|
item.meta.url = URL
|
||||||
}
|
}
|
||||||
|
|
||||||
let componentPath
|
let componentPath
|
||||||
@@ -160,11 +160,11 @@ function generateChildRouters (data) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(item.alwaysShow){
|
if(item.alwaysShow){
|
||||||
menu.alwaysShow = true;
|
menu.alwaysShow = true
|
||||||
menu.redirect = menu.path;
|
menu.redirect = menu.path
|
||||||
}
|
}
|
||||||
if (item.children && item.children.length > 0) {
|
if (item.children && item.children.length > 0) {
|
||||||
menu.children = [...generateChildRouters( item.children)];
|
menu.children = [...generateChildRouters( item.children)]
|
||||||
}
|
}
|
||||||
//--update-begin----author:scott---date:20190320------for:根据后台菜单配置,判断是否路由菜单字段,动态选择是否生成路由(为了支持参数URL菜单)------
|
//--update-begin----author:scott---date:20190320------for:根据后台菜单配置,判断是否路由菜单字段,动态选择是否生成路由(为了支持参数URL菜单)------
|
||||||
//判断是否生成路由
|
//判断是否生成路由
|
||||||
@@ -172,7 +172,7 @@ function generateChildRouters (data) {
|
|||||||
//console.log(' 不生成路由 item.route: '+item.route);
|
//console.log(' 不生成路由 item.route: '+item.route);
|
||||||
//console.log(' 不生成路由 item.path: '+item.path);
|
//console.log(' 不生成路由 item.path: '+item.path);
|
||||||
}else{
|
}else{
|
||||||
routers.push(menu);
|
routers.push(menu)
|
||||||
}
|
}
|
||||||
//--update-end----author:scott---date:20190320------for:根据后台菜单配置,判断是否路由菜单字段,动态选择是否生成路由(为了支持参数URL菜单)------
|
//--update-end----author:scott---date:20190320------for:根据后台菜单配置,判断是否路由菜单字段,动态选择是否生成路由(为了支持参数URL菜单)------
|
||||||
}
|
}
|
||||||
@@ -249,8 +249,8 @@ export function randomUUID() {
|
|||||||
*/
|
*/
|
||||||
export function underLine2CamelCase(string){
|
export function underLine2CamelCase(string){
|
||||||
return string.replace( /_([a-z])/g, function( all, letter ) {
|
return string.replace( /_([a-z])/g, function( all, letter ) {
|
||||||
return letter.toUpperCase();
|
return letter.toUpperCase()
|
||||||
});
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -259,10 +259,10 @@ export function underLine2CamelCase(string){
|
|||||||
* @returns {*}
|
* @returns {*}
|
||||||
*/
|
*/
|
||||||
export function showDealBtn(bpmStatus){
|
export function showDealBtn(bpmStatus){
|
||||||
if(bpmStatus!="1"&&bpmStatus!="3"&&bpmStatus!="4"){
|
if(bpmStatus!='1'&&bpmStatus!='3'&&bpmStatus!='4'){
|
||||||
return true;
|
return true
|
||||||
}
|
}
|
||||||
return false;
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -272,7 +272,7 @@ export function showDealBtn(bpmStatus){
|
|||||||
*/
|
*/
|
||||||
export function cssExpand(css, id) {
|
export function cssExpand(css, id) {
|
||||||
let style = document.createElement('style')
|
let style = document.createElement('style')
|
||||||
style.type = "text/css"
|
style.type = 'text/css'
|
||||||
style.innerHTML = `@charset "UTF-8"; ${css}`
|
style.innerHTML = `@charset "UTF-8"; ${css}`
|
||||||
// 清除旧样式
|
// 清除旧样式
|
||||||
if (id) {
|
if (id) {
|
||||||
@@ -554,12 +554,12 @@ export function removeArrayElement(array, prod, value) {
|
|||||||
let index = -1
|
let index = -1
|
||||||
for(let i = 0;i<array.length;i++){
|
for(let i = 0;i<array.length;i++){
|
||||||
if(array[i][prod] == value){
|
if(array[i][prod] == value){
|
||||||
index = i;
|
index = i
|
||||||
break;
|
break
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(index>=0){
|
if(index>=0){
|
||||||
array.splice(index, 1);
|
array.splice(index, 1)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
@@ -577,13 +577,13 @@ export function encrypt(publicKey, message) {
|
|||||||
* 校验数组是否有重复的元素
|
* 校验数组是否有重复的元素
|
||||||
* */
|
* */
|
||||||
export function isRepeat(arr) {
|
export function isRepeat(arr) {
|
||||||
var hash = {};
|
var hash = {}
|
||||||
for(var i in arr) {
|
for(var i in arr) {
|
||||||
if(hash[arr[i]]) {
|
if(hash[arr[i]]) {
|
||||||
return true;
|
return true
|
||||||
}
|
}
|
||||||
// 不存在该元素,则赋值为true,可以赋任意值,相应的修改if判断条件即可
|
// 不存在该元素,则赋值为true,可以赋任意值,相应的修改if判断条件即可
|
||||||
hash[arr[i]] = true;
|
hash[arr[i]] = true
|
||||||
}
|
}
|
||||||
return false;
|
return false
|
||||||
}
|
}
|
||||||
|
|||||||
+3
-3
@@ -6,7 +6,7 @@ const vTrim = {
|
|||||||
input.oninput = (event) => {
|
input.oninput = (event) => {
|
||||||
console.log(event.target.value)
|
console.log(event.target.value)
|
||||||
// event.target.value = event.target.value.replace(/(^\s*)|(\s*$)/g, "")
|
// event.target.value = event.target.value.replace(/(^\s*)|(\s*$)/g, "")
|
||||||
input.value = input.value.replace(/(^\s*)|(\s*$)/g, "")
|
input.value = input.value.replace(/(^\s*)|(\s*$)/g, '')
|
||||||
}
|
}
|
||||||
// // 获取当前光标所在位置
|
// // 获取当前光标所在位置
|
||||||
// const inputSelection = input.selectionStart
|
// const inputSelection = input.selectionStart
|
||||||
@@ -23,8 +23,8 @@ const vTrim = {
|
|||||||
// input.dispatchEvent(new Event(modifiers.lazy ? 'change' : 'input'))
|
// input.dispatchEvent(new Event(modifiers.lazy ? 'change' : 'input'))
|
||||||
// }
|
// }
|
||||||
}
|
}
|
||||||
});
|
})
|
||||||
}
|
}
|
||||||
};
|
}
|
||||||
|
|
||||||
export default vTrim
|
export default vTrim
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import {duplicateCheck} from "@api/api";
|
import {duplicateCheck} from '@api/api'
|
||||||
import {phoneReg, isEmail, passwordReg, isPhone,chineseReg} from "@/utils/validate";
|
import {phoneReg, isEmail, passwordReg, isPhone,chineseReg} from '@/utils/validate'
|
||||||
|
|
||||||
// 手机校验的错误信息提示
|
// 手机校验的错误信息提示
|
||||||
const phoneErrMsg = {
|
const phoneErrMsg = {
|
||||||
|
|||||||
+3
-3
@@ -7,12 +7,12 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
// @ is an alias to /src
|
// @ is an alias to /src
|
||||||
import HelloWorld from "@/components/HelloWorld.vue";
|
import HelloWorld from '@/components/HelloWorld.vue'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "Home",
|
name: 'Home',
|
||||||
components: {
|
components: {
|
||||||
HelloWorld,
|
HelloWorld,
|
||||||
},
|
},
|
||||||
};
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -25,7 +25,8 @@
|
|||||||
<!-- 操作按钮区域-->
|
<!-- 操作按钮区域-->
|
||||||
<div class="table-operator">
|
<div class="table-operator">
|
||||||
<a-button type="primary" icon="plus" @click="handleAdd">新增</a-button>
|
<a-button type="primary" icon="plus" @click="handleAdd">新增</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-button type="primary" icon="import">导入</a-button>
|
||||||
</a-upload>
|
</a-upload>
|
||||||
<a-button type="primary" icon="export" @click="handleExportXls('企业管理')">导出</a-button>
|
<a-button type="primary" icon="export" @click="handleExportXls('企业管理')">导出</a-button>
|
||||||
@@ -37,20 +38,20 @@
|
|||||||
<!-- table表格区域-->
|
<!-- table表格区域-->
|
||||||
<div>
|
<div>
|
||||||
<a-table
|
<a-table
|
||||||
ref="table"
|
ref="table"
|
||||||
size="middle"
|
size="middle"
|
||||||
bordered
|
bordered
|
||||||
rowKey="id"
|
rowKey="id"
|
||||||
:columns="columns"
|
:columns="columns"
|
||||||
:scroll="{x: 1500}"
|
:scroll="{x: 1500}"
|
||||||
:dataSource="dataSource"
|
:dataSource="dataSource"
|
||||||
:pagination="ipagination"
|
:pagination="ipagination"
|
||||||
:loading="loading"
|
:loading="loading"
|
||||||
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
|
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
|
||||||
@change="handleTableChange"
|
@change="handleTableChange"
|
||||||
class="j-table-force-nowrap">
|
class="j-table-force-nowrap">
|
||||||
|
|
||||||
<template slot="text" slot-scope="text,record">
|
<template slot="text" slot-scope="text">
|
||||||
<j-ellipsis :value="text" :length="18"></j-ellipsis>
|
<j-ellipsis :value="text" :length="18"></j-ellipsis>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -77,9 +78,9 @@ export default {
|
|||||||
components: { JEllipsis, BusinessManagementModule, PageHeaderTitle },
|
components: { JEllipsis, BusinessManagementModule, PageHeaderTitle },
|
||||||
mixins: [JeroListMixin],
|
mixins: [JeroListMixin],
|
||||||
computed: {
|
computed: {
|
||||||
importExcelUrl: function(){
|
importExcelUrl: function () {
|
||||||
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
|
return `${ window._CONFIG['domianURL'] }/${ this.url.importExcelUrl }`
|
||||||
},
|
}
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
|||||||
@@ -35,7 +35,8 @@
|
|||||||
<!-- 操作按钮区域-->
|
<!-- 操作按钮区域-->
|
||||||
<div class="table-operator">
|
<div class="table-operator">
|
||||||
<a-button type="primary" icon="plus" @click="handleAdd">新增</a-button>
|
<a-button type="primary" icon="plus" @click="handleAdd">新增</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-button type="primary" icon="import">导入</a-button>
|
||||||
</a-upload>
|
</a-upload>
|
||||||
<a-button type="primary" icon="export" @click="handleExportXls('联系人管理')">导出</a-button>
|
<a-button type="primary" icon="export" @click="handleExportXls('联系人管理')">导出</a-button>
|
||||||
@@ -47,20 +48,20 @@
|
|||||||
<!-- table表格区域-->
|
<!-- table表格区域-->
|
||||||
<div>
|
<div>
|
||||||
<a-table
|
<a-table
|
||||||
ref="table"
|
ref="table"
|
||||||
size="middle"
|
size="middle"
|
||||||
bordered
|
bordered
|
||||||
rowKey="id"
|
rowKey="id"
|
||||||
:columns="columns"
|
:columns="columns"
|
||||||
:scroll="{x: 1500}"
|
:scroll="{x: 1500}"
|
||||||
:dataSource="dataSource"
|
:dataSource="dataSource"
|
||||||
:pagination="ipagination"
|
:pagination="ipagination"
|
||||||
:loading="loading"
|
:loading="loading"
|
||||||
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
|
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
|
||||||
@change="handleTableChange"
|
@change="handleTableChange"
|
||||||
class="j-table-force-nowrap">
|
class="j-table-force-nowrap">
|
||||||
|
|
||||||
<template slot="text" slot-scope="text,record">
|
<template slot="text" slot-scope="text">
|
||||||
<j-ellipsis :value="text" :length="18"></j-ellipsis>
|
<j-ellipsis :value="text" :length="18"></j-ellipsis>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -86,9 +87,9 @@ export default {
|
|||||||
components: { ContactManagementModule, PageHeaderTitle },
|
components: { ContactManagementModule, PageHeaderTitle },
|
||||||
mixins: [JeroListMixin],
|
mixins: [JeroListMixin],
|
||||||
computed: {
|
computed: {
|
||||||
importExcelUrl: function(){
|
importExcelUrl: function () {
|
||||||
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
|
return `${ window._CONFIG['domianURL'] }/${ this.url.importExcelUrl }`
|
||||||
},
|
}
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
|||||||
@@ -1,13 +1,13 @@
|
|||||||
<template>
|
<template>
|
||||||
<j-modal
|
<j-modal
|
||||||
:title="title"
|
:title="title"
|
||||||
:width="width"
|
:width="width"
|
||||||
:visible="visible"
|
:visible="visible"
|
||||||
:confirmLoading="confirmLoading"
|
:confirmLoading="confirmLoading"
|
||||||
switchFullscreen
|
switchFullscreen
|
||||||
@ok="handleOk"
|
@ok="handleOk"
|
||||||
@cancel="handleCancel"
|
@cancel="handleCancel"
|
||||||
cancelText="关闭">
|
cancelText="关闭">
|
||||||
<a-spin :spinning="confirmLoading">
|
<a-spin :spinning="confirmLoading">
|
||||||
<a-form :form="form">
|
<a-form :form="form">
|
||||||
<a-row>
|
<a-row>
|
||||||
@@ -87,11 +87,11 @@
|
|||||||
<a-col>
|
<a-col>
|
||||||
<a-form-item label="备注" :labelCol="remarksLabelCol" :wrapperCol="remarksWrapperCol">
|
<a-form-item label="备注" :labelCol="remarksLabelCol" :wrapperCol="remarksWrapperCol">
|
||||||
<a-textarea
|
<a-textarea
|
||||||
placeholder="请输入备注"
|
placeholder="请输入备注"
|
||||||
v-decorator="['remarks']"
|
v-decorator="['remarks']"
|
||||||
:auto-size="{ minRows: 3, maxRows: 6 }"
|
:auto-size="{ minRows: 3, maxRows: 6 }"
|
||||||
:maxLength='200'
|
:maxLength='200'
|
||||||
@change="e => {e.target.value = (e.target.value + '').trim()}"/>
|
@change="e => {e.target.value = (e.target.value + '').trim()}"/>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
</a-row>
|
</a-row>
|
||||||
|
|||||||
@@ -1,13 +1,13 @@
|
|||||||
<template>
|
<template>
|
||||||
<j-modal
|
<j-modal
|
||||||
:title="title"
|
:title="title"
|
||||||
:width="width"
|
:width="width"
|
||||||
:visible="visible"
|
:visible="visible"
|
||||||
:confirmLoading="confirmLoading"
|
:confirmLoading="confirmLoading"
|
||||||
switchFullscreen
|
switchFullscreen
|
||||||
@ok="handleOk"
|
@ok="handleOk"
|
||||||
@cancel="handleCancel"
|
@cancel="handleCancel"
|
||||||
cancelText="关闭">
|
cancelText="关闭">
|
||||||
<a-form :form="form">
|
<a-form :form="form">
|
||||||
<a-row>
|
<a-row>
|
||||||
<a-col :xl="12" :sm="24">
|
<a-col :xl="12" :sm="24">
|
||||||
@@ -85,11 +85,11 @@
|
|||||||
<a-col>
|
<a-col>
|
||||||
<a-form-item label="备注" :labelCol="remarksLabelCol" :wrapperCol="remarksWrapperCol">
|
<a-form-item label="备注" :labelCol="remarksLabelCol" :wrapperCol="remarksWrapperCol">
|
||||||
<a-textarea
|
<a-textarea
|
||||||
placeholder="请输入备注"
|
placeholder="请输入备注"
|
||||||
:auto-size="{ minRows: 3, maxRows: 6 }"
|
:auto-size="{ minRows: 3, maxRows: 6 }"
|
||||||
v-decorator="['remarks']"
|
v-decorator="['remarks']"
|
||||||
:maxLength='200'
|
:maxLength='200'
|
||||||
@change="e => {e.target.value = (e.target.value + '').trim()}"/>
|
@change="e => {e.target.value = (e.target.value + '').trim()}"/>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
</a-row>
|
</a-row>
|
||||||
@@ -244,7 +244,7 @@ export default {
|
|||||||
httpAction(httpurl, formData, method).then((res) => {
|
httpAction(httpurl, formData, method).then((res) => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
that.$message.success(res.message)
|
that.$message.success(res.message)
|
||||||
that.$emit('ok')
|
that.$emit('ok', res.result.id)
|
||||||
that.close()
|
that.close()
|
||||||
} else {
|
} else {
|
||||||
that.$message.warning(res.message)
|
that.$message.warning(res.message)
|
||||||
|
|||||||
@@ -79,15 +79,15 @@
|
|||||||
<!-- 项目名称 待审核状态为红色-->
|
<!-- 项目名称 待审核状态为红色-->
|
||||||
<template slot="projectName" slot-scope="text, record">
|
<template slot="projectName" slot-scope="text, record">
|
||||||
<div class="primary-color" @click="toRevenueContractDetail(record.id)" v-if="record.status !== 1">{{ text }}</div>
|
<div class="primary-color" @click="toRevenueContractDetail(record.id)" v-if="record.status !== 1">{{ text }}</div>
|
||||||
<div @click="toRevenueContractDetail(record.id)" v-else>{{ text }}</div>
|
<div @click="toRevenueContractDetail(record.id, record.contractNum)" v-else>{{ text }}</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template slot="text" slot-scope="text,record">
|
<template slot="text" slot-scope="text">
|
||||||
<j-ellipsis :value="text" :length="20"></j-ellipsis>
|
<j-ellipsis :value="text" :length="20"></j-ellipsis>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<span slot="action" class="action-span-cell" slot-scope="text, record">
|
<span slot="action" class="action-span-cell" slot-scope="text, record">
|
||||||
<a @click="handleEdit(record)">编辑</a>
|
<a @click="handleEdit(record.id, record.contractNum)">编辑</a>
|
||||||
<a @click="handleDelete(record.id)">删除</a>
|
<a @click="handleDelete(record.id)">删除</a>
|
||||||
</span>
|
</span>
|
||||||
</a-table>
|
</a-table>
|
||||||
@@ -195,17 +195,19 @@ export default {
|
|||||||
{
|
{
|
||||||
id: 1,
|
id: 1,
|
||||||
status: 1,
|
status: 1,
|
||||||
|
contractNum: '1346',
|
||||||
createTime: '2020-09-02 11:11:11'
|
createTime: '2020-09-02 11:11:11'
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
toRevenueContractDetail(id) {
|
toRevenueContractDetail(id, contractNum) {
|
||||||
this.$router.push({
|
this.$router.push({
|
||||||
path: '/contractManagement/RevenueContractDetail',
|
path: '/contractManagement/RevenueContractDetail',
|
||||||
query: {
|
query: {
|
||||||
revenueId: id
|
revenueId: id,
|
||||||
|
contractNum: contractNum
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
@@ -214,6 +216,15 @@ export default {
|
|||||||
path: '/contractManagement/AddRevenueContract'
|
path: '/contractManagement/AddRevenueContract'
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
handleEdit(id, contractNum) {
|
||||||
|
this.$router.push({
|
||||||
|
path: '/contractManagement/AddRevenueContract',
|
||||||
|
query: {
|
||||||
|
revenueId: id,
|
||||||
|
contractNum: contractNum
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
/**
|
/**
|
||||||
* 动态设置待审核状态的表格样式
|
* 动态设置待审核状态的表格样式
|
||||||
* @param record
|
* @param record
|
||||||
|
|||||||
@@ -0,0 +1,120 @@
|
|||||||
|
<template>
|
||||||
|
<j-modal
|
||||||
|
:title="title"
|
||||||
|
:width="width"
|
||||||
|
:visible="visible"
|
||||||
|
:confirmLoading="confirmLoading"
|
||||||
|
switchFullscreen
|
||||||
|
@ok="handleOk"
|
||||||
|
@cancel="handleCancel"
|
||||||
|
cancelText="关闭">
|
||||||
|
<div class="project-type">
|
||||||
|
<div
|
||||||
|
class="project-type-item"
|
||||||
|
v-for="(item, index) in projectType"
|
||||||
|
:key="index"
|
||||||
|
@click="chooseProjectType(index, item.type)">
|
||||||
|
<img :src="choosedIndex === index ? item.selectedImg : item.img">
|
||||||
|
<div class="project-type-item-title">{{ item.title }}</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</j-modal>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import GeneralProjectImg from '@/assets/imgs/generial_project.png'
|
||||||
|
import GeneralProjectSelectImg from '@/assets/imgs/working_group_project_selected.png'
|
||||||
|
import WorkingGroupProjectImg from '@/assets/imgs/working_group_project_selected.png'
|
||||||
|
import WorkingGroupProjectSelectedImg from '@/assets/imgs/working_group_project_selected.png'
|
||||||
|
import MeetingProjectImg from '@/assets/imgs/meeting_project.png'
|
||||||
|
import MeetingProjectSelectedImg from '@/assets/imgs/working_group_project_selected.png'
|
||||||
|
import MemberProjectImg from '@/assets/imgs/member_project.png'
|
||||||
|
import MemberProjectSelectedImg from '@/assets/imgs/working_group_project_selected.png'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'ProjectTypeSelection',
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
title: '关联项目',
|
||||||
|
width: 800,
|
||||||
|
visible: false,
|
||||||
|
confirmLoading: false,
|
||||||
|
choosedType: null,
|
||||||
|
choosedIndex: null,
|
||||||
|
projectType: [
|
||||||
|
{
|
||||||
|
img: GeneralProjectImg,
|
||||||
|
selectedImg: GeneralProjectSelectImg,
|
||||||
|
title: '普通项目',
|
||||||
|
type: 1
|
||||||
|
}, {
|
||||||
|
img: WorkingGroupProjectImg,
|
||||||
|
selectedImg: WorkingGroupProjectSelectedImg,
|
||||||
|
title: '工作组项目',
|
||||||
|
type: 2
|
||||||
|
}, {
|
||||||
|
img: MeetingProjectImg,
|
||||||
|
selectedImg: MeetingProjectSelectedImg,
|
||||||
|
title: '会议项目',
|
||||||
|
type: 3
|
||||||
|
}, {
|
||||||
|
img: MemberProjectImg,
|
||||||
|
selectedImg: MemberProjectSelectedImg,
|
||||||
|
title: '会员项目',
|
||||||
|
type: 4
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
open() {
|
||||||
|
this.visible = true
|
||||||
|
},
|
||||||
|
close() {
|
||||||
|
this.visible = false
|
||||||
|
},
|
||||||
|
chooseProjectType(index, type) {
|
||||||
|
this.choosedIndex = index
|
||||||
|
this.choosedType = type
|
||||||
|
},
|
||||||
|
handleOk() {
|
||||||
|
// 判断选择的项目类型,1--普通项目,2--工作组项目,3--会议项目,4--会员项目
|
||||||
|
if (this.choosedType && this.choosedType < 5) {
|
||||||
|
this.$emit('ok', this.choosedType)
|
||||||
|
this.close()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
this.$message.warn('请选择一个项目类型')
|
||||||
|
},
|
||||||
|
handleCancel() {
|
||||||
|
this.close()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="less">
|
||||||
|
.project-type {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-around;
|
||||||
|
|
||||||
|
&-item {
|
||||||
|
cursor: pointer;
|
||||||
|
|
||||||
|
&-title {
|
||||||
|
margin-top: 10px;
|
||||||
|
font-size: 14px;
|
||||||
|
font-family: NotoSansHans, NotoSansHans-DemiLight;
|
||||||
|
font-weight: 700;
|
||||||
|
text-align: center;
|
||||||
|
color: #333333;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//.project-type-item:hover {
|
||||||
|
// .project-type-item-title {
|
||||||
|
// color: #069F99;
|
||||||
|
// }
|
||||||
|
//}
|
||||||
|
</style>
|
||||||
@@ -1,16 +1,231 @@
|
|||||||
<template>
|
<template>
|
||||||
|
<div>
|
||||||
|
<page-header-title :is-level-one="false" :img-for-icon="IconImg" :level-two-title="contractNum"></page-header-title>
|
||||||
|
<a-card :bordered="false">
|
||||||
|
<!-- 主体信息-->
|
||||||
|
<div>
|
||||||
|
<div class="part-title">
|
||||||
|
<div class="part-title-text">主体信息</div>
|
||||||
|
</div>
|
||||||
|
<a-row class="detail">
|
||||||
|
<template v-for="(item, index) in mainInfoList" :key="index">
|
||||||
|
<a-col :xxl="6" :xl="8" :sm="12" class="detail-item" v-if="detailData[item.fieldName] && detailData[item.fieldName] !== ''">
|
||||||
|
<a-row>
|
||||||
|
<a-col :sm="10" :xs="24">{{ item.title }}:</a-col>
|
||||||
|
<a-col :sm="14" :xs="24">{{ detailData[item.fieldName] }}</a-col>
|
||||||
|
</a-row>
|
||||||
|
</a-col>
|
||||||
|
</template>
|
||||||
|
</a-row>
|
||||||
|
</div>
|
||||||
|
<a-divider></a-divider>
|
||||||
|
|
||||||
|
<!-- 日期节点-->
|
||||||
|
<div>
|
||||||
|
<div class="part-title">
|
||||||
|
<div class="part-title-text">日期节点</div>
|
||||||
|
</div>
|
||||||
|
<a-row class="detail">
|
||||||
|
<template v-for="item in mainInfoList">
|
||||||
|
<a-col :xxl="6" :xl="8" :sm="12" class="detail-item" v-if="detailData[item.fieldName] && detailData[item.fieldName] !== ''">
|
||||||
|
<a-row>
|
||||||
|
<a-col :sm="10" :xs="24">{{ item.title }}:</a-col>
|
||||||
|
<a-col :sm="14" :xs="24">{{ detailData[item.fieldName] }}</a-col>
|
||||||
|
</a-row>
|
||||||
|
</a-col>
|
||||||
|
</template>
|
||||||
|
</a-row>
|
||||||
|
</div>
|
||||||
|
<a-divider></a-divider>
|
||||||
|
|
||||||
|
<!-- 账款信息-->
|
||||||
|
<div>
|
||||||
|
<div class="part-title">
|
||||||
|
<div class="part-title-text">账款信息</div>
|
||||||
|
</div>
|
||||||
|
<a-row class="detail">
|
||||||
|
<template v-for="item in mainInfoList">
|
||||||
|
<a-col :xxl="6" :xl="8" :sm="12" class="detail-item" v-if="detailData[item.fieldName] && detailData[item.fieldName] !== ''">
|
||||||
|
<a-row>
|
||||||
|
<a-col :sm="10" :xs="24">{{ item.title }}:</a-col>
|
||||||
|
<a-col :sm="14" :xs="24">{{ detailData[item.fieldName] }}</a-col>
|
||||||
|
</a-row>
|
||||||
|
</a-col>
|
||||||
|
</template>
|
||||||
|
</a-row>
|
||||||
|
</div>
|
||||||
|
<a-divider></a-divider>
|
||||||
|
|
||||||
|
<!-- 其他信息-->
|
||||||
|
<div>
|
||||||
|
<div class="part-title">
|
||||||
|
<div class="part-title-text">其他信息</div>
|
||||||
|
</div>
|
||||||
|
<a-row class="detail">
|
||||||
|
<template v-for="(item, index) in mainInfoList">
|
||||||
|
<a-col :xxl="6" :xl="8" :sm="12" class="detail-item" v-if="detailData[item.fieldName] && detailData[item.fieldName] !== ''">
|
||||||
|
<a-row>
|
||||||
|
<a-col :sm="10" :xs="24">{{ item.title }}:</a-col>
|
||||||
|
<a-col :sm="14" :xs="24">{{ detailData[item.fieldName] }}</a-col>
|
||||||
|
</a-row>
|
||||||
|
</a-col>
|
||||||
|
</template>
|
||||||
|
</a-row>
|
||||||
|
</div>
|
||||||
|
<a-divider></a-divider>
|
||||||
|
|
||||||
|
<!-- 分期信息-->
|
||||||
|
<div>
|
||||||
|
<div class="part-title">
|
||||||
|
<div class="part-title-text">分期信息</div>
|
||||||
|
</div>
|
||||||
|
<a-row class="detail">
|
||||||
|
<template v-for="(item, index) in mainInfoList">
|
||||||
|
<a-col :xxl="4" :xl="8" :sm="12" class="detail-item" v-if="detailData[item.fieldName] && detailData[item.fieldName] !== ''">
|
||||||
|
<a-row>
|
||||||
|
<a-col :sm="10" :xs="24">{{ item.title }}:</a-col>
|
||||||
|
<a-col :sm="14" :xs="24">{{ detailData[item.fieldName] }}</a-col>
|
||||||
|
</a-row>
|
||||||
|
</a-col>
|
||||||
|
</template>
|
||||||
|
</a-row>
|
||||||
|
</div>
|
||||||
|
<a-divider></a-divider>
|
||||||
|
|
||||||
|
<!-- 关联项目-->
|
||||||
|
<div>
|
||||||
|
<div class="part-title">
|
||||||
|
<div class="part-title-text">关联项目</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<a-divider></a-divider>
|
||||||
|
|
||||||
|
<!-- 存档信息-->
|
||||||
|
<div>
|
||||||
|
<div class="part-title">
|
||||||
|
<div class="part-title-text">存档信息</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<a-divider></a-divider>
|
||||||
|
|
||||||
|
<!-- 审核记录-->
|
||||||
|
<div>
|
||||||
|
<div class="part-title">
|
||||||
|
<div class="part-title-text">审核记录</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</a-card>
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import IconImg from '@/assets/imgs/icon/icon_revenue_contract.png'
|
||||||
|
import PageHeaderTitle from '../../../../components/layouts/PageHeaderTitle'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'RevenueContractDetail',
|
name: 'RevenueContractDetail',
|
||||||
|
components: { PageHeaderTitle },
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
IconImg,
|
||||||
|
contractNum: '',
|
||||||
|
detailData: {},
|
||||||
|
// 主体信息
|
||||||
|
mainInfoList: [
|
||||||
|
{
|
||||||
|
fieldName: 'contractNum',
|
||||||
|
title: '合同编号'
|
||||||
|
}, {
|
||||||
|
fieldName: 'contractName',
|
||||||
|
title: '合同名称'
|
||||||
|
}, {
|
||||||
|
fieldName: 'signedCompanyTemporaryName',
|
||||||
|
title: '签订单位'
|
||||||
|
}, {
|
||||||
|
fieldName: 'signedContactsTemporaryName',
|
||||||
|
title: '签订联系人'
|
||||||
|
}, {
|
||||||
|
fieldName: 'opening_dictText',
|
||||||
|
title: '是否开口'
|
||||||
|
}, {
|
||||||
|
fieldName: 'principalName',
|
||||||
|
title: '负责人'
|
||||||
|
}, {
|
||||||
|
fieldName: 'departmentName',
|
||||||
|
title: '部门名称'
|
||||||
|
}, {
|
||||||
|
fieldName: 'contractAmount',
|
||||||
|
title: '签订合同总金额'
|
||||||
|
}, {
|
||||||
|
fieldName: 'rate',
|
||||||
|
title: '税率'
|
||||||
|
}, {
|
||||||
|
fieldName: 'noTaxAmount',
|
||||||
|
title: '未税金额'
|
||||||
|
}
|
||||||
|
],
|
||||||
|
dateNodeList: [
|
||||||
|
{
|
||||||
|
fieldName: 'contractDate',
|
||||||
|
title: '合同签订日期'
|
||||||
|
}, {
|
||||||
|
fieldName: 'terminationDate',
|
||||||
|
title: '合同终止日期'
|
||||||
|
}, {
|
||||||
|
fieldName: 'contractTimePoints',
|
||||||
|
title: '合同约定主要时点'
|
||||||
|
}
|
||||||
|
],
|
||||||
|
accountInfoList: [
|
||||||
|
{
|
||||||
|
fieldName: 'accountsReceivableAmount',
|
||||||
|
title: '应收金额'
|
||||||
|
}, {
|
||||||
|
fieldName: 'amountReceived',
|
||||||
|
title: '已收金额'
|
||||||
|
}, {
|
||||||
|
fieldName: 'amountReceived',
|
||||||
|
title: '未收金额'
|
||||||
|
}, {
|
||||||
|
fieldName: 'accountStatus',
|
||||||
|
title: '赊账状态'
|
||||||
|
}
|
||||||
|
],
|
||||||
|
otherInfoList: [
|
||||||
|
{
|
||||||
|
fieldName: 'contractPaymentTimes',
|
||||||
|
title: '合同约定付款次数'
|
||||||
|
}, {
|
||||||
|
fieldName: 'package_dictText',
|
||||||
|
title: '是否打包'
|
||||||
|
}, {
|
||||||
|
fieldName: 'packageYear',
|
||||||
|
title: '打包年份'
|
||||||
|
}
|
||||||
|
],
|
||||||
|
// 接口获取后处理加入title,fieldName字段
|
||||||
|
installmentList: []
|
||||||
|
}
|
||||||
|
},
|
||||||
created() {
|
created() {
|
||||||
console.log(this.$route.query)
|
console.log(this.$route.query.revenueId)
|
||||||
|
this.contractNum = this.$route.query.contractNum
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped lang="less">
|
||||||
|
@import '~@assets/less/common.less';
|
||||||
|
|
||||||
|
.detail {
|
||||||
|
padding: 0 20px;
|
||||||
|
|
||||||
|
&-item {
|
||||||
|
padding-top: 10px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.ant-divider-horizontal {
|
||||||
|
margin: 20px 0;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
@@ -3,81 +3,569 @@
|
|||||||
<page-header-title :is-level-one="false" :img-for-icon="IconImg" level-two-title="新建收入合同"></page-header-title>
|
<page-header-title :is-level-one="false" :img-for-icon="IconImg" level-two-title="新建收入合同"></page-header-title>
|
||||||
<a-card :bordered="false">
|
<a-card :bordered="false">
|
||||||
<a-form :form="form">
|
<a-form :form="form">
|
||||||
<div class="part-title">
|
<!-- 主体信息-->
|
||||||
<div class="part-title-text">主体信息</div>
|
|
||||||
</div>
|
|
||||||
<div>
|
<div>
|
||||||
|
<div class="part-title">
|
||||||
|
<div class="part-title-text">主体信息</div>
|
||||||
|
</div>
|
||||||
<a-row>
|
<a-row>
|
||||||
<a-col :xl="6" :sm="12">
|
<a-col :xxl="6" :xl="8" :sm="12">
|
||||||
<a-form-item label="合同编号" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
<a-form-item label="合同编号" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||||
<a-input placeholder="请输入合同编号"
|
<a-input placeholder="请输入合同编号"
|
||||||
v-decorator="['contractNum',validatorRules.contractNum]"
|
v-decorator="['contractNum',validatorRules.contractNum]"
|
||||||
:maxLength='50'
|
:maxLength='50'
|
||||||
|
:disabled="isSaved"
|
||||||
@change="e => {e.target.value = (e.target.value + '').trim()}"></a-input>
|
@change="e => {e.target.value = (e.target.value + '').trim()}"></a-input>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :xl="6" :sm="12">
|
<a-col :xxl="6" :xl="8" :sm="12">
|
||||||
<a-form-item label="合同名称" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
<a-form-item label="合同名称" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||||
<a-input placeholder="请输入合同名称"
|
<a-input placeholder="请输入合同名称"
|
||||||
v-decorator="['contractName',validatorRules.contractName]"
|
v-decorator="['contractName',validatorRules.contractName]"
|
||||||
:maxLength='50'
|
:maxLength='50'
|
||||||
|
:disabled="isSaved"
|
||||||
@change="e => {e.target.value = (e.target.value + '').trim()}"></a-input>
|
@change="e => {e.target.value = (e.target.value + '').trim()}"></a-input>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :xl="6" :sm="12">
|
<a-col :xxl="6" :xl="8" :sm="12">
|
||||||
<a-form-item label="签订单位" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
<a-form-item label="签订单位" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||||
<company-select placeholder="请选择签订单位"
|
<company-select placeholder="请选择签订单位"
|
||||||
v-decorator="['signedCompany',validatorRules.signedCompany]"></company-select>
|
:disabled="isSaved"
|
||||||
|
v-decorator="['signedCompany',validatorRules.signedCompany]"
|
||||||
|
@change="handleSignedCompanyChange"></company-select>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :xl="6" :sm="12">
|
<a-col :xxl="6" :xl="8" :sm="12">
|
||||||
<a-form-item label="签订联系人" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
<a-form-item label="签订联系人" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||||
<select-contacts placeholder="请选择签订联系人"
|
<select-contacts placeholder="请选择签订联系人"
|
||||||
|
:disabled="isSaved"
|
||||||
|
:selected-company="selectedCompany"
|
||||||
v-decorator="['signedContactsId',validatorRules.signedContactsId]"></select-contacts>
|
v-decorator="['signedContactsId',validatorRules.signedContactsId]"></select-contacts>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
</a-row>
|
<a-col :xxl="6" :xl="8" :sm="12">
|
||||||
<a-row>
|
<a-form-item label="是否开口" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||||
<a-col :xl="6" :sm="12"></a-col>
|
<j-dict-select-tag v-decorator="['opening']"
|
||||||
|
:triggerChange="true"
|
||||||
|
:disabled="isSaved"
|
||||||
|
placeholder="请选择是否开口"
|
||||||
|
dictCode="revenue_contract_open"/>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :xxl="6" :xl="8" :sm="12">
|
||||||
|
<a-form-item label="负责人" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||||
|
<select-principal placeholder="请选择负责人"
|
||||||
|
:disabled="isSaved"
|
||||||
|
v-decorator="['principalId',validatorRules.principalId]"></select-principal>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :xxl="6" :xl="8" :sm="12">
|
||||||
|
<a-form-item label="部门名称" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||||
|
<a-input placeholder="请输入部门名称"
|
||||||
|
v-decorator="['departmentName']"
|
||||||
|
:disabled="true"></a-input>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :xxl="6" :xl="8" :sm="12">
|
||||||
|
<a-form-item label="签订合同总金额" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||||
|
<a-input placeholder="请输入签订合同总金额"
|
||||||
|
:disabled="isSaved"
|
||||||
|
v-decorator="['contractAmount',validatorRules.contractAmount]"
|
||||||
|
:maxLength='50'
|
||||||
|
@change="(e) => {e.target.value = (e.target.value.replace(/[^0-9.]/g,'')).trim()}"></a-input>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :xxl="6" :xl="8" :sm="12">
|
||||||
|
<a-form-item label="税率" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||||
|
<a-input placeholder="请输入税率"
|
||||||
|
:disabled="isSaved"
|
||||||
|
v-decorator="['rate',validatorRules.rate]"
|
||||||
|
:maxLength='50'
|
||||||
|
@change="e => {e.target.value = (e.target.value + '').trim()}"></a-input>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :xxl="6" :xl="8" :sm="12">
|
||||||
|
<a-form-item label="未税金额" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||||
|
<a-input placeholder="请输入未税金额"
|
||||||
|
:disabled="isSaved"
|
||||||
|
v-decorator="['noTaxAmount']"
|
||||||
|
:maxLength='50'
|
||||||
|
@change="(e) => {e.target.value = (e.target.value.replace(/[^0-9.]/g,'')).trim()}"></a-input>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
</a-row>
|
</a-row>
|
||||||
</div>
|
</div>
|
||||||
|
<!-- /主体信息-->
|
||||||
|
<a-divider></a-divider>
|
||||||
|
<!-- 日期节点-->
|
||||||
|
<div>
|
||||||
|
<div class="part-title">
|
||||||
|
<div class="part-title-text">日期节点</div>
|
||||||
|
</div>
|
||||||
|
<a-row :gutter="30">
|
||||||
|
<a-col :xxl="6" :xl="8" :sm="12">
|
||||||
|
<a-form-item label="合同签订日期" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||||
|
<j-date placeholder="请选择合同签订日期"
|
||||||
|
style="width: 100%;"
|
||||||
|
:disabled="isSaved"
|
||||||
|
v-decorator="['contractDate']"
|
||||||
|
:trigger-change="true"
|
||||||
|
date-format="YYYY-MM-DD"/>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :xxl="6" :xl="8" :sm="12">
|
||||||
|
<a-form-item label="合同终止日期" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||||
|
<j-date placeholder="请选择合同终止日期"
|
||||||
|
style="width: 100%;"
|
||||||
|
:disabled="isSaved"
|
||||||
|
v-decorator="['terminationDate']"
|
||||||
|
:trigger-change="true"
|
||||||
|
date-format="YYYY-MM-DD"/>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :xxl="6" :xl="8" :sm="12">
|
||||||
|
<a-form-item label="合同约定主要时点" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||||
|
<j-date placeholder="请选择合同约定主要时点"
|
||||||
|
style="width: 100%;"
|
||||||
|
:disabled="isSaved"
|
||||||
|
v-decorator="['contractTimePoints']"
|
||||||
|
:trigger-change="true"
|
||||||
|
date-format="YYYY-MM-DD"/>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
</a-row>
|
||||||
|
</div>
|
||||||
|
<!-- /日期节点-->
|
||||||
|
<a-divider></a-divider>
|
||||||
|
<!-- 账款信息-->
|
||||||
|
<div>
|
||||||
|
<div class="part-title">
|
||||||
|
<div class="part-title-text">账款信息</div>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<a-row :gutter="30">
|
||||||
|
<a-col :xxl="6" :xl="8" :sm="12">
|
||||||
|
<a-form-item label="应收金额" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||||
|
<a-input placeholder="请输入应收金额"
|
||||||
|
v-decorator="['accountsReceivableAmount',validatorRules.accountsReceivableAmount]"
|
||||||
|
:maxLength='50'
|
||||||
|
:disabled="isSaved"
|
||||||
|
@change="(e) => {e.target.value = (e.target.value.replace(/[^0-9.]/g,'')).trim()}"></a-input>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :xxl="6" :xl="8" :sm="12">
|
||||||
|
<a-form-item label="已收金额" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||||
|
<a-input placeholder="请输入已收金额"
|
||||||
|
v-decorator="['amountReceived',validatorRules.amountReceived]"
|
||||||
|
:maxLength='50'
|
||||||
|
:disabled="isSaved"
|
||||||
|
@change="(e) => {e.target.value = (e.target.value.replace(/[^0-9.]/g,'')).trim()}"></a-input>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :xxl="6" :xl="8" :sm="12">
|
||||||
|
<a-form-item label="未收金额" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||||
|
<a-input placeholder="请输入未收金额"
|
||||||
|
:maxLength='50'
|
||||||
|
v-decorator="['amountReceived',validatorRules.amountReceived]"
|
||||||
|
:disabled="true"></a-input>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :xxl="6" :xl="8" :sm="12">
|
||||||
|
<a-form-item label="赊账状态" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||||
|
<j-dict-select-tag v-decorator="['accountStatus']"
|
||||||
|
:triggerChange="true"
|
||||||
|
placeholder="请选择赊账状态"
|
||||||
|
dictCode="revenue_contract_account_status"
|
||||||
|
:disabled="true"/>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
</a-row>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- /账款信息-->
|
||||||
|
<a-divider></a-divider>
|
||||||
|
<!-- 其他-->
|
||||||
|
<div>
|
||||||
|
<div class="part-title">
|
||||||
|
<div class="part-title-text">其他信息</div>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<a-row :gutter="30">
|
||||||
|
<a-col :xxl="6" :xl="8" :sm="12">
|
||||||
|
<a-form-item label="合同约定付款次数" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||||
|
<a-input placeholder="请输入合同约定付款次数"
|
||||||
|
v-decorator="['contractPaymentTimes']"
|
||||||
|
:maxLength='50'
|
||||||
|
:disabled="isSaved"
|
||||||
|
@change="e => {e.target.value = (e.target.value + '').trim()}"></a-input>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :xxl="6" :xl="8" :sm="12">
|
||||||
|
<a-form-item label="是否打包" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||||
|
<j-dict-select-tag v-decorator="['package', validatorRules.package]"
|
||||||
|
:triggerChange="true"
|
||||||
|
placeholder="请选择是否打包"
|
||||||
|
dictCode="yn"
|
||||||
|
:disabled="isSaved"/>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :xxl="6" :xl="8" :sm="12">
|
||||||
|
<a-form-item label="打包年份" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||||
|
<j-year-date style="width:100%"
|
||||||
|
:disabled="isSaved"
|
||||||
|
placeholder="请选择打包年份"
|
||||||
|
v-decorator="['packageYear',validatorRules.packageYear]"></j-year-date>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
</a-row>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- /其他-->
|
||||||
|
<a-divider></a-divider>
|
||||||
|
<!-- 分期信息-->
|
||||||
|
<div>
|
||||||
|
<div class="part-title">
|
||||||
|
<div class="part-title-text">分期信息</div>
|
||||||
|
</div>
|
||||||
|
<installment-form ref="installmentForm" @ok="installmentFormOk" :disabled="isSaved"></installment-form>
|
||||||
|
</div>
|
||||||
|
<!-- /分期信息-->
|
||||||
|
<a-form-item class="table-operator">
|
||||||
|
<a-button type="primary" @click="handleSave">保存</a-button>
|
||||||
|
<a-button @click="handleCancle">取消</a-button>
|
||||||
|
</a-form-item>
|
||||||
</a-form>
|
</a-form>
|
||||||
</a-card>
|
</a-card>
|
||||||
|
<!-- 关联项目-->
|
||||||
|
<a-card :bordered="false" v-if="isSaved" class="associated-project">
|
||||||
|
<div class="part-title">
|
||||||
|
<div class="part-title-text">关联项目</div>
|
||||||
|
<a-button type="link" @click="chooseProject">选择项目</a-button>
|
||||||
|
</div>
|
||||||
|
</a-card>
|
||||||
|
|
||||||
|
<project-type-selection ref="projectTypeSelection" @ok="selectProjectTypeOk"></project-type-selection>
|
||||||
|
<select-project-module ref="selectProjectModule"></select-project-module>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import IconImg from '@/assets/imgs/icon/icon_revenue_contract.png'
|
import IconImg from '@/assets/imgs/icon/icon_revenue_contract.png'
|
||||||
import PageHeaderTitle from '../../../../components/layouts/PageHeaderTitle'
|
import PageHeaderTitle from '@/components/layouts/PageHeaderTitle'
|
||||||
import CompanySelect from '../../../../components/company/CompanySelect'
|
import CompanySelect from '../../../../components/company/CompanySelect'
|
||||||
import SelectContacts from '../../../../components/company/SelectContacts'
|
import SelectContacts from '../../../../components/company/SelectContacts'
|
||||||
|
import SelectPrincipal from '../../../../components/company/SelectPrincipal'
|
||||||
|
import JDate from '../../../../components/tools/JDate'
|
||||||
|
import JYearDate from '../../../../components/jero/JYearDate'
|
||||||
|
import InstallmentForm from '../../../../components/form/InstallmentForm'
|
||||||
|
import ProjectTypeSelection from './ProjectTypeSelection'
|
||||||
|
import SelectProjectModule from './SelectProjectModule'
|
||||||
|
import pick from 'lodash.pick'
|
||||||
|
|
||||||
|
// 普通项目表头
|
||||||
|
const generalProjectColumns = [
|
||||||
|
{
|
||||||
|
title: '序号',
|
||||||
|
dataIndex: '',
|
||||||
|
key: 'rowIndex',
|
||||||
|
width: 60,
|
||||||
|
align: 'center',
|
||||||
|
customRender: function (t, r, index) {
|
||||||
|
return parseInt(index) + 1
|
||||||
|
}
|
||||||
|
}, {
|
||||||
|
title: '来款项目',
|
||||||
|
align: 'center',
|
||||||
|
width: 200,
|
||||||
|
dataIndex: 'chargeProject',
|
||||||
|
scopedSlots: { customRender: 'projectName' }
|
||||||
|
}, {
|
||||||
|
title: '来款用途',
|
||||||
|
align: 'center',
|
||||||
|
width: 180,
|
||||||
|
dataIndex: 'chargeUse_dictText',
|
||||||
|
scopedSlots: { customRender: 'text' }
|
||||||
|
}, {
|
||||||
|
title: '来款单位',
|
||||||
|
align: 'center',
|
||||||
|
width: 200,
|
||||||
|
dataIndex: 'chargeCompanyTemporaryName',
|
||||||
|
scopedSlots: { customRender: 'text' }
|
||||||
|
}, {
|
||||||
|
title: '应收金额',
|
||||||
|
align: 'center',
|
||||||
|
width: 100,
|
||||||
|
dataIndex: 'receivableAmount'
|
||||||
|
}, {
|
||||||
|
title: '实收金额',
|
||||||
|
align: 'center',
|
||||||
|
width: 100,
|
||||||
|
dataIndex: 'paidAmount'
|
||||||
|
}, {
|
||||||
|
title: '负责人',
|
||||||
|
align: 'center',
|
||||||
|
width: 140,
|
||||||
|
dataIndex: 'principalName',
|
||||||
|
scopedSlots: { customRender: 'text' }
|
||||||
|
}, {
|
||||||
|
title: '企业联系人',
|
||||||
|
align: 'center',
|
||||||
|
width: 140,
|
||||||
|
dataIndex: 'contactsTemporaryName',
|
||||||
|
scopedSlots: { customRender: 'text' }
|
||||||
|
}, {
|
||||||
|
title: '打包',
|
||||||
|
align: 'center',
|
||||||
|
width: 80,
|
||||||
|
dataIndex: 'pack',
|
||||||
|
scopedSlots: { customRender: 'status-pack' }
|
||||||
|
}, {
|
||||||
|
title: '需要发票',
|
||||||
|
align: 'center',
|
||||||
|
width: 80,
|
||||||
|
dataIndex: 'needInvoice',
|
||||||
|
scopedSlots: { customRender: 'status-pack' }
|
||||||
|
}, {
|
||||||
|
title: '到账',
|
||||||
|
align: 'center',
|
||||||
|
width: 80,
|
||||||
|
dataIndex: 'inAccount',
|
||||||
|
scopedSlots: { customRender: 'status' }
|
||||||
|
}, {
|
||||||
|
title: '开票',
|
||||||
|
align: 'center',
|
||||||
|
width: 80,
|
||||||
|
dataIndex: 'makeInvoice',
|
||||||
|
scopedSlots: { customRender: 'status' }
|
||||||
|
}, {
|
||||||
|
title: '邮寄',
|
||||||
|
align: 'center',
|
||||||
|
width: 80,
|
||||||
|
dataIndex: 'mail',
|
||||||
|
scopedSlots: { customRender: 'status' }
|
||||||
|
}, {
|
||||||
|
title: '操作',
|
||||||
|
dataIndex: 'action',
|
||||||
|
align: 'center',
|
||||||
|
fixed: 'right',
|
||||||
|
width: 160,
|
||||||
|
scopedSlots: { customRender: 'action' }
|
||||||
|
}
|
||||||
|
]
|
||||||
|
// 工作组项目表头
|
||||||
|
const workingProjectColumns = [
|
||||||
|
{
|
||||||
|
title: '序号',
|
||||||
|
dataIndex: '',
|
||||||
|
key: 'rowIndex',
|
||||||
|
width: 60,
|
||||||
|
align: 'center',
|
||||||
|
customRender: function (t, r, index) {
|
||||||
|
return parseInt(index) + 1
|
||||||
|
}
|
||||||
|
}, {
|
||||||
|
title: '工作组项目',
|
||||||
|
align: 'center',
|
||||||
|
dataIndex: 'workingGroupProject',
|
||||||
|
scopedSlots: { customRender: 'projectName' }
|
||||||
|
}, {
|
||||||
|
title: '负责人A',
|
||||||
|
align: 'center',
|
||||||
|
dataIndex: 'principalNameA'
|
||||||
|
}, {
|
||||||
|
title: '进度',
|
||||||
|
align: 'center',
|
||||||
|
dataIndex: 'obj',
|
||||||
|
width: 250,
|
||||||
|
scopedSlots: { customRender: 'rateOfProgress' }
|
||||||
|
}, {
|
||||||
|
title: '操作',
|
||||||
|
dataIndex: 'action',
|
||||||
|
align: 'center',
|
||||||
|
fixed: 'right',
|
||||||
|
width: 180,
|
||||||
|
scopedSlots: { customRender: 'action' }
|
||||||
|
}
|
||||||
|
]
|
||||||
|
// 会议项目表头
|
||||||
|
const meetingProjectColumns = []
|
||||||
|
// 会员项目表头
|
||||||
|
const memberProjectColums = []
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'RevenueContractModule',
|
name: 'RevenueContractModule',
|
||||||
components: { PageHeaderTitle, CompanySelect, SelectContacts },
|
components: {
|
||||||
|
PageHeaderTitle,
|
||||||
|
CompanySelect,
|
||||||
|
SelectContacts,
|
||||||
|
SelectPrincipal,
|
||||||
|
JDate,
|
||||||
|
JYearDate,
|
||||||
|
InstallmentForm,
|
||||||
|
ProjectTypeSelection,
|
||||||
|
SelectProjectModule
|
||||||
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
IconImg,
|
IconImg,
|
||||||
form: this.$form.createForm(this),
|
form: this.$form.createForm(this),
|
||||||
|
model: {},
|
||||||
labelCol: {
|
labelCol: {
|
||||||
xs: { span: 24 },
|
xs: { span: 24 },
|
||||||
sm: { span: 8 }
|
sm: { span: 10 }
|
||||||
},
|
},
|
||||||
wrapperCol: {
|
wrapperCol: {
|
||||||
xs: { span: 24 },
|
xs: { span: 24 },
|
||||||
sm: { span: 16 }
|
sm: { span: 14 }
|
||||||
},
|
},
|
||||||
validatorRules: {
|
validatorRules: {
|
||||||
|
contractNum: {
|
||||||
}
|
rules: [{ required: true, validator: this.checkCompanyName }],
|
||||||
|
validateTrigger: 'blur'
|
||||||
|
},
|
||||||
|
contractName: {
|
||||||
|
rules: [{ required: true, validator: this.checkCompanyName }],
|
||||||
|
validateTrigger: 'blur'
|
||||||
|
},
|
||||||
|
signedCompany: {
|
||||||
|
rules: [{ required: true, message: '请选择签订单位' }],
|
||||||
|
validateTrigger: 'change'
|
||||||
|
},
|
||||||
|
signedContactsId: {
|
||||||
|
rules: [{ required: true, message: '请选择签订联系人' }],
|
||||||
|
validateTrigger: 'blur'
|
||||||
|
},
|
||||||
|
principalId: {
|
||||||
|
rules: [{ required: true, message: '请选择负责人' }],
|
||||||
|
validateTrigger: 'blur'
|
||||||
|
},
|
||||||
|
contractAmount: {
|
||||||
|
rules: [{ required: true, message: '请输入签订合同总金额' }],
|
||||||
|
validateTrigger: 'blur'
|
||||||
|
},
|
||||||
|
rate: {
|
||||||
|
rules: [{ required: true, message: '请输入税率' }],
|
||||||
|
validateTrigger: 'blur'
|
||||||
|
},
|
||||||
|
accountsReceivableAmount: {
|
||||||
|
rules: [{ required: true, message: '请输入应收金额' }],
|
||||||
|
validateTrigger: 'blur'
|
||||||
|
},
|
||||||
|
amountReceived: {
|
||||||
|
rules: [{ required: true, message: '请输入已收金额' }],
|
||||||
|
validateTrigger: 'blur'
|
||||||
|
},
|
||||||
|
package: {
|
||||||
|
rules: [{ required: true, message: '请选择是否打包' }],
|
||||||
|
validateTrigger: 'blur'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
url: {
|
||||||
|
add: '',
|
||||||
|
edit: '',
|
||||||
|
generalProjectList: '/project/payCommonProject/list',
|
||||||
|
workingGroupProjectList: '/project/payWorkingGroup/list',
|
||||||
|
meetingProjectList: '',
|
||||||
|
memberProjectList: ''
|
||||||
|
},
|
||||||
|
selectedCompany: null, // 选中的企业
|
||||||
|
installmentList: [],
|
||||||
|
isSaved: false // 是否保存上方数据
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
mounted() {
|
||||||
console.log(this.$route)
|
if (this.$route.query.hasOwnProperty('revenueId')) {
|
||||||
|
this.edit(this.$route.query.revenueId)
|
||||||
|
} else {
|
||||||
|
this.add()
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
add() {
|
||||||
|
this.$refs.installmentForm.initInstallmentList({})
|
||||||
|
},
|
||||||
|
edit(id) {
|
||||||
|
console.log(id)
|
||||||
|
let record
|
||||||
|
this.$refs.installmentForm.initInstallmentList(record.initInstallmentList)
|
||||||
|
this.model = Object.assign({}, record)
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.form.setFieldsValue(pick(this.model, 'contractNum', 'contractName', 'signedCompany', 'signedContactsId', 'opening', 'principalId', 'departmentName', 'contractAmount', 'rate', 'noTaxAmount', 'contractDate', 'terminationDate', 'contractTimePoints', 'accountsReceivableAmount', 'amountReceived', 'amountReceived', 'accountStatus', 'contractPaymentTimes', 'package', 'packageYear'))
|
||||||
|
})
|
||||||
|
},
|
||||||
|
handleSave() {
|
||||||
|
// 验证分期信息
|
||||||
|
this.$refs.installmentForm.handleSave()
|
||||||
|
this.form.validateFields((err, values) => {
|
||||||
|
if (!err) {
|
||||||
|
if (this.installmentList.length > 0) {
|
||||||
|
console.log(values, '---外层form表单保存')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
// 保存上方表单信息,(应该在表单验证完全正确时置为true)
|
||||||
|
this.isSaved = true
|
||||||
|
},
|
||||||
|
handleCancle() {
|
||||||
|
this.model = {}
|
||||||
|
},
|
||||||
|
installmentFormOk(value) {
|
||||||
|
this.installmentList = value.installmentList
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
* 选中企业变化
|
||||||
|
* @param value
|
||||||
|
*/
|
||||||
|
handleSignedCompanyChange(value) {
|
||||||
|
this.selectedCompany = value
|
||||||
|
this.model.signedContactsId = undefined
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
* 选择关联项目
|
||||||
|
*/
|
||||||
|
chooseProject() {
|
||||||
|
this.$refs.projectTypeSelection.open()
|
||||||
|
},
|
||||||
|
selectProjectTypeOk(type) {
|
||||||
|
let title = ''
|
||||||
|
switch (type) {
|
||||||
|
case 1:
|
||||||
|
this.$refs.selectProjectModule.columns = generalProjectColumns
|
||||||
|
this.$refs.selectProjectModule.url.list = this.url.generalProjectList
|
||||||
|
title = '普通项目列表'
|
||||||
|
break
|
||||||
|
case 2:
|
||||||
|
this.$refs.selectProjectModule.columns = workingProjectColumns
|
||||||
|
this.$refs.selectProjectModule.url.list = this.url.workingGroupProjectList
|
||||||
|
title = '工作组项目列表'
|
||||||
|
break
|
||||||
|
case 3:
|
||||||
|
this.$refs.selectProjectModule.columns = meetingProjectColumns
|
||||||
|
this.$refs.selectProjectModule.url.list = this.url.meetingProjectList
|
||||||
|
title = '会议项目列表'
|
||||||
|
break
|
||||||
|
case 4:
|
||||||
|
this.$refs.selectProjectModule.columns = memberProjectColums
|
||||||
|
this.$refs.selectProjectModule.url.list = this.url.memberProjectList
|
||||||
|
title = '会员项目列表'
|
||||||
|
break
|
||||||
|
}
|
||||||
|
this.$refs.selectProjectModule.projectType = type
|
||||||
|
this.$refs.selectProjectModule.title = title
|
||||||
|
this.$refs.selectProjectModule.open()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="less">
|
<style scoped lang="less">
|
||||||
@import '~@assets/less/common.less';
|
@import '~@assets/less/common.less';
|
||||||
|
|
||||||
|
.associated-project {
|
||||||
|
margin-top: 2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ant-divider-horizontal {
|
||||||
|
margin: 20px 0;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
@@ -0,0 +1,151 @@
|
|||||||
|
<template>
|
||||||
|
<j-modal :title="title"
|
||||||
|
:width="width"
|
||||||
|
:visible="visible"
|
||||||
|
:confirmLoading="confirmLoading"
|
||||||
|
switchFullscreen
|
||||||
|
@ok="handleOk"
|
||||||
|
@cancel="handleCancel"
|
||||||
|
cancelText="关闭">
|
||||||
|
<div class="table-page-search-wrapper">
|
||||||
|
<a-form layout="inline" @keyup.enter.native="searchQuery">
|
||||||
|
<a-row>
|
||||||
|
<!-- 普通项目管理查询-->
|
||||||
|
<template v-if="projectType === 1">
|
||||||
|
<a-col :xl="6" :lg="7" :md="8" :sm="24">
|
||||||
|
<a-form-item label="科室" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||||
|
<a-input placeholder="请输入科室" v-model="queryParam.chargeCompanyTemporaryName"></a-input>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :xl="6" :lg="7" :md="8" :sm="24">
|
||||||
|
<a-form-item label="负责人" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||||
|
<select-principal placeholder="请选择负责人" v-model="queryParam.principalId"></select-principal>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :xl="6" :lg="7" :md="8" :sm="24">
|
||||||
|
<a-form-item label="运行年份" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||||
|
<j-year-date style="width:100%" placeholder="请选择运行年份" v-model="queryParam.year"></j-year-date>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<!-- 工作组项目查询-->
|
||||||
|
<template v-if="projectType === 2">
|
||||||
|
<a-col :xl="6" :lg="7" :md="8" :sm="24">
|
||||||
|
<a-form-item label="工作组项目" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||||
|
<a-input placeholder="请输入工作组项目" v-model="queryParam.workingGroupProject"></a-input>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
<a-col :xl="6" :lg="7" :md="8" :sm="24">
|
||||||
|
<a-form-item label="运行年份" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||||
|
<j-year-date style="width:100%" placeholder="请选择运行年份" v-model="queryParam.year"></j-year-date>
|
||||||
|
</a-form-item>
|
||||||
|
</a-col>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<a-col :xl="6" :lg="7" :md="8" :sm="24">
|
||||||
|
<span class="table-page-search-submitButtons">
|
||||||
|
<a-button type="primary" icon="search" @click="searchQuery">查询</a-button>
|
||||||
|
<a-button icon="reload" @click="searchReset">重置</a-button>
|
||||||
|
</span>
|
||||||
|
</a-col>
|
||||||
|
</a-row>
|
||||||
|
</a-form>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- 操作按钮区域-->
|
||||||
|
<div class="table-operator">
|
||||||
|
<a-button type="primary" icon="plus" @click="handleAdd">新增</a-button>
|
||||||
|
</div>
|
||||||
|
<!-- 操作按钮区域-end-->
|
||||||
|
|
||||||
|
<!-- 表格区域-->
|
||||||
|
<div>
|
||||||
|
<a-table
|
||||||
|
ref="table"
|
||||||
|
size="middle"
|
||||||
|
bordered
|
||||||
|
rowKey="id"
|
||||||
|
:columns="columns"
|
||||||
|
:dataSource="dataSource"
|
||||||
|
:pagination="ipagination"
|
||||||
|
:loading="loading"
|
||||||
|
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange, type: 'radio'}"
|
||||||
|
@change="handleTableChange"
|
||||||
|
class="j-table-force-nowrap">
|
||||||
|
<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;"/>
|
||||||
|
</template>
|
||||||
|
<template slot="fileSlot" slot-scope="text,record">
|
||||||
|
<span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
|
||||||
|
<j-ellipsis @click.native="uploadFile(record.chargeNoticeFileId)" style="color:#219AFF;cursor: pointer"
|
||||||
|
:value="text" :length="20"/>
|
||||||
|
</template>
|
||||||
|
<template slot="text" slot-scope="text">
|
||||||
|
<j-ellipsis :value="text" :length="30"></j-ellipsis>
|
||||||
|
</template>
|
||||||
|
</a-table>
|
||||||
|
</div>
|
||||||
|
<!-- /表格区域-->
|
||||||
|
</j-modal>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { JeroListMixin } from '../../../../mixins/JeroListMixin'
|
||||||
|
import SelectPrincipal from '../../../../components/company/SelectPrincipal'
|
||||||
|
import JYearDate from '../../../../components/jero/JYearDate'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'SelectProjectModule',
|
||||||
|
components: { SelectPrincipal, JYearDate },
|
||||||
|
mixins: [JeroListMixin],
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
title: '操作',
|
||||||
|
width: 1200,
|
||||||
|
visible: false,
|
||||||
|
confirmLoading: false,
|
||||||
|
columns: [],
|
||||||
|
labelCol: {
|
||||||
|
xs: { span: 24 },
|
||||||
|
sm: { span: 5 }
|
||||||
|
},
|
||||||
|
wrapperCol: {
|
||||||
|
xs: { span: 24 },
|
||||||
|
sm: { span: 10 }
|
||||||
|
},
|
||||||
|
projectType: null,
|
||||||
|
url: {
|
||||||
|
list: ''
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
open() {
|
||||||
|
this.visible = true
|
||||||
|
console.log(this.columns)
|
||||||
|
},
|
||||||
|
close() {
|
||||||
|
this.visible = false
|
||||||
|
},
|
||||||
|
handleOk() {
|
||||||
|
|
||||||
|
},
|
||||||
|
handleCancel() {
|
||||||
|
this.close()
|
||||||
|
},
|
||||||
|
handleAdd() {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="less">
|
||||||
|
@import '~@assets/less/common.less';
|
||||||
|
</style>
|
||||||
@@ -7,16 +7,16 @@
|
|||||||
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "Analysis",
|
name: 'Analysis',
|
||||||
components: {},
|
components: {},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
indexStyle: 1
|
indexStyle: 1
|
||||||
};
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
|
|
||||||
},
|
},
|
||||||
methods: {}
|
methods: {}
|
||||||
};
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -192,9 +192,9 @@ export default {
|
|||||||
)
|
)
|
||||||
},
|
},
|
||||||
handleAdd() {
|
handleAdd() {
|
||||||
this.$refs.modalForm.add();
|
this.$refs.modalForm.add()
|
||||||
this.$refs.modalForm.title = "新增群组";
|
this.$refs.modalForm.title = '新增群组'
|
||||||
this.$refs.modalForm.disableSubmit = false;
|
this.$refs.modalForm.disableSubmit = false
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* 新增成员
|
* 新增成员
|
||||||
@@ -202,31 +202,31 @@ export default {
|
|||||||
*/
|
*/
|
||||||
handleAddCommitteeMember(record) {
|
handleAddCommitteeMember(record) {
|
||||||
record.committeeId = record.id
|
record.committeeId = record.id
|
||||||
this.$refs.memberModalForm.add(record);
|
this.$refs.memberModalForm.add(record)
|
||||||
this.$refs.memberModalForm.title = "新增成员";
|
this.$refs.memberModalForm.title = '新增成员'
|
||||||
this.$refs.memberModalForm.disableSubmit = false;
|
this.$refs.memberModalForm.disableSubmit = false
|
||||||
},
|
},
|
||||||
handleDeleteMember(id) {
|
handleDeleteMember(id) {
|
||||||
console.log(id)
|
console.log(id)
|
||||||
if (!this.url.deleteMember) {
|
if (!this.url.deleteMember) {
|
||||||
this.$message.error("请设置url.deleteMember属性!")
|
this.$message.error('请设置url.deleteMember属性!')
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
var that = this;
|
var that = this
|
||||||
this.$confirm({
|
this.$confirm({
|
||||||
title: "确认删除",
|
title: '确认删除',
|
||||||
content: "确定要删除此条数据吗?",
|
content: '确定要删除此条数据吗?',
|
||||||
onOk: function () {
|
onOk: function () {
|
||||||
getAction(that.url.deleteMember, {id: id}).then((res) => {
|
getAction(that.url.deleteMember, {id: id}).then((res) => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
that.$message.success(res.message);
|
that.$message.success(res.message)
|
||||||
that.loadData();
|
that.loadData()
|
||||||
} else {
|
} else {
|
||||||
that.$message.warning(res.message);
|
that.$message.warning(res.message)
|
||||||
}
|
}
|
||||||
});
|
})
|
||||||
}
|
}
|
||||||
});
|
})
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,7 +17,7 @@
|
|||||||
import types from './type'
|
import types from './type'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "Exception",
|
name: 'Exception',
|
||||||
props: {
|
props: {
|
||||||
type: {
|
type: {
|
||||||
type: String,
|
type: String,
|
||||||
|
|||||||
@@ -301,23 +301,23 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import {getUserInfo, getMeetInfoById,getAllWorkProjects} from "@api/inconmeMeetingApi";
|
import {getUserInfo, getMeetInfoById,getAllWorkProjects} from '@api/inconmeMeetingApi'
|
||||||
import {isRepeat} from "@/utils/util";
|
import {isRepeat} from '@/utils/util'
|
||||||
import {httpAction} from "@api/manage";
|
import {httpAction} from '@api/manage'
|
||||||
import JDictSelectTag from "@comp/dict/JDictSelectTag";
|
import JDictSelectTag from '@comp/dict/JDictSelectTag'
|
||||||
import JYearDate from "@comp/jero/JYearDate";
|
import JYearDate from '@comp/jero/JYearDate'
|
||||||
import JUpload from "@comp/jero/JUpload";
|
import JUpload from '@comp/jero/JUpload'
|
||||||
// import JDate from "@comp/tools/JDate";
|
// import JDate from "@comp/tools/JDate";
|
||||||
import JDate from "@comp/jero/JDate";
|
import JDate from '@comp/jero/JDate'
|
||||||
import SelectPrincipal from "@comp/company/SelectPrincipal";
|
import SelectPrincipal from '@comp/company/SelectPrincipal'
|
||||||
import JAreaLinkage from "@comp/jero/JAreaLinkagePca";
|
import JAreaLinkage from '@comp/jero/JAreaLinkagePca'
|
||||||
import AreaPca from "@comp/_util/AreaPca";
|
import AreaPca from '@comp/_util/AreaPca'
|
||||||
import moment from 'moment'
|
import moment from 'moment'
|
||||||
import pick from "lodash.pick";
|
import pick from 'lodash.pick'
|
||||||
import meetingValidate from "@views/incomePayments/meetManage/meetingValidate";
|
import meetingValidate from '@views/incomePayments/meetManage/meetingValidate'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "AddOrDetailMeet",
|
name: 'AddOrDetailMeet',
|
||||||
components: {
|
components: {
|
||||||
JDictSelectTag,
|
JDictSelectTag,
|
||||||
JYearDate,
|
JYearDate,
|
||||||
@@ -353,7 +353,7 @@ export default {
|
|||||||
// 详细地址
|
// 详细地址
|
||||||
address: '',
|
address: '',
|
||||||
// 会议类型 新增时默认为其他会议
|
// 会议类型 新增时默认为其他会议
|
||||||
meetingType: "4",
|
meetingType: '4',
|
||||||
validatorRules: meetingValidate,
|
validatorRules: meetingValidate,
|
||||||
validateInviteCode: {
|
validateInviteCode: {
|
||||||
invitationCode: {
|
invitationCode: {
|
||||||
@@ -364,8 +364,8 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
url: {
|
url: {
|
||||||
add: "/meeting/payMeeting/add",
|
add: '/meeting/payMeeting/add',
|
||||||
edit: "/meeting/payMeeting/edit",
|
edit: '/meeting/payMeeting/edit',
|
||||||
},
|
},
|
||||||
// 召开时间
|
// 召开时间
|
||||||
newConvokeTime: '',
|
newConvokeTime: '',
|
||||||
@@ -376,7 +376,7 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.pcaData = new AreaPca();
|
this.pcaData = new AreaPca()
|
||||||
// 编辑获取会议信息
|
// 编辑获取会议信息
|
||||||
if (this.$route.query.id) {
|
if (this.$route.query.id) {
|
||||||
getMeetInfoById({id: this.$route.query.id}).then(res => {
|
getMeetInfoById({id: this.$route.query.id}).then(res => {
|
||||||
|
|||||||
@@ -109,19 +109,19 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import {JeroListMixin} from "@/mixins/JeroListMixin";
|
import {JeroListMixin} from '@/mixins/JeroListMixin'
|
||||||
import {mixinDevice} from "@/utils/mixin";
|
import {mixinDevice} from '@/utils/mixin'
|
||||||
import JYearDate from "@comp/jero/JYearDate";
|
import JYearDate from '@comp/jero/JYearDate'
|
||||||
import JDictSelectTag from "@comp/dict/JDictSelectTag";
|
import JDictSelectTag from '@comp/dict/JDictSelectTag'
|
||||||
import ImportParticipantModal from "@views/incomePayments/meetManage/modules/ImportParticipantModal";
|
import ImportParticipantModal from '@views/incomePayments/meetManage/modules/ImportParticipantModal'
|
||||||
import BatchInvocieModal from "@views/incomePayments/meetManage/modules/BatchInvocieModal";
|
import BatchInvocieModal from '@views/incomePayments/meetManage/modules/BatchInvocieModal'
|
||||||
import BatchSetDockerModal from "@views/incomePayments/meetManage/modules/BatchSetDockerModal";
|
import BatchSetDockerModal from '@views/incomePayments/meetManage/modules/BatchSetDockerModal'
|
||||||
import ProjectDetailModal from "@comp/ProjectDetailModal";
|
import ProjectDetailModal from '@comp/ProjectDetailModal'
|
||||||
import AuditModal from "@views/incomePayments/meetManage/modules/AuditModal";
|
import AuditModal from '@views/incomePayments/meetManage/modules/AuditModal'
|
||||||
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "Attendance",
|
name: 'Attendance',
|
||||||
mixins: [JeroListMixin, mixinDevice],
|
mixins: [JeroListMixin, mixinDevice],
|
||||||
components: {
|
components: {
|
||||||
JYearDate,
|
JYearDate,
|
||||||
@@ -141,84 +141,84 @@ export default {
|
|||||||
dataIndex: '',
|
dataIndex: '',
|
||||||
key: 'rowIndex',
|
key: 'rowIndex',
|
||||||
width: 60,
|
width: 60,
|
||||||
align: "center",
|
align: 'center',
|
||||||
customRender: function (t, r, index) {
|
customRender: function (t, r, index) {
|
||||||
return parseInt(index) + 1;
|
return parseInt(index) + 1
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '参会单位',
|
title: '参会单位',
|
||||||
align: "center",
|
align: 'center',
|
||||||
dataIndex: '',
|
dataIndex: '',
|
||||||
scopedSlots: {customRender: 'htmlSlot'}
|
scopedSlots: {customRender: 'htmlSlot'}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '参会人员',
|
title: '参会人员',
|
||||||
align: "center",
|
align: 'center',
|
||||||
dataIndex: '',
|
dataIndex: '',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '应收金额',
|
title: '应收金额',
|
||||||
align: "center",
|
align: 'center',
|
||||||
dataIndex: ''
|
dataIndex: ''
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '实收金额',
|
title: '实收金额',
|
||||||
align: "center",
|
align: 'center',
|
||||||
dataIndex: ''
|
dataIndex: ''
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '缴费方式',
|
title: '缴费方式',
|
||||||
align: "center",
|
align: 'center',
|
||||||
dataIndex: ''
|
dataIndex: ''
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '是否签到',
|
title: '是否签到',
|
||||||
align: "center",
|
align: 'center',
|
||||||
dataIndex: ''
|
dataIndex: ''
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '打包',
|
title: '打包',
|
||||||
align: "center",
|
align: 'center',
|
||||||
dataIndex: ''
|
dataIndex: ''
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '需要发票',
|
title: '需要发票',
|
||||||
align: "center",
|
align: 'center',
|
||||||
dataIndex: ''
|
dataIndex: ''
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '到账',
|
title: '到账',
|
||||||
align: "center",
|
align: 'center',
|
||||||
dataIndex: ''
|
dataIndex: ''
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '开票',
|
title: '开票',
|
||||||
align: "center",
|
align: 'center',
|
||||||
dataIndex: ''
|
dataIndex: ''
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '邮寄',
|
title: '邮寄',
|
||||||
align: "center",
|
align: 'center',
|
||||||
dataIndex: ''
|
dataIndex: ''
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '对接人',
|
title: '对接人',
|
||||||
align: "center",
|
align: 'center',
|
||||||
dataIndex: ''
|
dataIndex: ''
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '操作',
|
title: '操作',
|
||||||
align: "center",
|
align: 'center',
|
||||||
scopedSlots: {customRender: 'action'}
|
scopedSlots: {customRender: 'action'}
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
url: {
|
url: {
|
||||||
list: "/jero/memberProject/page",
|
list: '/jero/memberProject/page',
|
||||||
delete: "/jero/memberProject/delete",
|
delete: '/jero/memberProject/delete',
|
||||||
deleteBatch: "/jero/memberProject/deleteBatch",
|
deleteBatch: '/jero/memberProject/deleteBatch',
|
||||||
exportXlsUrl: "/jero/memberProject/exportXls",
|
exportXlsUrl: '/jero/memberProject/exportXls',
|
||||||
importExcelUrl: "jero/memberProject/importExcel",
|
importExcelUrl: 'jero/memberProject/importExcel',
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -259,7 +259,7 @@ export default {
|
|||||||
// 打开模态框
|
// 打开模态框
|
||||||
this.$refs.batchInvoiceModal.open()
|
this.$refs.batchInvoiceModal.open()
|
||||||
}else {
|
}else {
|
||||||
let initName = this.selectionRows[0].name;
|
let initName = this.selectionRows[0].name
|
||||||
// 单位判重
|
// 单位判重
|
||||||
let flag = this.selectionRows.some(item => {
|
let flag = this.selectionRows.some(item => {
|
||||||
return item.name !== initName
|
return item.name !== initName
|
||||||
|
|||||||
@@ -98,14 +98,14 @@
|
|||||||
<script>
|
<script>
|
||||||
import {mixinDevice} from '@/utils/mixin'
|
import {mixinDevice} from '@/utils/mixin'
|
||||||
import {JeroListMixin} from '@/mixins/JeroListMixin'
|
import {JeroListMixin} from '@/mixins/JeroListMixin'
|
||||||
import JYearDate from "@comp/jero/JYearDate";
|
import JYearDate from '@comp/jero/JYearDate'
|
||||||
import UploadMeetFileModal from "@views/incomePayments/meetManage/modules/UploadMeetFileModal";
|
import UploadMeetFileModal from '@views/incomePayments/meetManage/modules/UploadMeetFileModal'
|
||||||
import PageHeaderTitle from "@comp/layouts/PageHeaderTitle";
|
import PageHeaderTitle from '@comp/layouts/PageHeaderTitle'
|
||||||
import IconImg from '@/assets/imgs/icon/icon_company_management.png'
|
import IconImg from '@/assets/imgs/icon/icon_company_management.png'
|
||||||
import "@/assets/less/TableExpand.less";
|
import '@/assets/less/TableExpand.less'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "MeetManageList",
|
name: 'MeetManageList',
|
||||||
mixins: [JeroListMixin, mixinDevice],
|
mixins: [JeroListMixin, mixinDevice],
|
||||||
components: {
|
components: {
|
||||||
JYearDate,
|
JYearDate,
|
||||||
@@ -122,33 +122,33 @@ export default {
|
|||||||
dataIndex: '',
|
dataIndex: '',
|
||||||
key: 'rowIndex',
|
key: 'rowIndex',
|
||||||
width: 60,
|
width: 60,
|
||||||
align: "center",
|
align: 'center',
|
||||||
customRender: function (t, r, index) {
|
customRender: function (t, r, index) {
|
||||||
return parseInt(index) + 1;
|
return parseInt(index) + 1
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '会议名称',
|
title: '会议名称',
|
||||||
align: "center",
|
align: 'center',
|
||||||
dataIndex: 'meetingName',
|
dataIndex: 'meetingName',
|
||||||
scopedSlots: {customRender: 'htmlSlot'},
|
scopedSlots: {customRender: 'htmlSlot'},
|
||||||
width: 160,
|
width: 160,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '会议类型',
|
title: '会议类型',
|
||||||
align: "center",
|
align: 'center',
|
||||||
dataIndex: 'meetingType_dictText',
|
dataIndex: 'meetingType_dictText',
|
||||||
width: 100,
|
width: 100,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '负责人',
|
title: '负责人',
|
||||||
align: "center",
|
align: 'center',
|
||||||
dataIndex: 'directorName',
|
dataIndex: 'directorName',
|
||||||
width: 160,
|
width: 160,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '召开时间',
|
title: '召开时间',
|
||||||
align: "center",
|
align: 'center',
|
||||||
dataIndex: 'startTime',
|
dataIndex: 'startTime',
|
||||||
width: 160,
|
width: 160,
|
||||||
customRender:function (text,record) {
|
customRender:function (text,record) {
|
||||||
@@ -157,7 +157,7 @@ export default {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '召开地点',
|
title: '召开地点',
|
||||||
align: "center",
|
align: 'center',
|
||||||
dataIndex: 'venue',
|
dataIndex: 'venue',
|
||||||
width: 160,
|
width: 160,
|
||||||
customRender:function (text,record){
|
customRender:function (text,record){
|
||||||
@@ -166,35 +166,35 @@ export default {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '年份',
|
title: '年份',
|
||||||
align: "center",
|
align: 'center',
|
||||||
dataIndex: 'particularYear',
|
dataIndex: 'particularYear',
|
||||||
width: 100,
|
width: 100,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '创建时间',
|
title: '创建时间',
|
||||||
align: "center",
|
align: 'center',
|
||||||
dataIndex: 'createTime',
|
dataIndex: 'createTime',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '操作',
|
title: '操作',
|
||||||
align: "center",
|
align: 'center',
|
||||||
fixed:'right',
|
fixed:'right',
|
||||||
width: 160,
|
width: 160,
|
||||||
scopedSlots: {customRender: 'action'}
|
scopedSlots: {customRender: 'action'}
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
url: {
|
url: {
|
||||||
list: "/meeting/payMeeting/page",
|
list: '/meeting/payMeeting/page',
|
||||||
delete: "/meeting/payMeeting/delete",
|
delete: '/meeting/payMeeting/delete',
|
||||||
deleteBatch: "/meeting/payMeeting/deleteBatch",
|
deleteBatch: '/meeting/payMeeting/deleteBatch',
|
||||||
exportXlsUrl: "/meeting/payMeeting/exportXls",
|
exportXlsUrl: '/meeting/payMeeting/exportXls',
|
||||||
importExcelUrl: "meeting/payMeeting/importExcel",
|
importExcelUrl: 'meeting/payMeeting/importExcel',
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
importExcelUrl: function () {
|
importExcelUrl: function () {
|
||||||
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
|
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
@@ -238,7 +238,7 @@ export default {
|
|||||||
* */
|
* */
|
||||||
toAttendance(record){
|
toAttendance(record){
|
||||||
this.$router.push({
|
this.$router.push({
|
||||||
path:"/incomePayments/meetManage/Attendance",
|
path:'/incomePayments/meetManage/Attendance',
|
||||||
query:{
|
query:{
|
||||||
id:record.id
|
id:record.id
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -309,15 +309,15 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import CompanySelect from "@comp/company/CompanySelect";
|
import CompanySelect from '@comp/company/CompanySelect'
|
||||||
import SelectContacts from "@comp/company/SelectContacts";
|
import SelectContacts from '@comp/company/SelectContacts'
|
||||||
import JDate from "@comp/jero/JDate";
|
import JDate from '@comp/jero/JDate'
|
||||||
import JImageUpload from "@comp/jero/JImageUpload";
|
import JImageUpload from '@comp/jero/JImageUpload'
|
||||||
import JDictSelectTag from "@comp/dict/JDictSelectTag";
|
import JDictSelectTag from '@comp/dict/JDictSelectTag'
|
||||||
import JUpload from "@comp/jero/JUpload";
|
import JUpload from '@comp/jero/JUpload'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "SignUpInfoEdit",
|
name: 'SignUpInfoEdit',
|
||||||
components:{
|
components:{
|
||||||
CompanySelect,
|
CompanySelect,
|
||||||
SelectContacts,
|
SelectContacts,
|
||||||
@@ -360,7 +360,7 @@ export default {
|
|||||||
* 保存
|
* 保存
|
||||||
* */
|
* */
|
||||||
nextStep(){
|
nextStep(){
|
||||||
console.log("保存")
|
console.log('保存')
|
||||||
},
|
},
|
||||||
/*
|
/*
|
||||||
* 确定
|
* 确定
|
||||||
|
|||||||
@@ -94,12 +94,12 @@
|
|||||||
<script>
|
<script>
|
||||||
import {mixinDevice} from '@/utils/mixin'
|
import {mixinDevice} from '@/utils/mixin'
|
||||||
import {JeroListMixin} from '@/mixins/JeroListMixin'
|
import {JeroListMixin} from '@/mixins/JeroListMixin'
|
||||||
import JDictSelectTag from "@comp/dict/JDictSelectTag";
|
import JDictSelectTag from '@comp/dict/JDictSelectTag'
|
||||||
import PageHeaderTitle from "@comp/layouts/PageHeaderTitle";
|
import PageHeaderTitle from '@comp/layouts/PageHeaderTitle'
|
||||||
import IconImg from '@/assets/imgs/icon/icon_company_management.png'
|
import IconImg from '@/assets/imgs/icon/icon_company_management.png'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "SignUpInfoList",
|
name: 'SignUpInfoList',
|
||||||
mixins: [JeroListMixin, mixinDevice],
|
mixins: [JeroListMixin, mixinDevice],
|
||||||
components: {
|
components: {
|
||||||
JDictSelectTag,
|
JDictSelectTag,
|
||||||
@@ -107,7 +107,7 @@ export default {
|
|||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
descripion: "报名信息页面",
|
descripion: '报名信息页面',
|
||||||
IconImg,
|
IconImg,
|
||||||
columns: [
|
columns: [
|
||||||
{
|
{
|
||||||
@@ -115,44 +115,44 @@ export default {
|
|||||||
dataIndex: '',
|
dataIndex: '',
|
||||||
key: 'rowIndex',
|
key: 'rowIndex',
|
||||||
width: 60,
|
width: 60,
|
||||||
align: "center",
|
align: 'center',
|
||||||
customRender: function (t, r, index) {
|
customRender: function (t, r, index) {
|
||||||
return parseInt(index) + 1;
|
return parseInt(index) + 1
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '企业名称',
|
title: '企业名称',
|
||||||
align: "center",
|
align: 'center',
|
||||||
dataIndex: '',
|
dataIndex: '',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '姓名',
|
title: '姓名',
|
||||||
align: "center",
|
align: 'center',
|
||||||
dataIndex: '',
|
dataIndex: '',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '身份',
|
title: '身份',
|
||||||
align: "center",
|
align: 'center',
|
||||||
dataIndex: '',
|
dataIndex: '',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '手机号',
|
title: '手机号',
|
||||||
align: "center",
|
align: 'center',
|
||||||
dataIndex: '',
|
dataIndex: '',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '职务',
|
title: '职务',
|
||||||
align: "center",
|
align: 'center',
|
||||||
dataIndex: '',
|
dataIndex: '',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '邮箱',
|
title: '邮箱',
|
||||||
align: "center",
|
align: 'center',
|
||||||
dataIndex: '',
|
dataIndex: '',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '操作',
|
title: '操作',
|
||||||
align: "center",
|
align: 'center',
|
||||||
dataIndex: '',
|
dataIndex: '',
|
||||||
scopedSlots: {customRender: 'action'}
|
scopedSlots: {customRender: 'action'}
|
||||||
},
|
},
|
||||||
@@ -166,11 +166,11 @@ export default {
|
|||||||
sm: {span: 18}
|
sm: {span: 18}
|
||||||
},
|
},
|
||||||
url: {
|
url: {
|
||||||
list: "/jero/memberProject/page",
|
list: '/jero/memberProject/page',
|
||||||
delete: "/jero/memberProject/delete",
|
delete: '/jero/memberProject/delete',
|
||||||
deleteBatch: "/jero/memberProject/deleteBatch",
|
deleteBatch: '/jero/memberProject/deleteBatch',
|
||||||
exportXlsUrl: "/jero/memberProject/exportXls",
|
exportXlsUrl: '/jero/memberProject/exportXls',
|
||||||
importExcelUrl: "jero/memberProject/importExcel",
|
importExcelUrl: 'jero/memberProject/importExcel',
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -90,10 +90,10 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import JImageUpload from "@comp/jero/JImageUpload";
|
import JImageUpload from '@comp/jero/JImageUpload'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "AuditModal",
|
name: 'AuditModal',
|
||||||
components: {
|
components: {
|
||||||
JImageUpload
|
JImageUpload
|
||||||
},
|
},
|
||||||
@@ -136,8 +136,8 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
url: {
|
url: {
|
||||||
add: "/jero/memberProject/add",
|
add: '/jero/memberProject/add',
|
||||||
edit: "/jero/memberProject/edit",
|
edit: '/jero/memberProject/edit',
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -62,10 +62,10 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import SelectContacts from "@comp/company/SelectContacts";
|
import SelectContacts from '@comp/company/SelectContacts'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "BatchInvocieModal",
|
name: 'BatchInvocieModal',
|
||||||
components:{
|
components:{
|
||||||
SelectContacts
|
SelectContacts
|
||||||
},
|
},
|
||||||
@@ -101,8 +101,8 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
url: {
|
url: {
|
||||||
add: "/jero/memberProject/add",
|
add: '/jero/memberProject/add',
|
||||||
edit: "/jero/memberProject/edit",
|
edit: '/jero/memberProject/edit',
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -27,9 +27,9 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import SelectPrincipal from "@comp/company/SelectPrincipal";
|
import SelectPrincipal from '@comp/company/SelectPrincipal'
|
||||||
export default {
|
export default {
|
||||||
name: "BatchSetDockerModal",
|
name: 'BatchSetDockerModal',
|
||||||
components:{
|
components:{
|
||||||
SelectPrincipal
|
SelectPrincipal
|
||||||
},
|
},
|
||||||
@@ -63,8 +63,8 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
url: {
|
url: {
|
||||||
add: "/jero/memberProject/add",
|
add: '/jero/memberProject/add',
|
||||||
edit: "/jero/memberProject/edit",
|
edit: '/jero/memberProject/edit',
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -66,16 +66,16 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import {JeroListMixin} from "@/mixins/JeroListMixin";
|
import {JeroListMixin} from '@/mixins/JeroListMixin'
|
||||||
import {mixinDevice} from "@/utils/mixin";
|
import {mixinDevice} from '@/utils/mixin'
|
||||||
import {postAction} from "@api/manage";
|
import {postAction} from '@api/manage'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "ImportParticipantModal",
|
name: 'ImportParticipantModal',
|
||||||
mixins: [JeroListMixin, mixinDevice],
|
mixins: [JeroListMixin, mixinDevice],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
description: "导入参会人模态框",
|
description: '导入参会人模态框',
|
||||||
disableMixinCreated: true,
|
disableMixinCreated: true,
|
||||||
title: '操作',
|
title: '操作',
|
||||||
width: 1000,
|
width: 1000,
|
||||||
@@ -88,45 +88,45 @@ export default {
|
|||||||
dataIndex: '',
|
dataIndex: '',
|
||||||
key: 'rowIndex',
|
key: 'rowIndex',
|
||||||
width: 60,
|
width: 60,
|
||||||
align: "center",
|
align: 'center',
|
||||||
customRender: function (t, r, index) {
|
customRender: function (t, r, index) {
|
||||||
return parseInt(index) + 1;
|
return parseInt(index) + 1
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '企业名称',
|
title: '企业名称',
|
||||||
align: "center",
|
align: 'center',
|
||||||
dataIndex: '',
|
dataIndex: '',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '姓名',
|
title: '姓名',
|
||||||
align: "center",
|
align: 'center',
|
||||||
dataIndex: '',
|
dataIndex: '',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '身份',
|
title: '身份',
|
||||||
align: "center",
|
align: 'center',
|
||||||
dataIndex: '',
|
dataIndex: '',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '手机号',
|
title: '手机号',
|
||||||
align: "center",
|
align: 'center',
|
||||||
dataIndex: '',
|
dataIndex: '',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '职务',
|
title: '职务',
|
||||||
align: "center",
|
align: 'center',
|
||||||
dataIndex: '',
|
dataIndex: '',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '邮箱',
|
title: '邮箱',
|
||||||
align: "center",
|
align: 'center',
|
||||||
dataIndex: '',
|
dataIndex: '',
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
model: {},
|
model: {},
|
||||||
url: {
|
url: {
|
||||||
list: "/jero/memberProject/page",
|
list: '/jero/memberProject/page',
|
||||||
add: ''
|
add: ''
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -141,7 +141,7 @@ export default {
|
|||||||
}
|
}
|
||||||
if (this.selectionRows.length === 0) {
|
if (this.selectionRows.length === 0) {
|
||||||
this.$message.warn('请选择一条记录')
|
this.$message.warn('请选择一条记录')
|
||||||
return;
|
return
|
||||||
}
|
}
|
||||||
if (this.selectionRows.length > 0) {
|
if (this.selectionRows.length > 0) {
|
||||||
this.flag = true
|
this.flag = true
|
||||||
|
|||||||
@@ -82,14 +82,14 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import pick from "lodash.pick";
|
import pick from 'lodash.pick'
|
||||||
import {httpAction} from "@api/manage";
|
import {httpAction} from '@api/manage'
|
||||||
import JYearDate from "@comp/jero/JYearDate";
|
import JYearDate from '@comp/jero/JYearDate'
|
||||||
import JUpload from "@comp/jero/JUpload";
|
import JUpload from '@comp/jero/JUpload'
|
||||||
import SelectPrincipal from "@comp/company/SelectPrincipal";
|
import SelectPrincipal from '@comp/company/SelectPrincipal'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "MeetModal",
|
name: 'MeetModal',
|
||||||
components: {
|
components: {
|
||||||
JYearDate,
|
JYearDate,
|
||||||
JUpload,
|
JUpload,
|
||||||
@@ -136,8 +136,8 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
url: {
|
url: {
|
||||||
add: "/jero/memberProject/add",
|
add: '/jero/memberProject/add',
|
||||||
edit: "/jero/memberProject/edit",
|
edit: '/jero/memberProject/edit',
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -25,11 +25,11 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import {httpAction} from "@api/manage";
|
import {httpAction} from '@api/manage'
|
||||||
import JUpload from "@comp/jero/JUpload";
|
import JUpload from '@comp/jero/JUpload'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "UploadMeetFileModal",
|
name: 'UploadMeetFileModal',
|
||||||
components:{
|
components:{
|
||||||
JUpload
|
JUpload
|
||||||
},
|
},
|
||||||
@@ -56,8 +56,8 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
url: {
|
url: {
|
||||||
add: "/jero/memberProject/add",
|
add: '/jero/memberProject/add',
|
||||||
edit: "/jero/memberProject/edit",
|
edit: '/jero/memberProject/edit',
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -78,14 +78,14 @@
|
|||||||
<script>
|
<script>
|
||||||
import {mixinDevice} from '@/utils/mixin'
|
import {mixinDevice} from '@/utils/mixin'
|
||||||
import {JeroListMixin} from '@/mixins/JeroListMixin'
|
import {JeroListMixin} from '@/mixins/JeroListMixin'
|
||||||
import JYearDate from "@comp/jero/JYearDate";
|
import JYearDate from '@comp/jero/JYearDate'
|
||||||
import MemberProjectModal from "@views/incomePayments/memberManage/modules/MemberProjectModal";
|
import MemberProjectModal from '@views/incomePayments/memberManage/modules/MemberProjectModal'
|
||||||
import PageHeaderTitle from "@comp/layouts/PageHeaderTitle";
|
import PageHeaderTitle from '@comp/layouts/PageHeaderTitle'
|
||||||
import IconImg from '@/assets/imgs/icon/icon_company_management.png'
|
import IconImg from '@/assets/imgs/icon/icon_company_management.png'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
mixins: [JeroListMixin, mixinDevice],
|
mixins: [JeroListMixin, mixinDevice],
|
||||||
name: "MemberProjectList",
|
name: 'MemberProjectList',
|
||||||
components: {
|
components: {
|
||||||
JYearDate,
|
JYearDate,
|
||||||
MemberProjectModal,
|
MemberProjectModal,
|
||||||
@@ -101,46 +101,46 @@ export default {
|
|||||||
dataIndex: '',
|
dataIndex: '',
|
||||||
key: 'rowIndex',
|
key: 'rowIndex',
|
||||||
width: 60,
|
width: 60,
|
||||||
align: "center",
|
align: 'center',
|
||||||
customRender: function (t, r, index) {
|
customRender: function (t, r, index) {
|
||||||
return parseInt(index) + 1;
|
return parseInt(index) + 1
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '会员项目',
|
title: '会员项目',
|
||||||
align: "center",
|
align: 'center',
|
||||||
dataIndex: 'projectName',
|
dataIndex: 'projectName',
|
||||||
scopedSlots: {customRender: 'htmlSlot'}
|
scopedSlots: {customRender: 'htmlSlot'}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '收费标准',
|
title: '收费标准',
|
||||||
align: "center",
|
align: 'center',
|
||||||
dataIndex: 'chargeStandard',
|
dataIndex: 'chargeStandard',
|
||||||
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '负责人',
|
title: '负责人',
|
||||||
align: "center",
|
align: 'center',
|
||||||
dataIndex: 'directorName'
|
dataIndex: 'directorName'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '操作',
|
title: '操作',
|
||||||
align: "center",
|
align: 'center',
|
||||||
scopedSlots: {customRender: 'action'}
|
scopedSlots: {customRender: 'action'}
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
url: {
|
url: {
|
||||||
list: "/jero/memberProject/page",
|
list: '/jero/memberProject/page',
|
||||||
delete: "/jero/memberProject/delete",
|
delete: '/jero/memberProject/delete',
|
||||||
deleteBatch: "/jero/memberProject/deleteBatch",
|
deleteBatch: '/jero/memberProject/deleteBatch',
|
||||||
exportXlsUrl: "/jero/memberProject/exportXls",
|
exportXlsUrl: '/jero/memberProject/exportXls',
|
||||||
importExcelUrl: "jero/memberProject/importExcel",
|
importExcelUrl: 'jero/memberProject/importExcel',
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
importExcelUrl: function () {
|
importExcelUrl: function () {
|
||||||
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
|
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|||||||
@@ -116,18 +116,18 @@
|
|||||||
<script>
|
<script>
|
||||||
import {mixinDevice} from '@/utils/mixin'
|
import {mixinDevice} from '@/utils/mixin'
|
||||||
import {JeroListMixin} from '@/mixins/JeroListMixin'
|
import {JeroListMixin} from '@/mixins/JeroListMixin'
|
||||||
import JYearDate from "@comp/jero/JYearDate";
|
import JYearDate from '@comp/jero/JYearDate'
|
||||||
import SafeguardMemberModal from "@views/incomePayments/memberManage/modules/SafeguardMemberModal";
|
import SafeguardMemberModal from '@views/incomePayments/memberManage/modules/SafeguardMemberModal'
|
||||||
import ProjectDetailModal from "@comp/ProjectDetailModal";
|
import ProjectDetailModal from '@comp/ProjectDetailModal'
|
||||||
import StatusSlot from "@comp/tools/StatusSlot";
|
import StatusSlot from '@comp/tools/StatusSlot'
|
||||||
import PageHeaderTitle from "@comp/layouts/PageHeaderTitle";
|
import PageHeaderTitle from '@comp/layouts/PageHeaderTitle'
|
||||||
import IconImg from '@/assets/imgs/icon/icon_company_management.png'
|
import IconImg from '@/assets/imgs/icon/icon_company_management.png'
|
||||||
|
|
||||||
import {getAction} from "@api/manage";
|
import {getAction} from '@api/manage'
|
||||||
import {getFileInfo} from "@api/api";
|
import {getFileInfo} from '@api/api'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "SafeguardMemberList",
|
name: 'SafeguardMemberList',
|
||||||
mixins: [JeroListMixin, mixinDevice],
|
mixins: [JeroListMixin, mixinDevice],
|
||||||
components: {
|
components: {
|
||||||
JYearDate,
|
JYearDate,
|
||||||
@@ -146,65 +146,65 @@ export default {
|
|||||||
dataIndex: '',
|
dataIndex: '',
|
||||||
key: 'rowIndex',
|
key: 'rowIndex',
|
||||||
width: 60,
|
width: 60,
|
||||||
align: "center",
|
align: 'center',
|
||||||
customRender: function (t, r, index) {
|
customRender: function (t, r, index) {
|
||||||
return parseInt(index) + 1;
|
return parseInt(index) + 1
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '会员单位',
|
title: '会员单位',
|
||||||
align: "center",
|
align: 'center',
|
||||||
dataIndex: 'companyName',
|
dataIndex: 'companyName',
|
||||||
scopedSlots: {customRender: 'member'}
|
scopedSlots: {customRender: 'member'}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '企业联系人',
|
title: '企业联系人',
|
||||||
align: "center",
|
align: 'center',
|
||||||
dataIndex: 'companyContactName',
|
dataIndex: 'companyContactName',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '应收金额',
|
title: '应收金额',
|
||||||
align: "center",
|
align: 'center',
|
||||||
dataIndex: 'amountReceivable',
|
dataIndex: 'amountReceivable',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '实收金额',
|
title: '实收金额',
|
||||||
align: "center",
|
align: 'center',
|
||||||
dataIndex: 'paidAmount',
|
dataIndex: 'paidAmount',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '打包',
|
title: '打包',
|
||||||
align: "center",
|
align: 'center',
|
||||||
dataIndex: 'pack',
|
dataIndex: 'pack',
|
||||||
scopedSlots: {customRender: 'status-pack'}
|
scopedSlots: {customRender: 'status-pack'}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '需要发票',
|
title: '需要发票',
|
||||||
align: "center",
|
align: 'center',
|
||||||
dataIndex: 'needInvoice',
|
dataIndex: 'needInvoice',
|
||||||
scopedSlots: {customRender: 'status-pack'}
|
scopedSlots: {customRender: 'status-pack'}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '到账',
|
title: '到账',
|
||||||
align: "center",
|
align: 'center',
|
||||||
dataIndex: 'inAccount',
|
dataIndex: 'inAccount',
|
||||||
scopedSlots: {customRender: 'status'}
|
scopedSlots: {customRender: 'status'}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '开票',
|
title: '开票',
|
||||||
align: "center",
|
align: 'center',
|
||||||
dataIndex: 'makeInvoice',
|
dataIndex: 'makeInvoice',
|
||||||
scopedSlots: {customRender: 'status'}
|
scopedSlots: {customRender: 'status'}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '邮寄',
|
title: '邮寄',
|
||||||
align: "center",
|
align: 'center',
|
||||||
dataIndex: 'mail',
|
dataIndex: 'mail',
|
||||||
scopedSlots: {customRender: 'status'}
|
scopedSlots: {customRender: 'status'}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '操作',
|
title: '操作',
|
||||||
align: "center",
|
align: 'center',
|
||||||
dataIndex: '',
|
dataIndex: '',
|
||||||
scopedSlots: {customRender: 'action'}
|
scopedSlots: {customRender: 'action'}
|
||||||
},
|
},
|
||||||
@@ -213,27 +213,27 @@ export default {
|
|||||||
// 当前项目基本信息
|
// 当前项目基本信息
|
||||||
currentInfo: {},
|
currentInfo: {},
|
||||||
url: {
|
url: {
|
||||||
list: "/jero/memberProjectSubitem/page",
|
list: '/jero/memberProjectSubitem/page',
|
||||||
delete: "/jero/memberProjectSubitem/delete",
|
delete: '/jero/memberProjectSubitem/delete',
|
||||||
deleteBatch: "/jero/memberProjectSubitem/deleteBatch",
|
deleteBatch: '/jero/memberProjectSubitem/deleteBatch',
|
||||||
exportXlsUrl: "/jero/memberProjectSubitem/exportXls",
|
exportXlsUrl: '/jero/memberProjectSubitem/exportXls',
|
||||||
importExcelUrl: "jero/memberProjectSubitem/importExcel",
|
importExcelUrl: 'jero/memberProjectSubitem/importExcel',
|
||||||
downTemplateUrl: "jero/memberProjectSubitem/exportTemplate"
|
downTemplateUrl: 'jero/memberProjectSubitem/exportTemplate'
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
importExcelUrl: function () {
|
importExcelUrl: function () {
|
||||||
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
|
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.currentInfo = Object.assign({}, JSON.parse(this.$route.query.record))
|
this.currentInfo = Object.assign({}, JSON.parse(this.$route.query.record))
|
||||||
console.log("=====", this.currentInfo)
|
console.log('=====', this.currentInfo)
|
||||||
this.$store.commit('SET_CURRENTPROJECT', this.currentInfo)
|
this.$store.commit('SET_CURRENTPROJECT', this.currentInfo)
|
||||||
this.loadData();
|
this.loadData()
|
||||||
//初始化字典配置 在自己页面定义
|
//初始化字典配置 在自己页面定义
|
||||||
this.initDictConfig();
|
this.initDictConfig()
|
||||||
this.getChargeNoFile()
|
this.getChargeNoFile()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
@@ -251,34 +251,34 @@ export default {
|
|||||||
},
|
},
|
||||||
loadData(arg) {
|
loadData(arg) {
|
||||||
if (!this.url.list) {
|
if (!this.url.list) {
|
||||||
this.$message.error("请设置url.list属性!")
|
this.$message.error('请设置url.list属性!')
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
//加载数据 若传入参数1则加载第一页的内容
|
//加载数据 若传入参数1则加载第一页的内容
|
||||||
if (arg === 1) {
|
if (arg === 1) {
|
||||||
this.ipagination.current = 1;
|
this.ipagination.current = 1
|
||||||
}
|
}
|
||||||
// 传入项目id 查寻该项目下的成员
|
// 传入项目id 查寻该项目下的成员
|
||||||
this.filters.projectId = this.currentInfo.id
|
this.filters.projectId = this.currentInfo.id
|
||||||
var params = this.getQueryParams();//查询条件
|
var params = this.getQueryParams()//查询条件
|
||||||
this.loading = true;
|
this.loading = true
|
||||||
getAction(this.url.list, params).then((res) => {
|
getAction(this.url.list, params).then((res) => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
//update-begin---author:zhangyafei Date:20201118 for:适配不分页的数据列表------------
|
//update-begin---author:zhangyafei Date:20201118 for:适配不分页的数据列表------------
|
||||||
this.dataSource = res.result.records || res.result;
|
this.dataSource = res.result.records || res.result
|
||||||
if (res.result.total) {
|
if (res.result.total) {
|
||||||
this.ipagination.total = res.result.total;
|
this.ipagination.total = res.result.total
|
||||||
//清空列表选中
|
//清空列表选中
|
||||||
this.onClearSelected()
|
this.onClearSelected()
|
||||||
} else {
|
} else {
|
||||||
this.ipagination.total = 0;
|
this.ipagination.total = 0
|
||||||
}
|
}
|
||||||
//update-end---author:zhangyafei Date:20201118 for:适配不分页的数据列表------------
|
//update-end---author:zhangyafei Date:20201118 for:适配不分页的数据列表------------
|
||||||
}
|
}
|
||||||
if (res.code === 510) {
|
if (res.code === 510) {
|
||||||
this.$message.warning(res.message)
|
this.$message.warning(res.message)
|
||||||
}
|
}
|
||||||
this.loading = false;
|
this.loading = false
|
||||||
}).finally(() => {
|
}).finally(() => {
|
||||||
this.loading = false
|
this.loading = false
|
||||||
})
|
})
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user