genggai工作

lijinlong
李劲龙 3 months ago
parent 1261b6febe
commit e62abb7944

@ -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)
}
}
}

@ -5,8 +5,8 @@
<el-row style="margin: 10px 0;">
<span class="top-title-box">基本信息</span>
</el-row>
<div class="assets-info-box">
<el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="170px" class="demo-ruleForm"
<div class="assets-info-box" v-loading="loading">
<el-form :model="ruleForm" v-if="!loading" :rules="rules" ref="ruleForm" label-width="170px" class="demo-ruleForm"
label-position="right" :disabled="disabled">
<el-row>
<el-col :span="12">
@ -1521,7 +1521,7 @@
<el-row style="margin: 10px 0;">
<span class="top-title-two-box">服务器信息</span>
</el-row>
<div v-for="(domain, index) in ruleForm.fwqxx" :key="domain.key" :prop="'fwqxx.' + index + '.value'">
<div v-for="(domain, index) in ruleForm.fwqxx" :key="domain.key" >
<el-row style="display: flex;">
<el-col :span="8">
<el-form-item class="daoqitixingren" required :prop="`fwqxx[${index}].sblx`" :rules="{
@ -2829,13 +2829,20 @@ export default {
methods: {
//
getInfo(obj) {
this.loading = true
assetTasktaskSh(obj).then(res => {
this.ruleForm = res.data;
if (!this.ruleForm.xjgywxt) {
this.ruleForm.xjgywxt = {}
this.$set(this.ruleForm.xjgywxt, 'remark', "")
}
if(this.ruleForm.fwwz) {
let arr = this.ruleForm.fwwz.split("-")
this.select = arr[0]
this.ruleForm.fwwz = arr[1]
}
this.ruleForm.xttz ? this.xttz = this.ruleForm.xttz.split(',') : [];
let chepingUnit = this.ruleForm.gylxxList.filter((item) => 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('请输入报废原因', '提示', {

@ -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);

@ -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() { },

Loading…
Cancel
Save