|
|
@@ -203,10 +203,9 @@ export default {
|
|
|
let wheres1 = '' // 共用
|
|
|
let wheres2 = '' // 部门
|
|
|
let wheres3 = '' // 受限
|
|
|
- let wheres4 = '' // 试剂使用说明书条件
|
|
|
- let wheres5 = '' // 设备使用说明书条件
|
|
|
|
|
|
let start = ''
|
|
|
+ // console.log('this.$store.getters',this.$store.getters)
|
|
|
let positionsDatas = this.$store.getters.userInfo.positions
|
|
|
let needSelType = []
|
|
|
if (this.$store.getters.userInfo.positions == 0) {
|
|
|
@@ -224,16 +223,12 @@ export default {
|
|
|
wheres1 = wheres1 + ` and bian_zhi_shi_jian between '${start}' and '${this.searchWhere[i]}'`
|
|
|
wheres2 = wheres2 + ` and bian_zhi_shi_jian between '${start}' and '${this.searchWhere[i]}'`
|
|
|
wheres3 = wheres3 + ` and bian_zhi_shi_jian between '${start}' and '${this.searchWhere[i]}'`
|
|
|
- wheres4 = wheres4 + ` and bian_zhi_shi_jian between '${start}' and '${this.searchWhere[i]}'`
|
|
|
- wheres5 = wheres5 + ` and bian_zhi_shi_jian between '${start}' and '${this.searchWhere[i]}'`
|
|
|
|
|
|
}
|
|
|
if (i !== 'i' && i !== 'b') {
|
|
|
wheres1 = wheres1 + ` and wj.${i} like '%${this.searchWhere[i]}%'`
|
|
|
wheres2 = wheres2 + ` and wj.${i} like '%${this.searchWhere[i]}%'`
|
|
|
wheres3 = wheres3 + ` and wj.${i} like '%${this.searchWhere[i]}%'`
|
|
|
- wheres4 = wheres4 + ` and shuo_ming_shu_ like '%${this.searchWhere[i]}%'`
|
|
|
- wheres5 = wheres5 + ` and she_bei_ming_cheng_ like '%${this.searchWhere[i]}%'`
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@@ -264,8 +259,6 @@ export default {
|
|
|
if (JSON.stringify(sorts) !== "{}") {
|
|
|
wheres1 = wheres1 + ` order by ${sorts.sortBy} ${sorts.order == 'ascending' ? 'asc' : 'desc'}`
|
|
|
wheres2 = wheres2 + ` order by ${sorts.sortBy} ${sorts.order == 'ascending' ? 'asc' : 'desc'}`
|
|
|
- wheres4 = wheres4 + ` order by bian_zhi_shi_jian ${sorts.order == 'ascending' ? 'asc' : 'desc'}`
|
|
|
- wheres5 = wheres5 + ` order by bian_zhi_shi_jian ${sorts.order == 'ascending' ? 'asc' : 'desc'}`
|
|
|
}
|
|
|
}
|
|
|
// 重复发放的文件,在权限表会存在重复的文件信息
|
|
|
@@ -278,11 +271,7 @@ export default {
|
|
|
let buMenSql = `${selectSql} t_wjxxb wj where wj.shi_fou_guo_shen_ ='有效' ${wheres2}`
|
|
|
// 受限文件
|
|
|
let authoritySql = `${selectSql} t_wjxxb wj WHERE wj.shi_fou_guo_shen_ ='有效' and wj.quan_xian_xin_xi_ like '%${this.userId}%' ${wheres3} `
|
|
|
- // 设备使用说明书
|
|
|
- let selSb = `select '设备使用说明书' as wen_jian_xi_lei_,'' as wen_jian_bian_hao,concat(she_bei_ming_cheng_,'使用说明书') as wen_jian_ming_che,''as ban_ben_,fu_jian_shang AS fu_jian_,bian_zhi_shi_jian as fa_fang_shi_jian_ from t_sbdj where bian_zhi_bu_men_ LIKE '%${positionsDatas[i].id}%' and she_bei_zhuang_ta <> '停用' ${wheres5}`
|
|
|
- // 试剂使用说明书
|
|
|
- let selSj = `select '试剂使用说明书' as wen_jian_xi_lei_,'' as wen_jian_bian_hao,shuo_ming_shu_ as wen_jian_ming_che,''as ban_ben_,fu_jian_,bian_zhi_shi_jian as fa_fang_shi_jian_ from t_sjhcsysmsylbzb where bian_zhi_bu_men_ LIKE '%${positionsDatas[i].id}%' ${wheres4}`
|
|
|
- let sqlArr = [comSql, buMenSql, authoritySql, selSj, selSb]
|
|
|
+ let sqlArr = [comSql, buMenSql, authoritySql]
|
|
|
let oldRecordSql = `select * FROM t_ywyxjlb wj LEFT JOIN lh_bm_ry ry ON ry.ry_id = wj.bian_zhi_ren_ where wj.bian_zhi_ren_='${this.userId}' ${wheres1} order by bian_zhi_shi_jian desc`
|
|
|
for (var i in Object.keys(this.fileTypesDatas)) {
|
|
|
var key = Object.keys(this.fileTypesDatas)[i]; // key
|
|
|
@@ -357,15 +346,9 @@ export default {
|
|
|
if (authorityName.chaYue == '公用查阅') {
|
|
|
this.fileTypesDatas.comAuthority.push(nodeId)
|
|
|
}
|
|
|
- if (authorityName.chaYue == '部门查阅' && (nodeData.name !== '试剂使用说明书' || nodeData.name !== '设备使用说明书')) {
|
|
|
+ if (authorityName.chaYue == '部门查阅') {
|
|
|
this.fileTypesDatas.buMenAuthority.push(nodeId)
|
|
|
}
|
|
|
- if (authorityName.chaYue == '部门查阅' && nodeData.name == '试剂使用说明书') {
|
|
|
- this.fileTypesDatas.shiJiSql.push(nodeId)
|
|
|
- }
|
|
|
- if (authorityName.chaYue == '部门查阅' && nodeData.name == '设备使用说明书') {
|
|
|
- this.fileTypesDatas.sheBeiSql.push(nodeId)
|
|
|
- }
|
|
|
if (authorityName.chaYue == '受限查阅') {
|
|
|
this.fileTypesDatas.authority.push(nodeId)
|
|
|
}
|
|
|
@@ -378,15 +361,9 @@ export default {
|
|
|
if (authorityName.chaYue == '公用查阅') {
|
|
|
this.fileTypesDatas.comAuthority.push(i.id)
|
|
|
}
|
|
|
- if (authorityName.chaYue == '部门查阅' && (i.name !== '试剂使用说明书' || i.name !== '设备使用说明书')) {
|
|
|
+ if (authorityName.chaYue == '部门查阅' ) {
|
|
|
this.fileTypesDatas.buMenAuthority.push(i.id)
|
|
|
}
|
|
|
- if (authorityName.chaYue == '部门查阅' && i.name == '试剂使用说明书') {
|
|
|
- this.fileTypesDatas.shiJiSql.push(nodeId)
|
|
|
- }
|
|
|
- if (authorityName.chaYue == '部门查阅' && i.name == '设备使用说明书') {
|
|
|
- this.fileTypesDatas.sheBeiSql.push(nodeId)
|
|
|
- }
|
|
|
if (authorityName.chaYue == '受限查阅') {
|
|
|
this.fileTypesDatas.authority.push(i.id)
|
|
|
}
|