|
@@ -252,7 +252,7 @@ export default {
|
|
|
sorts: {},
|
|
sorts: {},
|
|
|
sqlWhere: {},
|
|
sqlWhere: {},
|
|
|
searchWhere: {},
|
|
searchWhere: {},
|
|
|
- pageKey: '',
|
|
|
|
|
|
|
+ pageKey: 'record', // file-受控文件查阅 recoed-纸质运行记录 recordUpload-纸质运行记录上传
|
|
|
dialogFormVisible: false,
|
|
dialogFormVisible: false,
|
|
|
defId: '',
|
|
defId: '',
|
|
|
addDataCont: {},
|
|
addDataCont: {},
|
|
@@ -293,18 +293,21 @@ export default {
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
created () {
|
|
created () {
|
|
|
- this.pageKey = this.$route.name
|
|
|
|
|
- this.categoryKey = this.pageKey === 'nbwj' ? 'FILE_TYPE' : 'FLOW_TYPE'
|
|
|
|
|
|
|
+ const { defaultUrl } = this.$route.meta || {}
|
|
|
|
|
+ const { pageKey } = this.parseUrl(defaultUrl) || {}
|
|
|
|
|
+ this.pageKey = pageKey
|
|
|
|
|
+ console.log(pageKey)
|
|
|
|
|
+ this.categoryKey = this.pageKey === 'file' ? 'FILE_TYPE' : 'FLOW_TYPE'
|
|
|
this.userId = this.$store.getters.userInfo.employee.id
|
|
this.userId = this.$store.getters.userInfo.employee.id
|
|
|
const roleList = this.$store.getters.userInfo.role
|
|
const roleList = this.$store.getters.userInfo.role
|
|
|
// 系统管理角色添加删除按钮
|
|
// 系统管理角色添加删除按钮
|
|
|
const hasRole = roleList.some((item) => item.name === '系统管理角色')
|
|
const hasRole = roleList.some((item) => item.name === '系统管理角色')
|
|
|
- if (this.pageKey === 'wjkzgl-ywyxjlsc' || this.pageKey === 'ywtxyxjl') {
|
|
|
|
|
|
|
+ if (this.pageKey === 'recordUpload' || this.pageKey === 'record') {
|
|
|
// 系统管理角色不做分类过滤
|
|
// 系统管理角色不做分类过滤
|
|
|
this.listConfig.toolbars.push({ key: 'remove' })
|
|
this.listConfig.toolbars.push({ key: 'remove' })
|
|
|
this.selection = true
|
|
this.selection = true
|
|
|
}
|
|
}
|
|
|
- if (this.pageKey === 'nbwj') {
|
|
|
|
|
|
|
+ if (this.pageKey === 'file') {
|
|
|
this.listConfig.searchForm.forms = [
|
|
this.listConfig.searchForm.forms = [
|
|
|
{ prop: 'wen_jian_bian_hao', label: '文件编号' },
|
|
{ prop: 'wen_jian_bian_hao', label: '文件编号' },
|
|
|
{ prop: 'wen_jian_ming_che', label: '文件名称' }
|
|
{ prop: 'wen_jian_ming_che', label: '文件名称' }
|
|
@@ -339,7 +342,7 @@ export default {
|
|
|
}
|
|
}
|
|
|
]
|
|
]
|
|
|
}
|
|
}
|
|
|
- if (this.pageKey === 'wjkzgl-ywyxjlsc' || this.pageKey === 'ywtxyxjl') {
|
|
|
|
|
|
|
+ if (this.pageKey === 'recordUpload' || this.pageKey === 'record') {
|
|
|
this.listConfig.searchForm.forms = [
|
|
this.listConfig.searchForm.forms = [
|
|
|
{
|
|
{
|
|
|
prop: 'nian_du_',
|
|
prop: 'nian_du_',
|
|
@@ -384,6 +387,16 @@ export default {
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
|
|
+ parseUrl (url) {
|
|
|
|
|
+ // 处理URL可能包含的前导/尾随斜杠和空格
|
|
|
|
|
+ url = (url || '').trim().replace(/^\/|\/$/g, '')
|
|
|
|
|
+ // 分割路径和查询部分
|
|
|
|
|
+ const [pathPart, queryPart] = url.split('?')
|
|
|
|
|
+
|
|
|
|
|
+ const queryParams = new URLSearchParams(queryPart || '')
|
|
|
|
|
+ const params = Object.fromEntries(queryParams)
|
|
|
|
|
+ return params
|
|
|
|
|
+ },
|
|
|
editClose (visible) {
|
|
editClose (visible) {
|
|
|
this.editDialogVisible = visible
|
|
this.editDialogVisible = visible
|
|
|
this.refreshData()
|
|
this.refreshData()
|
|
@@ -477,7 +490,7 @@ export default {
|
|
|
}
|
|
}
|
|
|
// fileType存放文件的id和有孩子的id
|
|
// fileType存放文件的id和有孩子的id
|
|
|
if (fileType) {
|
|
if (fileType) {
|
|
|
- if (this.pageKey === 'nbwj') {
|
|
|
|
|
|
|
+ if (this.pageKey === 'file') {
|
|
|
if (comAuthority.length !== 0) {
|
|
if (comAuthority.length !== 0) {
|
|
|
wheres1 =
|
|
wheres1 =
|
|
|
wheres1 +
|
|
wheres1 +
|
|
@@ -594,7 +607,7 @@ export default {
|
|
|
const sqlArr = [comSql, buMenSql, authoritySql]
|
|
const sqlArr = [comSql, buMenSql, authoritySql]
|
|
|
let oldRecordSql = ''
|
|
let oldRecordSql = ''
|
|
|
const buMenWhere = []
|
|
const buMenWhere = []
|
|
|
- if (this.pageKey !== 'nbwj') {
|
|
|
|
|
|
|
+ if (this.pageKey !== 'file') {
|
|
|
if (this.$store.getters.deptList.length !== 0) {
|
|
if (this.$store.getters.deptList.length !== 0) {
|
|
|
// eslint-disable-next-line no-redeclare
|
|
// eslint-disable-next-line no-redeclare
|
|
|
if (this.pos) {
|
|
if (this.pos) {
|
|
@@ -633,7 +646,7 @@ export default {
|
|
|
const fileSearchSql = needSelType.join('union all')
|
|
const fileSearchSql = needSelType.join('union all')
|
|
|
// ` order by ${sorts.sortBy} ${sorts.order === 'ascending' ? 'asc' : 'desc'}`
|
|
// ` order by ${sorts.sortBy} ${sorts.order === 'ascending' ? 'asc' : 'desc'}`
|
|
|
const sql =
|
|
const sql =
|
|
|
- this.pageKey === 'nbwj'
|
|
|
|
|
|
|
+ this.pageKey === 'file'
|
|
|
? `select sq.id,sq.cy_id_,sq.sc_id_,sq.shu_ju_lai_yuan_,sq.file_info_,sq.wen_jian_xi_lei_,sq.wen_jian_bian_hao,sq.wen_jian_ming_che,sq.ban_ben_,sq.ext_,sq.file_path_,COALESCE(wjxz.gai_zhang_fu_jian,sq.fu_jian_) AS fu_jian_,sq.fa_fang_shi_jian_,sq.cha_yue_jie_zhi_s from (${fileSearchSql}) sq LEFT JOIN t_wjxzxdjlb wjxz ON sq.shu_ju_lai_yuan_ = wjxz.id_ ORDER BY sq.wen_jian_bian_hao ${ascDesc},sq.wen_jian_ming_che DESC`
|
|
? `select sq.id,sq.cy_id_,sq.sc_id_,sq.shu_ju_lai_yuan_,sq.file_info_,sq.wen_jian_xi_lei_,sq.wen_jian_bian_hao,sq.wen_jian_ming_che,sq.ban_ben_,sq.ext_,sq.file_path_,COALESCE(wjxz.gai_zhang_fu_jian,sq.fu_jian_) AS fu_jian_,sq.fa_fang_shi_jian_,sq.cha_yue_jie_zhi_s from (${fileSearchSql}) sq LEFT JOIN t_wjxzxdjlb wjxz ON sq.shu_ju_lai_yuan_ = wjxz.id_ ORDER BY sq.wen_jian_bian_hao ${ascDesc},sq.wen_jian_ming_che DESC`
|
|
|
: oldRecordSql
|
|
: oldRecordSql
|
|
|
// console.log(sql, 'sssssssssssssssssss')
|
|
// console.log(sql, 'sssssssssssssssssss')
|
|
@@ -715,7 +728,7 @@ export default {
|
|
|
}
|
|
}
|
|
|
// 判断是否存在下级菜单
|
|
// 判断是否存在下级菜单
|
|
|
const noHadNext = !nodeData.children || !nodeData.children.length
|
|
const noHadNext = !nodeData.children || !nodeData.children.length
|
|
|
- if (noHadNext && this.pageKey === 'wjkzgl-ywyxjlsc') {
|
|
|
|
|
|
|
+ if (noHadNext && this.pageKey === 'recordUpload') {
|
|
|
const chongfu = this.listConfig.toolbars.filter((el) => {
|
|
const chongfu = this.listConfig.toolbars.filter((el) => {
|
|
|
return el.key === 'add'
|
|
return el.key === 'add'
|
|
|
})
|
|
})
|