-
+
- 同步默认订阅消息
-
-
-
-
-
-
-
-
- 未同步
- 同步
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
- 未同步
- 同步
-
-
-
-
-
-
+ name="work">
+
+
+
+
+
+
+
+
+
@@ -171,6 +168,7 @@
import CDialog from '@c/CDialog'
import CTable from '@c/CTable'
import config from "@/js/dai/config";
+import TempList from "./TempList";
import { requestPost } from "@/js/dai/request";
import { mapGetters } from 'vuex'
import { Loading } from 'element-ui' // 引入Loading服务
@@ -283,7 +281,7 @@ export default {
selCustomerId: '',
diaSubVisible: false,
activeName: 'resi',
- dataListLoading: false,
+
resiDataList: [],
workDataList: [],
resiTempIdList: [],//居民端未同步的模板数组
@@ -291,7 +289,7 @@ export default {
}
},
components: {
- CTable, CDialog
+ CTable, CDialog, TempList
},
activated () {
this.$nextTick(() => {
@@ -301,8 +299,8 @@ export default {
mounted () {
this.tableParams.source = this.env
- console.log("客户初始化列表------本地环境-----------------")
- console.log(this.env)
+
+
if (this.env === 'test') {//测试
this.workAppid = config.appId.testWorkAppid
this.resiAppid = config.appId.testResiAppid
@@ -314,10 +312,19 @@ export default {
this.resiAppid = config.appId.devResiAppid
}
+ console.log("工作端appId")
+ console.log(this.workAppid)
+ console.log("居民端appId")
+ console.log(this.resiAppid)
+
// eslint-disable-next-line
this.loadData()
},
computed: {
+ subTabHeight () {
+ return this.clientHeight * 0.57 / 2
+ },
+
tableHeight () {
return this.clientHeight - 60 - 80 - 80 - 50
},
@@ -416,84 +423,69 @@ export default {
this.resiDataList = []
this.workDataList = []
this.$nextTick(() => {
- this.loadSubscribeData(row.customerId) // 解决表格错位
+ this.selCustomerId = row.customerId
+
+ this.loadSubscribeData()
+
})
},
+
//加载列表数据
- async loadSubscribeData (customerId) {
- this.dataListLoading = true
- this.selCustomerId = customerId
- // const url = 'https://nei.netease.com/api/apimock-v2/e3b1d0eb88e905f6c7ee559b2d6bb7ad/third/subscribe/getcustomerlist',
+ async loadSubscribeData () {
+ this.$refs.temp_list_resi_has.setTableLoading()
+ this.$refs.temp_list_resi_no.setTableLoading()
+ this.$refs.temp_list_work_has.setTableLoading()
+ this.$refs.temp_list_work_no.setTableLoading()
+ // const url = 'https://nei.netease.com/api/apimock-v2/e3b1d0eb88e905f6c7ee559b2d6bb7ad/third/subscribe/getcustomerlist'
const url = 'https://epmet-cloud.elinkservice.cn/api/third/subscribe/getcustomerlist'
let params = {
- customerId: customerId,
- workAppId: this.workAppid,
+ customerId: this.selCustomerId,
resiAppId: this.resiAppid,
+ workAppId: this.workAppid
+ // sync: sync
}
const { data, code, msg, internalMsg } = await requestPost(url, params)
if (code === 0) {
- this.resiDataList = data.resiList
- this.workDataList = data.workList
- this.resiTempIdList = []
- this.workTempIdList = []
- this.resiDataList.forEach(element => {
+ let resiList = []
+ let resiList_sync = []
+ let resiList_sync_no = []
+
+ let workList = []
+ let workList_sync = []
+ let workList_sync_no = []
+
+
+ data.resiList.forEach(element => {
if (element.state === '0') {
- this.resiTempIdList.push(element.id)
+ resiList_sync_no.push(element)
+ } else {
+ resiList_sync.push(element)
}
-
})
- this.workDataList.forEach(element => {
+
+ data.workList.forEach(element => {
if (element.state === '0') {
- this.workTempIdList.push(element.id)
+ workList_sync_no.push(element)
+ } else {
+ workList_sync.push(element)
}
-
})
+ this.$refs.temp_list_resi_has.setTableData(resiList_sync, this.selCustomerId, this.resiAppid, this.workAppid)
+ this.$refs.temp_list_resi_no.setTableData(resiList_sync_no, this.selCustomerId, this.resiAppid, this.workAppid)
+ this.$refs.temp_list_work_has.setTableData(workList_sync, this.selCustomerId, this.resiAppid, this.workAppid)
+ this.$refs.temp_list_work_no.setTableData(workList_sync_no, this.selCustomerId, this.resiAppid, this.workAppid)
- } else {
- this.$message.error(msg + ":" + internalMsg)
- }
- this.dataListLoading = false
- },
-
- //同步客户的订阅消息为默认订阅消息
- async syncSubSure () {
- this.$confirm('确认同步客户的订阅消息为默认订阅消息', '提示', {
- confirmButtonText: '确定',
- cancelButtonText: '取消',
- type: 'warning'
- }).then(() => {
- this.syncSub()
- }).catch(() => {
-
- })
- },
- async syncSub () {
-
- this.startLoading()
- // const url = 'https://nei.netease.com/api/apimock-v2/e3b1d0eb88e905f6c7ee559b2d6bb7ad/third/subscribe/init'
- const url = 'https://epmet-cloud.elinkservice.cn/api/third/subscribe/init'
-
- let params = {
- customerId: this.selCustomerId,
- workAppId: this.workAppid,
- resiAppId: this.resiAppid,
- resiTempIdList: this.resiTempIdList,
- workTempIdList: this.workTempIdList,
- }
-
- const { data, code, msg, internalMsg } = await requestPost(url, params)
- if (code === 0) {
- this.$message.success('同步成功')
- this.loadSubscribeData(this.selCustomerId)
} else {
this.$message.error(msg + ":" + internalMsg)
}
- this.endLoading()
-
+ this.$refs.temp_list_resi_has.setTableLoading()
+ this.$refs.temp_list_resi_no.setTableLoading()
+ this.$refs.temp_list_work_has.setTableLoading()
+ this.$refs.temp_list_work_no.setTableLoading()
},
// 订阅消息窗口取消
@@ -518,9 +510,9 @@ export default {
}
}
-
diff --git a/epmet-oper-web/src/views/modules/customer/init/TempList.vue b/epmet-oper-web/src/views/modules/customer/init/TempList.vue
new file mode 100644
index 0000000..0e75ceb
--- /dev/null
+++ b/epmet-oper-web/src/views/modules/customer/init/TempList.vue
@@ -0,0 +1,268 @@
+
+
+
+
{{talbeTitle}}
+
{{btnName}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/epmet-oper-web/src/views/modules/customer/manage/CustomerInfo.vue b/epmet-oper-web/src/views/modules/customer/manage/CustomerInfo.vue
index 7fd33f7..ea7e907 100644
--- a/epmet-oper-web/src/views/modules/customer/manage/CustomerInfo.vue
+++ b/epmet-oper-web/src/views/modules/customer/manage/CustomerInfo.vue
@@ -315,11 +315,11 @@ export default {
},
showGender (key) {
if (key === '1') {
- return '女'
- } else if (key === '0') {
return '男'
- } else {
- return key
+ } else if (key === '2') {
+ return '女'
+ }else {
+ return '未知'
}
}
}
@@ -333,4 +333,4 @@ export default {
.btn_save {
margin: 0 50px;
}
-
\ No newline at end of file
+
diff --git a/epmet-oper-web/src/views/modules/customer/miniProAgent/MiniProList.vue b/epmet-oper-web/src/views/modules/customer/miniProAgent/MiniProList.vue
index 0c4ef74..3940efd 100644
--- a/epmet-oper-web/src/views/modules/customer/miniProAgent/MiniProList.vue
+++ b/epmet-oper-web/src/views/modules/customer/miniProAgent/MiniProList.vue
@@ -1,70 +1,71 @@
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 查询
-
-
-
-
-
-
+
-
+
+
-
+
-
+
-
+
-
+
+
+
diff --git a/epmet-oper-web/src/views/modules/customer/role.vue b/epmet-oper-web/src/views/modules/customer/role.vue
new file mode 100644
index 0000000..6f79e22
--- /dev/null
+++ b/epmet-oper-web/src/views/modules/customer/role.vue
@@ -0,0 +1,370 @@
+
+
+
+
+
+
+
+
+
+
+
+ {{scope.row.constName}}
+
+
+
+
+
+ 功能权限
+
+
+
+
+
+
+
+
+ 当前角色: {{roleName}}
+
+ 保存功能
+
+
+
+
+
+
+
+
+ 范围配置
+
+
+
+
+
+ 当前功能: {{funcName}}
+ 保存范围
+
+
+
+
+
+ {{scope.scopeName}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/epmet-oper-web/src/views/modules/productConfig/autoTest/autoTestList.vue b/epmet-oper-web/src/views/modules/productConfig/autoTest/autoTestList.vue
index a6045d3..f7d0fd7 100644
--- a/epmet-oper-web/src/views/modules/productConfig/autoTest/autoTestList.vue
+++ b/epmet-oper-web/src/views/modules/productConfig/autoTest/autoTestList.vue
@@ -156,8 +156,8 @@
label="账号"
header-align="center"
min-width="140">
-
-
+
+
-->
-
-
-
- ffffffffff
-
-
-
+
+
+
+
+
+
+
+
+ 取消返回
+
+
+
+
+ 设定核算单位天/日起止时间:
+
+
+ 至
+
+
+
+
+
+ 设定滞留超期时间:
+
+
+
+
+
+
+
+ /
+
+
+
+
+
+
+
+
+ 设定即将超期时间提醒:
+
+
+
+
+
+
+
+
+
+ 单位天
+
+
+
+ 统一定时消息推送时间:
+
+
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+ 议题发布前经网络员审核:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 待办事项发送短信通知:
+
+
+
+
+
+ 剩余短信数量:
+
+
+ 单位条
+
+
+
+
+
+
+
+
+
+
+
+
+ 新建小组进组需小组审核:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
diff --git a/epmet-oper-web/src/views/modules/productConfig/subscribe/MyTempList.vue b/epmet-oper-web/src/views/modules/productConfig/subscribe/MyTempList.vue
index e77675b..409897f 100644
--- a/epmet-oper-web/src/views/modules/productConfig/subscribe/MyTempList.vue
+++ b/epmet-oper-web/src/views/modules/productConfig/subscribe/MyTempList.vue
@@ -27,6 +27,9 @@
align="center"
width="150">
+ 同步
详情
@@ -58,7 +61,7 @@ export default {
data () {
return {
activeName: 'resi',
- appIdL: '',//父组件传来
+ appId: '',//父组件传来
// 列表相关
dataListLoading: false,
@@ -82,7 +85,6 @@ export default {
methods: {
doLayout () {
-
this.$nextTick(() => {
this.$refs['ref_table'].doLayout() // 解决表格错位
@@ -90,9 +92,7 @@ export default {
},
init (appId) {
-
this.appId = appId
-
this.loadData()
},
@@ -120,7 +120,37 @@ export default {
this.appId = appId
this.loadData()
},
+ //同步到所有客户
+ showSync (row) {
+ this.$confirm('确认同步模板到所有客户', '提示', {
+ confirmButtonText: '确定',
+ cancelButtonText: '取消',
+ type: 'warning'
+ }).then(() => {
+ this.syncToAll(row)
+ }).catch(() => {
+ })
+ },
+ async syncToAll (row) {
+ this.startLoading()
+ // const url = 'https://nei.netease.com/api/apimock-v2/e3b1d0eb88e905f6c7ee559b2d6bb7ad/third/subscribe/initall'
+ const url = 'https://epmet-cloud.elinkservice.cn/api/third/subscribe/initall'
+ const params = {
+ appId: this.appId,
+ tempId: row.priTmplId
+ }
+
+ const { data, code, msg, internalMsg } = await requestPost(url, params)
+ if (code === 0) {
+ this.$message.success('同步成功')
+ // this.loadData()
+
+ } else {
+ this.$message.error(msg + ":" + internalMsg)
+ }
+ this.endLoading()
+ },
// 详情
detailShow (row) {
this.$refs['ref_edit'].init(row)
diff --git a/epmet-oper-web/src/views/modules/productConfig/subscribe/TempEdit.vue b/epmet-oper-web/src/views/modules/productConfig/subscribe/TempEdit.vue
index 7fa2e73..1e2fe75 100644
--- a/epmet-oper-web/src/views/modules/productConfig/subscribe/TempEdit.vue
+++ b/epmet-oper-web/src/views/modules/productConfig/subscribe/TempEdit.vue
@@ -46,6 +46,11 @@
ref="dataForm"
:label-width="'120px'">
+
+ 同步到所有客户
+
+
-
\ No newline at end of file
diff --git a/epmet-oper-web/src/views/modules/customer/sys/calender-add-or-update.vue b/epmet-oper-web/src/views/modules/sys/calender-add-or-update.vue
similarity index 100%
rename from epmet-oper-web/src/views/modules/customer/sys/calender-add-or-update.vue
rename to epmet-oper-web/src/views/modules/sys/calender-add-or-update.vue
diff --git a/epmet-oper-web/src/views/modules/customer/sys/calender.vue b/epmet-oper-web/src/views/modules/sys/calender.vue
similarity index 100%
rename from epmet-oper-web/src/views/modules/customer/sys/calender.vue
rename to epmet-oper-web/src/views/modules/sys/calender.vue
diff --git a/epmet-oper-web/src/views/modules/customer/sys/dept-add-or-update.vue b/epmet-oper-web/src/views/modules/sys/dept-add-or-update.vue
similarity index 100%
rename from epmet-oper-web/src/views/modules/customer/sys/dept-add-or-update.vue
rename to epmet-oper-web/src/views/modules/sys/dept-add-or-update.vue
diff --git a/epmet-oper-web/src/views/modules/customer/sys/dept.vue b/epmet-oper-web/src/views/modules/sys/dept.vue
similarity index 100%
rename from epmet-oper-web/src/views/modules/customer/sys/dept.vue
rename to epmet-oper-web/src/views/modules/sys/dept.vue
diff --git a/epmet-oper-web/src/views/modules/customer/sys/dict-data-add-or-update.vue b/epmet-oper-web/src/views/modules/sys/dict-data-add-or-update.vue
similarity index 100%
rename from epmet-oper-web/src/views/modules/customer/sys/dict-data-add-or-update.vue
rename to epmet-oper-web/src/views/modules/sys/dict-data-add-or-update.vue
diff --git a/epmet-oper-web/src/views/modules/customer/sys/dict-data.vue b/epmet-oper-web/src/views/modules/sys/dict-data.vue
similarity index 100%
rename from epmet-oper-web/src/views/modules/customer/sys/dict-data.vue
rename to epmet-oper-web/src/views/modules/sys/dict-data.vue
diff --git a/epmet-oper-web/src/views/modules/customer/sys/dict-type-add-or-update.vue b/epmet-oper-web/src/views/modules/sys/dict-type-add-or-update.vue
similarity index 100%
rename from epmet-oper-web/src/views/modules/customer/sys/dict-type-add-or-update.vue
rename to epmet-oper-web/src/views/modules/sys/dict-type-add-or-update.vue
diff --git a/epmet-oper-web/src/views/modules/customer/sys/dict-type.vue b/epmet-oper-web/src/views/modules/sys/dict-type.vue
similarity index 100%
rename from epmet-oper-web/src/views/modules/customer/sys/dict-type.vue
rename to epmet-oper-web/src/views/modules/sys/dict-type.vue
diff --git a/epmet-oper-web/src/views/modules/customer/sys/log-error.vue b/epmet-oper-web/src/views/modules/sys/log-error.vue
similarity index 100%
rename from epmet-oper-web/src/views/modules/customer/sys/log-error.vue
rename to epmet-oper-web/src/views/modules/sys/log-error.vue
diff --git a/epmet-oper-web/src/views/modules/customer/sys/log-login.vue b/epmet-oper-web/src/views/modules/sys/log-login.vue
similarity index 100%
rename from epmet-oper-web/src/views/modules/customer/sys/log-login.vue
rename to epmet-oper-web/src/views/modules/sys/log-login.vue
diff --git a/epmet-oper-web/src/views/modules/customer/sys/log-operation.vue b/epmet-oper-web/src/views/modules/sys/log-operation.vue
similarity index 100%
rename from epmet-oper-web/src/views/modules/customer/sys/log-operation.vue
rename to epmet-oper-web/src/views/modules/sys/log-operation.vue
diff --git a/epmet-oper-web/src/views/modules/customer/sys/menu-add-or-update.vue b/epmet-oper-web/src/views/modules/sys/menu-add-or-update.vue
similarity index 100%
rename from epmet-oper-web/src/views/modules/customer/sys/menu-add-or-update.vue
rename to epmet-oper-web/src/views/modules/sys/menu-add-or-update.vue
diff --git a/epmet-oper-web/src/views/modules/customer/sys/menu.vue b/epmet-oper-web/src/views/modules/sys/menu.vue
similarity index 100%
rename from epmet-oper-web/src/views/modules/customer/sys/menu.vue
rename to epmet-oper-web/src/views/modules/sys/menu.vue
diff --git a/epmet-oper-web/src/views/modules/customer/sys/news-add-or-update.vue b/epmet-oper-web/src/views/modules/sys/news-add-or-update.vue
similarity index 100%
rename from epmet-oper-web/src/views/modules/customer/sys/news-add-or-update.vue
rename to epmet-oper-web/src/views/modules/sys/news-add-or-update.vue
diff --git a/epmet-oper-web/src/views/modules/customer/sys/news.vue b/epmet-oper-web/src/views/modules/sys/news.vue
similarity index 100%
rename from epmet-oper-web/src/views/modules/customer/sys/news.vue
rename to epmet-oper-web/src/views/modules/sys/news.vue
diff --git a/epmet-oper-web/src/views/modules/customer/sys/params-add-or-update.vue b/epmet-oper-web/src/views/modules/sys/params-add-or-update.vue
similarity index 100%
rename from epmet-oper-web/src/views/modules/customer/sys/params-add-or-update.vue
rename to epmet-oper-web/src/views/modules/sys/params-add-or-update.vue
diff --git a/epmet-oper-web/src/views/modules/customer/sys/params.vue b/epmet-oper-web/src/views/modules/sys/params.vue
similarity index 100%
rename from epmet-oper-web/src/views/modules/customer/sys/params.vue
rename to epmet-oper-web/src/views/modules/sys/params.vue
diff --git a/epmet-oper-web/src/views/modules/customer/sys/region-add-or-update.vue b/epmet-oper-web/src/views/modules/sys/region-add-or-update.vue
similarity index 100%
rename from epmet-oper-web/src/views/modules/customer/sys/region-add-or-update.vue
rename to epmet-oper-web/src/views/modules/sys/region-add-or-update.vue
diff --git a/epmet-oper-web/src/views/modules/customer/sys/region.vue b/epmet-oper-web/src/views/modules/sys/region.vue
similarity index 100%
rename from epmet-oper-web/src/views/modules/customer/sys/region.vue
rename to epmet-oper-web/src/views/modules/sys/region.vue
diff --git a/epmet-oper-web/src/views/modules/customer/sys/role-add-or-update.vue b/epmet-oper-web/src/views/modules/sys/role-add-or-update.vue
similarity index 100%
rename from epmet-oper-web/src/views/modules/customer/sys/role-add-or-update.vue
rename to epmet-oper-web/src/views/modules/sys/role-add-or-update.vue
diff --git a/epmet-oper-web/src/views/modules/customer/sys/role.vue b/epmet-oper-web/src/views/modules/sys/role.vue
similarity index 100%
rename from epmet-oper-web/src/views/modules/customer/sys/role.vue
rename to epmet-oper-web/src/views/modules/sys/role.vue
diff --git a/epmet-oper-web/src/views/modules/customer/sys/user-add-or-update.vue b/epmet-oper-web/src/views/modules/sys/user-add-or-update.vue
similarity index 100%
rename from epmet-oper-web/src/views/modules/customer/sys/user-add-or-update.vue
rename to epmet-oper-web/src/views/modules/sys/user-add-or-update.vue
diff --git a/epmet-oper-web/src/views/modules/customer/sys/user.vue b/epmet-oper-web/src/views/modules/sys/user.vue
similarity index 97%
rename from epmet-oper-web/src/views/modules/customer/sys/user.vue
rename to epmet-oper-web/src/views/modules/sys/user.vue
index 3d22f21..c17ce12 100644
--- a/epmet-oper-web/src/views/modules/customer/sys/user.vue
+++ b/epmet-oper-web/src/views/modules/sys/user.vue
@@ -56,7 +56,9 @@
header-align="center"
align="center">
- {{ scope.row.gender==='0'?'男':'女'}}
+ 男
+ 女
+ 保密
-
+
@@ -142,11 +142,14 @@ import debounce from 'lodash/debounce'
import { messages } from '@/i18n'
import { getUUID } from '@/utils'
import { Loading } from 'element-ui' // 引入Loading服务
+import JSEncrypt from 'jsencrypt'//引入加密
let loading // 加载动画
export default {
data () {
return {
+ pubKey: null, // 获取到公钥
+ isShowLogin: true,
i18nMessages: messages,
captchaPath: '',
dataForm: {
@@ -184,17 +187,39 @@ export default {
}
},
created () {
- this.getCaptcha()
+ //平阴联动平台 登陆
+ if (this.$route.query.platformToken) {
+ this.isShowLogin = false;
+ this.getAutoLogin(this.$route.query.platformToken)
+ }else{
+ this.getCaptcha()
+ //获取公钥
+ this.getPubKey()
+ }
+ },
+ mounted() {
+ localStorage.removeItem('showHeader');
},
methods: {
+ // 获取公钥
+ getPubKey() {
+ this.$http.post('/auth/govweb/getKey').then(({data: res}) => {
+ if (res.code !== 0) {
+ return this.$message.error(res.msg)
+ }
+
+ this.pubKey = res.data; // 获取到公钥;
+ }).catch(() => {
+ })
+ },
// 获取验证码
getCaptcha () {
this.dataForm.uuid = getUUID()
this.captchaPath = `${window.SITE_CONFIG['apiURL']}/auth/login/captcha?uuid=${this.dataForm.uuid}`
},
// 表单提交
- dataFormSubmitHandle () {
+ dataFormSubmitHandle() {
this.$refs['dataForm'].validate((valid, messageObj) => {
if (!valid) {
app.util.validateRule(messageObj)
@@ -206,41 +231,62 @@ export default {
phone: this.dataForm.phone
}
window.app.ajax.post(
- url, params,
- (data, rspMsg) => {
-
- if (data.length === 0) {//没有客户,提示无法登录
- this.$message.error('账号不存在')
- this.endLoading()
- } else if (data.length === 1) {
- this.selectCustomer(data[0])
- } else {
- this.endLoading()
- this.diaVisible = true
- this.$nextTick(() => {
- this.tableData = data
- })
- }
- },
- (rspMsg, data) => {
- this.endLoading()
- this.$message.error(rspMsg)
- })
+ url, params,
+ (data, rspMsg) => {
+ if (data.length === 0) {//没有客户,提示无法登录
+ this.$message.error('账号不存在')
+ this.endLoading()
+ } else if (data.length === 1) {
+ this.selectCustomer(data[0])
+ } else {
+ this.endLoading()
+ this.diaVisible = true
+ this.$nextTick(() => {
+ this.tableData = data
+ })
+ }
+ },
+ (rspMsg, data) => {
+ this.endLoading()
+ this.$message.error(rspMsg)
+ })
})
},
+ // 平阴联动 自动登录接口
+ getAutoLogin(platformToken) {
+ this.dataForm.thirdToken = platformToken;
+ this.dataForm.platform = "pyld";
+ this.$http.post(`/auth/sso/oper/third/login`, this.dataForm).then(({data: res}) => {
+ if (res.code !== 0) {
+ if (res.code == 8302) {
+ return this.$message.error(res.internalMsg)
+ }
+ return this.$message.error(res.msg)
+ }
+ localStorage.setItem('customerId', res.data.customerId)
+ localStorage.setItem('userType', 'work')
+ localStorage.setItem('showHeader', '0')
+ Cookies.set('token', res.data.token)
+ this.$router.replace({name: 'home'})
+ }).catch(() => {
+ })
+ // epmet-ext9.elinkservice.cn/platform-admin
+ },
//选择客户
- selectCustomer (row) {
+ selectCustomer(row) {
localStorage.setItem('customerId', row.customerId)
localStorage.setItem('customerName', row.customerName)
this.startLoading()
// const url = 'https://nei.netease.com/api/apimock-v2/e3b1d0eb88e905f6c7ee559b2d6bb7ad/auth/govweb/login'
const url = '/auth/govweb/login'
this.dataForm.customerId = row.customerId
-
- this.$http.post(url, this.dataForm).then(({ data: res }) => {
+ let param = {};
+ Object.assign(param,this.dataForm);
+ param.password = this.encryptedData(this.pubKey, this.dataForm.password);
+ this.$http.post(url, param).then(({data: res}) => {
if (res.code !== 0) {
this.getCaptcha()
return this.$message.error(res.msg)
@@ -250,18 +296,19 @@ export default {
localStorage.setItem('userType', 'work')
Cookies.set('token', res.data.token)
- this.$router.replace({ name: 'home' })
- }).catch(() => { })
+ this.$router.replace({name: 'home'})
+ }).catch(() => {
+ })
this.endLoading()
},
// 取消
- diaCancel () {
+ diaCancel() {
this.diaVisible = false
},
// 开启加载动画
- startLoading () {
+ startLoading() {
loading = Loading.service({
lock: true, // 是否锁定
text: '正在加载……', // 加载中需要显示的文字
@@ -269,13 +316,22 @@ export default {
})
},
// 结束加载动画
- endLoading () {
+ endLoading() {
// clearTimeout(timer);
if (loading) {
loading.close()
}
+ },
+ // 加密
+ encryptedData(key, data) {
+ debugger
+ // 新建JSEncrypt对象
+ let encryptor = new JSEncrypt();
+ // 设置公钥
+ encryptor.setPublicKey(key);
+ // 加密数据
+ return encryptor.encrypt(data);
}
-
}
}