完善业务
This commit is contained in:
@@ -7,5 +7,5 @@ VUE_APP_BASE_API = '/api'
|
||||
## 配置测试和本地开发时的 接口地址
|
||||
|
||||
##VUE_APP_URL = "http://127.0.0.1:4523/m1/4061550-0-default"
|
||||
VUE_APP_URL = "http://192.168.0.105:8114"
|
||||
VUE_APP_URL = "http://192.168.0.105:8115"
|
||||
##VUE_APP_URL = "https://wms.yxtsoft.com"
|
||||
|
||||
@@ -5,4 +5,4 @@ ENV = 'production'
|
||||
VUE_APP_BASE_API = '/api'
|
||||
|
||||
## 配置 正式接口地址
|
||||
VUE_APP_URL = "https://wms.yxtsoft.com"
|
||||
VUE_APP_URL = "https://admin.yxtsoft.com"
|
||||
|
||||
@@ -141,7 +141,7 @@ export function roleMenuTree(data) {
|
||||
// 菜单授权保存
|
||||
export function saveorgrolemenus(data) {
|
||||
return request({
|
||||
url: `/admin/apiadmin/sysroleauthorize/updateRoleAndMenu`,
|
||||
url: `/admin/apiadmin/sysroleauthorize/updateRoleAndMenuAdmin`,
|
||||
method: 'POST',
|
||||
data: data,
|
||||
headers: {
|
||||
|
||||
@@ -27,5 +27,25 @@ export default {
|
||||
});
|
||||
},
|
||||
|
||||
// 查询单位管理资源注册信息
|
||||
getRegistrationInformation: function(data) {
|
||||
return request({
|
||||
url: '/admin/apiadmin/sysorgauthorize/getRegistrationInformation/' + data,
|
||||
method: 'get'
|
||||
})
|
||||
},
|
||||
|
||||
|
||||
// 保存注册信息
|
||||
saveReg: function(data) {
|
||||
return request({
|
||||
// baseURL: "http://127.0.0.1:4523/m1/4061550-0-default",
|
||||
url: '/admin/apiadmin/sysorgregister/save',
|
||||
method: 'post',
|
||||
data: data,
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
}
|
||||
});
|
||||
},
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@ import request from '@/utils/request'
|
||||
let tokens = window.sessionStorage.getItem('token');
|
||||
export function userList(data) {
|
||||
return request({
|
||||
url: '/admin/apiadmin/sysuser/listPage',
|
||||
url: '/admin/apiadmin/sysuser/listPageVoAdmin',
|
||||
method: 'post',
|
||||
data: data,
|
||||
headers: {
|
||||
|
||||
@@ -417,6 +417,15 @@
|
||||
|
||||
if (response.code == 200) {
|
||||
|
||||
if (response.data.userName != "yxt_admin") {
|
||||
this.$message({
|
||||
message: '此账号不能登录.',
|
||||
type: 'warning'
|
||||
})
|
||||
loading.close()
|
||||
return
|
||||
}
|
||||
|
||||
this.$router.push({
|
||||
path: '/index'
|
||||
})
|
||||
|
||||
@@ -205,7 +205,7 @@
|
||||
editRow(row) {
|
||||
this.dialogTitle = '编辑'
|
||||
this.editDialog = true
|
||||
this.roleForm = row
|
||||
this.roleForm = Object.assign({}, row)
|
||||
this.checkedId = []
|
||||
this.groupSid = row.sid
|
||||
|
||||
|
||||
@@ -943,24 +943,55 @@
|
||||
// roleMenus = this.$refs.Tree.getCheckedKeys()
|
||||
console.log('已选节点、半选节点node', roleMenus)
|
||||
const roleMenus_sid = []
|
||||
var menuSidList = []
|
||||
var top_level_menuSid = '' // 顶级菜单sid
|
||||
|
||||
// menuSidList.push({
|
||||
// menuSid: roleMenus[i].sid,
|
||||
// menuName: roleMenus[i].name,
|
||||
// roleSid: this.Thisrow.sid,
|
||||
// sourceSid: roleMenus[i].sourceSid == "" ? roleMenus[i].sid : roleMenus[i].sourceSid
|
||||
// })
|
||||
|
||||
|
||||
for (var i = 0; i < roleMenus.length; i++) {
|
||||
roleMenus_sid.push(roleMenus[i].sid)
|
||||
|
||||
if (roleMenus[i].psid == "") {
|
||||
top_level_menuSid += roleMenus[i].sid + ","
|
||||
}
|
||||
|
||||
}
|
||||
console.log('已选节点、半选节点sid', roleMenus_sid)
|
||||
// let parentTrue = this.$refs.Tree.getHalfCheckedKeys()
|
||||
// for (let i = 0; i < parentTrue.length; i++) {
|
||||
// for (let j = 0; j < this.chace.length; j++) {
|
||||
// if (parentTrue[i] == this.chace[j]) {
|
||||
// parentTrue.splice(i, 1);
|
||||
// }
|
||||
// }
|
||||
console.log('顶级sid', top_level_menuSid.substring(0, top_level_menuSid.length - 1))
|
||||
var top_level_menuSidList = top_level_menuSid.substring(0, top_level_menuSid.length - 1).split(",") // 顶级菜单集合
|
||||
|
||||
for (var i = 0; i < top_level_menuSidList.length; i++) {
|
||||
|
||||
var top_level_menuSid = top_level_menuSidList[i]
|
||||
|
||||
var roleMenusList = []
|
||||
|
||||
for (var j = 0; j < roleMenus.length; j++) {
|
||||
if (roleMenus[j].sourceSid == top_level_menuSid) {
|
||||
roleMenusList.push((roleMenus[j].sid))
|
||||
}
|
||||
}
|
||||
|
||||
menuSidList.push({
|
||||
menuSid: roleMenusList.toString(),
|
||||
roleSid: this.Thisrow.sid,
|
||||
sourceSid: top_level_menuSid
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
console.log('已选节点、半选节点sid', menuSidList)
|
||||
// let params = {
|
||||
// menuSid: roleMenus_sid.toString(),
|
||||
// roleSid: this.Thisrow.sid,
|
||||
// sourceSid: "d936f1ba-03c3-11ec-bf08-48452053aa45"
|
||||
// }
|
||||
let params = {
|
||||
menuSid: roleMenus_sid.toString(),
|
||||
roleSid: this.Thisrow.sid,
|
||||
sourceSid: "d936f1ba-03c3-11ec-bf08-48452053aa45"
|
||||
}
|
||||
saveorgrolemenus(params).then(res => {
|
||||
saveorgrolemenus(menuSidList).then(res => {
|
||||
this.roleDialog = false
|
||||
this.charactarDialog = false
|
||||
this.checkStrictly = true
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
<el-input v-model="queryParams.params.linkPerson" placeholder="" clearable />
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="联系电话">
|
||||
<el-input v-model="queryParams.params.contactNumber" placeholder="" clearable />
|
||||
<el-input v-model="queryParams.params.linkPhone" placeholder="" clearable />
|
||||
</el-form-item>
|
||||
<el-form-item label="注册日期">
|
||||
<el-date-picker v-model="queryParams.params.createDateStart" type="date" placeholder="选择日期"
|
||||
@@ -42,16 +42,17 @@
|
||||
<div class="">
|
||||
<el-table v-loading="tableLoading" :data="dataList" border style="width: 100%">
|
||||
<el-table-column fixed width="60" label="序号" type="index" :index="indexMethod" align="center" />
|
||||
<el-table-column label="操作" align="center" width="100">
|
||||
<el-table-column label="操作" align="center" width="160">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="primary" size="mini" @click="toRelevancy(scope.row)">授权</el-button>
|
||||
<el-button type="primary" size="mini" @click="toDialog(scope.row)">注册信息</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="orgName" label="单位名称" align="center" />
|
||||
<!-- <el-table-column prop="unitAddress" label="单位地址" align="center" /> -->
|
||||
<el-table-column prop="linkPerson" label="联系人" align="center" />
|
||||
<!-- <el-table-column prop="contactNumber" label="联系电话" align="center" />
|
||||
<el-table-column prop="registerDate" label="注册日期" align="center" /> -->
|
||||
<el-table-column prop="linkPhone" label="联系电话" align="center" />
|
||||
<!-- <el-table-column prop="registerDate" label="注册日期" align="center" /> -->
|
||||
<el-table-column prop="authorizeGroupName" label="权限组" align="center" />
|
||||
</el-table>
|
||||
</div>
|
||||
@@ -81,6 +82,47 @@
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
|
||||
<!-- 权限组设置 -->
|
||||
<el-dialog :title="orgNameTitle" :visible.sync="roleDialog2" width="60%">
|
||||
<el-table v-loading="tableLoading" :data="registerList" border style="width: 100%;margin-top: -20px;">
|
||||
<el-table-column fixed width="60" label="序号" type="index" :index="indexMethod" align="center" />
|
||||
<!-- <el-table-column label="操作" align="center" width="80">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="primary" size="mini" @click="toRelevancy(scope.row)">保存</el-button>
|
||||
</template>
|
||||
</el-table-column> -->
|
||||
<el-table-column prop="sourceName" label="资源名称" align="center" />
|
||||
<el-table-column prop="createTime" label="注册日期" align="center" />
|
||||
<el-table-column label="有效期至" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-date-picker v-model="scope.row.expireDate" type="date" placeholder="选择日期" format="yyyy-MM-dd"
|
||||
value-format="yyyy-MM-dd" style="width: 200px;">
|
||||
</el-date-picker>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="注册类型" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-radio-group v-model="scope.row.regType" @change="radioChange(scope.row.regType)">
|
||||
<el-radio :label="1">正式版</el-radio>
|
||||
<el-radio :label="2">体验版</el-radio>
|
||||
</el-radio-group>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
</el-table>
|
||||
<!-- <div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="saveRole('roleForm')">保 存</el-button>
|
||||
<el-button @click="closeDialog">关 闭</el-button>
|
||||
</div> -->
|
||||
|
||||
<div style="margin-top: 10px" class="text-center">
|
||||
<el-button type="primary" @click="saveRegister">保 存</el-button>
|
||||
<el-button @click="dialogClose2">关 闭</el-button>
|
||||
</div>
|
||||
|
||||
</el-dialog>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -125,7 +167,11 @@
|
||||
groupSids: [],
|
||||
orgSid: ''
|
||||
},
|
||||
roleList: []
|
||||
roleList: [],
|
||||
orgNameTitle: "",
|
||||
radio: "",
|
||||
roleDialog2: false,
|
||||
registerList: []
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
@@ -207,6 +253,10 @@
|
||||
this.roleForm.groupSids = row.groupSids
|
||||
|
||||
},
|
||||
doClose() {
|
||||
this.$store.dispatch('tagsView/delView', this.$route)
|
||||
this.$router.go(-1)
|
||||
},
|
||||
|
||||
saveRole() {
|
||||
|
||||
@@ -224,7 +274,34 @@
|
||||
groupSids: [],
|
||||
orgSid: ''
|
||||
}
|
||||
},
|
||||
|
||||
toDialog(row) {
|
||||
this.orgNameTitle = "单位注册信息:" + row.orgName
|
||||
|
||||
req.getRegistrationInformation(row.orgSid).then(res => {
|
||||
this.registerList = res.data
|
||||
this.roleDialog2 = true
|
||||
})
|
||||
|
||||
},
|
||||
radioChange(val) {
|
||||
|
||||
},
|
||||
saveRegister() {
|
||||
console.log("aaa", this.registerList);
|
||||
|
||||
req.saveReg(this.registerList).then(res => {
|
||||
this.roleDialog2 = false
|
||||
})
|
||||
|
||||
},
|
||||
dialogClose2() {
|
||||
this.roleDialog2 = false
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -40,18 +40,18 @@ module.exports = {
|
||||
},
|
||||
proxy: {
|
||||
'/api': { // 匹配所有以 '/api'开头的请求路径
|
||||
// target: 'http://192.168.0.105:8114',
|
||||
// target: 'http://192.168.0.105:8115',
|
||||
target: process.env.VUE_APP_URL, // 代理目标的基础路径
|
||||
// target: 'https://wms.yxtsoft.com/api', // 代理目标的基础路径
|
||||
// target: 'https://admin.yxtsoft.com/api', // 代理目标的基础路径
|
||||
changeOrigin: true, // 支持跨域
|
||||
pathRewrite: { // 重写路径: 去掉路径中开头的'/api'
|
||||
'^/api': ''
|
||||
}
|
||||
},
|
||||
'/upload': { // 匹配所有以 '/api'开头的请求路径
|
||||
// target: 'http://192.168.0.105:8114',
|
||||
// target: 'http://192.168.0.105:8115',
|
||||
target: process.env.VUE_APP_URL, // 代理目标的基础路径
|
||||
// target: 'https://wms.yxtsoft.com/api', // 代理目标的基础路径
|
||||
// target: 'https://admin.yxtsoft.com/api', // 代理目标的基础路径
|
||||
changeOrigin: true, // 支持跨域
|
||||
pathRewrite: { // 重写路径: 去掉路径中开头的'/api'
|
||||
'^/upload': ''
|
||||
|
||||
Reference in New Issue
Block a user