提交 da928582 authored 作者: thy's avatar thy

Merge branch 'master' into 'thy'

# Conflicts: # src/components/roleDispose/roleDispose.vue
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
// 服务地址 // 服务地址
const IP = 'http://120.55.57.35'; // 刘杰 const IP = 'http://120.55.57.35'; // 刘杰
// const IP = 'http://192.168.0.114'; // 刘杰 // const IP = 'http://192.168.1.104'; // 刘杰
// 请求目标服务器域名配置 // 请求目标服务器域名配置
const DOMAIN_NAME = { const DOMAIN_NAME = {
......
...@@ -140,7 +140,7 @@ export default { ...@@ -140,7 +140,7 @@ export default {
this.allData = res.data.data.rows; this.allData = res.data.data.rows;
this.totalLength = res.data.data.total; this.totalLength = res.data.data.total;
}).catch(err => { }).catch(err => {
this.$message.error('数据请求失败!'); console.log(err);
}) })
}, },
// 点击分页 // 点击分页
......
...@@ -90,7 +90,7 @@ export default { ...@@ -90,7 +90,7 @@ export default {
this.$message.error(res.data.msg); this.$message.error(res.data.msg);
} }
}).catch(err => { }).catch(err => {
this.$message.error('单位新建失败!'); console.log(err);
}) })
} }
}, },
......
...@@ -118,7 +118,7 @@ export default { ...@@ -118,7 +118,7 @@ export default {
this.$message.error(this.text + '失败!'); this.$message.error(this.text + '失败!');
} }
}).catch(err => { }).catch(err => {
this.$message.error(this.text + '失败!'); console.log(err);
}) })
} else { } else {
this.$server.postProduceAdd(data).then(res => { this.$server.postProduceAdd(data).then(res => {
...@@ -129,7 +129,7 @@ export default { ...@@ -129,7 +129,7 @@ export default {
this.$message.error(this.text + '失败!'); this.$message.error(this.text + '失败!');
} }
}).catch(err => { }).catch(err => {
this.$message.error(this.text + '失败!'); console.log(err);
}) })
} }
} }
......
...@@ -131,7 +131,7 @@ export default { ...@@ -131,7 +131,7 @@ export default {
this.$server.getTechFindAll().then(res => { // 请求技术路线 this.$server.getTechFindAll().then(res => { // 请求技术路线
this.techList = res.data.data this.techList = res.data.data
}).catch(err => { }).catch(err => {
this.$message.error('数据请求失败!'); console.log(err);
}) })
}, },
// 产品分类转换 // 产品分类转换
...@@ -173,10 +173,14 @@ export default { ...@@ -173,10 +173,14 @@ export default {
t: message t: message
}; };
this.$server.postProduceSearchAccess(data).then(res => { this.$server.postProduceSearchAccess(data).then(res => {
this.allData = res.data.data.rows; if (res.data.code === 200) {
this.totalLength = res.data.data.total; this.allData = res.data.data.rows;
this.totalLength = res.data.data.total;
} else {
this.$message.error(res.data.msg);
}
}).catch(err => { }).catch(err => {
this.$message.error('数据请求失败!'); console.log(err);
}) })
}, },
// 点击分页 // 点击分页
......
...@@ -59,7 +59,7 @@ export default { ...@@ -59,7 +59,7 @@ export default {
console.log(res) console.log(res)
this.techNameList = res.data.data this.techNameList = res.data.data
}).catch(err => { }).catch(err => {
this.$message.error('数据请求失败!'); console.log(err);
}) })
} }
}, },
......
...@@ -128,7 +128,7 @@ export default { ...@@ -128,7 +128,7 @@ export default {
this.$message.error(res.data.msg); this.$message.error(res.data.msg);
} }
}).catch(err => { }).catch(err => {
this.$message.error('数据请求失败!'); console.log(err);
}) })
} }
} }
...@@ -157,7 +157,7 @@ export default { ...@@ -157,7 +157,7 @@ export default {
this.$message.error(res.data.msg); this.$message.error(res.data.msg);
} }
}).catch(err => { }).catch(err => {
this.$message.error('数据请求失败!'); console.log(err);
}) })
} else { // 新增技术路线 } else { // 新增技术路线
this.$server.postTechAdd(val).then((res) => { // 数据请求 this.$server.postTechAdd(val).then((res) => { // 数据请求
...@@ -169,7 +169,7 @@ export default { ...@@ -169,7 +169,7 @@ export default {
this.$message.error(res.data.msg); this.$message.error(res.data.msg);
} }
}).catch(err => { }).catch(err => {
this.$message.error('数据请求失败!'); console.log(err);
}) })
} }
...@@ -199,7 +199,7 @@ export default { ...@@ -199,7 +199,7 @@ export default {
this.$message.error(res.data.msg); this.$message.error(res.data.msg);
} }
}).catch(err => { }).catch(err => {
this.$message.error('数据请求失败!'); console.log(err);
}) })
} else { } else {
this.allProduct[index].product2 = ''; this.allProduct[index].product2 = '';
...@@ -225,7 +225,7 @@ export default { ...@@ -225,7 +225,7 @@ export default {
this.$message.error(res.data.msg); this.$message.error(res.data.msg);
} }
}).catch(err => { }).catch(err => {
this.$message.error('数据请求失败!'); console.log(err);
}) })
} }
} }
......
...@@ -109,7 +109,7 @@ export default { ...@@ -109,7 +109,7 @@ export default {
} }
console.log(res.data.data) console.log(res.data.data)
}).catch(err => { }).catch(err => {
this.$message.error('数据请求失败!'); console.log(err);
}) })
this.init(); this.init();
}, },
...@@ -142,7 +142,7 @@ export default { ...@@ -142,7 +142,7 @@ export default {
this.$message.error(res.data.msg); this.$message.error(res.data.msg);
} }
}).catch(err => { }).catch(err => {
this.$message.error('数据请求失败!'); console.log(err);
}) })
}, },
// 搜索栏 // 搜索栏
......
...@@ -165,7 +165,7 @@ export default { ...@@ -165,7 +165,7 @@ export default {
this.$message.error(res.data.msg); this.$message.error(res.data.msg);
} }
}).catch(err => { }).catch(err => {
this.$message.error('数据请求失败!'); console.log(err);
}) })
}, },
// 点击分页 // 点击分页
...@@ -216,7 +216,7 @@ export default { ...@@ -216,7 +216,7 @@ export default {
this.$message.error(res.data.msg); this.$message.error(res.data.msg);
} }
}).catch(err => { }).catch(err => {
this.$message.error('导入单位失败!'); console.log(err);
}) })
}, },
// 单位查看详情 // 单位查看详情
......
...@@ -90,7 +90,7 @@ export default { ...@@ -90,7 +90,7 @@ export default {
this.$message.error(res.data.msg); this.$message.error(res.data.msg);
} }
}).catch(err => { }).catch(err => {
this.$message.error('单位新建失败!'); console.log(err);
}) })
} }
}, },
......
...@@ -109,7 +109,7 @@ export default { ...@@ -109,7 +109,7 @@ export default {
this.$message.error(res.data.msg); this.$message.error(res.data.msg);
} }
}).catch(err => { }).catch(err => {
this.$message.error('数据请求失败!'); console.log(err);
}) })
} else { } else {
return false; return false;
...@@ -139,7 +139,7 @@ export default { ...@@ -139,7 +139,7 @@ export default {
this.$message.error(res.data.msg); this.$message.error(res.data.msg);
} }
}).catch(err => { }).catch(err => {
this.$message.error('数据请求失败!'); console.log(err);
}) })
}, },
// 打开上传功能 // 打开上传功能
......
...@@ -141,11 +141,11 @@ export default { ...@@ -141,11 +141,11 @@ export default {
this.$message.error(res.data.msg); this.$message.error(res.data.msg);
} }
}).catch(err => { }).catch(err => {
this.$message.error('数据请求失败!'); console.log(err);
}) })
} }
}).catch(err => { }).catch(err => {
this.$message.error('数据请求失败!'); console.log(err);
}) })
}, },
methods: { methods: {
...@@ -178,7 +178,7 @@ export default { ...@@ -178,7 +178,7 @@ export default {
this.$message.error(res.data.msg); this.$message.error(res.data.msg);
} }
}).catch(err => { }).catch(err => {
this.$message.error('数据请求失败!'); console.log(err);
}) })
}, },
// 搜索栏 // 搜索栏
......
...@@ -125,13 +125,13 @@ export default { ...@@ -125,13 +125,13 @@ export default {
this.$message.error(res.data.msg); this.$message.error(res.data.msg);
} }
}).catch(err => { }).catch(err => {
this.$message.error('数据请求失败!'); console.log(err);
}) })
} else { } else {
this.$message.error(res.data.msg); this.$message.error(res.data.msg);
} }
}).catch(err => { }).catch(err => {
this.$message.error('数据请求失败!'); console.log(err);
}) })
}, },
...@@ -158,7 +158,7 @@ export default { ...@@ -158,7 +158,7 @@ export default {
this.$message.error(res.data.msg); this.$message.error(res.data.msg);
} }
}).catch(err => { }).catch(err => {
this.$message.error('数据请求失败!'); console.log(err);
}) })
}, },
// 返回 // 返回
...@@ -183,7 +183,7 @@ export default { ...@@ -183,7 +183,7 @@ export default {
this.$message.error(res.data.msg); this.$message.error(res.data.msg);
} }
}).catch(err => { }).catch(err => {
this.$message.error('数据请求失败!'); console.log(err);
}) })
}, },
......
...@@ -115,7 +115,7 @@ export default { ...@@ -115,7 +115,7 @@ export default {
this.$message.error(this.text + '失败!'); this.$message.error(this.text + '失败!');
} }
}).catch(err => { }).catch(err => {
this.$message.error(this.text + '失败!'); console.log(err);
}) })
} else { } else {
this.$server.postProduceAdd(data).then(res => { this.$server.postProduceAdd(data).then(res => {
...@@ -126,7 +126,7 @@ export default { ...@@ -126,7 +126,7 @@ export default {
this.$message.error(this.text + '失败!'); this.$message.error(this.text + '失败!');
} }
}).catch(err => { }).catch(err => {
this.$message.error(this.text + '失败!'); console.log(err);
}) })
} }
} }
......
...@@ -155,7 +155,7 @@ export default { ...@@ -155,7 +155,7 @@ export default {
this.$message.error(res.data.msg); this.$message.error(res.data.msg);
} }
}).catch(err => { }).catch(err => {
this.$message.error('数据请求失败!'); console.log(err);
}) })
}, },
// 产品分类转换 // 产品分类转换
...@@ -208,7 +208,7 @@ export default { ...@@ -208,7 +208,7 @@ export default {
this.$message.error(res.data.msg); this.$message.error(res.data.msg);
} }
}).catch(err => { }).catch(err => {
this.$message.error('数据请求失败!'); console.log(err);
}) })
}, },
// 点击分页 // 点击分页
...@@ -253,7 +253,7 @@ export default { ...@@ -253,7 +253,7 @@ export default {
this.$message.error(res.data.msg); this.$message.error(res.data.msg);
} }
}).catch(err => { }).catch(err => {
this.$message.error('产品导入失败!'); console.log(err);
}) })
}, },
// 产品详情 // 产品详情
......
...@@ -62,7 +62,7 @@ export default { ...@@ -62,7 +62,7 @@ export default {
this.$message.error(res.data.msg); this.$message.error(res.data.msg);
} }
}).catch(err => { }).catch(err => {
this.$message.error('数据请求失败!'); console.log(err);
}) })
} }
}, },
......
...@@ -59,7 +59,7 @@ export default { ...@@ -59,7 +59,7 @@ export default {
this.$message.error(res.data.msg); this.$message.error(res.data.msg);
} }
}).catch(err => { }).catch(err => {
this.$message.error('数据请求失败!'); console.log(err);
}) })
}, },
methods: { methods: {
...@@ -110,7 +110,7 @@ export default { ...@@ -110,7 +110,7 @@ export default {
this.$message.error(res.data.msg); this.$message.error(res.data.msg);
} }
}).catch(err => { }).catch(err => {
this.$message.error('数据请求失败!'); console.log(err);
}) })
} else { } else {
let val = { let val = {
...@@ -125,7 +125,7 @@ export default { ...@@ -125,7 +125,7 @@ export default {
this.$message.error(res.data.msg); this.$message.error(res.data.msg);
} }
}).catch(err => { }).catch(err => {
this.$message.error('数据请求失败!'); console.log(err);
}) })
} }
......
...@@ -113,7 +113,7 @@ export default { ...@@ -113,7 +113,7 @@ export default {
this.$message.error(res.data.msg); this.$message.error(res.data.msg);
} }
}).catch(err => { }).catch(err => {
this.$message.error('数据请求失败!'); console.log(err);
}) })
}, },
// 搜索栏 // 搜索栏
......
...@@ -146,13 +146,13 @@ export default { ...@@ -146,13 +146,13 @@ export default {
console.log(res.data.data) console.log(res.data.data)
this.project = res.data.data; this.project = res.data.data;
}).catch(err => { }).catch(err => {
this.$message.error('数据请求失败!'); console.log(err);
}) })
this.$server.getProduceFindAll().then(res => { this.$server.getProduceFindAll().then(res => {
console.log(res.data.data) console.log(res.data.data)
this.product = res.data.data; this.product = res.data.data;
}).catch(err => { }).catch(err => {
this.$message.error('数据请求失败!'); console.log(err);
}) })
}, },
methods: { methods: {
...@@ -193,7 +193,7 @@ export default { ...@@ -193,7 +193,7 @@ export default {
this.$message.error(res.data.msg); this.$message.error(res.data.msg);
} }
}).catch(err => { }).catch(err => {
this.$message.error('数据请求失败!'); console.log(err);
}) })
} else { } else {
return false; return false;
...@@ -223,7 +223,7 @@ export default { ...@@ -223,7 +223,7 @@ export default {
this.$message.error(res.data.msg); this.$message.error(res.data.msg);
} }
}).catch(err => { }).catch(err => {
this.$message.error('数据请求失败!'); console.log(err);
}) })
} }
}, },
......
...@@ -134,7 +134,7 @@ export default { ...@@ -134,7 +134,7 @@ export default {
this.$message.error(res.data.msg); this.$message.error(res.data.msg);
} }
}).catch(err => { }).catch(err => {
this.$message.error('数据请求失败!'); console.log(err);
}) })
}, },
// 搜索栏 // 搜索栏
......
...@@ -106,7 +106,7 @@ export default { ...@@ -106,7 +106,7 @@ export default {
console.log(res.data.data) console.log(res.data.data)
this.unit = res.data.data; this.unit = res.data.data;
}).catch(err => { }).catch(err => {
this.$message.error('数据请求失败!'); console.log(err);
}) })
let value = this.$route.params.value; let value = this.$route.params.value;
if (value !== '' || value !== undefined) { if (value !== '' || value !== undefined) {
......
...@@ -145,13 +145,13 @@ export default { ...@@ -145,13 +145,13 @@ export default {
console.log(res.data.data) console.log(res.data.data)
this.project = res.data.data; this.project = res.data.data;
}).catch(err => { }).catch(err => {
this.$message.error('数据请求失败!'); console.log(err);
}) })
this.$server.getProduceFindAll().then(res => { this.$server.getProduceFindAll().then(res => {
console.log(res.data.data) console.log(res.data.data)
this.product = res.data.data; this.product = res.data.data;
}).catch(err => { }).catch(err => {
this.$message.error('数据请求失败!'); console.log(err);
}) })
}, },
methods: { methods: {
...@@ -192,7 +192,7 @@ export default { ...@@ -192,7 +192,7 @@ export default {
this.$message.error(res.data.msg); this.$message.error(res.data.msg);
} }
}).catch(err => { }).catch(err => {
this.$message.error('数据请求失败!'); console.log(err);
}) })
} else { } else {
return false; return false;
...@@ -222,7 +222,7 @@ export default { ...@@ -222,7 +222,7 @@ export default {
this.$message.error(res.data.msg); this.$message.error(res.data.msg);
} }
}).catch(err => { }).catch(err => {
this.$message.error('数据请求失败!'); console.log(err);
}) })
} }
}, },
......
...@@ -135,7 +135,7 @@ export default { ...@@ -135,7 +135,7 @@ export default {
this.$message.error(res.data.msg); this.$message.error(res.data.msg);
} }
}).catch(err => { }).catch(err => {
this.$message.error('数据请求失败!'); console.log(err);
}) })
}, },
// 搜索栏 // 搜索栏
......
...@@ -132,7 +132,7 @@ export default { ...@@ -132,7 +132,7 @@ export default {
console.log(res.data.data) console.log(res.data.data)
this.unit = res.data.data; this.unit = res.data.data;
}).catch(err => { }).catch(err => {
this.$message.error('数据请求失败!'); console.log(err);
}) })
let value = this.$route.params.value; let value = this.$route.params.value;
if (value !== '' || value !== undefined) { if (value !== '' || value !== undefined) {
...@@ -176,7 +176,7 @@ export default { ...@@ -176,7 +176,7 @@ export default {
this.$message.error(res.data.msg); this.$message.error(res.data.msg);
} }
}).catch(err => { }).catch(err => {
this.$message.error('数据请求失败!'); console.log(err);
}) })
}, },
cancel() { cancel() {
......
...@@ -123,7 +123,7 @@ export default { ...@@ -123,7 +123,7 @@ export default {
item.createDate = item.createDate === '' ? '暂无' : this.time(item.createDate); item.createDate = item.createDate === '' ? '暂无' : this.time(item.createDate);
} }
}).catch(err => { }).catch(err => {
this.$message.error('数据请求失败!'); console.log(err);
}) })
}, },
// 搜索栏 // 搜索栏
...@@ -197,7 +197,7 @@ export default { ...@@ -197,7 +197,7 @@ export default {
}); });
this.init() this.init()
}).catch(err => { }).catch(err => {
this.$message.error('数据请求失败!'); console.log(err);
}) })
}).catch(() => { }).catch(() => {
this.$message({ this.$message({
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
<span class="font">{{this.$store.getters.getUserData.name}}</span> <span class="font">{{this.$store.getters.getUserData.name}}</span>
</span> </span>
<span class="line"></span> <span class="line"></span>
<span class="logout" @click="jump('login')">退出</span> <span class="logout" @click="loginOut">退出</span>
</span> </span>
<span class="user" v-if="this.$store.getters.getUserData.name === undefined"> <span class="user" v-if="this.$store.getters.getUserData.name === undefined">
<span class="admin login" @click="jump('login')">请登录</span> <span class="admin login" @click="jump('login')">请登录</span>
...@@ -96,6 +96,14 @@ export default { ...@@ -96,6 +96,14 @@ export default {
$(va).addClass('menuClick') $(va).addClass('menuClick')
} }
}, },
// 退出
loginOut() {
this.$server.getloginOut(this.$store.getters.getUserData.sessionId).then((res) => { // 数据请求
}).catch(err => {
console.log(err);
})
this.$router.push({name: 'login'});
},
// 首页跳转 // 首页跳转
go() { go() {
console.log(this.sidebar.path) console.log(this.sidebar.path)
......
...@@ -116,7 +116,7 @@ export default { ...@@ -116,7 +116,7 @@ export default {
this.allData = res.data.rows; this.allData = res.data.rows;
this.totleLength = res.data.total; this.totleLength = res.data.total;
}).catch(err => { }).catch(err => {
this.$message.error('数据请求失败!'); console.log(err);
}) })
}, },
// 搜索栏 // 搜索栏
......
...@@ -140,7 +140,7 @@ export default { ...@@ -140,7 +140,7 @@ export default {
this.$message.error(res.data.msg); this.$message.error(res.data.msg);
} }
}).catch(err => { }).catch(err => {
this.$message.error('数据请求失败!'); console.log(err);
}) })
} }
} else { } else {
......
...@@ -49,7 +49,7 @@ export default { ...@@ -49,7 +49,7 @@ export default {
this.$message.error(res.data.msg); this.$message.error(res.data.msg);
} }
}).catch(err => { }).catch(err => {
this.$message.error('用户登录失败'); console.log(err);
}) })
} }
}, },
......
...@@ -136,7 +136,7 @@ export default { ...@@ -136,7 +136,7 @@ export default {
this.$message.error(res.data.msg); this.$message.error(res.data.msg);
} }
}).catch(err => { }).catch(err => {
this.$message.error('数据请求失败!'); console.log(err);
}) })
} }
} }
......
...@@ -182,7 +182,7 @@ export default { ...@@ -182,7 +182,7 @@ export default {
this.$message.error(res.data.msg); this.$message.error(res.data.msg);
} }
}).catch(err => { }).catch(err => {
this.$message.error('文件上传失败!'); console.log(err);
}) })
}, },
// 时间转换 // 时间转换
......
...@@ -107,7 +107,7 @@ export default { ...@@ -107,7 +107,7 @@ export default {
this.$message.error(res.data.msg); this.$message.error(res.data.msg);
} }
}).catch(err => { }).catch(err => {
this.$message.error('数据请求失败!'); console.log(err);
}) })
}, },
// 搜索 // 搜索
......
...@@ -100,10 +100,10 @@ export default { ...@@ -100,10 +100,10 @@ export default {
item.time = this.timeC(item.time) item.time = this.timeC(item.time)
} }
} else { } else {
this.$message.error(res.data.msg); this.$message.error(res.data.msg);
} }
}).catch(err => { }).catch(err => {
this.$message.error('数据请求失败!'); console.log(err);
}) })
}, },
// 搜索 // 搜索
......
...@@ -378,7 +378,7 @@ export default { ...@@ -378,7 +378,7 @@ export default {
}) })
}) })
}).catch(err => { }).catch(err => {
this.$message.error('数据请求失败!'); console.log(err);
}) })
let arr = [5, 4, 8, 3]; let arr = [5, 4, 8, 3];
arr.map(item => { arr.map(item => {
...@@ -523,7 +523,7 @@ export default { ...@@ -523,7 +523,7 @@ export default {
} }
}).catch(err => { }).catch(err => {
this.errorData(); this.errorData();
this.$message.error('项目新增失败!'); console.log(err);
}) })
} else { } else {
this.errorData(); this.errorData();
...@@ -770,4 +770,4 @@ export default { ...@@ -770,4 +770,4 @@ export default {
.projectAdd .content>>>.el-scrollbar__wrap { .projectAdd .content>>>.el-scrollbar__wrap {
overflow-x: hidden; overflow-x: hidden;
} }
</style> </style>
\ No newline at end of file
...@@ -133,7 +133,7 @@ export default { ...@@ -133,7 +133,7 @@ export default {
this.$message.error(res.data.msg); this.$message.error(res.data.msg);
} }
}).catch(err => { }).catch(err => {
this.$message.error('数据请求失败!'); console.log(err);
}) })
} else { } else {
this.$server.PostProjectSearch(val).then((res) => { // 数据请求 this.$server.PostProjectSearch(val).then((res) => { // 数据请求
...@@ -148,10 +148,10 @@ export default { ...@@ -148,10 +148,10 @@ export default {
item.schedule = item.processMap.actual === 0 ? '新建' : item.processMap.actual === 1 ? '需求调研阶段' :item.processMap.actual === 2 ? '开发阶段' : item.processMap.actual === 3 ? '试运行阶段' : item.processMap.actual === 4 ? '终验' : ''; item.schedule = item.processMap.actual === 0 ? '新建' : item.processMap.actual === 1 ? '需求调研阶段' :item.processMap.actual === 2 ? '开发阶段' : item.processMap.actual === 3 ? '试运行阶段' : item.processMap.actual === 4 ? '终验' : '';
} }
} else { } else {
this.$message.error(res.data.msg); this.$message.error(res.data.msg);
} }
}).catch(err => { }).catch(err => {
this.$message.error('数据请求失败!'); console.log(err);
}) })
} }
......
...@@ -189,7 +189,7 @@ export default { ...@@ -189,7 +189,7 @@ export default {
this.$message.error(res.data.msg); this.$message.error(res.data.msg);
} }
}).catch(err => { }).catch(err => {
this.$message.error('数据请求失败!'); console.log(err);
}) })
},30) },30)
}, },
......
...@@ -109,7 +109,7 @@ export default { ...@@ -109,7 +109,7 @@ export default {
this.$message.error(res.data.msg); this.$message.error(res.data.msg);
} }
}).catch(err => { }).catch(err => {
this.$message.error('数据请求失败!'); console.log(err);
}) })
}, },
// 搜索 // 搜索
......
...@@ -99,7 +99,7 @@ export default { ...@@ -99,7 +99,7 @@ export default {
this.$message.error(res.data.msg); this.$message.error(res.data.msg);
} }
}).catch(err => { }).catch(err => {
this.$message.error('数据请求失败!'); console.log(err);
}) })
} }
}, },
......
...@@ -6,23 +6,21 @@ ...@@ -6,23 +6,21 @@
<p class="search"> <p class="search">
<span class="searchVal"> <span class="searchVal">
<!-- <span>关键技术:</span> --> <!-- <span>关键技术:</span> -->
<el-select v-model="input3" size="medium" placeholder="请选择关键技术"> <el-select v-model="input3" size="medium" placeholder="请选择关键技术" @change="search" clearable>
<el-option <el-option
v-for="item in keyNameList" v-for="item in keyNameList"
:key="item.id" :key="item.id"
:label="item.technologyName" :label="item.technologyName"
:value="item.technologyName"> :value="item.technologyName">
</el-option> </el-option>
</el-select> </el-select>
</span> </span>
<span class="searchVal"> <span class="searchVal">
<span>查询:</span> <span>查询:</span>
<el-input v-model="input2" size="medium" placeholder="请输入关键字"></el-input> <el-input v-model="input2" size="medium" placeholder="请输入关键字" @change="search"></el-input>
</span> </span>
<span class="searchVal" style="margin-left:30px;"> <span class="searchVal" style="margin-left:30px;width: 260px;">
<!-- <span>查询:</span> --> <el-input v-model="input1" size="medium" placeholder="请输入范围" @change="search"></el-input>
<el-input v-model="input1" size="medium" placeholder="请输入范围"></el-input>
</span> </span>
<span class="button searchBtn" @click="search">搜索</span> <span class="button searchBtn" @click="search">搜索</span>
<span class="button add" @click="addRole"><img src="../../assets/img/add.png"></span> <span class="button add" @click="addRole"><img src="../../assets/img/add.png"></span>
...@@ -90,8 +88,8 @@ export default { ...@@ -90,8 +88,8 @@ export default {
name: 'roleDispose', name: 'roleDispose',
data () { data () {
return { return {
searchKey:'', searchKey:'',
input3:'', input3:'',
input2: '', input2: '',
input1: '', input1: '',
suffix:'', suffix:'',
...@@ -112,7 +110,7 @@ export default { ...@@ -112,7 +110,7 @@ export default {
console.log(res) console.log(res)
this.allList = res.data this.allList = res.data
}).catch(err => { }).catch(err => {
this.$message.error('数据请求失败!'); console.log(err);
}) })
this.search(); this.search();
this.keyName() this.keyName()
...@@ -127,20 +125,11 @@ export default { ...@@ -127,20 +125,11 @@ export default {
}, },
search () { search () {
let obj = { let obj = {
technologyName:this.input3, technologyName:this.input3,
target:this.input2, target:this.input2,
suffix:this.input1, suffix:this.input1,
} }
// if(this.searchKey == 'suffix'){
// obj.suffix = this.input2
// }else if (this.searchKey == 'technologyName'){
// obj.technologyName = this.input2
// }else if (this.searchKey == 'target'){
// obj.target = this.input2
// }
this.$server.getConfigPageList(this.myPage,this.pageSize,obj).then(res => { this.$server.getConfigPageList(this.myPage,this.pageSize,obj).then(res => {
console.log(res) console.log(res)
this.tableData = res.data.rows; this.tableData = res.data.rows;
...@@ -244,7 +233,6 @@ export default { ...@@ -244,7 +233,6 @@ export default {
line-height: 34px; line-height: 34px;
} }
.roleDispose .content .searchVal:nth-child(2)>span{ .roleDispose .content .searchVal:nth-child(2)>span{
width: 150px;
margin-left: 20px; margin-left: 20px;
text-align: right; text-align: right;
} }
......
...@@ -2,6 +2,9 @@ import axios from 'axios'; ...@@ -2,6 +2,9 @@ import axios from 'axios';
// import Qs from 'qs'; // import Qs from 'qs';
import baseUrl from '../../config'; import baseUrl from '../../config';
import store from '../store'; import store from '../store';
import router from '../router/index';
import Vue from 'vue'
let v = new Vue();
// axios.defaults.withCredentials = true; // axios.defaults.withCredentials = true;
// 添加请求拦截器 // 添加请求拦截器
axios.interceptors.request.use(function (config) { axios.interceptors.request.use(function (config) {
...@@ -23,7 +26,20 @@ axios.interceptors.request.use(function (config) { ...@@ -23,7 +26,20 @@ axios.interceptors.request.use(function (config) {
// 添加响应拦截器 // 添加响应拦截器
axios.interceptors.response.use(function (response) { axios.interceptors.response.use(function (response) {
return response; console.log(response.data)
if (response.data.code === 403) {
v.$message.error(response.data.msg);
setTimeout(function () {
router.push({name: 'login'})
}, 500)
} else if (response.data.code === 400) {
v.$message.error(response.data.msg);
setTimeout(function () {
router.push({name: 'login'})
}, 500)
} else {
return response;
}
}, function (error) { }, function (error) {
// 预处理响应错误(error) // 预处理响应错误(error)
// alert(error); // alert(error);
......
...@@ -12,6 +12,11 @@ import axios from '@/services/axios'; ...@@ -12,6 +12,11 @@ import axios from '@/services/axios';
import qs from 'qs'; import qs from 'qs';
const assess = 'http://120.55.57.35:8079' const assess = 'http://120.55.57.35:8079'
const server = { const server = {
getloginOut(id) { // 用户退出
return axios('/user/loginOut/' + id, {
method: 'get'
});
},
getfindAll() { // 获取权限列表 getfindAll() { // 获取权限列表
return axios('/authority/findAll', { return axios('/authority/findAll', {
method: 'get' method: 'get'
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论