Commit e66ecafc by jack

test 部署

1 parent d74ed360
......@@ -16,4 +16,4 @@ VUE_APP_ELEMENT_COLOR=#409EFF
VUE_APP_MAIN_COLOR=#3D6FE4
VUE_APP_STORAGE_PREFIX=tfims
\ No newline at end of file
VUE_APP_STORAGE_PREFIX=operation
\ No newline at end of file
......@@ -72,15 +72,13 @@ export default function $axios(options) {
response => {
let data;
// Util.closeLoading();
console.log(response)
console.log('sdjdwww')
// IE9时response.data是undefined,因此需要使用response.request.responseText(Stringify后的字符串)
if (response) {
if (response.data == undefined) {
let str = response.request.responseText;
//判断未登录,未登录,后台会发送请求,返回一个html页面
if (str.indexOf('广联赛讯运营平台') >= 0) {
if (str.indexOf('!DOCTYPE') >= 0) {
window.location.href = "http://sso.glsx.com.cn/#/login"
return false;
}
......@@ -145,7 +143,6 @@ export default function $axios(options) {
//alert(JSON.stringify(err));
// Util.closeLoading();
console.log(err);
if (err && err.response) {
switch (err.response.status) {
......
......@@ -495,11 +495,33 @@ export const EXPORTDEVICERESETRECORD = BASEURL + 'deviceInfo/exportDeviceResetRe
//设备管理-导出设备
export const EXPORTDEVICECODE = BASEURL + 'deviceInfo/exportDeviceCode';
//设备管理-导入模板-校验模板
export const PREDEVICEIMPORT = BASEURL + 'deviceInfo/preDeviceImport';
//设备管理-导入模板-文件数据上传
export const DEVICEIMPORT = params => {
return axios({
url: 'deviceInfo/deviceImport',
method: 'post',
data: params
})
}
//日志管理-excel导出记录-列表
export const PAGETASKRECORDREPORT = params => {
return axios({
url: 'taskReport/pageTaskRecordReport',
method: 'POST',
data:params
data: params
})
}
//退出登录
export const LOGOUT = params => {
return axios({
url: '/cas/logout',
method: 'GET',
data: params
})
}
\ No newline at end of file
......@@ -9,7 +9,13 @@
</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>-->
<div v-popover:popover-personal class="d2-mr personal-wrap">
<div class="top_user_info">
<el-avatar icon="el-icon-user-solid" size="small"></el-avatar>
<span class="title">{{user && user.userName ? decodeURI(user.userName) : '未登录'}}</span>
<el-divider direction="vertical"></el-divider>
<el-link type="primary" @click="logout">退出</el-link>
</div>
<!-- <div v-popover:popover-personal class="d2-mr personal-wrap">
<span class="btn-text">
{{user && user.userName ? decodeURI(user.userName) : '未登录'}}
<d2-el-icon name="caret-bottom" />
......@@ -17,20 +23,21 @@
<el-popover ref="popover-personal" placement="bottom-end" trigger="hover">
<personal-panel :user="info"></personal-panel>
</el-popover>
</div>
</div>-->
</div>
</template>
<script>
import { mapState } from 'vuex'
import PersonalPanel from '../personal-panel'
import axios from '@/http/api'
export default {
components: {
PersonalPanel,
},
data() {
return {
user:{}
user: {},
}
},
mounted() {
......@@ -39,15 +46,38 @@ export default {
? JSON.parse(sessionStorage.getItem('merchantInfo'))
: {}
this.user = user
},
computed: {
...mapState('d2admin/user', ['info']),
},
methods: {
/**退出登录 */
logout: function () {
let oParams = {}
oParams.service = 'http://sc.glsx.com.cn/admin-supplychain/'
axios({
url: 'http://sso.glsx.com.cn/cas/logout',
method: 'GET',
data: oParams,
}).then((res) => {
console.log(res)
window.location.href = 'http://sso.glsx.com.cn/#/login'
})
},
},
}
</script>
<style lang="scss" scoped>
.personal-wrap {
transform: translateY(-3px);
}
.top_user_info {
display: flex;
align-items: center;
font-size: 14px;
padding: 0 20px 0 0;
.title {
margin: 0 0px 0 10px;
}
}
</style>
......@@ -14,19 +14,19 @@
<div class="name-role">
<span class="sender"> - </span>
</div>
<div class="registe-info">
<!-- <div class="registe-info">
<span class="registe-info">
<d2-el-icon name="time" />
有效期:<span v-text="user.validTime || '未知' "></span>
</span>
</div>
</div> -->
</div>
<!-- <div class="personal-relation">
<span class="relation-item">followers</span>
<span class="relation-item">watches</span>
<span class="relation-item">friends</span>
</div>-->
<div class="main-operation">
<!-- <div class="main-operation">
<span class="main-operation-item">
<el-button
size="small"
......@@ -41,8 +41,8 @@
@click="passwordVisible = true"
> 修改密码</el-button>
</span>
</div>
<div
</div> -->
<!-- <div
class="other-operation"
@click="clear"
>
......@@ -50,12 +50,12 @@
<d2-el-icon name="delete" />
清空本地缓存
</div>
</div>
</div> -->
<div
class="personal-footer"
@click="logOut"
>
<el-button type="text">
<el-button type="text" @click="logout">
<d2-el-icon name="switch-button" /> 退出
</el-button>
</div>
......@@ -74,6 +74,8 @@
<script>
import { mapState, mapActions } from 'vuex'
import { Message, MessageBox } from 'element-ui'
import {LOGOUT} from '@/http/interface'
import axios from '@/http/api'
export default {
name: 'PersonalPanel',
props: {
......@@ -172,7 +174,22 @@ export default {
reject(new Error('错误'))
})
})
},
/**退出登录 */
logout:function(){
let oParams = {};
oParams.service = 'http://sc.glsx.com.cn/admin-supplychain/'
axios({
url:'http://sso.glsx.com.cn/cas/logout',
method:'GET',
data:oParams
}).then(res => {
console.log(res);
window.location.href = "http://sso.glsx.com.cn/#/login"
})
}
}
}
</script>
......
......@@ -61,7 +61,7 @@
</el-table-column>
<el-table-column prop="createdDate" label="操作" align="center">
<template slot-scope="scope">
<el-link type="primary" :underline="false" @click="openDialog()">入库</el-link>
<el-link type="primary" :underline="false" @click="openDialog(scope.row)">入库</el-link>
<el-link type="danger" :underline="false" @click="deleteDevice(scope.row)">删除</el-link>
</template>
</el-table-column>
......@@ -92,7 +92,9 @@
<a :href="UNSTOCKDOWNLOADTEMPLATE" target="_blank">下载导入设备模版</a>", 并填写导入信息
</h2>
<h3 class="h3">*请先选择是否虚拟设备</h3>
<div class=""><el-checkbox v-model="uploadForm.isOnlyimsi">虚拟设备</el-checkbox></div>
<div class>
<el-checkbox v-model="uploadForm.isOnlyimsi">虚拟设备</el-checkbox>
</div>
<div class="upload_cell">
<span class="name">导入设备:</span>
<div class="content">
......@@ -100,7 +102,7 @@
<el-upload
class="upload-demo"
ref="upload"
:action="PREDEVICEFILEUNSTOCKIMPORT"
:action="PREDEVICEIMPORT"
multiple
:limit="1"
:data="uploadForm"
......@@ -113,19 +115,21 @@
</el-upload>
</div>
</div>
<div class="upload_cell cell_center" v-if="uploadError.totalCount || uploadError.totalCount==0">
<div
class="upload_cell cell_center"
v-if="uploadError.totalCount || uploadError.totalCount==0"
>
<span>检验成功{{uploadError.successCount}}条,失败{{uploadError.failCount}}条</span>
<span>请下载</span>
<a :href="uploadError.url" target="_blank">导出失败列表</a>
<span v-if="uploadError.url">请下载</span>
<a :href="uploadError.url" target="_blank" v-if="uploadError.url">导出失败列表</a>
</div>
</div>
<div slot="footer" class="btn_group">
<el-button type="success" @click="uploadInfoToServer">导入</el-button>
<el-button type="success" @click="uploadInfoToServer" :loading="fileLoading">导入</el-button>
<el-button @click="closePopup">取消</el-button>
</div>
</glsx-dialog>
<!-- 弹框 end -->
</d2-container>
</template>
......@@ -136,7 +140,8 @@ import {
INSERTANDUPDATEDEVICE,
EXPORTDEVICECODE,
UNSTOCKDOWNLOADTEMPLATE,
PREDEVICEFILEUNSTOCKIMPORT
PREDEVICEIMPORT,
DEVICEIMPORT
} from '@/http/interface'
import addDevice from './addDevice'
import { exportExcel } from '@/common/common'
......@@ -145,7 +150,7 @@ export default {
name: 'fimsTable3',
components: {
'add-device': addDevice,
'glsx-dialog': GlsxDialog
'glsx-dialog': GlsxDialog,
},
data() {
return {
......@@ -166,11 +171,13 @@ export default {
deviceTypeList: [],
exportLoading: false,
addShow: false,
showDialog:false,
uploadForm:{},
uploadFile:{},
uploadError:{},
PREDEVICEFILEUNSTOCKIMPORT:PREDEVICEFILEUNSTOCKIMPORT
showDialog: false,
uploadForm: {isOnlyimsi:false},
uploadFile: {},
uploadError: {},
PREDEVICEIMPORT: PREDEVICEIMPORT,
UNSTOCKDOWNLOADTEMPLATE: UNSTOCKDOWNLOADTEMPLATE,
fileLoading:false
}
},
created() {},
......@@ -178,7 +185,6 @@ export default {
mounted: function () {
this.getList()
this.getDeviceList()
},
methods: {
/**
......@@ -191,7 +197,7 @@ export default {
_this.tableLoading = true
GETLISTDEVICECODE(oParams).then((res) => {
_this.tableLoading = false
console.log(res);
console.log(res)
if (res.returnCode == 0) {
const { data } = res
const { total, list } = data
......@@ -288,8 +294,8 @@ export default {
exportExcel: function () {
let _this = this
let options = {}
let _obj = this.formInline;
options.url = EXPORTDEVICECODE;
let _obj = this.formInline
options.url = EXPORTDEVICECODE
if (_obj.typeId) {
options.url = EXPORTDEVICECODE + '?typeId=' + _obj.typeId
}
......@@ -302,8 +308,10 @@ export default {
},
/**入库 */
openDialog: function () {
openDialog: function (row) {
console.log(row)
this.showDialog = true
this.uploadForm.deviceCode = row.deviceCode
//this.getDeviceList()
},
......@@ -315,27 +323,43 @@ export default {
/**监听文件上传成功 */
uploadSuccess: function (res, file, fileList) {
console.log(res)
let Util = this.$Util
//this.$refs.upload.submit();
let o = res.data || []
let m = o[0] || {}
if (m.isImported == 2 || m.isImported == 3 || m.isImported == 4) {
Util.Info({
message: m.cause,
})
return false
}
if (m.url) {
if (m.isImported == 1 || m.isImported == 0) {
console.log('jjjjjjjj')
this.uploadError = m
this.fileInfo = m.msg
this.$refs.upload.clearFiles()
this.uploadError = m;
return false
}
this.fileInfo = m.msg
// if (m.url) {
// this.$refs.upload.clearFiles()
// this.uploadError = m
// return false
// }
// this.fileInfo = m.msg
},
/**手动上传文件 */
uploadInfoToServer: function () {
let _this = this;
let o = this.fileInfo
if (!o) {
return false
}
let oParams = JSON.parse(o)
DEVICEIMEISTOKEIMPORT(oParams).then((res) => {
_this.fileLoading = true;
DEVICEIMPORT(oParams).then((res) => {
_this.fileLoading = false;
console.log(res)
})
},
......@@ -345,8 +369,7 @@ export default {
this.$refs.upload.clearFiles()
this.uploadFile = {}
this.showDialog = false
}
},
},
}
</script>
......@@ -363,16 +386,16 @@ export default {
color: #337ab7;
}
}
.h3{
font-size:14px;
color:#f00;
font-weight:normal;
.h3 {
font-size: 14px;
color: #f00;
font-weight: normal;
}
}
.upload_cell {
display: flex;
align-items: center;
margin:10px 0;
margin: 10px 0;
.name {
width: 80px;
font-weight: bold;
......@@ -382,11 +405,11 @@ export default {
display: flex;
.a_input {
margin: 0 8px 0 0;
width:217px;
width: 217px;
}
}
}
.cell_center{
text-align:center;
.cell_center {
text-align: center;
}
</style>
......@@ -157,7 +157,7 @@
<!-- 表格区域 end -->
<!-- 查看设备详情弹框区域 开始 -->
<glsx-dialog :show="showModal" title="设备详情">
<glsx-dialog :show="showModal" title="设备详情" @closed="closeModal" usefooter>
<div class="modal_box" v-loading="modalLoading" element-loading-text="数据加载中">
<h2 class="h2">出库详情</h2>
<table class="modal_tab">
......
......@@ -74,7 +74,7 @@
<div class="upload_cell">
<span class="name">硬件设备:</span>
<div class="content">
<el-select v-model="uploadForm.deviceCode">
<el-select v-model="uploadForm.deviceCode" filterable>
<el-option
v-for="item in deviceList"
:key="item.deviceCode"
......
......@@ -47,16 +47,16 @@ module.exports = {
warnings: false,
errors: true
},
// proxy: {
// '/admin-supplychain': {
// target: 'http://192.168.3.174:9040/admin-supplychain/',
// changeOrigin: true,
// ws: true,
// pathRewrite: {
// '^/admin-supplychain': ''
// }
// }
// }
proxy: {
'/admin-supplychain': {
target: 'http://qcwx.glsx.com.cn/admin-supplychain/',
changeOrigin: true,
ws: true,
pathRewrite: {
'^/admin-supplychain': ''
}
}
}
},
css: {
loaderOptions: {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!