|
|
@@ -104,343 +104,343 @@ import { Notify } from 'vant'
|
|
|
const _ = require('lodash')
|
|
|
|
|
|
export default {
|
|
|
- components: {
|
|
|
- IbpsMoreSearch,
|
|
|
- IbpsTypeTree,
|
|
|
- IbpsAvatar,
|
|
|
- IbpsToolbar,
|
|
|
- IbpsListResultPage,
|
|
|
- IbpsBpmnFormrenderDialog,
|
|
|
- LookDocument
|
|
|
- },
|
|
|
- mixins: [random, bpmnStatus],
|
|
|
- data() {
|
|
|
- const { userId, userList = [], deptList, menus, userInfo, role } = this.$store.getters
|
|
|
- const depArrs = []
|
|
|
- var fileDownloadAuthority = false
|
|
|
- for (var i of deptList) {
|
|
|
- depArrs.push(`wj.bian_zhi_bu_men_ like '${i.positionId}'`)
|
|
|
- }
|
|
|
- const roleKey = ['xtgljs', 'syszr', 'dagly', 'xxgljs']
|
|
|
- for (const i of roleKey) {
|
|
|
- if (role.some(so => { return so.alias === i })) {
|
|
|
- fileDownloadAuthority = true
|
|
|
- break
|
|
|
- }
|
|
|
- }
|
|
|
- return {
|
|
|
- categoryKey: '',
|
|
|
- documentsSon: false,
|
|
|
- sonData: '',
|
|
|
- userId: userId,
|
|
|
- footText: false,
|
|
|
- showPop: false,
|
|
|
- noData: false,
|
|
|
- showConfirmationBoxList: true,
|
|
|
- countTotal: {},
|
|
|
- examPopup: '',
|
|
|
- ReachBottomShow: false,
|
|
|
- moreSearchPopup: false,
|
|
|
- searchForms: {
|
|
|
- forms: [
|
|
|
- // { prop: 'Q^examName_^SL', label: '考试名称', fieldType: 'text' },
|
|
|
- // { prop: 'Q^bankName^SL', label: '题库名称', fieldType: 'text' },
|
|
|
- { prop: 'examName', label: '考试名称', fieldType: 'text' },
|
|
|
- { prop: 'bankName', label: '题库名称', fieldType: 'text' },
|
|
|
- {
|
|
|
- prop: 'examType', label: '考试类型', fieldType: 'checker', cols: 2, valueKey: 'value', options: [
|
|
|
- { value: 'trainingExam', label: '培训考试' },
|
|
|
- { value: 'POCTtraining', label: 'POCT培训' },
|
|
|
- { value: 'selfAssessment', label: '自主考核' },
|
|
|
- { value: 'routine', label: '常规' }
|
|
|
- ]
|
|
|
- },
|
|
|
- { prop: ['startDateDL', 'startDateDG'], label: '开始时间', fieldType: 'dateRange', options: { datefmt: 'yyyy-MM-dd' }},
|
|
|
- { prop: ['limitDateDL', 'limitDateDG'], label: '限考时间', fieldType: 'dateRange', options: { datefmt: 'yyyy-MM-dd' }}
|
|
|
- ]
|
|
|
- },
|
|
|
- // './views/platform/bpmn/communication/communicationList
|
|
|
- mainActions: [{
|
|
|
- 'name': this.$t('common.button.remove'),
|
|
|
- 'type': 'danger',
|
|
|
- 'callback': this.onRemove
|
|
|
- }],
|
|
|
- stateActive: false,
|
|
|
- subject: '',
|
|
|
- moreSubject: '',
|
|
|
- subjectTitle: '',
|
|
|
- typeId: '',
|
|
|
- moreParams: {},
|
|
|
- listData: [],
|
|
|
- listCopy: [],
|
|
|
- pagination: {},
|
|
|
- sorts: {},
|
|
|
+ components: {
|
|
|
+ IbpsMoreSearch,
|
|
|
+ IbpsTypeTree,
|
|
|
+ IbpsAvatar,
|
|
|
+ IbpsToolbar,
|
|
|
+ IbpsListResultPage,
|
|
|
+ IbpsBpmnFormrenderDialog,
|
|
|
+ LookDocument
|
|
|
+ },
|
|
|
+ mixins: [random, bpmnStatus],
|
|
|
+ data() {
|
|
|
+ const { userId, userList = [], deptList, menus, userInfo, role } = this.$store.getters
|
|
|
+ const depArrs = []
|
|
|
+ var fileDownloadAuthority = false
|
|
|
+ for (var i of deptList) {
|
|
|
+ depArrs.push(`wj.bian_zhi_bu_men_ like '${i.positionId}'`)
|
|
|
+ }
|
|
|
+ const roleKey = ['xtgljs', 'syszr', 'dagly', 'xxgljs']
|
|
|
+ for (const i of roleKey) {
|
|
|
+ if (role.some(so => { return so.alias === i })) {
|
|
|
+ fileDownloadAuthority = true
|
|
|
+ break
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return {
|
|
|
+ categoryKey: '',
|
|
|
+ documentsSon: false,
|
|
|
+ sonData: '',
|
|
|
+ userId: userId,
|
|
|
+ footText: false,
|
|
|
+ showPop: false,
|
|
|
+ noData: false,
|
|
|
+ showConfirmationBoxList: true,
|
|
|
+ countTotal: {},
|
|
|
+ examPopup: '',
|
|
|
+ ReachBottomShow: false,
|
|
|
+ moreSearchPopup: false,
|
|
|
+ searchForms: {
|
|
|
+ forms: [
|
|
|
+ // { prop: 'Q^examName_^SL', label: '考试名称', fieldType: 'text' },
|
|
|
+ // { prop: 'Q^bankName^SL', label: '题库名称', fieldType: 'text' },
|
|
|
+ { prop: 'examName', label: '考试名称', fieldType: 'text' },
|
|
|
+ { prop: 'bankName', label: '题库名称', fieldType: 'text' },
|
|
|
+ {
|
|
|
+ prop: 'examType', label: '考试类型', fieldType: 'checker', cols: 2, valueKey: 'value', options: [
|
|
|
+ { value: 'trainingExam', label: '培训考试' },
|
|
|
+ { value: 'POCTtraining', label: 'POCT培训' },
|
|
|
+ { value: 'selfAssessment', label: '自主考核' },
|
|
|
+ { value: 'routine', label: '常规' }
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ { prop: ['startDateDL', 'startDateDG'], label: '开始时间', fieldType: 'dateRange', options: { datefmt: 'yyyy-MM-dd' }},
|
|
|
+ { prop: ['limitDateDL', 'limitDateDG'], label: '限考时间', fieldType: 'dateRange', options: { datefmt: 'yyyy-MM-dd' }}
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ // './views/platform/bpmn/communication/communicationList
|
|
|
+ mainActions: [{
|
|
|
+ 'name': this.$t('common.button.remove'),
|
|
|
+ 'type': 'danger',
|
|
|
+ 'callback': this.onRemove
|
|
|
+ }],
|
|
|
+ stateActive: false,
|
|
|
+ subject: '',
|
|
|
+ moreSubject: '',
|
|
|
+ subjectTitle: '',
|
|
|
+ typeId: '',
|
|
|
+ moreParams: {},
|
|
|
+ listData: [],
|
|
|
+ listCopy: [],
|
|
|
+ pagination: {},
|
|
|
+ sorts: {},
|
|
|
|
|
|
- loading: false,
|
|
|
- finished: false,
|
|
|
- refreshing: false,
|
|
|
- resultType: 'init',
|
|
|
- errorType: null,
|
|
|
- resultMessage: null,
|
|
|
+ loading: false,
|
|
|
+ finished: false,
|
|
|
+ refreshing: false,
|
|
|
+ resultType: 'init',
|
|
|
+ errorType: null,
|
|
|
+ resultMessage: null,
|
|
|
|
|
|
- checkMode: false,
|
|
|
- checkedIds: [],
|
|
|
- proInstId: '',
|
|
|
- defId: '',
|
|
|
- formrenderVisible: false,
|
|
|
- formrenderTitle: '',
|
|
|
- typeTreePopup: false,
|
|
|
- keyword: '',
|
|
|
- name: '全部',
|
|
|
- current: 0,
|
|
|
- startTime: [],
|
|
|
- endTime: [],
|
|
|
- fileTypesDatas: {
|
|
|
- comAuthority: [],
|
|
|
- buMenAuthority: [],
|
|
|
- authority: []
|
|
|
- }, // 存放所点击列表的分类信息
|
|
|
- searchWhere: {},
|
|
|
- sqlWhere: {},
|
|
|
- addDataCont: {},
|
|
|
- oldorgId: '',
|
|
|
- listConfig: {
|
|
|
- // 工具栏
|
|
|
- toolbars: [
|
|
|
- { key: 'search' },
|
|
|
- {
|
|
|
- key: 'colect',
|
|
|
- label: '收藏或取消收藏',
|
|
|
- type: 'success'
|
|
|
- }
|
|
|
- ],
|
|
|
- // 查询条件
|
|
|
- searchForm: {
|
|
|
- forms: []
|
|
|
- },
|
|
|
- // 表格字段配置
|
|
|
- columns: []
|
|
|
- },
|
|
|
- pageKey: '',
|
|
|
- depArrs,
|
|
|
- fileDownloadAuthority
|
|
|
- }
|
|
|
+ checkMode: false,
|
|
|
+ checkedIds: [],
|
|
|
+ proInstId: '',
|
|
|
+ defId: '',
|
|
|
+ formrenderVisible: false,
|
|
|
+ formrenderTitle: '',
|
|
|
+ typeTreePopup: false,
|
|
|
+ keyword: '',
|
|
|
+ name: '全部',
|
|
|
+ current: 0,
|
|
|
+ startTime: [],
|
|
|
+ endTime: [],
|
|
|
+ fileTypesDatas: {
|
|
|
+ comAuthority: [],
|
|
|
+ buMenAuthority: [],
|
|
|
+ authority: []
|
|
|
+ }, // 存放所点击列表的分类信息
|
|
|
+ searchWhere: {},
|
|
|
+ sqlWhere: {},
|
|
|
+ addDataCont: {},
|
|
|
+ oldorgId: '',
|
|
|
+ listConfig: {
|
|
|
+ // 工具栏
|
|
|
+ toolbars: [
|
|
|
+ { key: 'search' },
|
|
|
+ {
|
|
|
+ key: 'colect',
|
|
|
+ label: '收藏或取消收藏',
|
|
|
+ type: 'success'
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ // 查询条件
|
|
|
+ searchForm: {
|
|
|
+ forms: []
|
|
|
+ },
|
|
|
+ // 表格字段配置
|
|
|
+ columns: []
|
|
|
+ },
|
|
|
+ pageKey: '',
|
|
|
+ depArrs,
|
|
|
+ fileDownloadAuthority
|
|
|
+ }
|
|
|
+ },
|
|
|
+ computed: {
|
|
|
+ ...mapState('ibps/user', [
|
|
|
+ 'info'
|
|
|
+ ]),
|
|
|
+ rightText() {
|
|
|
+ return this.checkMode ? this.$t('common.button.cancel') : this.$t('common.button.manage')
|
|
|
+ }
|
|
|
+ // selectedIds() {
|
|
|
+ // console.log('this.checkedIds', this.checkedIds)
|
|
|
+ // console.log('this.checkedIds', this.checkedIds.join(','))
|
|
|
+ // return this.checkedIds.join(',')
|
|
|
+ // }
|
|
|
+ },
|
|
|
+
|
|
|
+ beforeRouteLeave(to, from, next) {
|
|
|
+ if (this.showPop === true) {
|
|
|
+ // this.showConfirmationBoxList = true
|
|
|
+ this.$refs.childPop.parentSubmit()
|
|
|
+ this.showPop = false
|
|
|
+ next(false)
|
|
|
+ } else {
|
|
|
+ next()
|
|
|
+ }
|
|
|
+ },
|
|
|
+ mounted() {
|
|
|
+ this.$nextTick(() => {
|
|
|
+ setTimeout(() => {
|
|
|
+ this.clickTypeNode(this.$refs.typeTree.treeData[0])
|
|
|
+ setTimeout(() => {
|
|
|
+ this.onRefresh()
|
|
|
+ }, 500)
|
|
|
+ }, 200)
|
|
|
+ })
|
|
|
+ },
|
|
|
+ created() {
|
|
|
+ this.pageKey = this.$route.name
|
|
|
+ this.categoryKey = this.$route.name === 'documents' ? 'FLOW_TYPE' : 'FILE_TYPE'
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ onClick(item, index) {
|
|
|
+ this.documentsSon = true
|
|
|
+ this.sonData = item
|
|
|
},
|
|
|
- computed: {
|
|
|
- ...mapState('ibps/user', [
|
|
|
- 'info'
|
|
|
- ]),
|
|
|
- rightText() {
|
|
|
- return this.checkMode ? this.$t('common.button.cancel') : this.$t('common.button.manage')
|
|
|
- }
|
|
|
- // selectedIds() {
|
|
|
- // console.log('this.checkedIds', this.checkedIds)
|
|
|
- // console.log('this.checkedIds', this.checkedIds.join(','))
|
|
|
- // return this.checkedIds.join(',')
|
|
|
- // }
|
|
|
+ son() {
|
|
|
+ this.documentsSon = false
|
|
|
+ },
|
|
|
+ onClose() {
|
|
|
+ this.ReachBottomShow = false
|
|
|
},
|
|
|
|
|
|
- beforeRouteLeave(to, from, next) {
|
|
|
- if (this.showPop === true) {
|
|
|
- // this.showConfirmationBoxList = true
|
|
|
- this.$refs.childPop.parentSubmit()
|
|
|
- this.showPop = false
|
|
|
- next(false)
|
|
|
- } else {
|
|
|
- next()
|
|
|
- }
|
|
|
+ updataSet(v) {
|
|
|
+ this.showPop = v
|
|
|
},
|
|
|
- mounted() {
|
|
|
- this.$nextTick(() => {
|
|
|
- setTimeout(() => {
|
|
|
- this.clickTypeNode(this.$refs.typeTree.treeData[0])
|
|
|
- setTimeout(() => {
|
|
|
- this.onRefresh()
|
|
|
- }, 500)
|
|
|
- }, 200)
|
|
|
- })
|
|
|
+ generateTitle(name, title) { // generateTitle by vue-i18n
|
|
|
+ return i18n.generateTitle(name, title)
|
|
|
},
|
|
|
- created() {
|
|
|
- this.pageKey = this.$route.name
|
|
|
- this.categoryKey = this.$route.name === 'documents' ? 'FLOW_TYPE' : 'FILE_TYPE'
|
|
|
+ toCheckMode() {
|
|
|
+ if (this.$utils.isEmpty(this.listData)) {
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (this.checkMode) {
|
|
|
+ // this.show = true
|
|
|
+ this.checkedIds = []
|
|
|
+ }
|
|
|
+ this.checkMode = !this.checkMode
|
|
|
+ },
|
|
|
+ clickType() {
|
|
|
+ this.typeTreePopup = true
|
|
|
+ },
|
|
|
+ onSearch() {
|
|
|
+ this.stateActive = false
|
|
|
+ ActionUtils.initListData(this)
|
|
|
+ this.current = 0
|
|
|
+ // this.listData = []
|
|
|
+ this.loadData()
|
|
|
+ },
|
|
|
+ clickMoreSearch() {
|
|
|
+ this.moreSearchPopup = true
|
|
|
+ this.stateActive = false
|
|
|
},
|
|
|
- methods: {
|
|
|
- onClick(item, index) {
|
|
|
- this.documentsSon = true
|
|
|
- this.sonData = item
|
|
|
- },
|
|
|
- son() {
|
|
|
- this.documentsSon = false
|
|
|
- },
|
|
|
- onClose() {
|
|
|
- this.ReachBottomShow = false
|
|
|
- },
|
|
|
-
|
|
|
- updataSet(v) {
|
|
|
- this.showPop = v
|
|
|
- },
|
|
|
- generateTitle(name, title) { // generateTitle by vue-i18n
|
|
|
- return i18n.generateTitle(name, title)
|
|
|
- },
|
|
|
- toCheckMode() {
|
|
|
- if (this.$utils.isEmpty(this.listData)) {
|
|
|
- return
|
|
|
- }
|
|
|
- if (this.checkMode) {
|
|
|
- // this.show = true
|
|
|
- this.checkedIds = []
|
|
|
- }
|
|
|
- this.checkMode = !this.checkMode
|
|
|
- },
|
|
|
- clickType() {
|
|
|
- this.typeTreePopup = true
|
|
|
- },
|
|
|
- onSearch() {
|
|
|
- this.stateActive = false
|
|
|
- ActionUtils.initListData(this)
|
|
|
- this.current = 0
|
|
|
- // this.listData = []
|
|
|
- this.loadData()
|
|
|
- },
|
|
|
- clickMoreSearch() {
|
|
|
- this.moreSearchPopup = true
|
|
|
- this.stateActive = false
|
|
|
- },
|
|
|
|
|
|
- clickTypeNode(nodeData) {
|
|
|
- var nodeId = nodeData.id
|
|
|
- // console.log('nodeData', nodeData)
|
|
|
- this.typeId = nodeData.id
|
|
|
- this.onMoreSearch({})
|
|
|
- this.addDataCont = { fenLei: nodeData.name, fenLeiId: nodeId }
|
|
|
- const fileTypes = []
|
|
|
- if (this.oldorgId === nodeId && (nodeData.name !== '文件分类')) {
|
|
|
- return
|
|
|
- }
|
|
|
- // 判断是否存在下级菜单
|
|
|
- const noHadNext = nodeData.children === undefined
|
|
|
- if (noHadNext && this.pageKey === 'wjkzgl-ywyxjlsc') {
|
|
|
- const chongfu = this.listConfig.toolbars.filter(el => {
|
|
|
- return el.key === 'add'
|
|
|
- })
|
|
|
- if (chongfu.length === 0 && this.depth !== 0) {
|
|
|
- this.listConfig.toolbars.splice(1, 0, { key: 'add' })
|
|
|
- }
|
|
|
- } else {
|
|
|
- this.listConfig.toolbars = this.listConfig.toolbars.filter(el => {
|
|
|
- return el.key !== 'add'
|
|
|
- })
|
|
|
- }
|
|
|
- this.fileTypesDatas = {
|
|
|
- comAuthority: [],
|
|
|
- buMenAuthority: [],
|
|
|
- authority: [],
|
|
|
- shiJiSql: [],
|
|
|
- sheBeiSql: []
|
|
|
- }
|
|
|
- if (nodeData.children === undefined) {
|
|
|
- const authorityName = JSON.parse(nodeData.authorityName)
|
|
|
- fileTypes.push(nodeId)
|
|
|
- if (authorityName.chaYue === '公用查阅') {
|
|
|
- this.fileTypesDatas.comAuthority.push(nodeId)
|
|
|
- }
|
|
|
- if (authorityName.chaYue === '部门查阅') {
|
|
|
- this.fileTypesDatas.buMenAuthority.push(nodeId)
|
|
|
- }
|
|
|
- if (authorityName.chaYue === '受限查阅') {
|
|
|
- this.fileTypesDatas.authority.push(nodeId)
|
|
|
- }
|
|
|
- } else {
|
|
|
- const getTail = item => item.children && item.children.length > 0 ? item.children.map(m => getTail(m)) : [item]
|
|
|
- const result = _.flattenDeep(nodeData.children.map(m => getTail(m)))
|
|
|
- for (var i of result) {
|
|
|
- fileTypes.push(i.id)
|
|
|
- const authorityName = JSON.parse(i.authorityName)
|
|
|
- if (authorityName.chaYue === '公用查阅') {
|
|
|
- this.fileTypesDatas.comAuthority.push(i.id)
|
|
|
- }
|
|
|
- if (authorityName.chaYue === '部门查阅') {
|
|
|
- this.fileTypesDatas.buMenAuthority.push(i.id)
|
|
|
- }
|
|
|
- if (authorityName.chaYue === '受限查阅') {
|
|
|
- this.fileTypesDatas.authority.push(i.id)
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- this.oldorgId = nodeId
|
|
|
- this.sqlWhere = {
|
|
|
- fileType: fileTypes.join(',')
|
|
|
- }
|
|
|
- this.getDatas()
|
|
|
- // const fileTypes = []
|
|
|
- },
|
|
|
- getDatas() {
|
|
|
- const { comAuthority, buMenAuthority, authority } = this.fileTypesDatas
|
|
|
- const { fileType, sorts } = this.sqlWhere
|
|
|
- this.listData = []
|
|
|
- let wheres1 = '' // 共用
|
|
|
- let wheres2 = '' // 部门
|
|
|
- let wheres3 = '' // 受限
|
|
|
- let start = ''
|
|
|
- const positionsDatas = this.$store.getters.userInfo.positions
|
|
|
- const needSelType = []
|
|
|
- if (this.$store.getters.userInfo.positions === 0) {
|
|
|
- this.$message({
|
|
|
- message: '该账户并没有所属部门,请先归属部门再来操作。',
|
|
|
- type: 'error'
|
|
|
- })
|
|
|
- return
|
|
|
- }
|
|
|
- for (var i in this.searchWhere) {
|
|
|
- // console.log('i', i)
|
|
|
- if (i === 'b') {
|
|
|
- start = this.searchWhere[i]
|
|
|
- }
|
|
|
- if (i === 'i') {
|
|
|
- wheres1 = wheres1 + ` and bian_zhi_shi_jian between '${start} 00:00:00' and '${this.searchWhere[i]} 23:59:59'`
|
|
|
- wheres2 = wheres2 + ` and bian_zhi_shi_jian between '${start} 00:00:00' and '${this.searchWhere[i]} 23:59:59'`
|
|
|
- wheres3 = wheres3 + ` and bian_zhi_shi_jian between '${start} 00:00:00' and '${this.searchWhere[i]} 23:59:59'`
|
|
|
- }
|
|
|
- if (i !== 'i' && i !== 'b') {
|
|
|
- const likeWhere = i === 'nian_du_' ? this.searchWhere[i].getFullYear() : this.searchWhere[i]
|
|
|
- wheres1 = wheres1 + ` and wj.${i} like '%${likeWhere}%'`
|
|
|
- wheres2 = wheres2 + ` and wj.${i} like '%${likeWhere}%'`
|
|
|
- wheres3 = wheres3 + ` and wj.${i} like '%${likeWhere}%'`
|
|
|
- }
|
|
|
- }
|
|
|
- // 一样
|
|
|
- if (fileType) {
|
|
|
- if (this.pageKey === 'documents') {
|
|
|
- if (comAuthority.length !== 0) {
|
|
|
- wheres1 = wheres1 + ` and FIND_IN_SET (wj.xi_lei_id_,'${comAuthority}')`
|
|
|
- }
|
|
|
- if (buMenAuthority.length !== 0) {
|
|
|
- let orSql = ''
|
|
|
- // eslint-disable-next-line no-redeclare
|
|
|
- for (const i in positionsDatas) {
|
|
|
- if (i === '0') {
|
|
|
- orSql = `wj.quan_xian_xin_xi_ LIKE '%${positionsDatas[i].id}%'`
|
|
|
- } else {
|
|
|
- orSql = orSql + `or wj.quan_xian_xin_xi_ LIKE '%${positionsDatas[i].id}%'`
|
|
|
- }
|
|
|
- }
|
|
|
- wheres2 = wheres2 + ` and (${orSql}) and FIND_IN_SET (wj.xi_lei_id_,'${buMenAuthority}')`
|
|
|
- }
|
|
|
- if (authority.length !== 0) {
|
|
|
- wheres3 = wheres3 + ` and FIND_IN_SET (wj.xi_lei_id_,'${authority}')`
|
|
|
- }
|
|
|
- } else {
|
|
|
- wheres1 = wheres1 + ` and FIND_IN_SET (wj.fen_lei_id_,'${fileType}')`
|
|
|
- }
|
|
|
- }
|
|
|
- // 没走
|
|
|
- if (sorts) {
|
|
|
- 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'}`
|
|
|
- }
|
|
|
+ clickTypeNode(nodeData) {
|
|
|
+ var nodeId = nodeData.id
|
|
|
+ // console.log('nodeData', nodeData)
|
|
|
+ this.typeId = nodeData.id
|
|
|
+ this.onMoreSearch({})
|
|
|
+ this.addDataCont = { fenLei: nodeData.name, fenLeiId: nodeId }
|
|
|
+ const fileTypes = []
|
|
|
+ if (this.oldorgId === nodeId && (nodeData.name !== '文件分类')) {
|
|
|
+ return
|
|
|
+ }
|
|
|
+ // 判断是否存在下级菜单
|
|
|
+ const noHadNext = nodeData.children === undefined
|
|
|
+ if (noHadNext && this.pageKey === 'wjkzgl-ywyxjlsc') {
|
|
|
+ const chongfu = this.listConfig.toolbars.filter(el => {
|
|
|
+ return el.key === 'add'
|
|
|
+ })
|
|
|
+ if (chongfu.length === 0 && this.depth !== 0) {
|
|
|
+ this.listConfig.toolbars.splice(1, 0, { key: 'add' })
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ this.listConfig.toolbars = this.listConfig.toolbars.filter(el => {
|
|
|
+ return el.key !== 'add'
|
|
|
+ })
|
|
|
+ }
|
|
|
+ this.fileTypesDatas = {
|
|
|
+ comAuthority: [],
|
|
|
+ buMenAuthority: [],
|
|
|
+ authority: [],
|
|
|
+ shiJiSql: [],
|
|
|
+ sheBeiSql: []
|
|
|
+ }
|
|
|
+ if (nodeData.children === undefined) {
|
|
|
+ const authorityName = JSON.parse(nodeData.authorityName)
|
|
|
+ fileTypes.push(nodeId)
|
|
|
+ if (authorityName.chaYue === '公用查阅') {
|
|
|
+ this.fileTypesDatas.comAuthority.push(nodeId)
|
|
|
+ }
|
|
|
+ if (authorityName.chaYue === '部门查阅') {
|
|
|
+ this.fileTypesDatas.buMenAuthority.push(nodeId)
|
|
|
+ }
|
|
|
+ if (authorityName.chaYue === '受限查阅') {
|
|
|
+ this.fileTypesDatas.authority.push(nodeId)
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ const getTail = item => item.children && item.children.length > 0 ? item.children.map(m => getTail(m)) : [item]
|
|
|
+ const result = _.flattenDeep(nodeData.children.map(m => getTail(m)))
|
|
|
+ for (var i of result) {
|
|
|
+ fileTypes.push(i.id)
|
|
|
+ const authorityName = JSON.parse(i.authorityName)
|
|
|
+ if (authorityName.chaYue === '公用查阅') {
|
|
|
+ this.fileTypesDatas.comAuthority.push(i.id)
|
|
|
+ }
|
|
|
+ if (authorityName.chaYue === '部门查阅') {
|
|
|
+ this.fileTypesDatas.buMenAuthority.push(i.id)
|
|
|
+ }
|
|
|
+ if (authorityName.chaYue === '受限查阅') {
|
|
|
+ this.fileTypesDatas.authority.push(i.id)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ this.oldorgId = nodeId
|
|
|
+ this.sqlWhere = {
|
|
|
+ fileType: fileTypes.join(',')
|
|
|
+ }
|
|
|
+ this.getDatas()
|
|
|
+ // const fileTypes = []
|
|
|
+ },
|
|
|
+ getDatas() {
|
|
|
+ const { comAuthority, buMenAuthority, authority } = this.fileTypesDatas
|
|
|
+ const { fileType, sorts } = this.sqlWhere
|
|
|
+ this.listData = []
|
|
|
+ let wheres1 = '' // 共用
|
|
|
+ let wheres2 = '' // 部门
|
|
|
+ let wheres3 = '' // 受限
|
|
|
+ let start = ''
|
|
|
+ const positionsDatas = this.$store.getters.userInfo.positions
|
|
|
+ const needSelType = []
|
|
|
+ if (this.$store.getters.userInfo.positions === 0) {
|
|
|
+ this.$message({
|
|
|
+ message: '该账户并没有所属部门,请先归属部门再来操作。',
|
|
|
+ type: 'error'
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ for (var i in this.searchWhere) {
|
|
|
+ // console.log('i', i)
|
|
|
+ if (i === 'b') {
|
|
|
+ start = this.searchWhere[i]
|
|
|
+ }
|
|
|
+ if (i === 'i') {
|
|
|
+ wheres1 = wheres1 + ` and bian_zhi_shi_jian between '${start} 00:00:00' and '${this.searchWhere[i]} 23:59:59'`
|
|
|
+ wheres2 = wheres2 + ` and bian_zhi_shi_jian between '${start} 00:00:00' and '${this.searchWhere[i]} 23:59:59'`
|
|
|
+ wheres3 = wheres3 + ` and bian_zhi_shi_jian between '${start} 00:00:00' and '${this.searchWhere[i]} 23:59:59'`
|
|
|
+ }
|
|
|
+ if (i !== 'i' && i !== 'b') {
|
|
|
+ const likeWhere = i === 'nian_du_' ? this.searchWhere[i].getFullYear() : this.searchWhere[i]
|
|
|
+ wheres1 = wheres1 + ` and wj.${i} like '%${likeWhere}%'`
|
|
|
+ wheres2 = wheres2 + ` and wj.${i} like '%${likeWhere}%'`
|
|
|
+ wheres3 = wheres3 + ` and wj.${i} like '%${likeWhere}%'`
|
|
|
+ }
|
|
|
+ }
|
|
|
+ // 一样
|
|
|
+ if (fileType) {
|
|
|
+ if (this.pageKey === 'documents') {
|
|
|
+ if (comAuthority.length !== 0) {
|
|
|
+ wheres1 = wheres1 + ` and FIND_IN_SET (wj.xi_lei_id_,'${comAuthority}')`
|
|
|
+ }
|
|
|
+ if (buMenAuthority.length !== 0) {
|
|
|
+ let orSql = ''
|
|
|
+ // eslint-disable-next-line no-redeclare
|
|
|
+ for (const i in positionsDatas) {
|
|
|
+ if (i === '0') {
|
|
|
+ orSql = `wj.quan_xian_xin_xi_ LIKE '%${positionsDatas[i].id}%'`
|
|
|
+ } else {
|
|
|
+ orSql = orSql + `or wj.quan_xian_xin_xi_ LIKE '%${positionsDatas[i].id}%'`
|
|
|
+ }
|
|
|
}
|
|
|
- const selectSql = `select wj.id_ as id,cy.id_ as cy_id_,sc.id_ as sc_id_,concat(file.file_name_,'.',file.ext_,'(大小:',file.total_bytes_,')') as file_info_,
|
|
|
+ wheres2 = wheres2 + ` and (${orSql}) and FIND_IN_SET (wj.xi_lei_id_,'${buMenAuthority}')`
|
|
|
+ }
|
|
|
+ if (authority.length !== 0) {
|
|
|
+ wheres3 = wheres3 + ` and FIND_IN_SET (wj.xi_lei_id_,'${authority}')`
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ wheres1 = wheres1 + ` and FIND_IN_SET (wj.fen_lei_id_,'${fileType}')`
|
|
|
+ }
|
|
|
+ }
|
|
|
+ // 没走
|
|
|
+ if (sorts) {
|
|
|
+ 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'}`
|
|
|
+ }
|
|
|
+ }
|
|
|
+ const selectSql = `select wj.id_ as id,cy.id_ as cy_id_,sc.id_ as sc_id_,concat(file.file_name_,'.',file.ext_,'(大小:',file.total_bytes_,')') as file_info_,
|
|
|
wj.wen_jian_xi_lei_,wj.wen_jian_bian_hao,wj.wen_jian_ming_che,wj.ban_ben_,wj.wen_jian_fu_jian_ AS fu_jian_,wj.fa_bu_shi_jian_ as fa_fang_shi_jian_,wj.shi_fou_guo_shen_ AS shi_fou_guo_shen_, wj.bian_zhi_bu_men_ AS bian_zhi_bu_men_,
|
|
|
wj.bian_zhi_ren_ AS bian_zhi_ren_,
|
|
|
wj.bian_zhi_shi_jian AS bian_zhi_shi_jian,
|
|
|
@@ -449,18 +449,18 @@ export default {
|
|
|
wj.fa_bu_shi_jian_ AS fa_bu_shi_jian_,
|
|
|
wj.poct_shi_yong_ AS shi_yong_bu_men_,
|
|
|
"" AS cha_yue_jie_zhi_s from`
|
|
|
- const leftSql = `left join (select id_,parent_id_ from t_wjcyjl group by parent_id_) cy on cy.parent_id_ = wj.id_
|
|
|
+ const leftSql = `left join (select id_,parent_id_ from t_wjcyjl group by parent_id_) cy on cy.parent_id_ = wj.id_
|
|
|
left join (select id_,parent_id_ from t_wjscjl group by parent_id_) sc on sc.parent_id_ = wj.id_
|
|
|
left join ibps_file_attachment file on file.id_ = wj.wen_jian_fu_jian_`
|
|
|
- // 内外部文件查阅时候查所有文件
|
|
|
- const allSql = ``
|
|
|
- // 共用文件
|
|
|
- const comSql = `${selectSql} t_wjxxb wj ${leftSql} where wj.shi_fou_guo_shen_ ='有效' and (${this.depArrs.join(' or ')}) ${wheres1} `
|
|
|
- // 部门权限文件
|
|
|
- const buMenSql = `${selectSql} t_wjxxb wj ${leftSql}
|
|
|
+ // 内外部文件查阅时候查所有文件
|
|
|
+ const allSql = ``
|
|
|
+ // 共用文件
|
|
|
+ const comSql = `${selectSql} t_wjxxb wj ${leftSql} where wj.shi_fou_guo_shen_ ='有效' and (${this.depArrs.join(' or ')}) ${wheres1} `
|
|
|
+ // 部门权限文件
|
|
|
+ const buMenSql = `${selectSql} t_wjxxb wj ${leftSql}
|
|
|
where wj.shi_fou_guo_shen_ in ('有效','使用') ${wheres2} `
|
|
|
- // 受限文件:结合查阅授权模块的截止时间
|
|
|
- const authoritySql = `select wj.id_ as id,cy.id_ as cy_id_,sc.id_ as sc_id_,concat(file.file_name_,'.',file.ext_,'(',file.total_bytes_,')') as file_info_,
|
|
|
+ // 受限文件:结合查阅授权模块的截止时间
|
|
|
+ const authoritySql = `select wj.id_ as id,cy.id_ as cy_id_,sc.id_ as sc_id_,concat(file.file_name_,'.',file.ext_,'(',file.total_bytes_,')') as file_info_,
|
|
|
wj.wen_jian_xi_lei_,wj.wen_jian_bian_hao,wj.wen_jian_ming_che,wj.ban_ben_,wj.wen_jian_fu_jian_ AS fu_jian_,wj.fa_bu_shi_jian_ as fa_fang_shi_jian_,wj.shi_fou_guo_shen_ AS shi_fou_guo_shen_, wj.bian_zhi_bu_men_ AS bian_zhi_bu_men_,
|
|
|
wj.bian_zhi_ren_ AS bian_zhi_ren_,
|
|
|
wj.bian_zhi_shi_jian AS bian_zhi_shi_jian,
|
|
|
@@ -474,208 +474,208 @@ export default {
|
|
|
${leftSql}
|
|
|
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} `
|
|
|
- const sqlArr = [comSql, buMenSql, authoritySql]
|
|
|
- let oldRecordSql = ''
|
|
|
- const buMenWhere = []
|
|
|
- if (this.pageKey !== 'documents') {
|
|
|
- if (this.$store.getters.deptList.length !== 0) {
|
|
|
- // eslint-disable-next-line no-redeclare
|
|
|
- for (var i of this.$store.getters.deptList) {
|
|
|
- buMenWhere.push(`bian_zhi_bu_men_ like '%${i.positionId}%'`)
|
|
|
- }
|
|
|
- oldRecordSql = `select wj.*,en.name_ AS org_name,ee.name_ as ry_name FROM t_ywyxjlb wj
|
|
|
+ const sqlArr = [comSql, buMenSql, authoritySql]
|
|
|
+ let oldRecordSql = ''
|
|
|
+ const buMenWhere = []
|
|
|
+ if (this.pageKey !== 'documents') {
|
|
|
+ if (this.$store.getters.deptList.length !== 0) {
|
|
|
+ // eslint-disable-next-line no-redeclare
|
|
|
+ for (var i of this.$store.getters.deptList) {
|
|
|
+ buMenWhere.push(`bian_zhi_bu_men_ like '%${i.positionId}%'`)
|
|
|
+ }
|
|
|
+ oldRecordSql = `select wj.*,en.name_ AS org_name,ee.name_ as ry_name FROM t_ywyxjlb wj
|
|
|
left join ibps_party_employee ee on wj.bian_zhi_ren_ = ee.id_
|
|
|
LEFT JOIN ibps_party_entity en ON en.id_= bian_zhi_bu_men_
|
|
|
where (${buMenWhere.join(' or ')}) ${wheres1} order by bian_zhi_shi_jian desc`
|
|
|
- } else {
|
|
|
- console.log('没有部门组织')
|
|
|
- return
|
|
|
- }
|
|
|
- }
|
|
|
- // eslint-disable-next-line no-redeclare
|
|
|
- for (var i in Object.keys(this.fileTypesDatas)) {
|
|
|
- var key = Object.keys(this.fileTypesDatas)[i] // key
|
|
|
- var value = this.fileTypesDatas[key] // value
|
|
|
- if (value.length !== 0) {
|
|
|
- needSelType.push(`(${sqlArr[i]})`)
|
|
|
- }
|
|
|
- }
|
|
|
- const fileSearchSql = needSelType.join('union all')
|
|
|
- const sql = this.pageKey === 'documents' ? `select sq.* from (${fileSearchSql}) sq ORDER BY sq.wen_jian_bian_hao DESC,sq.wen_jian_ming_che DESC ` : oldRecordSql
|
|
|
- curdPost('sql', sql).then(res => {
|
|
|
- this.listCopy = []
|
|
|
- this.current = 0
|
|
|
- this.listCopy = res.variables.data
|
|
|
- this.onRefresh()
|
|
|
- this.loadData()
|
|
|
- // const tableDatas = res.variables.data
|
|
|
- // this.selectListData = JSON.parse(JSON.stringify(tableDatas))
|
|
|
- // let filterDatas = []
|
|
|
- // this.bianlistData.pageResult.totalCount = tableDatas.length
|
|
|
- // this.bianlistData.pageResult.totalPages = Math.ceil(tableDatas.length / this.pagination.limit)
|
|
|
- // this.bianlistData.pageResult.limit = this.pagination.limit
|
|
|
- // this.bianlistData.pageResult.page = this.pagination.page
|
|
|
- // if (this.pagination.limit > tableDatas.length) {
|
|
|
- // filterDatas = JSON.parse(JSON.stringify(tableDatas))
|
|
|
- // } else {
|
|
|
- // for (let index = 0; index < 20; index++) {
|
|
|
- // filterDatas.push(tableDatas[index])
|
|
|
- // }
|
|
|
- // }
|
|
|
- // this.bianlistData.dataResult = filterDatas
|
|
|
- // ActionUtils.handleListData(this, this.bianlistData)
|
|
|
- }).catch(res => {
|
|
|
- this.loading = false
|
|
|
- this.listData = []
|
|
|
- })
|
|
|
- },
|
|
|
- // 高级查询
|
|
|
- onMoreSearch(params) {
|
|
|
- if (this.$utils.isNotEmpty(this.typeId)) {
|
|
|
- params['Q^type_id_^SL'] = this.typeId
|
|
|
- }
|
|
|
- this.moreParams = params
|
|
|
- this.onSearch()
|
|
|
- if (this.$utils.isNotEmpty(params)) {
|
|
|
- this.stateActive = true
|
|
|
- }
|
|
|
- },
|
|
|
- resetForm() {
|
|
|
- this.typeId = ''
|
|
|
- },
|
|
|
- // 下拉刷新
|
|
|
- onRefresh() {
|
|
|
- this.footText = false
|
|
|
- this.noData = false
|
|
|
- this.refreshing = true
|
|
|
- this.finished = false
|
|
|
- this.loading = true
|
|
|
- this.onSearch()
|
|
|
- },
|
|
|
- onRefreshPage() {
|
|
|
- this.checkedIds = []
|
|
|
- this.checkMode = false
|
|
|
- this.onRefresh()
|
|
|
- },
|
|
|
- searchGao() {
|
|
|
+ } else {
|
|
|
+ console.log('没有部门组织')
|
|
|
+ return
|
|
|
+ }
|
|
|
+ }
|
|
|
+ // eslint-disable-next-line no-redeclare
|
|
|
+ for (var i in Object.keys(this.fileTypesDatas)) {
|
|
|
+ var key = Object.keys(this.fileTypesDatas)[i] // key
|
|
|
+ var value = this.fileTypesDatas[key] // value
|
|
|
+ if (value.length !== 0) {
|
|
|
+ needSelType.push(`(${sqlArr[i]})`)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ const fileSearchSql = needSelType.join('union all')
|
|
|
+ const sql = this.pageKey === 'documents' ? `select sq.* from (${fileSearchSql}) sq ORDER BY sq.wen_jian_bian_hao DESC,sq.wen_jian_ming_che DESC ` : oldRecordSql
|
|
|
+ // curdPost('sql', sql).then(res => {
|
|
|
+ // this.listCopy = []
|
|
|
+ // this.current = 0
|
|
|
+ // this.listCopy = res.variables.data
|
|
|
+ // this.onRefresh()
|
|
|
+ // this.loadData()
|
|
|
+ // const tableDatas = res.variables.data
|
|
|
+ // this.selectListData = JSON.parse(JSON.stringify(tableDatas))
|
|
|
+ // let filterDatas = []
|
|
|
+ // this.bianlistData.pageResult.totalCount = tableDatas.length
|
|
|
+ // this.bianlistData.pageResult.totalPages = Math.ceil(tableDatas.length / this.pagination.limit)
|
|
|
+ // this.bianlistData.pageResult.limit = this.pagination.limit
|
|
|
+ // this.bianlistData.pageResult.page = this.pagination.page
|
|
|
+ // if (this.pagination.limit > tableDatas.length) {
|
|
|
+ // filterDatas = JSON.parse(JSON.stringify(tableDatas))
|
|
|
+ // } else {
|
|
|
+ // for (let index = 0; index < 20; index++) {
|
|
|
+ // filterDatas.push(tableDatas[index])
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // this.bianlistData.dataResult = filterDatas
|
|
|
+ // ActionUtils.handleListData(this, this.bianlistData)
|
|
|
+ // }).catch(res => {
|
|
|
+ // this.loading = false
|
|
|
+ // this.listData = []
|
|
|
+ // })
|
|
|
+ },
|
|
|
+ // 高级查询
|
|
|
+ onMoreSearch(params) {
|
|
|
+ if (this.$utils.isNotEmpty(this.typeId)) {
|
|
|
+ params['Q^type_id_^SL'] = this.typeId
|
|
|
+ }
|
|
|
+ this.moreParams = params
|
|
|
+ this.onSearch()
|
|
|
+ if (this.$utils.isNotEmpty(params)) {
|
|
|
+ this.stateActive = true
|
|
|
+ }
|
|
|
+ },
|
|
|
+ resetForm() {
|
|
|
+ this.typeId = ''
|
|
|
+ },
|
|
|
+ // 下拉刷新
|
|
|
+ onRefresh() {
|
|
|
+ this.footText = false
|
|
|
+ this.noData = false
|
|
|
+ this.refreshing = true
|
|
|
+ this.finished = false
|
|
|
+ this.loading = true
|
|
|
+ this.onSearch()
|
|
|
+ },
|
|
|
+ onRefreshPage() {
|
|
|
+ this.checkedIds = []
|
|
|
+ this.checkMode = false
|
|
|
+ this.onRefresh()
|
|
|
+ },
|
|
|
+ searchGao() {
|
|
|
|
|
|
- },
|
|
|
- /**
|
|
|
+ },
|
|
|
+ /**
|
|
|
* 加载数据
|
|
|
*/
|
|
|
- loadData() {
|
|
|
- this.loading = true
|
|
|
- this.refreshing = false
|
|
|
- if (this.current >= this.listCopy.length) {
|
|
|
- this.listData = []
|
|
|
- this.finished = true
|
|
|
- this.noData = true
|
|
|
- this.footText = false
|
|
|
- return
|
|
|
- }
|
|
|
- // 查询搜索
|
|
|
- const subject = this.subject
|
|
|
- if (subject) {
|
|
|
- const filteredList = this.listCopy.filter(item => {
|
|
|
- return item.wen_jian_ming_che.includes(subject)
|
|
|
- })
|
|
|
- if (filteredList.length <= 0) {
|
|
|
- this.footText = false
|
|
|
- this.loading = false
|
|
|
- this.noData = true
|
|
|
- return
|
|
|
- }
|
|
|
- // 计算本次加载的数据量
|
|
|
- const endIndex = Math.min(this.current + 10, filteredList.length)
|
|
|
- // 加载数据
|
|
|
- const newData = filteredList.slice(this.current, endIndex)
|
|
|
- this.listData.push(...newData)
|
|
|
- this.current = endIndex
|
|
|
- if (endIndex >= filteredList.length) {
|
|
|
- this.finished = true
|
|
|
- this.footText = true
|
|
|
- this.noData = false
|
|
|
- }
|
|
|
- this.loading = false
|
|
|
- return
|
|
|
- }
|
|
|
- // 计算本次加载的数据量
|
|
|
- const endIndex = Math.min(this.current + 10, this.listCopy.length)
|
|
|
- // 加载数据
|
|
|
- const newData = this.listCopy.slice(this.current, endIndex)
|
|
|
- this.listData.push(...newData)
|
|
|
- // 更新状态
|
|
|
- this.current = endIndex
|
|
|
+ loadData() {
|
|
|
+ this.loading = true
|
|
|
+ this.refreshing = false
|
|
|
+ if (this.current >= this.listCopy.length) {
|
|
|
+ this.listData = []
|
|
|
+ this.finished = true
|
|
|
+ this.noData = true
|
|
|
+ this.footText = false
|
|
|
+ return
|
|
|
+ }
|
|
|
+ // 查询搜索
|
|
|
+ const subject = this.subject
|
|
|
+ if (subject) {
|
|
|
+ const filteredList = this.listCopy.filter(item => {
|
|
|
+ return item.wen_jian_ming_che.includes(subject)
|
|
|
+ })
|
|
|
+ if (filteredList.length <= 0) {
|
|
|
+ this.footText = false
|
|
|
+ this.loading = false
|
|
|
+ this.noData = true
|
|
|
+ return
|
|
|
+ }
|
|
|
+ // 计算本次加载的数据量
|
|
|
+ const endIndex = Math.min(this.current + 10, filteredList.length)
|
|
|
+ // 加载数据
|
|
|
+ const newData = filteredList.slice(this.current, endIndex)
|
|
|
+ this.listData.push(...newData)
|
|
|
+ this.current = endIndex
|
|
|
+ if (endIndex >= filteredList.length) {
|
|
|
+ this.finished = true
|
|
|
+ this.footText = true
|
|
|
+ this.noData = false
|
|
|
+ }
|
|
|
+ this.loading = false
|
|
|
+ return
|
|
|
+ }
|
|
|
+ // 计算本次加载的数据量
|
|
|
+ const endIndex = Math.min(this.current + 10, this.listCopy.length)
|
|
|
+ // 加载数据
|
|
|
+ const newData = this.listCopy.slice(this.current, endIndex)
|
|
|
+ this.listData.push(...newData)
|
|
|
+ // 更新状态
|
|
|
+ this.current = endIndex
|
|
|
|
|
|
- // 检查是否加载完毕
|
|
|
- if (endIndex >= this.listCopy.length) {
|
|
|
- this.finished = true
|
|
|
- this.footText = true
|
|
|
- this.noData = false
|
|
|
- }
|
|
|
+ // 检查是否加载完毕
|
|
|
+ if (endIndex >= this.listCopy.length) {
|
|
|
+ this.finished = true
|
|
|
+ this.footText = true
|
|
|
+ this.noData = false
|
|
|
+ }
|
|
|
|
|
|
- // 结束加载动画
|
|
|
- this.loading = false
|
|
|
+ // 结束加载动画
|
|
|
+ this.loading = false
|
|
|
|
|
|
- // this.listData = this.listCopy
|
|
|
- // this.loading = true
|
|
|
- // let page = 0
|
|
|
- // if (this.current === 0) {
|
|
|
- // page = 0
|
|
|
- // } else {
|
|
|
- // page = this.current * 10
|
|
|
- // }
|
|
|
- // if (this.listData || this.listData.length === 0) {
|
|
|
- // this.finished = true
|
|
|
- // this.noData = true
|
|
|
- // this.footText = false
|
|
|
- // }
|
|
|
+ // this.listData = this.listCopy
|
|
|
+ // this.loading = true
|
|
|
+ // let page = 0
|
|
|
+ // if (this.current === 0) {
|
|
|
+ // page = 0
|
|
|
+ // } else {
|
|
|
+ // page = this.current * 10
|
|
|
+ // }
|
|
|
+ // if (this.listData || this.listData.length === 0) {
|
|
|
+ // this.finished = true
|
|
|
+ // this.noData = true
|
|
|
+ // this.footText = false
|
|
|
+ // }
|
|
|
|
|
|
- // this.$common.request('sql', sql1).then(res => {
|
|
|
- // if (this.current === 0 && res.variables.data.length === 0) {
|
|
|
- // this.finished = true
|
|
|
- // this.noData = true
|
|
|
- // this.footText = false
|
|
|
- // }
|
|
|
+ // this.$common.request('sql', sql1).then(res => {
|
|
|
+ // if (this.current === 0 && res.variables.data.length === 0) {
|
|
|
+ // this.finished = true
|
|
|
+ // this.noData = true
|
|
|
+ // this.footText = false
|
|
|
+ // }
|
|
|
|
|
|
- // const data = res.variables.data
|
|
|
- // this.listData.push(...data)
|
|
|
- // this.refreshing = false
|
|
|
- // if (this.listData.length !== 0 && (this.listData.length) % 10 !== 0) {
|
|
|
- // this.footText = true
|
|
|
- // this.noData = false
|
|
|
- // this.finished = true
|
|
|
- // return
|
|
|
- // } else {
|
|
|
- // this.current++
|
|
|
- // }
|
|
|
- // this.loading = false
|
|
|
- // }).catch(err => {
|
|
|
- // console.log(err)
|
|
|
- // })
|
|
|
- },
|
|
|
+ // const data = res.variables.data
|
|
|
+ // this.listData.push(...data)
|
|
|
+ // this.refreshing = false
|
|
|
+ // if (this.listData.length !== 0 && (this.listData.length) % 10 !== 0) {
|
|
|
+ // this.footText = true
|
|
|
+ // this.noData = false
|
|
|
+ // this.finished = true
|
|
|
+ // return
|
|
|
+ // } else {
|
|
|
+ // this.current++
|
|
|
+ // }
|
|
|
+ // this.loading = false
|
|
|
+ // }).catch(err => {
|
|
|
+ // console.log(err)
|
|
|
+ // })
|
|
|
+ },
|
|
|
|
|
|
- // 获取格式化参数
|
|
|
- getSearcFormData() {
|
|
|
- let params = {}
|
|
|
- if (this.$utils.isNotEmpty(this.subject)) {
|
|
|
- params['Q^subject_^SL'] = this.subject
|
|
|
- }
|
|
|
- if (this.$utils.isNotEmpty(this.moreParams)) {
|
|
|
- params = Object.assign(params, this.moreParams)
|
|
|
- }
|
|
|
- return ActionUtils.formatParams(
|
|
|
- params,
|
|
|
- this.pagination,
|
|
|
- this.sorts)
|
|
|
- },
|
|
|
+ // 获取格式化参数
|
|
|
+ getSearcFormData() {
|
|
|
+ let params = {}
|
|
|
+ if (this.$utils.isNotEmpty(this.subject)) {
|
|
|
+ params['Q^subject_^SL'] = this.subject
|
|
|
+ }
|
|
|
+ if (this.$utils.isNotEmpty(this.moreParams)) {
|
|
|
+ params = Object.assign(params, this.moreParams)
|
|
|
+ }
|
|
|
+ return ActionUtils.formatParams(
|
|
|
+ params,
|
|
|
+ this.pagination,
|
|
|
+ this.sorts)
|
|
|
+ },
|
|
|
|
|
|
- transformTime(timeStamp) {
|
|
|
- const hours = Math.floor(parseInt(timeStamp) / 3600000)
|
|
|
- const minutes = Math.floor((parseInt(timeStamp) % 3600000) / 60000)
|
|
|
- return hours + '小时' + minutes + '分钟'
|
|
|
- }
|
|
|
+ transformTime(timeStamp) {
|
|
|
+ const hours = Math.floor(parseInt(timeStamp) / 3600000)
|
|
|
+ const minutes = Math.floor((parseInt(timeStamp) % 3600000) / 60000)
|
|
|
+ return hours + '小时' + minutes + '分钟'
|
|
|
}
|
|
|
+ }
|
|
|
}
|
|
|
</script>
|
|
|
<style scoped lang="scss">
|