-
-
+
+
+
+
+ 全选
+
+
+ {{item.roleName}}
+
+
+
+
+
+
+
+
+
+
@@ -377,8 +415,10 @@ import CDialog from '@c/CDialog'
import ConfigEdit from './ConfigEdit'
import { mapGetters } from 'vuex'
import { Loading } from 'element-ui' // 引入Loading服务
+import { requestPost } from "@/js/dai/request";
let loading // 加载动画
+const cityOptions = ['上海', '北京', '广州', '深圳'];
export default {
data () {
return {
@@ -408,9 +448,18 @@ export default {
customerId: '',
functionId: '',
shoppingStatus: '',
- reason: ''
+ reason: '',
+ roleList: [],
},
- optionType: '' // 1 上架 /下架 2采集
+ // resiRoleList:[],//居民端角色
+ // govRoleList:[],//工作端角色
+ roleList: {},//所有端的角色列表
+ roleAllList: [],//所有的角色列表
+ roleCheckedArray: [],//选择的角色列表
+ checkAll: true,//是否全选
+ isIndeterminate: true,
+
+ optionType: '' // 1 上架 /下架 2采集 3权限
}
},
@@ -418,6 +467,7 @@ export default {
CDialog, ConfigEdit
},
mounted () {
+ this.renderSelData()
this.initData(localStorage.getItem('customerId'), localStorage.getItem('customerName'))
},
computed: {
@@ -435,28 +485,48 @@ export default {
tableHeight2 () {
return (this.clientHeight - 220) / 2 - 60
},
+ dialogHeight () {
+ return 0.8
+ },
+ dialogWidth () {
+
+ this.resolution === 'small' ? '40%' : '30%'
+ },
...mapGetters(['clientHeight', 'resolution']),
- dataRule () {
+ formRule () {
return {
- customizedName: [
- { required: true, message: this.$t('validate.required'), trigger: 'blur' }
- ],
- functionIcon: [
- { required: true, message: this.$t('validate.required'), trigger: 'blur' }
- ],
- functionGroup: [
- { required: true, message: this.$t('validate.required'), trigger: 'blur' }
- ],
- shoppingStatus: [
- { required: true, message: this.$t('validate.required'), trigger: 'blur' }
- ],
- functionExplain: [
- { required: true, message: this.$t('validate.required'), trigger: 'blur' }
+ reason: [
+ { required: true, message: "请填写理由", trigger: 'blur' }
]
+
}
}
},
methods: {
+ async renderSelData () {
+ this.startLoading()
+ const url = "/epmetuser/govstaffrole/resigovrolelist"
+ // const url = "https://nei.netease.com/api/apimock-v2/e3b1d0eb88e905f6c7ee559b2d6bb7ad/epmetuser/govstaffrole/resigovrolelist"
+ const params = {}
+ const { data, code, msg } = await requestPost(url, params)
+ if (code === 0) {
+ this.roleList = data
+ this.roleAllList = this.activeName === 'resi' ? data.resiRoleList : data.govRoleList
+ this.roleAllList.forEach(item => {
+ this.roleCheckedArray.push(item.roleKey)
+ })
+
+ }
+ this.endLoading()
+ },
+ tabChange (val) {
+
+ if (val.name === 'resi') {
+ this.roleAllList = this.roleList.resiRoleList
+ } else {
+ this.roleAllList = this.roleList.govRoleList
+ }
+ },
initData (customerId, customerName) {
this.customerId = customerId
this.customerName = customerName
@@ -531,27 +601,41 @@ export default {
this.upOrDownDia.visible = false
},
upOrDownDiaOk () {
- let url = ''
- // const url = '/oper/customize/customerfunctiondetail/updateshoppingstatus'
- if (this.optionType === '1') {
- // url = 'https://nei.netease.com/api/apimock-v2/e3b1d0eb88e905f6c7ee559b2d6bb7ad/oper/customize/customerfunctiondetail/updateshoppingstatus'
- url = '/oper/customize/customerfunctiondetail/updateshoppingstatus'
- } else {
- // url = 'https://nei.netease.com/api/apimock-v2/e3b1d0eb88e905f6c7ee559b2d6bb7ad/oper/customize/customerfunctiondetail/customerfunctioncollect'
- url = '/oper/customize/customerfunctiondetail/customerfunctioncollect'
- }
- this.startLoading()
+ this.$refs['upOrDownForm'].validate((valid, messageObj) => {
+ if (!valid) {
+ app.util.validateRule(messageObj)
+ return false
+ }
+ let url = ''
+ // const url = '/oper/customize/customerfunctiondetail/updateshoppingstatus'
+ if (this.optionType === '3') {
+ this.savePermission()
+ return
+ } else if (this.optionType === '1') {
+ // url = 'https://nei.netease.com/api/apimock-v2/e3b1d0eb88e905f6c7ee559b2d6bb7ad/oper/customize/customerfunctiondetail/updateshoppingstatus'
+ url = '/oper/customize/customerfunctiondetail/updateshoppingstatus'
+ } else if (this.optionType === '2') {
+ // url = 'https://nei.netease.com/api/apimock-v2/e3b1d0eb88e905f6c7ee559b2d6bb7ad/oper/customize/customerfunctiondetail/customerfunctioncollect'
+ url = '/oper/customize/customerfunctiondetail/customerfunctioncollect'
+ }
+ this.startLoading()
- window.app.ajax.post(url, this.upOrDownForm,
- (data, rspMsg) => {
- this.$message.success('操作成功')
- this.upOrDownDia.visible = false
- this.loadTableData()
- },
- (rspMsg, data) => {
- this.$message.error(rspMsg)
- })
- this.endLoading()
+ window.app.ajax.post(url, this.upOrDownForm,
+ (data, rspMsg) => {
+
+ if (this.optionType === '2') {
+ this.savePermission()
+ } else {
+ this.$message.success('操作成功')
+ }
+ this.upOrDownDia.visible = false
+ this.loadTableData()
+ this.endLoading()
+ },
+ (rspMsg, data) => {
+ this.$message.error(rspMsg)
+ })
+ })
},
// 编辑
editResiShow (index) {
@@ -565,10 +649,93 @@ export default {
this.loadTableData()
},
+ // 设置权限
+ showPermission (functionId) {
+
+ this.optionType = '3'
+ this.upOrDownDia.title = "角色权限"
+ this.upOrDownForm = {
+ customerId: this.customerId,
+ functionId: functionId,
+ }
+ this.getPermission()
+ this.upOrDownDia.visible = true
+
+ },
+ //获取权限
+ async getPermission () {
+ this.startLoading()
+ // const url = "https://nei.netease.com/api/apimock-v2/e3b1d0eb88e905f6c7ee559b2d6bb7ad/oper/customize/customerfunctionrole/customerfunctionrolelist"
+ const url = "/oper/customize/customerfunctionrole/customerfunctionrolelist"
+ // this.upOrDownForm.roleList = roleList
+
+ const { data, code, msg } = await requestPost(url, this.upOrDownForm)
+
+ if (code === 0) {
+ this.roleCheckedArray = []
+ data.forEach(item => {
+ this.roleCheckedArray.push(item.roleKey)
+ })
+ this.endLoading()
+ }
+
+ },
+ //设置权限
+ async savePermission () {
+ this.startLoading()
+ if (this.roleCheckedArray.length === 0) {
+ this.$message.warning('所选角色数量必须大于1')
+ return false
+ }
+ this.upOrDownForm.roleList = []
+ this.roleAllList.forEach(allItem => {
+ this.roleCheckedArray.forEach(selItem => {
+ let obj = {}
+ if (selItem === allItem.roleKey) {
+ obj.roleKey = allItem.roleKey
+ obj.roleName = allItem.roleName
+ this.upOrDownForm.roleList.push(obj)
+
+ }
+ })
+ })
+ this.upOrDownForm.fromApp = this.activeName
+ console.log(this.upOrDownForm)
+ const url = "/oper/customize/customerfunctionrole/savecustomerfunctionrole"
+ // const url = "https://nei.netease.com/api/apimock-v2/e3b1d0eb88e905f6c7ee559b2d6bb7ad/oper/customize/customerfunctionrole/savecustomerfunctionrole"
+ // this.upOrDownForm.roleList = roleList
+
+ const { data, code, msg } = await requestPost(url, this.upOrDownForm)
+ if (code === 0) {
+ this.$message.success('操作成功')
+ this.upOrDownDia.visible = false
+
+ } else {
+ this.$message.error(msg)
+ }
+ this.endLoading()
+ },
+ handleCheckAllChange (val) {
+ if (val) {
+ this.roleAllList.forEach(item => {
+ this.roleCheckedArray.push(item.roleKey)
+ })
+ } else {
+ this.roleCheckedArray = []
+ }
+
+ this.isIndeterminate = false;
+ },
+ handleCheckedCitiesChange (value) {
+ let checkedCount = value.length;
+ this.checkAll = checkedCount === this.roleAllList.length;
+ this.isIndeterminate = checkedCount > 0 && checkedCount < this.roleAllList.length;
+ },
+
// 采集
addFunction (row) {
this.optionType = '2'
- this.upOrDownDia.title = '采集原因'
+ this.upOrDownDia.title = '采集'
this.upOrDownForm = {
customerId: row.customerId,
functionId: row.functionId,
diff --git a/epmet-oper-web/src/views/modules/customer/customize/CustomerList.vue b/epmet-oper-web/src/views/modules/customer/customize/CustomerList.vue
index 47922f6..c9160f2 100644
--- a/epmet-oper-web/src/views/modules/customer/customize/CustomerList.vue
+++ b/epmet-oper-web/src/views/modules/customer/customize/CustomerList.vue
@@ -17,6 +17,7 @@
{
this.$refs['ref_footbarlist'].doLayout() // 解决表格错位
})
+ } else if (this.showType === 'list') {
+ this.$nextTick(() => {
+ this.$refs['ref_customertable'].doLayout() // 解决表格错位
+ })
+
}
},
diff --git a/epmet-oper-web/src/views/modules/partner/index.vue b/epmet-oper-web/src/views/modules/partner/index.vue
index 6ce808a..d959314 100644
--- a/epmet-oper-web/src/views/modules/partner/index.vue
+++ b/epmet-oper-web/src/views/modules/partner/index.vue
@@ -1,27 +1,29 @@
-
-
+
+
- 新增
+ 新增
-
+
-
+
@@ -44,7 +46,7 @@ export default {
mixins: [],
components: { CTable, edit },
- data() {
+ data () {
return {
tableUrl: requestUrlPrefix + "/commonservice/externalcustomer/list",
// 查询条件
@@ -78,26 +80,30 @@ export default {
],
};
},
-
+ activated () {
+ this.$nextTick(() => {
+ this.$refs.table.doLayout() // 解决表格错位
+ })
+ },
computed: {
- tableHeight() {
+ tableHeight () {
return this.clientHeight - 60 - 80 - 80 - 90;
},
...mapGetters(["clientHeight", "env"]),
},
- created() {
+ created () {
this.refresh();
},
methods: {
// 刷新
- async refresh() {
+ async refresh () {
await nextTick();
this.$refs.table.loadData(); // 获取表格数据
},
// 新增
- addShow() {
+ addShow () {
const row = {
customerId: "",
customerName: "",
@@ -105,16 +111,16 @@ export default {
this.$refs["edit"].init(row, "A");
},
// 编辑
- editShow(row) {
+ editShow (row) {
this.$refs["edit"].init(row, "U");
},
- del(row) {
+ del (row) {
this.$message({
type: "error",
message: "无法删除,因为没有提供接口",
});
},
- editDiaOK() {
+ editDiaOK () {
this.refresh();
},
},
diff --git a/epmet-oper-web/src/views/modules/productConfig/subscribe/MyTemp.vue b/epmet-oper-web/src/views/modules/productConfig/subscribe/MyTemp.vue
new file mode 100644
index 0000000..9fc8e90
--- /dev/null
+++ b/epmet-oper-web/src/views/modules/productConfig/subscribe/MyTemp.vue
@@ -0,0 +1,432 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/epmet-oper-web/src/views/modules/productConfig/subscribe/TempEdit.vue b/epmet-oper-web/src/views/modules/productConfig/subscribe/TempEdit.vue
new file mode 100644
index 0000000..0f93e2f
--- /dev/null
+++ b/epmet-oper-web/src/views/modules/productConfig/subscribe/TempEdit.vue
@@ -0,0 +1,278 @@
+
+
+
+
+
+
+
+ 111
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ $t('cancel') }}
+ {{ $t('confirm') }}
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/epmet-oper-web/src/views/modules/productConfig/subscribe/TempList.vue b/epmet-oper-web/src/views/modules/productConfig/subscribe/TempList.vue
new file mode 100644
index 0000000..2667cdc
--- /dev/null
+++ b/epmet-oper-web/src/views/modules/productConfig/subscribe/TempList.vue
@@ -0,0 +1,242 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 选择
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+