Commit 3ea770e0 authored by suntao's avatar suntao

删除不要的文件

parent 844b936d
......@@ -71,10 +71,6 @@
</style>
<template>
<main class="main-container">
<!-- <div class="top-notice">-->
<!-- <a @click="toggleMenu" class="fl"><i class="v2 icon-toggle-menu" :class="{'v2-slidebar-packup':!menuIsFold,'v2-slidebar-packup-copy':menuIsFold}"></i></a>-->
<!-- <span class="icon-notice fl"><i class="v2 v2-announcement"></i>公告:</span>-->
<!-- </div>-->
<div class="sdp-container-scroll">
<div class="content-container height100">
<router-view></router-view>
......
......@@ -258,14 +258,13 @@
<script>
// import {getChannels, getChannelDetail, saveChannelBaseConf} from '@/apis/channel'
import Pagination from '@/components/Pagination'
import {getChannels, getChannelDetail, saveChannelBaseConf, getStaticElement, saveApplyCheckConf, saveApplyPrivilegeConf ,
saveCallbackConf, saveRsaConf, refreshCache} from '../../apis/channel'
export default {
components: { Pagination },
data() {
return {
listQuery: {
......@@ -360,6 +359,7 @@
callbackInfo: {},
rsa: {}
}
// 如果编辑之后,checkedItemsResultVO 是有值的,会和页面绑定数据
this.checkedItemsResultVO.value = []
},
handleUpdate(data) {
......@@ -378,29 +378,30 @@
for (let index in this.channel.importCheckInfo.checkedItemsResult) {
let item = this.channel.importCheckInfo.checkedItemsResult[index]
if (item.point === selected) {
// 联动 下拉框和 用户的值
this.checkedItemsResultVO.value = item.checkedItems
isCleanData = false
break
}
}
if (isCleanData) {
// 说明 下拉选择的 该用户没有配置,清除
// 说明 下拉选择的 该用户没有配置,清除checkedItemsResultVO 的值
this.checkedItemsResultVO.value = []
}
} else {
this.checkedItemsResultVO.value = []
}
},
getChannelDetail(that, data) {
getChannelDetail(_this, data) {
getChannelDetail(data).then(rep => {
if (rep.data) {
that.channel = rep.data
_this.channel = rep.data
if (rep.data && rep.data.importCheckInfo && rep.data.importCheckInfo.checkedItemsResult.length > 0) {
that.channel.importCheckInfo.checkedItemsResult = rep.data.importCheckInfo.checkedItemsResult;
_this.channel.importCheckInfo.checkedItemsResult = rep.data.importCheckInfo.checkedItemsResult;
// 说明有数据
let def = rep.data.importCheckInfo.checkedItemsResult[0];
that.checkedItemsResultVO.point = def.point
that.checkedItemsResultVO.value = def.checkedItems
_this.checkedItemsResultVO.point = def.point
_this.checkedItemsResultVO.value = def.checkedItems
}
}
})
......@@ -417,7 +418,6 @@
})
},
handleSaveApplyCheckConf() {
console.log("saveApplyCheckConf")
// 保存进件项配置
if (this.checkedItemsResultVO) {
if(this.channel.importCheckInfo.checkedItemsResult) {
......@@ -491,39 +491,26 @@
this.$options.methods.hiddenTabAll(this)
}
},
showTabAll(that, excludeTab) {
let tabs = that.$refs.myTab.$children[0].$refs.tabs
showTabAll(_this, excludeTab) {
let tabs = _this.$refs.myTab.$children[0].$refs.tabs
for (let i = 0; i < tabs.length; i++) {
if (tabs[i].innerHTML != excludeTab) {
// 刷新缓存tab 在新建和 查询是 不显示
tabs[i].style.display = ''
}
}
// 默认让基础信息配置也显示
// 默认让基础信息配置页 选中
tabs[1].click()
},
hiddenTabAll(that) {
let tabs = that.$refs.myTab.$children[0].$refs.tabs
hiddenTabAll(_this) {
let tabs = _this.$refs.myTab.$children[0].$refs.tabs
for (let i = 0; i < tabs.length; i++) {
tabs[i].style.display = 'none'
}
},
//
// savevData() {
// if (this.roles.includes('channel')) {
// this.channel.basicInfo = { channelId: this.channel.basicInfo.channelId }
// }
// saveChannel(this.channel).then(() => {
// this.$notify({
// title: '成功',
// message: '保存成功',
// type: 'success',
// duration: 1000
// })
// this.handleCurrentChange(this.channel.basicInfo)
// this.getChannels()
// })
// }
},
actions:{
}
}
......
......@@ -128,7 +128,8 @@
export default {
data() {
return {
username: this.$store.getters.username
// username: this.$store.getters.username
username: this.$store.state.login.username
}
},
computed: mapGetters([
......
<style scoped>
.login-container {
position: fixed;
height: 100%;
width: 100%;
/*background-color: rgba(42, 53, 70, 0.85);*/
}
.login {
margin-top: 10%;
}
.login-form {
/*border: 1px solid rgba(127, 125, 125, 0.41);*/
border-radius: 4px;
transition: .2s;
padding: 16px;
color: rgba(241, 250, 247, 0.05);
}
.login-button {
margin-left: 43%;
/*text-align: center;*/
width: 20%;
}
.text-content {
/*color: #e0e1e2;*/
}
.font-color .el-form-item__label {
color: #e0e1e2;
}
/*.input-color .el-input__inner {*/
/* background-color: #2d3a4b;*/
/*}*/
/*.el-input__inner[SuccessColor="success"] {*/
/* background-color: #67C23A; //绿色*/
/*}*/
</style>
<template>
<div class="login-container">
<div class="login">
<el-row>
<el-col :span="10">&nbsp;</el-col>
<el-col :span="8"><h1 class="text-content">KA后台管理系统</h1></el-col>
</el-row>
<el-row>
<el-col :span="8">&nbsp;</el-col>
<el-col :span="8" class="login-form">
<el-form :model="user" :rules="rules" ref="loginForm" label-width="100px" label-suffix=":">
<el-form-item class="font-color" label="用户名" prop="name">
<el-input class="input-color" v-model="user.name" auto-complete="on" placeholder="username"></el-input>
</el-form-item>
<el-form-item class="font-color" label="密码" prop="pass">
<span class="svg-container">
<svg-icon icon-class="password"/>
</span>
<el-input class="input-color" type="password" v-model="user.pass" auto-complete="on"
placeholder="password"></el-input>
</el-form-item>
</el-form>
<el-form>
<el-form-item>
<el-button class="login-button" type="primary" @click="login('loginForm')">登录</el-button>
</el-form-item>
</el-form>
</el-col>
</el-row>
</div>
</div>
</template>
<script>
import {mapGetters} from 'vuex'
// import {login} from '../../apis/login'
export default {
data() {
let checkName = (rule, value, callback) => {
if (!value) {
return callback(new Error('用户名不能为空'));
}
setTimeout(() => {
if (!value) {
callback(new Error('用户名不能为空'));
} else {
callback();
}
}, 1000);
};
return {
user: {
name: '',
pass: ''
},
rules: {
name: [
{required: true, message: '请输入用户名,用户名不能为空', trigger: 'blur'},
{validator: checkName, trigger: 'blur'}
],
pass: [
{required: true, message: '请输入密码', trigger: 'blur'},
{min: 3, max: 15, message: '长度为 3~15 个字符', trigger: 'blur'}
]
}
};
},
computed: mapGetters([
'tokens'
]),
watch: {
tokens: function (val) {
this.$router.push('/home/channels');
}
},
methods: {
login(formName) {
this.$refs[formName].validate((valid) => {
if (valid) {
this.$store.dispatch('login', {name: this.user.name, pass: this.user.pass})
} else {
return false;
}
});
}
}
}
</script>
/**
* Created by lichb on 2017/2/7.
*/
import {LOGIN_IN, LOGIN_OUT} from '../mutation-types'
import tokens from '@/apis/tokens'
import {getToken,setToken ,removeToken} from '@/utils/auth'
// initial state
const state = {
tokens: '',
username:''
}
// getters
const getters = {
tokens: state => state.tokens,
username: state => state.username
}
//actions
const actions = {
login({commit, state}, user){
// tokens.getTokens(user.name, user.pass).then((data) => {
tokens.getTokens(user.username, user.password).then((data) => {
//success
commit(LOGIN_IN, {data: data.data})
setToken(data.data.toke)
}, (error) => {
//fail
commit(LOGIN_IN, {data: ''})
removeToken()
})
},
logout({commit}){
commit(LOGIN_OUT)
removeToken()
}
}
//mutations
const mutations = {
[LOGIN_IN] (state, {data}) {
if (data) {
console.log(data)
state.tokens = data.toke,
state.username = data.username
}
},
[LOGIN_OUT] (state) {
state.tokens = ''
}
}
//export
export default {
state,
getters,
actions,
mutations
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment