|
@@ -117,7 +117,13 @@
|
|
|
:visible="dialogVisible"
|
|
:visible="dialogVisible"
|
|
|
:file-infos="fileInfos"
|
|
:file-infos="fileInfos"
|
|
|
/>
|
|
/>
|
|
|
|
|
+ <!-- 本人修改 -->
|
|
|
|
|
+ <!-- <file-lookup
|
|
|
|
|
+ :visible="dialogVisible"
|
|
|
|
|
+ :file-infos="fileArray"
|
|
|
|
|
+ /> -->
|
|
|
</div>
|
|
</div>
|
|
|
|
|
+ <!-- 文件更新的内容 -->
|
|
|
<el-dialog
|
|
<el-dialog
|
|
|
:visible.sync="dialogVisible1"
|
|
:visible.sync="dialogVisible1"
|
|
|
width="55%"
|
|
width="55%"
|
|
@@ -225,6 +231,8 @@ export default {
|
|
|
const depArrs = []
|
|
const depArrs = []
|
|
|
var fileDownloadAuthority = false
|
|
var fileDownloadAuthority = false
|
|
|
const { deptList, role } = this.$store.getters
|
|
const { deptList, role } = this.$store.getters
|
|
|
|
|
+ console.log('deptList', deptList)
|
|
|
|
|
+ console.log('role', role)
|
|
|
for (var i of deptList) {
|
|
for (var i of deptList) {
|
|
|
depArrs.push(`wj.bian_zhi_bu_men_ like '${i.positionId}'`)
|
|
depArrs.push(`wj.bian_zhi_bu_men_ like '${i.positionId}'`)
|
|
|
}
|
|
}
|
|
@@ -236,6 +244,7 @@ export default {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
return {
|
|
return {
|
|
|
|
|
+ fileLookShow: false,
|
|
|
rules: {
|
|
rules: {
|
|
|
fa_bu_shi_jian_: [{ required: true, message: this.$t('validate.required') }],
|
|
fa_bu_shi_jian_: [{ required: true, message: this.$t('validate.required') }],
|
|
|
sheng_xiao_shi_: [{ required: true, message: this.$t('validate.required') }],
|
|
sheng_xiao_shi_: [{ required: true, message: this.$t('validate.required') }],
|
|
@@ -330,7 +339,9 @@ export default {
|
|
|
openFilePng,
|
|
openFilePng,
|
|
|
wordPng,
|
|
wordPng,
|
|
|
dialogVisible: false,
|
|
dialogVisible: false,
|
|
|
- fileInfos: {}
|
|
|
|
|
|
|
+ fileInfos: {},
|
|
|
|
|
+ // 本人修改
|
|
|
|
|
+ fileArray: []
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
watch: {
|
|
watch: {
|
|
@@ -340,7 +351,6 @@ export default {
|
|
|
showCaoZuoColumn (val) {
|
|
showCaoZuoColumn (val) {
|
|
|
this.showCaoZuoColumn = val
|
|
this.showCaoZuoColumn = val
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
},
|
|
},
|
|
|
created () {
|
|
created () {
|
|
|
this.pageKey = this.$route.name
|
|
this.pageKey = this.$route.name
|
|
@@ -425,12 +435,14 @@ export default {
|
|
|
this.dialogForm.wen_jian_lei_xing = data.row.wen_jian_xi_lei_
|
|
this.dialogForm.wen_jian_lei_xing = data.row.wen_jian_xi_lei_
|
|
|
this.dialogForm.wen_jian_bian_hao = data.row.wen_jian_bian_hao
|
|
this.dialogForm.wen_jian_bian_hao = data.row.wen_jian_bian_hao
|
|
|
this.dialogForm.yuan_wen_jian_min = data.row.wen_jian_ming_che
|
|
this.dialogForm.yuan_wen_jian_min = data.row.wen_jian_ming_che
|
|
|
|
|
+ this.dialogForm.yuan_wen_jian_id_ = data.row.id
|
|
|
this.dialogForm.xin_wen_jian_ming = ''
|
|
this.dialogForm.xin_wen_jian_ming = ''
|
|
|
this.dialogForm.wen_jian_fu_jian_ = ''
|
|
this.dialogForm.wen_jian_fu_jian_ = ''
|
|
|
this.dialogForm.geng_xin_nei_rong = ''
|
|
this.dialogForm.geng_xin_nei_rong = ''
|
|
|
this.dialogForm.geng_xin_yuan_yin = ''
|
|
this.dialogForm.geng_xin_yuan_yin = ''
|
|
|
this.dialogForm.fa_bu_shi_jian_ = ''
|
|
this.dialogForm.fa_bu_shi_jian_ = ''
|
|
|
this.dialogForm.sheng_xiao_shi_ = ''
|
|
this.dialogForm.sheng_xiao_shi_ = ''
|
|
|
|
|
+ this.dialogForm.ji_lu_id_ = data.row.id
|
|
|
},
|
|
},
|
|
|
handleClose (done) {
|
|
handleClose (done) {
|
|
|
this.$confirm('确认关闭?')
|
|
this.$confirm('确认关闭?')
|
|
@@ -448,6 +460,7 @@ export default {
|
|
|
},
|
|
},
|
|
|
getDatas () {
|
|
getDatas () {
|
|
|
const { comAuthority, buMenAuthority, authority } = this.fileTypesDatas
|
|
const { comAuthority, buMenAuthority, authority } = this.fileTypesDatas
|
|
|
|
|
+ // fileType存放点击文件id,如有孩子,则还有孩子id
|
|
|
const { fileType, sorts } = this.sqlWhere
|
|
const { fileType, sorts } = this.sqlWhere
|
|
|
this.listData = []
|
|
this.listData = []
|
|
|
let wheres1 = '' // 共用
|
|
let wheres1 = '' // 共用
|
|
@@ -481,7 +494,7 @@ export default {
|
|
|
wheres3 = wheres3 + ` and wj.${i} like '%${likeWhere}%'`
|
|
wheres3 = wheres3 + ` and wj.${i} like '%${likeWhere}%'`
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
|
|
+ // fileType存放文件的id和有孩子的id
|
|
|
if (fileType) {
|
|
if (fileType) {
|
|
|
if (this.pageKey === 'nbwj') {
|
|
if (this.pageKey === 'nbwj') {
|
|
|
if (comAuthority.length !== 0) {
|
|
if (comAuthority.length !== 0) {
|
|
@@ -491,6 +504,8 @@ export default {
|
|
|
let orSql = ''
|
|
let orSql = ''
|
|
|
// eslint-disable-next-line no-redeclare
|
|
// eslint-disable-next-line no-redeclare
|
|
|
for (const i in positionsDatas) {
|
|
for (const i in positionsDatas) {
|
|
|
|
|
+ console.log('i', i)
|
|
|
|
|
+ console.log('i12121', positionsDatas[i])
|
|
|
if (i === '0') {
|
|
if (i === '0') {
|
|
|
orSql = `wj.quan_xian_xin_xi_ LIKE '%${positionsDatas[i].id}%'`
|
|
orSql = `wj.quan_xian_xin_xi_ LIKE '%${positionsDatas[i].id}%'`
|
|
|
} else {
|
|
} else {
|
|
@@ -506,6 +521,7 @@ export default {
|
|
|
wheres1 = wheres1 + ` and FIND_IN_SET (wj.fen_lei_id_,'${fileType}')`
|
|
wheres1 = wheres1 + ` and FIND_IN_SET (wj.fen_lei_id_,'${fileType}')`
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+ // 没走
|
|
|
if (sorts) {
|
|
if (sorts) {
|
|
|
if (JSON.stringify(sorts) !== '{}') {
|
|
if (JSON.stringify(sorts) !== '{}') {
|
|
|
wheres1 = wheres1 + ` order by ${sorts.sortBy} ${sorts.order === 'ascending' ? 'asc' : 'desc'}`
|
|
wheres1 = wheres1 + ` order by ${sorts.sortBy} ${sorts.order === 'ascending' ? 'asc' : 'desc'}`
|
|
@@ -538,6 +554,7 @@ export default {
|
|
|
WHERE wj.shi_fou_guo_shen_ ='有效' and ((sq.cha_yue_jie_zhi_s >DATE_FORMAT(NOW(), '%Y-%m-%d')) OR (sq.cha_yue_jie_zhi_s =DATE_FORMAT(NOW(), '%Y-%m-%d')))
|
|
WHERE wj.shi_fou_guo_shen_ ='有效' and ((sq.cha_yue_jie_zhi_s >DATE_FORMAT(NOW(), '%Y-%m-%d')) OR (sq.cha_yue_jie_zhi_s =DATE_FORMAT(NOW(), '%Y-%m-%d')))
|
|
|
and wj.quan_xian_xin_xi_ like '%${this.userId}%' ${wheres3} `
|
|
and wj.quan_xian_xin_xi_ like '%${this.userId}%' ${wheres3} `
|
|
|
const sqlArr = [comSql, buMenSql, authoritySql]
|
|
const sqlArr = [comSql, buMenSql, authoritySql]
|
|
|
|
|
+ // console.log('sqlArr', sqlArr)
|
|
|
let oldRecordSql = ''
|
|
let oldRecordSql = ''
|
|
|
const buMenWhere = []
|
|
const buMenWhere = []
|
|
|
if (this.pageKey !== 'nbwj') {
|
|
if (this.pageKey !== 'nbwj') {
|
|
@@ -563,10 +580,13 @@ export default {
|
|
|
needSelType.push(`(${sqlArr[i]})`)
|
|
needSelType.push(`(${sqlArr[i]})`)
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+ // console.log('this.fileTypesDatas', this.fileTypesDatas)
|
|
|
// console.log('needSelType',needSelType)
|
|
// console.log('needSelType',needSelType)
|
|
|
const fileSearchSql = needSelType.join('union all')
|
|
const fileSearchSql = needSelType.join('union all')
|
|
|
|
|
+ // console.log('fileSearchSql', fileSearchSql)
|
|
|
const sql = this.pageKey === 'nbwj' ? `select sq.* from (${fileSearchSql}) sq ORDER BY sq.wen_jian_bian_hao DESC,sq.wen_jian_ming_che DESC` : oldRecordSql
|
|
const sql = this.pageKey === 'nbwj' ? `select sq.* from (${fileSearchSql}) sq ORDER BY sq.wen_jian_bian_hao DESC,sq.wen_jian_ming_che DESC` : oldRecordSql
|
|
|
// console.log('sql------------:', sql)
|
|
// console.log('sql------------:', sql)
|
|
|
|
|
+ // console.log('sql121', sql)
|
|
|
curdPost('sql', sql).then(res => {
|
|
curdPost('sql', sql).then(res => {
|
|
|
const tableDatas = res.variables.data
|
|
const tableDatas = res.variables.data
|
|
|
this.selectListData = JSON.parse(JSON.stringify(tableDatas))
|
|
this.selectListData = JSON.parse(JSON.stringify(tableDatas))
|
|
@@ -610,10 +630,12 @@ export default {
|
|
|
this.showCaoZuoColumn = false
|
|
this.showCaoZuoColumn = false
|
|
|
this.listConfig.columns = this.removeColumnByProp(this.listConfig.columns, 'cao_zuo')
|
|
this.listConfig.columns = this.removeColumnByProp(this.listConfig.columns, 'cao_zuo')
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
this.show = 'detail'
|
|
this.show = 'detail'
|
|
|
|
|
+ console.log('nodeData', nodeData)
|
|
|
|
|
+ console.log('nodeId', nodeId)
|
|
|
this.addDataCont = { fenLei: nodeData.name, fenLeiId: nodeId }
|
|
this.addDataCont = { fenLei: nodeData.name, fenLeiId: nodeId }
|
|
|
const fileTypes = []
|
|
const fileTypes = []
|
|
|
|
|
+ console.log(this.oldorgId === nodeId)
|
|
|
if (this.oldorgId === nodeId && (nodeData.name !== '文件分类')) {
|
|
if (this.oldorgId === nodeId && (nodeData.name !== '文件分类')) {
|
|
|
return
|
|
return
|
|
|
}
|
|
}
|
|
@@ -621,6 +643,7 @@ export default {
|
|
|
const noHadNext = nodeData.children === undefined
|
|
const noHadNext = nodeData.children === undefined
|
|
|
if (noHadNext && this.pageKey === 'wjkzgl-ywyxjlsc') {
|
|
if (noHadNext && this.pageKey === 'wjkzgl-ywyxjlsc') {
|
|
|
const chongfu = this.listConfig.toolbars.filter(el => {
|
|
const chongfu = this.listConfig.toolbars.filter(el => {
|
|
|
|
|
+ console.log('this.listConfig', this.listConfig)
|
|
|
return el.key === 'add'
|
|
return el.key === 'add'
|
|
|
})
|
|
})
|
|
|
if (chongfu.length === 0 && this.depth !== 0) {
|
|
if (chongfu.length === 0 && this.depth !== 0) {
|
|
@@ -638,9 +661,11 @@ export default {
|
|
|
shiJiSql: [],
|
|
shiJiSql: [],
|
|
|
sheBeiSql: []
|
|
sheBeiSql: []
|
|
|
}
|
|
}
|
|
|
|
|
+ // 判断是否有下级菜单
|
|
|
if (nodeData.children === undefined) {
|
|
if (nodeData.children === undefined) {
|
|
|
const authorityName = JSON.parse(nodeData.authorityName)
|
|
const authorityName = JSON.parse(nodeData.authorityName)
|
|
|
fileTypes.push(nodeId)
|
|
fileTypes.push(nodeId)
|
|
|
|
|
+ // console.log('fileTypes', fileTypes)
|
|
|
if (authorityName.chaYue === '公用查阅') {
|
|
if (authorityName.chaYue === '公用查阅') {
|
|
|
this.fileTypesDatas.comAuthority.push(nodeId)
|
|
this.fileTypesDatas.comAuthority.push(nodeId)
|
|
|
}
|
|
}
|
|
@@ -672,6 +697,7 @@ export default {
|
|
|
this.sqlWhere = {
|
|
this.sqlWhere = {
|
|
|
fileType: fileTypes.join(',')
|
|
fileType: fileTypes.join(',')
|
|
|
}
|
|
}
|
|
|
|
|
+ console.log('this.sqlWhere', this.sqlWhere)
|
|
|
this.getDatas()
|
|
this.getDatas()
|
|
|
},
|
|
},
|
|
|
// 开启表单页面
|
|
// 开启表单页面
|
|
@@ -805,16 +831,49 @@ export default {
|
|
|
this.refreshData()
|
|
this.refreshData()
|
|
|
},
|
|
},
|
|
|
handleClickTag (val) {
|
|
handleClickTag (val) {
|
|
|
|
|
+ console.log('val', val)
|
|
|
const sql = `select * from ibps_file_attachment where id_= '${val.fu_jian_}'`
|
|
const sql = `select * from ibps_file_attachment where id_= '${val.fu_jian_}'`
|
|
|
this.$common.request('sql', sql).then(res => {
|
|
this.$common.request('sql', sql).then(res => {
|
|
|
|
|
+ console.log('res', res)
|
|
|
|
|
+ // this.fileInfos = {}// 本人添加
|
|
|
const { data = [] } = res.variables || {}
|
|
const { data = [] } = res.variables || {}
|
|
|
if (!data.length) {
|
|
if (!data.length) {
|
|
|
this.$message.warning('没有可查阅的文件,请查明原因!')
|
|
this.$message.warning('没有可查阅的文件,请查明原因!')
|
|
|
return
|
|
return
|
|
|
}
|
|
}
|
|
|
- this.fileInfos = { id: val.id, FILE_NAME_: val.wen_jian_ming_che, fileInfos: data[0], func: this.handleUpdate }
|
|
|
|
|
|
|
+ this.fileInfos = { id: val.id, FILE_NAME_: val.wen_jian_ming_che, fileInfos: data[0], func: this.handleUpdate, ban_ben_: val.ban_ben_ }
|
|
|
this.dialogVisible = true
|
|
this.dialogVisible = true
|
|
|
})
|
|
})
|
|
|
|
|
+ // 本人修改
|
|
|
|
|
+ // this.fileArray = []
|
|
|
|
|
+ // this.handleFileInfo(val)
|
|
|
|
|
+ // const sql1 = `select t_wjxxb.*, t_wjxzxdjlb.xiu_ding_ban_ben_, t_wjxzxdjlb.xiu_ding_nei_rong,t_wjxzxdjlb.yuan_yin_
|
|
|
|
|
+ // from t_wjxxb
|
|
|
|
|
+ // INNER JOIN t_wjxzxdjlb ON t_wjxxb.shu_ju_lai_yuan_ = t_wjxzxdjlb.id_ WHERE tou_ban_wen_jian_='${val.id}' `
|
|
|
|
|
+ // // const sql1 = `select * from t_wjxxb WHERE tou_ban_wen_jian_='${val.id}'`
|
|
|
|
|
+ // this.$common.request('sql', sql1).then(res => {
|
|
|
|
|
+ // console.log('res测试', res)
|
|
|
|
|
+ // const list = res.variables.data
|
|
|
|
|
+ // list.forEach(el => {
|
|
|
|
|
+ // const obj = { id: el.id_, wen_jian_ming_che: el.wen_jian_ming_che, fu_jian_: el.wen_jian_fu_jian_, xiu_ding_nei_rong: el.xiu_ding_nei_rong, yuan_yin_: el.yuan_yin_, xiu_ding_ban_ben_: el.xiu_ding_ban_ben_ }
|
|
|
|
|
+ // this.handleFileInfo(obj)
|
|
|
|
|
+ // })
|
|
|
|
|
+ // this.dialogVisible = true
|
|
|
|
|
+ // })
|
|
|
|
|
+ },
|
|
|
|
|
+ handleFileInfo (val) {
|
|
|
|
|
+ const sql = `select * from ibps_file_attachment where id_= '${val.fu_jian_}'`
|
|
|
|
|
+ this.$common.request('sql', sql).then(res => {
|
|
|
|
|
+ console.log('res', res)
|
|
|
|
|
+ // this.fileInfos = {}// 本人添加
|
|
|
|
|
+ const { data = [] } = res.variables || {}
|
|
|
|
|
+ if (!data.length) {
|
|
|
|
|
+ this.$message.warning('没有可查阅的文件,请查明原因!')
|
|
|
|
|
+ return
|
|
|
|
|
+ }
|
|
|
|
|
+ this.fileInfos = { id: val.id, FILE_NAME_: val.wen_jian_ming_che, fileInfos: data[0], func: this.handleUpdate, ban_ben_: val.ban_ben_ }
|
|
|
|
|
+ this.fileArray.push(this.fileInfos)
|
|
|
|
|
+ })
|
|
|
},
|
|
},
|
|
|
handleUpdate (fileId, time) {
|
|
handleUpdate (fileId, time) {
|
|
|
const addParams = {
|
|
const addParams = {
|