| | |
| | | <!-- <el-menu-item>--> |
| | | <!-- <local-ship-selector v-model="localShip" placeholder="舷号"/>--> |
| | | <!-- </el-menu-item>--> |
| | | <el-menu-item v-if="help_show" index="4"> |
| | | <el-badge :value="feedCount" class="item" :hidden="!isAdmin"> |
| | | <el-tooltip class="item" effect="dark" content="意见反馈" placement="bottom"> |
| | | <i @click="toFeedBack()" style="font-size: 24px;margin-top:22px" class="el-icon-edit-outline"></i> |
| | | </el-tooltip> |
| | | </el-badge> |
| | | </el-menu-item> |
| | | <!-- <el-menu-item>--> |
| | | <!-- <el-badge :value="feedCount" class="item" :hidden="!isAdmin">--> |
| | | <!-- <el-button @click="toFeedBack()" type="text">意见反馈</el-button>--> |
| | |
| | | <!-- </el-tab-pane>--> |
| | | <!-- </el-tabs>--> |
| | | <!-- </el-dialog>--> |
| | | <sysFeedBack ref="sysFeedBack" @refreshDataList="getFeedCount"></sysFeedBack> |
| | | </div> |
| | | |
| | | </template> |
| | |
| | | isAdmin:false |
| | | } |
| | | }, |
| | | computed: { |
| | | systemList() { |
| | | return [ |
| | | { |
| | | permission: ['menu:technicalConditions'], |
| | | path: 'http://' + |
| | | location.hostname + |
| | | ':8080/technicalConditions/boatSystemStructure', |
| | | /* ?username=' + |
| | | Cookies.get('username') + '&loginType=' + |
| | | Cookies.get('loginType') + '&token=' + |
| | | Cookies.get('singleSignToken') + '&area=' + |
| | | Cookies.get('area'),*/ |
| | | key: 'technicalConditions', |
| | | text: '技术状态' |
| | | }, |
| | | { |
| | | permission: ['menu:replaceProblem'], |
| | | path: 'http://' + |
| | | location.hostname + |
| | | ':8080/replaceProblem/replaceProjectHomePage', |
| | | // ?username=' + |
| | | // Cookies.get('username') + '&loginType=' + |
| | | // Cookies.get('loginType') + '&token=' + |
| | | // Cookies.get('singleSignToken') + '&area=' + |
| | | // Cookies.get('area'), |
| | | key: 'replaceProblem', |
| | | text: '改换装' |
| | | }, |
| | | { |
| | | permission: ['menu:jszl'], |
| | | path: 'http://' + |
| | | location.hostname + |
| | | ':1811/login?username=' + |
| | | Cookies.get('username') + '&loginType=' + |
| | | Cookies.get('loginType') + '&token=' + |
| | | Cookies.get('singleSignToken') + '&area=' + |
| | | Cookies.get('area'), |
| | | text: '技术资料', |
| | | }, |
| | | { |
| | | permission: ['menu:smj'], |
| | | path: |
| | | 'http://' + |
| | | location.hostname + ':8020/#/single?' + 'username=' + |
| | | Cookies.get('username') + '&system=smj' + |
| | | '&loginType=' + |
| | | Cookies.get('loginType') + '&token=' + |
| | | Cookies.get('singleSignToken') + '&area=' + |
| | | Cookies.get('area'), |
| | | text: '寿命件数据' |
| | | }, |
| | | { |
| | | permission: ['menu:ajqc'], |
| | | path: |
| | | 'http://' + |
| | | location.hostname + |
| | | ':1812/login?username=' + |
| | | Cookies.get('username') + '&loginType=' + |
| | | Cookies.get('loginType') + '&token=' + |
| | | Cookies.get('singleSignToken') + '&area=' + |
| | | Cookies.get('area'), |
| | | text: '器材数据', |
| | | disabled: !(Cookies.get('area') === 'O') |
| | | }, |
| | | { |
| | | permission: ['menu:ajqc'], |
| | | path: |
| | | 'http://' + |
| | | location.hostname + |
| | | ':1800/login?username=' + |
| | | Cookies.get('username') + '&loginType=' + |
| | | Cookies.get('loginType') + '&token=' + |
| | | Cookies.get('singleSignToken') + '&area=' + |
| | | Cookies.get('area'), |
| | | text: '器材数据', |
| | | disabled: !(Cookies.get('area') === '1') |
| | | }, |
| | | { |
| | | permission: ['menu:syajqc'], |
| | | path: |
| | | 'http://' + |
| | | location.hostname + |
| | | ':1813/login?username=' + |
| | | Cookies.get('username') + '&loginType=' + |
| | | Cookies.get('loginType') + '&token=' + |
| | | Cookies.get('singleSignToken') + '&area=' + |
| | | Cookies.get('area'), |
| | | text: '器材数据', |
| | | disabled: !(Cookies.get('area') === '2') |
| | | }, |
| | | { |
| | | permission: ['menu:qddjxl'], |
| | | path: 'http://' + |
| | | location.hostname + |
| | | ':8080/qdGradeRepair/maintenanceHome?username=' + |
| | | Cookies.get('username') + '&loginType=' + |
| | | Cookies.get('loginType') + '&token=' + |
| | | Cookies.get('singleSignToken') + '&area=' + |
| | | Cookies.get('area'), |
| | | key: 'qdGradeRepair', |
| | | text: '等级修理', |
| | | disabled: !(Cookies.get('area') === '1') |
| | | }, |
| | | { |
| | | permission: ['menu:qdlqx'], |
| | | path: 'http://' + |
| | | location.hostname + |
| | | ':8080/qdRepair/qdlndex?username=' + |
| | | Cookies.get('username') + '&loginType=' + |
| | | Cookies.get('loginType') + '&token=' + |
| | | Cookies.get('singleSignToken') + '&area=' + |
| | | Cookies.get('area'), |
| | | key: 'qdRepair', |
| | | text: '临抢修', |
| | | disabled: !(Cookies.get('area') === '1') |
| | | }, |
| | | { |
| | | permission: ['menu:sydjxl'], |
| | | path: 'http://' + |
| | | location.hostname + ':8020/#/single?' + 'username=' + |
| | | Cookies.get('username') + '&system=wxxt' + |
| | | '&loginType=' + |
| | | Cookies.get('loginType') + |
| | | '&token=' + Cookies.get('singleSignToken') + '&area=' + |
| | | Cookies.get('area'), |
| | | key: 'gradeRepair', |
| | | text: '修理数据', |
| | | disabled: !(Cookies.get('area') === 'O') |
| | | }, |
| | | { |
| | | permission: ['menu:sydjxl'], |
| | | path: |
| | | 'http://' + |
| | | location.hostname + ':8020/#/single?' + 'username=' + |
| | | Cookies.get('username') + '&loginType=' + |
| | | Cookies.get('loginType') + '&system=djxl' + |
| | | '&token=' + Cookies.get('singleSignToken') + '&area=' + |
| | | Cookies.get('area'), |
| | | key: 'gradeRepair', |
| | | text: '等级修理', |
| | | disabled: !(Cookies.get('area') === '2') |
| | | }, |
| | | { |
| | | permission: ['menu:peixun'], |
| | | path: |
| | | 'http://' + |
| | | location.hostname + ':8221/single?' + 'username=' + |
| | | Cookies.get('username') + '&loginType=' + |
| | | Cookies.get('loginType') + '&token=' + |
| | | Cookies.get('singleSignToken') + '&area=' + |
| | | Cookies.get('area'), |
| | | key: 'peixun', |
| | | text: '培训系统' |
| | | }, |
| | | { |
| | | permission: ['menu:preventivemaintenance'], |
| | | path: 'http://' + |
| | | location.hostname + ':8080/preventiveMaintenance/troopProject?username=' + |
| | | Cookies.get('username') + |
| | | '&loginType=' + |
| | | Cookies.get('loginType') + |
| | | '&token=' + Cookies.get('singleSignToken') + '&area=' + |
| | | Cookies.get('area'), |
| | | key: 'preventiveMaintenance', |
| | | text: '预防性维修' |
| | | }, |
| | | // { |
| | | // permission: ['menu:checkManage'], |
| | | // path: '/stateManagement/manage', key: 'stateManagement', |
| | | // text: '应急排查' |
| | | // }, |
| | | { |
| | | permission: ['menu:pinggu'], |
| | | path: |
| | | 'http://' + |
| | | location.hostname + ':8701/user/ssoLogin?' + 'username=' + |
| | | Cookies.get('username') + '&loginType=' + |
| | | Cookies.get('loginType') + |
| | | '&token=' + Cookies.get('singleSignToken') + '&area=' + |
| | | Cookies.get('area'), |
| | | key: 'pinggu', |
| | | disabled: Cookies.get('area') === '2', |
| | | text: '技术状态评估' |
| | | } |
| | | // , |
| | | // { |
| | | // permission: 0, |
| | | // path: '/qualityProblem/inhandle', key: 'qualityProblem', |
| | | // text: '质量问题管理' |
| | | // }, |
| | | // { |
| | | // permission: ['menu:feedback'], path: ' /feedback/knowledge', key: 'feedback', |
| | | // text: '经验反馈', |
| | | // img: require('@/assets/image/select/situationlmg/21.png'), |
| | | // imgdisabled: require('@/assets/image/select/situationImg/21.disabled.png') |
| | | // }, |
| | | // { |
| | | // permission: ['menu:system'], key: 'system', |
| | | // text: '系统配置' |
| | | // }, |
| | | // { |
| | | // permission: ['menu:workflow'], key: 'workflow', |
| | | // text: '协同办公', |
| | | // img: require('@/assets/image/select/situationlmg/22.png'), |
| | | // imgdisabled: require('@/assets/image/select/situationlmg/22.disabled.png') |
| | | // } |
| | | ] |
| | | }, |
| | | systemName() { |
| | | if (Cookies.get('system') == 'djxl') { |
| | | return this.systemList[10].text |
| | | } else if (Cookies.get('system') == 'smj'){ |
| | | return this.systemList[3].text |
| | | } else if (Cookies.get('system') == 'wxxt'){ |
| | | return this.systemList[9].text |
| | | } |
| | | } |
| | | }, |
| | | // components: { |
| | | // // UpdatePassword, |
| | | // InfiniteLoading, |
| | | // TableStructMaintain, |
| | | // TableRelation, |
| | | // QuestionSolution, |
| | | // DatabaseTableInfo, |
| | | // sysFeedBack |
| | | // }, |
| | | created() { |
| | | let that = this |
| | | this.getUserRoleInfo() |
| | |
| | | that.isOpen = true |
| | | }) |
| | | //this.systemList = window.SITE_CONFIG['menuList'] |
| | | console.log(this.systemList, 'this.systemList') |
| | | this.loginType=Cookies.get('loginType') |
| | | // Cookies.get('loginType') |
| | | }, |
| | |
| | | |
| | | this.$EventBus.$on('formSubmit', (msg) => { |
| | | this.msg = msg |
| | | this.getOneClassFile() |
| | | // console.log(msg) |
| | | }) |
| | | this.$EventBus.$on('reLogin', () => { |
| | |
| | | })*/ |
| | | |
| | | this.getTaskCount() |
| | | this.getFeedCount() |
| | | this.getOneClassFile() |
| | | // console.log(this.$store.state.user,'this.$store.state.user.debug navbar6666666666') |
| | | if (!this.$store.state.debug) { |
| | | setInterval(this.getOneClassFile, 60000) |
| | | } |
| | | |
| | | if (this.$store.state.user.isCjRole) { |
| | | this.$http.get('/task/taskCenter/page').then(res => { |
| | | console.log(res.data, 'res.data嘿嘿嘿') |
| | | let data = res.data |
| | | for (let val of data) { |
| | | if (val.stepMarker == 'work_cjtx') { |
| | | this.$http.get(`/task/planTask/${val.bizId}`).then(res => { |
| | | let DiffDay = this.getDiffDay(res.data.checkDate, new Date()) |
| | | if (DiffDay <= 7 && DiffDay > -1) { |
| | | return this.$tip.confirm('工程项目' + val.topic + '的第' + res.data.startPeriod + '期的周计划任务审核时间剩余' + DiffDay + '天,请尽快完成任务填写!') |
| | | } |
| | | }) |
| | | } |
| | | } |
| | | }) |
| | | } |
| | | this.isAdmin = this.$store.state.user.isAdmin |
| | | }, |
| | | methods: { |
| | |
| | | }else if(this.system==='djxl') { |
| | | window.open('./help/djxlVideo/index.html','_blank'); |
| | | } |
| | | }, |
| | | async load($state) { |
| | | //调用获取表格数据的接口 |
| | | await this.$http.get(`/task/OneClassFile/fileNotice?pageIndex=${this.pageIndex}&pageSize=${this.pageSize}`).then(res => { |
| | | console.log(res, 'res') |
| | | if (res && res.success) { |
| | | if (this.pageIndex === 1) { |
| | | this.gridData = res.data //首先加载后端返回的第一页的数据显示在表格中 |
| | | $state.complete() //加载完成的状态 |
| | | } else { |
| | | if (!res.data || res.data.length < this.pageSize) { |
| | | $state.complete() //加载完成的状态 |
| | | } else { |
| | | this.gridData = this.gridData.concat(res.data) //将后端新返回的数据拼接在原表格后面 |
| | | $state.loaded() //加载中的状态 |
| | | } |
| | | } |
| | | this.pageIndex++ //鼠标在表格底部滑动时,翻页,即当前页数+1 |
| | | console.log('123333333333') |
| | | } else { |
| | | $state.complete() //加载完成的状态 |
| | | } |
| | | }) |
| | | }, |
| | | getDiffDay(date_1, date_2) { |
| | | // 计算两个日期之间的差值 |
| | |
| | | return this.$message.error(res.msg) |
| | | } |
| | | this.userRoleInfo = res.data |
| | | if(this.$store.state.user.isZcRole || |
| | | this.userRoleInfo.roleName=='总体所角色' || |
| | | this.userRoleInfo.roleName=='代表室角色' || |
| | | this.userRoleInfo.roleName=='助理角色'|| |
| | | this.userRoleInfo.roleName=='部长角色' || |
| | | this.userRoleInfo.roleName=='处长角色'){ |
| | | this.$store.state.isGoToHome = true |
| | | } else{ |
| | | this.$store.state.isGoToHome = false |
| | | } |
| | | console.log(this.userRoleInfo, 'userRoleInfo') |
| | | }).catch(() => { |
| | | }) |
| | |
| | | this.$router.push({name: 'login'}) |
| | | } |
| | | }, |
| | | async addOneClassFile1() { |
| | | let fileIds = '' |
| | | for (let i = 0; i < this.gridData.length; i++) { |
| | | if (this.gridData[i].code === 1) { |
| | | fileIds = fileIds + this.gridData[i].fileId + ',' |
| | | } |
| | | } |
| | | let planId = { |
| | | fileIds: fileIds, |
| | | readerid: this.$store.state.user.id |
| | | } |
| | | let res = await this.$http.post(`/task/OneClassFile/documentReadingRecord`, planId) |
| | | if (res.success) { |
| | | this.getOneClassFile('allRead') |
| | | } |
| | | }, |
| | | indexMethod(index) { |
| | | return index += 1 |
| | | }, |
| | | getJsfa(row) { |
| | | let _this = this |
| | | console.log(row, 'row') |
| | | if (row.busiFieldName === '修理技术方案' || row.busiFieldName === '技术方案2') { |
| | | _this.$router.push({ |
| | | name: 'sy-maintain-task-xqzb-repair-skill-scheme', |
| | | params: { |
| | | productId: row.productId |
| | | } |
| | | }) |
| | | } |
| | | if (row.busiFieldName === '进厂协议') { |
| | | _this.$router.push({ |
| | | name: 'sy-maintain-task-jcxl-JT-enteringPlant.vue', |
| | | params: { |
| | | productId: row.productId |
| | | } |
| | | }) |
| | | } |
| | | if (row.busiFieldName === '综合验收') { |
| | | _this.$router.push({ |
| | | name: 'sy-maintain-task-jyys-synthetical-test', |
| | | params: { |
| | | productId: row.productId |
| | | } |
| | | }) |
| | | } |
| | | }, |
| | | async getOneClassFile(code) { |
| | | //console.log(code) |
| | | let res = await this.$http.get(`/task/OneClassFile/fileNotice?pageIndex=${this.pageIndex}&pageSize=${this.pageSize}`) |
| | | if (res.success) { |
| | | console.log(res.data) |
| | | if(res.data.length>0){ |
| | | if(res.data[0].total!==undefined){ |
| | | this.taskCount = res.data[0].total |
| | | } |
| | | // res.data.sort((a, b) => new Date(b.createDate).getTime() - new Date(a.createDate).getTime()) |
| | | this.gridData = res.data |
| | | if (code !== 'allRead') { |
| | | this.pageIndex++ |
| | | } |
| | | //console.log(this.gridData, 'this.gridData') |
| | | } |
| | | } |
| | | }, |
| | | async addOneClassFile(row, code) { |
| | | let fileIds = '' |
| | | for (let i = 0; i < this.gridData.length; i++) { |
| | | if (this.gridData[i].code === 1) { |
| | | fileIds = fileIds + this.gridData[i].fileId + ',' |
| | | |
| | | } |
| | | } |
| | | let planId |
| | | if (code === 1) { |
| | | planId = { |
| | | fileid: row.fileId, |
| | | readerid: this.$store.state.user.id |
| | | } |
| | | } |
| | | if (code === 2) { |
| | | planId = { |
| | | fileIds: fileIds, |
| | | readerid: this.$store.state.user.id |
| | | } |
| | | } |
| | | |
| | | // let userName = this.$store.state.user.id |
| | | // console.log(userName,'userName userName') |
| | | let res = await this.$http.post(`/task/OneClassFile/documentReadingRecord`, planId) |
| | | if (res.success) { |
| | | this.getOneClassFile() |
| | | } |
| | | }, |
| | | task(row) { |
| | | this.getRecordNumber(1) |
| | |
| | | // console.log(this.taskList, "12311") |
| | | } |
| | | }, |
| | | async getFeedCount() { |
| | | let count = 0 |
| | | let res = await this.$http.get(`/sys/feedback/page`) |
| | | if (res.success) { |
| | | console.log(res.data, "feedback......") |
| | | res.data.forEach((item) => { |
| | | if (item.isFinish === null || item.isFinish === 'undefined') { |
| | | count++ |
| | | } |
| | | }) |
| | | this.feedCount = count |
| | | } |
| | | }, |
| | | goToIndex() { |
| | | console.log(this.$store.state.user.roleName,'this.$store.state.user.roleName') |
| | | this.$router.push({name: 'TestDjxlHome',params: {roleName: this.$store.state.user.roleName}}) |
| | | // window.console.log(this.$route.name) |
| | | }, |
| | | async toFeedBack(){ |
| | | this.$nextTick(() => { |
| | | this.$refs.sysFeedBack.$refs.dialog.init(); |
| | | }) |
| | | }, |
| | | themehangeHandle(val) { |
| | | this.themeColor = val |