eslint; 收入合同
This commit is contained in:
+2
-2
@@ -1,3 +1,3 @@
|
||||
module.exports = {
|
||||
presets: ["@vue/cli-plugin-babel/preset"],
|
||||
};
|
||||
presets: ['@vue/cli-plugin-babel/preset'],
|
||||
}
|
||||
|
||||
+12
-12
@@ -6,35 +6,35 @@
|
||||
</a-config-provider>
|
||||
</template>
|
||||
<script>
|
||||
import zhCN from "ant-design-vue/lib/locale-provider/zh_CN";
|
||||
import enquireScreen from "@/utils/device";
|
||||
import zhCN from 'ant-design-vue/lib/locale-provider/zh_CN'
|
||||
import enquireScreen from '@/utils/device'
|
||||
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
locale: zhCN
|
||||
};
|
||||
}
|
||||
},
|
||||
created() {
|
||||
let that = this;
|
||||
let that = this
|
||||
enquireScreen(deviceType => {
|
||||
// tablet
|
||||
if (deviceType === 0) {
|
||||
that.$store.commit("TOGGLE_DEVICE", "mobile");
|
||||
that.$store.dispatch("setSidebar", false);
|
||||
that.$store.commit('TOGGLE_DEVICE', 'mobile')
|
||||
that.$store.dispatch('setSidebar', false)
|
||||
}
|
||||
// mobile
|
||||
else if (deviceType === 1) {
|
||||
that.$store.commit("TOGGLE_DEVICE", "mobile");
|
||||
that.$store.dispatch("setSidebar", false);
|
||||
that.$store.commit('TOGGLE_DEVICE', 'mobile')
|
||||
that.$store.dispatch('setSidebar', false)
|
||||
} else {
|
||||
that.$store.commit("TOGGLE_DEVICE", "desktop");
|
||||
that.$store.dispatch("setSidebar", true);
|
||||
that.$store.commit('TOGGLE_DEVICE', 'desktop')
|
||||
that.$store.dispatch('setSidebar', true)
|
||||
}
|
||||
|
||||
});
|
||||
})
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style>
|
||||
#app {
|
||||
|
||||
+56
-56
@@ -1,100 +1,100 @@
|
||||
import { getAction, deleteAction, postAction, httpAction } from '@/api/manage'
|
||||
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 editRole = (params)=>postAction("/sys/role/edit",params);
|
||||
const checkRoleCode = (params)=>getAction("/sys/role/checkRoleCode",params);
|
||||
const addRole = (params)=>postAction('/sys/role/add',params)
|
||||
const editRole = (params)=>postAction('/sys/role/edit',params)
|
||||
const checkRoleCode = (params)=>getAction('/sys/role/checkRoleCode',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 editUser = (params)=>postAction("/sys/user/edit",params);
|
||||
const queryUserRole = (params)=>getAction("/sys/user/queryUserRole",params);
|
||||
const getUserList = (params)=>getAction("/sys/user/page",params);
|
||||
const addUser = (params)=>postAction('/sys/user/add',params)
|
||||
const editUser = (params)=>postAction('/sys/user/edit',params)
|
||||
const queryUserRole = (params)=>getAction('/sys/user/queryUserRole',params)
|
||||
const getUserList = (params)=>getAction('/sys/user/page',params)
|
||||
// 获取全部用户列表
|
||||
const getAllUserList = (params) => getAction("/sys/user/list", params);
|
||||
const frozenBatch = (params)=>postAction("/sys/user/frozenBatch",params);
|
||||
const getAllUserList = (params) => getAction('/sys/user/list', 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 addPermission= (params)=>postAction("/sys/permission/add",params);
|
||||
const editPermission= (params)=>postAction("/sys/permission/edit",params);
|
||||
const getPermissionList = (params)=>getAction("/sys/permission/page",params);
|
||||
const getSystemMenuList = (params)=>getAction("/sys/permission/getSystemMenuList",params);
|
||||
const getSystemSubmenu = (params)=>getAction("/sys/permission/getSystemSubmenu",params);
|
||||
const addPermission= (params)=>postAction('/sys/permission/add',params)
|
||||
const editPermission= (params)=>postAction('/sys/permission/edit',params)
|
||||
const getPermissionList = (params)=>getAction('/sys/permission/page',params)
|
||||
const getSystemMenuList = (params)=>getAction('/sys/permission/getSystemMenuList',params)
|
||||
const getSystemSubmenu = (params)=>getAction('/sys/permission/getSystemSubmenu',params)
|
||||
const getSystemSubmenuBatch = (params) => getAction('/sys/permission/getSystemSubmenuBatch', params)
|
||||
const queryTreeList = (params)=>getAction("/sys/permission/queryTreeList",params);
|
||||
const queryTreeListForRole = (params)=>getAction("/sys/role/queryTreeList",params);
|
||||
const queryListAsync = (params)=>getAction("/sys/permission/queryListAsync",params);
|
||||
const queryRolePermission = (params)=>getAction("/sys/permission/queryRolePermission",params);
|
||||
const saveRolePermission = (params)=>postAction("/sys/permission/saveRolePermission",params);
|
||||
const queryPermissionsByUser = ()=>getAction("/sys/permission/getUserPermissionByToken");
|
||||
const loadAllRoleIds = (params)=>getAction("/sys/permission/loadAllRoleIds",params);
|
||||
const getPermissionRuleList = (params)=>getAction("/sys/permission/getPermRuleListByPermId",params);
|
||||
const queryPermissionRule = (params)=>getAction("/sys/permission/queryPermissionRule",params);
|
||||
const queryTreeList = (params)=>getAction('/sys/permission/queryTreeList',params)
|
||||
const queryTreeListForRole = (params)=>getAction('/sys/role/queryTreeList',params)
|
||||
const queryListAsync = (params)=>getAction('/sys/permission/queryListAsync',params)
|
||||
const queryRolePermission = (params)=>getAction('/sys/permission/queryRolePermission',params)
|
||||
const saveRolePermission = (params)=>postAction('/sys/permission/saveRolePermission',params)
|
||||
const queryPermissionsByUser = ()=>getAction('/sys/permission/getUserPermissionByToken')
|
||||
const loadAllRoleIds = (params)=>getAction('/sys/permission/loadAllRoleIds',params)
|
||||
const getPermissionRuleList = (params)=>getAction('/sys/permission/getPermRuleListByPermId',params)
|
||||
const queryPermissionRule = (params)=>getAction('/sys/permission/queryPermissionRule',params)
|
||||
|
||||
// 部门管理
|
||||
const queryDepartTreeList = (params)=>getAction("/sys/sysDepart/queryTreeList",params);
|
||||
const queryIdTree = (params)=>getAction("/sys/sysDepart/queryIdTree",params);
|
||||
const queryParentName = (params)=>getAction("/sys/sysDepart/queryParentName",params);
|
||||
const searchByKeywords = (params)=>getAction("/sys/sysDepart/searchBy",params);
|
||||
const deleteByDepartId = (params)=>deleteAction("/sys/sysDepart/delete",params);
|
||||
const queryDepartTreeList = (params)=>getAction('/sys/sysDepart/queryTreeList',params)
|
||||
const queryIdTree = (params)=>getAction('/sys/sysDepart/queryIdTree',params)
|
||||
const queryParentName = (params)=>getAction('/sys/sysDepart/queryParentName',params)
|
||||
const searchByKeywords = (params)=>getAction('/sys/sysDepart/searchBy',params)
|
||||
const deleteByDepartId = (params)=>deleteAction('/sys/sysDepart/delete',params)
|
||||
|
||||
//二级部门管理
|
||||
const queryDepartPermission = (params)=>getAction("/sys/permission/queryDepartPermission",params);
|
||||
const saveDepartPermission = (params)=>postAction("/sys/permission/saveDepartPermission",params);
|
||||
const queryTreeListForDeptRole = (params)=>getAction("/sys/sysDepartPermission/queryTreeListForDeptRole",params);
|
||||
const queryDeptRolePermission = (params)=>getAction("/sys/sysDepartPermission/queryDeptRolePermission",params);
|
||||
const saveDeptRolePermission = (params)=>postAction("/sys/sysDepartPermission/saveDeptRolePermission",params);
|
||||
const queryMyDepartTreeList = (params)=>getAction("/sys/sysDepart/queryMyDeptTreeList",params);
|
||||
const queryDepartPermission = (params)=>getAction('/sys/permission/queryDepartPermission',params)
|
||||
const saveDepartPermission = (params)=>postAction('/sys/permission/saveDepartPermission',params)
|
||||
const queryTreeListForDeptRole = (params)=>getAction('/sys/sysDepartPermission/queryTreeListForDeptRole',params)
|
||||
const queryDeptRolePermission = (params)=>getAction('/sys/sysDepartPermission/queryDeptRolePermission',params)
|
||||
const saveDeptRolePermission = (params)=>postAction('/sys/sysDepartPermission/saveDeptRolePermission',params)
|
||||
const queryMyDepartTreeList = (params)=>getAction('/sys/sysDepart/queryMyDeptTreeList',params)
|
||||
|
||||
//日志管理
|
||||
//const getLogList = (params)=>getAction("/sys/log/page",params);
|
||||
const deleteLog = (params)=>deleteAction("/sys/log/delete",params);
|
||||
const deleteLogList = (params)=>deleteAction("/sys/log/deleteBatch",params);
|
||||
const deleteLog = (params)=>deleteAction('/sys/log/delete',params)
|
||||
const deleteLogList = (params)=>deleteAction('/sys/log/deleteBatch',params)
|
||||
|
||||
//数据字典
|
||||
const addDict = (params)=>postAction("/sys/dict/add",params);
|
||||
const editDict = (params)=>postAction("/sys/dict/edit",params);
|
||||
const treeList = (params)=>getAction("/sys/dict/treeList",params);
|
||||
const addDictItem = (params)=>postAction("/sys/dictItem/add",params);
|
||||
const editDictItem = (params)=>postAction("/sys/dictItem/edit",params);
|
||||
const addDict = (params)=>postAction('/sys/dict/add',params)
|
||||
const editDict = (params)=>postAction('/sys/dict/edit',params)
|
||||
const treeList = (params)=>getAction('/sys/dict/treeList',params)
|
||||
const addDictItem = (params)=>postAction('/sys/dictItem/add',params)
|
||||
const editDictItem = (params)=>postAction('/sys/dictItem/edit',params)
|
||||
|
||||
//字典标签专用(通过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) {
|
||||
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];
|
||||
return dictItems;
|
||||
let dictItems = Vue.ls.get(UI_CACHE_DB_DICT_DATA)[dictCode]
|
||||
return dictItems
|
||||
}
|
||||
}
|
||||
|
||||
//系统通告
|
||||
const doReleaseData = (params)=>getAction("/sys/annountCement/doReleaseData",params);
|
||||
const doReovkeData = (params)=>getAction("/sys/annountCement/doReovkeData",params);
|
||||
const doReleaseData = (params)=>getAction('/sys/annountCement/doReleaseData',params)
|
||||
const doReovkeData = (params)=>getAction('/sys/annountCement/doReovkeData',params)
|
||||
//获取系统访问量
|
||||
const getLoginfo = (params)=>getAction("/sys/loginfo",params);
|
||||
const getVisitInfo = (params)=>getAction("/sys/visitInfo",params);
|
||||
const getLoginfo = (params)=>getAction('/sys/loginfo',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 getUserNoticeInfo= (params)=>getAction("/sys/sysAnnouncementSend/getMyAnnouncementSend",params);
|
||||
const getUserNoticeInfo= (params)=>getAction('/sys/sysAnnouncementSend/getMyAnnouncementSend',params)
|
||||
const getTransitURL = url => `/sys/common/transitRESTful?url=${encodeURIComponent(url)}`
|
||||
|
||||
// 通过文件的id获取文件的相应信息
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import {getAction} from "@api/manage";
|
||||
import {getAction} from '@api/manage'
|
||||
|
||||
// 通过用户id获取用户信息
|
||||
const getUserInfo = (params) => getAction('/sys/user/queryById',params)
|
||||
|
||||
+3
-3
@@ -169,13 +169,13 @@ export function getFileAccessHttpUrl(avatar,subStr) {
|
||||
if(!subStr) subStr = 'http'
|
||||
try {
|
||||
if(avatar && avatar.startsWith(subStr)){
|
||||
return avatar;
|
||||
return avatar
|
||||
}else{
|
||||
if(avatar && avatar.length>0 && avatar.indexOf('[')==-1){
|
||||
return window._CONFIG['staticDomainURL'] + "/" + avatar;
|
||||
return window._CONFIG['staticDomainURL'] + '/' + avatar
|
||||
}
|
||||
}
|
||||
}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;
|
||||
text-align: left;
|
||||
color: #333333;
|
||||
display: flex;
|
||||
position: relative;
|
||||
|
||||
&-text {
|
||||
@@ -93,5 +94,6 @@
|
||||
width: 10px;
|
||||
height: 10px;
|
||||
background: #069f99;
|
||||
border-radius: 5px;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -104,11 +104,11 @@
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "HelloWorld",
|
||||
name: 'HelloWorld',
|
||||
props: {
|
||||
msg: String,
|
||||
},
|
||||
};
|
||||
}
|
||||
</script>
|
||||
|
||||
<!-- Add "scoped" attribute to limit CSS to this component only -->
|
||||
|
||||
@@ -155,65 +155,65 @@ const logisticsInfoList = [
|
||||
postPerson: '李四',
|
||||
postTime: '2021年10月21',
|
||||
emsOrSF: 'EMS',
|
||||
postNo: "123456"
|
||||
postNo: '123456'
|
||||
}
|
||||
]
|
||||
const columns = [
|
||||
{
|
||||
title: '开票人',
|
||||
align: "center",
|
||||
align: 'center',
|
||||
dataIndex: '',
|
||||
},
|
||||
{
|
||||
title: '日期',
|
||||
align: "center",
|
||||
align: 'center',
|
||||
dataIndex: '',
|
||||
},
|
||||
{
|
||||
title: '金额(元)',
|
||||
align: "center",
|
||||
align: 'center',
|
||||
dataIndex: '',
|
||||
},
|
||||
{
|
||||
title: '票号',
|
||||
align: "center",
|
||||
align: 'center',
|
||||
dataIndex: '',
|
||||
},
|
||||
{
|
||||
title: '项目',
|
||||
align: "center",
|
||||
align: 'center',
|
||||
dataIndex: '',
|
||||
},
|
||||
{
|
||||
title: '邮寄人',
|
||||
align: "center",
|
||||
align: 'center',
|
||||
dataIndex: '',
|
||||
},
|
||||
{
|
||||
title: '快递',
|
||||
align: "center",
|
||||
align: 'center',
|
||||
dataIndex: '',
|
||||
},
|
||||
{
|
||||
title: '快递单号',
|
||||
align: "center",
|
||||
align: 'center',
|
||||
dataIndex: 'piaoNo',
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
align: "center",
|
||||
align: 'center',
|
||||
dataIndex: '',
|
||||
scopedSlots: {customRender: 'action'}
|
||||
},
|
||||
]
|
||||
export default {
|
||||
name: "ProjectDetailModal",
|
||||
name: 'ProjectDetailModal',
|
||||
data() {
|
||||
return {
|
||||
description: "项目详情模态框",
|
||||
description: '项目详情模态框',
|
||||
width: 800,
|
||||
visible: false,
|
||||
title: "项目信息",
|
||||
title: '项目信息',
|
||||
// 当前项目id
|
||||
currentProjectId: '',
|
||||
// 基本信息
|
||||
@@ -256,7 +256,7 @@ export default {
|
||||
* 查看物流
|
||||
* */
|
||||
lookLogistics() {
|
||||
window.open("http://www.api.kuaidi100.com", "_blank")
|
||||
window.open('http://www.api.kuaidi100.com', '_blank')
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -51,7 +51,7 @@
|
||||
<j-ellipsis @click.native="uploadFile(record.chargeNoticeFileId)" style="color:#219AFF;cursor: pointer"
|
||||
:value="text" :length="20"/>
|
||||
</template>
|
||||
<template slot="text" slot-scope="text,record">
|
||||
<template slot="text" slot-scope="text">
|
||||
<j-ellipsis :value="text" :length="30"></j-ellipsis>
|
||||
</template>
|
||||
</a-table>
|
||||
@@ -72,7 +72,7 @@ export default {
|
||||
visible: false,
|
||||
confirmLoading: false,
|
||||
url: {
|
||||
list: '/company/payCompanyManagement/list',
|
||||
list: '/company/payCompanyManagement/list'
|
||||
},
|
||||
selectedCompany: {},
|
||||
selectedRowKeys: [],
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
<contact-management-module ref="contactForm"
|
||||
is-company-disabled
|
||||
:selected-company="selectedCompany"
|
||||
v-on="$listeners">
|
||||
@ok="addContactsOk">
|
||||
</contact-management-module>
|
||||
</div>
|
||||
</template>
|
||||
@@ -59,6 +59,7 @@ export default {
|
||||
return {
|
||||
contactsList: [], // 该企业下联系人列表
|
||||
isFirstOpen: true, // 编辑状态下是否为第一次打开
|
||||
contactId: this.value
|
||||
}
|
||||
},
|
||||
created() {
|
||||
@@ -114,11 +115,16 @@ export default {
|
||||
}
|
||||
this.$message.warn('请先选择来款企业再为该企业新建联系人')
|
||||
},
|
||||
addContactsOk(id) {
|
||||
this.getContactsList()
|
||||
this.$emit('change', id)
|
||||
this.$emit('ok')
|
||||
},
|
||||
// 下拉框的搜索
|
||||
filterOption(input, option) {
|
||||
return (
|
||||
option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
|
||||
);
|
||||
)
|
||||
},
|
||||
handleDropdownOpen() {
|
||||
if (this.isFirstOpen && this.initContacts && this.initContacts.hasOwnProperty('id')) {
|
||||
@@ -143,5 +149,6 @@ export default {
|
||||
.form-btn {
|
||||
padding-top: 1px;
|
||||
padding-left: 8px;
|
||||
margin-bottom: -1px;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -43,7 +43,7 @@ export default {
|
||||
filterOption(input, option) {
|
||||
return (
|
||||
option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
|
||||
);
|
||||
)
|
||||
}
|
||||
},
|
||||
model: {
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
import {ajaxGetDictItems,getDictItemsFromCache} from '@/api/api'
|
||||
|
||||
export default {
|
||||
name: "JDictSelectTag",
|
||||
name: 'JDictSelectTag',
|
||||
props: {
|
||||
dictCode: String,
|
||||
placeholder: String,
|
||||
@@ -37,7 +37,7 @@
|
||||
data() {
|
||||
return {
|
||||
dictOptions: [],
|
||||
tagType:""
|
||||
tagType:''
|
||||
}
|
||||
},
|
||||
watch:{
|
||||
@@ -50,8 +50,8 @@
|
||||
},
|
||||
created() {
|
||||
// console.log(this.dictCode);
|
||||
if(!this.type || this.type==="list"){
|
||||
this.tagType = "select"
|
||||
if(!this.type || this.type==='list'){
|
||||
this.tagType = 'select'
|
||||
}else{
|
||||
this.tagType = this.type
|
||||
}
|
||||
@@ -62,7 +62,7 @@
|
||||
getValueSting(){
|
||||
// update-begin author:wangshuai date:20200601 for: 不显示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的文字 ------
|
||||
},
|
||||
},
|
||||
@@ -70,7 +70,7 @@
|
||||
initDictData() {
|
||||
//优先从缓存中读取字典配置
|
||||
if(getDictItemsFromCache(this.dictCode)){
|
||||
this.dictOptions = getDictItemsFromCache(this.dictCode);
|
||||
this.dictOptions = getDictItemsFromCache(this.dictCode)
|
||||
return
|
||||
}
|
||||
|
||||
@@ -78,22 +78,22 @@
|
||||
ajaxGetDictItems(this.dictCode, null).then((res) => {
|
||||
if (res.success) {
|
||||
// console.log(res.result);
|
||||
this.dictOptions = res.result;
|
||||
this.dictOptions = res.result
|
||||
}
|
||||
})
|
||||
},
|
||||
handleInput(e) {
|
||||
let val;
|
||||
if(this.tagType=="radio"){
|
||||
let val
|
||||
if(this.tagType=='radio'){
|
||||
val = e.target.value
|
||||
}else{
|
||||
val = e
|
||||
}
|
||||
|
||||
if(this.triggerChange){
|
||||
this.$emit('change', val);
|
||||
this.$emit('change', val)
|
||||
}else{
|
||||
this.$emit('input', val);
|
||||
this.$emit('input', val)
|
||||
}
|
||||
},
|
||||
setCurrentDictOptions(dictOptions){
|
||||
|
||||
@@ -14,18 +14,18 @@ import {getAction} from '@/api/manage'
|
||||
*/
|
||||
export async function initDictOptions(dictCode) {
|
||||
if (!dictCode) {
|
||||
return '字典Code不能为空!';
|
||||
return '字典Code不能为空!'
|
||||
}
|
||||
//优先从缓存中读取字典配置
|
||||
if(getDictItemsFromCache(dictCode)){
|
||||
let res = {}
|
||||
res.result = getDictItemsFromCache(dictCode);
|
||||
res.success = true;
|
||||
return res;
|
||||
res.result = getDictItemsFromCache(dictCode)
|
||||
res.success = true
|
||||
return res
|
||||
}
|
||||
//获取字典数组
|
||||
let res = await ajaxGetDictItems(dictCode);
|
||||
return res;
|
||||
let res = await ajaxGetDictItems(dictCode)
|
||||
return res
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -80,25 +80,25 @@ export function filterMultiDictText(dictOptions, text) {
|
||||
}
|
||||
|
||||
if(!text || text=='null' || !dictOptions || dictOptions.length==0){
|
||||
return ""
|
||||
return ''
|
||||
}
|
||||
let re = "";
|
||||
let re = ''
|
||||
text = text.toString()
|
||||
let arr = text.split(",")
|
||||
let arr = text.split(',')
|
||||
dictOptions.forEach(function (option) {
|
||||
if(option){
|
||||
for(let i=0;i<arr.length;i++){
|
||||
if (arr[i] === option.value) {
|
||||
re += option.text+",";
|
||||
break;
|
||||
re += option.text+','
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
if(re==""){
|
||||
return text;
|
||||
})
|
||||
if(re==''){
|
||||
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) {
|
||||
if(key==null ||key.length==0){
|
||||
return;
|
||||
return
|
||||
}
|
||||
if (!dictCode) {
|
||||
return '字典Code不能为空!';
|
||||
return '字典Code不能为空!'
|
||||
}
|
||||
//优先从缓存中读取字典配置
|
||||
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){
|
||||
return item[0]["text"]
|
||||
return item[0]['text']
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -127,7 +127,7 @@ export async function getDictItems(dictCode, params) {
|
||||
//优先从缓存中读取字典配置
|
||||
if(getDictItemsFromCache(dictCode)){
|
||||
let desformDictItems = getDictItemsFromCache(dictCode).map(item => ({...item, label: item.text}))
|
||||
return desformDictItems;
|
||||
return desformDictItems
|
||||
}
|
||||
|
||||
//缓存中没有,就请求后台
|
||||
|
||||
@@ -51,13 +51,13 @@
|
||||
data() {
|
||||
return {
|
||||
dictOptions: [],
|
||||
tagType:"",
|
||||
tagType:'',
|
||||
arrayValue:!this.value?[]:this.value.split(this.spliter)
|
||||
}
|
||||
},
|
||||
created() {
|
||||
if(!this.type || this.type==="list_multi"){
|
||||
this.tagType = "select"
|
||||
if(!this.type || this.type==='list_multi'){
|
||||
this.tagType = 'select'
|
||||
}else{
|
||||
this.tagType = this.type
|
||||
}
|
||||
@@ -66,7 +66,7 @@
|
||||
},
|
||||
watch:{
|
||||
options: function(val){
|
||||
this.setCurrentDictOptions(val);
|
||||
this.setCurrentDictOptions(val)
|
||||
},
|
||||
dictCode:{
|
||||
immediate:true,
|
||||
@@ -96,14 +96,14 @@
|
||||
//根据字典Code, 初始化字典数组
|
||||
ajaxGetDictItems(this.dictCode, null).then((res) => {
|
||||
if (res.success) {
|
||||
this.dictOptions = res.result;
|
||||
this.dictOptions = res.result
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
},
|
||||
onChange (selectedValue) {
|
||||
this.$emit('change', selectedValue.join(this.spliter));
|
||||
this.$emit('change', selectedValue.join(this.spliter))
|
||||
},
|
||||
setCurrentDictOptions(dictOptions){
|
||||
this.dictOptions = dictOptions
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
|
||||
<script>
|
||||
import { ajaxGetDictItems,getDictItemsFromCache } from '@/api/api'
|
||||
import debounce from 'lodash/debounce';
|
||||
import debounce from 'lodash/debounce'
|
||||
import { getAction } from '../../api/manage'
|
||||
|
||||
export default {
|
||||
@@ -53,7 +53,7 @@
|
||||
async: Boolean,
|
||||
placeholder:{
|
||||
type:String,
|
||||
default:"请选择",
|
||||
default:'请选择',
|
||||
required:false
|
||||
},
|
||||
popContainer:{
|
||||
@@ -68,8 +68,8 @@
|
||||
}
|
||||
},
|
||||
data(){
|
||||
this.loadData = debounce(this.loadData, 800);//消抖
|
||||
this.lastLoad = 0;
|
||||
this.loadData = debounce(this.loadData, 800)//消抖
|
||||
this.lastLoad = 0
|
||||
return {
|
||||
loading:false,
|
||||
selectedValue:[],
|
||||
@@ -78,10 +78,10 @@
|
||||
}
|
||||
},
|
||||
created(){
|
||||
this.initDictData();
|
||||
this.initDictData()
|
||||
},
|
||||
watch:{
|
||||
"value":{
|
||||
'value':{
|
||||
immediate:true,
|
||||
handler(val){
|
||||
if(!val){
|
||||
@@ -96,7 +96,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"dict":{
|
||||
'dict':{
|
||||
handler(){
|
||||
this.initDictData()
|
||||
}
|
||||
@@ -114,7 +114,7 @@
|
||||
initSelectValue(){
|
||||
if(this.async){
|
||||
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=>{
|
||||
if(res.success){
|
||||
let obj = {
|
||||
@@ -130,7 +130,7 @@
|
||||
}
|
||||
},
|
||||
loadData(value){
|
||||
console.log("数据加载",value)
|
||||
console.log('数据加载',value)
|
||||
this.lastLoad +=1
|
||||
const currentLoad = this.lastLoad
|
||||
this.options = []
|
||||
@@ -143,7 +143,7 @@
|
||||
return
|
||||
}
|
||||
this.options = res.result
|
||||
console.log("我是第一个",res)
|
||||
console.log('我是第一个',res)
|
||||
}else{
|
||||
this.$message.warning(res.message)
|
||||
}
|
||||
@@ -167,16 +167,16 @@
|
||||
}else{
|
||||
dictStr = this.dict
|
||||
}
|
||||
if (this.dict.indexOf(",") == -1) {
|
||||
if (this.dict.indexOf(',') == -1) {
|
||||
//优先从缓存中读取字典配置
|
||||
if (getDictItemsFromCache(this.dictCode)) {
|
||||
this.options = getDictItemsFromCache(this.dictCode);
|
||||
this.options = getDictItemsFromCache(this.dictCode)
|
||||
return
|
||||
}
|
||||
}
|
||||
ajaxGetDictItems(dictStr, null).then((res) => {
|
||||
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
|
||||
},
|
||||
handleChange (selectedValue) {
|
||||
console.log("selectedValue",selectedValue)
|
||||
console.log('selectedValue',selectedValue)
|
||||
this.selectedValue = selectedValue
|
||||
this.callback()
|
||||
},
|
||||
@@ -211,13 +211,13 @@
|
||||
this.selectedAsyncValue = null
|
||||
this.selectedValue = null
|
||||
this.options = null
|
||||
this.loadData("")
|
||||
this.loadData('')
|
||||
}
|
||||
this.callback()
|
||||
//update-end-author:scott date:20201222 for:【搜索】搜索查询组件,删除条件,默认下拉还是上次的缓存数据,不好 JT-191
|
||||
},
|
||||
callback(){
|
||||
this.$emit('change', this.selectedValue);
|
||||
this.$emit('change', this.selectedValue)
|
||||
},
|
||||
setCurrentDictOptions(dictOptions){
|
||||
this.options = dictOptions
|
||||
|
||||
@@ -5,9 +5,9 @@ import { filterMultiDictText,filterDictText,initDictOptions,filterDictTextByCach
|
||||
|
||||
export default {
|
||||
install: function (Vue) {
|
||||
Vue.component('JDictSelectTag',JDictSelectTag);
|
||||
Vue.component('JMultiSelectTag',JMultiSelectTag);
|
||||
Vue.component('JSearchSelectTag',JSearchSelectTag);
|
||||
Vue.component('JDictSelectTag',JDictSelectTag)
|
||||
Vue.component('JMultiSelectTag',JMultiSelectTag)
|
||||
Vue.component('JSearchSelectTag',JSearchSelectTag)
|
||||
Vue.prototype.$initDictOptions = (dictCode) => initDictOptions(dictCode)
|
||||
Vue.prototype.$filterMultiDictText = (dictOptions, text) => filterMultiDictText(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>
|
||||
</template>
|
||||
<script>
|
||||
import JCronModal from "./modal/JCronModal";
|
||||
import JCronModal from './modal/JCronModal'
|
||||
export default {
|
||||
name: 'JCron',
|
||||
components: {
|
||||
@@ -32,11 +32,11 @@
|
||||
},
|
||||
methods:{
|
||||
openModal(){
|
||||
this.$refs.innerVueCron.show();
|
||||
this.$refs.innerVueCron.show()
|
||||
},
|
||||
handleOK(val){
|
||||
this.cron = val;
|
||||
this.$emit("change", this.cron);
|
||||
this.cron = val
|
||||
this.$emit('change', this.cron)
|
||||
//this.$emit("change", Object.assign({}, this.cron));
|
||||
},
|
||||
handleEmpty(){
|
||||
|
||||
@@ -97,7 +97,7 @@
|
||||
}
|
||||
},
|
||||
data () {
|
||||
let dateStr = this.value;
|
||||
let dateStr = this.value
|
||||
return {
|
||||
yearShowOne:false, //控制年份模态框的显示与否
|
||||
year:'', // mode==“year” 专用
|
||||
@@ -107,12 +107,12 @@
|
||||
computed: {
|
||||
//透传给下级组件的事件,需要排除本组件使用的change事件
|
||||
childListeners() {
|
||||
const vm = this;
|
||||
const vm = this
|
||||
let result = Object.assign({},
|
||||
this.$listeners,
|
||||
)
|
||||
delete result.change;
|
||||
return result;
|
||||
delete result.change
|
||||
return result
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
@@ -131,7 +131,7 @@
|
||||
methods: {
|
||||
moment,
|
||||
handleDateChange(mom,dateStr){
|
||||
this.$emit('change', dateStr);
|
||||
this.$emit('change', dateStr)
|
||||
},
|
||||
handleMonthChange(mom,dateStr){
|
||||
this.$emit('change',dateStr)
|
||||
|
||||
@@ -30,7 +30,7 @@ export default {
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
console.log("我是表单禁用专用组件,但是我并不支持表单中iframe的内容禁用")
|
||||
console.log('我是表单禁用专用组件,但是我并不支持表单中iframe的内容禁用')
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -31,36 +31,36 @@
|
||||
|
||||
<script>
|
||||
import Vue from 'vue'
|
||||
import { ACCESS_TOKEN } from "@/store/mutation-types"
|
||||
import { ACCESS_TOKEN } from '@/store/mutation-types'
|
||||
import { getFileAccessHttpUrl } from '@/api/manage'
|
||||
const Base64 = require('js-base64').Base64
|
||||
|
||||
const uidGenerator=()=>{
|
||||
return '-'+parseInt(Math.random()*10000+1,10);
|
||||
return '-'+parseInt(Math.random()*10000+1,10)
|
||||
}
|
||||
export default {
|
||||
name: 'JImageUpload',
|
||||
data(){
|
||||
return {
|
||||
uploadAction:window._CONFIG['domianURL']+"/sys/common/upload",
|
||||
uploadAction:window._CONFIG['domianURL']+'/sys/common/upload',
|
||||
uploadLoading:false,
|
||||
picUrl:false,
|
||||
headers:{},
|
||||
fileList: [],
|
||||
previewImage:"",
|
||||
previewImage:'',
|
||||
}
|
||||
},
|
||||
props:{
|
||||
text:{
|
||||
type:String,
|
||||
required:false,
|
||||
default:"上传"
|
||||
default:'上传'
|
||||
},
|
||||
/*这个属性用于控制文件上传的业务路径*/
|
||||
bizPath:{
|
||||
type:String,
|
||||
required:false,
|
||||
default:"temp"
|
||||
default:'temp'
|
||||
},
|
||||
value:{
|
||||
type:[String,Array],
|
||||
@@ -87,12 +87,12 @@
|
||||
computed: {
|
||||
//透传给下级组件的事件,需要排除本组件使用的change事件
|
||||
childListeners() {
|
||||
const vm = this;
|
||||
const vm = this
|
||||
let result = Object.assign({},
|
||||
this.$listeners,
|
||||
)
|
||||
delete result.change;
|
||||
return result;
|
||||
delete result.change
|
||||
return result
|
||||
}
|
||||
},
|
||||
watch:{
|
||||
@@ -104,7 +104,7 @@
|
||||
this.initFileList(val)
|
||||
}
|
||||
if(!val || val.length==0){
|
||||
this.picUrl = false;
|
||||
this.picUrl = false
|
||||
}
|
||||
},
|
||||
//立刻执行handler
|
||||
@@ -112,17 +112,17 @@
|
||||
}
|
||||
},
|
||||
created(){
|
||||
const token = Vue.ls.get(ACCESS_TOKEN);
|
||||
this.headers = {"X-Access-Token":token}
|
||||
const token = Vue.ls.get(ACCESS_TOKEN)
|
||||
this.headers = {'X-Access-Token':token}
|
||||
},
|
||||
methods:{
|
||||
initFileList(paths){
|
||||
if(!paths || paths.length === 0){
|
||||
this.fileList = [];
|
||||
return;
|
||||
this.fileList = []
|
||||
return
|
||||
}
|
||||
this.picUrl = true;
|
||||
let arr = paths.split(",")
|
||||
this.picUrl = true
|
||||
let arr = paths.split(',')
|
||||
for(var a=0;a<arr.length;a++){
|
||||
this.fileList.forEach((item)=>{
|
||||
if (item.url === arr[a]){
|
||||
@@ -133,33 +133,33 @@
|
||||
}
|
||||
},
|
||||
beforeUpload: function(file){
|
||||
var fileType = file.type;
|
||||
var fileType = file.type
|
||||
if(fileType.indexOf('image')<0){
|
||||
this.$message.warning('请上传图片');
|
||||
return false;
|
||||
this.$message.warning('请上传图片')
|
||||
return false
|
||||
}
|
||||
},
|
||||
handleChange(info) {
|
||||
this.picUrl = false;
|
||||
this.picUrl = false
|
||||
let fileList = info.fileList
|
||||
//update-begin-author:wangshuai date:20201022 for:LOWCOD-969 判断number是否大于0和是否多选,返回选定的元素。
|
||||
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和是否多选,返回选定的元素。
|
||||
if(info.file.status==='done'){
|
||||
if(info.file.response.success){
|
||||
this.picUrl = true;
|
||||
this.picUrl = true
|
||||
fileList = fileList.map((file) => {
|
||||
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} 上传成功!`);
|
||||
}else if (info.file.status === 'error') {
|
||||
this.$message.error(`${info.file.name} 上传失败.`);
|
||||
this.$message.error(`${info.file.name} 上传失败.`)
|
||||
}else if(info.file.status === 'removed'){
|
||||
this.handleDelete(info.file)
|
||||
}
|
||||
@@ -188,7 +188,7 @@
|
||||
if(!uploadFiles || uploadFiles.length==0){
|
||||
path = ''
|
||||
}
|
||||
let arr = [];
|
||||
let arr = []
|
||||
if(!this.isMultiple){
|
||||
arr.push(uploadFiles[uploadFiles.length-1].url)
|
||||
}else{
|
||||
@@ -197,22 +197,22 @@
|
||||
if(uploadFiles[a].status === 'done' ) {
|
||||
arr.push(uploadFiles[a].url)
|
||||
}else{
|
||||
return;
|
||||
return
|
||||
}
|
||||
// update-end-author:taoyan date:20200819 for:【开源问题z】上传图片组件 LOWCOD-783
|
||||
}
|
||||
}
|
||||
if(arr.length>0){
|
||||
path = arr.join(",")
|
||||
path = arr.join(',')
|
||||
}
|
||||
this.$emit('change', path);
|
||||
this.$emit('change', path)
|
||||
},
|
||||
handleDelete(file){
|
||||
//如有需要新增 删除逻辑
|
||||
},
|
||||
handleCancel() {
|
||||
this.close();
|
||||
this.previewVisible = false;
|
||||
this.close()
|
||||
this.previewVisible = false
|
||||
},
|
||||
close () {
|
||||
|
||||
|
||||
@@ -11,10 +11,10 @@
|
||||
|
||||
import { Input } from 'ant-design-vue'
|
||||
|
||||
const JINPUT_QUERY_LIKE = 'like';
|
||||
const JINPUT_QUERY_NE = 'ne';
|
||||
const JINPUT_QUERY_GE = 'ge'; //大于等于
|
||||
const JINPUT_QUERY_LE = 'le'; //小于等于
|
||||
const JINPUT_QUERY_LIKE = 'like'
|
||||
const JINPUT_QUERY_NE = 'ne'
|
||||
const JINPUT_QUERY_GE = 'ge' //大于等于
|
||||
const JINPUT_QUERY_LE = 'le' //小于等于
|
||||
|
||||
export default {
|
||||
name: 'JInput',
|
||||
@@ -48,19 +48,19 @@
|
||||
computed: {
|
||||
//透传给下级组件的事件,需要排除本组件使用的change事件
|
||||
childListeners() {
|
||||
const vm = this;
|
||||
const vm = this
|
||||
let result = Object.assign({},
|
||||
this.$listeners,
|
||||
)
|
||||
delete result.change;
|
||||
return result;
|
||||
delete result.change
|
||||
return result
|
||||
}
|
||||
},
|
||||
watch:{
|
||||
value:{
|
||||
immediate:true,
|
||||
handler:function(){
|
||||
this.initVal();
|
||||
this.initVal()
|
||||
}
|
||||
},
|
||||
// 当 type 变化的时候重新计算值
|
||||
@@ -77,19 +77,19 @@
|
||||
switch (this.type) {
|
||||
case JINPUT_QUERY_LIKE:
|
||||
//修复路由传参的值传送到jinput框被前后各截取了一位 #1336
|
||||
if(text.indexOf("*") != -1){
|
||||
text = text.substring(1,text.length-1);
|
||||
if(text.indexOf('*') != -1){
|
||||
text = text.substring(1,text.length-1)
|
||||
}
|
||||
break;
|
||||
break
|
||||
case JINPUT_QUERY_NE:
|
||||
text = text.substring(1);
|
||||
break;
|
||||
text = text.substring(1)
|
||||
break
|
||||
case JINPUT_QUERY_GE:
|
||||
text = text.substring(2);
|
||||
break;
|
||||
text = text.substring(2)
|
||||
break
|
||||
case JINPUT_QUERY_LE:
|
||||
text = text.substring(2);
|
||||
break;
|
||||
text = text.substring(2)
|
||||
break
|
||||
default:
|
||||
}
|
||||
this.inputVal = text
|
||||
@@ -102,20 +102,20 @@
|
||||
}
|
||||
switch (this.type) {
|
||||
case JINPUT_QUERY_LIKE:
|
||||
text = "*"+text+"*";
|
||||
break;
|
||||
text = '*'+text+'*'
|
||||
break
|
||||
case JINPUT_QUERY_NE:
|
||||
text = "!"+text;
|
||||
break;
|
||||
text = '!'+text
|
||||
break
|
||||
case JINPUT_QUERY_GE:
|
||||
text = ">="+text;
|
||||
break;
|
||||
text = '>='+text
|
||||
break
|
||||
case JINPUT_QUERY_LE:
|
||||
text = "<="+text;
|
||||
break;
|
||||
text = '<='+text
|
||||
break
|
||||
default:
|
||||
}
|
||||
this.$emit('change', text);
|
||||
this.$emit('change', text)
|
||||
}
|
||||
},
|
||||
model: {
|
||||
|
||||
@@ -107,11 +107,11 @@
|
||||
return {
|
||||
treeValue: null, // 选中的数据
|
||||
treeData:[],// 渲染树的数组
|
||||
url:"/sys/dict/loadTreeData",
|
||||
url:'/sys/dict/loadTreeData',
|
||||
view:'/sys/dict/loadDictItem/',
|
||||
tableName:"",
|
||||
text:"",
|
||||
code:"",
|
||||
tableName:'',
|
||||
text:'',
|
||||
code:'',
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
@@ -131,12 +131,12 @@
|
||||
},
|
||||
//透传给下级组件的事件,需要排除本组件使用的change事件
|
||||
childListeners() {
|
||||
const vm = this;
|
||||
const vm = this
|
||||
let result = Object.assign({},
|
||||
this.$listeners,
|
||||
)
|
||||
delete result.change;
|
||||
return result;
|
||||
delete result.change
|
||||
return result
|
||||
}
|
||||
},
|
||||
created(){
|
||||
@@ -151,7 +151,7 @@
|
||||
},
|
||||
methods: {
|
||||
loadItemByCode(){
|
||||
if( !this.value || this.value == "0" ){
|
||||
if( !this.value || this.value == '0' ){
|
||||
this.treeValue = null
|
||||
}else{
|
||||
getAction(`${this.view}${this.dict}`,{key:this.value}).then(res=>{
|
||||
@@ -160,7 +160,7 @@
|
||||
this.treeValue = values // v-model接收的是string || string[]
|
||||
//将节点名称显示在选择框上
|
||||
this.treeValue = res.result[0]
|
||||
this.onLoadTriggleChange(res.result[0]);
|
||||
this.onLoadTriggleChange(res.result[0])
|
||||
}
|
||||
})
|
||||
}
|
||||
@@ -172,7 +172,7 @@
|
||||
}
|
||||
},
|
||||
initDictInfo(){ //取出父组件传过来的code,text,tableName
|
||||
let arr = this.dict.split(",")
|
||||
let arr = this.dict.split(',')
|
||||
this.tableName = arr[0]
|
||||
this.text = arr[1]
|
||||
this.code = arr[2]
|
||||
@@ -253,7 +253,7 @@
|
||||
}
|
||||
this.treeData = [...res.result]
|
||||
}else{
|
||||
console.log("数根节点查询结果-else",res)
|
||||
console.log('数根节点查询结果-else',res)
|
||||
}
|
||||
})
|
||||
}else{
|
||||
@@ -276,7 +276,7 @@
|
||||
/*
|
||||
* 使用$listeners向上暴露事件---和$emit一起使用出现的问题:change事件会执行两遍
|
||||
* 解决办法:改变选中时提交的事件名*/
|
||||
this.$emit('change', '');
|
||||
this.$emit('change', '')
|
||||
this.treeValue = null
|
||||
} else if (value instanceof Array) {
|
||||
//多选
|
||||
@@ -295,18 +295,18 @@
|
||||
let myCondition = this.condition
|
||||
return new Promise((resolve,reject)=>{
|
||||
if(!myCondition){
|
||||
resolve();
|
||||
resolve()
|
||||
}else{
|
||||
try {
|
||||
let test=JSON.parse(myCondition);
|
||||
let test=JSON.parse(myCondition)
|
||||
if(typeof test == 'object' && test){
|
||||
resolve()
|
||||
}else{
|
||||
this.$message.error("组件JTreeSelect-condition传值有误,需要一个json字符串!")
|
||||
this.$message.error('组件JTreeSelect-condition传值有误,需要一个json字符串!')
|
||||
reject()
|
||||
}
|
||||
} catch(e) {
|
||||
this.$message.error("组件JTreeSelect-condition传值有误,需要一个json字符串!")
|
||||
this.$message.error('组件JTreeSelect-condition传值有误,需要一个json字符串!')
|
||||
reject()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -31,22 +31,22 @@
|
||||
<script>
|
||||
|
||||
import Vue from 'vue'
|
||||
import { ACCESS_TOKEN } from "@/store/mutation-types"
|
||||
import { getFileAccessHttpUrl } from '@/api/manage';
|
||||
import { getFileInfo } from '@/api/api';
|
||||
import { ACCESS_TOKEN } from '@/store/mutation-types'
|
||||
import { getFileAccessHttpUrl } from '@/api/manage'
|
||||
import { getFileInfo } from '@/api/api'
|
||||
const Base64 = require('js-base64').Base64
|
||||
|
||||
const FILE_TYPE_ALL = "all"
|
||||
const FILE_TYPE_IMG = "image"
|
||||
const FILE_TYPE_TXT = "file"
|
||||
const FILE_TYPE_ALL = 'all'
|
||||
const FILE_TYPE_IMG = 'image'
|
||||
const FILE_TYPE_TXT = 'file'
|
||||
const uidGenerator=()=>{
|
||||
return '-'+parseInt(Math.random()*10000+1,10);
|
||||
return '-'+parseInt(Math.random()*10000+1,10)
|
||||
}
|
||||
export default {
|
||||
name: 'JUpload',
|
||||
data(){
|
||||
return {
|
||||
uploadAction:window._CONFIG['domianURL']+"/sys/common/upload",
|
||||
uploadAction:window._CONFIG['domianURL']+'/sys/common/upload',
|
||||
headers:{},
|
||||
fileList: [],
|
||||
newFileList: [],
|
||||
@@ -57,7 +57,7 @@
|
||||
text: {
|
||||
type: String,
|
||||
required: false,
|
||||
default: "点击上传"
|
||||
default: '点击上传'
|
||||
},
|
||||
fileType: {
|
||||
type: String,
|
||||
@@ -68,7 +68,7 @@
|
||||
bizPath: {
|
||||
type: String,
|
||||
required: false,
|
||||
default: "temp"
|
||||
default: 'temp'
|
||||
},
|
||||
value: {
|
||||
type: [String, Array],
|
||||
@@ -127,7 +127,7 @@
|
||||
if(this.returnUrl){
|
||||
this.initFileList(val.join(','))
|
||||
}else{
|
||||
this.initFileListArr(val);
|
||||
this.initFileListArr(val)
|
||||
}
|
||||
} else {
|
||||
this.initFileList(val)
|
||||
@@ -138,12 +138,12 @@
|
||||
computed:{
|
||||
//透传给下级组件的事件,需要排除本组件使用的change事件
|
||||
childListeners() {
|
||||
const vm = this;
|
||||
const vm = this
|
||||
let result = Object.assign({},
|
||||
this.$listeners,
|
||||
)
|
||||
delete result.change;
|
||||
return result;
|
||||
delete result.change
|
||||
return result
|
||||
},
|
||||
isImageComp(){
|
||||
return this.fileType === FILE_TYPE_IMG
|
||||
@@ -153,17 +153,17 @@
|
||||
},
|
||||
},
|
||||
created(){
|
||||
const token = Vue.ls.get(ACCESS_TOKEN);
|
||||
const token = Vue.ls.get(ACCESS_TOKEN)
|
||||
//---------------------------- begin 图片左右换位置 -------------------------------------
|
||||
this.headers = {"X-Access-Token":token};
|
||||
this.containerId = 'container-ty-'+new Date().getTime();
|
||||
this.headers = {'X-Access-Token':token}
|
||||
this.containerId = 'container-ty-'+new Date().getTime()
|
||||
//---------------------------- end 图片左右换位置 -------------------------------------
|
||||
},
|
||||
methods:{
|
||||
initFileListArr(val){
|
||||
if(!val || val.length==0){
|
||||
this.fileList = [];
|
||||
return;
|
||||
this.fileList = []
|
||||
return
|
||||
}
|
||||
for(var a=0;a<val.length;a++){
|
||||
this.fileList.forEach((item)=>{
|
||||
@@ -176,10 +176,10 @@
|
||||
},
|
||||
async initFileList(paths){
|
||||
if(!paths || paths.length === 0){
|
||||
this.fileList = [];
|
||||
return;
|
||||
this.fileList = []
|
||||
return
|
||||
}
|
||||
let arr = paths.split(",")
|
||||
let arr = paths.split(',')
|
||||
// 返回路径的时候,对路径进行操作,取出所属id
|
||||
if(!this.returnId && arr.length > 0) {
|
||||
const newArr = []
|
||||
@@ -216,20 +216,20 @@
|
||||
if(!uploadFiles || uploadFiles.length==0){
|
||||
path = ''
|
||||
}
|
||||
let arr = [];
|
||||
let arr = []
|
||||
// 如果returnid为true 只返回id
|
||||
if(this.returnId){
|
||||
for(var a=0;a<uploadFiles.length;a++){
|
||||
if(uploadFiles[a].status === 'done' ) {
|
||||
arr.push(uploadFiles[a].response.result.id)
|
||||
}else{
|
||||
return;
|
||||
return
|
||||
}
|
||||
}
|
||||
if(arr.length>0){
|
||||
fileIds = arr.join(",")
|
||||
fileIds = arr.join(',')
|
||||
}
|
||||
this.$emit('change', fileIds);
|
||||
this.$emit('change', fileIds)
|
||||
return
|
||||
}
|
||||
|
||||
@@ -237,22 +237,22 @@
|
||||
if(uploadFiles[a].status === 'done' ) {
|
||||
arr.push(uploadFiles[a].url)
|
||||
}else{
|
||||
return;
|
||||
return
|
||||
}
|
||||
}
|
||||
if(arr.length>0){
|
||||
path = arr.join(",")
|
||||
path = arr.join(',')
|
||||
}
|
||||
this.$emit('change', path);
|
||||
this.$emit('change', path)
|
||||
},
|
||||
beforeUpload(file){
|
||||
this.uploadGoOn=true
|
||||
var fileType = file.type;
|
||||
var fileType = file.type
|
||||
if(this.fileType===FILE_TYPE_IMG){
|
||||
if(fileType.indexOf('image')<0){
|
||||
this.$message.warning('请上传图片');
|
||||
this.$message.warning('请上传图片')
|
||||
this.uploadGoOn=false
|
||||
return false;
|
||||
return false
|
||||
}
|
||||
}
|
||||
//TODO 扩展功能验证文件大小
|
||||
@@ -260,25 +260,25 @@
|
||||
},
|
||||
handleChange(info) {
|
||||
if(!info.file.status && this.uploadGoOn === false){
|
||||
info.fileList.pop();
|
||||
info.fileList.pop()
|
||||
}
|
||||
let fileList = info.fileList
|
||||
if(info.file.status==='done'){
|
||||
if(this.number>0){
|
||||
fileList = fileList.slice(-this.number);
|
||||
fileList = fileList.slice(-this.number)
|
||||
}
|
||||
if(info.file.response.success){
|
||||
fileList = fileList.map((file) => {
|
||||
if (file.response) {
|
||||
// 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} 上传成功!`);
|
||||
}else if (info.file.status === 'error') {
|
||||
this.$message.error(`${info.file.name} 上传失败.`);
|
||||
this.$message.error(`${info.file.name} 上传失败.`)
|
||||
}else if(info.file.status === 'removed'){
|
||||
this.handleDelete(info.file)
|
||||
}
|
||||
@@ -289,7 +289,7 @@
|
||||
this.handlePathChange()
|
||||
}else{
|
||||
//returnUrl为false时返回文件名称、文件路径及文件大小
|
||||
this.newFileList = [];
|
||||
this.newFileList = []
|
||||
for(var a=0;a<fileList.length;a++){
|
||||
// update-begin-author:lvdandan date:20200603 for:【TESTA-514】【开源issue】多个文件同时上传时,控制台报错
|
||||
if(fileList[a].status === 'done' ) {
|
||||
@@ -297,14 +297,14 @@
|
||||
fileName:fileList[a].name,
|
||||
filePath:fileList[a].url,
|
||||
fileSize:fileList[a].size
|
||||
};
|
||||
this.newFileList.push(fileJson);
|
||||
}
|
||||
this.newFileList.push(fileJson)
|
||||
}else{
|
||||
return;
|
||||
return
|
||||
}
|
||||
// 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 JInput from "./JInput.vue";
|
||||
import JModal from './JModal'
|
||||
import JInput from './JInput.vue'
|
||||
import JEllipsis from './JEllipsis.vue'
|
||||
|
||||
export default {
|
||||
install(Vue) {
|
||||
Vue.component(JModal.name, JModal);
|
||||
Vue.component("JInput", JInput);
|
||||
Vue.component(JModal.name, JModal)
|
||||
Vue.component('JInput', JInput)
|
||||
Vue.component('JEllipsis', JEllipsis)
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
@@ -14,14 +14,14 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getFileAccessHttpUrl } from '@/api/manage';
|
||||
import { getFileAccessHttpUrl } from '@/api/manage'
|
||||
|
||||
const getFileName=(path)=>{
|
||||
if(path.lastIndexOf("\\")>=0){
|
||||
let reg=new RegExp("\\\\","g");
|
||||
path = path.replace(reg,"/");
|
||||
if(path.lastIndexOf('\\')>=0){
|
||||
let reg=new RegExp('\\\\','g')
|
||||
path = path.replace(reg,'/')
|
||||
}
|
||||
return path.substring(path.lastIndexOf("/")+1);
|
||||
return path.substring(path.lastIndexOf('/')+1)
|
||||
}
|
||||
|
||||
export default {
|
||||
@@ -76,11 +76,11 @@
|
||||
},
|
||||
methods:{
|
||||
handleChange(value){
|
||||
this.filePath = value;
|
||||
this.filePath = value
|
||||
},
|
||||
show(id,value,flag){
|
||||
this.id = id;
|
||||
this.filePath = value;
|
||||
this.id = id
|
||||
this.filePath = value
|
||||
this.visible=true
|
||||
if(flag === 'img'){
|
||||
this.fileType = 'image'
|
||||
@@ -91,10 +91,10 @@
|
||||
},
|
||||
ok(){
|
||||
if(!this.filePath){
|
||||
this.$message.error("未上传任何文件")
|
||||
return false;
|
||||
this.$message.error('未上传任何文件')
|
||||
return false
|
||||
}
|
||||
let arr = this.filePath.split(",")
|
||||
let arr = this.filePath.split(',')
|
||||
let obj = {
|
||||
name:getFileName(arr[0]),
|
||||
url:getFileAccessHttpUrl(arr[0]),
|
||||
|
||||
@@ -68,7 +68,7 @@
|
||||
immediate:true,
|
||||
handler:function(){
|
||||
if(this.value && this.value.length>0){
|
||||
this.inputContent = this.value;
|
||||
this.inputContent = this.value
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
@@ -335,184 +335,184 @@
|
||||
},
|
||||
computed: {
|
||||
modalWidth(){
|
||||
return 608;
|
||||
return 608
|
||||
},
|
||||
secondsText() {
|
||||
let seconds = '';
|
||||
let cronEvery=this.result.second.cronEvery||'';
|
||||
let seconds = ''
|
||||
let cronEvery=this.result.second.cronEvery||''
|
||||
switch (cronEvery.toString()){
|
||||
case '1':
|
||||
seconds = '*';
|
||||
break;
|
||||
seconds = '*'
|
||||
break
|
||||
case '2':
|
||||
seconds = this.result.second.incrementStart+'/'+this.result.second.incrementIncrement;
|
||||
break;
|
||||
seconds = this.result.second.incrementStart+'/'+this.result.second.incrementIncrement
|
||||
break
|
||||
case '3':
|
||||
this.result.second.specificSpecific.map(val=> {seconds += val+','});
|
||||
seconds = seconds.slice(0, -1);
|
||||
break;
|
||||
this.result.second.specificSpecific.map(val=> {seconds += val+','})
|
||||
seconds = seconds.slice(0, -1)
|
||||
break
|
||||
case '4':
|
||||
seconds = this.result.second.rangeStart+'-'+this.result.second.rangeEnd;
|
||||
break;
|
||||
seconds = this.result.second.rangeStart+'-'+this.result.second.rangeEnd
|
||||
break
|
||||
}
|
||||
return seconds;
|
||||
return seconds
|
||||
},
|
||||
minutesText() {
|
||||
let minutes = '';
|
||||
let cronEvery=this.result.minute.cronEvery||'';
|
||||
let minutes = ''
|
||||
let cronEvery=this.result.minute.cronEvery||''
|
||||
switch (cronEvery.toString()){
|
||||
case '1':
|
||||
minutes = '*';
|
||||
break;
|
||||
minutes = '*'
|
||||
break
|
||||
case '2':
|
||||
minutes = this.result.minute.incrementStart+'/'+this.result.minute.incrementIncrement;
|
||||
break;
|
||||
minutes = this.result.minute.incrementStart+'/'+this.result.minute.incrementIncrement
|
||||
break
|
||||
case '3':
|
||||
this.result.minute.specificSpecific.map(val=> {
|
||||
minutes += val+','
|
||||
});
|
||||
minutes = minutes.slice(0, -1);
|
||||
break;
|
||||
})
|
||||
minutes = minutes.slice(0, -1)
|
||||
break
|
||||
case '4':
|
||||
minutes = this.result.minute.rangeStart+'-'+this.result.minute.rangeEnd;
|
||||
break;
|
||||
minutes = this.result.minute.rangeStart+'-'+this.result.minute.rangeEnd
|
||||
break
|
||||
}
|
||||
return minutes;
|
||||
return minutes
|
||||
},
|
||||
hoursText() {
|
||||
let hours = '';
|
||||
let cronEvery=this.result.hour.cronEvery||'';
|
||||
let hours = ''
|
||||
let cronEvery=this.result.hour.cronEvery||''
|
||||
switch (cronEvery.toString()){
|
||||
case '1':
|
||||
hours = '*';
|
||||
break;
|
||||
hours = '*'
|
||||
break
|
||||
case '2':
|
||||
hours = this.result.hour.incrementStart+'/'+this.result.hour.incrementIncrement;
|
||||
break;
|
||||
hours = this.result.hour.incrementStart+'/'+this.result.hour.incrementIncrement
|
||||
break
|
||||
case '3':
|
||||
this.result.hour.specificSpecific.map(val=> {
|
||||
hours += val+','
|
||||
});
|
||||
hours = hours.slice(0, -1);
|
||||
break;
|
||||
})
|
||||
hours = hours.slice(0, -1)
|
||||
break
|
||||
case '4':
|
||||
hours = this.result.hour.rangeStart+'-'+this.result.hour.rangeEnd;
|
||||
break;
|
||||
hours = this.result.hour.rangeStart+'-'+this.result.hour.rangeEnd
|
||||
break
|
||||
}
|
||||
return hours;
|
||||
return hours
|
||||
},
|
||||
daysText() {
|
||||
let days='';
|
||||
let cronEvery=this.result.day.cronEvery||'';
|
||||
let days=''
|
||||
let cronEvery=this.result.day.cronEvery||''
|
||||
switch (cronEvery.toString()){
|
||||
case '1':
|
||||
break;
|
||||
break
|
||||
case '2':
|
||||
case '4':
|
||||
case '11':
|
||||
days = '?';
|
||||
break;
|
||||
days = '?'
|
||||
break
|
||||
case '3':
|
||||
days = this.result.day.incrementStart+'/'+this.result.day.incrementIncrement;
|
||||
break;
|
||||
days = this.result.day.incrementStart+'/'+this.result.day.incrementIncrement
|
||||
break
|
||||
case '5':
|
||||
this.result.day.specificSpecific.map(val=> {
|
||||
days += val+','
|
||||
});
|
||||
days = days.slice(0, -1);
|
||||
break;
|
||||
})
|
||||
days = days.slice(0, -1)
|
||||
break
|
||||
case '6':
|
||||
days = "L";
|
||||
break;
|
||||
days = 'L'
|
||||
break
|
||||
case '7':
|
||||
days = "LW";
|
||||
break;
|
||||
days = 'LW'
|
||||
break
|
||||
case '8':
|
||||
days = this.result.day.cronLastSpecificDomDay + 'L';
|
||||
break;
|
||||
days = this.result.day.cronLastSpecificDomDay + 'L'
|
||||
break
|
||||
case '9':
|
||||
days = 'L-' + this.result.day.cronDaysBeforeEomMinus;
|
||||
break;
|
||||
days = 'L-' + this.result.day.cronDaysBeforeEomMinus
|
||||
break
|
||||
case '10':
|
||||
days = this.result.day.cronDaysNearestWeekday+"W";
|
||||
days = this.result.day.cronDaysNearestWeekday+'W'
|
||||
break
|
||||
}
|
||||
return days;
|
||||
return days
|
||||
},
|
||||
weeksText() {
|
||||
let weeks = '';
|
||||
let cronEvery=this.result.day.cronEvery||'';
|
||||
let weeks = ''
|
||||
let cronEvery=this.result.day.cronEvery||''
|
||||
switch (cronEvery.toString()){
|
||||
case '1':
|
||||
case '3':
|
||||
case '5':
|
||||
weeks = '?';
|
||||
break;
|
||||
weeks = '?'
|
||||
break
|
||||
case '2':
|
||||
weeks = this.result.week.incrementStart+'/'+this.result.week.incrementIncrement;
|
||||
break;
|
||||
weeks = this.result.week.incrementStart+'/'+this.result.week.incrementIncrement
|
||||
break
|
||||
case '4':
|
||||
this.result.week.specificSpecific.map(val=> {
|
||||
weeks += val+','
|
||||
});
|
||||
weeks = weeks.slice(0, -1);
|
||||
break;
|
||||
})
|
||||
weeks = weeks.slice(0, -1)
|
||||
break
|
||||
case '6':
|
||||
case '7':
|
||||
case '8':
|
||||
case '9':
|
||||
case '10':
|
||||
weeks = "?";
|
||||
break;
|
||||
weeks = '?'
|
||||
break
|
||||
case '11':
|
||||
weeks = this.result.week.cronNthDayDay+"#"+this.result.week.cronNthDayNth;
|
||||
break;
|
||||
weeks = this.result.week.cronNthDayDay+'#'+this.result.week.cronNthDayNth
|
||||
break
|
||||
}
|
||||
return weeks;
|
||||
return weeks
|
||||
},
|
||||
monthsText() {
|
||||
let months = '';
|
||||
let cronEvery=this.result.month.cronEvery||'';
|
||||
let months = ''
|
||||
let cronEvery=this.result.month.cronEvery||''
|
||||
switch (cronEvery.toString()){
|
||||
case '1':
|
||||
months = '*';
|
||||
break;
|
||||
months = '*'
|
||||
break
|
||||
case '2':
|
||||
months = this.result.month.incrementStart+'/'+this.result.month.incrementIncrement;
|
||||
break;
|
||||
months = this.result.month.incrementStart+'/'+this.result.month.incrementIncrement
|
||||
break
|
||||
case '3':
|
||||
this.result.month.specificSpecific.map(val=> {
|
||||
months += val+','
|
||||
});
|
||||
months = months.slice(0, -1);
|
||||
break;
|
||||
})
|
||||
months = months.slice(0, -1)
|
||||
break
|
||||
case '4':
|
||||
months = this.result.month.rangeStart+'-'+this.result.month.rangeEnd;
|
||||
break;
|
||||
months = this.result.month.rangeStart+'-'+this.result.month.rangeEnd
|
||||
break
|
||||
}
|
||||
return months;
|
||||
return months
|
||||
},
|
||||
yearsText() {
|
||||
let years = '';
|
||||
let cronEvery=this.result.year.cronEvery||'';
|
||||
let years = ''
|
||||
let cronEvery=this.result.year.cronEvery||''
|
||||
switch (cronEvery.toString()){
|
||||
case '1':
|
||||
years = '*';
|
||||
break;
|
||||
years = '*'
|
||||
break
|
||||
case '2':
|
||||
years = this.result.year.incrementStart+'/'+this.result.year.incrementIncrement;
|
||||
break;
|
||||
years = this.result.year.incrementStart+'/'+this.result.year.incrementIncrement
|
||||
break
|
||||
case '3':
|
||||
this.result.year.specificSpecific.map(val=> {
|
||||
years += val+','
|
||||
});
|
||||
years = years.slice(0, -1);
|
||||
break;
|
||||
})
|
||||
years = years.slice(0, -1)
|
||||
break
|
||||
case '4':
|
||||
years = this.result.year.rangeStart+'-'+this.result.year.rangeEnd;
|
||||
break;
|
||||
years = this.result.year.rangeStart+'-'+this.result.year.rangeEnd
|
||||
break
|
||||
}
|
||||
return years;
|
||||
return years
|
||||
},
|
||||
cron(){
|
||||
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 = JSON.parse(JSON.stringify(this.defaultValue));
|
||||
// }
|
||||
let label = this.data;
|
||||
let label = this.data
|
||||
if(label){
|
||||
this.secondsReverseExp(label)
|
||||
this.minutesReverseExp(label);
|
||||
this.hoursReverseExp(label);
|
||||
this.daysReverseExp(label);
|
||||
this.daysReverseExp(label);
|
||||
this.monthsReverseExp(label);
|
||||
this.yearReverseExp(label);
|
||||
JSON.parse(JSON.stringify(label));
|
||||
this.minutesReverseExp(label)
|
||||
this.hoursReverseExp(label)
|
||||
this.daysReverseExp(label)
|
||||
this.daysReverseExp(label)
|
||||
this.monthsReverseExp(label)
|
||||
this.yearReverseExp(label)
|
||||
JSON.parse(JSON.stringify(label))
|
||||
}else {
|
||||
this.result = JSON.parse(JSON.stringify(this.defaultValue));
|
||||
this.result = JSON.parse(JSON.stringify(this.defaultValue))
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
show(){
|
||||
this.visible = true;
|
||||
this.visible = true
|
||||
// console.log('secondsReverseExp',this.secondsReverseExp(this.data));
|
||||
// console.log('minutesReverseExp',this.minutesReverseExp(this.data));
|
||||
// console.log('hoursReverseExp',this.hoursReverseExp(this.data));
|
||||
@@ -559,15 +559,15 @@
|
||||
|
||||
},
|
||||
handleSubmit(){
|
||||
this.$emit('ok',this.cron);
|
||||
this.close();
|
||||
this.visible = false;
|
||||
this.$emit('ok',this.cron)
|
||||
this.close()
|
||||
this.visible = false
|
||||
},
|
||||
close(){
|
||||
this.visible = false;
|
||||
this.visible = false
|
||||
},
|
||||
secondsReverseExp(seconds) {
|
||||
let val = seconds.split(" ")[0];
|
||||
let val = seconds.split(' ')[0]
|
||||
//alert(val);
|
||||
let second = {
|
||||
cronEvery:'',
|
||||
@@ -576,32 +576,32 @@
|
||||
rangeStart:1,
|
||||
rangeEnd:0,
|
||||
specificSpecific:[]
|
||||
};
|
||||
}
|
||||
switch (true) {
|
||||
case val.includes('*'):
|
||||
second.cronEvery = '1';
|
||||
break;
|
||||
second.cronEvery = '1'
|
||||
break
|
||||
case val.includes('/'):
|
||||
second.cronEvery = '2';
|
||||
second.incrementStart = val.split('/')[0];
|
||||
second.incrementIncrement = val.split('/')[1];
|
||||
break;
|
||||
second.cronEvery = '2'
|
||||
second.incrementStart = val.split('/')[0]
|
||||
second.incrementIncrement = val.split('/')[1]
|
||||
break
|
||||
case val.includes(','):
|
||||
second.cronEvery = '3';
|
||||
second.specificSpecific = val.split(',').map(Number).sort();
|
||||
break;
|
||||
second.cronEvery = '3'
|
||||
second.specificSpecific = val.split(',').map(Number).sort()
|
||||
break
|
||||
case val.includes('-'):
|
||||
second.cronEvery = '4';
|
||||
second.rangeStart = val.split('-')[0];
|
||||
second.rangeEnd = val.split('-')[1];
|
||||
break;
|
||||
second.cronEvery = '4'
|
||||
second.rangeStart = val.split('-')[0]
|
||||
second.rangeEnd = val.split('-')[1]
|
||||
break
|
||||
default:
|
||||
second.cronEvery = '1';
|
||||
second.cronEvery = '1'
|
||||
}
|
||||
this.result.second = second;
|
||||
this.result.second = second
|
||||
},
|
||||
minutesReverseExp(minutes) {
|
||||
let val = minutes.split(" ")[1];
|
||||
let val = minutes.split(' ')[1]
|
||||
let minute = {
|
||||
cronEvery:'',
|
||||
incrementStart:3,
|
||||
@@ -612,29 +612,29 @@
|
||||
}
|
||||
switch (true) {
|
||||
case val.includes('*'):
|
||||
minute.cronEvery = '1';
|
||||
break;
|
||||
minute.cronEvery = '1'
|
||||
break
|
||||
case val.includes('/'):
|
||||
minute.cronEvery = '2';
|
||||
minute.incrementStart = val.split('/')[0];
|
||||
minute.incrementIncrement = val.split('/')[1];
|
||||
break;
|
||||
minute.cronEvery = '2'
|
||||
minute.incrementStart = val.split('/')[0]
|
||||
minute.incrementIncrement = val.split('/')[1]
|
||||
break
|
||||
case val.includes(','):
|
||||
minute.cronEvery = '3';
|
||||
minute.specificSpecific = val.split(',').map(Number).sort();
|
||||
break;
|
||||
minute.cronEvery = '3'
|
||||
minute.specificSpecific = val.split(',').map(Number).sort()
|
||||
break
|
||||
case val.includes('-'):
|
||||
minute.cronEvery = '4';
|
||||
minute.rangeStart = val.split('-')[0];
|
||||
minute.rangeEnd = val.split('-')[1];
|
||||
break;
|
||||
minute.cronEvery = '4'
|
||||
minute.rangeStart = val.split('-')[0]
|
||||
minute.rangeEnd = val.split('-')[1]
|
||||
break
|
||||
default:
|
||||
minute.cronEvery = '1';
|
||||
minute.cronEvery = '1'
|
||||
}
|
||||
this.result.minute = minute;
|
||||
this.result.minute = minute
|
||||
},
|
||||
hoursReverseExp(hours) {
|
||||
let val = hours.split(" ")[2];
|
||||
let val = hours.split(' ')[2]
|
||||
let hour ={
|
||||
cronEvery:'',
|
||||
incrementStart:3,
|
||||
@@ -642,33 +642,33 @@
|
||||
rangeStart:1,
|
||||
rangeEnd:'0',
|
||||
specificSpecific:[],
|
||||
};
|
||||
}
|
||||
switch (true) {
|
||||
case val.includes('*'):
|
||||
hour.cronEvery = '1';
|
||||
break;
|
||||
hour.cronEvery = '1'
|
||||
break
|
||||
case val.includes('/'):
|
||||
hour.cronEvery = '2';
|
||||
hour.incrementStart = val.split('/')[0];
|
||||
hour.incrementIncrement = val.split('/')[1];
|
||||
break;
|
||||
hour.cronEvery = '2'
|
||||
hour.incrementStart = val.split('/')[0]
|
||||
hour.incrementIncrement = val.split('/')[1]
|
||||
break
|
||||
case val.includes(','):
|
||||
hour.cronEvery = '3';
|
||||
hour.specificSpecific = val.split(',').map(Number).sort();
|
||||
break;
|
||||
hour.cronEvery = '3'
|
||||
hour.specificSpecific = val.split(',').map(Number).sort()
|
||||
break
|
||||
case val.includes('-'):
|
||||
hour.cronEvery = '4';
|
||||
hour.rangeStart = val.split('-')[0];
|
||||
hour.rangeEnd = val.split('-')[1];
|
||||
break;
|
||||
hour.cronEvery = '4'
|
||||
hour.rangeStart = val.split('-')[0]
|
||||
hour.rangeEnd = val.split('-')[1]
|
||||
break
|
||||
default:
|
||||
hour.cronEvery = '1';
|
||||
hour.cronEvery = '1'
|
||||
}
|
||||
this.result.hour = hour;
|
||||
this.result.hour = hour
|
||||
},
|
||||
daysReverseExp(cron) {
|
||||
let days = cron.split(" ")[3];
|
||||
let weeks = cron.split(" ")[5];
|
||||
let days = cron.split(' ')[3]
|
||||
let weeks = cron.split(' ')[5]
|
||||
let day ={
|
||||
cronEvery:'',
|
||||
incrementStart:1,
|
||||
@@ -679,7 +679,7 @@
|
||||
cronLastSpecificDomDay:1,
|
||||
cronDaysBeforeEomMinus:1,
|
||||
cronDaysNearestWeekday:1,
|
||||
};
|
||||
}
|
||||
let week = {
|
||||
cronEvery:'',
|
||||
incrementStart:1,
|
||||
@@ -687,80 +687,80 @@
|
||||
specificSpecific:[],
|
||||
cronNthDayDay:1,
|
||||
cronNthDayNth:'1',
|
||||
};
|
||||
}
|
||||
if (!days.includes('?')) {
|
||||
switch (true) {
|
||||
case days.includes('*'):
|
||||
day.cronEvery = '1';
|
||||
break;
|
||||
day.cronEvery = '1'
|
||||
break
|
||||
case days.includes('?'):
|
||||
// 2、4、11
|
||||
break;
|
||||
break
|
||||
case days.includes('/'):
|
||||
day.cronEvery = '3';
|
||||
day.incrementStart = days.split('/')[0];
|
||||
day.incrementIncrement = days.split('/')[1];
|
||||
break;
|
||||
day.cronEvery = '3'
|
||||
day.incrementStart = days.split('/')[0]
|
||||
day.incrementIncrement = days.split('/')[1]
|
||||
break
|
||||
case days.includes(','):
|
||||
day.cronEvery = '5';
|
||||
day.specificSpecific = days.split(',').map(Number).sort();
|
||||
day.cronEvery = '5'
|
||||
day.specificSpecific = days.split(',').map(Number).sort()
|
||||
// day.specificSpecific.forEach(function (value, index) {
|
||||
// day.specificSpecific[index] = value -1;
|
||||
// });
|
||||
break;
|
||||
break
|
||||
case days.includes('LW'):
|
||||
day.cronEvery = '7';
|
||||
break;
|
||||
day.cronEvery = '7'
|
||||
break
|
||||
case days.includes('L-'):
|
||||
day.cronEvery = '9';
|
||||
day.cronDaysBeforeEomMinus = days.split('L-')[1];
|
||||
break;
|
||||
day.cronEvery = '9'
|
||||
day.cronDaysBeforeEomMinus = days.split('L-')[1]
|
||||
break
|
||||
case days.includes('L'):
|
||||
|
||||
//alert(days);
|
||||
if(days.len == 1){
|
||||
day.cronEvery = '6';
|
||||
day.cronLastSpecificDomDay = '1';
|
||||
day.cronEvery = '6'
|
||||
day.cronLastSpecificDomDay = '1'
|
||||
}
|
||||
else
|
||||
{
|
||||
day.cronEvery = '8';
|
||||
day.cronLastSpecificDomDay = Number(days.split('L')[0]);
|
||||
day.cronEvery = '8'
|
||||
day.cronLastSpecificDomDay = Number(days.split('L')[0])
|
||||
}
|
||||
break;
|
||||
break
|
||||
case days.includes('W'):
|
||||
day.cronEvery = '10';
|
||||
day.cronDaysNearestWeekday = days.split('W')[0];
|
||||
break;
|
||||
day.cronEvery = '10'
|
||||
day.cronDaysNearestWeekday = days.split('W')[0]
|
||||
break
|
||||
default:
|
||||
day.cronEvery = '1';
|
||||
day.cronEvery = '1'
|
||||
}
|
||||
}else {
|
||||
switch (true){
|
||||
case weeks.includes('/'):
|
||||
day.cronEvery = '2';
|
||||
week.incrementStart = weeks.split("/")[0];
|
||||
week.incrementIncrement = weeks.split("/")[1];
|
||||
break;
|
||||
day.cronEvery = '2'
|
||||
week.incrementStart = weeks.split('/')[0]
|
||||
week.incrementIncrement = weeks.split('/')[1]
|
||||
break
|
||||
case weeks.includes(','):
|
||||
day.cronEvery = '4';
|
||||
week.specificSpecific = weeks.split(',').map(Number).sort();
|
||||
break;
|
||||
day.cronEvery = '4'
|
||||
week.specificSpecific = weeks.split(',').map(Number).sort()
|
||||
break
|
||||
case '#':
|
||||
day.cronEvery = '11';
|
||||
week.cronNthDayDay = weeks.split("#")[0];
|
||||
week.cronNthDayNth = weeks.split("#")[1];
|
||||
break;
|
||||
day.cronEvery = '11'
|
||||
week.cronNthDayDay = weeks.split('#')[0]
|
||||
week.cronNthDayNth = weeks.split('#')[1]
|
||||
break
|
||||
default:
|
||||
day.cronEvery = '1';
|
||||
week.cronEvery = '1';
|
||||
day.cronEvery = '1'
|
||||
week.cronEvery = '1'
|
||||
}
|
||||
}
|
||||
this.result.day = day;
|
||||
this.result.week = week;
|
||||
this.result.day = day
|
||||
this.result.week = week
|
||||
},
|
||||
monthsReverseExp(cron) {
|
||||
let months = cron.split(" ")[4];
|
||||
let months = cron.split(' ')[4]
|
||||
let month = {
|
||||
cronEvery:'',
|
||||
incrementStart:3,
|
||||
@@ -768,32 +768,32 @@
|
||||
rangeStart:1,
|
||||
rangeEnd:1,
|
||||
specificSpecific:[],
|
||||
};
|
||||
}
|
||||
switch (true){
|
||||
case months.includes('*'):
|
||||
month.cronEvery = '1';
|
||||
break;
|
||||
month.cronEvery = '1'
|
||||
break
|
||||
case months.includes('/'):
|
||||
month.cronEvery = '2';
|
||||
month.incrementStart = months.split('/')[0];
|
||||
month.incrementIncrement = months.split('/')[1];
|
||||
break;
|
||||
month.cronEvery = '2'
|
||||
month.incrementStart = months.split('/')[0]
|
||||
month.incrementIncrement = months.split('/')[1]
|
||||
break
|
||||
case months.includes(','):
|
||||
month.cronEvery = '3';
|
||||
month.specificSpecific = months.split(',').map(Number).sort();
|
||||
break;
|
||||
month.cronEvery = '3'
|
||||
month.specificSpecific = months.split(',').map(Number).sort()
|
||||
break
|
||||
case months.includes('-'):
|
||||
month.cronEvery = '4';
|
||||
month.rangeStart = months.split('-')[0];
|
||||
month.rangeEnd = months.split('-')[1];
|
||||
break;
|
||||
month.cronEvery = '4'
|
||||
month.rangeStart = months.split('-')[0]
|
||||
month.rangeEnd = months.split('-')[1]
|
||||
break
|
||||
default:
|
||||
month.cronEvery = '1';
|
||||
month.cronEvery = '1'
|
||||
}
|
||||
this.result.month = month;
|
||||
this.result.month = month
|
||||
},
|
||||
yearReverseExp(cron) {
|
||||
let years = cron.split(" ")[6];
|
||||
let years = cron.split(' ')[6]
|
||||
let year = {
|
||||
cronEvery:'',
|
||||
incrementStart:3,
|
||||
@@ -801,29 +801,29 @@
|
||||
rangeStart:2019,
|
||||
rangeEnd:2019,
|
||||
specificSpecific:[],
|
||||
};
|
||||
}
|
||||
switch (true){
|
||||
case years.includes('*'):
|
||||
year.cronEvery = '1';
|
||||
break;
|
||||
year.cronEvery = '1'
|
||||
break
|
||||
case years.includes('/'):
|
||||
year.cronEvery = '2';
|
||||
year.incrementStart = years.split('/')[0];
|
||||
year.incrementIncrement = years.split('/')[1];
|
||||
break;
|
||||
year.cronEvery = '2'
|
||||
year.incrementStart = years.split('/')[0]
|
||||
year.incrementIncrement = years.split('/')[1]
|
||||
break
|
||||
case years.includes(','):
|
||||
year.cronEvery = '3';
|
||||
year.specificSpecific = years.split(',').map(Number).sort();
|
||||
break;
|
||||
year.cronEvery = '3'
|
||||
year.specificSpecific = years.split(',').map(Number).sort()
|
||||
break
|
||||
case years.includes('-'):
|
||||
year.cronEvery = '4';
|
||||
year.rangeStart = years.split('-')[0];
|
||||
year.rangeEnd = years.split('-')[1];
|
||||
break;
|
||||
year.cronEvery = '4'
|
||||
year.rangeStart = years.split('-')[0]
|
||||
year.rangeEnd = years.split('-')[1]
|
||||
break
|
||||
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'
|
||||
|
||||
export default {
|
||||
name: "BasicLayout",
|
||||
name: 'BasicLayout',
|
||||
components: {
|
||||
GlobalLayout
|
||||
},
|
||||
|
||||
@@ -6,15 +6,15 @@
|
||||
|
||||
<script>
|
||||
import Vue from 'vue'
|
||||
import { ACCESS_TOKEN } from "@/store/mutation-types"
|
||||
import { ACCESS_TOKEN } from '@/store/mutation-types'
|
||||
|
||||
export default {
|
||||
name: "IframePageContent",
|
||||
name: 'IframePageContent',
|
||||
inject:['closeCurrent'],
|
||||
data () {
|
||||
return {
|
||||
url: "",
|
||||
id:""
|
||||
url: '',
|
||||
id:''
|
||||
}
|
||||
},
|
||||
created () {
|
||||
@@ -25,7 +25,7 @@
|
||||
},
|
||||
watch: {
|
||||
$route(to, from) {
|
||||
this.goUrl();
|
||||
this.goUrl()
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
@@ -34,19 +34,19 @@
|
||||
let id = this.$route.path
|
||||
this.id = id
|
||||
//url = "http://www.baidu.com"
|
||||
console.log("------url------"+url)
|
||||
console.log('------url------'+url)
|
||||
if (url !== null && url !== undefined) {
|
||||
this.url = url;
|
||||
this.url = url
|
||||
/*update_begin author:wuxianquan date:20190908 for:判断打开方式,新窗口打开时this.$route.meta.internalOrExternal==true */
|
||||
if(this.$route.meta.internalOrExternal != undefined && this.$route.meta.internalOrExternal==true){
|
||||
this.closeCurrent();
|
||||
this.closeCurrent()
|
||||
//外部url加入token
|
||||
let tokenStr = "${token}";
|
||||
let tokenStr = '${token}'
|
||||
if(url.indexOf(tokenStr)!=-1){
|
||||
let token = Vue.ls.get(ACCESS_TOKEN);
|
||||
this.url = url.replace(tokenStr,token);
|
||||
let token = Vue.ls.get(ACCESS_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 */
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
import RouteView from './RouteView'
|
||||
|
||||
export default {
|
||||
name: "PageContent",
|
||||
name: 'PageContent',
|
||||
components: {
|
||||
RouteView,
|
||||
PageLayout
|
||||
|
||||
@@ -9,10 +9,10 @@
|
||||
|
||||
<script>
|
||||
import Vue from 'vue'
|
||||
import { CACHE_INCLUDED_ROUTES } from "@/store/mutation-types"
|
||||
import { CACHE_INCLUDED_ROUTES } from '@/store/mutation-types'
|
||||
|
||||
export default {
|
||||
name: "RouteView",
|
||||
name: 'RouteView',
|
||||
computed: {
|
||||
//update-begin--Author:scott Date:20201015 for:路由缓存问题,关闭了tab页时再打开就不刷新 #842
|
||||
includedComponents() {
|
||||
@@ -24,10 +24,10 @@
|
||||
cacheRouterArray.push(this.$route.meta.componentName)
|
||||
// cacheRouterArray.push("OnlCgformHeadList")
|
||||
Vue.ls.set(CACHE_INCLUDED_ROUTES, cacheRouterArray)
|
||||
return cacheRouterArray;
|
||||
return cacheRouterArray
|
||||
}
|
||||
}
|
||||
return includedRouters;
|
||||
return includedRouters
|
||||
},
|
||||
//update-end--Author:scott Date:20201015 for:路由缓存问题,关闭了tab页时再打开就不刷新 #842
|
||||
keepAlive () {
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
import { triggerWindowResizeEvent } from '@/utils/util'
|
||||
const indexKey = '/dashboard/analysis'
|
||||
import Vue from 'vue'
|
||||
import { CACHE_INCLUDED_ROUTES } from "@/store/mutation-types"
|
||||
import { CACHE_INCLUDED_ROUTES } from '@/store/mutation-types'
|
||||
|
||||
export default {
|
||||
name: 'TabLayout',
|
||||
@@ -171,7 +171,7 @@
|
||||
|
||||
// update-begin-author:sunjianlei date:20200120 for: 动态更改页面标题
|
||||
changeTitle(title) {
|
||||
let projectTitle = "Jero-Boot 企业级快速开发平台"
|
||||
let projectTitle = 'Jero-Boot 企业级快速开发平台'
|
||||
// 首页特殊处理
|
||||
if (this.$route.path === indexKey) {
|
||||
document.title = projectTitle
|
||||
@@ -206,7 +206,7 @@
|
||||
this.$message.warning('这是最后一页,不能再关闭了啦')
|
||||
return
|
||||
}
|
||||
console.log("this.pageList ",this.pageList );
|
||||
console.log('this.pageList ',this.pageList )
|
||||
let removeRoute = this.pageList.filter(item => item.fullPath == key)
|
||||
this.pageList = this.pageList.filter(item => item.fullPath !== key)
|
||||
let index = this.linkList.indexOf(key)
|
||||
@@ -219,8 +219,8 @@
|
||||
let cacheRouterArray = Vue.ls.get(CACHE_INCLUDED_ROUTES) || []
|
||||
if (removeRoute && removeRoute[0]) {
|
||||
let componentName = removeRoute[0].meta.componentName
|
||||
console.log("key: ", key);
|
||||
console.log("componentName: ", componentName);
|
||||
console.log('key: ', key)
|
||||
console.log('componentName: ', componentName)
|
||||
if(cacheRouterArray.includes(componentName)){
|
||||
cacheRouterArray.splice(cacheRouterArray.findIndex(item => item === componentName), 1)
|
||||
Vue.ls.set(CACHE_INCLUDED_ROUTES, cacheRouterArray)
|
||||
@@ -266,7 +266,7 @@
|
||||
},
|
||||
/* update_begin author:wuxianquan date:20190828 for: 关闭当前tab页,供子页面调用->望菜单能配置外链,直接弹出新页面而不是嵌入iframe #428 */
|
||||
closeCurrent(){
|
||||
this.remove(this.activePage);
|
||||
this.remove(this.activePage)
|
||||
},
|
||||
/* update_end author:wuxianquan date:20190828 for: 关闭当前tab页,供子页面调用->望菜单能配置外链,直接弹出新页面而不是嵌入iframe #428 */
|
||||
closeOthers(pageKey) {
|
||||
@@ -324,7 +324,7 @@
|
||||
//update-begin-author:taoyan date:20191008 for:路由刷新
|
||||
routeReload(){
|
||||
this.reloadFlag = false
|
||||
let ToggleMultipage = "ToggleMultipage"
|
||||
let ToggleMultipage = 'ToggleMultipage'
|
||||
this.$store.dispatch(ToggleMultipage,false)
|
||||
this.$nextTick(()=>{
|
||||
this.$store.dispatch(ToggleMultipage,true)
|
||||
|
||||
@@ -32,11 +32,11 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import RouteView from "@/components/layouts/RouteView"
|
||||
import RouteView from '@/components/layouts/RouteView'
|
||||
import { mixinDevice } from '@/utils/mixin.js'
|
||||
|
||||
export default {
|
||||
name: "UserLayout",
|
||||
name: 'UserLayout',
|
||||
components: { RouteView },
|
||||
mixins: [mixinDevice],
|
||||
data () {
|
||||
@@ -53,27 +53,27 @@
|
||||
}
|
||||
// 判断当前设备
|
||||
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判断是否是手机
|
||||
for (var v = 0; v < mobileAgents.length; v++) {
|
||||
if (userAgentInfo.indexOf(mobileAgents[v]) > 0) {
|
||||
mobile_flag = true;
|
||||
break;
|
||||
mobile_flag = true
|
||||
break
|
||||
}
|
||||
}
|
||||
var screen_width = window.screen.width;
|
||||
var screen_height = window.screen.height;
|
||||
var screen_width = window.screen.width
|
||||
var screen_height = window.screen.height
|
||||
|
||||
//根据屏幕分辨率判断是否是手机
|
||||
if (screen_width < 500 && screen_height < 800) {
|
||||
mobile_flag = true;
|
||||
mobile_flag = true
|
||||
}
|
||||
return mobile_flag;
|
||||
return mobile_flag
|
||||
}
|
||||
</script>
|
||||
<style lang="less" >
|
||||
|
||||
@@ -19,13 +19,13 @@
|
||||
</template>
|
||||
|
||||
<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 SMenu from './index'
|
||||
import { mixin, mixinDevice } from '@/utils/mixin.js'
|
||||
|
||||
export default {
|
||||
name: "SideMenu",
|
||||
name: 'SideMenu',
|
||||
components: { ALayoutSider, Logo, SMenu },
|
||||
mixins: [mixin, mixinDevice],
|
||||
props: {
|
||||
|
||||
@@ -89,7 +89,7 @@ export default {
|
||||
})
|
||||
}
|
||||
//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)
|
||||
}
|
||||
//update-end-author:taoyan date:20190510 for:online表单菜单点击展开的一级目录不对
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "LayoutFooter"
|
||||
name: 'LayoutFooter'
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
@@ -44,9 +44,9 @@
|
||||
import Breadcrumb from '@/components/tools/Breadcrumb'
|
||||
|
||||
export default {
|
||||
name: "PageHeader",
|
||||
name: 'PageHeader',
|
||||
components: {
|
||||
"s-breadcrumb": Breadcrumb
|
||||
's-breadcrumb': Breadcrumb
|
||||
},
|
||||
props: {
|
||||
title: {
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
import PageHeader from './PageHeader'
|
||||
|
||||
export default {
|
||||
name: "LayoutContent",
|
||||
name: 'LayoutContent',
|
||||
components: {
|
||||
PageHeader
|
||||
},
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "HeaderNotice",
|
||||
name: 'HeaderNotice',
|
||||
props: {
|
||||
tabs: {
|
||||
type: Array,
|
||||
|
||||
@@ -169,12 +169,12 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import DetailList from "@/components/tools/DetailList";
|
||||
import SettingItem from "@/components/setting/SettingItem";
|
||||
import config from "@/defaultSettings";
|
||||
import { updateTheme, updateColorWeak, colorList } from "@/components/tools/setting";
|
||||
import { mixin, mixinDevice } from "@/utils/mixin.js";
|
||||
import { triggerWindowResizeEvent } from "@/utils/util";
|
||||
import DetailList from '@/components/tools/DetailList'
|
||||
import SettingItem from '@/components/setting/SettingItem'
|
||||
import config from '@/defaultSettings'
|
||||
import { updateTheme, updateColorWeak, colorList } from '@/components/tools/setting'
|
||||
import { mixin, mixinDevice } from '@/utils/mixin.js'
|
||||
import { triggerWindowResizeEvent } from '@/utils/util'
|
||||
|
||||
export default {
|
||||
components: {
|
||||
@@ -187,71 +187,71 @@ export default {
|
||||
visible: false,
|
||||
colorList,
|
||||
dataFixSiderbar: false
|
||||
};
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
// 当主题色不是默认色时,才进行主题编译
|
||||
if (this.primaryColor !== config.primaryColor) {
|
||||
updateTheme(this.primaryColor);
|
||||
updateTheme(this.primaryColor)
|
||||
}
|
||||
if (this.colorWeak !== config.colorWeak) {
|
||||
updateColorWeak(this.colorWeak);
|
||||
updateColorWeak(this.colorWeak)
|
||||
}
|
||||
if (this.multipage !== config.multipage) {
|
||||
this.$store.dispatch("ToggleMultipage", this.multipage);
|
||||
this.$store.dispatch('ToggleMultipage', this.multipage)
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
showDrawer() {
|
||||
this.visible = true;
|
||||
this.visible = true
|
||||
},
|
||||
onClose() {
|
||||
this.visible = false;
|
||||
this.visible = false
|
||||
},
|
||||
toggle() {
|
||||
this.visible = !this.visible;
|
||||
this.visible = !this.visible
|
||||
},
|
||||
onColorWeak(checked) {
|
||||
this.$store.dispatch("ToggleWeak", checked);
|
||||
updateColorWeak(checked);
|
||||
this.$store.dispatch('ToggleWeak', checked)
|
||||
updateColorWeak(checked)
|
||||
},
|
||||
onMultipageWeak(checked) {
|
||||
this.$store.dispatch("ToggleMultipage", checked);
|
||||
this.$store.dispatch('ToggleMultipage', checked)
|
||||
},
|
||||
handleMenuTheme(theme) {
|
||||
this.$store.dispatch("ToggleTheme", theme);
|
||||
this.$store.dispatch('ToggleTheme', theme)
|
||||
},
|
||||
handleLayout(mode) {
|
||||
this.$store.dispatch("ToggleLayoutMode", mode);
|
||||
this.$store.dispatch('ToggleLayoutMode', mode)
|
||||
// 因为顶部菜单不能固定左侧菜单栏,所以强制关闭
|
||||
this.handleFixSiderbar(false);
|
||||
this.handleFixSiderbar(false)
|
||||
// 触发窗口resize事件
|
||||
triggerWindowResizeEvent();
|
||||
triggerWindowResizeEvent()
|
||||
},
|
||||
handleContentWidthChange(type) {
|
||||
this.$store.dispatch("ToggleContentWidth", type);
|
||||
this.$store.dispatch('ToggleContentWidth', type)
|
||||
},
|
||||
changeColor(color) {
|
||||
if (this.primaryColor !== color) {
|
||||
this.$store.dispatch("ToggleColor", color);
|
||||
updateTheme(color);
|
||||
this.$store.dispatch('ToggleColor', color)
|
||||
updateTheme(color)
|
||||
}
|
||||
},
|
||||
handleFixedHeader(fixed) {
|
||||
this.$store.dispatch("ToggleFixedHeader", fixed);
|
||||
this.$store.dispatch('ToggleFixedHeader', fixed)
|
||||
},
|
||||
handleFixedHeaderHidden(autoHidden) {
|
||||
this.$store.dispatch("ToggleFixedHeaderHidden", autoHidden);
|
||||
this.$store.dispatch('ToggleFixedHeaderHidden', autoHidden)
|
||||
},
|
||||
handleFixSiderbar(fixed) {
|
||||
if (this.layoutMode === "topmenu") {
|
||||
fixed = false;
|
||||
if (this.layoutMode === 'topmenu') {
|
||||
fixed = false
|
||||
}
|
||||
this.dataFixSiderbar = fixed
|
||||
this.$store.dispatch('ToggleFixSiderbar', fixed)
|
||||
}
|
||||
this.dataFixSiderbar = fixed;
|
||||
this.$store.dispatch("ToggleFixSiderbar", fixed);
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "SettingItem",
|
||||
name: 'SettingItem',
|
||||
props: {
|
||||
title: {
|
||||
type: String,
|
||||
|
||||
@@ -43,14 +43,14 @@
|
||||
import { getAction,putAction } from '@/api/manage'
|
||||
import Vue from 'vue'
|
||||
import store from '@/store/'
|
||||
import { USER_INFO } from "@/store/mutation-types"
|
||||
import { USER_INFO } from '@/store/mutation-types'
|
||||
|
||||
export default {
|
||||
name: 'DepartSelect',
|
||||
props:{
|
||||
title:{
|
||||
type:String,
|
||||
default:"部门选择",
|
||||
default:'部门选择',
|
||||
required:false
|
||||
},
|
||||
closable:{
|
||||
@@ -60,7 +60,7 @@
|
||||
},
|
||||
username:{
|
||||
type:String,
|
||||
default:"",
|
||||
default:'',
|
||||
required:false
|
||||
}
|
||||
},
|
||||
@@ -76,9 +76,9 @@
|
||||
currTitle:this.title,
|
||||
visible:false,
|
||||
departList:[],
|
||||
departSelected:"",
|
||||
validate_status:"",
|
||||
currDepartName:"",
|
||||
departSelected:'',
|
||||
validate_status:'',
|
||||
currDepartName:'',
|
||||
}
|
||||
},
|
||||
created(){
|
||||
@@ -87,7 +87,7 @@
|
||||
methods:{
|
||||
loadDepartList(){
|
||||
return new Promise(resolve => {
|
||||
let url = "/sys/user/getCurrentUserDeparts"
|
||||
let url = '/sys/user/getCurrentUserDeparts'
|
||||
this.currDepartName=''
|
||||
getAction(url).then(res=>{
|
||||
if(res.success){
|
||||
@@ -104,7 +104,7 @@
|
||||
this.departSelected = orgCode
|
||||
this.departList = departs
|
||||
if(this.currDepartName){
|
||||
this.currTitle ="部门切换(当前部门 : "+this.currDepartName+")"
|
||||
this.currTitle ='部门切换(当前部门 : '+this.currDepartName+')'
|
||||
}
|
||||
|
||||
}
|
||||
@@ -124,11 +124,11 @@
|
||||
orgCode:this.departSelected,
|
||||
username:this.username
|
||||
}
|
||||
putAction("/sys/selectDepart",obj).then(res=>{
|
||||
putAction('/sys/selectDepart',obj).then(res=>{
|
||||
if(res.success){
|
||||
const userInfo = res.result.userInfo;
|
||||
Vue.ls.set(USER_INFO, userInfo, 7 * 24 * 60 * 60 * 1000);
|
||||
store.commit('SET_INFO', userInfo);
|
||||
const userInfo = res.result.userInfo
|
||||
Vue.ls.set(USER_INFO, userInfo, 7 * 24 * 60 * 60 * 1000)
|
||||
store.commit('SET_INFO', userInfo)
|
||||
//console.log("---切换组织机构---userInfo-------",store.getters.userInfo.orgCode);
|
||||
this.departClear()
|
||||
}
|
||||
@@ -139,17 +139,17 @@
|
||||
this.loadDepartList().then(()=>{
|
||||
this.visible=true
|
||||
if(!this.departList || this.departList.length<=0){
|
||||
this.$message.warning("您尚未设置部门信息!")
|
||||
this.$message.warning('您尚未设置部门信息!')
|
||||
this.departClear()
|
||||
}
|
||||
})
|
||||
},
|
||||
departClear(){
|
||||
this.departList=[]
|
||||
this.departSelected=""
|
||||
this.departSelected=''
|
||||
this.visible=false
|
||||
this.validate_status=''
|
||||
this.currDepartName=""
|
||||
this.currDepartName=''
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
}
|
||||
|
||||
export default {
|
||||
name: "DetailList",
|
||||
name: 'DetailList',
|
||||
Item: Item,
|
||||
components: {
|
||||
Col
|
||||
|
||||
@@ -84,7 +84,7 @@
|
||||
|
||||
|
||||
export default {
|
||||
name: "HeaderNotice",
|
||||
name: 'HeaderNotice',
|
||||
components: {
|
||||
DynamicNotice,
|
||||
// ShowAnnouncement,
|
||||
@@ -93,17 +93,17 @@
|
||||
return {
|
||||
loadding: false,
|
||||
url:{
|
||||
listCementByUser:"/sys/annountCement/listByUser",
|
||||
editCementSend:"/sys/sysAnnouncementSend/editByAnntIdAndUserId",
|
||||
queryById:"/sys/annountCement/queryById",
|
||||
listCementByUser:'/sys/annountCement/listByUser',
|
||||
editCementSend:'/sys/sysAnnouncementSend/editByAnntIdAndUserId',
|
||||
queryById:'/sys/annountCement/queryById',
|
||||
},
|
||||
hovered: false,
|
||||
announcement1:[],
|
||||
announcement2:[],
|
||||
msg1Count:"0",
|
||||
msg2Count:"0",
|
||||
msg1Title:"通知(0)",
|
||||
msg2Title:"",
|
||||
msg1Count:'0',
|
||||
msg2Count:'0',
|
||||
msg1Title:'通知(0)',
|
||||
msg2Title:'',
|
||||
stopTimer:false,
|
||||
websock: null,
|
||||
lockReconnect:false,
|
||||
@@ -114,26 +114,26 @@
|
||||
},
|
||||
computed:{
|
||||
msgTotal () {
|
||||
return parseInt(this.msg1Count)+parseInt(this.msg2Count);
|
||||
return parseInt(this.msg1Count)+parseInt(this.msg2Count)
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.loadData();
|
||||
this.loadData()
|
||||
//this.timerFun();
|
||||
this.initWebSocket();
|
||||
this.initWebSocket()
|
||||
// this.heartCheckFun();
|
||||
},
|
||||
destroyed: function () { // 离开页面生命周期函数
|
||||
this.websocketOnclose();
|
||||
this.websocketOnclose()
|
||||
},
|
||||
methods: {
|
||||
timerFun() {
|
||||
this.stopTimer = false;
|
||||
this.stopTimer = false
|
||||
let myTimer = setInterval(()=>{
|
||||
// 停止定时器
|
||||
if (this.stopTimer == true) {
|
||||
clearInterval(myTimer);
|
||||
return;
|
||||
clearInterval(myTimer)
|
||||
return
|
||||
}
|
||||
this.loadData()
|
||||
},6000)
|
||||
@@ -143,21 +143,21 @@
|
||||
// 获取系统消息
|
||||
getAction(this.url.listCementByUser).then((res) => {
|
||||
if (res.success) {
|
||||
this.announcement1 = res.result.anntMsgList;
|
||||
this.msg1Count = res.result.anntMsgTotal;
|
||||
this.msg1Title = "通知(" + res.result.anntMsgTotal + ")";
|
||||
this.announcement2 = res.result.sysMsgList;
|
||||
this.msg2Count = res.result.sysMsgTotal;
|
||||
this.msg2Title = "系统消息(" + res.result.sysMsgTotal + ")";
|
||||
this.announcement1 = res.result.anntMsgList
|
||||
this.msg1Count = res.result.anntMsgTotal
|
||||
this.msg1Title = '通知(' + res.result.anntMsgTotal + ')'
|
||||
this.announcement2 = res.result.sysMsgList
|
||||
this.msg2Count = res.result.sysMsgTotal
|
||||
this.msg2Title = '系统消息(' + res.result.sysMsgTotal + ')'
|
||||
}
|
||||
}).catch(error => {
|
||||
console.log("系统消息通知异常",error);//这行打印permissionName is undefined
|
||||
this.stopTimer = true;
|
||||
console.log("清理timer");
|
||||
});
|
||||
console.log('系统消息通知异常',error)//这行打印permissionName is undefined
|
||||
this.stopTimer = true
|
||||
console.log('清理timer')
|
||||
})
|
||||
} catch (err) {
|
||||
this.stopTimer = true;
|
||||
console.log("通知异常",err);
|
||||
this.stopTimer = true
|
||||
console.log('通知异常',err)
|
||||
}
|
||||
},
|
||||
fetchNotice () {
|
||||
@@ -173,14 +173,14 @@
|
||||
showAnnouncement(record){
|
||||
putAction(this.url.editCementSend,{anntId:record.id}).then((res)=>{
|
||||
if(res.success){
|
||||
this.loadData();
|
||||
this.loadData()
|
||||
}
|
||||
});
|
||||
this.hovered = false;
|
||||
})
|
||||
this.hovered = false
|
||||
if(record.openType==='component'){
|
||||
this.openPath = record.openPage;
|
||||
this.formData = {id:record.busId};
|
||||
this.$refs.showDynamNotice.detail(record.openPage);
|
||||
this.openPath = record.openPage
|
||||
this.formData = {id:record.busId}
|
||||
this.$refs.showDynamNotice.detail(record.openPage)
|
||||
}else{
|
||||
// this.$refs.ShowAnnouncement.detail(record);
|
||||
}
|
||||
@@ -188,65 +188,65 @@
|
||||
toMyAnnouncement(){
|
||||
this.$router.push({
|
||||
path: '/isps/userAnnouncement'
|
||||
});
|
||||
})
|
||||
},
|
||||
modalFormOk(){
|
||||
},
|
||||
handleHoverChange (visible) {
|
||||
this.hovered = visible;
|
||||
this.hovered = visible
|
||||
},
|
||||
|
||||
initWebSocket: function () {
|
||||
// WebSocket与普通的请求所用协议有所不同,ws等同于http,wss等同于https
|
||||
var userId = store.getters.userInfo.id;
|
||||
var url = window._CONFIG['domianWebSocketURL'].replace("https://","wss://").replace("http://","ws://")+"/websocket/"+userId;
|
||||
var userId = store.getters.userInfo.id
|
||||
var url = window._CONFIG['domianWebSocketURL'].replace('https://','wss://').replace('http://','ws://')+'/websocket/'+userId
|
||||
//console.log(url);
|
||||
this.websock = new WebSocket(url);
|
||||
this.websock.onopen = this.websocketOnopen;
|
||||
this.websock.onerror = this.websocketOnerror;
|
||||
this.websock.onmessage = this.websocketOnmessage;
|
||||
this.websock.onclose = this.websocketOnclose;
|
||||
this.websock = new WebSocket(url)
|
||||
this.websock.onopen = this.websocketOnopen
|
||||
this.websock.onerror = this.websocketOnerror
|
||||
this.websock.onmessage = this.websocketOnmessage
|
||||
this.websock.onclose = this.websocketOnclose
|
||||
},
|
||||
websocketOnopen: function () {
|
||||
console.log("WebSocket连接成功");
|
||||
console.log('WebSocket连接成功')
|
||||
//心跳检测重置
|
||||
//this.heartCheck.reset().start();
|
||||
},
|
||||
websocketOnerror: function (e) {
|
||||
console.log("WebSocket连接发生错误");
|
||||
this.reconnect();
|
||||
console.log('WebSocket连接发生错误')
|
||||
this.reconnect()
|
||||
},
|
||||
websocketOnmessage: function (e) {
|
||||
console.log("-----接收消息-------",e.data);
|
||||
var data = eval("(" + e.data + ")"); //解析对象
|
||||
if(data.cmd == "topic"){
|
||||
console.log('-----接收消息-------',e.data)
|
||||
var data = eval('(' + e.data + ')') //解析对象
|
||||
if(data.cmd == 'topic'){
|
||||
//系统通知
|
||||
this.loadData();
|
||||
}else if(data.cmd == "user"){
|
||||
this.loadData()
|
||||
}else if(data.cmd == 'user'){
|
||||
//用户消息
|
||||
this.loadData();
|
||||
this.loadData()
|
||||
}
|
||||
//心跳检测重置
|
||||
//this.heartCheck.reset().start();
|
||||
},
|
||||
websocketOnclose: function (e) {
|
||||
console.log("connection closed (" + e + ")");
|
||||
console.log('connection closed (' + e + ')')
|
||||
if(e){
|
||||
console.log("connection closed (" + e.code + ")");
|
||||
console.log('connection closed (' + e.code + ')')
|
||||
}
|
||||
this.reconnect();
|
||||
this.reconnect()
|
||||
},
|
||||
websocketSend(text) { // 数据发送
|
||||
try {
|
||||
this.websock.send(text);
|
||||
this.websock.send(text)
|
||||
} catch (err) {
|
||||
console.log("send failed (" + err.code + ")");
|
||||
console.log('send failed (' + err.code + ')')
|
||||
}
|
||||
},
|
||||
|
||||
openNotification (data) {
|
||||
var text = data.msgTxt;
|
||||
const key = `open${Date.now()}`;
|
||||
var text = data.msgTxt
|
||||
const key = `open${Date.now()}`
|
||||
this.$notification.open({
|
||||
message: '消息提醒',
|
||||
placement:'bottomRight',
|
||||
@@ -263,39 +263,39 @@
|
||||
}
|
||||
}, '查看详情')
|
||||
},
|
||||
});
|
||||
})
|
||||
},
|
||||
|
||||
reconnect() {
|
||||
var that = this;
|
||||
if(that.lockReconnect) return;
|
||||
that.lockReconnect = true;
|
||||
var that = this
|
||||
if(that.lockReconnect) return
|
||||
that.lockReconnect = true
|
||||
//没连接上会一直重连,设置延迟避免请求过多
|
||||
setTimeout(function () {
|
||||
console.info("尝试重连...");
|
||||
that.initWebSocket();
|
||||
that.lockReconnect = false;
|
||||
}, 5000);
|
||||
console.info('尝试重连...')
|
||||
that.initWebSocket()
|
||||
that.lockReconnect = false
|
||||
}, 5000)
|
||||
},
|
||||
heartCheckFun(){
|
||||
var that = this;
|
||||
var that = this
|
||||
//心跳检测,每20s心跳一次
|
||||
that.heartCheck = {
|
||||
timeout: 20000,
|
||||
timeoutObj: null,
|
||||
serverTimeoutObj: null,
|
||||
reset: function(){
|
||||
clearTimeout(this.timeoutObj);
|
||||
clearTimeout(this.timeoutObj)
|
||||
//clearTimeout(this.serverTimeoutObj);
|
||||
return this;
|
||||
return this
|
||||
},
|
||||
start: function(){
|
||||
var self = this;
|
||||
var self = this
|
||||
this.timeoutObj = setTimeout(function(){
|
||||
//这里发送一个心跳,后端收到后,返回一个心跳消息,
|
||||
//onmessage拿到返回的心跳就说明连接正常
|
||||
that.websocketSend("HeartBeat");
|
||||
console.info("客户端发送心跳");
|
||||
that.websocketSend('HeartBeat')
|
||||
console.info('客户端发送心跳')
|
||||
//self.serverTimeoutObj = setTimeout(function(){//如果超过一定时间还没重置,说明后端主动断开了
|
||||
// that.websock.close();//如果onclose会执行reconnect,我们执行ws.close()就行了.如果直接执行reconnect 会触发onclose导致重连两次
|
||||
//}, self.timeout)
|
||||
@@ -306,12 +306,12 @@
|
||||
|
||||
|
||||
showDetail(key,data){
|
||||
this.$notification.close(key);
|
||||
var id = data.msgId;
|
||||
this.$notification.close(key)
|
||||
var id = data.msgId
|
||||
getAction(this.url.queryById,{id:id}).then((res) => {
|
||||
if (res.success) {
|
||||
var record = res.result;
|
||||
this.showAnnouncement(record);
|
||||
var record = res.result
|
||||
this.showAnnouncement(record)
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
@@ -24,12 +24,12 @@
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "SysAnnouncementModal",
|
||||
name: 'SysAnnouncementModal',
|
||||
components: {
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
title:"通知消息",
|
||||
title:'通知消息',
|
||||
record: {},
|
||||
labelCol: {
|
||||
xs: { span: 24 },
|
||||
@@ -43,9 +43,9 @@
|
||||
switchFullscreen: true,
|
||||
loading: false,
|
||||
bodyStyle:{
|
||||
padding: "0",
|
||||
height:(window.innerHeight*0.8)+"px",
|
||||
"overflow-y":"auto",
|
||||
padding: '0',
|
||||
height:(window.innerHeight*0.8)+'px',
|
||||
'overflow-y':'auto',
|
||||
|
||||
},
|
||||
modelStyle:{
|
||||
@@ -59,11 +59,11 @@
|
||||
},
|
||||
methods: {
|
||||
detail (record) {
|
||||
this.visible = true;
|
||||
this.record = record;
|
||||
this.visible = true
|
||||
this.record = record
|
||||
},
|
||||
handleCancel () {
|
||||
this.visible = false;
|
||||
this.visible = false
|
||||
},
|
||||
/** 切换全屏显示 */
|
||||
handleClickToggleFullScreen() {
|
||||
@@ -79,7 +79,7 @@
|
||||
},
|
||||
toHandle(){
|
||||
if(this.record.openType==='url'){
|
||||
this.visible = false;
|
||||
this.visible = false
|
||||
//链接跳转
|
||||
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'
|
||||
|
||||
export default {
|
||||
name: "StatusSlot",
|
||||
name: 'StatusSlot',
|
||||
props: {
|
||||
/*
|
||||
* 表格行对象
|
||||
|
||||
@@ -63,16 +63,16 @@
|
||||
<script>
|
||||
import HeaderNotice from './HeaderNotice'
|
||||
import UserPassword from './UserPassword'
|
||||
import SettingDrawer from "@/components/setting/SettingDrawer";
|
||||
import SettingDrawer from '@/components/setting/SettingDrawer'
|
||||
import DepartSelect from './DepartSelect'
|
||||
import { mapActions, mapGetters,mapState } from 'vuex'
|
||||
import { mixinDevice } from '@/utils/mixin.js'
|
||||
import { getFileAccessHttpUrl,getAction } from "@/api/manage"
|
||||
import { getFileAccessHttpUrl,getAction } from '@/api/manage'
|
||||
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 {
|
||||
name: "UserMenu",
|
||||
name: 'UserMenu',
|
||||
mixins: [mixinDevice],
|
||||
data(){
|
||||
return{
|
||||
@@ -139,8 +139,8 @@
|
||||
this.shows = false
|
||||
},
|
||||
/* update_end author:zhaoxin date:20191129 for: 做头部菜单栏导航*/
|
||||
...mapActions(["Logout"]),
|
||||
...mapGetters(["nickname", "avatar","userInfo"]),
|
||||
...mapActions(['Logout']),
|
||||
...mapGetters(['nickname', 'avatar','userInfo']),
|
||||
getAvatar(){
|
||||
return getFileAccessHttpUrl(this.avatar())
|
||||
},
|
||||
@@ -153,7 +153,7 @@
|
||||
onOk() {
|
||||
return that.Logout({}).then(() => {
|
||||
// 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: 退出登录跳转登录页面
|
||||
//window.location.reload()
|
||||
}).catch(err => {
|
||||
@@ -165,7 +165,7 @@
|
||||
},
|
||||
onCancel() {
|
||||
},
|
||||
});
|
||||
})
|
||||
},
|
||||
updatePassword(){
|
||||
let username = this.userInfo().username
|
||||
@@ -180,7 +180,7 @@
|
||||
/* update_begin author:zhaoxin date:20191129 for: 做头部菜单栏导航*/
|
||||
searchMenus(arr,menus){
|
||||
for(let i of menus){
|
||||
if(!i.hidden && "layouts/RouteView"!==i.component){
|
||||
if(!i.hidden && 'layouts/RouteView'!==i.component){
|
||||
arr.push(i)
|
||||
}
|
||||
if(i.children&& i.children.length>0){
|
||||
@@ -205,20 +205,20 @@
|
||||
/*update_end author:zhaoxin date:20191129 for: 做头部菜单栏导航*/
|
||||
/*update_begin author:liushaoqian date:20200507 for: 刷新缓存*/
|
||||
clearCache(){
|
||||
getAction("sys/dict/refleshCache").then((res) => {
|
||||
getAction('sys/dict/refleshCache').then((res) => {
|
||||
if (res.success) {
|
||||
//重新加载缓存
|
||||
getAction("sys/dict/queryAllDictItems").then((res) => {
|
||||
getAction('sys/dict/queryAllDictItems').then((res) => {
|
||||
if (res.success) {
|
||||
Vue.ls.remove(UI_CACHE_DB_DICT_DATA)
|
||||
Vue.ls.set(UI_CACHE_DB_DICT_DATA, res.result, 7 * 24 * 60 * 60 * 1000)
|
||||
}
|
||||
})
|
||||
this.$message.success("刷新缓存完成!");
|
||||
this.$message.success('刷新缓存完成!')
|
||||
}
|
||||
}).catch(e=>{
|
||||
this.$message.warn("刷新缓存失败!");
|
||||
console.log("刷新失败",e)
|
||||
this.$message.warn('刷新缓存失败!')
|
||||
console.log('刷新失败',e)
|
||||
})
|
||||
}
|
||||
/*update_end author:liushaoqian date:20200507 for: 刷新缓存*/
|
||||
|
||||
@@ -42,10 +42,10 @@
|
||||
import { putAction } from '@/api/manage'
|
||||
|
||||
export default {
|
||||
name: "UserPassword",
|
||||
name: 'UserPassword',
|
||||
data () {
|
||||
return {
|
||||
title:"修改密码",
|
||||
title:'修改密码',
|
||||
modalWidth:800,
|
||||
visible: false,
|
||||
confirmLoading: false,
|
||||
@@ -81,63 +81,63 @@
|
||||
},
|
||||
|
||||
form:this.$form.createForm(this),
|
||||
url: "sys/user/updatePassword",
|
||||
username:"",
|
||||
url: 'sys/user/updatePassword',
|
||||
username:'',
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
show(uname){
|
||||
if(!uname){
|
||||
this.$message.warning("当前系统无登录用户!");
|
||||
this.$message.warning('当前系统无登录用户!')
|
||||
return
|
||||
}else{
|
||||
this.username = uname
|
||||
this.form.resetFields();
|
||||
this.visible = true;
|
||||
this.form.resetFields()
|
||||
this.visible = true
|
||||
}
|
||||
},
|
||||
handleCancel () {
|
||||
this.close()
|
||||
},
|
||||
close () {
|
||||
this.$emit('close');
|
||||
this.visible = false;
|
||||
this.disableSubmit = false;
|
||||
this.selectedRole = [];
|
||||
this.$emit('close')
|
||||
this.visible = false
|
||||
this.disableSubmit = false
|
||||
this.selectedRole = []
|
||||
},
|
||||
handleOk () {
|
||||
const that = this;
|
||||
const that = this
|
||||
// 触发表单验证
|
||||
this.form.validateFields((err, values) => {
|
||||
if (!err) {
|
||||
that.confirmLoading = true;
|
||||
that.confirmLoading = true
|
||||
let params = Object.assign({username:this.username},values)
|
||||
console.log("修改密码提交数据",params)
|
||||
console.log('修改密码提交数据',params)
|
||||
putAction(this.url,params).then((res)=>{
|
||||
if(res.success){
|
||||
console.log(res)
|
||||
that.$message.success(res.message);
|
||||
that.close();
|
||||
that.$message.success(res.message)
|
||||
that.close()
|
||||
}else{
|
||||
that.$message.warning(res.message);
|
||||
that.$message.warning(res.message)
|
||||
}
|
||||
}).finally(() => {
|
||||
that.confirmLoading = false;
|
||||
that.confirmLoading = false
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
validateToNextPassword (rule, value, callback) {
|
||||
const form = this.form;
|
||||
const form = this.form
|
||||
if (value && this.confirmDirty) {
|
||||
form.validateFields(['confirm'], { force: true })
|
||||
}
|
||||
callback();
|
||||
callback()
|
||||
},
|
||||
compareToFirstPassword (rule, value, callback) {
|
||||
const form = this.form;
|
||||
const form = this.form
|
||||
if (value && value !== form.getFieldValue('password')) {
|
||||
callback('两次输入的密码不一样!');
|
||||
callback('两次输入的密码不一样!')
|
||||
} else {
|
||||
callback()
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { message } from 'ant-design-vue/es';
|
||||
import { message } from 'ant-design-vue/es'
|
||||
// import defaultSettings from '../defaultSettings';
|
||||
|
||||
let lessNodesAppended;
|
||||
let lessNodesAppended
|
||||
|
||||
const colorList = [
|
||||
{
|
||||
@@ -28,7 +28,7 @@ const colorList = [
|
||||
{
|
||||
key: '酱紫', color: '#722ED1',
|
||||
},
|
||||
];
|
||||
]
|
||||
|
||||
const updateTheme = primaryColor => {
|
||||
// Don't compile less in production!
|
||||
@@ -37,33 +37,33 @@ const updateTheme = primaryColor => {
|
||||
} */
|
||||
// Determine if the component is remounted
|
||||
if (!primaryColor) {
|
||||
return;
|
||||
return
|
||||
}
|
||||
const hideMessage = message.loading('正在编译主题!', 0);
|
||||
const hideMessage = message.loading('正在编译主题!', 0)
|
||||
console.info(`正在编译主题!`)
|
||||
function buildIt() {
|
||||
// 正确的判定less是否已经加载less.modifyVars可用
|
||||
if (!window.less || !window.less.modifyVars) {
|
||||
return;
|
||||
return
|
||||
}
|
||||
// less.modifyVars可用
|
||||
window.less.modifyVars({
|
||||
'@primary-color': primaryColor,
|
||||
})
|
||||
.then(() => {
|
||||
hideMessage();
|
||||
hideMessage()
|
||||
})
|
||||
.catch(() => {
|
||||
message.error('Failed to update theme');
|
||||
hideMessage();
|
||||
});
|
||||
message.error('Failed to update theme')
|
||||
hideMessage()
|
||||
})
|
||||
}
|
||||
if (!lessNodesAppended) {
|
||||
// insert less.js and color.less
|
||||
const lessStyleNode = document.createElement('link');
|
||||
const lessConfigNode = document.createElement('script');
|
||||
const lessScriptNode = document.createElement('script');
|
||||
lessStyleNode.setAttribute('rel', 'stylesheet/less');
|
||||
const lessStyleNode = document.createElement('link')
|
||||
const lessConfigNode = document.createElement('script')
|
||||
const lessScriptNode = document.createElement('script')
|
||||
lessStyleNode.setAttribute('rel', 'stylesheet/less')
|
||||
lessStyleNode.setAttribute('href', __webpack_public_path__ + 'color.less')
|
||||
lessConfigNode.innerHTML = `
|
||||
window.less = {
|
||||
@@ -71,25 +71,25 @@ const updateTheme = primaryColor => {
|
||||
env: 'production',
|
||||
javascriptEnabled: true
|
||||
};
|
||||
`;
|
||||
lessScriptNode.src = 'https://gw.alipayobjects.com/os/lib/less.js/3.8.1/less.min.js';
|
||||
lessScriptNode.async = true;
|
||||
`
|
||||
lessScriptNode.src = 'https://gw.alipayobjects.com/os/lib/less.js/3.8.1/less.min.js'
|
||||
lessScriptNode.async = true
|
||||
lessScriptNode.onload = () => {
|
||||
buildIt();
|
||||
lessScriptNode.onload = null;
|
||||
};
|
||||
document.body.appendChild(lessStyleNode);
|
||||
document.body.appendChild(lessConfigNode);
|
||||
document.body.appendChild(lessScriptNode);
|
||||
lessNodesAppended = true;
|
||||
buildIt()
|
||||
lessScriptNode.onload = null
|
||||
}
|
||||
document.body.appendChild(lessStyleNode)
|
||||
document.body.appendChild(lessConfigNode)
|
||||
document.body.appendChild(lessScriptNode)
|
||||
lessNodesAppended = true
|
||||
} else {
|
||||
buildIt();
|
||||
buildIt()
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
const updateColorWeak = colorWeak => {
|
||||
// document.body.className = colorWeak ? 'colorWeak' : '';
|
||||
colorWeak ? document.body.classList.add('colorWeak') : document.body.classList.remove('colorWeak')
|
||||
};
|
||||
}
|
||||
|
||||
export { updateTheme, colorList, updateColorWeak }
|
||||
+34
-34
@@ -1,13 +1,13 @@
|
||||
import Vue from "vue";
|
||||
import App from "./App.vue";
|
||||
import router from "./router";
|
||||
import store from "./store";
|
||||
import "./config";
|
||||
import Storage from "vue-ls";
|
||||
import Antd from "ant-design-vue";
|
||||
import "ant-design-vue/dist/antd.less"; // or 'ant-design-vue/dist/antd.less'
|
||||
import "@/permission"; // permission control
|
||||
import hasPermission from "@/utils/hasPermission";
|
||||
import Vue from 'vue'
|
||||
import App from './App.vue'
|
||||
import router from './router'
|
||||
import store from './store'
|
||||
import './config'
|
||||
import Storage from 'vue-ls'
|
||||
import Antd from 'ant-design-vue'
|
||||
import 'ant-design-vue/dist/antd.less' // or 'ant-design-vue/dist/antd.less'
|
||||
import '@/permission' // permission control
|
||||
import hasPermission from '@/utils/hasPermission'
|
||||
import {
|
||||
ACCESS_TOKEN,
|
||||
DEFAULT_COLOR,
|
||||
@@ -20,23 +20,23 @@ import {
|
||||
DEFAULT_FIXED_SIDEMENU,
|
||||
DEFAULT_CONTENT_WIDTH_TYPE,
|
||||
DEFAULT_MULTI_PAGE
|
||||
} from "@/store/mutation-types";
|
||||
import config from "@/defaultSettings";
|
||||
import JeroComponents from "@/components/jero/index";
|
||||
import JDictSelectTag from "./components/dict/index.js";
|
||||
} from '@/store/mutation-types'
|
||||
import config from '@/defaultSettings'
|
||||
import JeroComponents from '@/components/jero/index'
|
||||
import JDictSelectTag from './components/dict/index.js'
|
||||
import '@/utils/filter' // base filtermybatis-plus
|
||||
import vTrim from "@/utils/vTrim";
|
||||
import preventClick from "@/utils/preventClick";
|
||||
import vTrim from '@/utils/vTrim'
|
||||
import preventClick from '@/utils/preventClick'
|
||||
import '@/assets/less/JAreaLinkage.less'
|
||||
import VueAreaLinkage from 'vue-area-linkage'
|
||||
|
||||
Vue.config.productionTip = false;
|
||||
Vue.use(Storage, config.storageOptions);
|
||||
Vue.use(Antd);
|
||||
Vue.config.productionTip = false
|
||||
Vue.use(Storage, config.storageOptions)
|
||||
Vue.use(Antd)
|
||||
Vue.use(hasPermission)
|
||||
Vue.use(router);
|
||||
Vue.use(JeroComponents);
|
||||
Vue.use(JDictSelectTag);
|
||||
Vue.use(router)
|
||||
Vue.use(JeroComponents)
|
||||
Vue.use(JDictSelectTag)
|
||||
Vue.use(vTrim)
|
||||
Vue.use(preventClick)
|
||||
Vue.use(VueAreaLinkage)
|
||||
@@ -45,17 +45,17 @@ new Vue({
|
||||
router,
|
||||
store,
|
||||
mounted() {
|
||||
store.commit("SET_SIDEBAR_TYPE", Vue.ls.get(SIDEBAR_TYPE, true));
|
||||
store.commit("TOGGLE_THEME", Vue.ls.get(DEFAULT_THEME, config.navTheme));
|
||||
store.commit("TOGGLE_LAYOUT_MODE", Vue.ls.get(DEFAULT_LAYOUT_MODE, config.layout));
|
||||
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_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_WEAK", Vue.ls.get(DEFAULT_COLOR_WEAK, config.colorWeak));
|
||||
store.commit("TOGGLE_COLOR", Vue.ls.get(DEFAULT_COLOR, config.primaryColor));
|
||||
store.commit("SET_TOKEN", Vue.ls.get(ACCESS_TOKEN));
|
||||
store.commit("SET_MULTI_PAGE", Vue.ls.get(DEFAULT_MULTI_PAGE, config.multipage));
|
||||
store.commit('SET_SIDEBAR_TYPE', Vue.ls.get(SIDEBAR_TYPE, true))
|
||||
store.commit('TOGGLE_THEME', Vue.ls.get(DEFAULT_THEME, config.navTheme))
|
||||
store.commit('TOGGLE_LAYOUT_MODE', Vue.ls.get(DEFAULT_LAYOUT_MODE, config.layout))
|
||||
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_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_WEAK', Vue.ls.get(DEFAULT_COLOR_WEAK, config.colorWeak))
|
||||
store.commit('TOGGLE_COLOR', Vue.ls.get(DEFAULT_COLOR, config.primaryColor))
|
||||
store.commit('SET_TOKEN', Vue.ls.get(ACCESS_TOKEN))
|
||||
store.commit('SET_MULTI_PAGE', Vue.ls.get(DEFAULT_MULTI_PAGE, config.multipage))
|
||||
},
|
||||
render: (h) => h(App)
|
||||
}).$mount("#app");
|
||||
}).$mount('#app')
|
||||
|
||||
+98
-98
@@ -3,13 +3,13 @@
|
||||
* 高级查询按钮调用 superQuery方法 高级查询组件ref定义为superQueryModal
|
||||
* data中url定义 list为查询列表 delete为删除单条记录 deleteBatch为批量删除
|
||||
*/
|
||||
import {filterObj} from '@/utils/util';
|
||||
import {filterObj} from '@/utils/util'
|
||||
import {deleteAction, getAction, downFile, getFileAccessHttpUrl} from '@/api/manage'
|
||||
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 {Modal} from 'ant-design-vue'
|
||||
import {deleteByDepartId} from "@api/api";
|
||||
import {deleteByDepartId} from '@api/api'
|
||||
|
||||
export const JeroListMixin = {
|
||||
data() {
|
||||
@@ -26,7 +26,7 @@ export const JeroListMixin = {
|
||||
pageSize: 10,
|
||||
pageSizeOptions: ['10', '20', '30', '50'],
|
||||
showTotal: (total, range) => {
|
||||
return range[0] + "-" + range[1] + " 共" + total + "条"
|
||||
return range[0] + '-' + range[1] + ' 共' + total + '条'
|
||||
},
|
||||
showQuickJumper: true,
|
||||
showSizeChanger: true,
|
||||
@@ -57,9 +57,9 @@ export const JeroListMixin = {
|
||||
},
|
||||
created() {
|
||||
if (!this.disableMixinCreated) {
|
||||
this.loadData();
|
||||
this.loadData()
|
||||
//初始化字典配置 在自己页面定义
|
||||
this.initDictConfig();
|
||||
this.initDictConfig()
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
@@ -70,38 +70,38 @@ export const JeroListMixin = {
|
||||
if (tenantid) {
|
||||
head['tenant_id'] = tenantid
|
||||
}
|
||||
return head;
|
||||
return head
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
loadData(arg) {
|
||||
if (!this.url.list) {
|
||||
this.$message.error("请设置url.list属性!")
|
||||
this.$message.error('请设置url.list属性!')
|
||||
return
|
||||
}
|
||||
//加载数据 若传入参数1则加载第一页的内容
|
||||
if (arg === 1) {
|
||||
this.ipagination.current = 1;
|
||||
this.ipagination.current = 1
|
||||
}
|
||||
var params = this.getQueryParams();//查询条件
|
||||
this.loading = true;
|
||||
var params = this.getQueryParams()//查询条件
|
||||
this.loading = true
|
||||
getAction(this.url.list, params).then((res) => {
|
||||
if (res.success) {
|
||||
//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) {
|
||||
this.ipagination.total = res.result.total;
|
||||
this.ipagination.total = res.result.total
|
||||
//清空列表选中
|
||||
this.onClearSelected()
|
||||
} else {
|
||||
this.ipagination.total = 0;
|
||||
this.ipagination.total = 0
|
||||
}
|
||||
//update-end---author:zhangyafei Date:20201118 for:适配不分页的数据列表------------
|
||||
}
|
||||
if (res.code === 510) {
|
||||
this.$message.warning(res.message)
|
||||
}
|
||||
this.loading = false;
|
||||
this.loading = false
|
||||
}).finally(() => {
|
||||
this.loading = false
|
||||
})
|
||||
@@ -129,128 +129,128 @@ export const JeroListMixin = {
|
||||
sqp['superQueryMatchType'] = this.superQueryMatchType
|
||||
}
|
||||
// var param = Object.assign(sqp, this.queryParam, this.isorter ,this.filters);
|
||||
var param = Object.assign(sqp, this.lastQueryParam, this.isorter, this.filters);
|
||||
param.field = this.getQueryField();
|
||||
param.pageNo = this.ipagination.current;
|
||||
param.pageSize = this.ipagination.pageSize;
|
||||
return filterObj(param);
|
||||
var param = Object.assign(sqp, this.lastQueryParam, this.isorter, this.filters)
|
||||
param.field = this.getQueryField()
|
||||
param.pageNo = this.ipagination.current
|
||||
param.pageSize = this.ipagination.pageSize
|
||||
return filterObj(param)
|
||||
},
|
||||
getQueryField() {
|
||||
//TODO 字段权限控制
|
||||
var str = "id,";
|
||||
var str = 'id,'
|
||||
this.columns.forEach(function (value) {
|
||||
str += "," + value.dataIndex;
|
||||
});
|
||||
return str;
|
||||
str += ',' + value.dataIndex
|
||||
})
|
||||
return str
|
||||
},
|
||||
|
||||
onSelectChange(selectedRowKeys, selectionRows) {
|
||||
this.selectedRowKeys = selectedRowKeys;
|
||||
this.selectionRows = selectionRows;
|
||||
this.selectedRowKeys = selectedRowKeys
|
||||
this.selectionRows = selectionRows
|
||||
},
|
||||
onClearSelected() {
|
||||
this.selectedRowKeys = [];
|
||||
this.selectionRows = [];
|
||||
this.selectedRowKeys = []
|
||||
this.selectionRows = []
|
||||
},
|
||||
searchQuery() {
|
||||
this.lastQueryParam = {...this.queryParam}
|
||||
this.loadData(1);
|
||||
this.loadData(1)
|
||||
},
|
||||
superQuery() {
|
||||
this.$refs.superQueryModal.show();
|
||||
this.$refs.superQueryModal.show()
|
||||
},
|
||||
searchReset() {
|
||||
this.lastQueryParam = {}
|
||||
this.queryParam = {}
|
||||
this.loadData(1);
|
||||
this.loadData(1)
|
||||
},
|
||||
batchDel: function () {
|
||||
if (!this.url.deleteBatch) {
|
||||
this.$message.error("请设置url.deleteBatch属性!")
|
||||
this.$message.error('请设置url.deleteBatch属性!')
|
||||
return
|
||||
}
|
||||
if (this.selectedRowKeys.length <= 0) {
|
||||
this.$message.warning('请选择一条记录!');
|
||||
return;
|
||||
this.$message.warning('请选择一条记录!')
|
||||
return
|
||||
} else {
|
||||
var ids = "";
|
||||
var ids = ''
|
||||
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({
|
||||
title: "确认删除",
|
||||
content: "是否删除选中数据?",
|
||||
title: '确认删除',
|
||||
content: '是否删除选中数据?',
|
||||
onOk: function () {
|
||||
that.loading = true;
|
||||
that.loading = true
|
||||
getAction(that.url.deleteBatch, {ids: ids}).then((res) => {
|
||||
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)) &&
|
||||
that.selectedRowKeys.length === that.dataSource.length
|
||||
) {
|
||||
that.ipagination.current -= 1
|
||||
}
|
||||
that.loadData();
|
||||
that.onClearSelected();
|
||||
that.loadData()
|
||||
that.onClearSelected()
|
||||
} else {
|
||||
that.$message.warning(res.message);
|
||||
that.$message.warning(res.message)
|
||||
}
|
||||
}).finally(() => {
|
||||
that.loading = false;
|
||||
});
|
||||
that.loading = false
|
||||
})
|
||||
}
|
||||
});
|
||||
})
|
||||
}
|
||||
},
|
||||
handleDelete: function (id) {
|
||||
if (!this.url.delete) {
|
||||
this.$message.error("请设置url.delete属性!")
|
||||
this.$message.error('请设置url.delete属性!')
|
||||
return
|
||||
}
|
||||
var that = this;
|
||||
var that = this
|
||||
this.$confirm({
|
||||
title: "确认删除",
|
||||
content: "确定要删除此条数据吗?",
|
||||
title: '确认删除',
|
||||
content: '确定要删除此条数据吗?',
|
||||
onOk: function () {
|
||||
getAction(that.url.delete, {id: id}).then((res) => {
|
||||
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) {
|
||||
that.ipagination.current -= 1
|
||||
}
|
||||
that.loadData();
|
||||
that.loadData()
|
||||
} else {
|
||||
that.$message.warning(res.message);
|
||||
that.$message.warning(res.message)
|
||||
}
|
||||
});
|
||||
})
|
||||
}
|
||||
});
|
||||
})
|
||||
},
|
||||
handleEdit: function (record) {
|
||||
this.$refs.modalForm.edit(record);
|
||||
this.$refs.modalForm.title = "编辑";
|
||||
this.$refs.modalForm.disableSubmit = false;
|
||||
this.$refs.modalForm.edit(record)
|
||||
this.$refs.modalForm.title = '编辑'
|
||||
this.$refs.modalForm.disableSubmit = false
|
||||
},
|
||||
handleAdd: function () {
|
||||
this.$refs.modalForm.add();
|
||||
this.$refs.modalForm.title = "新增";
|
||||
this.$refs.modalForm.disableSubmit = false;
|
||||
this.$refs.modalForm.add()
|
||||
this.$refs.modalForm.title = '新增'
|
||||
this.$refs.modalForm.disableSubmit = false
|
||||
},
|
||||
handleTableChange(pagination, filters, sorter) {
|
||||
//分页、排序、筛选变化时触发
|
||||
//TODO 筛选
|
||||
if (Object.keys(sorter).length > 0) {
|
||||
this.isorter.column = sorter.field;
|
||||
this.isorter.order = "ascend" == sorter.order ? "asc" : "desc"
|
||||
this.isorter.column = sorter.field
|
||||
this.isorter.order = 'ascend' == sorter.order ? 'asc' : 'desc'
|
||||
}
|
||||
this.ipagination = pagination;
|
||||
this.loadData();
|
||||
this.ipagination = pagination
|
||||
this.loadData()
|
||||
},
|
||||
handleToggleSearch() {
|
||||
this.toggleSearchStatus = !this.toggleSearchStatus;
|
||||
this.toggleSearchStatus = !this.toggleSearchStatus
|
||||
},
|
||||
// 给popup查询使用(查询区域不支持回填多个字段,限制只返回一个字段)
|
||||
getPopupField(fields) {
|
||||
@@ -258,33 +258,33 @@ export const JeroListMixin = {
|
||||
},
|
||||
modalFormOk() {
|
||||
// 新增/修改 成功时,重载列表
|
||||
this.loadData();
|
||||
this.loadData()
|
||||
//清空列表选中
|
||||
this.onClearSelected()
|
||||
},
|
||||
handleDetail: function (record) {
|
||||
this.$refs.modalForm.edit(record);
|
||||
this.$refs.modalForm.title = "详情";
|
||||
this.$refs.modalForm.disableSubmit = true;
|
||||
this.$refs.modalForm.edit(record)
|
||||
this.$refs.modalForm.title = '详情'
|
||||
this.$refs.modalForm.disableSubmit = true
|
||||
},
|
||||
/* 导出 */
|
||||
handleExportXls2() {
|
||||
let paramsStr = encodeURI(JSON.stringify(this.getQueryParams()));
|
||||
let url = `${window._CONFIG['domianURL']}/${this.url.exportXlsUrl}?paramsStr=${paramsStr}`;
|
||||
window.location.href = url;
|
||||
let paramsStr = encodeURI(JSON.stringify(this.getQueryParams()))
|
||||
let url = `${window._CONFIG['domianURL']}/${this.url.exportXlsUrl}?paramsStr=${paramsStr}`
|
||||
window.location.href = url
|
||||
},
|
||||
handleExportXls(fileName) {
|
||||
if (!fileName || typeof fileName != "string") {
|
||||
fileName = "导出文件"
|
||||
if (!fileName || typeof fileName != 'string') {
|
||||
fileName = '导出文件'
|
||||
}
|
||||
let param = this.getQueryParams();
|
||||
let param = this.getQueryParams()
|
||||
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) => {
|
||||
if (!data) {
|
||||
this.$message.warning("文件下载失败")
|
||||
this.$message.warning('文件下载失败')
|
||||
return
|
||||
}
|
||||
if (typeof window.navigator.msSaveBlob !== 'undefined') {
|
||||
@@ -297,8 +297,8 @@ export const JeroListMixin = {
|
||||
link.setAttribute('download', fileName + '.xls')
|
||||
document.body.appendChild(link)
|
||||
link.click()
|
||||
document.body.removeChild(link); //下载完成移除元素
|
||||
window.URL.revokeObjectURL(url); //释放掉blob对象
|
||||
document.body.removeChild(link) //下载完成移除元素
|
||||
window.URL.revokeObjectURL(url) //释放掉blob对象
|
||||
}
|
||||
})
|
||||
},
|
||||
@@ -306,12 +306,12 @@ export const JeroListMixin = {
|
||||
* 下载模板
|
||||
* */
|
||||
downTemplate(fileName) {
|
||||
if (!fileName || typeof fileName != "string") {
|
||||
fileName = "模板文件"
|
||||
if (!fileName || typeof fileName != 'string') {
|
||||
fileName = '模板文件'
|
||||
}
|
||||
downFile(this.url.downTemplateUrl).then((data) => {
|
||||
if (!data) {
|
||||
this.$message.warning("文件下载失败")
|
||||
this.$message.warning('文件下载失败')
|
||||
return
|
||||
}
|
||||
if (typeof window.navigator.msSaveBlob !== 'undefined') {
|
||||
@@ -324,15 +324,15 @@ export const JeroListMixin = {
|
||||
link.setAttribute('download', fileName + '.xls')
|
||||
document.body.appendChild(link)
|
||||
link.click()
|
||||
document.body.removeChild(link); //下载完成移除元素
|
||||
window.URL.revokeObjectURL(url); //释放掉blob对象
|
||||
document.body.removeChild(link) //下载完成移除元素
|
||||
window.URL.revokeObjectURL(url) //释放掉blob对象
|
||||
}
|
||||
})
|
||||
},
|
||||
/* 导入 */
|
||||
handleImportExcel(info) {
|
||||
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.response.success) {
|
||||
@@ -375,7 +375,7 @@ export const JeroListMixin = {
|
||||
if (info.file.response.status === 500) {
|
||||
let data = info.file.response
|
||||
const token = Vue.ls.get(ACCESS_TOKEN)
|
||||
if (token && data.message.includes("Token失效")) {
|
||||
if (token && data.message.includes('Token失效')) {
|
||||
Modal.error({
|
||||
title: '登录已过期',
|
||||
content: '很抱歉,登录已过期,请重新登录',
|
||||
@@ -384,13 +384,13 @@ export const JeroListMixin = {
|
||||
onOk: () => {
|
||||
store.dispatch('Logout').then(() => {
|
||||
Vue.ls.remove(ACCESS_TOKEN)
|
||||
window.location.reload();
|
||||
window.location.reload()
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
} else {
|
||||
this.$message.error(`文件上传失败: ${info.file.msg} `);
|
||||
this.$message.error(`文件上传失败: ${info.file.msg} `)
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -402,8 +402,8 @@ export const JeroListMixin = {
|
||||
},
|
||||
/* 图片预览 */
|
||||
getImgView(text) {
|
||||
if (text && text.indexOf(",") > 0) {
|
||||
text = text.substring(0, text.indexOf(","))
|
||||
if (text && text.indexOf(',') > 0) {
|
||||
text = text.substring(0, text.indexOf(','))
|
||||
}
|
||||
return getFileAccessHttpUrl(text)
|
||||
},
|
||||
@@ -411,14 +411,14 @@ export const JeroListMixin = {
|
||||
// update--autor:lvdandan-----date:20200630------for:修改下载文件方法名uploadFile改为downloadFile------
|
||||
downloadFile(text) {
|
||||
if (!text) {
|
||||
this.$message.warning("未知的文件")
|
||||
return;
|
||||
this.$message.warning('未知的文件')
|
||||
return
|
||||
}
|
||||
if (text.indexOf(",") > 0) {
|
||||
text = text.substring(0, text.indexOf(","))
|
||||
if (text.indexOf(',') > 0) {
|
||||
text = text.substring(0, text.indexOf(','))
|
||||
}
|
||||
let url = getFileAccessHttpUrl(text)
|
||||
window.open(url);
|
||||
window.open(url)
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
+36
-36
@@ -1,72 +1,72 @@
|
||||
import Vue from "vue";
|
||||
import router from "./router";
|
||||
import store from "./store";
|
||||
import NProgress from "nprogress"; // progress bar
|
||||
import "nprogress/nprogress.css"; // progress bar style
|
||||
import Vue from 'vue'
|
||||
import router from './router'
|
||||
import store from './store'
|
||||
import NProgress from 'nprogress' // progress bar
|
||||
import 'nprogress/nprogress.css' // progress bar style
|
||||
// import notification from 'ant-design-vue/es/notification'
|
||||
import { ACCESS_TOKEN, INDEX_MAIN_PAGE_PATH } from "@/store/mutation-types";
|
||||
import { generateIndexRouter } from "@/utils/util";
|
||||
import { ACCESS_TOKEN, INDEX_MAIN_PAGE_PATH } from '@/store/mutation-types'
|
||||
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) => {
|
||||
NProgress.start(); // start progress bar
|
||||
NProgress.start() // start progress bar
|
||||
|
||||
if (Vue.ls.get(ACCESS_TOKEN)) {
|
||||
/* has token */
|
||||
if (to.path === "/user/login") {
|
||||
next({ path: INDEX_MAIN_PAGE_PATH });
|
||||
NProgress.done();
|
||||
if (to.path === '/user/login') {
|
||||
next({ path: INDEX_MAIN_PAGE_PATH })
|
||||
NProgress.done()
|
||||
} else {
|
||||
if (store.getters.permissionList.length === 0) {
|
||||
store.dispatch("GetPermissionList").then(res => {
|
||||
const menuData = res.result.menu;
|
||||
if (menuData === null || menuData === "" || menuData === undefined) {
|
||||
return;
|
||||
store.dispatch('GetPermissionList').then(res => {
|
||||
const menuData = res.result.menu
|
||||
if (menuData === null || menuData === '' || menuData === undefined) {
|
||||
return
|
||||
}
|
||||
let constRoutes = [];
|
||||
constRoutes = generateIndexRouter(menuData);
|
||||
let constRoutes = []
|
||||
constRoutes = generateIndexRouter(menuData)
|
||||
// 添加主界面路由
|
||||
store.dispatch("UpdateAppRouter", { constRoutes }).then(() => {
|
||||
store.dispatch('UpdateAppRouter', { constRoutes }).then(() => {
|
||||
// 根据roles权限生成可访问的路由表
|
||||
// 动态添加可访问路由表
|
||||
router.addRoutes(store.getters.addRouters);
|
||||
const redirect = decodeURIComponent(from.query.redirect || to.path);
|
||||
router.addRoutes(store.getters.addRouters)
|
||||
const redirect = decodeURIComponent(from.query.redirect || to.path)
|
||||
if (to.path === redirect) {
|
||||
// hack方法 确保addRoutes已完成 ,set the replace: true so the navigation will not leave a history record
|
||||
next({ ...to, replace: true });
|
||||
next({ ...to, replace: true })
|
||||
} else {
|
||||
// 跳转到目的路由
|
||||
next({ path: redirect });
|
||||
next({ path: redirect })
|
||||
}
|
||||
});
|
||||
})
|
||||
})
|
||||
.catch(() => {
|
||||
/* notification.error({
|
||||
message: '系统提示',
|
||||
description: '请求用户信息失败,请重试!'
|
||||
})*/
|
||||
store.dispatch("Logout").then(() => {
|
||||
next({ path: "/user/login", query: { redirect: to.fullPath } });
|
||||
});
|
||||
});
|
||||
store.dispatch('Logout').then(() => {
|
||||
next({ path: '/user/login', query: { redirect: to.fullPath } })
|
||||
})
|
||||
})
|
||||
} else {
|
||||
next();
|
||||
next()
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (whiteList.indexOf(to.path) !== -1) {
|
||||
// 在免登录白名单,直接进入
|
||||
next();
|
||||
next()
|
||||
} else {
|
||||
next({ path: "/user/login", query: { redirect: to.fullPath } });
|
||||
NProgress.done(); // if current page is login will not trigger afterEach hook, so manually handle it
|
||||
next({ path: '/user/login', query: { redirect: to.fullPath } })
|
||||
NProgress.done() // if current page is login will not trigger afterEach hook, so manually handle it
|
||||
}
|
||||
}
|
||||
});
|
||||
})
|
||||
|
||||
router.afterEach(() => {
|
||||
NProgress.done(); // finish progress bar
|
||||
});
|
||||
NProgress.done() // finish progress bar
|
||||
})
|
||||
|
||||
+10
-10
@@ -1,18 +1,18 @@
|
||||
import Vue from "vue";
|
||||
import Router from "vue-router";
|
||||
import { constantRouterMap } from "@/config/router.config";
|
||||
import Vue from 'vue'
|
||||
import Router from 'vue-router'
|
||||
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) {
|
||||
if (onResolve || onReject) return originalPush.call(this, location, onResolve, onReject);
|
||||
return originalPush.call(this, location).catch(err => err);
|
||||
};
|
||||
if (onResolve || onReject) return originalPush.call(this, location, onResolve, onReject)
|
||||
return originalPush.call(this, location).catch(err => err)
|
||||
}
|
||||
|
||||
export default new Router({
|
||||
mode: "history",
|
||||
mode: 'history',
|
||||
base: process.env.BASE_URL,
|
||||
scrollBehavior: () => ({ y: 0 }),
|
||||
routes: constantRouterMap
|
||||
});
|
||||
})
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import Vue from 'vue'
|
||||
import { USER_INFO, ENHANCE_PRE } from "@/store/mutation-types"
|
||||
import { USER_INFO, ENHANCE_PRE } from '@/store/mutation-types'
|
||||
const getters = {
|
||||
device: state => state.app.device,
|
||||
theme: state => state.app.theme,
|
||||
@@ -14,7 +14,7 @@ const getters = {
|
||||
addRouters: state => state.permission.addRouters,
|
||||
onlAuthFields: state => {return state.online.authFields },
|
||||
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]
|
||||
}
|
||||
|
||||
|
||||
+11
-11
@@ -1,14 +1,14 @@
|
||||
import Vue from "vue";
|
||||
import Vuex from "vuex";
|
||||
import Vue from 'vue'
|
||||
import Vuex from 'vuex'
|
||||
|
||||
import app from "./modules/app";
|
||||
import user from "./modules/user";
|
||||
import permission from "./modules/permission";
|
||||
import enhance from "./modules/enhance";
|
||||
import online from "./modules/online";
|
||||
import getters from "./getters";
|
||||
import app from './modules/app'
|
||||
import user from './modules/user'
|
||||
import permission from './modules/permission'
|
||||
import enhance from './modules/enhance'
|
||||
import online from './modules/online'
|
||||
import getters from './getters'
|
||||
|
||||
Vue.use(Vuex);
|
||||
Vue.use(Vuex)
|
||||
|
||||
export default new Vuex.Store({
|
||||
modules: {
|
||||
@@ -23,10 +23,10 @@ export default new Vuex.Store({
|
||||
currentProjetcInfo:{}
|
||||
},
|
||||
mutations: {
|
||||
"SET_CURRENTPROJECT":(state,info) =>{
|
||||
'SET_CURRENTPROJECT':(state,info) =>{
|
||||
state.currentProjetcInfo = Object.assign({},info)
|
||||
}
|
||||
},
|
||||
actions: {},
|
||||
getters
|
||||
});
|
||||
})
|
||||
|
||||
+45
-45
@@ -1,4 +1,4 @@
|
||||
import Vue from "vue";
|
||||
import Vue from 'vue'
|
||||
import {
|
||||
SIDEBAR_TYPE,
|
||||
DEFAULT_THEME,
|
||||
@@ -10,7 +10,7 @@ import {
|
||||
DEFAULT_FIXED_HEADER_HIDDEN,
|
||||
DEFAULT_CONTENT_WIDTH_TYPE,
|
||||
DEFAULT_MULTI_PAGE
|
||||
} from "@/store/mutation-types";
|
||||
} from '@/store/mutation-types'
|
||||
|
||||
const app = {
|
||||
state: {
|
||||
@@ -18,10 +18,10 @@ const app = {
|
||||
opened: true,
|
||||
withoutAnimation: false
|
||||
},
|
||||
device: "desktop",
|
||||
theme: "",
|
||||
layout: "",
|
||||
contentWidth: "",
|
||||
device: 'desktop',
|
||||
theme: '',
|
||||
layout: '',
|
||||
contentWidth: '',
|
||||
fixedHeader: false,
|
||||
fixSiderbar: false,
|
||||
autoHideHeader: false,
|
||||
@@ -31,96 +31,96 @@ const app = {
|
||||
},
|
||||
mutations: {
|
||||
SET_SIDEBAR_TYPE: (state, type) => {
|
||||
state.sidebar.opened = type;
|
||||
Vue.ls.set(SIDEBAR_TYPE, type);
|
||||
state.sidebar.opened = type
|
||||
Vue.ls.set(SIDEBAR_TYPE, type)
|
||||
},
|
||||
CLOSE_SIDEBAR: (state, withoutAnimation) => {
|
||||
Vue.ls.set(SIDEBAR_TYPE, true);
|
||||
state.sidebar.opened = false;
|
||||
state.sidebar.withoutAnimation = withoutAnimation;
|
||||
Vue.ls.set(SIDEBAR_TYPE, true)
|
||||
state.sidebar.opened = false
|
||||
state.sidebar.withoutAnimation = withoutAnimation
|
||||
},
|
||||
TOGGLE_DEVICE: (state, device) => {
|
||||
state.device = device;
|
||||
state.device = device
|
||||
},
|
||||
TOGGLE_THEME: (state, theme) => {
|
||||
// setStore('_DEFAULT_THEME', theme)
|
||||
Vue.ls.set(DEFAULT_THEME, theme);
|
||||
state.theme = theme;
|
||||
Vue.ls.set(DEFAULT_THEME, theme)
|
||||
state.theme = theme
|
||||
},
|
||||
TOGGLE_LAYOUT_MODE: (state, layout) => {
|
||||
Vue.ls.set(DEFAULT_LAYOUT_MODE, layout);
|
||||
state.layout = layout;
|
||||
Vue.ls.set(DEFAULT_LAYOUT_MODE, layout)
|
||||
state.layout = layout
|
||||
},
|
||||
TOGGLE_FIXED_HEADER: (state, fixed) => {
|
||||
Vue.ls.set(DEFAULT_FIXED_HEADER, fixed);
|
||||
state.fixedHeader = fixed;
|
||||
Vue.ls.set(DEFAULT_FIXED_HEADER, fixed)
|
||||
state.fixedHeader = fixed
|
||||
},
|
||||
TOGGLE_FIXED_SIDERBAR: (state, fixed) => {
|
||||
Vue.ls.set(DEFAULT_FIXED_SIDEMENU, fixed);
|
||||
state.fixSiderbar = fixed;
|
||||
Vue.ls.set(DEFAULT_FIXED_SIDEMENU, fixed)
|
||||
state.fixSiderbar = fixed
|
||||
},
|
||||
TOGGLE_FIXED_HEADER_HIDDEN: (state, show) => {
|
||||
Vue.ls.set(DEFAULT_FIXED_HEADER_HIDDEN, show);
|
||||
state.autoHideHeader = show;
|
||||
Vue.ls.set(DEFAULT_FIXED_HEADER_HIDDEN, show)
|
||||
state.autoHideHeader = show
|
||||
},
|
||||
TOGGLE_CONTENT_WIDTH: (state, type) => {
|
||||
Vue.ls.set(DEFAULT_CONTENT_WIDTH_TYPE, type);
|
||||
state.contentWidth = type;
|
||||
Vue.ls.set(DEFAULT_CONTENT_WIDTH_TYPE, type)
|
||||
state.contentWidth = type
|
||||
},
|
||||
TOGGLE_COLOR: (state, color) => {
|
||||
Vue.ls.set(DEFAULT_COLOR, color);
|
||||
state.color = color;
|
||||
Vue.ls.set(DEFAULT_COLOR, color)
|
||||
state.color = color
|
||||
},
|
||||
TOGGLE_WEAK: (state, flag) => {
|
||||
Vue.ls.set(DEFAULT_COLOR_WEAK, flag);
|
||||
state.weak = flag;
|
||||
Vue.ls.set(DEFAULT_COLOR_WEAK, flag)
|
||||
state.weak = flag
|
||||
},
|
||||
SET_MULTI_PAGE(state, multipageFlag) {
|
||||
Vue.ls.set(DEFAULT_MULTI_PAGE, multipageFlag);
|
||||
state.multipage = multipageFlag;
|
||||
Vue.ls.set(DEFAULT_MULTI_PAGE, multipageFlag)
|
||||
state.multipage = multipageFlag
|
||||
}
|
||||
},
|
||||
actions: {
|
||||
setSidebar: ({ commit }, type) => {
|
||||
commit("SET_SIDEBAR_TYPE", type);
|
||||
commit('SET_SIDEBAR_TYPE', type)
|
||||
},
|
||||
CloseSidebar({ commit }, { withoutAnimation }) {
|
||||
commit("CLOSE_SIDEBAR", withoutAnimation);
|
||||
commit('CLOSE_SIDEBAR', withoutAnimation)
|
||||
},
|
||||
ToggleDevice({ commit }, device) {
|
||||
commit("TOGGLE_DEVICE", device);
|
||||
commit('TOGGLE_DEVICE', device)
|
||||
},
|
||||
ToggleTheme({ commit }, theme) {
|
||||
commit("TOGGLE_THEME", theme);
|
||||
commit('TOGGLE_THEME', theme)
|
||||
},
|
||||
ToggleLayoutMode({ commit }, mode) {
|
||||
commit("TOGGLE_LAYOUT_MODE", mode);
|
||||
commit('TOGGLE_LAYOUT_MODE', mode)
|
||||
},
|
||||
ToggleFixedHeader({ commit }, 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) {
|
||||
commit("TOGGLE_FIXED_SIDERBAR", fixSiderbar);
|
||||
commit('TOGGLE_FIXED_SIDERBAR', fixSiderbar)
|
||||
},
|
||||
ToggleFixedHeaderHidden({ commit }, show) {
|
||||
commit("TOGGLE_FIXED_HEADER_HIDDEN", show);
|
||||
commit('TOGGLE_FIXED_HEADER_HIDDEN', show)
|
||||
},
|
||||
ToggleContentWidth({ commit }, type) {
|
||||
commit("TOGGLE_CONTENT_WIDTH", type);
|
||||
commit('TOGGLE_CONTENT_WIDTH', type)
|
||||
},
|
||||
ToggleColor({ commit }, color) {
|
||||
commit("TOGGLE_COLOR", color);
|
||||
commit('TOGGLE_COLOR', color)
|
||||
},
|
||||
ToggleWeak({ commit }, weakFlag) {
|
||||
commit("TOGGLE_WEAK", weakFlag);
|
||||
commit('TOGGLE_WEAK', weakFlag)
|
||||
},
|
||||
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 = {
|
||||
state: {
|
||||
@@ -7,8 +7,8 @@ const online = {
|
||||
},
|
||||
mutations: {
|
||||
SET_AUTHFIELDS: (state, fields) => {
|
||||
console.log("fields", fields);
|
||||
Vue.set(state, "authFields", fields);
|
||||
console.log('fields', fields)
|
||||
Vue.set(state, 'authFields', fields)
|
||||
}
|
||||
},
|
||||
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) {
|
||||
return new Promise(resolve => {
|
||||
//const [ roles ] = routes.constRoutes
|
||||
let routelist = routes.constRoutes;
|
||||
let routelist = routes.constRoutes
|
||||
commit('SET_ROUTERS', routelist)
|
||||
resolve()
|
||||
})
|
||||
|
||||
+14
-14
@@ -1,7 +1,7 @@
|
||||
import Vue from 'vue'
|
||||
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 { welcome } from "@/utils/util"
|
||||
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 { welcome } from '@/utils/util'
|
||||
import { queryPermissionsByUser } from '@/api/api'
|
||||
import { getAction } from '@/api/manage'
|
||||
|
||||
@@ -44,8 +44,8 @@ const user = {
|
||||
// CAS验证登录
|
||||
ValidateLogin({ commit }, userInfo) {
|
||||
return new Promise((resolve, reject) => {
|
||||
getAction("/sys/cas/client/validateLogin",userInfo).then(response => {
|
||||
console.log("----cas 登录--------",response);
|
||||
getAction('/sys/cas/client/validateLogin',userInfo).then(response => {
|
||||
console.log('----cas 登录--------',response)
|
||||
if(response.success){
|
||||
const result = response.result
|
||||
const userInfo = result.userInfo
|
||||
@@ -117,21 +117,21 @@ const user = {
|
||||
GetPermissionList({ commit }) {
|
||||
return new Promise((resolve, reject) => {
|
||||
queryPermissionsByUser().then(response => {
|
||||
const menuData = response.result.menu;
|
||||
const authData = response.result.auth;
|
||||
const allAuthData = response.result.allAuth;
|
||||
const menuData = response.result.menu
|
||||
const authData = response.result.auth
|
||||
const allAuthData = response.result.allAuth
|
||||
//Vue.ls.set(USER_AUTH,authData);
|
||||
sessionStorage.setItem(USER_AUTH,JSON.stringify(authData));
|
||||
sessionStorage.setItem(SYS_BUTTON_AUTH,JSON.stringify(allAuthData));
|
||||
sessionStorage.setItem(USER_AUTH,JSON.stringify(authData))
|
||||
sessionStorage.setItem(SYS_BUTTON_AUTH,JSON.stringify(allAuthData))
|
||||
if (menuData && menuData.length > 0) {
|
||||
//update--begin--autor:qinfeng-----date:20200109------for:JEECG-63 一级菜单的子菜单全部是隐藏路由,则一级菜单不显示------
|
||||
menuData.forEach((item, index) => {
|
||||
if (item["children"]) {
|
||||
let hasChildrenMenu = item["children"].filter((i) => {
|
||||
if (item['children']) {
|
||||
let hasChildrenMenu = item['children'].filter((i) => {
|
||||
return !i.hidden || i.hidden == false
|
||||
})
|
||||
if (hasChildrenMenu == null || hasChildrenMenu.length == 0) {
|
||||
item["hidden"] = true
|
||||
item['hidden'] = true
|
||||
}
|
||||
}
|
||||
})
|
||||
@@ -151,7 +151,7 @@ const user = {
|
||||
// 登出
|
||||
Logout({ commit, state }) {
|
||||
return new Promise((resolve) => {
|
||||
let logoutToken = state.token;
|
||||
let logoutToken = state.token
|
||||
commit('SET_TOKEN', '')
|
||||
commit('SET_PERMISSIONLIST', [])
|
||||
Vue.ls.remove(ACCESS_TOKEN)
|
||||
|
||||
@@ -12,10 +12,10 @@ const FormTypes = {
|
||||
file: 'file',
|
||||
image: 'image',
|
||||
popup:'popup',
|
||||
list_multi:"list_multi",
|
||||
sel_search:"sel_search",
|
||||
list_multi:'list_multi',
|
||||
sel_search:'sel_search',
|
||||
radio:'radio',
|
||||
checkbox_meta:"checkbox_meta",
|
||||
checkbox_meta:'checkbox_meta',
|
||||
input_pop:'input_pop',
|
||||
sel_depart: 'sel_depart',
|
||||
sel_user: 'sel_user',
|
||||
@@ -90,7 +90,7 @@ export function validateTables(cases, deleteTempId) {
|
||||
}
|
||||
return new Promise((resolve, reject) => {
|
||||
let tables = []
|
||||
let index = 0;
|
||||
let index = 0
|
||||
if(!cases || cases.length === 0){
|
||||
resolve()
|
||||
}
|
||||
@@ -108,7 +108,7 @@ export function validateTables(cases, deleteTempId) {
|
||||
// 出现未验证通过的表单,不再进行下一步校验,直接返回失败并跳转到该表格
|
||||
if (error === VALIDATE_NO_PASSED) {
|
||||
// 尝试获取tabKey,如果在ATab组件内即可获取
|
||||
let paneKey;
|
||||
let paneKey
|
||||
let tabPane = getVmParentByName(vm, 'ATabPane')
|
||||
if (tabPane) {
|
||||
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) {
|
||||
if(nodeDisabledAuth(code,formData)){
|
||||
return true;
|
||||
return true
|
||||
}else{
|
||||
return globalDisabledAuth(code);
|
||||
return globalDisabledAuth(code)
|
||||
}
|
||||
}
|
||||
|
||||
function nodeDisabledAuth(code,formData){
|
||||
// console.log("页面权限禁用--NODE--开始");
|
||||
let permissionList = [];
|
||||
let permissionList = []
|
||||
try {
|
||||
// console.log("页面权限禁用--NODE--开始",formData);
|
||||
if (formData) {
|
||||
let bpmList = formData.permissionList;
|
||||
let bpmList = formData.permissionList
|
||||
permissionList = bpmList.filter(item=>item.type=='2')
|
||||
// for (let bpm of bpmList) {
|
||||
// if(bpm.type == '2') {
|
||||
@@ -22,102 +22,102 @@ function nodeDisabledAuth(code,formData){
|
||||
// }
|
||||
// }
|
||||
}else{
|
||||
return false;
|
||||
return false
|
||||
}
|
||||
} catch (e) {
|
||||
//console.log("页面权限异常----", e);
|
||||
}
|
||||
if (permissionList.length == 0) {
|
||||
return false;
|
||||
return false
|
||||
}
|
||||
//
|
||||
// console.log("流程节点页面权限禁用--NODE--开始");
|
||||
let permissions = [];
|
||||
let permissions = []
|
||||
for (let item of permissionList) {
|
||||
if(item.type == '2') {
|
||||
permissions.push(item.action);
|
||||
permissions.push(item.action)
|
||||
}
|
||||
}
|
||||
//console.log("页面权限----"+code);
|
||||
if (!permissions.includes(code)) {
|
||||
return false;
|
||||
return false
|
||||
}else{
|
||||
for (let item2 of permissionList) {
|
||||
if(code === item2.action){
|
||||
// console.log("流程节点页面权限禁用--NODE--生效");
|
||||
return true;
|
||||
return true
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
return false
|
||||
}
|
||||
|
||||
function globalDisabledAuth(code){
|
||||
// console.log("全局页面禁用权限--Global--开始");
|
||||
|
||||
let permissionList = [];
|
||||
let allPermissionList = [];
|
||||
let permissionList = []
|
||||
let allPermissionList = []
|
||||
|
||||
//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) {
|
||||
if(auth.type == '2') {
|
||||
permissionList.push(auth);
|
||||
permissionList.push(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) {
|
||||
if(gauth.type == '2') {
|
||||
allPermissionList.push(gauth);
|
||||
allPermissionList.push(gauth)
|
||||
}
|
||||
}
|
||||
//设置全局配置是否有命中
|
||||
let gFlag = false;//禁用命中
|
||||
let invalidFlag = false;//无效命中
|
||||
if(allPermissionList != null && allPermissionList != "" && allPermissionList != undefined && allPermissionList.length > 0){
|
||||
let gFlag = false//禁用命中
|
||||
let invalidFlag = false//无效命中
|
||||
if(allPermissionList != null && allPermissionList != '' && allPermissionList != undefined && allPermissionList.length > 0){
|
||||
for (let itemG of allPermissionList) {
|
||||
if(code === itemG.action){
|
||||
if(itemG.status == '0'){
|
||||
invalidFlag = true;
|
||||
break;
|
||||
invalidFlag = true
|
||||
break
|
||||
}else{
|
||||
gFlag = true;
|
||||
break;
|
||||
gFlag = true
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if(invalidFlag){
|
||||
return false;
|
||||
return false
|
||||
}
|
||||
if (permissionList === null || permissionList === "" || permissionList === undefined||permissionList.length<=0) {
|
||||
return gFlag;
|
||||
if (permissionList === null || permissionList === '' || permissionList === undefined||permissionList.length<=0) {
|
||||
return gFlag
|
||||
}
|
||||
let permissions = [];
|
||||
let permissions = []
|
||||
for (let item of permissionList) {
|
||||
if(item.type == '2') {
|
||||
permissions.push(item.action);
|
||||
permissions.push(item.action)
|
||||
}
|
||||
}
|
||||
//console.log("页面禁用权限----"+code);
|
||||
if (!permissions.includes(code)) {
|
||||
return gFlag;
|
||||
return gFlag
|
||||
}else{
|
||||
for (let item2 of permissionList) {
|
||||
if(code === item2.action){
|
||||
// console.log("全局页面权限解除禁用--Global--生效");
|
||||
gFlag = false;
|
||||
gFlag = false
|
||||
}
|
||||
}
|
||||
return gFlag;
|
||||
return gFlag
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
export function colAuthFilter(columns,pre) {
|
||||
let authList = getNoAuthCols(pre);
|
||||
let authList = getNoAuthCols(pre)
|
||||
const cols = columns.filter(item => {
|
||||
if (hasColoum(item,authList)) {
|
||||
return true
|
||||
@@ -136,11 +136,11 @@ export function colAuthFilter(columns,pre) {
|
||||
* @returns {*}
|
||||
*/
|
||||
export function colAuthFilterJEditableTable(columns,pre) {
|
||||
let authList = getAllShowAndDisabledAuthCols(pre);
|
||||
let authList = getAllShowAndDisabledAuthCols(pre)
|
||||
const cols = columns.filter(item => {
|
||||
let oneAuth = authList.find(auth => {
|
||||
return auth.action === pre + item.key;
|
||||
});
|
||||
return auth.action === pre + item.key
|
||||
})
|
||||
if(!oneAuth){
|
||||
return true
|
||||
}
|
||||
@@ -152,7 +152,7 @@ export function colAuthFilterJEditableTable(columns,pre) {
|
||||
|
||||
//禁用逻辑
|
||||
if (oneAuth.type == '2' && !oneAuth.isAuth) {
|
||||
item["disabled"] = true
|
||||
item['disabled'] = true
|
||||
return true
|
||||
}
|
||||
//隐藏逻辑逻辑
|
||||
@@ -178,39 +178,39 @@ export function getNoAuthCols(pre){
|
||||
if(!pre || pre.length==0){
|
||||
return []
|
||||
}
|
||||
let permissionList = [];
|
||||
let allPermissionList = [];
|
||||
let permissionList = []
|
||||
let allPermissionList = []
|
||||
|
||||
//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) {
|
||||
//显示策略,有效状态
|
||||
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));
|
||||
let allAuthList = JSON.parse(sessionStorage.getItem(SYS_BUTTON_AUTH) || "[]");
|
||||
let allAuthList = JSON.parse(sessionStorage.getItem(SYS_BUTTON_AUTH) || '[]')
|
||||
for (let gauth of allAuthList) {
|
||||
//显示策略,有效状态
|
||||
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 => {
|
||||
if (permissionList.includes(item)) {
|
||||
return false;
|
||||
return false
|
||||
}
|
||||
return true;
|
||||
return true
|
||||
})
|
||||
return cols;
|
||||
return cols
|
||||
}
|
||||
|
||||
/**
|
||||
* 将Online的行编辑按钮权限,添加至本地存储
|
||||
*/
|
||||
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=>{
|
||||
if(!item.action){
|
||||
return true
|
||||
@@ -225,7 +225,7 @@ export function addOnlineBtAuth2Storage(pre, authList){
|
||||
status:1
|
||||
})
|
||||
}
|
||||
let temp = JSON.parse(sessionStorage.getItem(USER_AUTH) || "[]");
|
||||
let temp = JSON.parse(sessionStorage.getItem(USER_AUTH) || '[]')
|
||||
let newArr = temp.filter(item=>{
|
||||
if(!item.action){
|
||||
return true
|
||||
@@ -248,30 +248,30 @@ export function addOnlineBtAuth2Storage(pre, authList){
|
||||
*/
|
||||
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 hasAuthArray = userAuthList.filter(u => u.action===item.action );
|
||||
let hasAuthArray = userAuthList.filter(u => u.action===item.action )
|
||||
if (hasAuthArray && hasAuthArray.length>0) {
|
||||
item["isAuth"] = true
|
||||
item['isAuth'] = true
|
||||
}
|
||||
return item;
|
||||
return item
|
||||
})
|
||||
|
||||
return newAllAuthList;
|
||||
return newAllAuthList
|
||||
}
|
||||
|
||||
function startWith(str,pre) {
|
||||
if (pre == null || pre == "" || str==null|| str==""|| str.length == 0 || pre.length > str.length)
|
||||
return false;
|
||||
if (pre == null || pre == '' || str==null|| str==''|| str.length == 0 || pre.length > str.length)
|
||||
return false
|
||||
if (str.substr(0, pre.length) == pre)
|
||||
return true;
|
||||
return true
|
||||
else
|
||||
return false;
|
||||
return false
|
||||
}
|
||||
|
||||
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 * as dayjs from "dayjs";
|
||||
import Vue from 'vue'
|
||||
import * as dayjs from 'dayjs'
|
||||
|
||||
Vue.filter('NumberFormat', function (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) {
|
||||
if(!value){
|
||||
return "";
|
||||
return ''
|
||||
}
|
||||
if (value.length > 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 = {
|
||||
install (Vue, options) {
|
||||
@@ -8,126 +8,126 @@ const hasPermission = {
|
||||
//console.time()
|
||||
//节点权限处理,如果命中则不进行全局权限处理
|
||||
if(!filterNodePermission(el, binding, vnode)){
|
||||
filterGlobalPermission(el, binding, vnode);
|
||||
filterGlobalPermission(el, binding, vnode)
|
||||
}
|
||||
}
|
||||
});
|
||||
})
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* 流程节点权限控制
|
||||
*/
|
||||
export function filterNodePermission(el, binding, vnode) {
|
||||
let permissionList = [];
|
||||
let permissionList = []
|
||||
try {
|
||||
let obj = vnode.context.$props.formData;
|
||||
let obj = vnode.context.$props.formData
|
||||
if (obj) {
|
||||
let bpmList = obj.permissionList;
|
||||
let bpmList = obj.permissionList
|
||||
for (let bpm of bpmList) {
|
||||
if(bpm.type != '2') {
|
||||
permissionList.push(bpm);
|
||||
permissionList.push(bpm)
|
||||
}
|
||||
}
|
||||
}else{
|
||||
return false;
|
||||
return false
|
||||
}
|
||||
} catch (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)
|
||||
return false;
|
||||
return false
|
||||
}
|
||||
|
||||
console.log("流程节点页面权限--NODE--");
|
||||
let permissions = [];
|
||||
console.log('流程节点页面权限--NODE--')
|
||||
let permissions = []
|
||||
for (let item of permissionList) {
|
||||
if(item.type != '2') {
|
||||
permissions.push(item.action);
|
||||
permissions.push(item.action)
|
||||
}
|
||||
}
|
||||
//console.log("页面权限----"+permissions);
|
||||
//console.log("页面权限----"+binding.value);
|
||||
if (!permissions.includes(binding.value)) {
|
||||
//el.parentNode.removeChild(el)
|
||||
return false;
|
||||
return false
|
||||
}else{
|
||||
for (let item2 of permissionList) {
|
||||
if(binding.value === item2.action){
|
||||
return true;
|
||||
return true
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
return false
|
||||
}
|
||||
|
||||
/**
|
||||
* 全局权限控制
|
||||
*/
|
||||
export function filterGlobalPermission(el, binding, vnode) {
|
||||
console.log("全局页面权限--Global--");
|
||||
console.log('全局页面权限--Global--')
|
||||
|
||||
let permissionList = [];
|
||||
let allPermissionList = [];
|
||||
let permissionList = []
|
||||
let allPermissionList = []
|
||||
|
||||
//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) {
|
||||
if(auth.type != '2') {
|
||||
permissionList.push(auth);
|
||||
permissionList.push(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) {
|
||||
if(gauth.type != '2') {
|
||||
allPermissionList.push(gauth);
|
||||
allPermissionList.push(gauth)
|
||||
}
|
||||
}
|
||||
//设置全局配置是否有命中
|
||||
let invalidFlag = false;//无效命中
|
||||
if(allPermissionList != null && allPermissionList != "" && allPermissionList != undefined && allPermissionList.length > 0){
|
||||
let invalidFlag = false//无效命中
|
||||
if(allPermissionList != null && allPermissionList != '' && allPermissionList != undefined && allPermissionList.length > 0){
|
||||
for (let itemG of allPermissionList) {
|
||||
if(binding.value === itemG.action){
|
||||
if(itemG.status == '0'){
|
||||
invalidFlag = true;
|
||||
break;
|
||||
invalidFlag = true
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if(invalidFlag){
|
||||
return;
|
||||
return
|
||||
}
|
||||
if (permissionList === null || permissionList === "" || permissionList === undefined||permissionList.length<=0) {
|
||||
el.parentNode.removeChild(el);
|
||||
return;
|
||||
if (permissionList === null || permissionList === '' || permissionList === undefined||permissionList.length<=0) {
|
||||
el.parentNode.removeChild(el)
|
||||
return
|
||||
}
|
||||
let permissions = [];
|
||||
let permissions = []
|
||||
for (let item of permissionList) {
|
||||
//权限策略1显示2禁用
|
||||
if(item.type != '2'){
|
||||
//update--begin--autor:wangshuai-----date:20200729------for:按钮权限,授权标识的提示信息是多个用逗号分隔逻辑处理 gitee#I1OUGU-------
|
||||
if(item.action){
|
||||
if(item.action.includes(",")){
|
||||
let split = item.action.split(",")
|
||||
if(item.action.includes(',')){
|
||||
let split = item.action.split(',')
|
||||
for (let i = 0; i <split.length ; i++) {
|
||||
if(!split[i] ||split[i].length==0){
|
||||
continue;
|
||||
continue
|
||||
}
|
||||
permissions.push(split[i]);
|
||||
permissions.push(split[i])
|
||||
}
|
||||
}else{
|
||||
permissions.push(item.action);
|
||||
permissions.push(item.action)
|
||||
}
|
||||
}
|
||||
//update--end--autor:wangshuai-----date:20200729------for:按钮权限,授权标识的提示信息是多个用逗号分隔逻辑处理 gitee#I1OUGU------
|
||||
}
|
||||
}
|
||||
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 { mapState } from "vuex";
|
||||
import { mapState } from 'vuex'
|
||||
|
||||
// const mixinsComputed = Vue.config.optionMergeStrategies.computed
|
||||
// const mixinsMethods = Vue.config.optionMergeStrategies.methods
|
||||
|
||||
+22
-22
@@ -2,7 +2,7 @@ import Vue from 'vue'
|
||||
import axios from 'axios'
|
||||
import store from '@/store'
|
||||
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】
|
||||
@@ -10,7 +10,7 @@ import { ACCESS_TOKEN, TENANT_ID } from "@/store/mutation-types"
|
||||
* 则映射后端域名,通过 vue.config.js
|
||||
* @type {*|string}
|
||||
*/
|
||||
let apiBaseUrl = window._CONFIG['domianURL'] || "/jero-boot";
|
||||
let apiBaseUrl = window._CONFIG['domianURL'] || '/jero-boot'
|
||||
//console.log("apiBaseUrl= ",apiBaseUrl)
|
||||
// 创建 axios 实例
|
||||
const service = axios.create({
|
||||
@@ -23,23 +23,23 @@ const err = (error) => {
|
||||
if (error.response) {
|
||||
let data = error.response.data
|
||||
const token = Vue.ls.get(ACCESS_TOKEN)
|
||||
console.log("------异常响应------",token)
|
||||
console.log("------异常响应------",error.response.status)
|
||||
console.log('------异常响应------',token)
|
||||
console.log('------异常响应------',error.response.status)
|
||||
switch (error.response.status) {
|
||||
case 403:
|
||||
notification.error({ message: '系统提示', description: '拒绝访问',duration: 4})
|
||||
break
|
||||
case 500:
|
||||
console.log("------error.response------",error.response)
|
||||
console.log('------error.response------',error.response)
|
||||
// update-begin- --- author:liusq ------ date:20200910 ---- for:处理Blob情况----
|
||||
let type=error.response.request.responseType;
|
||||
let type=error.response.request.responseType
|
||||
if(type === 'blob'){
|
||||
blobToJson(data);
|
||||
break;
|
||||
blobToJson(data)
|
||||
break
|
||||
}
|
||||
// update-end- --- author:liusq ------ date:20200910 ---- for:处理Blob情况----
|
||||
//notification.error({ message: '系统提示', description:'Token失效,请重新登录!',duration: 4})
|
||||
if(token && data.message.includes("Token失效")){
|
||||
if(token && data.message.includes('Token失效')){
|
||||
// update-begin- --- author:scott ------ date:20190225 ---- for:Token失效采用弹框模式,不直接跳转----
|
||||
Modal.error({
|
||||
title: '登录已过期',
|
||||
@@ -51,8 +51,8 @@ const err = (error) => {
|
||||
Vue.ls.remove(ACCESS_TOKEN)
|
||||
try {
|
||||
let path = window.document.location.pathname
|
||||
console.log("location pathname -> "+path)
|
||||
if(path!="/" && path.indexOf('/user/login')==-1){
|
||||
console.log('location pathname -> '+path)
|
||||
if(path!='/' && path.indexOf('/user/login')==-1){
|
||||
window.location.reload()
|
||||
}
|
||||
}catch (e) {
|
||||
@@ -90,7 +90,7 @@ const err = (error) => {
|
||||
}
|
||||
}
|
||||
return Promise.reject(error)
|
||||
};
|
||||
}
|
||||
|
||||
// request interceptor
|
||||
service.interceptors.request.use(config => {
|
||||
@@ -101,12 +101,12 @@ service.interceptors.request.use(config => {
|
||||
//update-begin-author:taoyan date:2020707 for:多租户
|
||||
let tenantid = Vue.ls.get(TENANT_ID)
|
||||
if (!tenantid) {
|
||||
tenantid = 0;
|
||||
tenantid = 0
|
||||
}
|
||||
config.headers[ 'tenant_id' ] = tenantid
|
||||
//update-end-author:taoyan date:2020707 for:多租户
|
||||
if(config.method=='get'){
|
||||
if(config.url.indexOf("sys/dict/getDictItems")<0){
|
||||
if(config.url.indexOf('sys/dict/getDictItems')<0){
|
||||
config.params = {
|
||||
_t: Date.parse(new Date())/1000,
|
||||
...config.params
|
||||
@@ -128,15 +128,15 @@ service.interceptors.response.use((response) => {
|
||||
* @param data
|
||||
*/
|
||||
function blobToJson(data) {
|
||||
let fileReader = new FileReader();
|
||||
let token = Vue.ls.get(ACCESS_TOKEN);
|
||||
let fileReader = new FileReader()
|
||||
let token = Vue.ls.get(ACCESS_TOKEN)
|
||||
fileReader.onload = function() {
|
||||
try {
|
||||
let jsonData = JSON.parse(this.result); // 说明是普通对象数据,后台转换失败
|
||||
console.log("jsonData",jsonData)
|
||||
let jsonData = JSON.parse(this.result) // 说明是普通对象数据,后台转换失败
|
||||
console.log('jsonData',jsonData)
|
||||
if (jsonData.status === 500) {
|
||||
console.log("token----------》",token)
|
||||
if(token && jsonData.message.includes("Token失效")){
|
||||
console.log('token----------》',token)
|
||||
if(token && jsonData.message.includes('Token失效')){
|
||||
Modal.error({
|
||||
title: '登录已过期',
|
||||
content: '很抱歉,登录已过期,请重新登录',
|
||||
@@ -153,9 +153,9 @@ function blobToJson(data) {
|
||||
}
|
||||
} catch (err) {
|
||||
// 解析成对象失败,说明是正常的文件流
|
||||
console.log("blob解析fileReader返回err",err)
|
||||
console.log('blob解析fileReader返回err',err)
|
||||
}
|
||||
}
|
||||
};
|
||||
fileReader.readAsText(data)
|
||||
}
|
||||
|
||||
|
||||
+35
-35
@@ -1,6 +1,6 @@
|
||||
import * as api from '@/api/api'
|
||||
import { isURL } from '@/utils/validate'
|
||||
import { JSEncrypt } from "jsencrypt";
|
||||
import { JSEncrypt } from 'jsencrypt'
|
||||
// import onlineCommons from '@/components/onlineForm/onlineForm'
|
||||
//
|
||||
export function timeFix() {
|
||||
@@ -32,16 +32,16 @@ export function triggerWindowResizeEvent() {
|
||||
*/
|
||||
export function filterObj(obj) {
|
||||
if (!(typeof obj == 'object')) {
|
||||
return;
|
||||
return
|
||||
}
|
||||
|
||||
for ( let key in obj) {
|
||||
if (obj.hasOwnProperty(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 {*}
|
||||
*/
|
||||
export function formatDate(value, fmt) {
|
||||
let regPos = /^\d+(\.\d+)?$/;
|
||||
let regPos = /^\d+(\.\d+)?$/
|
||||
if(regPos.test(value)){
|
||||
//如果是数字
|
||||
let getDate = new Date(value);
|
||||
let getDate = new Date(value)
|
||||
let o = {
|
||||
'M+': getDate.getMonth() + 1,
|
||||
'd+': getDate.getDate(),
|
||||
@@ -63,7 +63,7 @@ export function formatDate(value, fmt) {
|
||||
's+': getDate.getSeconds(),
|
||||
'q+': Math.floor((getDate.getMonth() + 3) / 3),
|
||||
'S': getDate.getMilliseconds()
|
||||
};
|
||||
}
|
||||
if (/(y+)/.test(fmt)) {
|
||||
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)))
|
||||
}
|
||||
}
|
||||
return fmt;
|
||||
return fmt
|
||||
}else{
|
||||
//TODO
|
||||
value = value.trim();
|
||||
return value.substr(0,fmt.length);
|
||||
value = value.trim()
|
||||
return value.substr(0,fmt.length)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -93,27 +93,27 @@ let indexRouter = [{
|
||||
...generateChildRouters(data)
|
||||
]
|
||||
},{
|
||||
"path": "*", "redirect": "/404", "hidden": true
|
||||
'path': '*', 'redirect': '/404', 'hidden': true
|
||||
}]
|
||||
return indexRouter;
|
||||
return indexRouter
|
||||
}
|
||||
|
||||
// 生成嵌套路由(子路由)
|
||||
|
||||
function generateChildRouters (data) {
|
||||
const routers = [];
|
||||
const routers = []
|
||||
for (let item of data) {
|
||||
let component = "";
|
||||
if(item.component.indexOf("layouts")>=0){
|
||||
component = "components/"+item.component;
|
||||
let component = ''
|
||||
if(item.component.indexOf('layouts')>=0){
|
||||
component = 'components/'+item.component
|
||||
}else{
|
||||
component = "views/"+item.component;
|
||||
component = 'views/'+item.component
|
||||
}
|
||||
|
||||
// eslint-disable-next-line
|
||||
let URL = (item.meta.url|| '').replace(/{{([^}}]+)?}}/g, (s1, s2) => eval(s2)) // URL支持{{ window.xxx }}占位符变量
|
||||
if (isURL(URL)) {
|
||||
item.meta.url = URL;
|
||||
item.meta.url = URL
|
||||
}
|
||||
|
||||
let componentPath
|
||||
@@ -160,11 +160,11 @@ function generateChildRouters (data) {
|
||||
}
|
||||
}
|
||||
if(item.alwaysShow){
|
||||
menu.alwaysShow = true;
|
||||
menu.redirect = menu.path;
|
||||
menu.alwaysShow = true
|
||||
menu.redirect = menu.path
|
||||
}
|
||||
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菜单)------
|
||||
//判断是否生成路由
|
||||
@@ -172,7 +172,7 @@ function generateChildRouters (data) {
|
||||
//console.log(' 不生成路由 item.route: '+item.route);
|
||||
//console.log(' 不生成路由 item.path: '+item.path);
|
||||
}else{
|
||||
routers.push(menu);
|
||||
routers.push(menu)
|
||||
}
|
||||
//--update-end----author:scott---date:20190320------for:根据后台菜单配置,判断是否路由菜单字段,动态选择是否生成路由(为了支持参数URL菜单)------
|
||||
}
|
||||
@@ -249,8 +249,8 @@ export function randomUUID() {
|
||||
*/
|
||||
export function underLine2CamelCase(string){
|
||||
return string.replace( /_([a-z])/g, function( all, letter ) {
|
||||
return letter.toUpperCase();
|
||||
});
|
||||
return letter.toUpperCase()
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -259,10 +259,10 @@ export function underLine2CamelCase(string){
|
||||
* @returns {*}
|
||||
*/
|
||||
export function showDealBtn(bpmStatus){
|
||||
if(bpmStatus!="1"&&bpmStatus!="3"&&bpmStatus!="4"){
|
||||
return true;
|
||||
if(bpmStatus!='1'&&bpmStatus!='3'&&bpmStatus!='4'){
|
||||
return true
|
||||
}
|
||||
return false;
|
||||
return false
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -272,7 +272,7 @@ export function showDealBtn(bpmStatus){
|
||||
*/
|
||||
export function cssExpand(css, id) {
|
||||
let style = document.createElement('style')
|
||||
style.type = "text/css"
|
||||
style.type = 'text/css'
|
||||
style.innerHTML = `@charset "UTF-8"; ${css}`
|
||||
// 清除旧样式
|
||||
if (id) {
|
||||
@@ -554,12 +554,12 @@ export function removeArrayElement(array, prod, value) {
|
||||
let index = -1
|
||||
for(let i = 0;i<array.length;i++){
|
||||
if(array[i][prod] == value){
|
||||
index = i;
|
||||
break;
|
||||
index = i
|
||||
break
|
||||
}
|
||||
}
|
||||
if(index>=0){
|
||||
array.splice(index, 1);
|
||||
array.splice(index, 1)
|
||||
}
|
||||
}
|
||||
/**
|
||||
@@ -577,13 +577,13 @@ export function encrypt(publicKey, message) {
|
||||
* 校验数组是否有重复的元素
|
||||
* */
|
||||
export function isRepeat(arr) {
|
||||
var hash = {};
|
||||
var hash = {}
|
||||
for(var i in arr) {
|
||||
if(hash[arr[i]]) {
|
||||
return true;
|
||||
return true
|
||||
}
|
||||
// 不存在该元素,则赋值为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) => {
|
||||
console.log(event.target.value)
|
||||
// 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
|
||||
@@ -23,8 +23,8 @@ const vTrim = {
|
||||
// input.dispatchEvent(new Event(modifiers.lazy ? 'change' : 'input'))
|
||||
// }
|
||||
}
|
||||
});
|
||||
})
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
export default vTrim
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import {duplicateCheck} from "@api/api";
|
||||
import {phoneReg, isEmail, passwordReg, isPhone,chineseReg} from "@/utils/validate";
|
||||
import {duplicateCheck} from '@api/api'
|
||||
import {phoneReg, isEmail, passwordReg, isPhone,chineseReg} from '@/utils/validate'
|
||||
|
||||
// 手机校验的错误信息提示
|
||||
const phoneErrMsg = {
|
||||
|
||||
+3
-3
@@ -7,12 +7,12 @@
|
||||
|
||||
<script>
|
||||
// @ is an alias to /src
|
||||
import HelloWorld from "@/components/HelloWorld.vue";
|
||||
import HelloWorld from '@/components/HelloWorld.vue'
|
||||
|
||||
export default {
|
||||
name: "Home",
|
||||
name: 'Home',
|
||||
components: {
|
||||
HelloWorld,
|
||||
},
|
||||
};
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -25,7 +25,8 @@
|
||||
<!-- 操作按钮区域-->
|
||||
<div class="table-operator">
|
||||
<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-upload>
|
||||
<a-button type="primary" icon="export" @click="handleExportXls('企业管理')">导出</a-button>
|
||||
@@ -50,7 +51,7 @@
|
||||
@change="handleTableChange"
|
||||
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>
|
||||
</template>
|
||||
|
||||
@@ -78,8 +79,8 @@ export default {
|
||||
mixins: [JeroListMixin],
|
||||
computed: {
|
||||
importExcelUrl: function () {
|
||||
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
|
||||
},
|
||||
return `${ window._CONFIG['domianURL'] }/${ this.url.importExcelUrl }`
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
||||
@@ -35,7 +35,8 @@
|
||||
<!-- 操作按钮区域-->
|
||||
<div class="table-operator">
|
||||
<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-upload>
|
||||
<a-button type="primary" icon="export" @click="handleExportXls('联系人管理')">导出</a-button>
|
||||
@@ -60,7 +61,7 @@
|
||||
@change="handleTableChange"
|
||||
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>
|
||||
</template>
|
||||
|
||||
@@ -87,8 +88,8 @@ export default {
|
||||
mixins: [JeroListMixin],
|
||||
computed: {
|
||||
importExcelUrl: function () {
|
||||
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
|
||||
},
|
||||
return `${ window._CONFIG['domianURL'] }/${ this.url.importExcelUrl }`
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
||||
@@ -244,7 +244,7 @@ export default {
|
||||
httpAction(httpurl, formData, method).then((res) => {
|
||||
if (res.success) {
|
||||
that.$message.success(res.message)
|
||||
that.$emit('ok')
|
||||
that.$emit('ok', res.result.id)
|
||||
that.close()
|
||||
} else {
|
||||
that.$message.warning(res.message)
|
||||
|
||||
@@ -79,15 +79,15 @@
|
||||
<!-- 项目名称 待审核状态为红色-->
|
||||
<template slot="projectName" slot-scope="text, record">
|
||||
<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 slot="text" slot-scope="text,record">
|
||||
<template slot="text" slot-scope="text">
|
||||
<j-ellipsis :value="text" :length="20"></j-ellipsis>
|
||||
</template>
|
||||
|
||||
<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>
|
||||
</span>
|
||||
</a-table>
|
||||
@@ -195,17 +195,19 @@ export default {
|
||||
{
|
||||
id: 1,
|
||||
status: 1,
|
||||
contractNum: '1346',
|
||||
createTime: '2020-09-02 11:11:11'
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
toRevenueContractDetail(id) {
|
||||
toRevenueContractDetail(id, contractNum) {
|
||||
this.$router.push({
|
||||
path: '/contractManagement/RevenueContractDetail',
|
||||
query: {
|
||||
revenueId: id
|
||||
revenueId: id,
|
||||
contractNum: contractNum
|
||||
}
|
||||
})
|
||||
},
|
||||
@@ -214,6 +216,15 @@ export default {
|
||||
path: '/contractManagement/AddRevenueContract'
|
||||
})
|
||||
},
|
||||
handleEdit(id, contractNum) {
|
||||
this.$router.push({
|
||||
path: '/contractManagement/AddRevenueContract',
|
||||
query: {
|
||||
revenueId: id,
|
||||
contractNum: contractNum
|
||||
}
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 动态设置待审核状态的表格样式
|
||||
* @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>
|
||||
<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>
|
||||
|
||||
<script>
|
||||
import IconImg from '@/assets/imgs/icon/icon_revenue_contract.png'
|
||||
import PageHeaderTitle from '../../../../components/layouts/PageHeaderTitle'
|
||||
|
||||
export default {
|
||||
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() {
|
||||
console.log(this.$route.query)
|
||||
console.log(this.$route.query.revenueId)
|
||||
this.contractNum = this.$route.query.contractNum
|
||||
}
|
||||
}
|
||||
</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>
|
||||
@@ -3,81 +3,569 @@
|
||||
<page-header-title :is-level-one="false" :img-for-icon="IconImg" level-two-title="新建收入合同"></page-header-title>
|
||||
<a-card :bordered="false">
|
||||
<a-form :form="form">
|
||||
<!-- 主体信息-->
|
||||
<div>
|
||||
<div class="part-title">
|
||||
<div class="part-title-text">主体信息</div>
|
||||
</div>
|
||||
<div>
|
||||
<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-input placeholder="请输入合同编号"
|
||||
v-decorator="['contractNum',validatorRules.contractNum]"
|
||||
:maxLength='50'
|
||||
:disabled="isSaved"
|
||||
@change="e => {e.target.value = (e.target.value + '').trim()}"></a-input>
|
||||
</a-form-item>
|
||||
</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-input placeholder="请输入合同名称"
|
||||
v-decorator="['contractName',validatorRules.contractName]"
|
||||
:maxLength='50'
|
||||
:disabled="isSaved"
|
||||
@change="e => {e.target.value = (e.target.value + '').trim()}"></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :xl="6" :sm="12">
|
||||
<a-col :xxl="6" :xl="8" :sm="12">
|
||||
<a-form-item label="签订单位" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||
<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-col>
|
||||
<a-col :xl="6" :sm="12">
|
||||
<a-col :xxl="6" :xl="8" :sm="12">
|
||||
<a-form-item label="签订联系人" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||
<select-contacts placeholder="请选择签订联系人"
|
||||
:disabled="isSaved"
|
||||
:selected-company="selectedCompany"
|
||||
v-decorator="['signedContactsId',validatorRules.signedContactsId]"></select-contacts>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-row>
|
||||
<a-col :xl="6" :sm="12"></a-col>
|
||||
<a-col :xxl="6" :xl="8" :sm="12">
|
||||
<a-form-item label="是否开口" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||
<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>
|
||||
</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-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>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
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 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 {
|
||||
name: 'RevenueContractModule',
|
||||
components: { PageHeaderTitle, CompanySelect, SelectContacts },
|
||||
components: {
|
||||
PageHeaderTitle,
|
||||
CompanySelect,
|
||||
SelectContacts,
|
||||
SelectPrincipal,
|
||||
JDate,
|
||||
JYearDate,
|
||||
InstallmentForm,
|
||||
ProjectTypeSelection,
|
||||
SelectProjectModule
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
IconImg,
|
||||
form: this.$form.createForm(this),
|
||||
model: {},
|
||||
labelCol: {
|
||||
xs: { span: 24 },
|
||||
sm: { span: 8 }
|
||||
sm: { span: 10 }
|
||||
},
|
||||
wrapperCol: {
|
||||
xs: { span: 24 },
|
||||
sm: { span: 16 }
|
||||
sm: { span: 14 }
|
||||
},
|
||||
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'
|
||||
}
|
||||
},
|
||||
created() {
|
||||
console.log(this.$route)
|
||||
url: {
|
||||
add: '',
|
||||
edit: '',
|
||||
generalProjectList: '/project/payCommonProject/list',
|
||||
workingGroupProjectList: '/project/payWorkingGroup/list',
|
||||
meetingProjectList: '',
|
||||
memberProjectList: ''
|
||||
},
|
||||
selectedCompany: null, // 选中的企业
|
||||
installmentList: [],
|
||||
isSaved: false // 是否保存上方数据
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
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>
|
||||
|
||||
<style scoped lang="less">
|
||||
@import '~@assets/less/common.less';
|
||||
|
||||
.associated-project {
|
||||
margin-top: 2px;
|
||||
}
|
||||
|
||||
.ant-divider-horizontal {
|
||||
margin: 20px 0;
|
||||
}
|
||||
</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 {
|
||||
name: "Analysis",
|
||||
name: 'Analysis',
|
||||
components: {},
|
||||
data() {
|
||||
return {
|
||||
indexStyle: 1
|
||||
};
|
||||
}
|
||||
},
|
||||
created() {
|
||||
|
||||
},
|
||||
methods: {}
|
||||
};
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -192,9 +192,9 @@ export default {
|
||||
)
|
||||
},
|
||||
handleAdd() {
|
||||
this.$refs.modalForm.add();
|
||||
this.$refs.modalForm.title = "新增群组";
|
||||
this.$refs.modalForm.disableSubmit = false;
|
||||
this.$refs.modalForm.add()
|
||||
this.$refs.modalForm.title = '新增群组'
|
||||
this.$refs.modalForm.disableSubmit = false
|
||||
},
|
||||
/**
|
||||
* 新增成员
|
||||
@@ -202,31 +202,31 @@ export default {
|
||||
*/
|
||||
handleAddCommitteeMember(record) {
|
||||
record.committeeId = record.id
|
||||
this.$refs.memberModalForm.add(record);
|
||||
this.$refs.memberModalForm.title = "新增成员";
|
||||
this.$refs.memberModalForm.disableSubmit = false;
|
||||
this.$refs.memberModalForm.add(record)
|
||||
this.$refs.memberModalForm.title = '新增成员'
|
||||
this.$refs.memberModalForm.disableSubmit = false
|
||||
},
|
||||
handleDeleteMember(id) {
|
||||
console.log(id)
|
||||
if (!this.url.deleteMember) {
|
||||
this.$message.error("请设置url.deleteMember属性!")
|
||||
this.$message.error('请设置url.deleteMember属性!')
|
||||
return
|
||||
}
|
||||
var that = this;
|
||||
var that = this
|
||||
this.$confirm({
|
||||
title: "确认删除",
|
||||
content: "确定要删除此条数据吗?",
|
||||
title: '确认删除',
|
||||
content: '确定要删除此条数据吗?',
|
||||
onOk: function () {
|
||||
getAction(that.url.deleteMember, {id: id}).then((res) => {
|
||||
if (res.success) {
|
||||
that.$message.success(res.message);
|
||||
that.loadData();
|
||||
that.$message.success(res.message)
|
||||
that.loadData()
|
||||
} else {
|
||||
that.$message.warning(res.message);
|
||||
that.$message.warning(res.message)
|
||||
}
|
||||
});
|
||||
})
|
||||
}
|
||||
});
|
||||
})
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
import types from './type'
|
||||
|
||||
export default {
|
||||
name: "Exception",
|
||||
name: 'Exception',
|
||||
props: {
|
||||
type: {
|
||||
type: String,
|
||||
|
||||
@@ -301,23 +301,23 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {getUserInfo, getMeetInfoById,getAllWorkProjects} from "@api/inconmeMeetingApi";
|
||||
import {isRepeat} from "@/utils/util";
|
||||
import {httpAction} from "@api/manage";
|
||||
import JDictSelectTag from "@comp/dict/JDictSelectTag";
|
||||
import JYearDate from "@comp/jero/JYearDate";
|
||||
import JUpload from "@comp/jero/JUpload";
|
||||
import {getUserInfo, getMeetInfoById,getAllWorkProjects} from '@api/inconmeMeetingApi'
|
||||
import {isRepeat} from '@/utils/util'
|
||||
import {httpAction} from '@api/manage'
|
||||
import JDictSelectTag from '@comp/dict/JDictSelectTag'
|
||||
import JYearDate from '@comp/jero/JYearDate'
|
||||
import JUpload from '@comp/jero/JUpload'
|
||||
// import JDate from "@comp/tools/JDate";
|
||||
import JDate from "@comp/jero/JDate";
|
||||
import SelectPrincipal from "@comp/company/SelectPrincipal";
|
||||
import JAreaLinkage from "@comp/jero/JAreaLinkagePca";
|
||||
import AreaPca from "@comp/_util/AreaPca";
|
||||
import JDate from '@comp/jero/JDate'
|
||||
import SelectPrincipal from '@comp/company/SelectPrincipal'
|
||||
import JAreaLinkage from '@comp/jero/JAreaLinkagePca'
|
||||
import AreaPca from '@comp/_util/AreaPca'
|
||||
import moment from 'moment'
|
||||
import pick from "lodash.pick";
|
||||
import meetingValidate from "@views/incomePayments/meetManage/meetingValidate";
|
||||
import pick from 'lodash.pick'
|
||||
import meetingValidate from '@views/incomePayments/meetManage/meetingValidate'
|
||||
|
||||
export default {
|
||||
name: "AddOrDetailMeet",
|
||||
name: 'AddOrDetailMeet',
|
||||
components: {
|
||||
JDictSelectTag,
|
||||
JYearDate,
|
||||
@@ -353,7 +353,7 @@ export default {
|
||||
// 详细地址
|
||||
address: '',
|
||||
// 会议类型 新增时默认为其他会议
|
||||
meetingType: "4",
|
||||
meetingType: '4',
|
||||
validatorRules: meetingValidate,
|
||||
validateInviteCode: {
|
||||
invitationCode: {
|
||||
@@ -364,8 +364,8 @@ export default {
|
||||
}
|
||||
},
|
||||
url: {
|
||||
add: "/meeting/payMeeting/add",
|
||||
edit: "/meeting/payMeeting/edit",
|
||||
add: '/meeting/payMeeting/add',
|
||||
edit: '/meeting/payMeeting/edit',
|
||||
},
|
||||
// 召开时间
|
||||
newConvokeTime: '',
|
||||
@@ -376,7 +376,7 @@ export default {
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.pcaData = new AreaPca();
|
||||
this.pcaData = new AreaPca()
|
||||
// 编辑获取会议信息
|
||||
if (this.$route.query.id) {
|
||||
getMeetInfoById({id: this.$route.query.id}).then(res => {
|
||||
|
||||
@@ -109,19 +109,19 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {JeroListMixin} from "@/mixins/JeroListMixin";
|
||||
import {mixinDevice} from "@/utils/mixin";
|
||||
import JYearDate from "@comp/jero/JYearDate";
|
||||
import JDictSelectTag from "@comp/dict/JDictSelectTag";
|
||||
import ImportParticipantModal from "@views/incomePayments/meetManage/modules/ImportParticipantModal";
|
||||
import BatchInvocieModal from "@views/incomePayments/meetManage/modules/BatchInvocieModal";
|
||||
import BatchSetDockerModal from "@views/incomePayments/meetManage/modules/BatchSetDockerModal";
|
||||
import ProjectDetailModal from "@comp/ProjectDetailModal";
|
||||
import AuditModal from "@views/incomePayments/meetManage/modules/AuditModal";
|
||||
import {JeroListMixin} from '@/mixins/JeroListMixin'
|
||||
import {mixinDevice} from '@/utils/mixin'
|
||||
import JYearDate from '@comp/jero/JYearDate'
|
||||
import JDictSelectTag from '@comp/dict/JDictSelectTag'
|
||||
import ImportParticipantModal from '@views/incomePayments/meetManage/modules/ImportParticipantModal'
|
||||
import BatchInvocieModal from '@views/incomePayments/meetManage/modules/BatchInvocieModal'
|
||||
import BatchSetDockerModal from '@views/incomePayments/meetManage/modules/BatchSetDockerModal'
|
||||
import ProjectDetailModal from '@comp/ProjectDetailModal'
|
||||
import AuditModal from '@views/incomePayments/meetManage/modules/AuditModal'
|
||||
|
||||
|
||||
export default {
|
||||
name: "Attendance",
|
||||
name: 'Attendance',
|
||||
mixins: [JeroListMixin, mixinDevice],
|
||||
components: {
|
||||
JYearDate,
|
||||
@@ -141,84 +141,84 @@ export default {
|
||||
dataIndex: '',
|
||||
key: 'rowIndex',
|
||||
width: 60,
|
||||
align: "center",
|
||||
align: 'center',
|
||||
customRender: function (t, r, index) {
|
||||
return parseInt(index) + 1;
|
||||
return parseInt(index) + 1
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '参会单位',
|
||||
align: "center",
|
||||
align: 'center',
|
||||
dataIndex: '',
|
||||
scopedSlots: {customRender: 'htmlSlot'}
|
||||
},
|
||||
{
|
||||
title: '参会人员',
|
||||
align: "center",
|
||||
align: 'center',
|
||||
dataIndex: '',
|
||||
},
|
||||
{
|
||||
title: '应收金额',
|
||||
align: "center",
|
||||
align: 'center',
|
||||
dataIndex: ''
|
||||
},
|
||||
{
|
||||
title: '实收金额',
|
||||
align: "center",
|
||||
align: 'center',
|
||||
dataIndex: ''
|
||||
},
|
||||
{
|
||||
title: '缴费方式',
|
||||
align: "center",
|
||||
align: 'center',
|
||||
dataIndex: ''
|
||||
},
|
||||
{
|
||||
title: '是否签到',
|
||||
align: "center",
|
||||
align: 'center',
|
||||
dataIndex: ''
|
||||
},
|
||||
{
|
||||
title: '打包',
|
||||
align: "center",
|
||||
align: 'center',
|
||||
dataIndex: ''
|
||||
},
|
||||
{
|
||||
title: '需要发票',
|
||||
align: "center",
|
||||
align: 'center',
|
||||
dataIndex: ''
|
||||
},
|
||||
{
|
||||
title: '到账',
|
||||
align: "center",
|
||||
align: 'center',
|
||||
dataIndex: ''
|
||||
},
|
||||
{
|
||||
title: '开票',
|
||||
align: "center",
|
||||
align: 'center',
|
||||
dataIndex: ''
|
||||
},
|
||||
{
|
||||
title: '邮寄',
|
||||
align: "center",
|
||||
align: 'center',
|
||||
dataIndex: ''
|
||||
},
|
||||
{
|
||||
title: '对接人',
|
||||
align: "center",
|
||||
align: 'center',
|
||||
dataIndex: ''
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
align: "center",
|
||||
align: 'center',
|
||||
scopedSlots: {customRender: 'action'}
|
||||
},
|
||||
],
|
||||
url: {
|
||||
list: "/jero/memberProject/page",
|
||||
delete: "/jero/memberProject/delete",
|
||||
deleteBatch: "/jero/memberProject/deleteBatch",
|
||||
exportXlsUrl: "/jero/memberProject/exportXls",
|
||||
importExcelUrl: "jero/memberProject/importExcel",
|
||||
list: '/jero/memberProject/page',
|
||||
delete: '/jero/memberProject/delete',
|
||||
deleteBatch: '/jero/memberProject/deleteBatch',
|
||||
exportXlsUrl: '/jero/memberProject/exportXls',
|
||||
importExcelUrl: 'jero/memberProject/importExcel',
|
||||
},
|
||||
}
|
||||
},
|
||||
@@ -259,7 +259,7 @@ export default {
|
||||
// 打开模态框
|
||||
this.$refs.batchInvoiceModal.open()
|
||||
}else {
|
||||
let initName = this.selectionRows[0].name;
|
||||
let initName = this.selectionRows[0].name
|
||||
// 单位判重
|
||||
let flag = this.selectionRows.some(item => {
|
||||
return item.name !== initName
|
||||
|
||||
@@ -98,14 +98,14 @@
|
||||
<script>
|
||||
import {mixinDevice} from '@/utils/mixin'
|
||||
import {JeroListMixin} from '@/mixins/JeroListMixin'
|
||||
import JYearDate from "@comp/jero/JYearDate";
|
||||
import UploadMeetFileModal from "@views/incomePayments/meetManage/modules/UploadMeetFileModal";
|
||||
import PageHeaderTitle from "@comp/layouts/PageHeaderTitle";
|
||||
import JYearDate from '@comp/jero/JYearDate'
|
||||
import UploadMeetFileModal from '@views/incomePayments/meetManage/modules/UploadMeetFileModal'
|
||||
import PageHeaderTitle from '@comp/layouts/PageHeaderTitle'
|
||||
import IconImg from '@/assets/imgs/icon/icon_company_management.png'
|
||||
import "@/assets/less/TableExpand.less";
|
||||
import '@/assets/less/TableExpand.less'
|
||||
|
||||
export default {
|
||||
name: "MeetManageList",
|
||||
name: 'MeetManageList',
|
||||
mixins: [JeroListMixin, mixinDevice],
|
||||
components: {
|
||||
JYearDate,
|
||||
@@ -122,33 +122,33 @@ export default {
|
||||
dataIndex: '',
|
||||
key: 'rowIndex',
|
||||
width: 60,
|
||||
align: "center",
|
||||
align: 'center',
|
||||
customRender: function (t, r, index) {
|
||||
return parseInt(index) + 1;
|
||||
return parseInt(index) + 1
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '会议名称',
|
||||
align: "center",
|
||||
align: 'center',
|
||||
dataIndex: 'meetingName',
|
||||
scopedSlots: {customRender: 'htmlSlot'},
|
||||
width: 160,
|
||||
},
|
||||
{
|
||||
title: '会议类型',
|
||||
align: "center",
|
||||
align: 'center',
|
||||
dataIndex: 'meetingType_dictText',
|
||||
width: 100,
|
||||
},
|
||||
{
|
||||
title: '负责人',
|
||||
align: "center",
|
||||
align: 'center',
|
||||
dataIndex: 'directorName',
|
||||
width: 160,
|
||||
},
|
||||
{
|
||||
title: '召开时间',
|
||||
align: "center",
|
||||
align: 'center',
|
||||
dataIndex: 'startTime',
|
||||
width: 160,
|
||||
customRender:function (text,record) {
|
||||
@@ -157,7 +157,7 @@ export default {
|
||||
},
|
||||
{
|
||||
title: '召开地点',
|
||||
align: "center",
|
||||
align: 'center',
|
||||
dataIndex: 'venue',
|
||||
width: 160,
|
||||
customRender:function (text,record){
|
||||
@@ -166,35 +166,35 @@ export default {
|
||||
},
|
||||
{
|
||||
title: '年份',
|
||||
align: "center",
|
||||
align: 'center',
|
||||
dataIndex: 'particularYear',
|
||||
width: 100,
|
||||
},
|
||||
{
|
||||
title: '创建时间',
|
||||
align: "center",
|
||||
align: 'center',
|
||||
dataIndex: 'createTime',
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
align: "center",
|
||||
align: 'center',
|
||||
fixed:'right',
|
||||
width: 160,
|
||||
scopedSlots: {customRender: 'action'}
|
||||
},
|
||||
],
|
||||
url: {
|
||||
list: "/meeting/payMeeting/page",
|
||||
delete: "/meeting/payMeeting/delete",
|
||||
deleteBatch: "/meeting/payMeeting/deleteBatch",
|
||||
exportXlsUrl: "/meeting/payMeeting/exportXls",
|
||||
importExcelUrl: "meeting/payMeeting/importExcel",
|
||||
list: '/meeting/payMeeting/page',
|
||||
delete: '/meeting/payMeeting/delete',
|
||||
deleteBatch: '/meeting/payMeeting/deleteBatch',
|
||||
exportXlsUrl: '/meeting/payMeeting/exportXls',
|
||||
importExcelUrl: 'meeting/payMeeting/importExcel',
|
||||
},
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
importExcelUrl: function () {
|
||||
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
|
||||
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
@@ -238,7 +238,7 @@ export default {
|
||||
* */
|
||||
toAttendance(record){
|
||||
this.$router.push({
|
||||
path:"/incomePayments/meetManage/Attendance",
|
||||
path:'/incomePayments/meetManage/Attendance',
|
||||
query:{
|
||||
id:record.id
|
||||
}
|
||||
|
||||
@@ -309,15 +309,15 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import CompanySelect from "@comp/company/CompanySelect";
|
||||
import SelectContacts from "@comp/company/SelectContacts";
|
||||
import JDate from "@comp/jero/JDate";
|
||||
import JImageUpload from "@comp/jero/JImageUpload";
|
||||
import JDictSelectTag from "@comp/dict/JDictSelectTag";
|
||||
import JUpload from "@comp/jero/JUpload";
|
||||
import CompanySelect from '@comp/company/CompanySelect'
|
||||
import SelectContacts from '@comp/company/SelectContacts'
|
||||
import JDate from '@comp/jero/JDate'
|
||||
import JImageUpload from '@comp/jero/JImageUpload'
|
||||
import JDictSelectTag from '@comp/dict/JDictSelectTag'
|
||||
import JUpload from '@comp/jero/JUpload'
|
||||
|
||||
export default {
|
||||
name: "SignUpInfoEdit",
|
||||
name: 'SignUpInfoEdit',
|
||||
components:{
|
||||
CompanySelect,
|
||||
SelectContacts,
|
||||
@@ -360,7 +360,7 @@ export default {
|
||||
* 保存
|
||||
* */
|
||||
nextStep(){
|
||||
console.log("保存")
|
||||
console.log('保存')
|
||||
},
|
||||
/*
|
||||
* 确定
|
||||
|
||||
@@ -94,12 +94,12 @@
|
||||
<script>
|
||||
import {mixinDevice} from '@/utils/mixin'
|
||||
import {JeroListMixin} from '@/mixins/JeroListMixin'
|
||||
import JDictSelectTag from "@comp/dict/JDictSelectTag";
|
||||
import PageHeaderTitle from "@comp/layouts/PageHeaderTitle";
|
||||
import JDictSelectTag from '@comp/dict/JDictSelectTag'
|
||||
import PageHeaderTitle from '@comp/layouts/PageHeaderTitle'
|
||||
import IconImg from '@/assets/imgs/icon/icon_company_management.png'
|
||||
|
||||
export default {
|
||||
name: "SignUpInfoList",
|
||||
name: 'SignUpInfoList',
|
||||
mixins: [JeroListMixin, mixinDevice],
|
||||
components: {
|
||||
JDictSelectTag,
|
||||
@@ -107,7 +107,7 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
descripion: "报名信息页面",
|
||||
descripion: '报名信息页面',
|
||||
IconImg,
|
||||
columns: [
|
||||
{
|
||||
@@ -115,44 +115,44 @@ export default {
|
||||
dataIndex: '',
|
||||
key: 'rowIndex',
|
||||
width: 60,
|
||||
align: "center",
|
||||
align: 'center',
|
||||
customRender: function (t, r, index) {
|
||||
return parseInt(index) + 1;
|
||||
return parseInt(index) + 1
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '企业名称',
|
||||
align: "center",
|
||||
align: 'center',
|
||||
dataIndex: '',
|
||||
},
|
||||
{
|
||||
title: '姓名',
|
||||
align: "center",
|
||||
align: 'center',
|
||||
dataIndex: '',
|
||||
},
|
||||
{
|
||||
title: '身份',
|
||||
align: "center",
|
||||
align: 'center',
|
||||
dataIndex: '',
|
||||
},
|
||||
{
|
||||
title: '手机号',
|
||||
align: "center",
|
||||
align: 'center',
|
||||
dataIndex: '',
|
||||
},
|
||||
{
|
||||
title: '职务',
|
||||
align: "center",
|
||||
align: 'center',
|
||||
dataIndex: '',
|
||||
},
|
||||
{
|
||||
title: '邮箱',
|
||||
align: "center",
|
||||
align: 'center',
|
||||
dataIndex: '',
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
align: "center",
|
||||
align: 'center',
|
||||
dataIndex: '',
|
||||
scopedSlots: {customRender: 'action'}
|
||||
},
|
||||
@@ -166,11 +166,11 @@ export default {
|
||||
sm: {span: 18}
|
||||
},
|
||||
url: {
|
||||
list: "/jero/memberProject/page",
|
||||
delete: "/jero/memberProject/delete",
|
||||
deleteBatch: "/jero/memberProject/deleteBatch",
|
||||
exportXlsUrl: "/jero/memberProject/exportXls",
|
||||
importExcelUrl: "jero/memberProject/importExcel",
|
||||
list: '/jero/memberProject/page',
|
||||
delete: '/jero/memberProject/delete',
|
||||
deleteBatch: '/jero/memberProject/deleteBatch',
|
||||
exportXlsUrl: '/jero/memberProject/exportXls',
|
||||
importExcelUrl: 'jero/memberProject/importExcel',
|
||||
},
|
||||
}
|
||||
},
|
||||
|
||||
@@ -90,10 +90,10 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import JImageUpload from "@comp/jero/JImageUpload";
|
||||
import JImageUpload from '@comp/jero/JImageUpload'
|
||||
|
||||
export default {
|
||||
name: "AuditModal",
|
||||
name: 'AuditModal',
|
||||
components: {
|
||||
JImageUpload
|
||||
},
|
||||
@@ -136,8 +136,8 @@ export default {
|
||||
}
|
||||
},
|
||||
url: {
|
||||
add: "/jero/memberProject/add",
|
||||
edit: "/jero/memberProject/edit",
|
||||
add: '/jero/memberProject/add',
|
||||
edit: '/jero/memberProject/edit',
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
@@ -62,10 +62,10 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import SelectContacts from "@comp/company/SelectContacts";
|
||||
import SelectContacts from '@comp/company/SelectContacts'
|
||||
|
||||
export default {
|
||||
name: "BatchInvocieModal",
|
||||
name: 'BatchInvocieModal',
|
||||
components:{
|
||||
SelectContacts
|
||||
},
|
||||
@@ -101,8 +101,8 @@ export default {
|
||||
}
|
||||
},
|
||||
url: {
|
||||
add: "/jero/memberProject/add",
|
||||
edit: "/jero/memberProject/edit",
|
||||
add: '/jero/memberProject/add',
|
||||
edit: '/jero/memberProject/edit',
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
@@ -27,9 +27,9 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import SelectPrincipal from "@comp/company/SelectPrincipal";
|
||||
import SelectPrincipal from '@comp/company/SelectPrincipal'
|
||||
export default {
|
||||
name: "BatchSetDockerModal",
|
||||
name: 'BatchSetDockerModal',
|
||||
components:{
|
||||
SelectPrincipal
|
||||
},
|
||||
@@ -63,8 +63,8 @@ export default {
|
||||
}
|
||||
},
|
||||
url: {
|
||||
add: "/jero/memberProject/add",
|
||||
edit: "/jero/memberProject/edit",
|
||||
add: '/jero/memberProject/add',
|
||||
edit: '/jero/memberProject/edit',
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
@@ -66,16 +66,16 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {JeroListMixin} from "@/mixins/JeroListMixin";
|
||||
import {mixinDevice} from "@/utils/mixin";
|
||||
import {postAction} from "@api/manage";
|
||||
import {JeroListMixin} from '@/mixins/JeroListMixin'
|
||||
import {mixinDevice} from '@/utils/mixin'
|
||||
import {postAction} from '@api/manage'
|
||||
|
||||
export default {
|
||||
name: "ImportParticipantModal",
|
||||
name: 'ImportParticipantModal',
|
||||
mixins: [JeroListMixin, mixinDevice],
|
||||
data() {
|
||||
return {
|
||||
description: "导入参会人模态框",
|
||||
description: '导入参会人模态框',
|
||||
disableMixinCreated: true,
|
||||
title: '操作',
|
||||
width: 1000,
|
||||
@@ -88,45 +88,45 @@ export default {
|
||||
dataIndex: '',
|
||||
key: 'rowIndex',
|
||||
width: 60,
|
||||
align: "center",
|
||||
align: 'center',
|
||||
customRender: function (t, r, index) {
|
||||
return parseInt(index) + 1;
|
||||
return parseInt(index) + 1
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '企业名称',
|
||||
align: "center",
|
||||
align: 'center',
|
||||
dataIndex: '',
|
||||
},
|
||||
{
|
||||
title: '姓名',
|
||||
align: "center",
|
||||
align: 'center',
|
||||
dataIndex: '',
|
||||
},
|
||||
{
|
||||
title: '身份',
|
||||
align: "center",
|
||||
align: 'center',
|
||||
dataIndex: '',
|
||||
},
|
||||
{
|
||||
title: '手机号',
|
||||
align: "center",
|
||||
align: 'center',
|
||||
dataIndex: '',
|
||||
},
|
||||
{
|
||||
title: '职务',
|
||||
align: "center",
|
||||
align: 'center',
|
||||
dataIndex: '',
|
||||
},
|
||||
{
|
||||
title: '邮箱',
|
||||
align: "center",
|
||||
align: 'center',
|
||||
dataIndex: '',
|
||||
},
|
||||
],
|
||||
model: {},
|
||||
url: {
|
||||
list: "/jero/memberProject/page",
|
||||
list: '/jero/memberProject/page',
|
||||
add: ''
|
||||
}
|
||||
}
|
||||
@@ -141,7 +141,7 @@ export default {
|
||||
}
|
||||
if (this.selectionRows.length === 0) {
|
||||
this.$message.warn('请选择一条记录')
|
||||
return;
|
||||
return
|
||||
}
|
||||
if (this.selectionRows.length > 0) {
|
||||
this.flag = true
|
||||
|
||||
@@ -82,14 +82,14 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import pick from "lodash.pick";
|
||||
import {httpAction} from "@api/manage";
|
||||
import JYearDate from "@comp/jero/JYearDate";
|
||||
import JUpload from "@comp/jero/JUpload";
|
||||
import SelectPrincipal from "@comp/company/SelectPrincipal";
|
||||
import pick from 'lodash.pick'
|
||||
import {httpAction} from '@api/manage'
|
||||
import JYearDate from '@comp/jero/JYearDate'
|
||||
import JUpload from '@comp/jero/JUpload'
|
||||
import SelectPrincipal from '@comp/company/SelectPrincipal'
|
||||
|
||||
export default {
|
||||
name: "MeetModal",
|
||||
name: 'MeetModal',
|
||||
components: {
|
||||
JYearDate,
|
||||
JUpload,
|
||||
@@ -136,8 +136,8 @@ export default {
|
||||
}
|
||||
},
|
||||
url: {
|
||||
add: "/jero/memberProject/add",
|
||||
edit: "/jero/memberProject/edit",
|
||||
add: '/jero/memberProject/add',
|
||||
edit: '/jero/memberProject/edit',
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
@@ -25,11 +25,11 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {httpAction} from "@api/manage";
|
||||
import JUpload from "@comp/jero/JUpload";
|
||||
import {httpAction} from '@api/manage'
|
||||
import JUpload from '@comp/jero/JUpload'
|
||||
|
||||
export default {
|
||||
name: "UploadMeetFileModal",
|
||||
name: 'UploadMeetFileModal',
|
||||
components:{
|
||||
JUpload
|
||||
},
|
||||
@@ -56,8 +56,8 @@ export default {
|
||||
}
|
||||
},
|
||||
url: {
|
||||
add: "/jero/memberProject/add",
|
||||
edit: "/jero/memberProject/edit",
|
||||
add: '/jero/memberProject/add',
|
||||
edit: '/jero/memberProject/edit',
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
@@ -78,14 +78,14 @@
|
||||
<script>
|
||||
import {mixinDevice} from '@/utils/mixin'
|
||||
import {JeroListMixin} from '@/mixins/JeroListMixin'
|
||||
import JYearDate from "@comp/jero/JYearDate";
|
||||
import MemberProjectModal from "@views/incomePayments/memberManage/modules/MemberProjectModal";
|
||||
import PageHeaderTitle from "@comp/layouts/PageHeaderTitle";
|
||||
import JYearDate from '@comp/jero/JYearDate'
|
||||
import MemberProjectModal from '@views/incomePayments/memberManage/modules/MemberProjectModal'
|
||||
import PageHeaderTitle from '@comp/layouts/PageHeaderTitle'
|
||||
import IconImg from '@/assets/imgs/icon/icon_company_management.png'
|
||||
|
||||
export default {
|
||||
mixins: [JeroListMixin, mixinDevice],
|
||||
name: "MemberProjectList",
|
||||
name: 'MemberProjectList',
|
||||
components: {
|
||||
JYearDate,
|
||||
MemberProjectModal,
|
||||
@@ -101,46 +101,46 @@ export default {
|
||||
dataIndex: '',
|
||||
key: 'rowIndex',
|
||||
width: 60,
|
||||
align: "center",
|
||||
align: 'center',
|
||||
customRender: function (t, r, index) {
|
||||
return parseInt(index) + 1;
|
||||
return parseInt(index) + 1
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '会员项目',
|
||||
align: "center",
|
||||
align: 'center',
|
||||
dataIndex: 'projectName',
|
||||
scopedSlots: {customRender: 'htmlSlot'}
|
||||
},
|
||||
{
|
||||
title: '收费标准',
|
||||
align: "center",
|
||||
align: 'center',
|
||||
dataIndex: 'chargeStandard',
|
||||
|
||||
},
|
||||
{
|
||||
title: '负责人',
|
||||
align: "center",
|
||||
align: 'center',
|
||||
dataIndex: 'directorName'
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
align: "center",
|
||||
align: 'center',
|
||||
scopedSlots: {customRender: 'action'}
|
||||
},
|
||||
],
|
||||
url: {
|
||||
list: "/jero/memberProject/page",
|
||||
delete: "/jero/memberProject/delete",
|
||||
deleteBatch: "/jero/memberProject/deleteBatch",
|
||||
exportXlsUrl: "/jero/memberProject/exportXls",
|
||||
importExcelUrl: "jero/memberProject/importExcel",
|
||||
list: '/jero/memberProject/page',
|
||||
delete: '/jero/memberProject/delete',
|
||||
deleteBatch: '/jero/memberProject/deleteBatch',
|
||||
exportXlsUrl: '/jero/memberProject/exportXls',
|
||||
importExcelUrl: 'jero/memberProject/importExcel',
|
||||
},
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
importExcelUrl: function () {
|
||||
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
|
||||
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
|
||||
@@ -116,18 +116,18 @@
|
||||
<script>
|
||||
import {mixinDevice} from '@/utils/mixin'
|
||||
import {JeroListMixin} from '@/mixins/JeroListMixin'
|
||||
import JYearDate from "@comp/jero/JYearDate";
|
||||
import SafeguardMemberModal from "@views/incomePayments/memberManage/modules/SafeguardMemberModal";
|
||||
import ProjectDetailModal from "@comp/ProjectDetailModal";
|
||||
import StatusSlot from "@comp/tools/StatusSlot";
|
||||
import PageHeaderTitle from "@comp/layouts/PageHeaderTitle";
|
||||
import JYearDate from '@comp/jero/JYearDate'
|
||||
import SafeguardMemberModal from '@views/incomePayments/memberManage/modules/SafeguardMemberModal'
|
||||
import ProjectDetailModal from '@comp/ProjectDetailModal'
|
||||
import StatusSlot from '@comp/tools/StatusSlot'
|
||||
import PageHeaderTitle from '@comp/layouts/PageHeaderTitle'
|
||||
import IconImg from '@/assets/imgs/icon/icon_company_management.png'
|
||||
|
||||
import {getAction} from "@api/manage";
|
||||
import {getFileInfo} from "@api/api";
|
||||
import {getAction} from '@api/manage'
|
||||
import {getFileInfo} from '@api/api'
|
||||
|
||||
export default {
|
||||
name: "SafeguardMemberList",
|
||||
name: 'SafeguardMemberList',
|
||||
mixins: [JeroListMixin, mixinDevice],
|
||||
components: {
|
||||
JYearDate,
|
||||
@@ -146,65 +146,65 @@ export default {
|
||||
dataIndex: '',
|
||||
key: 'rowIndex',
|
||||
width: 60,
|
||||
align: "center",
|
||||
align: 'center',
|
||||
customRender: function (t, r, index) {
|
||||
return parseInt(index) + 1;
|
||||
return parseInt(index) + 1
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '会员单位',
|
||||
align: "center",
|
||||
align: 'center',
|
||||
dataIndex: 'companyName',
|
||||
scopedSlots: {customRender: 'member'}
|
||||
},
|
||||
{
|
||||
title: '企业联系人',
|
||||
align: "center",
|
||||
align: 'center',
|
||||
dataIndex: 'companyContactName',
|
||||
},
|
||||
{
|
||||
title: '应收金额',
|
||||
align: "center",
|
||||
align: 'center',
|
||||
dataIndex: 'amountReceivable',
|
||||
},
|
||||
{
|
||||
title: '实收金额',
|
||||
align: "center",
|
||||
align: 'center',
|
||||
dataIndex: 'paidAmount',
|
||||
},
|
||||
{
|
||||
title: '打包',
|
||||
align: "center",
|
||||
align: 'center',
|
||||
dataIndex: 'pack',
|
||||
scopedSlots: {customRender: 'status-pack'}
|
||||
},
|
||||
{
|
||||
title: '需要发票',
|
||||
align: "center",
|
||||
align: 'center',
|
||||
dataIndex: 'needInvoice',
|
||||
scopedSlots: {customRender: 'status-pack'}
|
||||
},
|
||||
{
|
||||
title: '到账',
|
||||
align: "center",
|
||||
align: 'center',
|
||||
dataIndex: 'inAccount',
|
||||
scopedSlots: {customRender: 'status'}
|
||||
},
|
||||
{
|
||||
title: '开票',
|
||||
align: "center",
|
||||
align: 'center',
|
||||
dataIndex: 'makeInvoice',
|
||||
scopedSlots: {customRender: 'status'}
|
||||
},
|
||||
{
|
||||
title: '邮寄',
|
||||
align: "center",
|
||||
align: 'center',
|
||||
dataIndex: 'mail',
|
||||
scopedSlots: {customRender: 'status'}
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
align: "center",
|
||||
align: 'center',
|
||||
dataIndex: '',
|
||||
scopedSlots: {customRender: 'action'}
|
||||
},
|
||||
@@ -213,27 +213,27 @@ export default {
|
||||
// 当前项目基本信息
|
||||
currentInfo: {},
|
||||
url: {
|
||||
list: "/jero/memberProjectSubitem/page",
|
||||
delete: "/jero/memberProjectSubitem/delete",
|
||||
deleteBatch: "/jero/memberProjectSubitem/deleteBatch",
|
||||
exportXlsUrl: "/jero/memberProjectSubitem/exportXls",
|
||||
importExcelUrl: "jero/memberProjectSubitem/importExcel",
|
||||
downTemplateUrl: "jero/memberProjectSubitem/exportTemplate"
|
||||
list: '/jero/memberProjectSubitem/page',
|
||||
delete: '/jero/memberProjectSubitem/delete',
|
||||
deleteBatch: '/jero/memberProjectSubitem/deleteBatch',
|
||||
exportXlsUrl: '/jero/memberProjectSubitem/exportXls',
|
||||
importExcelUrl: 'jero/memberProjectSubitem/importExcel',
|
||||
downTemplateUrl: 'jero/memberProjectSubitem/exportTemplate'
|
||||
},
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
importExcelUrl: function () {
|
||||
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
|
||||
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`
|
||||
},
|
||||
},
|
||||
created() {
|
||||
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.loadData();
|
||||
this.loadData()
|
||||
//初始化字典配置 在自己页面定义
|
||||
this.initDictConfig();
|
||||
this.initDictConfig()
|
||||
this.getChargeNoFile()
|
||||
},
|
||||
methods: {
|
||||
@@ -251,34 +251,34 @@ export default {
|
||||
},
|
||||
loadData(arg) {
|
||||
if (!this.url.list) {
|
||||
this.$message.error("请设置url.list属性!")
|
||||
this.$message.error('请设置url.list属性!')
|
||||
return
|
||||
}
|
||||
//加载数据 若传入参数1则加载第一页的内容
|
||||
if (arg === 1) {
|
||||
this.ipagination.current = 1;
|
||||
this.ipagination.current = 1
|
||||
}
|
||||
// 传入项目id 查寻该项目下的成员
|
||||
this.filters.projectId = this.currentInfo.id
|
||||
var params = this.getQueryParams();//查询条件
|
||||
this.loading = true;
|
||||
var params = this.getQueryParams()//查询条件
|
||||
this.loading = true
|
||||
getAction(this.url.list, params).then((res) => {
|
||||
if (res.success) {
|
||||
//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) {
|
||||
this.ipagination.total = res.result.total;
|
||||
this.ipagination.total = res.result.total
|
||||
//清空列表选中
|
||||
this.onClearSelected()
|
||||
} else {
|
||||
this.ipagination.total = 0;
|
||||
this.ipagination.total = 0
|
||||
}
|
||||
//update-end---author:zhangyafei Date:20201118 for:适配不分页的数据列表------------
|
||||
}
|
||||
if (res.code === 510) {
|
||||
this.$message.warning(res.message)
|
||||
}
|
||||
this.loading = false;
|
||||
this.loading = false
|
||||
}).finally(() => {
|
||||
this.loading = false
|
||||
})
|
||||
|
||||
@@ -102,14 +102,14 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mixinDevice } from "@/utils/mixin";
|
||||
import { JeroListMixin } from "@/mixins/JeroListMixin";
|
||||
import ProjectDetailModal from "@comp/ProjectDetailModal";
|
||||
import "@/assets/less/TableExpand.less";
|
||||
import StatusSlot from "@comp/tools/StatusSlot";
|
||||
import { mixinDevice } from '@/utils/mixin'
|
||||
import { JeroListMixin } from '@/mixins/JeroListMixin'
|
||||
import ProjectDetailModal from '@comp/ProjectDetailModal'
|
||||
import '@/assets/less/TableExpand.less'
|
||||
import StatusSlot from '@comp/tools/StatusSlot'
|
||||
|
||||
export default {
|
||||
name: "SafeguardStardsMemberList",
|
||||
name: 'SafeguardStardsMemberList',
|
||||
mixins: [JeroListMixin, mixinDevice],
|
||||
components: {
|
||||
ProjectDetailModal,
|
||||
@@ -119,100 +119,100 @@ export default {
|
||||
return {
|
||||
columns: [
|
||||
{
|
||||
title: "序号",
|
||||
dataIndex: "",
|
||||
key: "rowIndex",
|
||||
title: '序号',
|
||||
dataIndex: '',
|
||||
key: 'rowIndex',
|
||||
width: 60,
|
||||
align: "center",
|
||||
align: 'center',
|
||||
customRender: function (t, r, index) {
|
||||
return parseInt(index) + 1;
|
||||
return parseInt(index) + 1
|
||||
},
|
||||
},
|
||||
{
|
||||
title: "会员编号",
|
||||
align: "center",
|
||||
dataIndex: "memberNo",
|
||||
title: '会员编号',
|
||||
align: 'center',
|
||||
dataIndex: 'memberNo',
|
||||
},
|
||||
{
|
||||
title: "企业名称",
|
||||
align: "center",
|
||||
dataIndex: "companyName",
|
||||
scopedSlots: { customRender: "detail" },
|
||||
title: '企业名称',
|
||||
align: 'center',
|
||||
dataIndex: 'companyName',
|
||||
scopedSlots: { customRender: 'detail' },
|
||||
},
|
||||
{
|
||||
title: "会员类型",
|
||||
align: "center",
|
||||
dataIndex: "memberType_dictText",
|
||||
title: '会员类型',
|
||||
align: 'center',
|
||||
dataIndex: 'memberType_dictText',
|
||||
},
|
||||
{
|
||||
title: "联系人",
|
||||
align: "center",
|
||||
dataIndex: "liaisonMan",
|
||||
title: '联系人',
|
||||
align: 'center',
|
||||
dataIndex: 'liaisonMan',
|
||||
},
|
||||
{
|
||||
title: "邮箱",
|
||||
align: "center",
|
||||
dataIndex: "email",
|
||||
title: '邮箱',
|
||||
align: 'center',
|
||||
dataIndex: 'email',
|
||||
},
|
||||
{
|
||||
title: "手机",
|
||||
align: "center",
|
||||
dataIndex: "mobile",
|
||||
title: '手机',
|
||||
align: 'center',
|
||||
dataIndex: 'mobile',
|
||||
},
|
||||
{
|
||||
title: "会员状态",
|
||||
align: "center",
|
||||
dataIndex: "memberStatus_dictText",
|
||||
title: '会员状态',
|
||||
align: 'center',
|
||||
dataIndex: 'memberStatus_dictText',
|
||||
},
|
||||
{
|
||||
title: "注册时间",
|
||||
align: "center",
|
||||
dataIndex: "registerTime",
|
||||
scopedSlots: { customRender: "htmlSlot" },
|
||||
title: '注册时间',
|
||||
align: 'center',
|
||||
dataIndex: 'registerTime',
|
||||
scopedSlots: { customRender: 'htmlSlot' },
|
||||
},
|
||||
{
|
||||
title: "打包",
|
||||
align: "center",
|
||||
dataIndex: "pack",
|
||||
scopedSlots: { customRender: "status-pack" },
|
||||
title: '打包',
|
||||
align: 'center',
|
||||
dataIndex: 'pack',
|
||||
scopedSlots: { customRender: 'status-pack' },
|
||||
},
|
||||
{
|
||||
title: "需要发票",
|
||||
align: "center",
|
||||
dataIndex: "invoiceRequirements",
|
||||
scopedSlots: { customRender: "status-pack" },
|
||||
title: '需要发票',
|
||||
align: 'center',
|
||||
dataIndex: 'invoiceRequirements',
|
||||
scopedSlots: { customRender: 'status-pack' },
|
||||
},
|
||||
{
|
||||
title: "到账",
|
||||
align: "center",
|
||||
dataIndex: "inAccount",
|
||||
scopedSlots: { customRender: "status" },
|
||||
title: '到账',
|
||||
align: 'center',
|
||||
dataIndex: 'inAccount',
|
||||
scopedSlots: { customRender: 'status' },
|
||||
},
|
||||
{
|
||||
title: "开票",
|
||||
align: "center",
|
||||
dataIndex: "makeInvoice",
|
||||
scopedSlots: { customRender: "status" },
|
||||
title: '开票',
|
||||
align: 'center',
|
||||
dataIndex: 'makeInvoice',
|
||||
scopedSlots: { customRender: 'status' },
|
||||
},
|
||||
{
|
||||
title: "邮寄",
|
||||
align: "center",
|
||||
dataIndex: "mail",
|
||||
scopedSlots: { customRender: "status" },
|
||||
title: '邮寄',
|
||||
align: 'center',
|
||||
dataIndex: 'mail',
|
||||
scopedSlots: { customRender: 'status' },
|
||||
},
|
||||
],
|
||||
disableMixinCreated: true,
|
||||
url: {
|
||||
list: "/member/tbMemberProjectSubitem/page",
|
||||
exportXlsUrl: "/member/tbMemberProjectSubitem/exportXls",
|
||||
list: '/member/tbMemberProjectSubitem/page',
|
||||
exportXlsUrl: '/member/tbMemberProjectSubitem/exportXls',
|
||||
},
|
||||
};
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.filters.projectId = this.$route.query.id;
|
||||
this.loadData(1);
|
||||
this.filters.projectId = this.$route.query.id
|
||||
this.loadData(1)
|
||||
},
|
||||
};
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user