diff --git a/src/components/Breadcrumb/index.vue b/src/components/Breadcrumb/index.vue index 0a71a8c..17937c0 100644 --- a/src/components/Breadcrumb/index.vue +++ b/src/components/Breadcrumb/index.vue @@ -40,7 +40,12 @@ export default { // 当前全部侧边栏 let sidebarRouters = this.sidebarRouters let matched = this.$route.matched.filter(item => item.meta && item.meta.title) + let matchedquery = this.$route.query + matched[0].query = matchedquery + const first = matched[0] + + // sidebarRouters.forEach(element => { // if (element.children && element.children.length != 0) { // // 提取带childen的侧边栏 @@ -53,7 +58,7 @@ export default { if (!this.isDashboard(first)) { // matched = [{ path: '/index', meta: { title: '首页' }}].concat(matched) } - // console.log(sidebarRouters); + console.log(matched[0]); if(matched[0].path == "/assetsAuth" ) { // 管理端--资产管理--新增资产 const activeRoute = sidebarRouters.filter(item => item.path == '/' && item.children[0].path == 'assets') @@ -72,10 +77,8 @@ export default { this.levelList = [activeRoute[0].children[0],matched[0]] } else if(matched[0].path == "/taskAuditInfo") { // 管理端--任务管理--任务审核--资产审核 - const activeRoute = sidebarRouters.filter(item => item.path == '/' && item.children[0].path == 'task') - const route = sidebarRouters.filter(item => item.path == '') - const twoActiveRoute = route[0].children.filter(item => item.path == "taskAudit") - this.levelList = [activeRoute[0].children[0],twoActiveRoute[0],matched[0]] + const activeRoute = sidebarRouters.filter(item => item.path == '/' && item.children[0].path == 'myTask') + this.levelList = [activeRoute[0].children[0],matched[0]] } else if(matched[0].path == "/mytaskAuditInfo") { // 单位端--我的任务--资产核查--资产审核详情 const activeRoute = sidebarRouters.filter(item => item.path == '/' && item.children[0].path == 'myTask') @@ -98,12 +101,14 @@ export default { return name.trim() === 'Index' }, handleLink(item) { + console.log(item); + const { redirect, path } = item if (redirect) { this.$router.push(redirect) return } - this.$router.push(path) + // this.$router.push(path) } } } diff --git a/src/views/unitPages/myTask/audit.vue b/src/views/unitPages/myTask/audit.vue index c44a088..421cea0 100644 --- a/src/views/unitPages/myTask/audit.vue +++ b/src/views/unitPages/myTask/audit.vue @@ -5,8 +5,8 @@ 基本信息 -
- + @@ -1521,7 +1521,7 @@ 服务器信息 -
+
item.type == 1) let yjgysUnit = this.ruleForm.gylxxList.filter((item) => item.type == 2) let jfywUnit = this.ruleForm.gylxxList.filter((item) => item.type == 3) @@ -2843,6 +2850,7 @@ export default { let xtjsUnit = this.ruleForm.gylxxList.filter((item) => item.type == 5) let xtyyUnit = this.ruleForm.gylxxList.filter((item) => item.type == 7) let aqfwUnit = this.ruleForm.gylxxList.filter((item) => item.type == 6) + this.$set(this.ruleForm, 'chepingUnit', chepingUnit.length > 0 ? chepingUnit : [{ name: "", tyshxydm: "", lxr: "", lxdh: "", type: 1 }]) this.$set(this.ruleForm, 'yjgysUnit', yjgysUnit.length > 0 ? yjgysUnit : [{ name: "", tyshxydm: "", lxr: "", lxdh: "", type: 2 }]) this.$set(this.ruleForm, 'jfywUnit', jfywUnit.length > 0 ? jfywUnit : [{ name: "", tyshxydm: "", lxr: "", lxdh: "", type: 3 }]) @@ -2851,10 +2859,22 @@ export default { this.$set(this.ruleForm, 'xtyyUnit', xtyyUnit.length > 0 ? xtyyUnit : [{ name: "", tyshxydm: "", lxr: "", lxdh: "", type: 7 }]) this.$set(this.ruleForm, 'aqfwUnit', aqfwUnit.length > 0 ? aqfwUnit : [{ name: "", tyshxydm: "", lxr: "", lxdh: "", type: 6 }]) - this.ruleForm.fwqxx = (this.ruleForm.jcwlList.filter((item) => item.type == 1) == [] ? this.ruleForm.jcwlList.filter((item) => item.type == 1) : [{ sblx: "", pp: "", ipType: "", sbIP: "", czxx: "", czxxbb: "", yjxh: "", yjxlh: "", yjbbxx: "", yjyt: "", yjbswz: "", type: 1 }]) + let fwqxx = this.ruleForm.jcwlList.filter((item) => item.type == 1) + let wlsb = this.ruleForm.jcwlList.filter((item) => item.type == 2) + let aqsb = this.ruleForm.jcwlList.filter((item) => item.type == 3) + + + // this.ruleForm.fwqxx = (this.ruleForm.jcwlList.filter((item) => item.type == 1) == [] ? this.ruleForm.jcwlList.filter((item) => item.type == 1) : [{ sblx: "", pp: "", ipType: "", sbIP: "", czxx: "", czxxbb: "", yjxh: "", yjxlh: "", yjbbxx: "", yjyt: "", yjbswz: "", type: 1 }]) + + this.$set(this.ruleForm, 'fwqxx', fwqxx.length > 0 ? fwqxx : [{ sblx: "", pp: "", ipType: "", sbIP: "", czxx: "", czxxbb: "", yjxh: "", yjxlh: "", yjbbxx: "", yjyt: "", yjbswz: "", type: 1 }]) - this.ruleForm.wlsb = (this.ruleForm.jcwlList.filter((item) => item.type == 2) == [] ? this.ruleForm.jcwlList.filter((item) => item.type == 2) : [{ sblx: "", pp: "", ipType: "", sbIP: "", czxx: "", czxxbb: "", yjxh: "", yjxlh: "", yjbbxx: "", yjyt: "", yjbswz: "", type: 2 }]) - this.ruleForm.aqsb = (this.ruleForm.jcwlList.filter((item) => item.type == 3) == [] ? this.ruleForm.jcwlList.filter((item) => item.type == 3) : [{ sblx: "", pp: "", ipType: "", sbIP: "", czxx: "", czxxbb: "", yjxh: "", yjxlh: "", yjbbxx: "", yjyt: "", yjbswz: "", type: 3 }]) + this.$set(this.ruleForm, 'wlsb', wlsb.length > 0 ? wlsb : [{ sblx: "", pp: "", ipType: "", sbIP: "", czxx: "", czxxbb: "", yjxh: "", yjxlh: "", yjbbxx: "", yjyt: "", yjbswz: "", type: 2 }]) + + this.$set(this.ruleForm, 'aqsb', aqsb.length > 0 ? aqsb : [{ sblx: "", pp: "", ipType: "", sbIP: "", czxx: "", czxxbb: "", yjxh: "", yjxlh: "", yjbbxx: "", yjyt: "", yjbswz: "", type: 3 }]) + + // this.ruleForm.wlsb = (this.ruleForm.jcwlList.filter((item) => item.type == 2) == [] ? this.ruleForm.jcwlList.filter((item) => item.type == 2) : [{ sblx: "", pp: "", ipType: "", sbIP: "", czxx: "", czxxbb: "", yjxh: "", yjxlh: "", yjbbxx: "", yjyt: "", yjbswz: "", type: 2 }]) + + // this.ruleForm.aqsb = (this.ruleForm.jcwlList.filter((item) => item.type == 3) == [] ? this.ruleForm.jcwlList.filter((item) => item.type == 3) : [{ sblx: "", pp: "", ipType: "", sbIP: "", czxx: "", czxxbb: "", yjxh: "", yjxlh: "", yjbbxx: "", yjyt: "", yjbswz: "", type: 3 }]) this.ruleForm.xtfhqkFcg ? this.xtfhqkFcg = this.ruleForm.xtfhqkFcg.split(',') : []; this.ruleForm.xtfhqkFcg ? this.xtfhqkFxl = this.ruleForm.xtfhqkFxl.split(',') : []; @@ -2869,6 +2889,8 @@ export default { } else if (this.ruleForm.sheng) { this.dlwz = [this.ruleForm.sheng] } + this.loading = false + }) }, changeRadio(id) { @@ -2889,7 +2911,9 @@ export default { }, // 服务器Form新增 addServer(type, id) { - this[type].push({ + console.log(this.ruleForm); + + this.ruleForm[type].push({ sblx: "", pp: "", ipType: "", @@ -3012,6 +3036,9 @@ export default { this.ruleForm.shi = this.dlwz[1] this.ruleForm.qu = this.dlwz[2] } + if(this.ruleForm.fwwz) { + this.ruleForm.fwwz = this.select + "-" + this.ruleForm.fwwz + } if (type == 0) { //报废 this.$prompt('请输入报废原因', '提示', { diff --git a/src/views/unitPages/myTask/index.vue b/src/views/unitPages/myTask/index.vue index ac872a0..4866337 100644 --- a/src/views/unitPages/myTask/index.vue +++ b/src/views/unitPages/myTask/index.vue @@ -188,6 +188,13 @@ export default { } }, mounted() { + console.log(this.$store.state.user); + if(this.$store.state.user.roles[0] == "admin"){ + this.pagination: { + current: 1, + size: 10, + }, + } this.getInfo(); this.cancalDebounce(); window.addEventListener('resize', this.cancalDebounce); diff --git a/src/views/unitPages/myTask/info.vue b/src/views/unitPages/myTask/info.vue index f5a48c7..bfc89ca 100644 --- a/src/views/unitPages/myTask/info.vue +++ b/src/views/unitPages/myTask/info.vue @@ -229,6 +229,7 @@ export default { } }, mounted() { + this.getList(); this.cancalDebounce(); window.addEventListener('resize', this.cancalDebounce); @@ -344,9 +345,11 @@ export default { } }, getList() { - + this.loading = true geassetTaskcHc(this.pagination).then(res => { + this.tableData = res.data.records + this.loading = false }) }, getListTwo() { },