Commit 12e7aafe authored by qinj's avatar qinj

Merge branch 'dev' of http://120.25.63.219:6088/rex/portalhtml into dev

parents 09e5716c b19b22c7
...@@ -38,7 +38,11 @@ const actions = { ...@@ -38,7 +38,11 @@ const actions = {
data.roles = ['admin'] data.roles = ['admin']
data.avatar = 'https://wpimg.wallstcn.com/f778738c-e4f8-4870-b634-56703b4acafe.gif' data.avatar = 'https://wpimg.wallstcn.com/f778738c-e4f8-4870-b634-56703b4acafe.gif'
commit('SET_TOKEN', data.ObjectID) commit('SET_TOKEN', data.ObjectID)
if (data.ExtIsFistTime_SDK) {
localStorage.setItem('CEINFO', JSON.stringify(data))
} else {
localStorage.setItem('USERINFO', JSON.stringify(data)) localStorage.setItem('USERINFO', JSON.stringify(data))
}
setToken(data.ObjectID) setToken(data.ObjectID)
resolve() resolve()
}).catch(error => { }).catch(error => {
......
...@@ -239,9 +239,11 @@ export default { ...@@ -239,9 +239,11 @@ export default {
}, },
methods: { methods: {
handleSubmit (data) { handleSubmit (data) {
data.extCustomerType_SDK = '121' const formData = this.$translateToC4CData(data)
formData.extCustomerType_SDK = '121'
console.log(formData)
// this.addBtnStart = true // this.addBtnStart = true
customerCreate(this.paramsToFormData(data)).then(res => { customerCreate(this.paramsToFormData(formData)).then(res => {
this.addBtnStart = true this.addBtnStart = true
this.objectId = res.results this.objectId = res.results
const objectID = res.results const objectID = res.results
...@@ -277,7 +279,7 @@ export default { ...@@ -277,7 +279,7 @@ export default {
<style lang="scss" scoped> <style lang="scss" scoped>
::v-deep .el-row--flex { ::v-deep .el-row--flex {
display: -webkit-box; display: -webkit-box;
.el-col-16 { .el-col-14 {
width: 90%; width: 90%;
} }
} }
......
...@@ -25,7 +25,7 @@ const tableConfig = { ...@@ -25,7 +25,7 @@ const tableConfig = {
// }, scope.row.ID) // }, scope.row.ID)
// } // }
// }, // },
ExtCustomerID_SDK: { ExtAgentID_SDK: {
label: '代理商编码', label: '代理商编码',
type: 'input' type: 'input'
}, },
......
...@@ -9,7 +9,7 @@ const tableConfig = { ...@@ -9,7 +9,7 @@ const tableConfig = {
align: 'center' align: 'center'
}, },
columns: { columns: {
ExtCustomerID_SDK: { ExtAgentID_SDK: {
label: '代理商编码', label: '代理商编码',
type: 'input' type: 'input'
}, },
......
...@@ -46,8 +46,8 @@ export default { ...@@ -46,8 +46,8 @@ export default {
}, },
methods: { methods: {
// 编辑 // 编辑
handleEdit() { handleEdit(row) {
console.log("编辑") console.log("编辑", row)
}, },
// 添加 // 添加
handleAdd() { handleAdd() {
......
...@@ -44,7 +44,7 @@ const tableConfig = { ...@@ -44,7 +44,7 @@ const tableConfig = {
// }, // },
}, },
columns: { columns: {
ExtCustomerID_SDK: { ExtAgentID_SDK: {
label: '代理商编码', label: '代理商编码',
type: 'input' type: 'input'
}, },
......
...@@ -9,7 +9,7 @@ const tableConfig = { ...@@ -9,7 +9,7 @@ const tableConfig = {
align: 'center' align: 'center'
}, },
columns: { columns: {
ExtCustomerID_SDK: { ExtAgentID_SDK: {
label: '代理商编码', label: '代理商编码',
type: 'input' type: 'input'
}, },
......
...@@ -47,8 +47,8 @@ export default { ...@@ -47,8 +47,8 @@ export default {
}, },
methods: { methods: {
// 编辑 // 编辑
handleEdit() { handleEdit(row) {
console.log("编辑") console.log("编辑", row)
}, },
// 添加 // 添加
handleAdd() { handleAdd() {
......
...@@ -94,6 +94,7 @@ ...@@ -94,6 +94,7 @@
// import { validUsername } from '@/utils/validate' // import { validUsername } from '@/utils/validate'
// import LangSelect from '@/components/LangSelect' // import LangSelect from '@/components/LangSelect'
// import SocialSign from './components/SocialSignin' // import SocialSign from './components/SocialSignin'
import path from 'path';
export default { export default {
name: 'Login', name: 'Login',
...@@ -180,10 +181,23 @@ export default { ...@@ -180,10 +181,23 @@ export default {
extPassword_SDK: this.loginForm.password extPassword_SDK: this.loginForm.password
} }
this.$store.dispatch('user/login', params) this.$store.dispatch('user/login', params)
.then(res => { .then(() => {
// if (JSON.parse(localStorage.getItem('CEINFO')).ExtIsFistTime_SDK) {
// this.$confirm('首次登入请修改密码', '提示', {
// confirmButtonText: '确定',
// type: 'warning'
// }).then(() => {
// let dataInfo = JSON.parse(localStorage.getItem('CEINFO'))
// localStorage.setItem('USERINFO', JSON.stringify(dataInfo))
// localStorage.setItem('CEINFO', '')
// this.$router.push({ path: '/changePass' , query: this.otherQuery })
// }).catch(() => {
// console.log('登入失败')
// });
// } else {
this.$router.push({ path: this.redirect || '/', query: this.otherQuery }) this.$router.push({ path: this.redirect || '/', query: this.otherQuery })
// }
this.loading = false this.loading = false
console.log(res)
}) })
.catch(() => { .catch(() => {
this.loading = false this.loading = false
...@@ -192,6 +206,7 @@ export default { ...@@ -192,6 +206,7 @@ export default {
console.log('error submit!!') console.log('error submit!!')
return false return false
} }
}) })
}, },
getOtherQuery(query) { getOtherQuery(query) {
......
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